Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate ways to save users' gas and avoid contract reverts. #216

Open
tsuberim opened this issue May 14, 2018 · 0 comments
Open

Evaluate ways to save users' gas and avoid contract reverts. #216

tsuberim opened this issue May 14, 2018 · 0 comments

Comments

@tsuberim
Copy link

tsuberim commented May 14, 2018

Evaluate and implement ways to save users' gas and avoid contract reverts.

We can avoid reverts by augmenting the existing function parameter validations.

As a fail-safe we could use [contract].[method].call(..), testing that it does not revert, but parameter validation should be as thorough as possible as it is most performant and would help the user in providing them useful feedback.

[contract].[method].call(..) can also be useful for avoiding no-ops that don't revert but nevertheless waste gas (see #215 for example).

Before using [contract].[method].call(..) we should investigate whether there is a significant performance hit, and if there is, we can make it be an optional feature.

@dkent600 dkent600 changed the title use call(..) to validate transactions before reaching the blockchain. Evaluate ways to save users' gas and avoid contract reverts. May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant