FirewallTransparentUpgradableProxy.sol
Last updated
Last updated
FirewallTransparentUpgradeableProxy
is Ironblocks' extended version of OpenZeppelin's contract.
Using this contract instead of the standard contract, alongside the instead of the standard allows you to enable firewall protection on every one of your external methods without having to add any firewall-specific code to your implementation contract.
While the exact technical specifications of this implementation can be found in our , the important changes to note are the following:
The proxy constructor now receives the firewall
address and firewallAdmin
address.
Similar to the implementation and admin addresses, these are stored in pseudorandom deterministic slots to prevent storage collision.
The is responsible for managing the policies, and the standard admin can change the and addresses.
constructor(address _logic, address admin_, bytes memory _data, address _firewall, address _firewallAdmin)
Initializes a firewall upgradeable proxy managed by _admin
, backed by the implementation at _logic
, and optionally initialized with _data
(as explained in ). Also sets _firewall
and _firewallAdmin
.
function changeFirewall(address _firewall)
_firewall
address
function changeFirewallAdmin(address _firewallAdmin)
_firewallAdmin
address
function firewall()
function firewallAdmin()
Used for routing calls to this if they were called by the or the . Otherwise, forwards calls to the implementation contract (i.e. _fallback()
).
Used to protect calls to the implementation contract, so that any calls to it would go through the 's and hooks.
Callable only by the , use this function to change the that this uses.
the address of the new to use
Callable only by the , use this function to change the of the Firewall that this uses.
the address of the new
Returns the current address.
Returns the current address.
On our GitLab repository: