3 votes
Accepted

Is it possible to make a static call to a non-static function from within a smart contract without changing blockchain state?

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 ...
user avatar
  • 3,859
2 votes
Accepted

Call another contract with huff?

This is close! When you're storing the four byte function selector, you're actually storing 32 bytes where the selector is to the right. 0xaabbccdd // [selector] 0x00 // [offset, selector] ...
user avatar
2 votes

Is it possible to make a static call to a non-static function from within a smart contract without changing blockchain state?

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 ...
user avatar
  • 692

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