Firewall
Figment
Firewall
This contract accepts calls to admin-level functions of an underlying contract, and ensures the caller holds an appropriate role for calling that function. There are two roles: ‐ An Admin can call anything ‐ An Executor can call specific functions
The list of function is customizable. Random callers cannot call anything through this contract, even if the underlying function is unpermissioned in the underlying contract. Calls to non-admin functions should be called at the underlying contract directly.
Methods
acceptAdmin
Accept the transfer of ownership
Only callable by the pending admin. Resets the pending admin if succesful.
allowExecutor
Sets the permission for a function selector
Parameters
destination
Retrieve the destination address
Returns
executor
Retrieve the executor address
Returns
executorCanCall
Returns true if the executor is allowed to perform a call on the given selector
Parameters
Returns
getAdmin
Retrieves the current admin address
Returns
getPendingAdmin
Retrieve the current pending admin address
Returns
proposeAdmin
Proposes a new address as admin
This security prevents setting an invalid address as an admin. The pendingadmin has to claim its ownership of the contract, and prove that the newaddress is able to perform regular transactions.
Parameters
setExecutor
Sets the executor address
Parameters
Events
SetAdmin
The admin address changed
Parameters
SetDestination
The stored destination address has been changed
Parameters
SetExecutor
The stored executor address has been changed
Parameters
SetExecutorPermissions
The storage permission for a selector has been changed
Parameters
SetPendingAdmin
The pending admin address changed
Parameters
Errors
InvalidZeroAddress
The address is zero
Unauthorized
The operator is unauthorized for the caller
Parameters
Last updated