Solidity: Native solidity staticcall

Created on 8 Jan 2018  路  4Comments  路  Source: ethereum/solidity

Hi,

I wanted to suggest an enchantment.
To allow solidity to use the new staticcall not just as assembly, but be able to do something like:
contract.static.function(arg1, arg2);

Hope this is not a repost, searched old issues and couldn't find anything similar.

Adam.

Most helpful comment

Note the compiler (once the feature is enabled) will automatically use staticcall if the function is marked view or pure. For public functions the static call can be enforced by using the external interface, e.g. this.mypurefunction(1,2);

All 4 comments

Note the compiler (once the feature is enabled) will automatically use staticcall if the function is marked view or pure. For public functions the static call can be enforced by using the external interface, e.g. this.mypurefunction(1,2);

Is there a timeline when this feature will be enabled?

When the tests are written I guess: https://github.com/ethereum/solidity/pull/2966

Done via #2966.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

axic picture axic  路  4Comments

area picture area  路  3Comments

AnthonyAkentiev picture AnthonyAkentiev  路  3Comments

chriseth picture chriseth  路  4Comments

chriseth picture chriseth  路  3Comments