cosmos / solidity-ibc-eureka

This is a work-in-progress solidity implementation of IBC Eureka.
MIT License
12 stars 2 forks source link

Consider the usage of staticcall for read only cross-contract calls #48

Open sangier opened 1 month ago

sangier commented 1 month ago

Staticcall can be useful for functions where only a return value is desired and state changes are unwanted. It add an extra layer of safety since it will revert if the contract called causes a state change and can save some gas.

Food for thoughts:

  1. More investigation is needed.
  2. The snippets of code where it can be applied should be identified.