Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 17710443 | 372 days ago | IN | Create: RegisterProxy | 0 ETH | 0.01413747 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
RegisterProxy
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; interface ITokenRegister { function registerToken( uint256 assetType, bytes calldata assetInfo, uint256 quantum ) external; } enum Asset { ERC20, ERC721, ERC721Mintable, ERC721MintableCustomURI } error InvalidAsset(); error AuthFailed(); // erc20 => assetInfo => 0xf47261b0 + prefix 0 + address // => assetType => keccak256(asset_info, quantum) & 0x03FFFFFFFF... // => quantum => 10 * (decimal-6) // erc721 => assetInfo => 0x02571792 + prefix 0 + address // => assetType => keccak256(asset_info, 1) & 0x03FFFFFFFF... // => quantum => 1 // erc721m => assetInfo => 0xb8b86672 + prefix 0 + address // => assetType => keccak256(asset_info, 1) & 0x03FFFFFFFF... // => quantum => 1 contract RegisterProxy is Initializable { address public tokenRegister; address public reddioRegister; address public owner; event TokenRegistered(address indexed token, Asset asset, bytes data); function initialize( address _tokenRegister, address _reddioRegister ) external initializer { tokenRegister = _tokenRegister; reddioRegister = _reddioRegister; owner = msg.sender; } modifier onlyReddioRegister() { if (msg.sender != reddioRegister) { revert AuthFailed(); } _; } function setReddioRegister(address _reddioRegister) external { require(msg.sender == owner, "Only owner"); reddioRegister = _reddioRegister; } function registerToken( address token, Asset asset, uint256 decimals, string memory name, string memory symbol, string memory baseURI, uint256 totalSupply, address from, bool newDeployed ) external onlyReddioRegister { uint256 assetType; bytes memory assetInfo; uint256 quantum; if (asset == Asset.ERC20) { assetType = erc20AssetType(token, decimals); assetInfo = erc20AssetInfo(token); quantum = erc20Quantum(decimals); } else if (asset == Asset.ERC721) { assetType = erc721AssetType(token); assetInfo = erc721AssetInfo(token); quantum = 1; } else if ( asset == Asset.ERC721Mintable || asset == Asset.ERC721MintableCustomURI ) { assetType = erc721MintableAssetType(token); assetInfo = erc721MintableAssetInfo(token); quantum = 1; } else { revert InvalidAsset(); } ITokenRegister(tokenRegister).registerToken( assetType, assetInfo, quantum ); emit TokenRegistered( token, asset, abi.encode( abi.encode(assetType, assetInfo, quantum), abi.encode(name, symbol, decimals, totalSupply, baseURI), abi.encode(from, newDeployed) ) ); } function erc20AssetInfo( address token ) public pure returns (bytes memory assetInfo) { assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x44)) mstore(ptr, 0x24) mstore( add(ptr, 0x20), 0xf47261b000000000000000000000000000000000000000000000000000000000 ) mstore(add(ptr, 0x24), token) assetInfo := ptr } } function erc20AssetType( address token, uint256 decimals ) public pure returns (uint256) { bytes memory assetInfo = erc20AssetInfo(token); uint256 quantum = erc20Quantum(decimals); return uint256(keccak256(abi.encodePacked(assetInfo, quantum))) & 0x03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; } function erc20Quantum(uint256 decimals) public pure returns (uint256) { return decimals > 6 ? 10 ** (decimals - 6) : 1; } function erc721AssetInfo( address token ) public pure returns (bytes memory assetInfo) { assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x44)) mstore(ptr, 0x24) mstore( add(ptr, 0x20), 0x0257179200000000000000000000000000000000000000000000000000000000 ) mstore(add(ptr, 0x24), token) assetInfo := ptr } } function erc721AssetType(address token) public pure returns (uint256) { bytes memory assetInfo = erc721AssetInfo(token); return uint256(keccak256(abi.encodePacked(assetInfo, uint256(1)))) & 0x03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; } function erc721MintableAssetInfo( address token ) public pure returns (bytes memory assetInfo) { assembly { let ptr := mload(0x40) mstore(0x40, add(ptr, 0x44)) mstore(ptr, 0x24) mstore( add(ptr, 0x20), 0xb8b8667200000000000000000000000000000000000000000000000000000000 ) mstore(add(ptr, 0x24), token) assetInfo := ptr } } function erc721MintableAssetType( address token ) public pure returns (uint256) { bytes memory assetInfo = erc721MintableAssetInfo(token); return uint256(keccak256(abi.encodePacked(assetInfo, uint256(1)))) & 0x03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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 proxied contracts do not make use of 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * 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. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== * * [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 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"AuthFailed","type":"error"},{"inputs":[],"name":"InvalidAsset","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"enum Asset","name":"asset","type":"uint8"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"TokenRegistered","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"erc20AssetInfo","outputs":[{"internalType":"bytes","name":"assetInfo","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"erc20AssetType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"erc20Quantum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"erc721AssetInfo","outputs":[{"internalType":"bytes","name":"assetInfo","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"erc721AssetType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"erc721MintableAssetInfo","outputs":[{"internalType":"bytes","name":"assetInfo","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"erc721MintableAssetType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenRegister","type":"address"},{"internalType":"address","name":"_reddioRegister","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reddioRegister","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"enum Asset","name":"asset","type":"uint8"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"bool","name":"newDeployed","type":"bool"}],"name":"registerToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_reddioRegister","type":"address"}],"name":"setReddioRegister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenRegister","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610cab806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636ea2d5461161008c578063899e286511610066578063899e2865146101bf5780638da5cb5b146101d2578063b98d488b146101e5578063d1138663146101f857600080fd5b80636ea2d5461461018657806377178974146101995780638318f5e8146101ac57600080fd5b80631bd14c53146100d45780633ea549a2146100fa578063485cc9551461012b5780636135dfc71461014057806363e9198a146101605780636d42e55d14610173575b600080fd5b6100e76100e2366004610770565b61020b565b6040519081526020015b60405180910390f35b600054610113906201000090046001600160a01b031681565b6040516001600160a01b0390911681526020016100f1565b61013e6101393660046107a5565b610238565b005b61015361014e3660046107d8565b610392565b6040516100f1919061084a565b61013e61016e3660046107d8565b6103b8565b61013e61018136600461091f565b610421565b6100e76101943660046109fe565b610676565b6100e76101a73660046107d8565b6106ce565b6101536101ba3660046107d8565b610718565b6100e76101cd3660046107d8565b61073e565b600254610113906001600160a01b031681565b6101536101f33660046107d8565b61074a565b600154610113906001600160a01b031681565b60006006821161021c576001610232565b610227600683610a3e565b61023290600a610b35565b92915050565b600054610100900460ff16158080156102585750600054600160ff909116105b806102725750303b158015610272575060005460ff166001145b6102da5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156102fd576000805461ff0019166101001790555b600080546001600160a01b03808616620100000262010000600160b01b031990921691909117909155600180549184166001600160a01b03199283161790556002805490911633179055801561038d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60408051604481019091526024808252635c5c333960e11b602083015281019190915290565b6002546001600160a01b031633146103ff5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b60448201526064016102d1565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461044c5760405163458bc09b60e01b815260040160405180910390fd5b6000606081808b600381111561046457610464610b41565b03610490576104738c8b610676565b925061047e8c610718565b91506104898a61020b565b905061052b565b60018b60038111156104a4576104a4610b41565b036104c8576104b28c6106ce565b92506104bd8c61074a565b91506001905061052b565b60028b60038111156104dc576104dc610b41565b14806104f9575060038b60038111156104f7576104f7610b41565b145b15610512576105078c61073e565b92506104bd8c610392565b604051636448d6e960e11b815260040160405180910390fd5b600054604051631b11b16760e31b8152620100009091046001600160a01b03169063d88d8b389061056490869086908690600401610b57565b600060405180830381600087803b15801561057e57600080fd5b505af1158015610592573d6000803e3d6000fd5b505050508b6001600160a01b03167fa844a4c46ee959725cf319010cc32cae0ddc1eb3341abf55533afe656eae058d8c8585856040516020016105d793929190610b57565b6040516020818303038152906040528c8c8f8c8e6040516020016105ff959493929190610b80565b60408051808303601f190181528282526001600160a01b038c1660208401528a151583830152815180840383018152606084019092526106459392909190608001610bd1565b60408051601f19818403018152908290526106609291610c14565b60405180910390a2505050505050505050505050565b60008061068284610718565b9050600061068f8461020b565b905081816040516020016106a4929190610c53565b60408051601f1981840301815291905280516020909101206001600160fa1b031695945050505050565b6000806106da8361074a565b90508060016040516020016106f0929190610c53565b60408051601f1981840301815291905280516020909101206001600160fa1b03169392505050565b60408051604481019091526024808252630f47261b60e41b602083015281019190915290565b6000806106da83610392565b6040805160448101909152602480825263012b8bc960e11b602083015281019190915290565b60006020828403121561078257600080fd5b5035919050565b80356001600160a01b03811681146107a057600080fd5b919050565b600080604083850312156107b857600080fd5b6107c183610789565b91506107cf60208401610789565b90509250929050565b6000602082840312156107ea57600080fd5b6107f382610789565b9392505050565b60005b838110156108155781810151838201526020016107fd565b50506000910152565b600081518084526108368160208601602086016107fa565b601f01601f19169290920160200192915050565b6020815260006107f3602083018461081e565b8035600481106107a057600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f83011261089357600080fd5b813567ffffffffffffffff808211156108ae576108ae61086c565b604051601f8301601f19908116603f011681019082821181831017156108d6576108d661086c565b816040528381528660208588010111156108ef57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803580151581146107a057600080fd5b60008060008060008060008060006101208a8c03121561093e57600080fd5b6109478a610789565b985061095560208b0161085d565b975060408a0135965060608a013567ffffffffffffffff8082111561097957600080fd5b6109858d838e01610882565b975060808c013591508082111561099b57600080fd5b6109a78d838e01610882565b965060a08c01359150808211156109bd57600080fd5b506109ca8c828d01610882565b94505060c08a013592506109e060e08b01610789565b91506109ef6101008b0161090f565b90509295985092959850929598565b60008060408385031215610a1157600080fd5b610a1a83610789565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561023257610232610a28565b600181815b80851115610a8c578160001904821115610a7257610a72610a28565b80851615610a7f57918102915b93841c9390800290610a56565b509250929050565b600082610aa357506001610232565b81610ab057506000610232565b8160018114610ac65760028114610ad057610aec565b6001915050610232565b60ff841115610ae157610ae1610a28565b50506001821b610232565b5060208310610133831016604e8410600b8410161715610b0f575081810a610232565b610b198383610a51565b8060001904821115610b2d57610b2d610a28565b029392505050565b60006107f38383610a94565b634e487b7160e01b600052602160045260246000fd5b838152606060208201526000610b70606083018561081e565b9050826040830152949350505050565b60a081526000610b9360a083018861081e565b8281036020840152610ba5818861081e565b90508560408401528460608401528281036080840152610bc5818561081e565b98975050505050505050565b606081526000610be4606083018661081e565b8281036020840152610bf6818661081e565b90508281036040840152610c0a818561081e565b9695505050505050565b600060048410610c3457634e487b7160e01b600052602160045260246000fd5b83825260406020830152610c4b604083018461081e565b949350505050565b60008351610c658184602088016107fa565b919091019182525060200191905056fea26469706673582212202098c530ce9d506aedc232d8a9a3630b6ca7ed87a9902f210daa7e10b5c075f364736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636ea2d5461161008c578063899e286511610066578063899e2865146101bf5780638da5cb5b146101d2578063b98d488b146101e5578063d1138663146101f857600080fd5b80636ea2d5461461018657806377178974146101995780638318f5e8146101ac57600080fd5b80631bd14c53146100d45780633ea549a2146100fa578063485cc9551461012b5780636135dfc71461014057806363e9198a146101605780636d42e55d14610173575b600080fd5b6100e76100e2366004610770565b61020b565b6040519081526020015b60405180910390f35b600054610113906201000090046001600160a01b031681565b6040516001600160a01b0390911681526020016100f1565b61013e6101393660046107a5565b610238565b005b61015361014e3660046107d8565b610392565b6040516100f1919061084a565b61013e61016e3660046107d8565b6103b8565b61013e61018136600461091f565b610421565b6100e76101943660046109fe565b610676565b6100e76101a73660046107d8565b6106ce565b6101536101ba3660046107d8565b610718565b6100e76101cd3660046107d8565b61073e565b600254610113906001600160a01b031681565b6101536101f33660046107d8565b61074a565b600154610113906001600160a01b031681565b60006006821161021c576001610232565b610227600683610a3e565b61023290600a610b35565b92915050565b600054610100900460ff16158080156102585750600054600160ff909116105b806102725750303b158015610272575060005460ff166001145b6102da5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156102fd576000805461ff0019166101001790555b600080546001600160a01b03808616620100000262010000600160b01b031990921691909117909155600180549184166001600160a01b03199283161790556002805490911633179055801561038d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60408051604481019091526024808252635c5c333960e11b602083015281019190915290565b6002546001600160a01b031633146103ff5760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b60448201526064016102d1565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b0316331461044c5760405163458bc09b60e01b815260040160405180910390fd5b6000606081808b600381111561046457610464610b41565b03610490576104738c8b610676565b925061047e8c610718565b91506104898a61020b565b905061052b565b60018b60038111156104a4576104a4610b41565b036104c8576104b28c6106ce565b92506104bd8c61074a565b91506001905061052b565b60028b60038111156104dc576104dc610b41565b14806104f9575060038b60038111156104f7576104f7610b41565b145b15610512576105078c61073e565b92506104bd8c610392565b604051636448d6e960e11b815260040160405180910390fd5b600054604051631b11b16760e31b8152620100009091046001600160a01b03169063d88d8b389061056490869086908690600401610b57565b600060405180830381600087803b15801561057e57600080fd5b505af1158015610592573d6000803e3d6000fd5b505050508b6001600160a01b03167fa844a4c46ee959725cf319010cc32cae0ddc1eb3341abf55533afe656eae058d8c8585856040516020016105d793929190610b57565b6040516020818303038152906040528c8c8f8c8e6040516020016105ff959493929190610b80565b60408051808303601f190181528282526001600160a01b038c1660208401528a151583830152815180840383018152606084019092526106459392909190608001610bd1565b60408051601f19818403018152908290526106609291610c14565b60405180910390a2505050505050505050505050565b60008061068284610718565b9050600061068f8461020b565b905081816040516020016106a4929190610c53565b60408051601f1981840301815291905280516020909101206001600160fa1b031695945050505050565b6000806106da8361074a565b90508060016040516020016106f0929190610c53565b60408051601f1981840301815291905280516020909101206001600160fa1b03169392505050565b60408051604481019091526024808252630f47261b60e41b602083015281019190915290565b6000806106da83610392565b6040805160448101909152602480825263012b8bc960e11b602083015281019190915290565b60006020828403121561078257600080fd5b5035919050565b80356001600160a01b03811681146107a057600080fd5b919050565b600080604083850312156107b857600080fd5b6107c183610789565b91506107cf60208401610789565b90509250929050565b6000602082840312156107ea57600080fd5b6107f382610789565b9392505050565b60005b838110156108155781810151838201526020016107fd565b50506000910152565b600081518084526108368160208601602086016107fa565b601f01601f19169290920160200192915050565b6020815260006107f3602083018461081e565b8035600481106107a057600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f83011261089357600080fd5b813567ffffffffffffffff808211156108ae576108ae61086c565b604051601f8301601f19908116603f011681019082821181831017156108d6576108d661086c565b816040528381528660208588010111156108ef57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803580151581146107a057600080fd5b60008060008060008060008060006101208a8c03121561093e57600080fd5b6109478a610789565b985061095560208b0161085d565b975060408a0135965060608a013567ffffffffffffffff8082111561097957600080fd5b6109858d838e01610882565b975060808c013591508082111561099b57600080fd5b6109a78d838e01610882565b965060a08c01359150808211156109bd57600080fd5b506109ca8c828d01610882565b94505060c08a013592506109e060e08b01610789565b91506109ef6101008b0161090f565b90509295985092959850929598565b60008060408385031215610a1157600080fd5b610a1a83610789565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561023257610232610a28565b600181815b80851115610a8c578160001904821115610a7257610a72610a28565b80851615610a7f57918102915b93841c9390800290610a56565b509250929050565b600082610aa357506001610232565b81610ab057506000610232565b8160018114610ac65760028114610ad057610aec565b6001915050610232565b60ff841115610ae157610ae1610a28565b50506001821b610232565b5060208310610133831016604e8410600b8410161715610b0f575081810a610232565b610b198383610a51565b8060001904821115610b2d57610b2d610a28565b029392505050565b60006107f38383610a94565b634e487b7160e01b600052602160045260246000fd5b838152606060208201526000610b70606083018561081e565b9050826040830152949350505050565b60a081526000610b9360a083018861081e565b8281036020840152610ba5818861081e565b90508560408401528460608401528281036080840152610bc5818561081e565b98975050505050505050565b606081526000610be4606083018661081e565b8281036020840152610bf6818661081e565b90508281036040840152610c0a818561081e565b9695505050505050565b600060048410610c3457634e487b7160e01b600052602160045260246000fd5b83825260406020830152610c4b604083018461081e565b949350505050565b60008351610c658184602088016107fa565b919091019182525060200191905056fea26469706673582212202098c530ce9d506aedc232d8a9a3630b6ca7ed87a9902f210daa7e10b5c075f364736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.