Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
729 NFT
Holders
430
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 NFTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
BDUCKINGS
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract BDUCKINGS is ERC721, EIP712, ERC721Enumerable, Pausable, AccessControl, ERC721Burnable { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _tokenCounter; bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); string private constant BASE_URI = "https://ipfs.madworld.io/bduckings/"; address public constant PAYMENT_ADDRESS = 0xD3DF302c73271493746A205f06a3a3b6Efe8E0C3; ERC20 public constant PAYMENT_TOKEN = ERC20(0x31c2415c946928e9FD1Af83cdFA38d3eDBD4326f); ERC721 public constant FIRST_GEN_TOKEN = ERC721(0x71E7AFA8B3AB8e83011ce7bBBDCD76Ccd7cb0660); uint256 public constant INIT_TOKEN_ID = 100001220805000001; uint256 public constant NORMAL_MINT_LIMIT = 1; uint256 public constant LEGENDARAY_MINT_LIMIT = 3; bytes32 public LEGENDARAY_PROOF_ROOT = 0x11916a85f556b67fe169566112861573e663e98069ad23887c9a0fc545b9c733; mapping(uint256 => uint256) _mappingMintCount; struct Duck{ uint256 id; bool isLegendary; bytes32[] proof; } struct Purchase{ uint256 price; Duck[] ducks; } constructor() ERC721("BDUCKINGS", "NFT") EIP712("BDUCKINGS", "1") { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(PAUSER_ROLE, msg.sender); _grantRole(MINTER_ROLE, msg.sender); _grantRole(MINTER_ROLE, address(0xd3A94F0630329Ab9096826cC96F203a6709e1744)); } function _baseURI() internal pure override returns (string memory) { return BASE_URI; } function tokenURI(uint256 _tokenId) public view override returns (string memory) { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); return string(abi.encodePacked(BASE_URI, Strings.toString(_tokenId))); } function getMintCount(uint256 _duckId) public view returns (uint256) { require( FIRST_GEN_TOKEN.ownerOf(_duckId) != address(0), "BDUCKINGS: Token 404" ); return _mappingMintCount[_duckId]; } function contractURI() public pure returns (string memory) { return string(abi.encodePacked(BASE_URI, "metadata.json")); } function pause() public onlyRole(PAUSER_ROLE) { _pause(); } function unpause() public onlyRole(PAUSER_ROLE) { _unpause(); } // Set Root for the legendary bduck function setRoot(uint256 _root) onlyRole(MINTER_ROLE) public { LEGENDARAY_PROOF_ROOT = bytes32(_root); } function buy(Purchase calldata data, uint8 v, bytes32 r, bytes32 s) external whenNotPaused { require(data.ducks.length == 2, "BDUCKINGS: At least two ducks are required"); bytes32 payloadHash = keccak256(abi.encode(keccak256("mint(address receiver, uint256 price, uint256 duck1, uint256 duck2, uint chainId)"), msg.sender, data.price, data.ducks[0].id, data.ducks[1].id, block.chainid)); bytes32 digest = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", payloadHash)); address addr = ecrecover(digest, v, r, s); require(hasRole(MINTER_ROLE, addr), "BDUCKINGS: Invalid signer"); require(PAYMENT_TOKEN.balanceOf(msg.sender) >= data.price, "BDUCKINGS: Invalid Balance"); require(PAYMENT_TOKEN.allowance(msg.sender, address(this)) >= data.price, "BDUCKINGS: Invalid Allowance"); for (uint256 index = 0; index < data.ducks.length; index++) { Duck memory duck = data.ducks[index]; uint256 limit = NORMAL_MINT_LIMIT; require(FIRST_GEN_TOKEN.ownerOf(duck.id) == msg.sender, string(abi.encodePacked("BDUCKINGS: Invalid Owner of NFT ", duck.id.toString()))); if(duck.isLegendary){ bytes32 leaf = keccak256(abi.encodePacked(duck.id)); require(MerkleProof.verify(duck.proof, LEGENDARAY_PROOF_ROOT, leaf), string(abi.encodePacked("BDUCKINGS: Not Legendary ", duck.id.toString())) ); limit = LEGENDARAY_MINT_LIMIT; } require(_mappingMintCount[duck.id] < limit, string(abi.encodePacked("BDUCKINGS: Reach Limit ", duck.id.toString()))); _mappingMintCount[duck.id]++; } if(data.price > 0) PAYMENT_TOKEN.transferFrom(msg.sender, PAYMENT_ADDRESS, data.price); mintNew(msg.sender); } function safeMint(address to) public onlyRole(MINTER_ROLE) { mintNew(to); } function mintNew(address to) private { uint256 tokenId = INIT_TOKEN_ID + _tokenCounter.current(); _tokenCounter.increment(); _safeMint(to, tokenId); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 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.1 (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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` 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 tokenId ) 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. * - `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 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][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) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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 Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - 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 (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [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 functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, 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.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FIRST_GEN_TOKEN","outputs":[{"internalType":"contract ERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INIT_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LEGENDARAY_MINT_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LEGENDARAY_PROOF_ROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NORMAL_MINT_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAYMENT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAYMENT_TOKEN","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bool","name":"isLegendary","type":"bool"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"internalType":"struct BDUCKINGS.Duck[]","name":"ducks","type":"tuple[]"}],"internalType":"struct BDUCKINGS.Purchase","name":"data","type":"tuple"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duckId","type":"uint256"}],"name":"getMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_root","type":"uint256"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101406040527f11916a85f556b67fe169566112861573e663e98069ad23887c9a0fc545b9c73360001b600d553480156200003957600080fd5b506040518060400160405280600981526020017f424455434b494e475300000000000000000000000000000000000000000000008152506040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152506040518060400160405280600981526020017f424455434b494e475300000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f4e4654000000000000000000000000000000000000000000000000000000000081525081600090805190602001906200012a9291906200047c565b508060019080519060200190620001439291906200047c565b50505060008280519060200120905060008280519060200120905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90508260e081815250508161010081815250504660a08181525050620001af818484620002db60201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505080610120818152505050505050506000600a60006101000a81548160ff0219169083151502179055506200022b6000801b336200031760201b60201c565b6200025d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336200031760201b60201c565b6200028f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336200031760201b60201c565b620002d57f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a673d3a94f0630329ab9096826cc96f203a6709e17446200031760201b60201c565b62000669565b60008383834630604051602001620002f89594939291906200055f565b6040516020818303038152906040528051906020012090509392505050565b6200032982826200040960201b60201c565b62000405576001600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620003aa6200047460201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b8280546200048a9062000604565b90600052602060002090601f016020900481019282620004ae5760008555620004fa565b82601f10620004c957805160ff1916838001178555620004fa565b82800160010185558215620004fa579182015b82811115620004f9578251825591602001919060010190620004dc565b5b5090506200050991906200050d565b5090565b5b80821115620005285760008160009055506001016200050e565b5090565b6200053781620005bc565b82525050565b6200054881620005d0565b82525050565b6200055981620005fa565b82525050565b600060a0820190506200057660008301886200053d565b6200058560208301876200053d565b6200059460408301866200053d565b620005a360608301856200054e565b620005b260808301846200052c565b9695505050505050565b6000620005c982620005da565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060028204905060018216806200061d57607f821691505b602082108114156200063457620006336200063a565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60805160a05160c05160601c60e0516101005161012051615771620006aa6000396000505060005050600050506000505060005050600050506157716000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c80635c975abb1161013b578063b88d4fde116100b8578063e02695051161007c578063e0269505146106dd578063e63ab1e9146106fb578063e8a3d48514610719578063e985e9c514610737578063f2f5a7e51461076757610248565b8063b88d4fde14610627578063c87b56dd14610643578063d539139314610673578063d547741f14610691578063db09a3f5146106ad57610248565b806391d14854116100ff57806391d148541461058157806395d89b41146105b1578063a089d04f146105cf578063a217fddf146105ed578063a22cb4651461060b57610248565b80635c975abb146104db5780636352211e146104f957806370a08231146105295780638456cb5914610559578063877c86fb1461056357610248565b8063248a9ca3116101c957806340d097c31161018d57806340d097c31461043b57806342842e0e1461045757806342966c68146104735780634f6ccce71461048f5780635568d86e146104bf57610248565b8063248a9ca3146103995780632f2ff15d146103c95780632f745c59146103e557806336568abe146104155780633f4ba83a1461043157610248565b80631424dd69116102105780631424dd691461030557806316fa58a11461032357806318160ddd146103415780631eb637f21461035f57806323b872dd1461037d57610248565b806301ffc9a71461024d57806306fdde031461027d57806306fe8acc1461029b578063081812fc146102b9578063095ea7b3146102e9575b600080fd5b61026760048036038101906102629190613b6a565b610783565b604051610274919061444c565b60405180910390f35b610285610795565b604051610292919061455e565b60405180910390f35b6102a3610827565b6040516102b091906148c0565b60405180910390f35b6102d360048036038101906102ce9190613c47565b61082c565b6040516102e09190614385565b60405180910390f35b61030360048036038101906102fe9190613a90565b6108b1565b005b61030d6109c9565b60405161031a91906148c0565b60405180910390f35b61032b6109ce565b60405161033891906148c0565b60405180910390f35b6103496109da565b60405161035691906148c0565b60405180910390f35b6103676109e7565b6040516103749190614467565b60405180910390f35b6103976004803603810190610392919061397a565b6109ed565b005b6103b360048036038101906103ae9190613afd565b610a4d565b6040516103c09190614467565b60405180910390f35b6103e360048036038101906103de9190613b2a565b610a6d565b005b6103ff60048036038101906103fa9190613a90565b610a96565b60405161040c91906148c0565b60405180910390f35b61042f600480360381019061042a9190613b2a565b610b3b565b005b610439610bbe565b005b610455600480360381019061045091906138e0565b610bfb565b005b610471600480360381019061046c919061397a565b610c3a565b005b61048d60048036038101906104889190613c47565b610c5a565b005b6104a960048036038101906104a49190613c47565b610cb6565b6040516104b691906148c0565b60405180910390f35b6104d960048036038101906104d49190613bc4565b610d27565b005b6104e361153d565b6040516104f0919061444c565b60405180910390f35b610513600480360381019061050e9190613c47565b611554565b6040516105209190614385565b60405180910390f35b610543600480360381019061053e91906138e0565b611606565b60405161055091906148c0565b60405180910390f35b6105616116be565b005b61056b6116fb565b6040516105789190614528565b60405180910390f35b61059b60048036038101906105969190613b2a565b611713565b6040516105a8919061444c565b60405180910390f35b6105b961177e565b6040516105c6919061455e565b60405180910390f35b6105d7611810565b6040516105e49190614543565b60405180910390f35b6105f5611828565b6040516106029190614467565b60405180910390f35b61062560048036038101906106209190613a50565b61182f565b005b610641600480360381019061063c91906139cd565b611845565b005b61065d60048036038101906106589190613c47565b6118a7565b60405161066a919061455e565b60405180910390f35b61067b61193a565b6040516106889190614467565b60405180910390f35b6106ab60048036038101906106a69190613b2a565b61195e565b005b6106c760048036038101906106c29190613c47565b611987565b6040516106d491906148c0565b60405180910390f35b6106e5611aaf565b6040516106f29190614385565b60405180910390f35b610703611ac7565b6040516107109190614467565b60405180910390f35b610721611aeb565b60405161072e919061455e565b60405180910390f35b610751600480360381019061074c919061393a565b611b2a565b60405161075e919061444c565b60405180910390f35b610781600480360381019061077c9190613c47565b611bbe565b005b600061078e82611bfe565b9050919050565b6060600080546107a490614c92565b80601f01602080910402602001604051908101604052809291908181526020018280546107d090614c92565b801561081d5780601f106107f25761010080835404028352916020019161081d565b820191906000526020600020905b81548152906001019060200180831161080057829003601f168201915b5050505050905090565b600381565b600061083782611c78565b610876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086d90614780565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108bc82611554565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561092d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610924906147c0565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661094c611ce4565b73ffffffffffffffffffffffffffffffffffffffff16148061097b575061097a81610975611ce4565b611b2a565b5b6109ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b1906146e0565b60405180910390fd5b6109c48383611cec565b505050565b600181565b67016346949b2ffb4181565b6000600880549050905090565b600d5481565b6109fe6109f8611ce4565b82611da5565b610a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3490614800565b60405180910390fd5b610a48838383611e83565b505050565b6000600b6000838152602001908152602001600020600101549050919050565b610a7682610a4d565b610a8781610a82611ce4565b6120ea565b610a918383612187565b505050565b6000610aa183611606565b8210610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad9906145c0565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610b43611ce4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610bb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba7906148a0565b60405180910390fd5b610bba8282612268565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610bf081610beb611ce4565b6120ea565b610bf861234a565b50565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610c2d81610c28611ce4565b6120ea565b610c36826123ec565b5050565b610c5583838360405180602001604052806000815250611845565b505050565b610c6b610c65611ce4565b82611da5565b610caa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca190614860565b60405180910390fd5b610cb381612425565b50565b6000610cc06109da565b8210610d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf890614840565b60405180910390fd5b60088281548110610d1557610d14614e3f565b5b90600052602060002001549050919050565b610d2f61153d565b15610d6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d66906146c0565b60405180910390fd5b6002848060200190610d8191906148db565b905014610dc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dba90614600565b60405180910390fd5b60007f110e325ae79444bac762d6ce1659ccdaf6855a0645c8d74601fb2c8ffce45427338660000135878060200190610dfc91906148db565b6000818110610e0e57610e0d614e3f565b5b9050602002810190610e20919061493e565b60000135888060200190610e3491906148db565b6001818110610e4657610e45614e3f565b5b9050602002810190610e58919061493e565b6000013546604051602001610e7296959493929190614482565b604051602081830303815290604052805190602001209050600081604051602001610e9d91906142a4565b604051602081830303815290604052805190602001209050600060018287878760405160008152602001604052604051610eda94939291906144e3565b6020604051602081039080840390855afa158015610efc573d6000803e3d6000fd5b505050602060405103519050610f327f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682611713565b610f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f68906147e0565b60405180910390fd5b86600001357331c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610fc39190614385565b60206040518083038186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110139190613c74565b1015611054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104b90614820565b60405180910390fd5b86600001357331c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b81526004016110a89291906143a0565b60206040518083038186803b1580156110c057600080fd5b505afa1580156110d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f89190613c74565b1015611139576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113090614740565b60405180910390fd5b60005b87806020019061114c91906148db565b905081101561146057600088806020019061116791906148db565b8381811061117857611177614e3f565b5b905060200281019061118a919061493e565b61119390614bef565b90506000600190503373ffffffffffffffffffffffffffffffffffffffff167371e7afa8b3ab8e83011ce7bbbdcd76ccd7cb066073ffffffffffffffffffffffffffffffffffffffff16636352211e84600001516040518263ffffffff1660e01b815260040161120391906148c0565b60206040518083038186803b15801561121b57600080fd5b505afa15801561122f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611253919061390d565b73ffffffffffffffffffffffffffffffffffffffff16146112778360000151612542565b60405160200161128791906142ec565b604051602081830303815290604052906112d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ce919061455e565b60405180910390fd5b5081602001511561139657600082600001516040516020016112f9919061436a565b6040516020818303038152906040528051906020012090506113228360400151600d54836126a3565b61132f8460000151612542565b60405160200161133f91906142ca565b6040516020818303038152906040529061138f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611386919061455e565b60405180910390fd5b5060039150505b80600e60008460000151815260200190815260200160002054106113bd8360000151612542565b6040516020016113cd919061430e565b6040516020818303038152906040529061141d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611414919061455e565b60405180910390fd5b50600e600083600001518152602001908152602001600020600081548092919061144690614cf5565b91905055505050808061145890614cf5565b91505061113c565b5060008760000135111561152b577331c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff166323b872dd3373d3df302c73271493746a205f06a3a3b6efe8e0c38a600001356040518463ffffffff1660e01b81526004016114d7939291906143c9565b602060405180830381600087803b1580156114f157600080fd5b505af1158015611505573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115299190613ad0565b505b611534336123ec565b50505050505050565b6000600a60009054906101000a900460ff16905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f490614720565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166e90614700565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6116f0816116eb611ce4565b6120ea565b6116f86126ba565b50565b7331c2415c946928e9fd1af83cdfa38d3edbd4326f81565b6000600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60606001805461178d90614c92565b80601f01602080910402602001604051908101604052809291908181526020018280546117b990614c92565b80156118065780601f106117db57610100808354040283529160200191611806565b820191906000526020600020905b8154815290600101906020018083116117e957829003601f168201915b5050505050905090565b7371e7afa8b3ab8e83011ce7bbbdcd76ccd7cb066081565b6000801b81565b61184161183a611ce4565b838361275d565b5050565b611856611850611ce4565b83611da5565b611895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188c90614800565b60405180910390fd5b6118a1848484846128ca565b50505050565b60606118b282611c78565b6118f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e8906147a0565b60405180910390fd5b6040518060600160405280602381526020016157196023913961191383612542565b60405160200161192492919061425e565b6040516020818303038152906040529050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61196782610a4d565b61197881611973611ce4565b6120ea565b6119828383612268565b505050565b60008073ffffffffffffffffffffffffffffffffffffffff167371e7afa8b3ab8e83011ce7bbbdcd76ccd7cb066073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016119ed91906148c0565b60206040518083038186803b158015611a0557600080fd5b505afa158015611a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3d919061390d565b73ffffffffffffffffffffffffffffffffffffffff161415611a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8b90614880565b60405180910390fd5b600e6000838152602001908152602001600020549050919050565b73d3df302c73271493746a205f06a3a3b6efe8e0c381565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b606060405180606001604052806023815260200161571960239139604051602001611b169190614282565b604051602081830303815290604052905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611bf081611beb611ce4565b6120ea565b8160001b600d819055505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611c715750611c7082612926565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611d5f83611554565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611db082611c78565b611def576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de6906146a0565b60405180910390fd5b6000611dfa83611554565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611e6957508373ffffffffffffffffffffffffffffffffffffffff16611e518461082c565b73ffffffffffffffffffffffffffffffffffffffff16145b80611e7a5750611e798185611b2a565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611ea382611554565b73ffffffffffffffffffffffffffffffffffffffff1614611ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef090614620565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6090614660565b60405180910390fd5b611f748383836129a0565b611f7f600082611cec565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611fcf9190614b0c565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120269190614a2b565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46120e58383836129f8565b505050565b6120f48282611713565b612183576121198173ffffffffffffffffffffffffffffffffffffffff1660146129fd565b6121278360001c60206129fd565b604051602001612138929190614330565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a919061455e565b60405180910390fd5b5050565b6121918282611713565b612264576001600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612209611ce4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6122728282611713565b15612346576000600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506122eb611ce4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b61235261153d565b612391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612388906145a0565b60405180910390fd5b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123d5611ce4565b6040516123e29190614385565b60405180910390a1565b60006123f8600c612c39565b67016346949b2ffb4161240b9190614a2b565b9050612417600c612c47565b6124218282612c5d565b5050565b600061243082611554565b905061243e816000846129a0565b612449600083611cec565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124999190614b0c565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461253e816000846129f8565b5050565b6060600082141561258a576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061269e565b600082905060005b600082146125bc5780806125a590614cf5565b915050600a826125b59190614a81565b9150612592565b60008167ffffffffffffffff8111156125d8576125d7614e6e565b5b6040519080825280601f01601f19166020018201604052801561260a5781602001600182028036833780820191505090505b5090505b60008514612697576001826126239190614b0c565b9150600a856126329190614d52565b603061263e9190614a2b565b60f81b81838151811061265457612653614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126909190614a81565b945061260e565b8093505050505b919050565b6000826126b08584612c7b565b1490509392505050565b6126c261153d565b15612702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f9906146c0565b60405180910390fd5b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612746611ce4565b6040516127539190614385565b60405180910390a1565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156127cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c390614680565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516128bd919061444c565b60405180910390a3505050565b6128d5848484611e83565b6128e184848484612cf0565b612920576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612917906145e0565b60405180910390fd5b50505050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612999575061299882612e87565b5b9050919050565b6129a861153d565b156129e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129df906146c0565b60405180910390fd5b6129f3838383612f69565b505050565b505050565b606060006002836002612a109190614ab2565b612a1a9190614a2b565b67ffffffffffffffff811115612a3357612a32614e6e565b5b6040519080825280601f01601f191660200182016040528015612a655781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a9d57612a9c614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612b0157612b00614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002612b419190614ab2565b612b4b9190614a2b565b90505b6001811115612beb577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612b8d57612b8c614e3f565b5b1a60f81b828281518110612ba457612ba3614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080612be490614c68565b9050612b4e565b5060008414612c2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2690614580565b60405180910390fd5b8091505092915050565b600081600001549050919050565b6001816000016000828254019250508190555050565b612c7782826040518060200160405280600081525061307d565b5050565b60008082905060005b8451811015612ce5576000858281518110612ca257612ca1614e3f565b5b60200260200101519050808311612cc457612cbd83826130d8565b9250612cd1565b612cce81846130d8565b92505b508080612cdd90614cf5565b915050612c84565b508091505092915050565b6000612d118473ffffffffffffffffffffffffffffffffffffffff166130ef565b15612e7a578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612d3a611ce4565b8786866040518563ffffffff1660e01b8152600401612d5c9493929190614400565b602060405180830381600087803b158015612d7657600080fd5b505af1925050508015612da757506040513d601f19601f82011682018060405250810190612da49190613b97565b60015b612e2a573d8060008114612dd7576040519150601f19603f3d011682016040523d82523d6000602084013e612ddc565b606091505b50600081511415612e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e19906145e0565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612e7f565b600190505b949350505050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f5257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612f625750612f6182613112565b5b9050919050565b612f7483838361317c565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612fb757612fb281613181565b612ff6565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612ff557612ff483826131ca565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156130395761303481613337565b613078565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613077576130768282613408565b5b5b505050565b6130878383613487565b6130946000848484612cf0565b6130d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ca906145e0565b60405180910390fd5b505050565b600082600052816020526040600020905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016131d784611606565b6131e19190614b0c565b90506000600760008481526020019081526020016000205490508181146132c6576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b6000600160088054905061334b9190614b0c565b905060006009600084815260200190815260200160002054905060006008838154811061337b5761337a614e3f565b5b90600052602060002001549050806008838154811061339d5761339c614e3f565b5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806133ec576133eb614e10565b5b6001900381819060005260206000200160009055905550505050565b600061341383611606565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156134f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134ee90614760565b60405180910390fd5b61350081611c78565b15613540576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353790614640565b60405180910390fd5b61354c600083836129a0565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461359c9190614a2b565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461365d600083836129f8565b5050565b600061367461366f8461498b565b614966565b9050808382526020820190508285602086028201111561369757613696614ebb565b5b60005b858110156136c757816136ad8882613795565b84526020840193506020830192505060018101905061369a565b5050509392505050565b60006136e46136df846149b7565b614966565b905082815260208101848484011115613700576136ff614ec5565b5b61370b848285614c26565b509392505050565b6000813590506137228161568e565b92915050565b6000815190506137378161568e565b92915050565b600082601f83011261375257613751614e9d565b5b8135613762848260208601613661565b91505092915050565b60008135905061377a816156a5565b92915050565b60008151905061378f816156a5565b92915050565b6000813590506137a4816156bc565b92915050565b6000813590506137b9816156d3565b92915050565b6000815190506137ce816156d3565b92915050565b600082601f8301126137e9576137e8614e9d565b5b81356137f98482602086016136d1565b91505092915050565b60006060828403121561381857613817614eac565b5b6138226060614966565b90506000613832848285016138a1565b60008301525060206138468482850161376b565b602083015250604082013567ffffffffffffffff81111561386a57613869614eb6565b5b6138768482850161373d565b60408301525092915050565b60006040828403121561389857613897614ea7565b5b81905092915050565b6000813590506138b0816156ea565b92915050565b6000815190506138c5816156ea565b92915050565b6000813590506138da81615701565b92915050565b6000602082840312156138f6576138f5614ecf565b5b600061390484828501613713565b91505092915050565b60006020828403121561392357613922614ecf565b5b600061393184828501613728565b91505092915050565b6000806040838503121561395157613950614ecf565b5b600061395f85828601613713565b925050602061397085828601613713565b9150509250929050565b60008060006060848603121561399357613992614ecf565b5b60006139a186828701613713565b93505060206139b286828701613713565b92505060406139c3868287016138a1565b9150509250925092565b600080600080608085870312156139e7576139e6614ecf565b5b60006139f587828801613713565b9450506020613a0687828801613713565b9350506040613a17878288016138a1565b925050606085013567ffffffffffffffff811115613a3857613a37614eca565b5b613a44878288016137d4565b91505092959194509250565b60008060408385031215613a6757613a66614ecf565b5b6000613a7585828601613713565b9250506020613a868582860161376b565b9150509250929050565b60008060408385031215613aa757613aa6614ecf565b5b6000613ab585828601613713565b9250506020613ac6858286016138a1565b9150509250929050565b600060208284031215613ae657613ae5614ecf565b5b6000613af484828501613780565b91505092915050565b600060208284031215613b1357613b12614ecf565b5b6000613b2184828501613795565b91505092915050565b60008060408385031215613b4157613b40614ecf565b5b6000613b4f85828601613795565b9250506020613b6085828601613713565b9150509250929050565b600060208284031215613b8057613b7f614ecf565b5b6000613b8e848285016137aa565b91505092915050565b600060208284031215613bad57613bac614ecf565b5b6000613bbb848285016137bf565b91505092915050565b60008060008060808587031215613bde57613bdd614ecf565b5b600085013567ffffffffffffffff811115613bfc57613bfb614eca565b5b613c0887828801613882565b9450506020613c19878288016138cb565b9350506040613c2a87828801613795565b9250506060613c3b87828801613795565b91505092959194509250565b600060208284031215613c5d57613c5c614ecf565b5b6000613c6b848285016138a1565b91505092915050565b600060208284031215613c8a57613c89614ecf565b5b6000613c98848285016138b6565b91505092915050565b613caa81614b40565b82525050565b613cb981614b52565b82525050565b613cc881614b5e565b82525050565b613cdf613cda82614b5e565b614d3e565b82525050565b6000613cf0826149e8565b613cfa81856149fe565b9350613d0a818560208601614c35565b613d1381614ed4565b840191505092915050565b613d2781614bcb565b82525050565b613d3681614bdd565b82525050565b6000613d47826149f3565b613d518185614a0f565b9350613d61818560208601614c35565b613d6a81614ed4565b840191505092915050565b6000613d80826149f3565b613d8a8185614a20565b9350613d9a818560208601614c35565b80840191505092915050565b6000613db3602083614a0f565b9150613dbe82614ee5565b602082019050919050565b6000613dd6601483614a0f565b9150613de182614f0e565b602082019050919050565b6000613df9601c83614a20565b9150613e0482614f37565b601c82019050919050565b6000613e1c602b83614a0f565b9150613e2782614f60565b604082019050919050565b6000613e3f603283614a0f565b9150613e4a82614faf565b604082019050919050565b6000613e62602a83614a0f565b9150613e6d82614ffe565b604082019050919050565b6000613e85602583614a0f565b9150613e908261504d565b604082019050919050565b6000613ea8601c83614a0f565b9150613eb38261509c565b602082019050919050565b6000613ecb602483614a0f565b9150613ed6826150c5565b604082019050919050565b6000613eee601983614a0f565b9150613ef982615114565b602082019050919050565b6000613f11601983614a20565b9150613f1c8261513d565b601982019050919050565b6000613f34602c83614a0f565b9150613f3f82615166565b604082019050919050565b6000613f57601083614a0f565b9150613f62826151b5565b602082019050919050565b6000613f7a603883614a0f565b9150613f85826151de565b604082019050919050565b6000613f9d602a83614a0f565b9150613fa88261522d565b604082019050919050565b6000613fc0602983614a0f565b9150613fcb8261527c565b604082019050919050565b6000613fe3601c83614a0f565b9150613fee826152cb565b602082019050919050565b6000614006602083614a0f565b9150614011826152f4565b602082019050919050565b6000614029602083614a20565b91506140348261531d565b602082019050919050565b600061404c602c83614a0f565b915061405782615346565b604082019050919050565b600061406f601783614a20565b915061407a82615395565b601782019050919050565b6000614092602f83614a0f565b915061409d826153be565b604082019050919050565b60006140b5602183614a0f565b91506140c08261540d565b604082019050919050565b60006140d8601983614a0f565b91506140e38261545c565b602082019050919050565b60006140fb603183614a0f565b915061410682615485565b604082019050919050565b600061411e601a83614a0f565b9150614129826154d4565b602082019050919050565b6000614141602c83614a0f565b915061414c826154fd565b604082019050919050565b6000614164601783614a20565b915061416f8261554c565b601782019050919050565b6000614187603083614a0f565b915061419282615575565b604082019050919050565b60006141aa600d83614a20565b91506141b5826155c4565b600d82019050919050565b60006141cd601483614a0f565b91506141d8826155ed565b602082019050919050565b60006141f0601183614a20565b91506141fb82615616565b601182019050919050565b6000614213602f83614a0f565b915061421e8261563f565b604082019050919050565b61423281614bb4565b82525050565b61424961424482614bb4565b614d48565b82525050565b61425881614bbe565b82525050565b600061426a8285613d75565b91506142768284613d75565b91508190509392505050565b600061428e8284613d75565b91506142998261419d565b915081905092915050565b60006142af82613dec565b91506142bb8284613cce565b60208201915081905092915050565b60006142d582613f04565b91506142e18284613d75565b915081905092915050565b60006142f78261401c565b91506143038284613d75565b915081905092915050565b600061431982614062565b91506143258284613d75565b915081905092915050565b600061433b82614157565b91506143478285613d75565b9150614352826141e3565b915061435e8284613d75565b91508190509392505050565b60006143768284614238565b60208201915081905092915050565b600060208201905061439a6000830184613ca1565b92915050565b60006040820190506143b56000830185613ca1565b6143c26020830184613ca1565b9392505050565b60006060820190506143de6000830186613ca1565b6143eb6020830185613ca1565b6143f86040830184614229565b949350505050565b60006080820190506144156000830187613ca1565b6144226020830186613ca1565b61442f6040830185614229565b81810360608301526144418184613ce5565b905095945050505050565b60006020820190506144616000830184613cb0565b92915050565b600060208201905061447c6000830184613cbf565b92915050565b600060c0820190506144976000830189613cbf565b6144a46020830188613ca1565b6144b16040830187614229565b6144be6060830186614229565b6144cb6080830185614229565b6144d860a0830184614229565b979650505050505050565b60006080820190506144f86000830187613cbf565b614505602083018661424f565b6145126040830185613cbf565b61451f6060830184613cbf565b95945050505050565b600060208201905061453d6000830184613d1e565b92915050565b60006020820190506145586000830184613d2d565b92915050565b600060208201905081810360008301526145788184613d3c565b905092915050565b6000602082019050818103600083015261459981613da6565b9050919050565b600060208201905081810360008301526145b981613dc9565b9050919050565b600060208201905081810360008301526145d981613e0f565b9050919050565b600060208201905081810360008301526145f981613e32565b9050919050565b6000602082019050818103600083015261461981613e55565b9050919050565b6000602082019050818103600083015261463981613e78565b9050919050565b6000602082019050818103600083015261465981613e9b565b9050919050565b6000602082019050818103600083015261467981613ebe565b9050919050565b6000602082019050818103600083015261469981613ee1565b9050919050565b600060208201905081810360008301526146b981613f27565b9050919050565b600060208201905081810360008301526146d981613f4a565b9050919050565b600060208201905081810360008301526146f981613f6d565b9050919050565b6000602082019050818103600083015261471981613f90565b9050919050565b6000602082019050818103600083015261473981613fb3565b9050919050565b6000602082019050818103600083015261475981613fd6565b9050919050565b6000602082019050818103600083015261477981613ff9565b9050919050565b600060208201905081810360008301526147998161403f565b9050919050565b600060208201905081810360008301526147b981614085565b9050919050565b600060208201905081810360008301526147d9816140a8565b9050919050565b600060208201905081810360008301526147f9816140cb565b9050919050565b60006020820190508181036000830152614819816140ee565b9050919050565b6000602082019050818103600083015261483981614111565b9050919050565b6000602082019050818103600083015261485981614134565b9050919050565b600060208201905081810360008301526148798161417a565b9050919050565b60006020820190508181036000830152614899816141c0565b9050919050565b600060208201905081810360008301526148b981614206565b9050919050565b60006020820190506148d56000830184614229565b92915050565b600080833560016020038436030381126148f8576148f7614eb1565b5b80840192508235915067ffffffffffffffff82111561491a57614919614ea2565b5b60208301925060208202360383131561493657614935614ec0565b5b509250929050565b60008235600160600383360303811261495a57614959614eb1565b5b80830191505092915050565b6000614970614981565b905061497c8282614cc4565b919050565b6000604051905090565b600067ffffffffffffffff8211156149a6576149a5614e6e565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156149d2576149d1614e6e565b5b6149db82614ed4565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614a3682614bb4565b9150614a4183614bb4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614a7657614a75614d83565b5b828201905092915050565b6000614a8c82614bb4565b9150614a9783614bb4565b925082614aa757614aa6614db2565b5b828204905092915050565b6000614abd82614bb4565b9150614ac883614bb4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614b0157614b00614d83565b5b828202905092915050565b6000614b1782614bb4565b9150614b2283614bb4565b925082821015614b3557614b34614d83565b5b828203905092915050565b6000614b4b82614b94565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000614bd682614c02565b9050919050565b6000614be882614c02565b9050919050565b6000614bfb3683613802565b9050919050565b6000614c0d82614c14565b9050919050565b6000614c1f82614b94565b9050919050565b82818337600083830152505050565b60005b83811015614c53578082015181840152602081019050614c38565b83811115614c62576000848401525b50505050565b6000614c7382614bb4565b91506000821415614c8757614c86614d83565b5b600182039050919050565b60006002820490506001821680614caa57607f821691505b60208210811415614cbe57614cbd614de1565b5b50919050565b614ccd82614ed4565b810181811067ffffffffffffffff82111715614cec57614ceb614e6e565b5b80604052505050565b6000614d0082614bb4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614d3357614d32614d83565b5b600182019050919050565b6000819050919050565b6000819050919050565b6000614d5d82614bb4565b9150614d6883614bb4565b925082614d7857614d77614db2565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f424455434b494e47533a204174206c656173742074776f206475636b7320617260008201527f6520726571756972656400000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f424455434b494e47533a204e6f74204c6567656e646172792000000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f424455434b494e47533a20496e76616c696420416c6c6f77616e636500000000600082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f424455434b494e47533a20496e76616c6964204f776e6572206f66204e465420600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f424455434b494e47533a205265616368204c696d697420000000000000000000600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f424455434b494e47533a20496e76616c6964207369676e657200000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f424455434b494e47533a20496e76616c69642042616c616e6365000000000000600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b7f6d657461646174612e6a736f6e00000000000000000000000000000000000000600082015250565b7f424455434b494e47533a20546f6b656e20343034000000000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b61569781614b40565b81146156a257600080fd5b50565b6156ae81614b52565b81146156b957600080fd5b50565b6156c581614b5e565b81146156d057600080fd5b50565b6156dc81614b68565b81146156e757600080fd5b50565b6156f381614bb4565b81146156fe57600080fd5b50565b61570a81614bbe565b811461571557600080fd5b5056fe68747470733a2f2f697066732e6d6164776f726c642e696f2f626475636b696e67732fa26469706673582212205cd6b2ec81976dcf192263b56399111768fa3c626d9e14fb0885ff5d234adb2364736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102485760003560e01c80635c975abb1161013b578063b88d4fde116100b8578063e02695051161007c578063e0269505146106dd578063e63ab1e9146106fb578063e8a3d48514610719578063e985e9c514610737578063f2f5a7e51461076757610248565b8063b88d4fde14610627578063c87b56dd14610643578063d539139314610673578063d547741f14610691578063db09a3f5146106ad57610248565b806391d14854116100ff57806391d148541461058157806395d89b41146105b1578063a089d04f146105cf578063a217fddf146105ed578063a22cb4651461060b57610248565b80635c975abb146104db5780636352211e146104f957806370a08231146105295780638456cb5914610559578063877c86fb1461056357610248565b8063248a9ca3116101c957806340d097c31161018d57806340d097c31461043b57806342842e0e1461045757806342966c68146104735780634f6ccce71461048f5780635568d86e146104bf57610248565b8063248a9ca3146103995780632f2ff15d146103c95780632f745c59146103e557806336568abe146104155780633f4ba83a1461043157610248565b80631424dd69116102105780631424dd691461030557806316fa58a11461032357806318160ddd146103415780631eb637f21461035f57806323b872dd1461037d57610248565b806301ffc9a71461024d57806306fdde031461027d57806306fe8acc1461029b578063081812fc146102b9578063095ea7b3146102e9575b600080fd5b61026760048036038101906102629190613b6a565b610783565b604051610274919061444c565b60405180910390f35b610285610795565b604051610292919061455e565b60405180910390f35b6102a3610827565b6040516102b091906148c0565b60405180910390f35b6102d360048036038101906102ce9190613c47565b61082c565b6040516102e09190614385565b60405180910390f35b61030360048036038101906102fe9190613a90565b6108b1565b005b61030d6109c9565b60405161031a91906148c0565b60405180910390f35b61032b6109ce565b60405161033891906148c0565b60405180910390f35b6103496109da565b60405161035691906148c0565b60405180910390f35b6103676109e7565b6040516103749190614467565b60405180910390f35b6103976004803603810190610392919061397a565b6109ed565b005b6103b360048036038101906103ae9190613afd565b610a4d565b6040516103c09190614467565b60405180910390f35b6103e360048036038101906103de9190613b2a565b610a6d565b005b6103ff60048036038101906103fa9190613a90565b610a96565b60405161040c91906148c0565b60405180910390f35b61042f600480360381019061042a9190613b2a565b610b3b565b005b610439610bbe565b005b610455600480360381019061045091906138e0565b610bfb565b005b610471600480360381019061046c919061397a565b610c3a565b005b61048d60048036038101906104889190613c47565b610c5a565b005b6104a960048036038101906104a49190613c47565b610cb6565b6040516104b691906148c0565b60405180910390f35b6104d960048036038101906104d49190613bc4565b610d27565b005b6104e361153d565b6040516104f0919061444c565b60405180910390f35b610513600480360381019061050e9190613c47565b611554565b6040516105209190614385565b60405180910390f35b610543600480360381019061053e91906138e0565b611606565b60405161055091906148c0565b60405180910390f35b6105616116be565b005b61056b6116fb565b6040516105789190614528565b60405180910390f35b61059b60048036038101906105969190613b2a565b611713565b6040516105a8919061444c565b60405180910390f35b6105b961177e565b6040516105c6919061455e565b60405180910390f35b6105d7611810565b6040516105e49190614543565b60405180910390f35b6105f5611828565b6040516106029190614467565b60405180910390f35b61062560048036038101906106209190613a50565b61182f565b005b610641600480360381019061063c91906139cd565b611845565b005b61065d60048036038101906106589190613c47565b6118a7565b60405161066a919061455e565b60405180910390f35b61067b61193a565b6040516106889190614467565b60405180910390f35b6106ab60048036038101906106a69190613b2a565b61195e565b005b6106c760048036038101906106c29190613c47565b611987565b6040516106d491906148c0565b60405180910390f35b6106e5611aaf565b6040516106f29190614385565b60405180910390f35b610703611ac7565b6040516107109190614467565b60405180910390f35b610721611aeb565b60405161072e919061455e565b60405180910390f35b610751600480360381019061074c919061393a565b611b2a565b60405161075e919061444c565b60405180910390f35b610781600480360381019061077c9190613c47565b611bbe565b005b600061078e82611bfe565b9050919050565b6060600080546107a490614c92565b80601f01602080910402602001604051908101604052809291908181526020018280546107d090614c92565b801561081d5780601f106107f25761010080835404028352916020019161081d565b820191906000526020600020905b81548152906001019060200180831161080057829003601f168201915b5050505050905090565b600381565b600061083782611c78565b610876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086d90614780565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108bc82611554565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561092d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610924906147c0565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661094c611ce4565b73ffffffffffffffffffffffffffffffffffffffff16148061097b575061097a81610975611ce4565b611b2a565b5b6109ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b1906146e0565b60405180910390fd5b6109c48383611cec565b505050565b600181565b67016346949b2ffb4181565b6000600880549050905090565b600d5481565b6109fe6109f8611ce4565b82611da5565b610a3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3490614800565b60405180910390fd5b610a48838383611e83565b505050565b6000600b6000838152602001908152602001600020600101549050919050565b610a7682610a4d565b610a8781610a82611ce4565b6120ea565b610a918383612187565b505050565b6000610aa183611606565b8210610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad9906145c0565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610b43611ce4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610bb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba7906148a0565b60405180910390fd5b610bba8282612268565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610bf081610beb611ce4565b6120ea565b610bf861234a565b50565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610c2d81610c28611ce4565b6120ea565b610c36826123ec565b5050565b610c5583838360405180602001604052806000815250611845565b505050565b610c6b610c65611ce4565b82611da5565b610caa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca190614860565b60405180910390fd5b610cb381612425565b50565b6000610cc06109da565b8210610d01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf890614840565b60405180910390fd5b60088281548110610d1557610d14614e3f565b5b90600052602060002001549050919050565b610d2f61153d565b15610d6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d66906146c0565b60405180910390fd5b6002848060200190610d8191906148db565b905014610dc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dba90614600565b60405180910390fd5b60007f110e325ae79444bac762d6ce1659ccdaf6855a0645c8d74601fb2c8ffce45427338660000135878060200190610dfc91906148db565b6000818110610e0e57610e0d614e3f565b5b9050602002810190610e20919061493e565b60000135888060200190610e3491906148db565b6001818110610e4657610e45614e3f565b5b9050602002810190610e58919061493e565b6000013546604051602001610e7296959493929190614482565b604051602081830303815290604052805190602001209050600081604051602001610e9d91906142a4565b604051602081830303815290604052805190602001209050600060018287878760405160008152602001604052604051610eda94939291906144e3565b6020604051602081039080840390855afa158015610efc573d6000803e3d6000fd5b505050602060405103519050610f327f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682611713565b610f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f68906147e0565b60405180910390fd5b86600001357331c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401610fc39190614385565b60206040518083038186803b158015610fdb57600080fd5b505afa158015610fef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110139190613c74565b1015611054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104b90614820565b60405180910390fd5b86600001357331c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b81526004016110a89291906143a0565b60206040518083038186803b1580156110c057600080fd5b505afa1580156110d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f89190613c74565b1015611139576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113090614740565b60405180910390fd5b60005b87806020019061114c91906148db565b905081101561146057600088806020019061116791906148db565b8381811061117857611177614e3f565b5b905060200281019061118a919061493e565b61119390614bef565b90506000600190503373ffffffffffffffffffffffffffffffffffffffff167371e7afa8b3ab8e83011ce7bbbdcd76ccd7cb066073ffffffffffffffffffffffffffffffffffffffff16636352211e84600001516040518263ffffffff1660e01b815260040161120391906148c0565b60206040518083038186803b15801561121b57600080fd5b505afa15801561122f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611253919061390d565b73ffffffffffffffffffffffffffffffffffffffff16146112778360000151612542565b60405160200161128791906142ec565b604051602081830303815290604052906112d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ce919061455e565b60405180910390fd5b5081602001511561139657600082600001516040516020016112f9919061436a565b6040516020818303038152906040528051906020012090506113228360400151600d54836126a3565b61132f8460000151612542565b60405160200161133f91906142ca565b6040516020818303038152906040529061138f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611386919061455e565b60405180910390fd5b5060039150505b80600e60008460000151815260200190815260200160002054106113bd8360000151612542565b6040516020016113cd919061430e565b6040516020818303038152906040529061141d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611414919061455e565b60405180910390fd5b50600e600083600001518152602001908152602001600020600081548092919061144690614cf5565b91905055505050808061145890614cf5565b91505061113c565b5060008760000135111561152b577331c2415c946928e9fd1af83cdfa38d3edbd4326f73ffffffffffffffffffffffffffffffffffffffff166323b872dd3373d3df302c73271493746a205f06a3a3b6efe8e0c38a600001356040518463ffffffff1660e01b81526004016114d7939291906143c9565b602060405180830381600087803b1580156114f157600080fd5b505af1158015611505573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115299190613ad0565b505b611534336123ec565b50505050505050565b6000600a60009054906101000a900460ff16905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f490614720565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166e90614700565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6116f0816116eb611ce4565b6120ea565b6116f86126ba565b50565b7331c2415c946928e9fd1af83cdfa38d3edbd4326f81565b6000600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60606001805461178d90614c92565b80601f01602080910402602001604051908101604052809291908181526020018280546117b990614c92565b80156118065780601f106117db57610100808354040283529160200191611806565b820191906000526020600020905b8154815290600101906020018083116117e957829003601f168201915b5050505050905090565b7371e7afa8b3ab8e83011ce7bbbdcd76ccd7cb066081565b6000801b81565b61184161183a611ce4565b838361275d565b5050565b611856611850611ce4565b83611da5565b611895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188c90614800565b60405180910390fd5b6118a1848484846128ca565b50505050565b60606118b282611c78565b6118f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e8906147a0565b60405180910390fd5b6040518060600160405280602381526020016157196023913961191383612542565b60405160200161192492919061425e565b6040516020818303038152906040529050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61196782610a4d565b61197881611973611ce4565b6120ea565b6119828383612268565b505050565b60008073ffffffffffffffffffffffffffffffffffffffff167371e7afa8b3ab8e83011ce7bbbdcd76ccd7cb066073ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016119ed91906148c0565b60206040518083038186803b158015611a0557600080fd5b505afa158015611a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3d919061390d565b73ffffffffffffffffffffffffffffffffffffffff161415611a94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8b90614880565b60405180910390fd5b600e6000838152602001908152602001600020549050919050565b73d3df302c73271493746a205f06a3a3b6efe8e0c381565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b606060405180606001604052806023815260200161571960239139604051602001611b169190614282565b604051602081830303815290604052905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611bf081611beb611ce4565b6120ea565b8160001b600d819055505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611c715750611c7082612926565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611d5f83611554565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611db082611c78565b611def576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de6906146a0565b60405180910390fd5b6000611dfa83611554565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611e6957508373ffffffffffffffffffffffffffffffffffffffff16611e518461082c565b73ffffffffffffffffffffffffffffffffffffffff16145b80611e7a5750611e798185611b2a565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611ea382611554565b73ffffffffffffffffffffffffffffffffffffffff1614611ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef090614620565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6090614660565b60405180910390fd5b611f748383836129a0565b611f7f600082611cec565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611fcf9190614b0c565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120269190614a2b565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46120e58383836129f8565b505050565b6120f48282611713565b612183576121198173ffffffffffffffffffffffffffffffffffffffff1660146129fd565b6121278360001c60206129fd565b604051602001612138929190614330565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a919061455e565b60405180910390fd5b5050565b6121918282611713565b612264576001600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612209611ce4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6122728282611713565b15612346576000600b600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506122eb611ce4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b61235261153d565b612391576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612388906145a0565b60405180910390fd5b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6123d5611ce4565b6040516123e29190614385565b60405180910390a1565b60006123f8600c612c39565b67016346949b2ffb4161240b9190614a2b565b9050612417600c612c47565b6124218282612c5d565b5050565b600061243082611554565b905061243e816000846129a0565b612449600083611cec565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124999190614b0c565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461253e816000846129f8565b5050565b6060600082141561258a576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061269e565b600082905060005b600082146125bc5780806125a590614cf5565b915050600a826125b59190614a81565b9150612592565b60008167ffffffffffffffff8111156125d8576125d7614e6e565b5b6040519080825280601f01601f19166020018201604052801561260a5781602001600182028036833780820191505090505b5090505b60008514612697576001826126239190614b0c565b9150600a856126329190614d52565b603061263e9190614a2b565b60f81b81838151811061265457612653614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126909190614a81565b945061260e565b8093505050505b919050565b6000826126b08584612c7b565b1490509392505050565b6126c261153d565b15612702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f9906146c0565b60405180910390fd5b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612746611ce4565b6040516127539190614385565b60405180910390a1565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156127cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c390614680565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516128bd919061444c565b60405180910390a3505050565b6128d5848484611e83565b6128e184848484612cf0565b612920576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612917906145e0565b60405180910390fd5b50505050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612999575061299882612e87565b5b9050919050565b6129a861153d565b156129e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129df906146c0565b60405180910390fd5b6129f3838383612f69565b505050565b505050565b606060006002836002612a109190614ab2565b612a1a9190614a2b565b67ffffffffffffffff811115612a3357612a32614e6e565b5b6040519080825280601f01601f191660200182016040528015612a655781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a9d57612a9c614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612b0157612b00614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002612b419190614ab2565b612b4b9190614a2b565b90505b6001811115612beb577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612b8d57612b8c614e3f565b5b1a60f81b828281518110612ba457612ba3614e3f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080612be490614c68565b9050612b4e565b5060008414612c2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2690614580565b60405180910390fd5b8091505092915050565b600081600001549050919050565b6001816000016000828254019250508190555050565b612c7782826040518060200160405280600081525061307d565b5050565b60008082905060005b8451811015612ce5576000858281518110612ca257612ca1614e3f565b5b60200260200101519050808311612cc457612cbd83826130d8565b9250612cd1565b612cce81846130d8565b92505b508080612cdd90614cf5565b915050612c84565b508091505092915050565b6000612d118473ffffffffffffffffffffffffffffffffffffffff166130ef565b15612e7a578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612d3a611ce4565b8786866040518563ffffffff1660e01b8152600401612d5c9493929190614400565b602060405180830381600087803b158015612d7657600080fd5b505af1925050508015612da757506040513d601f19601f82011682018060405250810190612da49190613b97565b60015b612e2a573d8060008114612dd7576040519150601f19603f3d011682016040523d82523d6000602084013e612ddc565b606091505b50600081511415612e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e19906145e0565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612e7f565b600190505b949350505050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f5257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612f625750612f6182613112565b5b9050919050565b612f7483838361317c565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612fb757612fb281613181565b612ff6565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612ff557612ff483826131ca565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156130395761303481613337565b613078565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614613077576130768282613408565b5b5b505050565b6130878383613487565b6130946000848484612cf0565b6130d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ca906145e0565b60405180910390fd5b505050565b600082600052816020526040600020905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016131d784611606565b6131e19190614b0c565b90506000600760008481526020019081526020016000205490508181146132c6576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b6000600160088054905061334b9190614b0c565b905060006009600084815260200190815260200160002054905060006008838154811061337b5761337a614e3f565b5b90600052602060002001549050806008838154811061339d5761339c614e3f565b5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806133ec576133eb614e10565b5b6001900381819060005260206000200160009055905550505050565b600061341383611606565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156134f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134ee90614760565b60405180910390fd5b61350081611c78565b15613540576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353790614640565b60405180910390fd5b61354c600083836129a0565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461359c9190614a2b565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461365d600083836129f8565b5050565b600061367461366f8461498b565b614966565b9050808382526020820190508285602086028201111561369757613696614ebb565b5b60005b858110156136c757816136ad8882613795565b84526020840193506020830192505060018101905061369a565b5050509392505050565b60006136e46136df846149b7565b614966565b905082815260208101848484011115613700576136ff614ec5565b5b61370b848285614c26565b509392505050565b6000813590506137228161568e565b92915050565b6000815190506137378161568e565b92915050565b600082601f83011261375257613751614e9d565b5b8135613762848260208601613661565b91505092915050565b60008135905061377a816156a5565b92915050565b60008151905061378f816156a5565b92915050565b6000813590506137a4816156bc565b92915050565b6000813590506137b9816156d3565b92915050565b6000815190506137ce816156d3565b92915050565b600082601f8301126137e9576137e8614e9d565b5b81356137f98482602086016136d1565b91505092915050565b60006060828403121561381857613817614eac565b5b6138226060614966565b90506000613832848285016138a1565b60008301525060206138468482850161376b565b602083015250604082013567ffffffffffffffff81111561386a57613869614eb6565b5b6138768482850161373d565b60408301525092915050565b60006040828403121561389857613897614ea7565b5b81905092915050565b6000813590506138b0816156ea565b92915050565b6000815190506138c5816156ea565b92915050565b6000813590506138da81615701565b92915050565b6000602082840312156138f6576138f5614ecf565b5b600061390484828501613713565b91505092915050565b60006020828403121561392357613922614ecf565b5b600061393184828501613728565b91505092915050565b6000806040838503121561395157613950614ecf565b5b600061395f85828601613713565b925050602061397085828601613713565b9150509250929050565b60008060006060848603121561399357613992614ecf565b5b60006139a186828701613713565b93505060206139b286828701613713565b92505060406139c3868287016138a1565b9150509250925092565b600080600080608085870312156139e7576139e6614ecf565b5b60006139f587828801613713565b9450506020613a0687828801613713565b9350506040613a17878288016138a1565b925050606085013567ffffffffffffffff811115613a3857613a37614eca565b5b613a44878288016137d4565b91505092959194509250565b60008060408385031215613a6757613a66614ecf565b5b6000613a7585828601613713565b9250506020613a868582860161376b565b9150509250929050565b60008060408385031215613aa757613aa6614ecf565b5b6000613ab585828601613713565b9250506020613ac6858286016138a1565b9150509250929050565b600060208284031215613ae657613ae5614ecf565b5b6000613af484828501613780565b91505092915050565b600060208284031215613b1357613b12614ecf565b5b6000613b2184828501613795565b91505092915050565b60008060408385031215613b4157613b40614ecf565b5b6000613b4f85828601613795565b9250506020613b6085828601613713565b9150509250929050565b600060208284031215613b8057613b7f614ecf565b5b6000613b8e848285016137aa565b91505092915050565b600060208284031215613bad57613bac614ecf565b5b6000613bbb848285016137bf565b91505092915050565b60008060008060808587031215613bde57613bdd614ecf565b5b600085013567ffffffffffffffff811115613bfc57613bfb614eca565b5b613c0887828801613882565b9450506020613c19878288016138cb565b9350506040613c2a87828801613795565b9250506060613c3b87828801613795565b91505092959194509250565b600060208284031215613c5d57613c5c614ecf565b5b6000613c6b848285016138a1565b91505092915050565b600060208284031215613c8a57613c89614ecf565b5b6000613c98848285016138b6565b91505092915050565b613caa81614b40565b82525050565b613cb981614b52565b82525050565b613cc881614b5e565b82525050565b613cdf613cda82614b5e565b614d3e565b82525050565b6000613cf0826149e8565b613cfa81856149fe565b9350613d0a818560208601614c35565b613d1381614ed4565b840191505092915050565b613d2781614bcb565b82525050565b613d3681614bdd565b82525050565b6000613d47826149f3565b613d518185614a0f565b9350613d61818560208601614c35565b613d6a81614ed4565b840191505092915050565b6000613d80826149f3565b613d8a8185614a20565b9350613d9a818560208601614c35565b80840191505092915050565b6000613db3602083614a0f565b9150613dbe82614ee5565b602082019050919050565b6000613dd6601483614a0f565b9150613de182614f0e565b602082019050919050565b6000613df9601c83614a20565b9150613e0482614f37565b601c82019050919050565b6000613e1c602b83614a0f565b9150613e2782614f60565b604082019050919050565b6000613e3f603283614a0f565b9150613e4a82614faf565b604082019050919050565b6000613e62602a83614a0f565b9150613e6d82614ffe565b604082019050919050565b6000613e85602583614a0f565b9150613e908261504d565b604082019050919050565b6000613ea8601c83614a0f565b9150613eb38261509c565b602082019050919050565b6000613ecb602483614a0f565b9150613ed6826150c5565b604082019050919050565b6000613eee601983614a0f565b9150613ef982615114565b602082019050919050565b6000613f11601983614a20565b9150613f1c8261513d565b601982019050919050565b6000613f34602c83614a0f565b9150613f3f82615166565b604082019050919050565b6000613f57601083614a0f565b9150613f62826151b5565b602082019050919050565b6000613f7a603883614a0f565b9150613f85826151de565b604082019050919050565b6000613f9d602a83614a0f565b9150613fa88261522d565b604082019050919050565b6000613fc0602983614a0f565b9150613fcb8261527c565b604082019050919050565b6000613fe3601c83614a0f565b9150613fee826152cb565b602082019050919050565b6000614006602083614a0f565b9150614011826152f4565b602082019050919050565b6000614029602083614a20565b91506140348261531d565b602082019050919050565b600061404c602c83614a0f565b915061405782615346565b604082019050919050565b600061406f601783614a20565b915061407a82615395565b601782019050919050565b6000614092602f83614a0f565b915061409d826153be565b604082019050919050565b60006140b5602183614a0f565b91506140c08261540d565b604082019050919050565b60006140d8601983614a0f565b91506140e38261545c565b602082019050919050565b60006140fb603183614a0f565b915061410682615485565b604082019050919050565b600061411e601a83614a0f565b9150614129826154d4565b602082019050919050565b6000614141602c83614a0f565b915061414c826154fd565b604082019050919050565b6000614164601783614a20565b915061416f8261554c565b601782019050919050565b6000614187603083614a0f565b915061419282615575565b604082019050919050565b60006141aa600d83614a20565b91506141b5826155c4565b600d82019050919050565b60006141cd601483614a0f565b91506141d8826155ed565b602082019050919050565b60006141f0601183614a20565b91506141fb82615616565b601182019050919050565b6000614213602f83614a0f565b915061421e8261563f565b604082019050919050565b61423281614bb4565b82525050565b61424961424482614bb4565b614d48565b82525050565b61425881614bbe565b82525050565b600061426a8285613d75565b91506142768284613d75565b91508190509392505050565b600061428e8284613d75565b91506142998261419d565b915081905092915050565b60006142af82613dec565b91506142bb8284613cce565b60208201915081905092915050565b60006142d582613f04565b91506142e18284613d75565b915081905092915050565b60006142f78261401c565b91506143038284613d75565b915081905092915050565b600061431982614062565b91506143258284613d75565b915081905092915050565b600061433b82614157565b91506143478285613d75565b9150614352826141e3565b915061435e8284613d75565b91508190509392505050565b60006143768284614238565b60208201915081905092915050565b600060208201905061439a6000830184613ca1565b92915050565b60006040820190506143b56000830185613ca1565b6143c26020830184613ca1565b9392505050565b60006060820190506143de6000830186613ca1565b6143eb6020830185613ca1565b6143f86040830184614229565b949350505050565b60006080820190506144156000830187613ca1565b6144226020830186613ca1565b61442f6040830185614229565b81810360608301526144418184613ce5565b905095945050505050565b60006020820190506144616000830184613cb0565b92915050565b600060208201905061447c6000830184613cbf565b92915050565b600060c0820190506144976000830189613cbf565b6144a46020830188613ca1565b6144b16040830187614229565b6144be6060830186614229565b6144cb6080830185614229565b6144d860a0830184614229565b979650505050505050565b60006080820190506144f86000830187613cbf565b614505602083018661424f565b6145126040830185613cbf565b61451f6060830184613cbf565b95945050505050565b600060208201905061453d6000830184613d1e565b92915050565b60006020820190506145586000830184613d2d565b92915050565b600060208201905081810360008301526145788184613d3c565b905092915050565b6000602082019050818103600083015261459981613da6565b9050919050565b600060208201905081810360008301526145b981613dc9565b9050919050565b600060208201905081810360008301526145d981613e0f565b9050919050565b600060208201905081810360008301526145f981613e32565b9050919050565b6000602082019050818103600083015261461981613e55565b9050919050565b6000602082019050818103600083015261463981613e78565b9050919050565b6000602082019050818103600083015261465981613e9b565b9050919050565b6000602082019050818103600083015261467981613ebe565b9050919050565b6000602082019050818103600083015261469981613ee1565b9050919050565b600060208201905081810360008301526146b981613f27565b9050919050565b600060208201905081810360008301526146d981613f4a565b9050919050565b600060208201905081810360008301526146f981613f6d565b9050919050565b6000602082019050818103600083015261471981613f90565b9050919050565b6000602082019050818103600083015261473981613fb3565b9050919050565b6000602082019050818103600083015261475981613fd6565b9050919050565b6000602082019050818103600083015261477981613ff9565b9050919050565b600060208201905081810360008301526147998161403f565b9050919050565b600060208201905081810360008301526147b981614085565b9050919050565b600060208201905081810360008301526147d9816140a8565b9050919050565b600060208201905081810360008301526147f9816140cb565b9050919050565b60006020820190508181036000830152614819816140ee565b9050919050565b6000602082019050818103600083015261483981614111565b9050919050565b6000602082019050818103600083015261485981614134565b9050919050565b600060208201905081810360008301526148798161417a565b9050919050565b60006020820190508181036000830152614899816141c0565b9050919050565b600060208201905081810360008301526148b981614206565b9050919050565b60006020820190506148d56000830184614229565b92915050565b600080833560016020038436030381126148f8576148f7614eb1565b5b80840192508235915067ffffffffffffffff82111561491a57614919614ea2565b5b60208301925060208202360383131561493657614935614ec0565b5b509250929050565b60008235600160600383360303811261495a57614959614eb1565b5b80830191505092915050565b6000614970614981565b905061497c8282614cc4565b919050565b6000604051905090565b600067ffffffffffffffff8211156149a6576149a5614e6e565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156149d2576149d1614e6e565b5b6149db82614ed4565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614a3682614bb4565b9150614a4183614bb4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614a7657614a75614d83565b5b828201905092915050565b6000614a8c82614bb4565b9150614a9783614bb4565b925082614aa757614aa6614db2565b5b828204905092915050565b6000614abd82614bb4565b9150614ac883614bb4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614b0157614b00614d83565b5b828202905092915050565b6000614b1782614bb4565b9150614b2283614bb4565b925082821015614b3557614b34614d83565b5b828203905092915050565b6000614b4b82614b94565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000614bd682614c02565b9050919050565b6000614be882614c02565b9050919050565b6000614bfb3683613802565b9050919050565b6000614c0d82614c14565b9050919050565b6000614c1f82614b94565b9050919050565b82818337600083830152505050565b60005b83811015614c53578082015181840152602081019050614c38565b83811115614c62576000848401525b50505050565b6000614c7382614bb4565b91506000821415614c8757614c86614d83565b5b600182039050919050565b60006002820490506001821680614caa57607f821691505b60208210811415614cbe57614cbd614de1565b5b50919050565b614ccd82614ed4565b810181811067ffffffffffffffff82111715614cec57614ceb614e6e565b5b80604052505050565b6000614d0082614bb4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614d3357614d32614d83565b5b600182019050919050565b6000819050919050565b6000819050919050565b6000614d5d82614bb4565b9150614d6883614bb4565b925082614d7857614d77614db2565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f424455434b494e47533a204174206c656173742074776f206475636b7320617260008201527f6520726571756972656400000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f424455434b494e47533a204e6f74204c6567656e646172792000000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f424455434b494e47533a20496e76616c696420416c6c6f77616e636500000000600082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f424455434b494e47533a20496e76616c6964204f776e6572206f66204e465420600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f424455434b494e47533a205265616368204c696d697420000000000000000000600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f424455434b494e47533a20496e76616c6964207369676e657200000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f424455434b494e47533a20496e76616c69642042616c616e6365000000000000600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b7f6d657461646174612e6a736f6e00000000000000000000000000000000000000600082015250565b7f424455434b494e47533a20546f6b656e20343034000000000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b61569781614b40565b81146156a257600080fd5b50565b6156ae81614b52565b81146156b957600080fd5b50565b6156c581614b5e565b81146156d057600080fd5b50565b6156dc81614b68565b81146156e757600080fd5b50565b6156f381614bb4565b81146156fe57600080fd5b50565b61570a81614bbe565b811461571557600080fd5b5056fe68747470733a2f2f697066732e6d6164776f726c642e696f2f626475636b696e67732fa26469706673582212205cd6b2ec81976dcf192263b56399111768fa3c626d9e14fb0885ff5d234adb2364736f6c63430008070033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.