Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Proxy
Write Contract
Write Proxy
Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB 0x47e40523f46feda2fe05ed57e778018e69d4b25e.
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
Verify & Publish
All metadata displayed below is from that contract. In order to verify current contract, click Verify & Publish button
- Contract name:
- TransparentUpgradeableProxy
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 200
- Verified at
- 2023-07-20T08:28:17.704144Z
@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)pragma solidity ^0.8.0;import "../ERC1967/ERC1967Proxy.sol";/*** @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}* does not implement this interface directly, and some of its functions are implemented by an internal dispatch* mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not* include them in the ABI so this interface must be used to interact with it.*/interface ITransparentUpgradeableProxy is IERC1967 {function admin() external view returns (address);function implementation() external view returns (address);function changeAdmin(address) external;function upgradeTo(address) external;function upgradeToAndCall(address, bytes memory) external payable;}/*** @dev This contract implements a proxy that is upgradeable by an admin.** To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector* clashing], which can potentially be used in an attack, this contract uses the* https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two* things that go hand in hand:** 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if* that call matches one of the admin functions exposed by the proxy itself.* 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the* implementation. If the admin tries to call a function on the implementation it will fail with an error that says* "admin cannot fallback to proxy target".** These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing* the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due
@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)pragma solidity ^0.8.0;import "../Proxy.sol";import "./ERC1967Upgrade.sol";/*** @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an* implementation address that can be changed. This address is stored in storage in the location specified by* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the* implementation behind the proxy.*/contract ERC1967Proxy is Proxy, ERC1967Upgrade {/*** @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.** If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded* function call, and allows initializing the storage of the proxy like a Solidity constructor.*/constructor(address _logic, bytes memory _data) payable {_upgradeToAndCall(_logic, _data, false);}/*** @dev Returns the current implementation address.*/function _implementation() internal view virtual override returns (address impl) {return ERC1967Upgrade._getImplementation();}}
@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)pragma solidity ^0.8.2;import "../beacon/IBeacon.sol";import "../../interfaces/IERC1967.sol";import "../../interfaces/draft-IERC1822.sol";import "../../utils/Address.sol";import "../../utils/StorageSlot.sol";/*** @dev This abstract contract provides getters and event emitting update functions for* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.** _Available since v4.1._*/abstract contract ERC1967Upgrade is IERC1967 {// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;/*** @dev Storage slot with the address of the current implementation.* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is* validated in the constructor.*/bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;/*** @dev Returns the current implementation address.*/function _getImplementation() internal view returns (address) {return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;}/*** @dev Stores a new address in the EIP1967 implementation slot.*/function _setImplementation(address newImplementation) private {require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
@openzeppelin/contracts/interfaces/IERC1967.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)pragma solidity ^0.8.0;/*** @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.** _Available since v4.8.3._*/interface IERC1967 {/*** @dev Emitted when the implementation is upgraded.*/event Upgraded(address indexed implementation);/*** @dev Emitted when the admin account has changed.*/event AdminChanged(address previousAdmin, address newAdmin);/*** @dev Emitted when the beacon is changed.*/event BeaconUpgraded(address indexed beacon);}
@openzeppelin/contracts/interfaces/draft-IERC1822.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)pragma solidity ^0.8.0;/*** @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified* proxy whose upgrades are fully controlled by the current implementation.*/interface IERC1822Proxiable {/*** @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation* address.** IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this* function revert if invoked through a proxy.*/function proxiableUUID() external view returns (bytes32);}
@openzeppelin/contracts/proxy/Proxy.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)pragma solidity ^0.8.0;/*** @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to* be specified by overriding the virtual {_implementation} function.** Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a* different contract through the {_delegate} function.** The success and return data of the delegated call will be returned back to the caller of the proxy.*/abstract contract Proxy {/*** @dev Delegates the current call to `implementation`.** This function does not return to its internal call site, it will return directly to the external caller.*/function _delegate(address implementation) internal virtual {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 {
@openzeppelin/contracts/proxy/beacon/IBeacon.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)pragma solidity ^0.8.0;/*** @dev This is the interface that {BeaconProxy} expects of its beacon.*/interface IBeacon {/*** @dev Must return an address that can be used as a delegate call target.** {BeaconProxy} will check that this address is a contract.*/function implementation() external view returns (address);}
@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed** Furthermore, `isContract` will also return true if the target contract within* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,* which only has an effect at the end of a transaction.* ====** [IMPORTANT]* ====* You shouldn't rely on `isContract` to protect against flash loan attacks!** Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract* constructor.* ====*/function isContract(address account) internal view returns (bool) {// This method relies on extcodesize/address.code.length, which returns 0
@openzeppelin/contracts/utils/StorageSlot.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.pragma solidity ^0.8.0;/*** @dev Library for reading and writing primitive types to specific storage slots.** Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.* This library helps with reading and writing to such slots without the need for inline assembly.** The functions in this library return Slot structs that contain a `value` member that can be used to read or write.** Example usage to set ERC1967 implementation slot:* ```solidity* contract ERC1967 {* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;** function _getImplementation() internal view returns (address) {* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;* }** function _setImplementation(address newImplementation) internal {* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;* }* }* ```** _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._* _Available since v4.9 for `string`, `bytes`._*/library StorageSlot {struct AddressSlot {address value;}struct BooleanSlot {bool value;}
Compiler Settings
{"viaIR":true,"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"payable","inputs":[{"type":"address","name":"_logic","internalType":"address"},{"type":"address","name":"admin_","internalType":"address"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"event","name":"AdminChanged","inputs":[{"type":"address","name":"previousAdmin","internalType":"address","indexed":false},{"type":"address","name":"newAdmin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"BeaconUpgraded","inputs":[{"type":"address","name":"beacon","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Upgraded","inputs":[{"type":"address","name":"implementation","internalType":"address","indexed":true}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x60406080815262000c578038038062000018816200030b565b9283398101906060818303126200030657620000348162000347565b916020926200004584840162000347565b8584015190936001600160401b0391908282116200030657019280601f850112156200030657835193620000836200007d866200035c565b6200030b565b948086528786019288828401011162000306578288620000a4930162000378565b823b15620002ac577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b03199081166001600160a01b0386811691821790935590959194600093909290917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a2805115801590620002a4575b620001f5575b50505050507fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103937f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f86865493815196818616885216958684820152a18315620001a3575016179055516108009081620004578239f35b60849086519062461bcd60e51b82526004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b895194606086019081118682101762000290578a52602785527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c89860152660819985a5b195960ca1b8a860152516200027a9493929183918291845af4903d1562000286573d6200026a6200007d826200035c565b90815280938a3d92013e6200039d565b5038808080806200012d565b606092506200039d565b634e487b7160e01b85526041600452602485fd5b508362000127565b865162461bcd60e51b815260048101879052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200033157604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200030657565b6001600160401b0381116200033157601f01601f191660200190565b60005b8381106200038c5750506000910152565b81810151838201526020016200037b565b91929015620004025750815115620003b3575090565b3b15620003bd5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015620004165750805190602001fd5b6044604051809262461bcd60e51b82526020600483015262000448815180928160248601526020868601910162000378565b601f01601f19168101030190fdfe60806040523661012e5760008051602061078b833981519152546001600160a01b03163303610129576000356001600160e01b031916631b2ce7f360e11b8103610054575061004c6103d1565b602081519101f35b63278f794360e11b8103610070575061006b610573565b61004c565b6308f2839760e41b8103610087575061006b6102fb565b6303e1469160e61b810361009e575061006b610220565b635c60da1b60e01b036100b35761006b610259565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a490fd5b610171565b60008051602061078b833981519152546001600160a01b03163303610171576000356001600160e01b031916631b2ce7f360e11b8103610054575061004c6103d1565b6000805160206107ab83398151915254600090819081906001600160a01b0316368280378136915af43d82803e156101a7573d90f35b3d90fd5b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176101dd57604052565b6101ab565b6020810190811067ffffffffffffffff8211176101dd57604052565b90601f8019910116810190811067ffffffffffffffff8211176101dd57604052565b610228610604565b60018060a01b0360008051602061078b833981519152541660405190602082015260208152610256816101c1565b90565b610261610604565b60018060a01b036000805160206107ab833981519152541660405190602082015260208152610256816101c1565b600435906001600160a01b03821682036102a557565b600080fd5b60209060031901126102a5576004356001600160a01b03811681036102a55790565b67ffffffffffffffff81116101dd57601f01601f191660200190565b604051906102f5826101e2565b60008252565b610303610604565b366004116102a5576001600160a01b038061031d366102aa565b1660008051602061078b833981519152917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604084549281519084168152846020820152a1811561037d576001600160a01b0319161790556102566102e8565b60405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6103d9610604565b366004116102a5576001600160a01b036103f2366102aa565b1660405190610400826101e2565b60008252803b15610497576000805160206107ab83398151915280546001600160a01b03191682179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061048f575b610475575b505060405161046e816101e2565b6000815290565b6104879161048161060b565b91610665565b503880610460565b50600061045b565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b803b15610497576000805160206107ab83398151915280546001600160a01b0319166001600160a01b0383169081179091557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061056b575b61055c575050565b6105689161048161060b565b50565b506001610554565b366004116102a55760403660031901126102a55761058f61028f565b6024359067ffffffffffffffff82116102a557366023830112156102a5578160040135906105bc826102cc565b916105ca60405193846101fe565b80835236602482860101116102a55760208160009260246105fc970183870137840101526001600160a01b03166104f2565b6102566102e8565b346102a557565b604051906060820182811067ffffffffffffffff8211176101dd5760405260278252660819985a5b195960ca1b6040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806102569493602081519101845af43d156106a4573d91610687836102cc565b9261069560405194856101fe565b83523d6000602085013e6106f8565b6060916106f8565b156106b357565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b91929015610718575081511561070c575090565b610256903b15156106ac565b82519091501561072b5750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610771575050604492506000838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935061074e56feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200cdde04a0f04202925f7e188951846db410256a5cac6216c5767b9269834c52664736f6c6343000813003300000000000000000000000019f291d4cd9fef84728f8962d17cc95b3b3340b7000000000000000000000000c2d3d1f0ac4d90d1187a9bc4850ec85d10d73586000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000048129fc1c00000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x60806040523661012e5760008051602061078b833981519152546001600160a01b03163303610129576000356001600160e01b031916631b2ce7f360e11b8103610054575061004c6103d1565b602081519101f35b63278f794360e11b8103610070575061006b610573565b61004c565b6308f2839760e41b8103610087575061006b6102fb565b6303e1469160e61b810361009e575061006b610220565b635c60da1b60e01b036100b35761006b610259565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a490fd5b610171565b60008051602061078b833981519152546001600160a01b03163303610171576000356001600160e01b031916631b2ce7f360e11b8103610054575061004c6103d1565b6000805160206107ab83398151915254600090819081906001600160a01b0316368280378136915af43d82803e156101a7573d90f35b3d90fd5b634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176101dd57604052565b6101ab565b6020810190811067ffffffffffffffff8211176101dd57604052565b90601f8019910116810190811067ffffffffffffffff8211176101dd57604052565b610228610604565b60018060a01b0360008051602061078b833981519152541660405190602082015260208152610256816101c1565b90565b610261610604565b60018060a01b036000805160206107ab833981519152541660405190602082015260208152610256816101c1565b600435906001600160a01b03821682036102a557565b600080fd5b60209060031901126102a5576004356001600160a01b03811681036102a55790565b67ffffffffffffffff81116101dd57601f01601f191660200190565b604051906102f5826101e2565b60008252565b610303610604565b366004116102a5576001600160a01b038061031d366102aa565b1660008051602061078b833981519152917f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604084549281519084168152846020820152a1811561037d576001600160a01b0319161790556102566102e8565b60405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6103d9610604565b366004116102a5576001600160a01b036103f2366102aa565b1660405190610400826101e2565b60008252803b15610497576000805160206107ab83398151915280546001600160a01b03191682179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061048f575b610475575b505060405161046e816101e2565b6000815290565b6104879161048161060b565b91610665565b503880610460565b50600061045b565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b803b15610497576000805160206107ab83398151915280546001600160a01b0319166001600160a01b0383169081179091557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061056b575b61055c575050565b6105689161048161060b565b50565b506001610554565b366004116102a55760403660031901126102a55761058f61028f565b6024359067ffffffffffffffff82116102a557366023830112156102a5578160040135906105bc826102cc565b916105ca60405193846101fe565b80835236602482860101116102a55760208160009260246105fc970183870137840101526001600160a01b03166104f2565b6102566102e8565b346102a557565b604051906060820182811067ffffffffffffffff8211176101dd5760405260278252660819985a5b195960ca1b6040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806102569493602081519101845af43d156106a4573d91610687836102cc565b9261069560405194856101fe565b83523d6000602085013e6106f8565b6060916106f8565b156106b357565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b91929015610718575081511561070c575090565b610256903b15156106ac565b82519091501561072b5750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610771575050604492506000838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935061074e56feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212200cdde04a0f04202925f7e188951846db410256a5cac6216c5767b9269834c52664736f6c63430008130033