ERC-1155
Overview
Max Total Supply
828 CC
Holders
243
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ConservationCards
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {ERC1155, IERC1155, IERC1155MetadataURI} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import {Merkle2} from "./Common/Merkle2.sol"; import {Royalties} from "./Common/Royalties.sol"; contract ConservationCards is ERC1155, DefaultOperatorFilterer, Merkle2, Royalties { enum SaleState { CLOSED, ALLOWLIST, PUBLIC, COMBINED } struct Token{ uint64 ethPrice; uint64 discPrice; uint16 balance; uint16 supply; bool isMintActive; string name; string uri; } bool public isOsEnabled; string public name; SaleState public saleState; string public symbol; uint256 public totalMinted; Token[] public tokens; modifier onlyAllowedOperator(address from) override { if (isOsEnabled && from != _msgSender()) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) override { if(isOsEnabled){ _checkFilterOperator(operator); } _; } constructor() ERC1155("") Royalties(0x17Aa054107181D576d2b52366a4a199D7FA2fAF3, 10, 100) { isOsEnabled = true; name = "Conservation Cards"; symbol = "CC"; setMerkleRoot(0x2a562e9f360bb35e629dce27d1ba09f397ae0ef73569d70e7d4f5776afb5eea7); bool isMintEnabled = false; setToken(0, Token(0, 0, 0, 0, false, "", "")); setToken(1, Token({ ethPrice: 0.0299 ether, discPrice: 0.0299 ether, balance: 0, supply: 10000, isMintActive: false, name: "1", uri: "" })); setToken(2, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "2", uri: "" })); setToken(3, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "3", uri: "" })); setToken(4, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "4", uri: "" })); setToken(5, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "5", uri: "" })); setToken(6, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "6", uri: "" })); setToken(7, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "7", uri: "" })); setToken(8, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "8", uri: "" })); setToken(9, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "9", uri: "" })); setToken(10, Token({ ethPrice: 0.0299 ether, discPrice: 0.0279 ether, balance: 0, supply: 10000, isMintActive: isMintEnabled, name: "10", uri: "" })); } // view function exists(uint256 id) public view returns(bool) { return id < tokens.length; } // view function supportsInterface(bytes4 interfaceId) public pure override(ERC1155, Royalties) returns(bool){ return interfaceId == type(IERC165).interfaceId || interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || interfaceId == type(IERC2981).interfaceId; } function totalSupply(uint256 id) external view returns(uint256){ require( exists( id ), "CC: Specified token (id) does not exist" ); return tokens[id].supply; } function uri(uint256 id) public view override returns(string memory){ require( exists( id ), "CC: Specified token (id) does not exist" ); return tokens[id].uri; } //payable function mintBatch( uint256[] calldata tokenIds, uint256[] calldata quantities, bytes32[] calldata proof ) external payable{ require(tokenIds.length == quantities.length, "CC: Unbalanced request"); bool isAllowlist = false; if(saleState != SaleState.PUBLIC){ if(saleState == SaleState.CLOSED) revert("CC: All sales are closed"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); isAllowlist = _isValidProof(leaf, proof); if(saleState == SaleState.ALLOWLIST && !isAllowlist) revert("CC: Allowlist sales are closed"); } uint256 totalPrice = 0; for(uint256 i = 0; i < tokenIds.length; ++i){ uint256 tokenId = tokenIds[i]; require(tokenId < tokens.length, "CC: Nonexistant token"); Token storage token = tokens[tokenId]; require(token.isMintActive, "CC: Token disabled"); uint16 quantity = uint16(quantities[i]); require(token.balance + quantity < token.supply, "CC: transaction exceeds supply"); totalMinted += quantity; token.balance += quantity; if(isAllowlist) totalPrice += (token.discPrice * quantity); else totalPrice += (token.ethPrice * quantity); } require(msg.value == totalPrice, "CC: Ether sent is not correct" ); _mintBatch(msg.sender, tokenIds, quantities, ""); } // onlyDelegates function mintTo( address[] calldata accounts, uint256[] calldata ids, uint256[] calldata quantities ) external payable onlyDelegates { require( accounts.length == ids.length, "CC: Must provide equal accounts and ids" ); require( ids.length == quantities.length, "CC: Must provide equal ids and quantities"); for(uint256 i; i < ids.length; ++i ){ totalMinted += quantities[i]; _mint(accounts[i], ids[i], quantities[i], ""); } } // onlyEOA function setActive(uint256[] calldata ids, bool[] calldata isActive) external onlyEOA{ require(ids.length == isActive.length, "CC: Unbalanced request"); for(uint256 i = 0; i <ids.length; ++i){ tokens[ids[i]].isMintActive = isActive[i]; } } function setOsStatus(bool isEnabled) external onlyEOA{ isOsEnabled = isEnabled; } function setSaleState(SaleState newState) external onlyEOA{ saleState = newState; } function setToken(uint256 id, Token memory token) public onlyEOA{ require( id < tokens.length || id == tokens.length, "CC: Invalid token id" ); if( id == tokens.length ) tokens.push(); Token memory prev = tokens[id]; require(prev.balance <= token.supply, "CC: Specified supply is lower than current balance" ); tokens[id] = Token({ ethPrice: token.ethPrice, discPrice: token.discPrice, balance: prev.balance, supply: token.supply, isMintActive: token.isMintActive, name: token.name, uri: token.uri }); emit URI(token.uri, id); } // onlyOwner function setDefaultRoyalty(address receiver, uint16 feeNumerator, uint16 feeDenominator) public onlyOwner { _setDefaultRoyalty( receiver, feeNumerator, feeDenominator ); } function withdraw() external onlyOwner { (bool success, ) = payable(owner()).call{ value: address(this).balance }(""); require(success, "CC: Withdraw error"); } // view: OS overrides function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override onlyAllowedOperator(from) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: BSD-3 pragma solidity ^0.8.9; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; contract Royalties is IERC2981{ struct Fraction{ uint16 numerator; uint16 denominator; } struct Royalty{ address receiver; Fraction fraction; } Royalty public defaultRoyalty; //mapping(uint => Royalty) public tokenRoyalties; constructor(address receiver, uint16 royaltyNum, uint16 royaltyDenom) { _setDefaultRoyalty(receiver, royaltyNum, royaltyDenom); } // view function royaltyInfo(uint256, uint256 _salePrice) public view virtual returns(address, uint256) { /* Royalty memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } */ uint256 royaltyAmount = (_salePrice * defaultRoyalty.fraction.numerator) / defaultRoyalty.fraction.denominator; return (defaultRoyalty.receiver, royaltyAmount); } function supportsInterface(bytes4 interfaceId) public view virtual returns(bool) { return interfaceId == type(IERC2981).interfaceId; } function _setDefaultRoyalty(address receiver, uint16 royaltyNum, uint16 royaltyDenom) internal { defaultRoyalty.receiver = receiver; defaultRoyalty.fraction = Fraction(royaltyNum, royaltyDenom); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {Delegated} from "./Delegated.sol"; contract Merkle2 is Delegated{ bytes32 public merkleRootPrimary; bytes32 public merkleRootSecondary; function setMerkleRoot(bytes32 merkleRoot) public onlyEOA { merkleRootSecondary = merkleRootPrimary; merkleRootPrimary = merkleRoot; } function _isValidProof(bytes32 leaf, bytes32[] memory proof) internal view returns(bool) { return _isValidProofPrimary(leaf, proof) || _isValidProofSecondary(leaf, proof); } function _isValidProofPrimary(bytes32 leaf, bytes32[] memory proof) internal view returns(bool) { return MerkleProof.processProof(proof, leaf) == merkleRootPrimary; } function _isValidProofSecondary(bytes32 leaf, bytes32[] memory proof) internal view returns(bool) { return MerkleProof.processProof(proof, leaf) == merkleRootSecondary; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract Delegated is Ownable{ error NotEOA(); error NotAContract(); error UnauthorizedDelegate(); mapping(address => bool) internal _delegates; modifier onlyContracts { if(!_delegates[msg.sender]) revert UnauthorizedDelegate(); if(!Address.isContract(msg.sender)) revert NotAContract(); _; } modifier onlyDelegates { if(!_delegates[msg.sender]) revert UnauthorizedDelegate(); _; } modifier onlyEOA { if(!_delegates[msg.sender]) revert UnauthorizedDelegate(); if(Address.isContract(msg.sender)) revert NotEOA(); _; } constructor() Ownable(){ setDelegate(owner(), true); } //onlyOwner function isDelegate(address addr) external view onlyOwner returns(bool) { return _delegates[addr]; } function setDelegate(address addr, bool isDelegate_) public onlyOwner { _delegates[addr] = isDelegate_; } function transferOwnership(address newOwner) public virtual override onlyOwner { setDelegate(newOwner, true); super.transferOwnership(newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// 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); }
// 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.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ 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 Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle 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++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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 (last updated v4.8.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 functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "libraries": {}, "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"},{"inputs":[],"name":"NotAContract","type":"error"},{"inputs":[],"name":"NotEOA","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"UnauthorizedDelegate","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyalty","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"components":[{"internalType":"uint16","name":"numerator","type":"uint16"},{"internalType":"uint16","name":"denominator","type":"uint16"}],"internalType":"struct Royalties.Fraction","name":"fraction","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isDelegate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootPrimary","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootSecondary","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"mintTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"enum ConservationCards.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"bool[]","name":"isActive","type":"bool[]"}],"name":"setActive","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":"address","name":"receiver","type":"address"},{"internalType":"uint16","name":"feeNumerator","type":"uint16"},{"internalType":"uint16","name":"feeDenominator","type":"uint16"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"isDelegate_","type":"bool"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"setOsStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum ConservationCards.SaleState","name":"newState","type":"uint8"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint64","name":"ethPrice","type":"uint64"},{"internalType":"uint64","name":"discPrice","type":"uint64"},{"internalType":"uint16","name":"balance","type":"uint16"},{"internalType":"uint16","name":"supply","type":"uint16"},{"internalType":"bool","name":"isMintActive","type":"bool"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct ConservationCards.Token","name":"token","type":"tuple"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"uint64","name":"ethPrice","type":"uint64"},{"internalType":"uint64","name":"discPrice","type":"uint64"},{"internalType":"uint16","name":"balance","type":"uint16"},{"internalType":"uint16","name":"supply","type":"uint16"},{"internalType":"bool","name":"isMintActive","type":"bool"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b507317aa054107181d576d2b52366a4a199d7fa2faf3600a6064733cc6cdda760b79bafa08df41ecfa224f810dceb66001604051806020016040528060008152506200006381620007c560201b60201c565b506daaeb6d7670e522a718067333cd4e3b15620001a9578015620000f757604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620000d857600080fd5b505af1158015620000ed573d6000803e3d6000fd5b50505050620001a9565b6001600160a01b03821615620001485760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000bd565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200018f57600080fd5b505af1158015620001a4573d6000803e3d6000fd5b505050505b50620001b7905033620007d7565b620001d6620001ce6003546001600160a01b031690565b600162000829565b600780546001600160a01b0319166001600160a01b0385161790556040805180820190915261ffff80841680835290831660209092018290526008805463ffffffff19169091176201000090920291909117905550506009805460ff1916600117905550604080518082019091526012815271436f6e736572766174696f6e20436172647360701b6020820152600a9062000272908262000e68565b50604080518082019091526002815261434360f01b6020820152600c906200029b908262000e68565b50620002c77f2a562e9f360bb35e629dce27d1ba09f397ae0ef73569d70e7d4f5776afb5eea76200085e565b6040805160e0810182526000808252602080830182905282840182905260608301829052608083018290528351808201855282815260a0840152835190810190935280835260c082019290925262000321908290620008ba565b6040805160e081018252666a39e43ec8c0008082526020808301919091526000828401819052612710606084015260808301819052835180850185526001808252603160f81b8285015260a08501919091528451928301909452815260c08201526200038e9190620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152601960f91b8184015260a0840152835191820190935291825260c08101919091526200040590600290620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152603360f81b8184015260a0840152835191820190935291825260c08101919091526200047c90600390620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152600d60fa1b8184015260a0840152835191820190935291825260c0810191909152620004f390600490620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152603560f81b8184015260a0840152835191820190935291825260c08101919091526200056a90600590620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152601b60f91b8184015260a0840152835191820190935291825260c0810191909152620005e190600690620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152603760f81b8184015260a0840152835191820190935291825260c08101919091526200065890600790620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152600760fb1b8184015260a0840152835191820190935291825260c0810191909152620006cf90600890620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc0006020808301919091526000828401819052612710606084015284151560808401528351808501855260018152603960f81b8184015260a0840152835191820190935291825260c08101919091526200074690600990620008ba565b6040805160e081018252666a39e43ec8c000815266631ee6f53bc000602080830191909152600082840181905261271060608401528415156080840152835180850185526002815261031360f41b8184015260a0840152835191820190935291825260c0810191909152620007be90600a90620008ba565b5062000f9a565b6002620007d3828262000e68565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200083362000d65565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b3360009081526004602052604090205460ff166200088f5760405163d3ce1c4960e01b815260040160405180910390fd5b333b15620008b057604051635d04968b60e11b815260040160405180910390fd5b6005805460065555565b3360009081526004602052604090205460ff16620008eb5760405163d3ce1c4960e01b815260040160405180910390fd5b333b156200090c57604051635d04968b60e11b815260040160405180910390fd5b600e548210806200091e5750600e5482145b620009705760405162461bcd60e51b815260206004820152601460248201527f43433a20496e76616c696420746f6b656e20696400000000000000000000000060448201526064015b60405180910390fd5b600e5482036200098757600e805460010181556000525b6000600e83815481106200099f576200099f62000f34565b60009182526020918290206040805160e08101825260039390930290910180546001600160401b0380821685526801000000000000000082041694840194909452600160801b840461ffff90811692840192909252600160901b84049091166060830152600160a01b90920460ff161515608082015260018201805491929160a08401919062000a2f9062000dd9565b80601f016020809104026020016040519081016040528092919081815260200182805462000a5d9062000dd9565b801562000aae5780601f1062000a825761010080835404028352916020019162000aae565b820191906000526020600020905b81548152906001019060200180831162000a9057829003601f168201915b5050505050815260200160028201805462000ac99062000dd9565b80601f016020809104026020016040519081016040528092919081815260200182805462000af79062000dd9565b801562000b485780601f1062000b1c5761010080835404028352916020019162000b48565b820191906000526020600020905b81548152906001019060200180831162000b2a57829003601f168201915b5050505050815250509050816060015161ffff16816040015161ffff16111562000bd05760405162461bcd60e51b815260206004820152603260248201527f43433a2053706563696669656420737570706c79206973206c6f776572207468604482015271616e2063757272656e742062616c616e636560701b606482015260840162000967565b6040518060e0016040528083600001516001600160401b0316815260200183602001516001600160401b03168152602001826040015161ffff168152602001836060015161ffff1681526020018360800151151581526020018360a0015181526020018360c00151815250600e848154811062000c515762000c5162000f34565b60009182526020918290208351600392909202018054928401516040850151606086015160808701516001600160401b039586166001600160801b0319909716969096176801000000000000000095909316949094029190911763ffffffff60801b1916600160801b61ffff9283160261ffff60901b191617600160901b91909316029190911760ff60a01b1916600160a01b9215159290920291909117815560a0820151600182019062000d07908262000e68565b5060c0820151600282019062000d1e908262000e68565b50905050827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360c0015160405162000d58919062000f4a565b60405180910390a2505050565b6003546001600160a01b0316331462000dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000967565b565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168062000dee57607f821691505b60208210810362000e0f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000e6357600081815260208120601f850160051c8101602086101562000e3e5750805b601f850160051c820191505b8181101562000e5f5782815560010162000e4a565b5050505b505050565b81516001600160401b0381111562000e845762000e8462000dc3565b62000e9c8162000e95845462000dd9565b8462000e15565b602080601f83116001811462000ed4576000841562000ebb5750858301515b600019600386901b1c1916600185901b17855562000e5f565b600085815260208120601f198616915b8281101562000f055788860151825594840194600190910190840162000ee4565b508582101562000f245787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600060208083528351808285015260005b8181101562000f795785810183015185820160400152820162000f5b565b506000604082860101526040601f19601f8301168501019250505092915050565b6136978062000faa6000396000f3fe6080604052600436106102035760003560e01c80635a67de0711610118578063b620fa74116100a0578063e985e9c51161006f578063e985e9c51461065f578063f02ea02c146106a8578063f242432a146106be578063f2fde38b146106de578063f5f5f498146106fe57600080fd5b8063b620fa74146105ec578063b9f4eef21461060c578063bd85b0391461062c578063c05194ad1461064c57600080fd5b80637cb64759116100e75780637cb64759146105635780638da5cb5b1461058357806395d89b41146105a1578063a22cb465146105b6578063a2309ff8146105d657600080fd5b80635a67de071461048f578063603f4d52146104af578063715018a6146104d65780637885fdc7146104eb57600080fd5b80632a55205a1161019b57806341f434341161016a57806341f43434146103b35780634a994eef146103ed5780634e1273f41461040d5780634f558e791461043a5780634f64b2be1461045c57600080fd5b80632a55205a1461031f5780632eb2c2d61461035e5780633ccfd60b1461037e57806341acc66a1461039357600080fd5b80630e89341c116101d75780630e89341c146102ad578063109e943f146102cd578063211f9e2f146102e7578063277acb711461030957600080fd5b8062fdd58e1461020857806301ffc9a71461023b57806306fdde031461026b578063077796271461028d575b600080fd5b34801561021457600080fd5b506102286102233660046127f3565b610711565b6040519081526020015b60405180910390f35b34801561024757600080fd5b5061025b610256366004612833565b6107aa565b6040519015158152602001610232565b34801561027757600080fd5b50610280610816565b6040516102329190612896565b34801561029957600080fd5b5061025b6102a83660046128a9565b6108a4565b3480156102b957600080fd5b506102806102c83660046128c4565b6108d1565b3480156102d957600080fd5b5060095461025b9060ff1681565b3480156102f357600080fd5b506103076103023660046128f6565b6109ae565b005b34801561031557600080fd5b5061022860055481565b34801561032b57600080fd5b5061033f61033a366004612913565b610a11565b604080516001600160a01b039093168352602083019190915201610232565b34801561036a57600080fd5b50610307610379366004612aa6565b610a55565b34801561038a57600080fd5b50610307610aa1565b34801561039f57600080fd5b506103076103ae366004612b61565b610b55565b3480156103bf57600080fd5b506103d56daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b039091168152602001610232565b3480156103f957600080fd5b50610307610408366004612ba4565b610bbb565b34801561041957600080fd5b5061042d610428366004612bdb565b610bee565b6040516102329190612ce0565b34801561044657600080fd5b5061025b6104553660046128c4565b600e541190565b34801561046857600080fd5b5061047c6104773660046128c4565b610d17565b6040516102329796959493929190612cf3565b34801561049b57600080fd5b506103076104aa366004612d59565b610e94565b3480156104bb57600080fd5b50600b546104c99060ff1681565b6040516102329190612d90565b3480156104e257600080fd5b50610307610f0b565b3480156104f757600080fd5b506007546040805180820190915260085461ffff80821683526201000090910416602082015261052e916001600160a01b03169082565b604080516001600160a01b039093168352815161ffff9081166020808601919091529092015190911690820152606001610232565b34801561056f57600080fd5b5061030761057e3660046128c4565b610f1f565b34801561058f57600080fd5b506003546001600160a01b03166103d5565b3480156105ad57600080fd5b50610280610f79565b3480156105c257600080fd5b506103076105d1366004612ba4565b610f86565b3480156105e257600080fd5b50610228600d5481565b3480156105f857600080fd5b50610307610607366004612dfc565b610fa6565b34801561061857600080fd5b50610307610627366004612e7e565b6110d5565b34801561063857600080fd5b506102286106473660046128c4565b61154e565b61030761065a366004612f6f565b6115ac565b34801561066b57600080fd5b5061025b61067a366004613008565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156106b457600080fd5b5061022860065481565b3480156106ca57600080fd5b506103076106d936600461303b565b611a92565b3480156106ea57600080fd5b506103076106f93660046128a9565b611ad7565b61030761070c366004612f6f565b611af3565b60006001600160a01b0383166107815760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b031982166301ffc9a760e01b14806107db57506001600160e01b03198216636cdb3d1360e11b145b806107f657506001600160e01b031982166303a24d0760e21b145b806107a457506001600160e01b0319821663152a902d60e11b1492915050565b600a80546108239061309f565b80601f016020809104026020016040519081016040528092919081815260200182805461084f9061309f565b801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b505050505081565b60006108ae611ca8565b506001600160a01b03811660009081526004602052604090205460ff165b919050565b60606108de82600e541190565b6108fa5760405162461bcd60e51b8152600401610778906130d9565b600e828154811061090d5761090d613120565b906000526020600020906003020160020180546109299061309f565b80601f01602080910402602001604051908101604052809291908181526020018280546109559061309f565b80156109a25780601f10610977576101008083540402835291602001916109a2565b820191906000526020600020905b81548152906001019060200180831161098557829003601f168201915b50505050509050919050565b3360009081526004602052604090205460ff166109de5760405163d3ce1c4960e01b815260040160405180910390fd5b333b156109fe57604051635d04968b60e11b815260040160405180910390fd5b6009805460ff1916911515919091179055565b6008546000908190819061ffff620100008204811691610a3291168661314c565b610a3c9190613163565b6007546001600160a01b031693509150505b9250929050565b6001600160a01b038516331480610a715750610a71853361067a565b610a8d5760405162461bcd60e51b815260040161077890613185565b610a9a8585858585611d02565b5050505050565b610aa9611ca8565b6000610abd6003546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610b07576040519150601f19603f3d011682016040523d82523d6000602084013e610b0c565b606091505b5050905080610b525760405162461bcd60e51b815260206004820152601260248201527121a19d102bb4ba34323930bb9032b93937b960711b6044820152606401610778565b50565b610b5d611ca8565b600780546001600160a01b0319166001600160a01b0385161790556040805180820190915261ffff80841680835290831660209092018290526008805463ffffffff191690911762010000909202919091179055505050565b505050565b610bc3611ca8565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b60608151835114610c535760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610778565b600083516001600160401b03811115610c6e57610c6e612935565b604051908082528060200260200182016040528015610c97578160200160208202803683370190505b50905060005b8451811015610d0f57610ce2858281518110610cbb57610cbb613120565b6020026020010151858381518110610cd557610cd5613120565b6020026020010151610711565b828281518110610cf457610cf4613120565b6020908102919091010152610d08816131d3565b9050610c9d565b509392505050565b600e8181548110610d2757600080fd5b6000918252602090912060039091020180546001820180546001600160401b038084169550600160401b84041693600160801b840461ffff90811694600160901b810490911693600160a01b90910460ff1692610d839061309f565b80601f0160208091040260200160405190810160405280929190818152602001828054610daf9061309f565b8015610dfc5780601f10610dd157610100808354040283529160200191610dfc565b820191906000526020600020905b815481529060010190602001808311610ddf57829003601f168201915b505050505090806002018054610e119061309f565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3d9061309f565b8015610e8a5780601f10610e5f57610100808354040283529160200191610e8a565b820191906000526020600020905b815481529060010190602001808311610e6d57829003601f168201915b5050505050905087565b3360009081526004602052604090205460ff16610ec45760405163d3ce1c4960e01b815260040160405180910390fd5b333b15610ee457604051635d04968b60e11b815260040160405180910390fd5b600b805482919060ff19166001836003811115610f0357610f03612d7a565b021790555050565b610f13611ca8565b610f1d6000611eac565b565b3360009081526004602052604090205460ff16610f4f5760405163d3ce1c4960e01b815260040160405180910390fd5b333b15610f6f57604051635d04968b60e11b815260040160405180910390fd5b6005805460065555565b600c80546108239061309f565b600954829060ff1615610f9c57610f9c81611efe565b610bb68383611fb7565b3360009081526004602052604090205460ff16610fd65760405163d3ce1c4960e01b815260040160405180910390fd5b333b15610ff657604051635d04968b60e11b815260040160405180910390fd5b82811461103e5760405162461bcd60e51b815260206004820152601660248201527510d0ce88155b98985b185b98d959081c995c5d595cdd60521b6044820152606401610778565b60005b83811015610a9a5782828281811061105b5761105b613120565b905060200201602081019061107091906128f6565b600e86868481811061108457611084613120565b905060200201358154811061109b5761109b613120565b600091825260209091206003909102018054911515600160a01b0260ff60a01b199092169190911790556110ce816131d3565b9050611041565b3360009081526004602052604090205460ff166111055760405163d3ce1c4960e01b815260040160405180910390fd5b333b1561112557604051635d04968b60e11b815260040160405180910390fd5b600e548210806111365750600e5482145b6111795760405162461bcd60e51b815260206004820152601460248201527310d0ce88125b9d985b1a59081d1bdad95b881a5960621b6044820152606401610778565b600e54820361118f57600e805460010181556000525b6000600e83815481106111a4576111a4613120565b60009182526020918290206040805160e08101825260039390930290910180546001600160401b038082168552600160401b82041694840194909452600160801b840461ffff90811692840192909252600160901b84049091166060830152600160a01b90920460ff161515608082015260018201805491929160a08401919061122d9061309f565b80601f01602080910402602001604051908101604052809291908181526020018280546112599061309f565b80156112a65780601f1061127b576101008083540402835291602001916112a6565b820191906000526020600020905b81548152906001019060200180831161128957829003601f168201915b505050505081526020016002820180546112bf9061309f565b80601f01602080910402602001604051908101604052809291908181526020018280546112eb9061309f565b80156113385780601f1061130d57610100808354040283529160200191611338565b820191906000526020600020905b81548152906001019060200180831161131b57829003601f168201915b5050505050815250509050816060015161ffff16816040015161ffff1611156113be5760405162461bcd60e51b815260206004820152603260248201527f43433a2053706563696669656420737570706c79206973206c6f776572207468604482015271616e2063757272656e742062616c616e636560701b6064820152608401610778565b6040518060e0016040528083600001516001600160401b0316815260200183602001516001600160401b03168152602001826040015161ffff168152602001836060015161ffff1681526020018360800151151581526020018360a0015181526020018360c00151815250600e848154811061143c5761143c613120565b60009182526020918290208351600392909202018054928401516040850151606086015160808701516001600160401b039586166fffffffffffffffffffffffffffffffff1990971696909617600160401b95909316949094029190911763ffffffff60801b1916600160801b61ffff9283160261ffff60901b191617600160901b91909316029190911760ff60a01b1916600160a01b9215159290920291909117815560a082015160018201906114f49082613232565b5060c082015160028201906115099082613232565b50905050827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360c001516040516115419190612896565b60405180910390a2505050565b600061155b82600e541190565b6115775760405162461bcd60e51b8152600401610778906130d9565b600e828154811061158a5761158a613120565b6000918252602090912060039091020154600160901b900461ffff1692915050565b8483146115f45760405162461bcd60e51b815260206004820152601660248201527510d0ce88155b98985b185b98d959081c995c5d595cdd60521b6044820152606401610778565b60006002600b5460ff16600381111561160f5761160f612d7a565b14611765576000600b5460ff16600381111561162d5761162d612d7a565b0361167a5760405162461bcd60e51b815260206004820152601860248201527f43433a20416c6c2073616c65732061726520636c6f73656400000000000000006044820152606401610778565b6040516bffffffffffffffffffffffff193360601b1660208201526000906034016040516020818303038152906040528051906020012090506116f081858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611fc692505050565b91506001600b5460ff16600381111561170b5761170b612d7a565b148015611716575081155b156117635760405162461bcd60e51b815260206004820152601e60248201527f43433a20416c6c6f776c6973742073616c65732061726520636c6f73656400006044820152606401610778565b505b6000805b878110156119bc57600089898381811061178557611785613120565b905060200201359050600e8054905081106117da5760405162461bcd60e51b815260206004820152601560248201527421a19d102737b732bc34b9ba30b73a103a37b5b2b760591b6044820152606401610778565b6000600e82815481106117ef576117ef613120565b600091825260209091206003909102018054909150600160a01b900460ff1661184f5760405162461bcd60e51b815260206004820152601260248201527110d0ce88151bdad95b88191a5cd8589b195960721b6044820152606401610778565b600089898581811061186357611863613120565b84546020909102929092013592505061ffff600160901b8204811691611892918491600160801b9004166132f1565b61ffff16106118e35760405162461bcd60e51b815260206004820152601e60248201527f43433a207472616e73616374696f6e206578636565647320737570706c7900006044820152606401610778565b8061ffff16600d60008282546118f99190613313565b909155505081548190839060109061191d908490600160801b900461ffff166132f1565b92506101000a81548161ffff021916908361ffff160217905550851561197857815461195e9061ffff831690600160401b90046001600160401b0316613326565b611971906001600160401b031686613313565b94506119a8565b81546119929061ffff8316906001600160401b0316613326565b6119a5906001600160401b031686613313565b94505b505050806119b5906131d3565b9050611769565b50803414611a0c5760405162461bcd60e51b815260206004820152601d60248201527f43433a2045746865722073656e74206973206e6f7420636f72726563740000006044820152606401610778565b611a883389898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092018290525060408051602081019091529081529250611fe9915050565b5050505050505050565b6001600160a01b038516331480611aae5750611aae853361067a565b611aca5760405162461bcd60e51b815260040161077890613185565b610a9a8585858585612143565b611adf611ca8565b611aea816001610bbb565b610b528161227b565b3360009081526004602052604090205460ff16611b235760405163d3ce1c4960e01b815260040160405180910390fd5b848314611b825760405162461bcd60e51b815260206004820152602760248201527f43433a204d7573742070726f7669646520657175616c206163636f756e747320604482015266616e642069647360c81b6064820152608401610778565b828114611be35760405162461bcd60e51b815260206004820152602960248201527f43433a204d7573742070726f7669646520657175616c2069647320616e64207160448201526875616e74697469657360b81b6064820152608401610778565b60005b83811015611c9f57828282818110611c0057611c00613120565b90506020020135600d6000828254611c189190613313565b90915550611c8f9050878783818110611c3357611c33613120565b9050602002016020810190611c4891906128a9565b868684818110611c5a57611c5a613120565b90506020020135858585818110611c7357611c73613120565b90506020020135604051806020016040528060008152506122f1565b611c98816131d3565b9050611be6565b50505050505050565b6003546001600160a01b03163314610f1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610778565b8151835114611d235760405162461bcd60e51b815260040161077890613351565b6001600160a01b038416611d495760405162461bcd60e51b815260040161077890613399565b33611d588187878787876123d1565b60005b8451811015611e3e576000858281518110611d7857611d78613120565b602002602001015190506000858381518110611d9657611d96613120565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611de65760405162461bcd60e51b8152600401610778906133de565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e23908490613313565b9250508190555050505080611e37906131d3565b9050611d5b565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e8e929190613428565b60405180910390a4611ea4818787878787612401565b505050505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6daaeb6d7670e522a718067333cd4e3b15610b5257604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190613456565b610b5257604051633b79c77360e21b81526001600160a01b0382166004820152602401610778565b611fc233838361255c565b5050565b6000611fd2838361263c565b80611fe25750611fe28383612653565b9392505050565b6001600160a01b03841661200f5760405162461bcd60e51b815260040161077890613473565b81518351146120305760405162461bcd60e51b815260040161077890613351565b33612040816000878787876123d1565b60005b84518110156120db5783818151811061205e5761205e613120565b602002602001015160008087848151811061207b5761207b613120565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546120c39190613313565b909155508190506120d3816131d3565b915050612043565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161212c929190613428565b60405180910390a4610a9a81600087878787612401565b6001600160a01b0384166121695760405162461bcd60e51b815260040161077890613399565b33600061217585612662565b9050600061218285612662565b90506121928389898585896123d1565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156121d35760405162461bcd60e51b8152600401610778906133de565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612210908490613313565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612270848a8a8a8a8a6126ad565b505050505050505050565b612283611ca8565b6001600160a01b0381166122e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610778565b610b5281611eac565b6001600160a01b0384166123175760405162461bcd60e51b815260040161077890613473565b33600061232385612662565b9050600061233085612662565b9050612341836000898585896123d1565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290612371908490613313565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611c9f836000898989896126ad565b600954859060ff1680156123ee57506001600160a01b0381163314155b156123fc576123fc33611efe565b611c9f565b6001600160a01b0384163b15611ea45760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061244590899089908890889088906004016134b4565b6020604051808303816000875af1925050508015612480575060408051601f3d908101601f1916820190925261247d91810190613512565b60015b61252c5761248c61352f565b806308c379a0036124c557506124a061354b565b806124ab57506124c7565b8060405162461bcd60e51b81526004016107789190612896565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610778565b6001600160e01b0319811663bc197c8160e01b14611c9f5760405162461bcd60e51b8152600401610778906135d4565b816001600160a01b0316836001600160a01b0316036125cf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610778565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600060055461264b8385612768565b149392505050565b600060065461264b8385612768565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061269c5761269c613120565b602090810291909101015292915050565b6001600160a01b0384163b15611ea45760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126f1908990899088908890889060040161361c565b6020604051808303816000875af192505050801561272c575060408051601f3d908101601f1916820190925261272991810190613512565b60015b6127385761248c61352f565b6001600160e01b0319811663f23a6e6160e01b14611c9f5760405162461bcd60e51b8152600401610778906135d4565b600081815b8451811015610d0f576127998286838151811061278c5761278c613120565b60200260200101516127ad565b9150806127a5816131d3565b91505061276d565b60008183106127c9576000828152602084905260409020611fe2565b6000838152602083905260409020611fe2565b80356001600160a01b03811681146108cc57600080fd5b6000806040838503121561280657600080fd5b61280f836127dc565b946020939093013593505050565b6001600160e01b031981168114610b5257600080fd5b60006020828403121561284557600080fd5b8135611fe28161281d565b6000815180845260005b818110156128765760208185018101518683018201520161285a565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611fe26020830184612850565b6000602082840312156128bb57600080fd5b611fe2826127dc565b6000602082840312156128d657600080fd5b5035919050565b8015158114610b5257600080fd5b80356108cc816128dd565b60006020828403121561290857600080fd5b8135611fe2816128dd565b6000806040838503121561292657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561297057612970612935565b6040525050565b60405160e081016001600160401b038111828210171561299957612999612935565b60405290565b60006001600160401b038211156129b8576129b8612935565b5060051b60200190565b600082601f8301126129d357600080fd5b813560206129e08261299f565b6040516129ed828261294b565b83815260059390931b8501820192828101915086841115612a0d57600080fd5b8286015b84811015612a285780358352918301918301612a11565b509695505050505050565b600082601f830112612a4457600080fd5b81356001600160401b03811115612a5d57612a5d612935565b604051612a74601f8301601f19166020018261294b565b818152846020838601011115612a8957600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215612abe57600080fd5b612ac7866127dc565b9450612ad5602087016127dc565b935060408601356001600160401b0380821115612af157600080fd5b612afd89838a016129c2565b94506060880135915080821115612b1357600080fd5b612b1f89838a016129c2565b93506080880135915080821115612b3557600080fd5b50612b4288828901612a33565b9150509295509295909350565b803561ffff811681146108cc57600080fd5b600080600060608486031215612b7657600080fd5b612b7f846127dc565b9250612b8d60208501612b4f565b9150612b9b60408501612b4f565b90509250925092565b60008060408385031215612bb757600080fd5b612bc0836127dc565b91506020830135612bd0816128dd565b809150509250929050565b60008060408385031215612bee57600080fd5b82356001600160401b0380821115612c0557600080fd5b818501915085601f830112612c1957600080fd5b81356020612c268261299f565b604051612c33828261294b565b83815260059390931b8501820192828101915089841115612c5357600080fd5b948201945b83861015612c7857612c69866127dc565b82529482019490820190612c58565b96505086013592505080821115612c8e57600080fd5b50612c9b858286016129c2565b9150509250929050565b600081518084526020808501945080840160005b83811015612cd557815187529582019590820190600101612cb9565b509495945050505050565b602081526000611fe26020830184612ca5565b6001600160401b0388811682528716602082015261ffff868116604083015285166060820152831515608082015260e060a08201819052600090612d3990830185612850565b82810360c0840152612d4b8185612850565b9a9950505050505050505050565b600060208284031215612d6b57600080fd5b813560048110611fe257600080fd5b634e487b7160e01b600052602160045260246000fd5b6020810160048310612db257634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f840112612dca57600080fd5b5081356001600160401b03811115612de157600080fd5b6020830191508360208260051b8501011115610a4e57600080fd5b60008060008060408587031215612e1257600080fd5b84356001600160401b0380821115612e2957600080fd5b612e3588838901612db8565b90965094506020870135915080821115612e4e57600080fd5b50612e5b87828801612db8565b95989497509550505050565b80356001600160401b03811681146108cc57600080fd5b60008060408385031215612e9157600080fd5b8235915060208301356001600160401b0380821115612eaf57600080fd5b9084019060e08287031215612ec357600080fd5b612ecb612977565b612ed483612e67565b8152612ee260208401612e67565b6020820152612ef360408401612b4f565b6040820152612f0460608401612b4f565b6060820152612f15608084016128eb565b608082015260a083013582811115612f2c57600080fd5b612f3888828601612a33565b60a08301525060c083013582811115612f5057600080fd5b612f5c88828601612a33565b60c0830152508093505050509250929050565b60008060008060008060608789031215612f8857600080fd5b86356001600160401b0380821115612f9f57600080fd5b612fab8a838b01612db8565b90985096506020890135915080821115612fc457600080fd5b612fd08a838b01612db8565b90965094506040890135915080821115612fe957600080fd5b50612ff689828a01612db8565b979a9699509497509295939492505050565b6000806040838503121561301b57600080fd5b613024836127dc565b9150613032602084016127dc565b90509250929050565b600080600080600060a0868803121561305357600080fd5b61305c866127dc565b945061306a602087016127dc565b9350604086013592506060860135915060808601356001600160401b0381111561309357600080fd5b612b4288828901612a33565b600181811c908216806130b357607f821691505b6020821081036130d357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526027908201527f43433a2053706563696669656420746f6b656e202869642920646f6573206e6f6040820152661d08195e1a5cdd60ca1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107a4576107a4613136565b60008261318057634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6000600182016131e5576131e5613136565b5060010190565b601f821115610bb657600081815260208120601f850160051c810160208610156132135750805b601f850160051c820191505b81811015611ea45782815560010161321f565b81516001600160401b0381111561324b5761324b612935565b61325f81613259845461309f565b846131ec565b602080601f831160018114613294576000841561327c5750858301515b600019600386901b1c1916600185901b178555611ea4565b600085815260208120601f198616915b828110156132c3578886015182559484019460019091019084016132a4565b50858210156132e15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561330c5761330c613136565b5092915050565b808201808211156107a4576107a4613136565b6001600160401b0381811683821602808216919082811461334957613349613136565b505092915050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60408152600061343b6040830185612ca5565b828103602084015261344d8185612ca5565b95945050505050565b60006020828403121561346857600080fd5b8151611fe2816128dd565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906134e090830186612ca5565b82810360608401526134f28186612ca5565b905082810360808401526135068185612850565b98975050505050505050565b60006020828403121561352457600080fd5b8151611fe28161281d565b600060033d11156135485760046000803e5060005160e01c5b90565b600060443d10156135595790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561358857505050505090565b82850191508151818111156135a05750505050505090565b843d87010160208285010111156135ba5750505050505090565b6135c96020828601018761294b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061365690830184612850565b97965050505050505056fea2646970667358221220ba4a0b7ad31cfedc665af947034f0b2a888de14b816688931b1e21d01c25b47564736f6c63430008130033
Deployed Bytecode
0x6080604052600436106102035760003560e01c80635a67de0711610118578063b620fa74116100a0578063e985e9c51161006f578063e985e9c51461065f578063f02ea02c146106a8578063f242432a146106be578063f2fde38b146106de578063f5f5f498146106fe57600080fd5b8063b620fa74146105ec578063b9f4eef21461060c578063bd85b0391461062c578063c05194ad1461064c57600080fd5b80637cb64759116100e75780637cb64759146105635780638da5cb5b1461058357806395d89b41146105a1578063a22cb465146105b6578063a2309ff8146105d657600080fd5b80635a67de071461048f578063603f4d52146104af578063715018a6146104d65780637885fdc7146104eb57600080fd5b80632a55205a1161019b57806341f434341161016a57806341f43434146103b35780634a994eef146103ed5780634e1273f41461040d5780634f558e791461043a5780634f64b2be1461045c57600080fd5b80632a55205a1461031f5780632eb2c2d61461035e5780633ccfd60b1461037e57806341acc66a1461039357600080fd5b80630e89341c116101d75780630e89341c146102ad578063109e943f146102cd578063211f9e2f146102e7578063277acb711461030957600080fd5b8062fdd58e1461020857806301ffc9a71461023b57806306fdde031461026b578063077796271461028d575b600080fd5b34801561021457600080fd5b506102286102233660046127f3565b610711565b6040519081526020015b60405180910390f35b34801561024757600080fd5b5061025b610256366004612833565b6107aa565b6040519015158152602001610232565b34801561027757600080fd5b50610280610816565b6040516102329190612896565b34801561029957600080fd5b5061025b6102a83660046128a9565b6108a4565b3480156102b957600080fd5b506102806102c83660046128c4565b6108d1565b3480156102d957600080fd5b5060095461025b9060ff1681565b3480156102f357600080fd5b506103076103023660046128f6565b6109ae565b005b34801561031557600080fd5b5061022860055481565b34801561032b57600080fd5b5061033f61033a366004612913565b610a11565b604080516001600160a01b039093168352602083019190915201610232565b34801561036a57600080fd5b50610307610379366004612aa6565b610a55565b34801561038a57600080fd5b50610307610aa1565b34801561039f57600080fd5b506103076103ae366004612b61565b610b55565b3480156103bf57600080fd5b506103d56daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b039091168152602001610232565b3480156103f957600080fd5b50610307610408366004612ba4565b610bbb565b34801561041957600080fd5b5061042d610428366004612bdb565b610bee565b6040516102329190612ce0565b34801561044657600080fd5b5061025b6104553660046128c4565b600e541190565b34801561046857600080fd5b5061047c6104773660046128c4565b610d17565b6040516102329796959493929190612cf3565b34801561049b57600080fd5b506103076104aa366004612d59565b610e94565b3480156104bb57600080fd5b50600b546104c99060ff1681565b6040516102329190612d90565b3480156104e257600080fd5b50610307610f0b565b3480156104f757600080fd5b506007546040805180820190915260085461ffff80821683526201000090910416602082015261052e916001600160a01b03169082565b604080516001600160a01b039093168352815161ffff9081166020808601919091529092015190911690820152606001610232565b34801561056f57600080fd5b5061030761057e3660046128c4565b610f1f565b34801561058f57600080fd5b506003546001600160a01b03166103d5565b3480156105ad57600080fd5b50610280610f79565b3480156105c257600080fd5b506103076105d1366004612ba4565b610f86565b3480156105e257600080fd5b50610228600d5481565b3480156105f857600080fd5b50610307610607366004612dfc565b610fa6565b34801561061857600080fd5b50610307610627366004612e7e565b6110d5565b34801561063857600080fd5b506102286106473660046128c4565b61154e565b61030761065a366004612f6f565b6115ac565b34801561066b57600080fd5b5061025b61067a366004613008565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156106b457600080fd5b5061022860065481565b3480156106ca57600080fd5b506103076106d936600461303b565b611a92565b3480156106ea57600080fd5b506103076106f93660046128a9565b611ad7565b61030761070c366004612f6f565b611af3565b60006001600160a01b0383166107815760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b031982166301ffc9a760e01b14806107db57506001600160e01b03198216636cdb3d1360e11b145b806107f657506001600160e01b031982166303a24d0760e21b145b806107a457506001600160e01b0319821663152a902d60e11b1492915050565b600a80546108239061309f565b80601f016020809104026020016040519081016040528092919081815260200182805461084f9061309f565b801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b505050505081565b60006108ae611ca8565b506001600160a01b03811660009081526004602052604090205460ff165b919050565b60606108de82600e541190565b6108fa5760405162461bcd60e51b8152600401610778906130d9565b600e828154811061090d5761090d613120565b906000526020600020906003020160020180546109299061309f565b80601f01602080910402602001604051908101604052809291908181526020018280546109559061309f565b80156109a25780601f10610977576101008083540402835291602001916109a2565b820191906000526020600020905b81548152906001019060200180831161098557829003601f168201915b50505050509050919050565b3360009081526004602052604090205460ff166109de5760405163d3ce1c4960e01b815260040160405180910390fd5b333b156109fe57604051635d04968b60e11b815260040160405180910390fd5b6009805460ff1916911515919091179055565b6008546000908190819061ffff620100008204811691610a3291168661314c565b610a3c9190613163565b6007546001600160a01b031693509150505b9250929050565b6001600160a01b038516331480610a715750610a71853361067a565b610a8d5760405162461bcd60e51b815260040161077890613185565b610a9a8585858585611d02565b5050505050565b610aa9611ca8565b6000610abd6003546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610b07576040519150601f19603f3d011682016040523d82523d6000602084013e610b0c565b606091505b5050905080610b525760405162461bcd60e51b815260206004820152601260248201527121a19d102bb4ba34323930bb9032b93937b960711b6044820152606401610778565b50565b610b5d611ca8565b600780546001600160a01b0319166001600160a01b0385161790556040805180820190915261ffff80841680835290831660209092018290526008805463ffffffff191690911762010000909202919091179055505050565b505050565b610bc3611ca8565b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b60608151835114610c535760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610778565b600083516001600160401b03811115610c6e57610c6e612935565b604051908082528060200260200182016040528015610c97578160200160208202803683370190505b50905060005b8451811015610d0f57610ce2858281518110610cbb57610cbb613120565b6020026020010151858381518110610cd557610cd5613120565b6020026020010151610711565b828281518110610cf457610cf4613120565b6020908102919091010152610d08816131d3565b9050610c9d565b509392505050565b600e8181548110610d2757600080fd5b6000918252602090912060039091020180546001820180546001600160401b038084169550600160401b84041693600160801b840461ffff90811694600160901b810490911693600160a01b90910460ff1692610d839061309f565b80601f0160208091040260200160405190810160405280929190818152602001828054610daf9061309f565b8015610dfc5780601f10610dd157610100808354040283529160200191610dfc565b820191906000526020600020905b815481529060010190602001808311610ddf57829003601f168201915b505050505090806002018054610e119061309f565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3d9061309f565b8015610e8a5780601f10610e5f57610100808354040283529160200191610e8a565b820191906000526020600020905b815481529060010190602001808311610e6d57829003601f168201915b5050505050905087565b3360009081526004602052604090205460ff16610ec45760405163d3ce1c4960e01b815260040160405180910390fd5b333b15610ee457604051635d04968b60e11b815260040160405180910390fd5b600b805482919060ff19166001836003811115610f0357610f03612d7a565b021790555050565b610f13611ca8565b610f1d6000611eac565b565b3360009081526004602052604090205460ff16610f4f5760405163d3ce1c4960e01b815260040160405180910390fd5b333b15610f6f57604051635d04968b60e11b815260040160405180910390fd5b6005805460065555565b600c80546108239061309f565b600954829060ff1615610f9c57610f9c81611efe565b610bb68383611fb7565b3360009081526004602052604090205460ff16610fd65760405163d3ce1c4960e01b815260040160405180910390fd5b333b15610ff657604051635d04968b60e11b815260040160405180910390fd5b82811461103e5760405162461bcd60e51b815260206004820152601660248201527510d0ce88155b98985b185b98d959081c995c5d595cdd60521b6044820152606401610778565b60005b83811015610a9a5782828281811061105b5761105b613120565b905060200201602081019061107091906128f6565b600e86868481811061108457611084613120565b905060200201358154811061109b5761109b613120565b600091825260209091206003909102018054911515600160a01b0260ff60a01b199092169190911790556110ce816131d3565b9050611041565b3360009081526004602052604090205460ff166111055760405163d3ce1c4960e01b815260040160405180910390fd5b333b1561112557604051635d04968b60e11b815260040160405180910390fd5b600e548210806111365750600e5482145b6111795760405162461bcd60e51b815260206004820152601460248201527310d0ce88125b9d985b1a59081d1bdad95b881a5960621b6044820152606401610778565b600e54820361118f57600e805460010181556000525b6000600e83815481106111a4576111a4613120565b60009182526020918290206040805160e08101825260039390930290910180546001600160401b038082168552600160401b82041694840194909452600160801b840461ffff90811692840192909252600160901b84049091166060830152600160a01b90920460ff161515608082015260018201805491929160a08401919061122d9061309f565b80601f01602080910402602001604051908101604052809291908181526020018280546112599061309f565b80156112a65780601f1061127b576101008083540402835291602001916112a6565b820191906000526020600020905b81548152906001019060200180831161128957829003601f168201915b505050505081526020016002820180546112bf9061309f565b80601f01602080910402602001604051908101604052809291908181526020018280546112eb9061309f565b80156113385780601f1061130d57610100808354040283529160200191611338565b820191906000526020600020905b81548152906001019060200180831161131b57829003601f168201915b5050505050815250509050816060015161ffff16816040015161ffff1611156113be5760405162461bcd60e51b815260206004820152603260248201527f43433a2053706563696669656420737570706c79206973206c6f776572207468604482015271616e2063757272656e742062616c616e636560701b6064820152608401610778565b6040518060e0016040528083600001516001600160401b0316815260200183602001516001600160401b03168152602001826040015161ffff168152602001836060015161ffff1681526020018360800151151581526020018360a0015181526020018360c00151815250600e848154811061143c5761143c613120565b60009182526020918290208351600392909202018054928401516040850151606086015160808701516001600160401b039586166fffffffffffffffffffffffffffffffff1990971696909617600160401b95909316949094029190911763ffffffff60801b1916600160801b61ffff9283160261ffff60901b191617600160901b91909316029190911760ff60a01b1916600160a01b9215159290920291909117815560a082015160018201906114f49082613232565b5060c082015160028201906115099082613232565b50905050827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8360c001516040516115419190612896565b60405180910390a2505050565b600061155b82600e541190565b6115775760405162461bcd60e51b8152600401610778906130d9565b600e828154811061158a5761158a613120565b6000918252602090912060039091020154600160901b900461ffff1692915050565b8483146115f45760405162461bcd60e51b815260206004820152601660248201527510d0ce88155b98985b185b98d959081c995c5d595cdd60521b6044820152606401610778565b60006002600b5460ff16600381111561160f5761160f612d7a565b14611765576000600b5460ff16600381111561162d5761162d612d7a565b0361167a5760405162461bcd60e51b815260206004820152601860248201527f43433a20416c6c2073616c65732061726520636c6f73656400000000000000006044820152606401610778565b6040516bffffffffffffffffffffffff193360601b1660208201526000906034016040516020818303038152906040528051906020012090506116f081858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611fc692505050565b91506001600b5460ff16600381111561170b5761170b612d7a565b148015611716575081155b156117635760405162461bcd60e51b815260206004820152601e60248201527f43433a20416c6c6f776c6973742073616c65732061726520636c6f73656400006044820152606401610778565b505b6000805b878110156119bc57600089898381811061178557611785613120565b905060200201359050600e8054905081106117da5760405162461bcd60e51b815260206004820152601560248201527421a19d102737b732bc34b9ba30b73a103a37b5b2b760591b6044820152606401610778565b6000600e82815481106117ef576117ef613120565b600091825260209091206003909102018054909150600160a01b900460ff1661184f5760405162461bcd60e51b815260206004820152601260248201527110d0ce88151bdad95b88191a5cd8589b195960721b6044820152606401610778565b600089898581811061186357611863613120565b84546020909102929092013592505061ffff600160901b8204811691611892918491600160801b9004166132f1565b61ffff16106118e35760405162461bcd60e51b815260206004820152601e60248201527f43433a207472616e73616374696f6e206578636565647320737570706c7900006044820152606401610778565b8061ffff16600d60008282546118f99190613313565b909155505081548190839060109061191d908490600160801b900461ffff166132f1565b92506101000a81548161ffff021916908361ffff160217905550851561197857815461195e9061ffff831690600160401b90046001600160401b0316613326565b611971906001600160401b031686613313565b94506119a8565b81546119929061ffff8316906001600160401b0316613326565b6119a5906001600160401b031686613313565b94505b505050806119b5906131d3565b9050611769565b50803414611a0c5760405162461bcd60e51b815260206004820152601d60248201527f43433a2045746865722073656e74206973206e6f7420636f72726563740000006044820152606401610778565b611a883389898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092018290525060408051602081019091529081529250611fe9915050565b5050505050505050565b6001600160a01b038516331480611aae5750611aae853361067a565b611aca5760405162461bcd60e51b815260040161077890613185565b610a9a8585858585612143565b611adf611ca8565b611aea816001610bbb565b610b528161227b565b3360009081526004602052604090205460ff16611b235760405163d3ce1c4960e01b815260040160405180910390fd5b848314611b825760405162461bcd60e51b815260206004820152602760248201527f43433a204d7573742070726f7669646520657175616c206163636f756e747320604482015266616e642069647360c81b6064820152608401610778565b828114611be35760405162461bcd60e51b815260206004820152602960248201527f43433a204d7573742070726f7669646520657175616c2069647320616e64207160448201526875616e74697469657360b81b6064820152608401610778565b60005b83811015611c9f57828282818110611c0057611c00613120565b90506020020135600d6000828254611c189190613313565b90915550611c8f9050878783818110611c3357611c33613120565b9050602002016020810190611c4891906128a9565b868684818110611c5a57611c5a613120565b90506020020135858585818110611c7357611c73613120565b90506020020135604051806020016040528060008152506122f1565b611c98816131d3565b9050611be6565b50505050505050565b6003546001600160a01b03163314610f1d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610778565b8151835114611d235760405162461bcd60e51b815260040161077890613351565b6001600160a01b038416611d495760405162461bcd60e51b815260040161077890613399565b33611d588187878787876123d1565b60005b8451811015611e3e576000858281518110611d7857611d78613120565b602002602001015190506000858381518110611d9657611d96613120565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611de65760405162461bcd60e51b8152600401610778906133de565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e23908490613313565b9250508190555050505080611e37906131d3565b9050611d5b565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e8e929190613428565b60405180910390a4611ea4818787878787612401565b505050505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6daaeb6d7670e522a718067333cd4e3b15610b5257604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611f6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8f9190613456565b610b5257604051633b79c77360e21b81526001600160a01b0382166004820152602401610778565b611fc233838361255c565b5050565b6000611fd2838361263c565b80611fe25750611fe28383612653565b9392505050565b6001600160a01b03841661200f5760405162461bcd60e51b815260040161077890613473565b81518351146120305760405162461bcd60e51b815260040161077890613351565b33612040816000878787876123d1565b60005b84518110156120db5783818151811061205e5761205e613120565b602002602001015160008087848151811061207b5761207b613120565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546120c39190613313565b909155508190506120d3816131d3565b915050612043565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161212c929190613428565b60405180910390a4610a9a81600087878787612401565b6001600160a01b0384166121695760405162461bcd60e51b815260040161077890613399565b33600061217585612662565b9050600061218285612662565b90506121928389898585896123d1565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156121d35760405162461bcd60e51b8152600401610778906133de565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612210908490613313565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612270848a8a8a8a8a6126ad565b505050505050505050565b612283611ca8565b6001600160a01b0381166122e85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610778565b610b5281611eac565b6001600160a01b0384166123175760405162461bcd60e51b815260040161077890613473565b33600061232385612662565b9050600061233085612662565b9050612341836000898585896123d1565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290612371908490613313565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611c9f836000898989896126ad565b600954859060ff1680156123ee57506001600160a01b0381163314155b156123fc576123fc33611efe565b611c9f565b6001600160a01b0384163b15611ea45760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061244590899089908890889088906004016134b4565b6020604051808303816000875af1925050508015612480575060408051601f3d908101601f1916820190925261247d91810190613512565b60015b61252c5761248c61352f565b806308c379a0036124c557506124a061354b565b806124ab57506124c7565b8060405162461bcd60e51b81526004016107789190612896565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610778565b6001600160e01b0319811663bc197c8160e01b14611c9f5760405162461bcd60e51b8152600401610778906135d4565b816001600160a01b0316836001600160a01b0316036125cf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610778565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600060055461264b8385612768565b149392505050565b600060065461264b8385612768565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061269c5761269c613120565b602090810291909101015292915050565b6001600160a01b0384163b15611ea45760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126f1908990899088908890889060040161361c565b6020604051808303816000875af192505050801561272c575060408051601f3d908101601f1916820190925261272991810190613512565b60015b6127385761248c61352f565b6001600160e01b0319811663f23a6e6160e01b14611c9f5760405162461bcd60e51b8152600401610778906135d4565b600081815b8451811015610d0f576127998286838151811061278c5761278c613120565b60200260200101516127ad565b9150806127a5816131d3565b91505061276d565b60008183106127c9576000828152602084905260409020611fe2565b6000838152602083905260409020611fe2565b80356001600160a01b03811681146108cc57600080fd5b6000806040838503121561280657600080fd5b61280f836127dc565b946020939093013593505050565b6001600160e01b031981168114610b5257600080fd5b60006020828403121561284557600080fd5b8135611fe28161281d565b6000815180845260005b818110156128765760208185018101518683018201520161285a565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000611fe26020830184612850565b6000602082840312156128bb57600080fd5b611fe2826127dc565b6000602082840312156128d657600080fd5b5035919050565b8015158114610b5257600080fd5b80356108cc816128dd565b60006020828403121561290857600080fd5b8135611fe2816128dd565b6000806040838503121561292657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561297057612970612935565b6040525050565b60405160e081016001600160401b038111828210171561299957612999612935565b60405290565b60006001600160401b038211156129b8576129b8612935565b5060051b60200190565b600082601f8301126129d357600080fd5b813560206129e08261299f565b6040516129ed828261294b565b83815260059390931b8501820192828101915086841115612a0d57600080fd5b8286015b84811015612a285780358352918301918301612a11565b509695505050505050565b600082601f830112612a4457600080fd5b81356001600160401b03811115612a5d57612a5d612935565b604051612a74601f8301601f19166020018261294b565b818152846020838601011115612a8957600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215612abe57600080fd5b612ac7866127dc565b9450612ad5602087016127dc565b935060408601356001600160401b0380821115612af157600080fd5b612afd89838a016129c2565b94506060880135915080821115612b1357600080fd5b612b1f89838a016129c2565b93506080880135915080821115612b3557600080fd5b50612b4288828901612a33565b9150509295509295909350565b803561ffff811681146108cc57600080fd5b600080600060608486031215612b7657600080fd5b612b7f846127dc565b9250612b8d60208501612b4f565b9150612b9b60408501612b4f565b90509250925092565b60008060408385031215612bb757600080fd5b612bc0836127dc565b91506020830135612bd0816128dd565b809150509250929050565b60008060408385031215612bee57600080fd5b82356001600160401b0380821115612c0557600080fd5b818501915085601f830112612c1957600080fd5b81356020612c268261299f565b604051612c33828261294b565b83815260059390931b8501820192828101915089841115612c5357600080fd5b948201945b83861015612c7857612c69866127dc565b82529482019490820190612c58565b96505086013592505080821115612c8e57600080fd5b50612c9b858286016129c2565b9150509250929050565b600081518084526020808501945080840160005b83811015612cd557815187529582019590820190600101612cb9565b509495945050505050565b602081526000611fe26020830184612ca5565b6001600160401b0388811682528716602082015261ffff868116604083015285166060820152831515608082015260e060a08201819052600090612d3990830185612850565b82810360c0840152612d4b8185612850565b9a9950505050505050505050565b600060208284031215612d6b57600080fd5b813560048110611fe257600080fd5b634e487b7160e01b600052602160045260246000fd5b6020810160048310612db257634e487b7160e01b600052602160045260246000fd5b91905290565b60008083601f840112612dca57600080fd5b5081356001600160401b03811115612de157600080fd5b6020830191508360208260051b8501011115610a4e57600080fd5b60008060008060408587031215612e1257600080fd5b84356001600160401b0380821115612e2957600080fd5b612e3588838901612db8565b90965094506020870135915080821115612e4e57600080fd5b50612e5b87828801612db8565b95989497509550505050565b80356001600160401b03811681146108cc57600080fd5b60008060408385031215612e9157600080fd5b8235915060208301356001600160401b0380821115612eaf57600080fd5b9084019060e08287031215612ec357600080fd5b612ecb612977565b612ed483612e67565b8152612ee260208401612e67565b6020820152612ef360408401612b4f565b6040820152612f0460608401612b4f565b6060820152612f15608084016128eb565b608082015260a083013582811115612f2c57600080fd5b612f3888828601612a33565b60a08301525060c083013582811115612f5057600080fd5b612f5c88828601612a33565b60c0830152508093505050509250929050565b60008060008060008060608789031215612f8857600080fd5b86356001600160401b0380821115612f9f57600080fd5b612fab8a838b01612db8565b90985096506020890135915080821115612fc457600080fd5b612fd08a838b01612db8565b90965094506040890135915080821115612fe957600080fd5b50612ff689828a01612db8565b979a9699509497509295939492505050565b6000806040838503121561301b57600080fd5b613024836127dc565b9150613032602084016127dc565b90509250929050565b600080600080600060a0868803121561305357600080fd5b61305c866127dc565b945061306a602087016127dc565b9350604086013592506060860135915060808601356001600160401b0381111561309357600080fd5b612b4288828901612a33565b600181811c908216806130b357607f821691505b6020821081036130d357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526027908201527f43433a2053706563696669656420746f6b656e202869642920646f6573206e6f6040820152661d08195e1a5cdd60ca1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107a4576107a4613136565b60008261318057634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6000600182016131e5576131e5613136565b5060010190565b601f821115610bb657600081815260208120601f850160051c810160208610156132135750805b601f850160051c820191505b81811015611ea45782815560010161321f565b81516001600160401b0381111561324b5761324b612935565b61325f81613259845461309f565b846131ec565b602080601f831160018114613294576000841561327c5750858301515b600019600386901b1c1916600185901b178555611ea4565b600085815260208120601f198616915b828110156132c3578886015182559484019460019091019084016132a4565b50858210156132e15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61ffff81811683821601908082111561330c5761330c613136565b5092915050565b808201808211156107a4576107a4613136565b6001600160401b0381811683821602808216919082811461334957613349613136565b505092915050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60408152600061343b6040830185612ca5565b828103602084015261344d8185612ca5565b95945050505050565b60006020828403121561346857600080fd5b8151611fe2816128dd565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906134e090830186612ca5565b82810360608401526134f28186612ca5565b905082810360808401526135068185612850565b98975050505050505050565b60006020828403121561352457600080fd5b8151611fe28161281d565b600060033d11156135485760046000803e5060005160e01c5b90565b600060443d10156135595790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561358857505050505090565b82850191508151818111156135a05750505050505090565b843d87010160208285010111156135ba5750505050505090565b6135c96020828601018761294b565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061365690830184612850565b97965050505050505056fea2646970667358221220ba4a0b7ad31cfedc665af947034f0b2a888de14b816688931b1e21d01c25b47564736f6c63430008130033
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.