arc.js_legacy
arc.js_legacy copied to clipboard
Evaluate ways to save users' gas and avoid contract reverts.
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.