-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.