Zondax / filecoin-solidity

Filecoin Solidity API Library
Apache License 2.0
94 stars 43 forks source link

APIs which only fetch state need to marked "view" in the definition #298

Closed shrenujbansal closed 1 year ago

shrenujbansal commented 1 year ago

Several APIs in the library only fetch state from builtin actors. All of these need to be specified as view in the function definition Not specifying this implies that these functions could possibly change state. In addition, if a read only contract API tries to invoke these APIs, they will be charged gas for a transaction when they don't need to do so

:link: zboto Link

rllola commented 1 year ago

I think this issue as already been answered here.

https://github.com/Zondax/filecoin-solidity/issues/289

emmanuelm41 commented 1 year ago

@shrenujbansal as lola said, this issue is related to what was mentioned on that issue. There is no way for now to change them to statical, so that they can be marked as view.