1

By definition of EIP-214 any state change within a static call will cause an error. So if you define your function as view or pure this will not be possible, as this indicates the calling contract that they should use staticcall. BUT if you want to write a method and don't care about the view or pure you can do a little trick. You create a method that will ...


1

From the ethers documentation we can see that contract.callStatic is an utility that interacts with the node itself. It works by asking the node to simulate the transaction, without the tx being actually sent to be mined. A similar behaviour isn't available at a smart contract level as any state change is permanent if not reverted. A workaround could be re-...


Only top voted, non community-wiki answers of a minimum length are eligible