Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 4,125 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint MET | 17980997 | 506 days ago | IN | 0 ETH | 0.00110318 | ||||
Mint MET | 17969706 | 508 days ago | IN | 0 ETH | 0.00107311 | ||||
Mint MET | 17908555 | 516 days ago | IN | 0 ETH | 0.00101043 | ||||
Mint MET | 17805336 | 531 days ago | IN | 0 ETH | 0.00109653 | ||||
Mint MET | 17570879 | 564 days ago | IN | 0 ETH | 0.00121917 | ||||
Mint MET | 17561021 | 565 days ago | IN | 0 ETH | 0.00095373 | ||||
Mint MET | 17560996 | 565 days ago | IN | 0 ETH | 0.00074064 | ||||
Mint MET | 17511992 | 572 days ago | IN | 0 ETH | 0.00108533 | ||||
Mint MET | 17439347 | 582 days ago | IN | 0 ETH | 0.00154611 | ||||
Mint MET | 17344628 | 596 days ago | IN | 0 ETH | 0.0021654 | ||||
Mint MET | 17065292 | 635 days ago | IN | 0 ETH | 0.00266134 | ||||
Mint MET | 17038083 | 639 days ago | IN | 0 ETH | 0.00158632 | ||||
Mint MET | 17038068 | 639 days ago | IN | 0 ETH | 0.00179335 | ||||
Mint MET | 16873972 | 662 days ago | IN | 0 ETH | 0.00109844 | ||||
Mint MET | 16869776 | 663 days ago | IN | 0 ETH | 0.00203903 | ||||
Mint MET | 16867903 | 663 days ago | IN | 0 ETH | 0.00096367 | ||||
Mint MET | 16851623 | 665 days ago | IN | 0 ETH | 0.00120306 | ||||
Mint MET | 16851621 | 665 days ago | IN | 0 ETH | 0.00163767 | ||||
Mint MET | 16846746 | 666 days ago | IN | 0 ETH | 0.00123442 | ||||
Mint MET | 16800476 | 672 days ago | IN | 0 ETH | 0.00189226 | ||||
Mint MET | 16799526 | 672 days ago | IN | 0 ETH | 0.00191067 | ||||
Mint MET | 16784454 | 675 days ago | IN | 0 ETH | 0.00206692 | ||||
Mint MET | 16783739 | 675 days ago | IN | 0 ETH | 0.00094397 | ||||
Mint MET | 16782350 | 675 days ago | IN | 0 ETH | 0.00126358 | ||||
Mint MET | 16781534 | 675 days ago | IN | 0 ETH | 0.00145255 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
17980997 | 506 days ago | 0 ETH | |||||
17980997 | 506 days ago | 0 ETH | |||||
17969706 | 508 days ago | 0 ETH | |||||
17969706 | 508 days ago | 0 ETH | |||||
17908555 | 516 days ago | 0 ETH | |||||
17908555 | 516 days ago | 0 ETH | |||||
17805336 | 531 days ago | 0 ETH | |||||
17805336 | 531 days ago | 0 ETH | |||||
17570879 | 564 days ago | 0 ETH | |||||
17570879 | 564 days ago | 0 ETH | |||||
17561021 | 565 days ago | 0 ETH | |||||
17561021 | 565 days ago | 0 ETH | |||||
17560996 | 565 days ago | 0 ETH | |||||
17560996 | 565 days ago | 0 ETH | |||||
17511992 | 572 days ago | 0 ETH | |||||
17511992 | 572 days ago | 0 ETH | |||||
17439347 | 582 days ago | 0 ETH | |||||
17439347 | 582 days ago | 0 ETH | |||||
17344628 | 596 days ago | 0 ETH | |||||
17344628 | 596 days ago | 0 ETH | |||||
17065292 | 635 days ago | 0 ETH | |||||
17065292 | 635 days ago | 0 ETH | |||||
17038083 | 639 days ago | 0 ETH | |||||
17038083 | 639 days ago | 0 ETH | |||||
17038068 | 639 days ago | 0 ETH |
Loading...
Loading
Contract Name:
MetroBridge
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "../MetToken.sol"; interface MetroPrimeMintable { function mint(address to, uint256 packedMiniIds) external returns (uint256 tokenId); } contract MetroBridge is EIP712, Ownable { enum Operation { BURN_MET, MINT_MET, MINT_PRIME } struct Transaction { address sender; Operation operation; uint256 data; uint256 nonce; uint256 expirationTimestamp; bytes16 bridgeTransactionId; } bytes32 constant TRANSACTION_STRUCT_HASH = keccak256("Transaction(address sender,uint8 operation,uint256 data,uint256 nonce,uint256 expirationTimestamp,bytes16 bridgeTransactionId)"); address public signerAddress; address immutable public metTokenAddress; address immutable public primeBlockAddress; uint256 public transactionMetLimit = 10_000_000 ether; mapping(address => uint256) public nonces; event BurnedMET(address indexed sender, bytes16 indexed bridgeTransactionId, uint256 nonce, uint256 data); event MintedMET(address indexed sender, bytes16 indexed bridgeTransactionId, uint256 nonce, uint256 data); event MintedPrime(address indexed sender, bytes16 indexed bridgeTransactionId, uint256 nonce, uint256 data, uint256 primeTokenId); constructor(address _signerAddress, address _metTokenAddress, address _primeBlockAddress) EIP712('MetroBridge', '2') { signerAddress = _signerAddress; metTokenAddress = _metTokenAddress; primeBlockAddress = _primeBlockAddress; } function setSignerAddress(address _signerAddress) external onlyOwner { signerAddress = _signerAddress; } function setTransactionMetLimit(uint256 _transactionMetLimit) external onlyOwner { transactionMetLimit = _transactionMetLimit; } function buildStructHash(Transaction calldata transaction) private pure returns (bytes32) { return keccak256( abi.encode( TRANSACTION_STRUCT_HASH, transaction.sender, transaction.operation, transaction.data, transaction.nonce, transaction.expirationTimestamp, transaction.bridgeTransactionId ) ); } function verifyTransaction(address sender, Transaction calldata transaction, bytes32 signatureR, bytes32 signatureVS) internal { require(sender == transaction.sender, 'Sender does not match'); require(nonces[transaction.sender]++ == transaction.nonce, 'Invalid nonce'); require(block.timestamp < transaction.expirationTimestamp, 'Signed transaction expired'); bytes32 structHash = buildStructHash(transaction); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, signatureR, signatureVS); require(signer != address(0), 'Invalid signature'); require(signer == signerAddress, 'Invalid signer'); } function burnMET(Transaction calldata transaction, bytes32 signatureR, bytes32 signatureVS) external { require(transaction.operation == Operation.BURN_MET, 'Expected burn MET operation'); require(transaction.data <= transactionMetLimit, 'Exceeded MET transaction limit'); verifyTransaction(msg.sender, transaction, signatureR, signatureVS); MetToken(metTokenAddress).burnFrom(transaction.sender, transaction.data); emit BurnedMET(transaction.sender, transaction.bridgeTransactionId, transaction.nonce, transaction.data); } function mintMET(Transaction calldata transaction, bytes32 signatureR, bytes32 signatureVS) external { require(transaction.operation == Operation.MINT_MET, 'Expected mint MET operation'); require(transaction.data <= transactionMetLimit, 'Exceeded MET transaction limit'); verifyTransaction(msg.sender, transaction, signatureR, signatureVS); MetToken(metTokenAddress).mint(transaction.sender, transaction.data); emit MintedMET(transaction.sender, transaction.bridgeTransactionId, transaction.nonce, transaction.data); } function mintPrime(Transaction calldata transaction, bytes32 signatureR, bytes32 signatureVS) external { require(transaction.operation == Operation.MINT_PRIME, 'Expected mint Prime operation'); verifyTransaction(msg.sender, transaction, signatureR, signatureVS); uint256 primeTokenId = MetroPrimeMintable(primeBlockAddress).mint(transaction.sender, transaction.data); emit MintedPrime(transaction.sender, transaction.bridgeTransactionId, transaction.nonce, transaction.data, primeTokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; contract MetToken is ERC20, ERC20Burnable, Ownable { mapping(address => bool) controllers; constructor() ERC20("Metroverse", "MET") { } function mint(address to, uint256 amount) external { require(controllers[msg.sender], "Only controllers can mint"); _mint(to, amount); } function burnFrom(address account, uint256 amount) public override { if (controllers[msg.sender]) { _burn(account, amount); } else { super.burnFrom(account, amount); } } function addController(address controller) external onlyOwner { controllers[controller] = true; } function removeController(address controller) external onlyOwner { controllers[controller] = false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) 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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"},{"internalType":"address","name":"_metTokenAddress","type":"address"},{"internalType":"address","name":"_primeBlockAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"bytes16","name":"bridgeTransactionId","type":"bytes16"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"data","type":"uint256"}],"name":"BurnedMET","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"bytes16","name":"bridgeTransactionId","type":"bytes16"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"data","type":"uint256"}],"name":"MintedMET","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"bytes16","name":"bridgeTransactionId","type":"bytes16"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"data","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"primeTokenId","type":"uint256"}],"name":"MintedPrime","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"enum MetroBridge.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"data","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"},{"internalType":"bytes16","name":"bridgeTransactionId","type":"bytes16"}],"internalType":"struct MetroBridge.Transaction","name":"transaction","type":"tuple"},{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureVS","type":"bytes32"}],"name":"burnMET","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"enum MetroBridge.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"data","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"},{"internalType":"bytes16","name":"bridgeTransactionId","type":"bytes16"}],"internalType":"struct MetroBridge.Transaction","name":"transaction","type":"tuple"},{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureVS","type":"bytes32"}],"name":"mintMET","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"enum MetroBridge.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"data","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"},{"internalType":"bytes16","name":"bridgeTransactionId","type":"bytes16"}],"internalType":"struct MetroBridge.Transaction","name":"transaction","type":"tuple"},{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureVS","type":"bytes32"}],"name":"mintPrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primeBlockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_transactionMetLimit","type":"uint256"}],"name":"setTransactionMetLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transactionMetLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101806040526a084595161401484a0000006002553480156200002157600080fd5b5060405162001714380380620017148339810160408190526200004491620001e3565b604080518082018252600b81526a4d6574726f42726964676560a81b6020808301918252835180850190945260018452601960f91b908401528151902060e08190527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a56101008190524660a0529192917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001258184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6080523060c0526101205250620001489250620001429150503390565b62000176565b600180546001600160a01b0319166001600160a01b039485161790559082166101405216610160526200022d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001de57600080fd5b919050565b600080600060608486031215620001f957600080fd5b6200020484620001c6565b92506200021460208501620001c6565b91506200022460408501620001c6565b90509250925092565b60805160a05160c05160e0516101005161012051610140516101605161146c620002a8600039600081816101a7015261082101526000818161016001528181610401015261061201526000610e9701526000610ee601526000610ec101526000610e1a01526000610e4401526000610e6e015261146c6000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80637ecebe001161008c578063bf52651011610066578063bf526510146101da578063c4bf0fad146101ed578063f0e0f50d14610200578063f2fde38b1461021357600080fd5b80637ecebe0014610182578063803c7f5f146101a25780638da5cb5b146101c957600080fd5b8063715018a6116100bd578063715018a61461014057806374dd2516146101485780637bc76c391461015b57600080fd5b8063046dc166146100e45780635b7633d0146100f95780635e725c1214610129575b600080fd5b6100f76100f2366004611278565b610226565b005b60015461010c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61013260025481565b604051908152602001610120565b6100f76102bf565b6100f76101563660046112a8565b610325565b61010c7f000000000000000000000000000000000000000000000000000000000000000081565b610132610190366004611278565b60036020526000908152604090205481565b61010c7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661010c565b6100f76101e83660046112a8565b610536565b6100f76101fb3660046112e3565b61073a565b6100f761020e3660046112a8565b610799565b6100f7610221366004611278565b610969565b6000546001600160a01b031633146102855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103195760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161027c565b6103236000610a4b565b565b60016103376040850160208601611312565b6002811115610348576103486112fc565b146103955760405162461bcd60e51b815260206004820152601b60248201527f4578706563746564206d696e74204d4554206f7065726174696f6e0000000000604482015260640161027c565b600254836040013511156103eb5760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564204d4554207472616e73616374696f6e206c696d69740000604482015260640161027c565b6103f733848484610ab3565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166340c10f196104336020860186611278565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528601356024820152604401600060405180830381600087803b15801561049557600080fd5b505af11580156104a9573d6000803e3d6000fd5b506104be9250505060c0840160a08501611333565b6fffffffffffffffffffffffffffffffff19166104de6020850185611278565b6001600160a01b03167f2bad178a88c61e6b677383fc089569f9ce79526c7abe9e2737cedb79b99b1c9185606001358660400135604051610529929190918252602082015260400190565b60405180910390a3505050565b60006105486040850160208601611312565b6002811115610559576105596112fc565b146105a65760405162461bcd60e51b815260206004820152601b60248201527f4578706563746564206275726e204d4554206f7065726174696f6e0000000000604482015260640161027c565b600254836040013511156105fc5760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564204d4554207472616e73616374696f6e206c696d69740000604482015260640161027c565b61060833848484610ab3565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166379cc67906106446020860186611278565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528601356024820152604401600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b506106cf9250505060c0840160a08501611333565b6fffffffffffffffffffffffffffffffff19166106ef6020850185611278565b6001600160a01b03167f5588af20748f01f672409848502f349197538db0777fb3364f1036950f8d752785606001358660400135604051610529929190918252602082015260400190565b6000546001600160a01b031633146107945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161027c565b600255565b60026107ab6040850160208601611312565b60028111156107bc576107bc6112fc565b146108095760405162461bcd60e51b815260206004820152601d60248201527f4578706563746564206d696e74205072696d65206f7065726174696f6e000000604482015260640161027c565b61081533848484610ab3565b60006001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166340c10f196108536020870187611278565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015287013560248201526044016020604051808303816000875af11580156108ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108de9190611366565b90506108f060c0850160a08601611333565b6fffffffffffffffffffffffffffffffff19166109106020860186611278565b6040805160608089013582528289013560208301529181018590526001600160a01b0392909216917f35a49c6b7586c9f73b374b95875a4f8c530deafbfe3fb58822c85a54b05b4fa0910160405180910390a350505050565b6000546001600160a01b031633146109c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161027c565b6001600160a01b038116610a3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161027c565b610a4881610a4b565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ac06020840184611278565b6001600160a01b0316846001600160a01b031614610b205760405162461bcd60e51b815260206004820152601560248201527f53656e64657220646f6573206e6f74206d617463680000000000000000000000604482015260640161027c565b606083013560036000610b366020870187611278565b6001600160a01b0316815260208101919091526040016000908120805491610b5d8361137f565b9190505514610bae5760405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206e6f6e636500000000000000000000000000000000000000604482015260640161027c565b82608001354210610c015760405162461bcd60e51b815260206004820152601a60248201527f5369676e6564207472616e73616374696f6e2065787069726564000000000000604482015260640161027c565b6000610c0c84610ce6565b90506000610c1982610d78565b90506000610c28828686610de7565b90506001600160a01b038116610c805760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161027c565b6001546001600160a01b03828116911614610cdd5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c6964207369676e6572000000000000000000000000000000000000604482015260640161027c565b50505050505050565b60007f7bb96591a4dc04acedc6a7117f2e11ac80ef4c4b74de3f72e7963126d7e95731610d166020840184611278565b610d266040850160208601611312565b604085013560608601356080870135610d4560c0890160a08a01611333565b604051602001610d5b97969594939291906113c6565b604051602081830303815290604052805190602001209050919050565b6000610de1610d85610e0d565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b6000806000610df7868686610f34565b91509150610e0481610f7c565b50949350505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e6657507f000000000000000000000000000000000000000000000000000000000000000046145b15610e9057507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01610f6e8782888561116d565b935093505050935093915050565b6000816004811115610f9057610f906112fc565b1415610f995750565b6001816004811115610fad57610fad6112fc565b1415610ffb5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161027c565b600281600481111561100f5761100f6112fc565b141561105d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161027c565b6003816004811115611071576110716112fc565b14156110e55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161027c565b60048160048111156110f9576110f96112fc565b1415610a485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161027c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156111a4575060009050600361126f565b8460ff16601b141580156111bc57508460ff16601c14155b156111cd575060009050600461126f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611221573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166112685760006001925092505061126f565b9150600090505b94509492505050565b60006020828403121561128a57600080fd5b81356001600160a01b03811681146112a157600080fd5b9392505050565b60008060008385036101008112156112bf57600080fd5b60c08112156112cd57600080fd5b50929460c0860135945060e08601359350915050565b6000602082840312156112f557600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561132457600080fd5b8135600381106112a157600080fd5b60006020828403121561134557600080fd5b81356fffffffffffffffffffffffffffffffff19811681146112a157600080fd5b60006020828403121561137857600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156113bf57634e487b7160e01b600052601160045260246000fd5b5060010190565b8781526001600160a01b038716602082015260e08101600387106113fa57634e487b7160e01b600052602160045260246000fd5b60408201969096526060810194909452608084019290925260a08301526fffffffffffffffffffffffffffffffff191660c0909101529291505056fea26469706673582212202590641435f49f167a1a9e25de2f439054a9cf0dc12b6e81730064b93df9ecfa64736f6c634300080c003300000000000000000000000095321b981fbabb81ae2548ca4ae0bf0d6049a06f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc20000000000000000000000002018a0f85690ade2d1bded1d0875cc470ca4dee0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80637ecebe001161008c578063bf52651011610066578063bf526510146101da578063c4bf0fad146101ed578063f0e0f50d14610200578063f2fde38b1461021357600080fd5b80637ecebe0014610182578063803c7f5f146101a25780638da5cb5b146101c957600080fd5b8063715018a6116100bd578063715018a61461014057806374dd2516146101485780637bc76c391461015b57600080fd5b8063046dc166146100e45780635b7633d0146100f95780635e725c1214610129575b600080fd5b6100f76100f2366004611278565b610226565b005b60015461010c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61013260025481565b604051908152602001610120565b6100f76102bf565b6100f76101563660046112a8565b610325565b61010c7f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc281565b610132610190366004611278565b60036020526000908152604090205481565b61010c7f0000000000000000000000002018a0f85690ade2d1bded1d0875cc470ca4dee081565b6000546001600160a01b031661010c565b6100f76101e83660046112a8565b610536565b6100f76101fb3660046112e3565b61073a565b6100f761020e3660046112a8565b610799565b6100f7610221366004611278565b610969565b6000546001600160a01b031633146102855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000546001600160a01b031633146103195760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161027c565b6103236000610a4b565b565b60016103376040850160208601611312565b6002811115610348576103486112fc565b146103955760405162461bcd60e51b815260206004820152601b60248201527f4578706563746564206d696e74204d4554206f7065726174696f6e0000000000604482015260640161027c565b600254836040013511156103eb5760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564204d4554207472616e73616374696f6e206c696d69740000604482015260640161027c565b6103f733848484610ab3565b6001600160a01b037f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc2166340c10f196104336020860186611278565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528601356024820152604401600060405180830381600087803b15801561049557600080fd5b505af11580156104a9573d6000803e3d6000fd5b506104be9250505060c0840160a08501611333565b6fffffffffffffffffffffffffffffffff19166104de6020850185611278565b6001600160a01b03167f2bad178a88c61e6b677383fc089569f9ce79526c7abe9e2737cedb79b99b1c9185606001358660400135604051610529929190918252602082015260400190565b60405180910390a3505050565b60006105486040850160208601611312565b6002811115610559576105596112fc565b146105a65760405162461bcd60e51b815260206004820152601b60248201527f4578706563746564206275726e204d4554206f7065726174696f6e0000000000604482015260640161027c565b600254836040013511156105fc5760405162461bcd60e51b815260206004820152601e60248201527f4578636565646564204d4554207472616e73616374696f6e206c696d69740000604482015260640161027c565b61060833848484610ab3565b6001600160a01b037f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc2166379cc67906106446020860186611278565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528601356024820152604401600060405180830381600087803b1580156106a657600080fd5b505af11580156106ba573d6000803e3d6000fd5b506106cf9250505060c0840160a08501611333565b6fffffffffffffffffffffffffffffffff19166106ef6020850185611278565b6001600160a01b03167f5588af20748f01f672409848502f349197538db0777fb3364f1036950f8d752785606001358660400135604051610529929190918252602082015260400190565b6000546001600160a01b031633146107945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161027c565b600255565b60026107ab6040850160208601611312565b60028111156107bc576107bc6112fc565b146108095760405162461bcd60e51b815260206004820152601d60248201527f4578706563746564206d696e74205072696d65206f7065726174696f6e000000604482015260640161027c565b61081533848484610ab3565b60006001600160a01b037f0000000000000000000000002018a0f85690ade2d1bded1d0875cc470ca4dee0166340c10f196108536020870187611278565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015287013560248201526044016020604051808303816000875af11580156108ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108de9190611366565b90506108f060c0850160a08601611333565b6fffffffffffffffffffffffffffffffff19166109106020860186611278565b6040805160608089013582528289013560208301529181018590526001600160a01b0392909216917f35a49c6b7586c9f73b374b95875a4f8c530deafbfe3fb58822c85a54b05b4fa0910160405180910390a350505050565b6000546001600160a01b031633146109c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161027c565b6001600160a01b038116610a3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161027c565b610a4881610a4b565b50565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ac06020840184611278565b6001600160a01b0316846001600160a01b031614610b205760405162461bcd60e51b815260206004820152601560248201527f53656e64657220646f6573206e6f74206d617463680000000000000000000000604482015260640161027c565b606083013560036000610b366020870187611278565b6001600160a01b0316815260208101919091526040016000908120805491610b5d8361137f565b9190505514610bae5760405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206e6f6e636500000000000000000000000000000000000000604482015260640161027c565b82608001354210610c015760405162461bcd60e51b815260206004820152601a60248201527f5369676e6564207472616e73616374696f6e2065787069726564000000000000604482015260640161027c565b6000610c0c84610ce6565b90506000610c1982610d78565b90506000610c28828686610de7565b90506001600160a01b038116610c805760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015260640161027c565b6001546001600160a01b03828116911614610cdd5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c6964207369676e6572000000000000000000000000000000000000604482015260640161027c565b50505050505050565b60007f7bb96591a4dc04acedc6a7117f2e11ac80ef4c4b74de3f72e7963126d7e95731610d166020840184611278565b610d266040850160208601611312565b604085013560608601356080870135610d4560c0890160a08a01611333565b604051602001610d5b97969594939291906113c6565b604051602081830303815290604052805190602001209050919050565b6000610de1610d85610e0d565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b6000806000610df7868686610f34565b91509150610e0481610f7c565b50949350505050565b6000306001600160a01b037f00000000000000000000000089d38caadc03b08d7f2e1674e34720a468add61e16148015610e6657507f000000000000000000000000000000000000000000000000000000000000000146145b15610e9057507fa9bdfbd99a23915000e58f9d8fe85da2a1540dc47d7ab63d0bc770fbac6cc55c90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f30fd0a743bde9ca9d9023280c409e908198ba0a8133dfce4e894c6bb327bb1a5828401527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a560608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01610f6e8782888561116d565b935093505050935093915050565b6000816004811115610f9057610f906112fc565b1415610f995750565b6001816004811115610fad57610fad6112fc565b1415610ffb5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161027c565b600281600481111561100f5761100f6112fc565b141561105d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161027c565b6003816004811115611071576110716112fc565b14156110e55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161027c565b60048160048111156110f9576110f96112fc565b1415610a485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161027c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156111a4575060009050600361126f565b8460ff16601b141580156111bc57508460ff16601c14155b156111cd575060009050600461126f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611221573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166112685760006001925092505061126f565b9150600090505b94509492505050565b60006020828403121561128a57600080fd5b81356001600160a01b03811681146112a157600080fd5b9392505050565b60008060008385036101008112156112bf57600080fd5b60c08112156112cd57600080fd5b50929460c0860135945060e08601359350915050565b6000602082840312156112f557600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561132457600080fd5b8135600381106112a157600080fd5b60006020828403121561134557600080fd5b81356fffffffffffffffffffffffffffffffff19811681146112a157600080fd5b60006020828403121561137857600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156113bf57634e487b7160e01b600052601160045260246000fd5b5060010190565b8781526001600160a01b038716602082015260e08101600387106113fa57634e487b7160e01b600052602160045260246000fd5b60408201969096526060810194909452608084019290925260a08301526fffffffffffffffffffffffffffffffff191660c0909101529291505056fea26469706673582212202590641435f49f167a1a9e25de2f439054a9cf0dc12b6e81730064b93df9ecfa64736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000095321b981fbabb81ae2548ca4ae0bf0d6049a06f0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc20000000000000000000000002018a0f85690ade2d1bded1d0875cc470ca4dee0
-----Decoded View---------------
Arg [0] : _signerAddress (address): 0x95321b981fbabB81ae2548ca4Ae0Bf0D6049A06f
Arg [1] : _metTokenAddress (address): 0x1ffe8A8177D3C261600A8bD8080D424d64b7FBC2
Arg [2] : _primeBlockAddress (address): 0x2018a0f85690AdE2d1bDeD1d0875CC470cA4dEE0
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000095321b981fbabb81ae2548ca4ae0bf0d6049a06f
Arg [1] : 0000000000000000000000001ffe8a8177d3c261600a8bd8080d424d64b7fbc2
Arg [2] : 0000000000000000000000002018a0f85690ade2d1bded1d0875cc470ca4dee0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BSC | 100.00% | $694.88 | 0.0724 | $50.28 |
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.