brinktrade / brink-core

Core smart contracts for Brink accounts
GNU General Public License v3.0
12 stars 7 forks source link

Add the onlyDelegateCallable modifier to external Account.sol functions #35

Closed mikec closed 2 years ago

mikec commented 2 years ago

now reverts with NotDelegateCall() if the Account.sol implementation contract is called directly. Prevents any possibility of state modification to Account.sol implementation after it's created.

mikec commented 2 years ago

slight gas cost increase (~40 gas per call), but worth the additional security. No one found any explicit way to change state on Account.sol implementation, but this provides added protection against it for very little gas cost.