TUPProxy
Kiln
TUPProxy (Transparent Upgradeable Pausable Proxy)
This contract extends the Transparent Upgradeable proxy and adds a system wide pause feature. When the system is paused, the fallback will fail no matter what calls are made. Address Zero is allowed to perform calls even if paused to allow view calls made from RPC providers to properly work.
Methods
admin
Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[eth_getStorageAt
] RPC call. 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103
Returns
Name | Type | Description |
---|---|---|
admin_ | address | undefined |
changeAdmin
Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.
Parameters
Name | Type | Description |
---|---|---|
newAdmin | address | undefined |
implementation
Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[eth_getStorageAt
] RPC call. 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
Returns
Name | Type | Description |
---|---|---|
implementation_ | address | undefined |
pause
Pauses system
paused
Retrieves Paused state
Returns
Name | Type | Description |
---|---|---|
_0 | bool | Paused state |
unpause
Unpauses system
upgradeTo
Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
upgradeToAndCall
Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by data
, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.
Parameters
Name | Type | Description |
---|---|---|
newImplementation | address | undefined |
data | bytes | undefined |
Events
AdminChanged
Parameters
Name | Type | Description |
---|---|---|
previousAdmin | address | undefined |
newAdmin | address | undefined |
BeaconUpgraded
Parameters
Name | Type | Description |
---|---|---|
beacon | address | undefined |
Paused
The system is now paused
Parameters
Name | Type | Description |
---|---|---|
admin | address | The admin at the time of the pause event |
Unpaused
The system is now unpaused
Parameters
Name | Type | Description |
---|---|---|
admin | address | The admin at the time of the unpause event |
Upgraded
Parameters
Name | Type | Description |
---|---|---|
implementation | address | undefined |
Errors
CallWhenPaused
A call happened while the system was paused
Last updated