Documentation doesn't explain accepted contract method "overrides"
See original GitHub issueThe documentation for Contract interaction indicates that an optional overrides
can be provided to contract method calls. There is no explanation for what these overrides
are, or which ones are supported.
Digging through other issues I find reference to some of these overrides, but without a formal list, a user has no idea what is supported.
For instance I am trying to get blockNumber
to work, however there is no documentation telling me how to do this.
Link to documentation that is missing explanation: https://docs.ethers.io/v5/api/contract/contract/#Contract-functionsCall
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Contracts — Solidity 0.8.17 documentation
When Ether is sent directly to a contract (without a function call, i.e. sender uses send or transfer ) but the receiving contract...
Read more >Why do I need to override the equals and hashCode methods ...
You must override hashCode() in every class that overrides equals(). Failure to do so will result in a violation of the general contract...
Read more >Solidity override vs. virtual functions | by Kseniya Lifanova
Solidity is an object-oriented programming language that supports multiple inheritances. You can inherit from a base contract and then override ...
Read more >Allow no phpdoc for methods that override base class
FYI, after agreement this has been decided about overridden methods: 1) no documentation IS allowed. 2) full documentation IS allowed. 3) @inheritdoc and...
Read more >How to Write Doc Comments for the Javadoc Tool - Oracle
It does not describe implementation details, such as whether the method is ... If you add any documentation comment or tag to m()...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ricmoo Thank you for adding the documentation!
Sorry Holidays we’re far busier than I expected. I’ve been working on it, it just isn’t published yet.
I’ll give a quick overview here, but there are nuances I need to double check, so there may be some inaccuracies.
Yes, you can pass
blockNumber
in as an override for constant functions, and function on thecallStatic
bucket and thepopulateTransaction
bucket. But, not all backends support this; Etherscan does not allow block tags to call or estimateGas, INFURA only allows it for their paid tier, on Alchemy it will chew up your compute credits faster and if you are connecting to Geth or Parity, your node must be syncing in Archive mode. For nodes in archive mode, there is also a configurable depth which is how far back in time to maintain the archive-ness; in this case yourblockNumber
must be within its safe range.Does that all make sense? I’ll be experimenting today and hopefully get the new flatworm version out along with the documentation updates. 😃