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.
Accept the transfer of ownership
Only callable by the pending admin. Resets the pending admin if succesful.
Sets the permission for a function selector
_functionSelector
bytes4
Method signature on which the permission is changed
_executorCanCall
bool
True if selector is callable by the executor
Retrieve the destination address
_0
address
The destination address
Retrieve the executor address
_0
address
The executor address
Returns true if the executor is allowed to perform a call on the given selector
_0
bytes4
undefined
_0
bool
True if executor is allowed to call
Retrieves the current admin address
_0
address
The admin address
Retrieve the current pending admin address
_0
address
The pending admin address
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.
_newAdmin
address
New admin address
Sets the executor address
_newExecutor
address
New address for the executor
Retrieves the version of the contract
_0
string
Version of the contract
The admin address changed
admin indexed
address
New admin address
The stored destination address has been changed
destination indexed
address
The new destination address
The stored executor address has been changed
executor indexed
address
The new executor address
The storage permission for a selector has been changed
selector
bytes4
The 4 bytes method selector
status
bool
True if executor is allowed
The pending admin address changed
pendingAdmin indexed
address
New pending admin address
The address is zero
The operator is unauthorized for the caller
caller
address
Address performing the call