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
All of WalletMainLib’s functions have public visibility. Functions like calcConfirmsNeeded or getAmount should be private, and functions that are only intended to be called from “the outside world” (i.e. not by a deployed contract) should be external. For example, functions that represent actions from the owners of the wallet, such as serveTx, addOwner, removeOwner, etc, should be external instead of public because they are not intended to be called from within the library functions themselves.
As a result, the code will not only be more explicit, but could also save gas. The reason for such lower gas costs is that external calls don’t need to copy arguments to memory and can directly read from calldata.
Consider reviewing the visibility of all the functions in the wallet contracts, as per solidity.readthedocs.io and implementing the recommendations and best practices were possible.
The text was updated successfully, but these errors were encountered:
All of WalletMainLib’s functions have public visibility. Functions like calcConfirmsNeeded or getAmount should be private, and functions that are only intended to be called from “the outside world” (i.e. not by a deployed contract) should be external. For example, functions that represent actions from the owners of the wallet, such as serveTx, addOwner, removeOwner, etc, should be external instead of public because they are not intended to be called from within the library functions themselves.
As a result, the code will not only be more explicit, but could also save gas. The reason for such lower gas costs is that external calls don’t need to copy arguments to memory and can directly read from calldata.
Consider reviewing the visibility of all the functions in the wallet contracts, as per solidity.readthedocs.io and implementing the recommendations and best practices were possible.
The text was updated successfully, but these errors were encountered: