Latest 25 from a total of 180 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Multicall | 19136799 | 1592 days ago | IN | 0 POL | 0.00074502 | ||||
| Multicall | 19136671 | 1592 days ago | IN | 0 POL | 0.00019513 | ||||
| Multicall | 19135990 | 1592 days ago | IN | 0 POL | 0.00122999 | ||||
| Multicall | 19135771 | 1592 days ago | IN | 0 POL | 0.00113956 | ||||
| Upgrade | 19094269 | 1593 days ago | IN | 0 POL | 0.00051121 | ||||
| Upgrade | 19086378 | 1594 days ago | IN | 0 POL | 0.00144963 | ||||
| Upgrade | 19086350 | 1594 days ago | IN | 0 POL | 0.00153429 | ||||
| Upgrade | 19086231 | 1594 days ago | IN | 0 POL | 0.0002556 | ||||
| Upgrade | 19086210 | 1594 days ago | IN | 0 POL | 0.00153363 | ||||
| Multicall | 19086178 | 1594 days ago | IN | 0 POL | 0.00700494 | ||||
| Multicall | 19086034 | 1594 days ago | IN | 0 POL | 0.01145102 | ||||
| Multicall | 19060532 | 1594 days ago | IN | 0 POL | 0.00078026 | ||||
| Multicall | 19053545 | 1595 days ago | IN | 0 POL | 0.0020452 | ||||
| Multicall | 18952140 | 1597 days ago | IN | 0 POL | 0.00249335 | ||||
| Multicall | 18951786 | 1597 days ago | IN | 0 POL | 0.00218745 | ||||
| Multicall | 18951769 | 1597 days ago | IN | 0 POL | 0.0049959 | ||||
| Multicall | 18950862 | 1597 days ago | IN | 0 POL | 0.00159282 | ||||
| Upgrade | 18950441 | 1597 days ago | IN | 0 POL | 0.00020466 | ||||
| Multicall | 18950169 | 1597 days ago | IN | 0 POL | 0.0043131 | ||||
| Multicall | 18946365 | 1598 days ago | IN | 0 POL | 0.0026392 | ||||
| Multicall | 18946347 | 1598 days ago | IN | 0 POL | 0.0061219 | ||||
| Multicall | 18946276 | 1598 days ago | IN | 0 POL | 0.0015372 | ||||
| Multicall | 18946035 | 1598 days ago | IN | 0 POL | 0.0030605 | ||||
| Multicall | 18946023 | 1598 days ago | IN | 0 POL | 0.00691122 | ||||
| Create Beacon Pr... | 18910953 | 1599 days ago | IN | 0 POL | 0.05424522 |
Latest 25 internal transactions (View All)
Cross-Chain Transactions
Loading...
Loading
Contract Name:
TransparentUpgradeableProxy
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2021-08-13 */ // SPDX-License-Identifier: MIT // Sources flattened with hardhat v2.5.0 https://hardhat.org // File @openzeppelin/contracts/proxy/[email protected] // License: MIT 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 internall 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 { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overriden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} } // File @openzeppelin/contracts/proxy/beacon/[email protected] // License: MIT 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); } // File @openzeppelin/contracts/utils/[email protected] // License: MIT pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File @openzeppelin/contracts/utils/[email protected] // License: MIT 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: * ``` * 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`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } } // File @openzeppelin/contracts/proxy/ERC1967/[email protected] // License: MIT pragma solidity ^0.8.2; /** * @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._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 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 Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @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; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; Address.functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } } // File @openzeppelin/contracts/proxy/beacon/[email protected] // License: MIT pragma solidity ^0.8.0; /** * @dev This contract implements a proxy that gets the implementation address for each call from a {UpgradeableBeacon}. * * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't * conflict with the storage layout of the implementation behind the proxy. * * _Available since v3.4._ */ contract BeaconProxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the proxy with `beacon`. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This * will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity * constructor. * * Requirements: * * - `beacon` must be a contract with the interface {IBeacon}. */ constructor(address beacon, bytes memory data) payable { assert(_BEACON_SLOT == bytes32(uint256(keccak256("eip1967.proxy.beacon")) - 1)); _upgradeBeaconToAndCall(beacon, data, false); } /** * @dev Returns the current beacon address. */ function _beacon() internal view virtual returns (address) { return _getBeacon(); } /** * @dev Returns the current implementation address of the associated beacon. */ function _implementation() internal view virtual override returns (address) { return IBeacon(_getBeacon()).implementation(); } /** * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. * * Requirements: * * - `beacon` must be a contract. * - The implementation returned by `beacon` must be a contract. */ function _setBeacon(address beacon, bytes memory data) internal virtual { _upgradeBeaconToAndCall(beacon, data, false); } } // File @openzeppelin/contracts-upgradeable/proxy/utils/[email protected] // License: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } } // File @openzeppelin/contracts-upgradeable/utils/[email protected] // License: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; } // File @openzeppelin/contracts-upgradeable/access/[email protected] // License: MIT pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; } // File contracts/interfaces/IProxyFactory.sol // License: MIT pragma solidity 0.8.6; interface IGrowUpgradeableImplementation { function CONTRACT_IDENTIFIER() external view returns (bytes32); } // File contracts/proxy/ProxyFactory.sol // License: MIT pragma solidity 0.8.6; abstract contract AdminUpgradeableProxy is Proxy, ERC1967Upgrade { modifier ifAdmin() { if (msg.sender == _getAdmin()) { _; } else { _fallback(); } } function admin() external ifAdmin returns (address admin_) { admin_ = _getAdmin(); } function changeAdmin(address newAdmin) external virtual ifAdmin { _changeAdmin(newAdmin); } function _admin() internal view virtual returns (address) { return _getAdmin(); } } contract TransparentUpgradeableProxy is AdminUpgradeableProxy, IBeacon { bytes32 private constant _CONTRACT_IDENTIFIER_SLOT = keccak256("growing.proxy.contractIdentifier"); bytes32 private constant _BEACON_MODE_IDENTIFIER = keccak256("growing.proxy.isBeaconMode"); constructor() { assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)); _changeAdmin(msg.sender); } function initializeImplementation( address _logic, bytes memory _data ) external payable ifAdmin { require(StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value == bytes32(0), "TransparentUpgradeableProxy: already initialized"); require(IGrowUpgradeableImplementation(_logic).CONTRACT_IDENTIFIER() != bytes32(0), "TransparentUpgradeableProxy: not upgradeable-safe contract"); StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value = IGrowUpgradeableImplementation(_logic).CONTRACT_IDENTIFIER(); _upgradeToAndCall(_logic, _data, false); } function initializeBeacon( address _beacon, bytes memory _data ) external payable ifAdmin { require(StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value == bytes32(0), "TransparentUpgradeableProxy: already initialized"); StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value = _BEACON_MODE_IDENTIFIER; _upgradeBeaconToAndCall(_beacon, _data, false); } function instantiation() external payable ifAdmin { require(StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value == _BEACON_MODE_IDENTIFIER, "TransparentUpgradeableProxy: already initialized"); address _logic = _implementation(); require(IGrowUpgradeableImplementation(_logic).CONTRACT_IDENTIFIER() != bytes32(0), "TransparentUpgradeableProxy: not upgradeable-safe contract"); StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value = IGrowUpgradeableImplementation(_logic).CONTRACT_IDENTIFIER(); _upgradeToAndCall(_logic, bytes(""), false); } modifier ensureSameContractIdentifier(address newImplementation) { require( StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value == IGrowUpgradeableImplementation(newImplementation).CONTRACT_IDENTIFIER() && StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value != _BEACON_MODE_IDENTIFIER, "TransparentUpgradeableProxy: not same implementation" ); _; } function _implementation() internal view virtual override returns (address impl) { return StorageSlot.getBytes32Slot(_CONTRACT_IDENTIFIER_SLOT).value == _BEACON_MODE_IDENTIFIER ? IBeacon(_getBeacon()).implementation() : ERC1967Upgrade._getImplementation(); } function implementation() external view override returns (address implementation_) { implementation_ = _implementation(); } function upgradeTo(address newImplementation) external ifAdmin ensureSameContractIdentifier(newImplementation) { _upgradeToAndCall(newImplementation, bytes(""), false); } function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin ensureSameContractIdentifier(newImplementation) { _upgradeToAndCall(newImplementation, data, true); } function directCall(bytes calldata data) external payable ifAdmin { Address.functionDelegateCall(_implementation(), data); } function _beforeFallback() internal virtual override { require(msg.sender != _getAdmin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target"); super._beforeFallback(); } } contract ProxyFactory is Initializable, OwnableUpgradeable, IGrowUpgradeableImplementation { bytes32 override public constant CONTRACT_IDENTIFIER = keccak256("ProxyFactory"); function initialize(address _dev) external initializer { __Ownable_init(); transferOwnership(_dev); } function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("admin()")) == 0xf851a440 (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); require(success); return abi.decode(returndata, (address)); } function createProxy() external onlyOwner { address proxy = address(new TransparentUpgradeableProxy()); emit ProxyCreate(proxy); } function initializeProxy(TransparentUpgradeableProxy proxy, address implementation, bytes memory data) public payable virtual onlyOwner { proxy.initializeImplementation{value: msg.value}(implementation, data); } function createBeaconProxy(address beacon, bytes memory data) external payable onlyOwner { address proxy = address(new BeaconProxy{value: msg.value}(beacon, data)); emit BeaconProxyCreate(proxy, beacon); } function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner { proxy.changeAdmin(newAdmin); } function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner { proxy.upgradeTo(implementation); } function directCall(TransparentUpgradeableProxy proxy, bytes memory data) public payable virtual onlyOwner { proxy.directCall(data); } function upgradeAndCall( TransparentUpgradeableProxy proxy, address implementation, bytes memory data ) public payable virtual onlyOwner { proxy.upgradeToAndCall{value: msg.value}(implementation, data); } function multicall(TransparentUpgradeableProxy proxy, bytes[] memory calls) external payable virtual onlyOwner { for(uint256 i = 0; i < calls.length; i++) { proxy.directCall(calls[i]); } } event ProxyCreate(address proxy); event BeaconProxyCreate(address proxy, address beacon); }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"admin_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"directCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"implementation_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beacon","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initializeBeacon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initializeImplementation","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"instantiation","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040523480156200001157600080fd5b506200003f60017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610462000219565b60008051602062001c9e833981519152146200005f576200005f6200023f565b6200008c60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd62000219565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc14620000bd57620000bd6200023f565b620000c833620000ce565b62000255565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000f962000129565b604080516001600160a01b03928316815291841660208301520160405180910390a1620001268162000162565b50565b60006200015360008051602062001c9e83398151915260001b6200021660201b62000d961760201c565b546001600160a01b0316919050565b6001600160a01b038116620001cc5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840160405180910390fd5b80620001f560008051602062001c9e83398151915260001b6200021660201b62000d961760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b90565b6000828210156200023a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b611a3980620002656000396000f3fe60806040526004361061009a5760003560e01c80635c60da1b116100695780638f2839701161004e5780638f2839701461015b578063e4f141911461017b578063f851a44014610183576100a9565b80635c60da1b1461010a5780637fe8e72c14610148576100a9565b806332cf7a78146100b15780633659cfe6146100c457806344c6f8eb146100e45780634f1ef286146100f7576100a9565b366100a9576100a7610198565b005b6100a7610198565b6100a76100bf3660046118b0565b6101b2565b3480156100d057600080fd5b506100a76100df366004611726565b610245565b6100a76100f23660046117b5565b610426565b6100a7610105366004611760565b6106cc565b34801561011657600080fd5b5061011f6108d3565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100a76101563660046117b5565b6108e2565b34801561016757600080fd5b506100a7610176366004611726565b610a1b565b6100a7610a5f565b34801561018f57600080fd5b5061011f610d49565b6101a0610d99565b6101b06101ab610e82565b610f59565b565b6101ba610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610239576102346101f8610e82565b83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fbd92505050565b505050565b610241610198565b5050565b61024d610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561041b57808073ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102c757600080fd5b505afa1580156102db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ff9190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414801561036f57507f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414155b610400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f2073616d6520696d706c656d656e746174696f6e00000000000000000000000060648201526084015b60405180910390fd5b61024182604051806020016040528060008152506000610fe9565b610423610198565b50565b61042e610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610239577f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265415610510576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5472616e73706172656e745570677261646561626c6550726f78793a20616c7260448201527f6561647920696e697469616c697a65640000000000000000000000000000000060648201526084016103f7565b6000801b8273ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561055a57600080fd5b505afa15801561056e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105929190611897565b1415610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f207570677261646561626c652d7361666520636f6e747261637400000000000060648201526084016103f7565b8173ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561066657600080fd5b505afa15801561067a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069e9190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265561024182826000610fe9565b6106d4610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156108cb57828073ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074e57600080fd5b505afa158015610762573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107869190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d5026541480156107f657507f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414155b610882576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f2073616d6520696d706c656d656e746174696f6e00000000000000000000000060648201526084016103f7565b6108c58484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610fe9915050565b50505050565b610234610198565b60006108dd610e82565b905090565b6108ea610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610239577f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d502654156109cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5472616e73706172656e745570677261646561626c6550726f78793a20616c7260448201527f6561647920696e697469616c697a65640000000000000000000000000000000060648201526084016103f7565b7f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d5026556102418282600061100e565b610a23610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561041b57610423816110f1565b610a67610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d41577f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414610b6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5472616e73706172656e745570677261646561626c6550726f78793a20616c7260448201527f6561647920696e697469616c697a65640000000000000000000000000000000060648201526084016103f7565b6000610b74610e82565b90506000801b8173ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc057600080fd5b505afa158015610bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf89190611897565b1415610c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f207570677261646561626c652d7361666520636f6e747261637400000000000060648201526084016103f7565b8073ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccc57600080fd5b505afa158015610ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d049190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265560408051602081019091526000808252610423918391610fe9565b6101b0610198565b6000610d53610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d8e576108dd610f7d565b610d96610198565b90565b610da1610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4016103f7565b60007f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414610ed4576108dd611152565b610edc61117a565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190611743565b3660008037600080366000845af43d6000803e808015610f78573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6060610fe283836040518060600160405280602781526020016119dd602791396111a2565b9392505050565b610ff2836112b4565b600082511180610fff5750805b15610234576108c58383610fbd565b61101783611301565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a26000825111806110655750805b15610234576108c58373ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b357600080fd5b505afa1580156110c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110eb9190611743565b83610fbd565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61111a610f7d565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a16104238161150b565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610fa1565b60007fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50610fa1565b6060833b611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103f7565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161125a91906118f2565b600060405180830381855af49150503d8060008114611295576040519150601f19603f3d011682016040523d82523d6000602084013e61129a565b606091505b50915091506112aa8282866115d5565b9695505050505050565b6112bd81611628565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b803b61138f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f747261637400000000000000000000000000000000000000000000000000000060648201526084016103f7565b6114168173ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d857600080fd5b505afa1580156113ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114109190611743565b3b151590565b6114a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e74726163740000000000000000000000000000000060648201526084016103f7565b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b73ffffffffffffffffffffffffffffffffffffffff81166115ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103f7565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036114c5565b606083156115e4575081610fe2565b8251156115f45782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f7919061190e565b803b6116b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103f7565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6114c5565b60008083601f8401126116ef57600080fd5b50813567ffffffffffffffff81111561170757600080fd5b60208301915083602082850101111561171f57600080fd5b9250929050565b60006020828403121561173857600080fd5b8135610fe2816119ba565b60006020828403121561175557600080fd5b8151610fe2816119ba565b60008060006040848603121561177557600080fd5b8335611780816119ba565b9250602084013567ffffffffffffffff81111561179c57600080fd5b6117a8868287016116dd565b9497909650939450505050565b600080604083850312156117c857600080fd5b82356117d3816119ba565b9150602083013567ffffffffffffffff808211156117f057600080fd5b818501915085601f83011261180457600080fd5b8135818111156118165761181661198b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561185c5761185c61198b565b8160405282815288602084870101111561187557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000602082840312156118a957600080fd5b5051919050565b600080602083850312156118c357600080fd5b823567ffffffffffffffff8111156118da57600080fd5b6118e6858286016116dd565b90969095509350505050565b6000825161190481846020870161195f565b9190910192915050565b602081526000825180602084015261192d81604085016020870161195f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60005b8381101561197a578181015183820152602001611962565b838111156108c55750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461042357600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a0dd72cf6302c40b151ca8cc9147daa28d6df9d0959fe3e6d018abeb8aa67a5864736f6c63430008060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103
Deployed Bytecode
0x60806040526004361061009a5760003560e01c80635c60da1b116100695780638f2839701161004e5780638f2839701461015b578063e4f141911461017b578063f851a44014610183576100a9565b80635c60da1b1461010a5780637fe8e72c14610148576100a9565b806332cf7a78146100b15780633659cfe6146100c457806344c6f8eb146100e45780634f1ef286146100f7576100a9565b366100a9576100a7610198565b005b6100a7610198565b6100a76100bf3660046118b0565b6101b2565b3480156100d057600080fd5b506100a76100df366004611726565b610245565b6100a76100f23660046117b5565b610426565b6100a7610105366004611760565b6106cc565b34801561011657600080fd5b5061011f6108d3565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100a76101563660046117b5565b6108e2565b34801561016757600080fd5b506100a7610176366004611726565b610a1b565b6100a7610a5f565b34801561018f57600080fd5b5061011f610d49565b6101a0610d99565b6101b06101ab610e82565b610f59565b565b6101ba610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610239576102346101f8610e82565b83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fbd92505050565b505050565b610241610198565b5050565b61024d610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561041b57808073ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102c757600080fd5b505afa1580156102db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ff9190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414801561036f57507f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414155b610400576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f2073616d6520696d706c656d656e746174696f6e00000000000000000000000060648201526084015b60405180910390fd5b61024182604051806020016040528060008152506000610fe9565b610423610198565b50565b61042e610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610239577f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265415610510576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5472616e73706172656e745570677261646561626c6550726f78793a20616c7260448201527f6561647920696e697469616c697a65640000000000000000000000000000000060648201526084016103f7565b6000801b8273ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561055a57600080fd5b505afa15801561056e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105929190611897565b1415610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f207570677261646561626c652d7361666520636f6e747261637400000000000060648201526084016103f7565b8173ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561066657600080fd5b505afa15801561067a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069e9190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265561024182826000610fe9565b6106d4610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156108cb57828073ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561074e57600080fd5b505afa158015610762573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107869190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d5026541480156107f657507f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414155b610882576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f2073616d6520696d706c656d656e746174696f6e00000000000000000000000060648201526084016103f7565b6108c58484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610fe9915050565b50505050565b610234610198565b60006108dd610e82565b905090565b6108ea610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610239577f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d502654156109cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5472616e73706172656e745570677261646561626c6550726f78793a20616c7260448201527f6561647920696e697469616c697a65640000000000000000000000000000000060648201526084016103f7565b7f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d5026556102418282600061100e565b610a23610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561041b57610423816110f1565b610a67610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d41577f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414610b6a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5472616e73706172656e745570677261646561626c6550726f78793a20616c7260448201527f6561647920696e697469616c697a65640000000000000000000000000000000060648201526084016103f7565b6000610b74610e82565b90506000801b8173ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc057600080fd5b505afa158015610bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf89190611897565b1415610c86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5472616e73706172656e745570677261646561626c6550726f78793a206e6f7460448201527f207570677261646561626c652d7361666520636f6e747261637400000000000060648201526084016103f7565b8073ffffffffffffffffffffffffffffffffffffffff16638f49bb6b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccc57600080fd5b505afa158015610ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d049190611897565b7f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265560408051602081019091526000808252610423918391610fe9565b6101b0610198565b6000610d53610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d8e576108dd610f7d565b610d96610198565b90565b610da1610f7d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156101b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f7879207461726760648201527f6574000000000000000000000000000000000000000000000000000000000000608482015260a4016103f7565b60007f56f523398ee6e6cf47148513f5a4884fc453af028d547360aae8e1e0ed8b9aa87f4f6f9dcbb8a4aff88ffbc0ac58efb6a4a0ac9927041e6aaddc194c9db10d50265414610ed4576108dd611152565b610edc61117a565b73ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190611743565b3660008037600080366000845af43d6000803e808015610f78573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b5473ffffffffffffffffffffffffffffffffffffffff16919050565b6060610fe283836040518060600160405280602781526020016119dd602791396111a2565b9392505050565b610ff2836112b4565b600082511180610fff5750805b15610234576108c58383610fbd565b61101783611301565b60405173ffffffffffffffffffffffffffffffffffffffff8416907f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e90600090a26000825111806110655750805b15610234576108c58373ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b357600080fd5b505afa1580156110c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110eb9190611743565b83610fbd565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61111a610f7d565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301520160405180910390a16104238161150b565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610fa1565b60007fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50610fa1565b6060833b611232576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016103f7565b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161125a91906118f2565b600060405180830381855af49150503d8060008114611295576040519150601f19603f3d011682016040523d82523d6000602084013e61129a565b606091505b50915091506112aa8282866115d5565b9695505050505050565b6112bd81611628565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b803b61138f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f747261637400000000000000000000000000000000000000000000000000000060648201526084016103f7565b6114168173ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d857600080fd5b505afa1580156113ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114109190611743565b3b151590565b6114a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e74726163740000000000000000000000000000000060648201526084016103f7565b807fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905550565b73ffffffffffffffffffffffffffffffffffffffff81166115ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103f7565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036114c5565b606083156115e4575081610fe2565b8251156115f45782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103f7919061190e565b803b6116b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016103f7565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6114c5565b60008083601f8401126116ef57600080fd5b50813567ffffffffffffffff81111561170757600080fd5b60208301915083602082850101111561171f57600080fd5b9250929050565b60006020828403121561173857600080fd5b8135610fe2816119ba565b60006020828403121561175557600080fd5b8151610fe2816119ba565b60008060006040848603121561177557600080fd5b8335611780816119ba565b9250602084013567ffffffffffffffff81111561179c57600080fd5b6117a8868287016116dd565b9497909650939450505050565b600080604083850312156117c857600080fd5b82356117d3816119ba565b9150602083013567ffffffffffffffff808211156117f057600080fd5b818501915085601f83011261180457600080fd5b8135818111156118165761181661198b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561185c5761185c61198b565b8160405282815288602084870101111561187557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000602082840312156118a957600080fd5b5051919050565b600080602083850312156118c357600080fd5b823567ffffffffffffffff8111156118da57600080fd5b6118e6858286016116dd565b90969095509350505050565b6000825161190481846020870161195f565b9190910192915050565b602081526000825180602084015261192d81604085016020870161195f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60005b8381101561197a578181015183820152602001611962565b838111156108c55750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461042357600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220a0dd72cf6302c40b151ca8cc9147daa28d6df9d0959fe3e6d018abeb8aa67a5864736f6c63430008060033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in POL
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.