You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.The text was updated successfully, but these errors were encountered: