Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Read Proxy
Write Contract
Write Proxy
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- ExitHandlerProxy
- Optimization enabled
- true
- Compiler version
- v0.5.2+commit.1df8f40c
- Optimization runs
- 2
- EVM Version
- byzantium
- Verified at
- 2026-04-22T03:09:21.996955Z
ExitHandlerProxy.sol
/**
* Copyright (c) 2018-present, Leap DAO (leapdao.org)
*
* This source code is licensed under the Mozilla Public License, version 2,
* found in the LICENSE file in the root directory of this source tree.
*/
pragma solidity 0.5.2;
/**
* @title Proxy
* @dev Implements delegation of calls to other contracts, with proper
* forwarding of return values and bubbling of failures.
* It defines a fallback function that delegates all calls to the address
* returned by the abstract _implementation() internal function.
*/
contract Proxy {
/**
* @dev Fallback function.
* Implemented entirely in `_fallback`.
*/
function () external payable {
_fallback();
}
/**
* @return The Address of the implementation.
*/
function _implementation() internal view returns (address);
/**
* @dev Delegates execution to an implementation contract.
* This is a low level function that doesn't return to its internal call site.
* It will return to the external caller whatever the implementation returns.
* @param implementation Address to delegate.
*/
function _delegate(address implementation) internal {
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
calldatacopy(0, 0, calldatasize)
// Call the implementation.
// out and outsize are 0 because we don't know the size yet.
let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0)
// Copy the returned data.
returndatacopy(0, 0, returndatasize)
switch result
// delegatecall returns 0 on error.
case 0 { revert(0, returndatasize) }
default { return(0, returndatasize) }
}
}
/**
* @dev Function that is run as the first thing in the fallback function.
* Can be redefined in derived contracts to add functionality.
* Redefinitions must call super._willFallback().
*/
function _willFallback() internal {
}
/**
* @dev fallback implementation.
* Extracted to enable manual triggering.
*/
function _fallback() internal {
_willFallback();
_delegate(_implementation());
}
}
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
* as the code is not actually created until after the constructor finishes.
* @param account address of the account to check
* @return whether the target address is a contract
*/
function isContract(address account) internal view returns (bool) {
uint256 size;
// XXX Currently there is no better way to check if there is a contract in an address
// than to check the size of the code at that address.
// See https://ethereum.stackexchange.com/a/14016/36603
// for more details about how this works.
// TODO Check this again before the Serenity release, because all addresses will be
// contracts then.
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
}
/**
* @title UpgradeabilityProxy
* @dev This contract implements a proxy that allows to change the
* implementation address to which it will delegate.
* Such a change is called an implementation upgrade.
*/
contract UpgradeabilityProxy is Proxy {
/**
* @dev Emitted when the implementation is upgraded.
* @param implementation Address of the new implementation.
*/
event Upgraded(address indexed implementation);
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is
* validated in the constructor.
*/
bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3;
/**
* @dev Contract constructor.
* @param _implementation Address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
* This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
*/
constructor(address _implementation, bytes memory _data) public payable {
assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation"));
_setImplementation(_implementation);
if (_data.length > 0) {
bool rv;
(rv,) = _implementation.delegatecall(_data);
require(rv);
}
}
/**
* @dev Returns the current implementation.
* @return Address of the current implementation
*/
function _implementation() internal view returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
/**
* @dev Upgrades the proxy to a new implementation.
* @param newImplementation Address of the new implementation.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Sets the implementation address of the proxy.
* @param newImplementation Address of the new implementation.
*/
function _setImplementation(address newImplementation) private {
require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
}
/**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that would enable this to be done automatically.
*/
contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "org.zeppelinos.proxy.admin", and is
* validated in the constructor.
*/
bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b;
/**
* @dev Modifier to check whether the `msg.sender` is the admin.
* If it is, it will run the function. Otherwise, it will delegate the call
* to the implementation.
*/
modifier ifAdmin() {
if (msg.sender == _admin()) {
_;
} else {
_fallback();
}
}
/**
* Contract constructor.
* It sets the `msg.sender` as the proxy administrator.
* @param _implementation address of the initial implementation.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
* This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
*/
constructor(address _implementation, bytes memory _data) UpgradeabilityProxy(_implementation, _data) public payable {
assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin"));
_setAdmin(msg.sender);
}
/**
* @return The address of the proxy admin.
*/
function admin() external ifAdmin returns (address) {
return _admin();
}
/**
* @return The address of the implementation.
*/
function implementation() external ifAdmin returns (address) {
return _implementation();
}
/**
* @dev Changes the admin of the proxy.
* Only the current admin can call this function.
* @param newAdmin Address to transfer proxy administration to.
*/
function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev Upgrade the backing implementation of the proxy.
* Only the admin can call this function.
* @param newImplementation Address of the new implementation.
*/
function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
/**
* @dev Upgrade the backing implementation of the proxy and call a function
* on the new implementation.
* This is useful to initialize the proxied contract.
* @param newImplementation Address of the new implementation.
* @param data Data to send as msg.data in the low level call.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
*/
function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {
_upgradeTo(newImplementation);
bool rv;
(rv,) = newImplementation.delegatecall(data);
require(rv);
}
/**
* @return The admin slot.
*/
function _admin() internal view returns (address adm) {
bytes32 slot = ADMIN_SLOT;
assembly {
adm := sload(slot)
}
}
/**
* @dev Sets the address of the proxy admin.
* @param newAdmin Address of the new proxy admin.
*/
function _setAdmin(address newAdmin) internal {
bytes32 slot = ADMIN_SLOT;
assembly {
sstore(slot, newAdmin)
}
}
/**
* @dev Only fall back when the sender is not the admin.
*/
function _willFallback() internal {
require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
super._willFallback();
}
}
/**
* @title AdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that would enable this to be done automatically.
*/
contract AdminableProxy is AdminUpgradeabilityProxy {
/**
* Contract constructor.
*/
constructor(address _implementation, bytes memory _data)
AdminUpgradeabilityProxy(_implementation, _data) public payable {
}
/**
* @dev apply proposal.
*/
function applyProposal(bytes calldata data) external ifAdmin returns (bool) {
bool rv;
(rv, ) = _implementation().delegatecall(data);
return rv;
}
}
/**
* Copyright (c) 2018-present, Leap DAO (leapdao.org)
*
* This source code is licensed under the Mozilla Public License, version 2,
* found in the LICENSE file in the root directory of this source tree.
*/
contract ExitHandler {
}
contract ExitHandlerProxy is AdminableProxy {
constructor(ExitHandler _implementation, bytes memory _data)
AdminableProxy(address(_implementation), _data) public payable {
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":2,"enabled":true},"libraries":{},"evmVersion":"byzantium","compilationTarget":{"ExitHandlerProxy.sol":"ExitHandlerProxy"}}
Contract ABI
[{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"upgradeTo","inputs":[{"type":"address","name":"newImplementation"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"upgradeToAndCall","inputs":[{"type":"address","name":"newImplementation"},{"type":"bytes","name":"data"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"address","name":""}],"name":"implementation","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"changeAdmin","inputs":[{"type":"address","name":"newAdmin"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"applyProposal","inputs":[{"type":"bytes","name":"data"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"address","name":""}],"name":"admin","inputs":[],"constant":false},{"type":"constructor","stateMutability":"payable","payable":true,"inputs":[{"type":"address","name":"_implementation"},{"type":"bytes","name":"_data"}]},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"event","name":"AdminChanged","inputs":[{"type":"address","name":"previousAdmin","indexed":false},{"type":"address","name":"newAdmin","indexed":false}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","indexed":true}],"anonymous":false}]
Contract Creation Code
0x6080604052604051610a82380380610a828339810180604052604081101561002657600080fd5b81516020830180519193928301929164010000000081111561004757600080fd5b8201602081018481111561005a57600080fd5b815164010000000081118282018710171561007457600080fd5b50509291905050508181818181816040518080610a2460239139604051908190036023019020600080516020610a048339815191521490506100b257fe5b6100c4826401000000006101e9810204565b60008151111561018257600082600160a060020a0316826040518082805190602001908083835b6020831061010a5780518252601f1990920191602091820191016100eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461016a576040519150601f19603f3d011682016040523d82523d6000602084013e61016f565b606091505b509091505080151561018057600080fd5b505b5050604080517f6f72672e7a657070656c696e6f732e70726f78792e61646d696e0000000000008152905190819003601a0190206000805160206109e4833981519152146101cc57fe5b6101de33640100000000610268810204565b505050505050610282565b6101ff8164010000000061063c61027a82021704565b1515610256576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180610a47603b913960400191505060405180910390fd5b600080516020610a0483398151915255565b6000805160206109e483398151915255565b6000903b1190565b610753806102916000396000f3fe6080604052600436106100585760e060020a60003504633659cfe681146100625780634f1ef286146100955780635c60da1b146101135780638f28397014610144578063a45fee5b14610177578063f851a44014610206575b61006061021b565b005b34801561006e57600080fd5b506100606004803603602081101561008557600080fd5b5035600160a060020a0316610235565b610060600480360360408110156100ab57600080fd5b600160a060020a038235169190810190604081016020820135602060020a8111156100d557600080fd5b8201836020820111156100e757600080fd5b803590602001918460018302840111602060020a8311171561010857600080fd5b50909250905061026f565b34801561011f57600080fd5b5061012861031f565b60408051600160a060020a039092168252519081900360200190f35b34801561015057600080fd5b506100606004803603602081101561016757600080fd5b5035600160a060020a031661035c565b34801561018357600080fd5b506101f26004803603602081101561019a57600080fd5b810190602081018135602060020a8111156101b457600080fd5b8201836020820111156101c657600080fd5b803590602001918460018302840111602060020a831117156101e757600080fd5b50909250905061041b565b604080519115158252519081900360200190f35b34801561021257600080fd5b506101286104c0565b6102236104eb565b61023361022e610545565b610558565b565b61023d61057c565b600160a060020a031633600160a060020a031614156102645761025f8161058f565b61026c565b61026c61021b565b50565b61027761057c565b600160a060020a031633600160a060020a03161415610312576102998361058f565b600083600160a060020a031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f6576040519150601f19603f3d011682016040523d82523d6000602084013e6102fb565b606091505b509091505080151561030c57600080fd5b5061031a565b61031a61021b565b505050565b600061032961057c565b600160a060020a031633600160a060020a031614156103515761034a610545565b9050610359565b61035961021b565b90565b61036461057c565b600160a060020a031633600160a060020a0316141561026457600160a060020a03811615156103c75760405160e560020a62461bcd0281526004018080602001828103825260368152602001806106b76036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103f061057c565b60408051600160a060020a03928316815291841660208301528051918290030190a161025f816105cf565b600061042561057c565b600160a060020a031633600160a060020a031614156104b2576000610448610545565b600160a060020a031684846040518083838082843760405192019450600093509091505080830381855af49150503d80600081146104a2576040519150601f19603f3d011682016040523d82523d6000602084013e6104a7565b606091505b5090925050506104ba565b6104ba61021b565b92915050565b60006104ca61057c565b600160a060020a031633600160a060020a031614156103515761034a61057c565b6104f361057c565b600160a060020a031633141561053d5760405160e560020a62461bcd0281526004018080602001828103825260328152602001806106456032913960400191505060405180910390fd5b610233610233565b6000805160206106978339815191525490565b3660008037600080366000845af43d6000803e808015610577573d6000f35b3d6000fd5b6000805160206106778339815191525490565b610598816105e1565b604051600160a060020a038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60008051602061067783398151915255565b6105ea8161063c565b151561062a5760405160e560020a62461bcd02815260040180806020018281038252603b8152602001806106ed603b913960400191505060405180910390fd5b60008051602061069783398151915255565b6000903b119056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c343616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a165627a7a72305820e8c55a4f53d9b272b1a96427bf6cf7271e6f2e95b2313447d4cb3163be1b1847002910d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c36f72672e7a657070656c696e6f732e70726f78792e696d706c656d656e746174696f6e43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000000000000000000a4c8da764cdf9267ea5f38b5a44433c700f9560600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064ba27a911000000000000000000000000314337900b28afaa04765e59f37f348aa43a82cc0000000000000000000000000000000000000000000000000000000000049d40000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x6080604052600436106100585760e060020a60003504633659cfe681146100625780634f1ef286146100955780635c60da1b146101135780638f28397014610144578063a45fee5b14610177578063f851a44014610206575b61006061021b565b005b34801561006e57600080fd5b506100606004803603602081101561008557600080fd5b5035600160a060020a0316610235565b610060600480360360408110156100ab57600080fd5b600160a060020a038235169190810190604081016020820135602060020a8111156100d557600080fd5b8201836020820111156100e757600080fd5b803590602001918460018302840111602060020a8311171561010857600080fd5b50909250905061026f565b34801561011f57600080fd5b5061012861031f565b60408051600160a060020a039092168252519081900360200190f35b34801561015057600080fd5b506100606004803603602081101561016757600080fd5b5035600160a060020a031661035c565b34801561018357600080fd5b506101f26004803603602081101561019a57600080fd5b810190602081018135602060020a8111156101b457600080fd5b8201836020820111156101c657600080fd5b803590602001918460018302840111602060020a831117156101e757600080fd5b50909250905061041b565b604080519115158252519081900360200190f35b34801561021257600080fd5b506101286104c0565b6102236104eb565b61023361022e610545565b610558565b565b61023d61057c565b600160a060020a031633600160a060020a031614156102645761025f8161058f565b61026c565b61026c61021b565b50565b61027761057c565b600160a060020a031633600160a060020a03161415610312576102998361058f565b600083600160a060020a031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f6576040519150601f19603f3d011682016040523d82523d6000602084013e6102fb565b606091505b509091505080151561030c57600080fd5b5061031a565b61031a61021b565b505050565b600061032961057c565b600160a060020a031633600160a060020a031614156103515761034a610545565b9050610359565b61035961021b565b90565b61036461057c565b600160a060020a031633600160a060020a0316141561026457600160a060020a03811615156103c75760405160e560020a62461bcd0281526004018080602001828103825260368152602001806106b76036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103f061057c565b60408051600160a060020a03928316815291841660208301528051918290030190a161025f816105cf565b600061042561057c565b600160a060020a031633600160a060020a031614156104b2576000610448610545565b600160a060020a031684846040518083838082843760405192019450600093509091505080830381855af49150503d80600081146104a2576040519150601f19603f3d011682016040523d82523d6000602084013e6104a7565b606091505b5090925050506104ba565b6104ba61021b565b92915050565b60006104ca61057c565b600160a060020a031633600160a060020a031614156103515761034a61057c565b6104f361057c565b600160a060020a031633141561053d5760405160e560020a62461bcd0281526004018080602001828103825260328152602001806106456032913960400191505060405180910390fd5b610233610233565b6000805160206106978339815191525490565b3660008037600080366000845af43d6000803e808015610577573d6000f35b3d6000fd5b6000805160206106778339815191525490565b610598816105e1565b604051600160a060020a038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60008051602061067783398151915255565b6105ea8161063c565b151561062a5760405160e560020a62461bcd02815260040180806020018281038252603b8152602001806106ed603b913960400191505060405180910390fd5b60008051602061069783398151915255565b6000903b119056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c343616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a165627a7a72305820e8c55a4f53d9b272b1a96427bf6cf7271e6f2e95b2313447d4cb3163be1b18470029