You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
Currently, Filecoin.solidity invokes builtIn Actor using DelegateCall() for both readOnly APIs and APIs which might change the state of the blockchain. For readOnly APIs, solidity devs might want to write their solidity functions as view to simple read without sending transactions. But they cannot because it is not allowed to declare functions as view if DelegateCall is used to read data on-chain.
So we would suggest trying to use staticcall to invoke readOnly APIs from builtIn actors and provide those API as view functions.
Read only flags for methods that don't change the state have been set. So I think this issue can be closed, as we are doing the best we can (use the read only flag)
This concern is raised in Slack.
Currently, Filecoin.solidity invokes builtIn Actor using DelegateCall() for both readOnly APIs and APIs which might change the state of the blockchain. For readOnly APIs, solidity devs might want to write their solidity functions as view to simple read without sending transactions. But they cannot because it is not allowed to declare functions as view if DelegateCall is used to read data on-chain.
So we would suggest trying to use staticcall to invoke readOnly APIs from builtIn actors and provide those API as view functions.
🔗 zboto Link
The text was updated successfully, but these errors were encountered: