How to provide explicit gas limit to a contract call? #1313
Replies: 3 comments 2 replies
-
Use The overrides object may include any of:
|
Beta Was this translation helpful? Give feedback.
-
Can i not pass any other parameter apart from gasPrice, gasLimit, value, nonce? It might not make sense in ethers.js but if i'm building on top of ethers and i want my wrapper provider to handle those override options, then i'd want people to be able to send other override parameters also. Eg. if i'm doing this
I'm getting error
|
Beta Was this translation helpful? Give feedback.
-
You cannot override anything outside what a transaction can override. Generally if you are doing this you probably actually want to subclass the Signer type and create an This keeps the API extensible and reusable. Otherwise each new thing fragments how an object can be used and who it can be used by. Does that make sense? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
currently, calling
myContract.someMethod()
performs an "estimateGas" call first.I want to override this, and force specific gas (and avoid an extra RPC call).
However, if I provide
{gas: someValue}
I get an error:Beta Was this translation helpful? Give feedback.
All reactions