0

I was reading about state override in this article, where you can essentially alter the code of a called contract to do what your own, locally written contract dictates. No deploys occur, and no writes to the blockchain are possible, but it ends up being one option to execute certain kinds of reads very efficiently

Unfortunately, most of my codebase is in TS, and I haven't seen any of this in the web3js docs. Anyone know a way to set override params in web3js?

1 Answers1

0

All readonly (view and pure) functions should be callable without this, but if you care about simulating transactions, callStatic (https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract/-%23-contract-callStatic) will be your friend.

Pandapip1
  • 730
  • 5
  • 15