ERC-721
Overview
Max Total Supply
999 ADT
Holders
426
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 ADTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ADTrainers
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT /* -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -- -- - -- - -- - -- - -- - -- - -- - -- - ______ __ __ ______ __ __ _____ ______ __ __ __ ______ __ __ - - /\ __ \ /\ "-.\ \ /\ ___\ /\ \/ / /\ __-. /\ __ \ /\ "-./ \ /\ \ /\ __ \ /\ "-.\ \ - - \ \ __ \ \ \ \-. \ \ \ __\ \ \ _"-. \ \ \/\ \ \ \ __ \ \ \ \-./\ \ \ \ \ \ \ __ \ \ \ \-. \ - - \ \_\ \_\ \ \_\\"\_\ \ \_____\ \ \_\ \_\ \ \____- \ \_\ \_\ \ \_\ \ \_\ \ \_\ \ \_\ \_\ \ \_\\"\_\ - - \/_/\/_/ \/_/ \/_/ \/_____/ \/_/\/_/ \/____/ \/_/\/_/ \/_/ \/_/ \/_/ \/_/\/_/ \/_/ \/_/ - - - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -- -- - -- - -- - -- - -- - -- - -- - -- */ pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract ADTrainers is ERC721A, Ownable { address public adBoosterPackAddress; uint256 public constant MAX_SUPPLY = 7770; bool public revealed; // URI settings string public baseTokenURI; string public placeholderURI; // These proxy address will be approved to interact // with ADTrainers for future staking and gaming features mapping(address => bool) public proxyToApprove; constructor( address _adBoosterPackAddress, string memory _name, string memory _symbol ) ERC721A(_name, _symbol) { adBoosterPackAddress = _adBoosterPackAddress; } // ============ ACCESS CONTROL/SANITY MODIFIERS ============ modifier callerIsADBoosterPack() { require( msg.sender == adBoosterPackAddress, "Caller is not ADBoosterPack contract" ); _; } // ============ PUBLIC FUNCTIONS FOR MINTING ============ /** * @dev Generic mint function to be called by the ADBoosterPacks contract for both * whitelist and public sales. * Can only be called by the ADBoosterPacks contract. */ function mint(uint256 _quantity, address _to) external callerIsADBoosterPack { require( totalSupply() + _quantity <= MAX_SUPPLY, "Max supply has been reached" ); _safeMint(_to, _quantity); } // ============ PUBLIC READ-ONLY FUNCTIONS ============ function tokenURI(uint256 _id) public view virtual override returns (string memory) { require(_exists(_id), "Nonexistent token"); return revealed ? super.tokenURI(_id) : placeholderURI; } function numberMinted(address _owner) public view returns (uint256) { return _numberMinted(_owner); } function tokensOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensIds = new uint256[](tokenCount); for (uint256 i; i < tokenCount; i++) { tokensIds[i] = tokenOfOwnerByIndex(_owner, i); } return tokensIds; } function _baseURI() internal view virtual override returns (string memory) { return baseTokenURI; } function isApprovedForAll(address _owner, address _operator) public view override returns (bool) { if (proxyToApprove[_operator]) { return true; } return super.isApprovedForAll(_owner, _operator); } // ============ OWNER-ONLY ADMIN FUNCTIONS ============ function setADBoosterPackAddress(address _adBoosterPackAddress) external onlyOwner { adBoosterPackAddress = _adBoosterPackAddress; } function setBaseURI(string calldata _URI) external onlyOwner { baseTokenURI = _URI; } function setPlaceholderURI(string memory _URI) external onlyOwner { placeholderURI = _URI; } function flipRevealed() external onlyOwner { revealed = !revealed; } function flipProxyState(address _proxyAddress) external onlyOwner { proxyToApprove[_proxyAddress] = !proxyToApprove[_proxyAddress]; } }
//SPDX-License-Identifier: MIT /* -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -- -- - -- - -- - -- - -- - -- - -- - -- - ______ __ __ ______ __ __ _____ ______ __ __ __ ______ __ __ - - /\ __ \ /\ "-.\ \ /\ ___\ /\ \/ / /\ __-. /\ __ \ /\ "-./ \ /\ \ /\ __ \ /\ "-.\ \ - - \ \ __ \ \ \ \-. \ \ \ __\ \ \ _"-. \ \ \/\ \ \ \ __ \ \ \ \-./\ \ \ \ \ \ \ __ \ \ \ \-. \ - - \ \_\ \_\ \ \_\\"\_\ \ \_____\ \ \_\ \_\ \ \____- \ \_\ \_\ \ \_\ \ \_\ \ \_\ \ \_\ \_\ \ \_\\"\_\ - - \/_/\/_/ \/_/ \/_/ \/_____/ \/_/\/_/ \/____/ \/_/\/_/ \/_/ \/_/ \/_/ \/_/\/_/ \/_/ \/_/ - - - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -- -- - -- - -- - -- - -- - -- - -- - -- */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; interface IADToken { function mint(uint256, address) external; } contract ADBoosterPacks is Ownable, ReentrancyGuard { IADToken private adTrainers; IADToken private adElementals; address public signerAddress; uint256 public constant tokenPrice = 0.0777 ether; uint256 public constant MAX_SUPPLY = 7770; uint256 public constant MAX_RESERVED = 100; uint256 public totalSupply = 0; uint256 public publicMintPerTxLimit = 2; uint256 public reserved; bool public allowListMintActive; bool public publicMintActive; mapping(address => uint256) public presaleMinted; modifier callerIsUser() { require(msg.sender == tx.origin, "Failed EOA check"); _; } // ============ OWNER-ONLY ADMIN FUNCTIONS ============ function setTokenAddresses( address _adElementalAddress, address _adTrainerAddress ) external onlyOwner { adElementals = IADToken(_adElementalAddress); adTrainers = IADToken(_adTrainerAddress); } function setPublicMintPerTxLimit(uint256 _limit) external onlyOwner { publicMintPerTxLimit = _limit; } function setPublicMintActive(bool val) public onlyOwner { publicMintActive = val; } function setAllowListMintActive(bool val) public onlyOwner { allowListMintActive = val; } function setSignerAddress(address _signerAddress) external onlyOwner { signerAddress = _signerAddress; } function withdrawAll() public onlyOwner nonReentrant { uint256 balance = address(this).balance; require(balance > 0); _widthdraw(owner(), address(this).balance); } function _widthdraw(address _address, uint256 _amount) private { (bool success, ) = _address.call{value: _amount}(""); require(success, "Transfer failed"); } // ============ PUBLIC FUNCTIONS FOR MINTING ============ function mintPublic(uint256 _amount) external payable callerIsUser nonReentrant { require(publicMintActive, "Public mint has not started"); require( _amount <= publicMintPerTxLimit, "Exceeded public mint per tx limit" ); unchecked { uint256 supply = totalSupply; require(supply + _amount <= MAX_SUPPLY, "Exceeded max supply"); totalSupply = supply + _amount; require(msg.value == _amount * tokenPrice, "Invalid amount of ETH"); } _mint(_amount, msg.sender); } function mintAllowList( uint256 _amount, bytes memory _signature, uint256 _eligibleAmount ) external payable callerIsUser nonReentrant { require(allowListMintActive, "Allowlist mint has not started"); require( verifySignature( keccak256(abi.encodePacked(msg.sender, _eligibleAmount)), _signature ), "Invalid signature" ); require( _amount <= _eligibleAmount, "Mint amount exceeds eligible amount" ); unchecked { uint256 minted = presaleMinted[msg.sender]; require( minted + _amount <= _eligibleAmount, "Exceeded alowlist mint limit" ); presaleMinted[msg.sender] = minted + _amount; uint256 supply = totalSupply; require(supply + _amount <= MAX_SUPPLY, "Exceeded max supply"); totalSupply = supply + _amount; require(msg.value == _amount * tokenPrice, "Invalid amount of ETH"); } _mint(_amount, msg.sender); } function reserve(uint256 _amount, address _to) external nonReentrant onlyOwner { unchecked { require( reserved + _amount <= MAX_RESERVED, "Exceeds maximum number of reserved tokens" ); require(totalSupply + _amount <= MAX_SUPPLY, "Insufficient supply"); totalSupply += _amount; reserved += _amount; } _mint(_amount, _to); } // ============ INTERNAL UTIL FUNCTIONS ============ function _mint(uint256 _amount, address _to) private { adTrainers.mint(_amount, _to); adElementals.mint(_amount, _to); } function verifySignature(bytes32 _hash, bytes memory _signature) internal view returns (bool) { address recoveredAddress = ECDSA.recover( ECDSA.toEthSignedMessageHash(_hash), _signature ); return (recoveredAddress != address(0) && recoveredAddress == signerAddress); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Does not support burning tokens to address(0). * * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return currentIndex; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { require(index < totalSupply(), 'ERC721A: global index out of bounds'); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { require(index < balanceOf(owner), 'ERC721A: owner index out of bounds'); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx; address currOwnershipAddr; // Counter overflow is impossible as the loop breaks when uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } revert('ERC721A: unable to get token of owner by index'); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), 'ERC721A: balance query for the zero address'); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require(owner != address(0), 'ERC721A: number minted query for the zero address'); return uint256(_addressData[owner].numberMinted); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { require(_exists(tokenId), 'ERC721A: owner query for nonexistent token'); unchecked { for (uint256 curr = tokenId; curr >= 0; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } revert('ERC721A: unable to determine the owner of token'); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token'); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); require(to != owner, 'ERC721A: approval to current owner'); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), 'ERC721A: approve caller is not owner nor approved for all' ); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), 'ERC721A: approved query for nonexistent token'); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { require(operator != _msgSender(), 'ERC721A: approve to caller'); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), 'ERC721A: transfer to non ERC721Receiver implementer' ); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < currentIndex; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = currentIndex; require(to != address(0), 'ERC721A: mint to the zero address'); require(quantity != 0, 'ERC721A: quantity must be greater than 0'); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 // updatedIndex overflows if currentIndex + quantity > 1.56e77 (2**256) - 1 unchecked { _addressData[to].balance += uint128(quantity); _addressData[to].numberMinted += uint128(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if (safe) { require( _checkOnERC721Received(address(0), to, updatedIndex, _data), 'ERC721A: transfer to non ERC721Receiver implementer' ); } updatedIndex++; } currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); require(isApprovedOrOwner, 'ERC721A: transfer caller is not owner nor approved'); require(prevOwnership.addr == from, 'ERC721A: transfer from incorrect owner'); require(to != address(0), 'ERC721A: transfer to the zero address'); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert('ERC721A: transfer to non ERC721Receiver implementer'); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 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 (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. 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. 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 v4.4.1 (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: balance query for the zero address"); 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 owner nor 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: transfer caller is not owner nor 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(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), 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); _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); _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(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * 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); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * 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(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); 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); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * 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); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "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 `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 _beforeTokenTransfer( 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 v4.4.1 (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 be 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 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 v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT /* -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -- -- - -- - -- - -- - -- - -- - -- - -- - ______ __ __ ______ __ __ _____ ______ __ __ __ ______ __ __ - - /\ __ \ /\ "-.\ \ /\ ___\ /\ \/ / /\ __-. /\ __ \ /\ "-./ \ /\ \ /\ __ \ /\ "-.\ \ - - \ \ __ \ \ \ \-. \ \ \ __\ \ \ _"-. \ \ \/\ \ \ \ __ \ \ \ \-./\ \ \ \ \ \ \ __ \ \ \ \-. \ - - \ \_\ \_\ \ \_\\"\_\ \ \_____\ \ \_\ \_\ \ \____- \ \_\ \_\ \ \_\ \ \_\ \ \_\ \ \_\ \_\ \ \_\\"\_\ - - \/_/\/_/ \/_/ \/_/ \/_____/ \/_/\/_/ \/____/ \/_/\/_/ \/_/ \/_/ \/_/ \/_/\/_/ \/_/ \/_/ - - - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- -- -- - -- - -- - -- - -- - -- - -- - -- */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface IADRandomizer { function rand(address) external view returns (uint256); } contract ADElementals is ERC1155Supply, ERC1155Burnable, Ownable { using Strings for uint256; // Token IDs uint256 public constant GRASS = 0; uint256 public constant WATER = 1; uint256 public constant FIRE = 2; uint256 public constant PSYCHIC = 3; uint256 public constant SPECIAL = 4; uint256 public constant ELEMENTALS_PER_BATCH = 3; string private name_; string private symbol_; address public adBoosterPackAddress; address private adRandomizerAddress; IADRandomizer adRandomizer; // ============ ACCESS CONTROL/SANITY MODIFIERS ============ modifier callerIsADBoosterPack() { require( msg.sender == adBoosterPackAddress, "Caller is not ADBoosterPack contract" ); _; } constructor( address _adBoosterPackAddress, address _adRandomizerAddress, string memory _name, string memory _symbol, string memory _uri ) ERC1155(_uri) { adBoosterPackAddress = _adBoosterPackAddress; adRandomizer = IADRandomizer(_adRandomizerAddress); name_ = _name; symbol_ = _symbol; } // ============ PUBLIC FUNCTIONS FOR MINTING ============ /** * @dev Generic mint function to be called by the ADBoosterPacks contract for both * whitelist and public sales. * Can only be called by the ADBoosterPacks contract. * Probability of minting each Elemental card: * - special 3% * - psychic 12% * - fire 15% * - water 30% * - grass 40% */ function mint(uint256 _batch, address _to) external callerIsADBoosterPack { unchecked { uint256 numElementals = _batch * ELEMENTALS_PER_BATCH; uint256[] memory randomValues = expandRandomness( rand(_to), numElementals ); for (uint256 i = 0; i < numElementals; i++) { uint256 rarityScore = randomValues[i] % 100; if (rarityScore < 40) { _mint(_to, GRASS, 1, ""); } else if (rarityScore < 70) { _mint(_to, WATER, 1, ""); } else if (rarityScore < 85) { _mint(_to, FIRE, 1, ""); } else if (rarityScore < 97) { _mint(_to, PSYCHIC, 1, ""); } else { _mint(_to, SPECIAL, 1, ""); } } } } // ============ PUBLIC READ-ONLY FUNCTIONS ============ function name() public view returns (string memory) { return name_; } function symbol() public view returns (string memory) { return symbol_; } function uri(uint256 _id) public view override returns (string memory) { require(exists(_id), "Nonexistent token"); return string(abi.encodePacked(super.uri(_id), _id.toString())); } // ============ INTERNAL UTIL FUNCTIONS ============ function expandRandomness(uint256 randomValue, uint256 n) internal pure returns (uint256[] memory expandedValues) { expandedValues = new uint256[](n); for (uint256 i = 0; i < n; i++) { expandedValues[i] = uint256(keccak256(abi.encode(randomValue, i))); } return expandedValues; } function rand(address _to) internal view returns (uint256 randomValue) { randomValue = adRandomizer.rand(_to); } // ============ OWNER-ONLY ADMIN FUNCTIONS ============ function setADBoosterPackAddress(address _adBoosterPackAddress) external onlyOwner { adBoosterPackAddress = _adBoosterPackAddress; } function setADRandomizerAddress(address _adRandomizerAddress) external onlyOwner { adRandomizerAddress = _adRandomizerAddress; } function setBaseURI(string memory _baseURI) external onlyOwner { _setURI(_baseURI); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_adBoosterPackAddress","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adBoosterPackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_proxyAddress","type":"address"}],"name":"flipProxyState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"placeholderURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"proxyToApprove","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adBoosterPackAddress","type":"address"}],"name":"setADBoosterPackAddress","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":"string","name":"_URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPlaceholderURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200266438038062002664833981016040819052620000349162000257565b8151829082906200004d906001906020850190620000fe565b50805162000063906002906020840190620000fe565b505050620000806200007a620000a860201b60201c565b620000ac565b5050600880546001600160a01b0319166001600160a01b039290921691909117905562000330565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200010c90620002dd565b90600052602060002090601f0160209004810192826200013057600085556200017b565b82601f106200014b57805160ff19168380011785556200017b565b828001600101855582156200017b579182015b828111156200017b5782518255916020019190600101906200015e565b50620001899291506200018d565b5090565b5b808211156200018957600081556001016200018e565b600082601f830112620001b5578081fd5b81516001600160401b0380821115620001d257620001d26200031a565b604051601f8301601f19908116603f01168101908282118183101715620001fd57620001fd6200031a565b8160405283815260209250868385880101111562000219578485fd5b8491505b838210156200023c57858201830151818301840152908201906200021d565b838211156200024d57848385830101525b9695505050505050565b6000806000606084860312156200026c578283fd5b83516001600160a01b038116811462000283578384fd5b60208501519093506001600160401b0380821115620002a0578384fd5b620002ae87838801620001a4565b93506040860151915080821115620002c4578283fd5b50620002d386828701620001a4565b9150509250925092565b600181811c90821680620002f257607f821691505b602082108114156200031457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61232480620003406000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a578063b88d4fde116100ad578063dc33e6811161007c578063dc33e6811461041f578063dd64dcb014610432578063e985e9c514610445578063f2fde38b14610458578063f73c814b1461046b57600080fd5b8063b88d4fde146103ce578063c87b56dd146103e1578063cb65340d146103f4578063d547cfb71461041757600080fd5b80638da5cb5b116100e95780638da5cb5b1461038f57806394bf804d146103a057806395d89b41146103b3578063a22cb465146103bb57600080fd5b806370a082311461034c578063715018a61461035f5780637313cba9146103675780638462151c1461036f57600080fd5b80633574a2dd11610192578063518302271161016157806351830227146102ff578063551b1ff91461031357806355f804b3146103265780636352211e1461033957600080fd5b80633574a2dd146102be5780633b2c3fb6146102d157806342842e0e146102d95780634f6ccce7146102ec57600080fd5b806318160ddd116101ce57806318160ddd1461027d57806323b872dd1461028f5780632f745c59146102a257806332cb6b0c146102b557600080fd5b806301ffc9a71461020057806306fdde0314610228578063081812fc1461023d578063095ea7b314610268575b600080fd5b61021361020e366004611f8a565b61047e565b60405190151581526020015b60405180910390f35b6102306104eb565b60405161021f919061218a565b61025061024b366004612075565b61057d565b6040516001600160a01b03909116815260200161021f565b61027b610276366004611f61565b61060d565b005b6000545b60405190815260200161021f565b61027b61029d366004611e73565b610725565b6102816102b0366004611f61565b610730565b610281611e5a81565b61027b6102cc36600461202f565b61089c565b61027b6108fb565b61027b6102e7366004611e73565b610964565b6102816102fa366004612075565b61097f565b60085461021390600160a01b900460ff1681565b600854610250906001600160a01b031681565b61027b610334366004611fc2565b6109e1565b610250610347366004612075565b610a35565b61028161035a366004611e27565b610a47565b61027b610ad8565b610230610b2c565b61038261037d366004611e27565b610bba565b60405161021f9190612146565b6007546001600160a01b0316610250565b61027b6103ae36600461208d565b610c78565b610230610d4d565b61027b6103c9366004611f27565b610d5c565b61027b6103dc366004611eae565b610e21565b6102306103ef366004612075565b610ea6565b610213610402366004611e27565b600b6020526000908152604090205460ff1681565b610230610fa9565b61028161042d366004611e27565b610fb6565b61027b610440366004611e27565b610fc1565b610213610453366004611e41565b61102b565b61027b610466366004611e27565b611085565b61027b610479366004611e27565b61113e565b60006001600160e01b031982166380ac58cd60e01b14806104af57506001600160e01b03198216635b5e139f60e01b145b806104ca57506001600160e01b0319821663780e9d6360e01b145b806104e557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600180546104fa9061220c565b80601f01602080910402602001604051908101604052809291908181526020018280546105269061220c565b80156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b5050505050905090565b600061058a826000541190565b6105f15760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061061882610a35565b9050806001600160a01b0316836001600160a01b031614156106875760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b60648201526084016105e8565b336001600160a01b03821614806106a357506106a3813361102b565b6107155760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c0000000000000060648201526084016105e8565b6107208383836111af565b505050565b61072083838361120b565b600061073b83610a47565b82106107945760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016105e8565b600080549080805b8381101561082d576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff1691830191909152156107ef57805192505b876001600160a01b0316836001600160a01b03161415610824578684141561081d575093506104e592505050565b6001909301925b5060010161079c565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201527f6f776e657220627920696e64657800000000000000000000000000000000000060648201526084016105e8565b6007546001600160a01b031633146108e45760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b80516108f790600a906020840190611c8c565b5050565b6007546001600160a01b031633146109435760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b6008805460ff60a01b198116600160a01b9182900460ff1615909102179055565b61072083838360405180602001604052806000815250610e21565b6000805482106109dd5760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b60648201526084016105e8565b5090565b6007546001600160a01b03163314610a295760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b61072060098383611d0c565b6000610a4082611504565b5192915050565b60006001600160a01b038216610ab35760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016105e8565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b6007546001600160a01b03163314610b205760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b610b2a60006115db565b565b600a8054610b399061220c565b80601f0160208091040260200160405190810160405280929190818152602001828054610b659061220c565b8015610bb25780601f10610b8757610100808354040283529160200191610bb2565b820191906000526020600020905b815481529060010190602001808311610b9557829003601f168201915b505050505081565b60606000610bc783610a47565b905060008167ffffffffffffffff811115610bf257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c1b578160200160208202803683370190505b50905060005b82811015610c7057610c338582610730565b828281518110610c5357634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610c6881612247565b915050610c21565b509392505050565b6008546001600160a01b03163314610cde5760405162461bcd60e51b8152602060048201526024808201527f43616c6c6572206973206e6f74204144426f6f737465725061636b20636f6e746044820152631c9858dd60e21b60648201526084016105e8565b611e5a82610ceb60005490565b610cf5919061219d565b1115610d435760405162461bcd60e51b815260206004820152601b60248201527f4d617820737570706c7920686173206265656e2072656163686564000000000060448201526064016105e8565b6108f7818361162d565b6060600280546104fa9061220c565b6001600160a01b038216331415610db55760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c657200000000000060448201526064016105e8565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e2c84848461120b565b610e3884848484611647565b610ea05760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b60648201526084016105e8565b50505050565b6060610eb3826000541190565b610eff5760405162461bcd60e51b815260206004820152601160248201527f4e6f6e6578697374656e7420746f6b656e00000000000000000000000000000060448201526064016105e8565b600854600160a01b900460ff16610fa057600a8054610f1d9061220c565b80601f0160208091040260200160405190810160405280929190818152602001828054610f499061220c565b8015610f965780601f10610f6b57610100808354040283529160200191610f96565b820191906000526020600020905b815481529060010190602001808311610f7957829003601f168201915b50505050506104e5565b6104e5826117a1565b60098054610b399061220c565b60006104e58261187c565b6007546001600160a01b031633146110095760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600b602052604081205460ff1615611054575060016104e5565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff165b9392505050565b6007546001600160a01b031633146110cd5760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b6001600160a01b0381166111325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e8565b61113b816115db565b50565b6007546001600160a01b031633146111865760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b6001600160a01b03166000908152600b60205260409020805460ff19811660ff90911615179055565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061121682611504565b80519091506000906001600160a01b0316336001600160a01b0316148061124d5750336112428461057d565b6001600160a01b0316145b8061125f5750815161125f903361102b565b9050806112d45760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016105e8565b846001600160a01b031682600001516001600160a01b0316146113485760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b60648201526084016105e8565b6001600160a01b0384166113ac5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016105e8565b6113bc60008484600001516111af565b6001600160a01b03858116600090815260046020908152604080832080546fffffffffffffffffffffffffffffffff198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600390935281842080546001600160e01b031916909117600160a01b4267ffffffffffffffff16021790559086018083529120549091166114ba5761146d816000541190565b156114ba578251600082815260036020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b6040805180820190915260008082526020820152611523826000541190565b6115825760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016105e8565b815b6000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff1691830191909152156115d1579392505050565b5060001901611584565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6108f7828260405180602001604052806000815250611926565b60006001600160a01b0384163b1561179557604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061168b90339089908890889060040161210a565b602060405180830381600087803b1580156116a557600080fd5b505af19250505080156116d5575060408051601f3d908101601f191682019092526116d291810190611fa6565b60015b61177b573d808015611703576040519150601f19603f3d011682016040523d82523d6000602084013e611708565b606091505b5080516117735760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b60648201526084016105e8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611799565b5060015b949350505050565b60606117ae826000541190565b6118205760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016105e8565b600061182a611933565b905080516000141561184b576040518060200160405280600081525061107e565b8061185584611942565b6040516020016118669291906120db565b6040516020818303038152906040529392505050565b60006001600160a01b0382166118fa5760405162461bcd60e51b815260206004820152603160248201527f455243373231413a206e756d626572206d696e74656420717565727920666f7260448201527f20746865207a65726f206164647265737300000000000000000000000000000060648201526084016105e8565b506001600160a01b0316600090815260046020526040902054600160801b90046001600160801b031690565b6107208383836001611a74565b6060600980546104fa9061220c565b6060816119665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611990578061197a81612247565b91506119899050600a836121b5565b915061196a565b60008167ffffffffffffffff8111156119b957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156119e3576020820181803683370190505b5090505b8415611799576119f86001836121c9565b9150611a05600a86612262565b611a1090603061219d565b60f81b818381518110611a3357634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a6d600a866121b5565b94506119e7565b6000546001600160a01b038516611ad75760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016105e8565b83611b355760405162461bcd60e51b815260206004820152602860248201527f455243373231413a207175616e74697479206d75737420626520677265617465604482015267072207468616e20360c41b60648201526084016105e8565b6001600160a01b03851660008181526004602090815260408083208054600160801b6fffffffffffffffffffffffffffffffff1982166001600160801b039283168c01831690811782900483168c01909216021790558483526003909152812080546001600160e01b031916909217600160a01b4267ffffffffffffffff16021790915581905b85811015611c835760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48315611c7757611c0f6000888488611647565b611c775760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b60648201526084016105e8565b60019182019101611bbc565b506000556114fd565b828054611c989061220c565b90600052602060002090601f016020900481019282611cba5760008555611d00565b82601f10611cd357805160ff1916838001178555611d00565b82800160010185558215611d00579182015b82811115611d00578251825591602001919060010190611ce5565b506109dd929150611d80565b828054611d189061220c565b90600052602060002090601f016020900481019282611d3a5760008555611d00565b82601f10611d535782800160ff19823516178555611d00565b82800160010185558215611d00579182015b82811115611d00578235825591602001919060010190611d65565b5b808211156109dd5760008155600101611d81565b600067ffffffffffffffff80841115611db057611db06122a2565b604051601f8501601f19908116603f01168101908282118183101715611dd857611dd86122a2565b81604052809350858152868686011115611df157600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114611e2257600080fd5b919050565b600060208284031215611e38578081fd5b61107e82611e0b565b60008060408385031215611e53578081fd5b611e5c83611e0b565b9150611e6a60208401611e0b565b90509250929050565b600080600060608486031215611e87578081fd5b611e9084611e0b565b9250611e9e60208501611e0b565b9150604084013590509250925092565b60008060008060808587031215611ec3578081fd5b611ecc85611e0b565b9350611eda60208601611e0b565b925060408501359150606085013567ffffffffffffffff811115611efc578182fd5b8501601f81018713611f0c578182fd5b611f1b87823560208401611d95565b91505092959194509250565b60008060408385031215611f39578182fd5b611f4283611e0b565b915060208301358015158114611f56578182fd5b809150509250929050565b60008060408385031215611f73578182fd5b611f7c83611e0b565b946020939093013593505050565b600060208284031215611f9b578081fd5b813561107e816122b8565b600060208284031215611fb7578081fd5b815161107e816122b8565b60008060208385031215611fd4578182fd5b823567ffffffffffffffff80821115611feb578384fd5b818501915085601f830112611ffe578384fd5b81358181111561200c578485fd5b86602082850101111561201d578485fd5b60209290920196919550909350505050565b600060208284031215612040578081fd5b813567ffffffffffffffff811115612056578182fd5b8201601f81018413612066578182fd5b61179984823560208401611d95565b600060208284031215612086578081fd5b5035919050565b6000806040838503121561209f578182fd5b82359150611e6a60208401611e0b565b600081518084526120c78160208601602086016121e0565b601f01601f19169290920160200192915050565b600083516120ed8184602088016121e0565b8351908301906121018183602088016121e0565b01949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261213c60808301846120af565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561217e57835183529284019291840191600101612162565b50909695505050505050565b60208152600061107e60208301846120af565b600082198211156121b0576121b0612276565b500190565b6000826121c4576121c461228c565b500490565b6000828210156121db576121db612276565b500390565b60005b838110156121fb5781810151838201526020016121e3565b83811115610ea05750506000910152565b600181811c9082168061222057607f821691505b6020821081141561224157634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561225b5761225b612276565b5060010190565b6000826122715761227161228c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461113b57600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220b36807b071423bdcaed084e015f9a3c90643882e852512ffe25a9b1737cf255464736f6c634300080400330000000000000000000000004e57a7ce50336fa69c25c86d32d541ae0b9fb235000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000a4144547261696e6572730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034144540000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a578063b88d4fde116100ad578063dc33e6811161007c578063dc33e6811461041f578063dd64dcb014610432578063e985e9c514610445578063f2fde38b14610458578063f73c814b1461046b57600080fd5b8063b88d4fde146103ce578063c87b56dd146103e1578063cb65340d146103f4578063d547cfb71461041757600080fd5b80638da5cb5b116100e95780638da5cb5b1461038f57806394bf804d146103a057806395d89b41146103b3578063a22cb465146103bb57600080fd5b806370a082311461034c578063715018a61461035f5780637313cba9146103675780638462151c1461036f57600080fd5b80633574a2dd11610192578063518302271161016157806351830227146102ff578063551b1ff91461031357806355f804b3146103265780636352211e1461033957600080fd5b80633574a2dd146102be5780633b2c3fb6146102d157806342842e0e146102d95780634f6ccce7146102ec57600080fd5b806318160ddd116101ce57806318160ddd1461027d57806323b872dd1461028f5780632f745c59146102a257806332cb6b0c146102b557600080fd5b806301ffc9a71461020057806306fdde0314610228578063081812fc1461023d578063095ea7b314610268575b600080fd5b61021361020e366004611f8a565b61047e565b60405190151581526020015b60405180910390f35b6102306104eb565b60405161021f919061218a565b61025061024b366004612075565b61057d565b6040516001600160a01b03909116815260200161021f565b61027b610276366004611f61565b61060d565b005b6000545b60405190815260200161021f565b61027b61029d366004611e73565b610725565b6102816102b0366004611f61565b610730565b610281611e5a81565b61027b6102cc36600461202f565b61089c565b61027b6108fb565b61027b6102e7366004611e73565b610964565b6102816102fa366004612075565b61097f565b60085461021390600160a01b900460ff1681565b600854610250906001600160a01b031681565b61027b610334366004611fc2565b6109e1565b610250610347366004612075565b610a35565b61028161035a366004611e27565b610a47565b61027b610ad8565b610230610b2c565b61038261037d366004611e27565b610bba565b60405161021f9190612146565b6007546001600160a01b0316610250565b61027b6103ae36600461208d565b610c78565b610230610d4d565b61027b6103c9366004611f27565b610d5c565b61027b6103dc366004611eae565b610e21565b6102306103ef366004612075565b610ea6565b610213610402366004611e27565b600b6020526000908152604090205460ff1681565b610230610fa9565b61028161042d366004611e27565b610fb6565b61027b610440366004611e27565b610fc1565b610213610453366004611e41565b61102b565b61027b610466366004611e27565b611085565b61027b610479366004611e27565b61113e565b60006001600160e01b031982166380ac58cd60e01b14806104af57506001600160e01b03198216635b5e139f60e01b145b806104ca57506001600160e01b0319821663780e9d6360e01b145b806104e557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600180546104fa9061220c565b80601f01602080910402602001604051908101604052809291908181526020018280546105269061220c565b80156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b5050505050905090565b600061058a826000541190565b6105f15760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061061882610a35565b9050806001600160a01b0316836001600160a01b031614156106875760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b60648201526084016105e8565b336001600160a01b03821614806106a357506106a3813361102b565b6107155760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c0000000000000060648201526084016105e8565b6107208383836111af565b505050565b61072083838361120b565b600061073b83610a47565b82106107945760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016105e8565b600080549080805b8381101561082d576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff1691830191909152156107ef57805192505b876001600160a01b0316836001600160a01b03161415610824578684141561081d575093506104e592505050565b6001909301925b5060010161079c565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201527f6f776e657220627920696e64657800000000000000000000000000000000000060648201526084016105e8565b6007546001600160a01b031633146108e45760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b80516108f790600a906020840190611c8c565b5050565b6007546001600160a01b031633146109435760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b6008805460ff60a01b198116600160a01b9182900460ff1615909102179055565b61072083838360405180602001604052806000815250610e21565b6000805482106109dd5760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b60648201526084016105e8565b5090565b6007546001600160a01b03163314610a295760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b61072060098383611d0c565b6000610a4082611504565b5192915050565b60006001600160a01b038216610ab35760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016105e8565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b6007546001600160a01b03163314610b205760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b610b2a60006115db565b565b600a8054610b399061220c565b80601f0160208091040260200160405190810160405280929190818152602001828054610b659061220c565b8015610bb25780601f10610b8757610100808354040283529160200191610bb2565b820191906000526020600020905b815481529060010190602001808311610b9557829003601f168201915b505050505081565b60606000610bc783610a47565b905060008167ffffffffffffffff811115610bf257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c1b578160200160208202803683370190505b50905060005b82811015610c7057610c338582610730565b828281518110610c5357634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610c6881612247565b915050610c21565b509392505050565b6008546001600160a01b03163314610cde5760405162461bcd60e51b8152602060048201526024808201527f43616c6c6572206973206e6f74204144426f6f737465725061636b20636f6e746044820152631c9858dd60e21b60648201526084016105e8565b611e5a82610ceb60005490565b610cf5919061219d565b1115610d435760405162461bcd60e51b815260206004820152601b60248201527f4d617820737570706c7920686173206265656e2072656163686564000000000060448201526064016105e8565b6108f7818361162d565b6060600280546104fa9061220c565b6001600160a01b038216331415610db55760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c657200000000000060448201526064016105e8565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e2c84848461120b565b610e3884848484611647565b610ea05760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b60648201526084016105e8565b50505050565b6060610eb3826000541190565b610eff5760405162461bcd60e51b815260206004820152601160248201527f4e6f6e6578697374656e7420746f6b656e00000000000000000000000000000060448201526064016105e8565b600854600160a01b900460ff16610fa057600a8054610f1d9061220c565b80601f0160208091040260200160405190810160405280929190818152602001828054610f499061220c565b8015610f965780601f10610f6b57610100808354040283529160200191610f96565b820191906000526020600020905b815481529060010190602001808311610f7957829003601f168201915b50505050506104e5565b6104e5826117a1565b60098054610b399061220c565b60006104e58261187c565b6007546001600160a01b031633146110095760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600b602052604081205460ff1615611054575060016104e5565b6001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff165b9392505050565b6007546001600160a01b031633146110cd5760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b6001600160a01b0381166111325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e8565b61113b816115db565b50565b6007546001600160a01b031633146111865760405162461bcd60e51b815260206004820181905260248201526000805160206122cf83398151915260448201526064016105e8565b6001600160a01b03166000908152600b60205260409020805460ff19811660ff90911615179055565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061121682611504565b80519091506000906001600160a01b0316336001600160a01b0316148061124d5750336112428461057d565b6001600160a01b0316145b8061125f5750815161125f903361102b565b9050806112d45760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016105e8565b846001600160a01b031682600001516001600160a01b0316146113485760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b60648201526084016105e8565b6001600160a01b0384166113ac5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016105e8565b6113bc60008484600001516111af565b6001600160a01b03858116600090815260046020908152604080832080546fffffffffffffffffffffffffffffffff198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600390935281842080546001600160e01b031916909117600160a01b4267ffffffffffffffff16021790559086018083529120549091166114ba5761146d816000541190565b156114ba578251600082815260036020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b6040805180820190915260008082526020820152611523826000541190565b6115825760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016105e8565b815b6000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910467ffffffffffffffff1691830191909152156115d1579392505050565b5060001901611584565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6108f7828260405180602001604052806000815250611926565b60006001600160a01b0384163b1561179557604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061168b90339089908890889060040161210a565b602060405180830381600087803b1580156116a557600080fd5b505af19250505080156116d5575060408051601f3d908101601f191682019092526116d291810190611fa6565b60015b61177b573d808015611703576040519150601f19603f3d011682016040523d82523d6000602084013e611708565b606091505b5080516117735760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b60648201526084016105e8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611799565b5060015b949350505050565b60606117ae826000541190565b6118205760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016105e8565b600061182a611933565b905080516000141561184b576040518060200160405280600081525061107e565b8061185584611942565b6040516020016118669291906120db565b6040516020818303038152906040529392505050565b60006001600160a01b0382166118fa5760405162461bcd60e51b815260206004820152603160248201527f455243373231413a206e756d626572206d696e74656420717565727920666f7260448201527f20746865207a65726f206164647265737300000000000000000000000000000060648201526084016105e8565b506001600160a01b0316600090815260046020526040902054600160801b90046001600160801b031690565b6107208383836001611a74565b6060600980546104fa9061220c565b6060816119665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611990578061197a81612247565b91506119899050600a836121b5565b915061196a565b60008167ffffffffffffffff8111156119b957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156119e3576020820181803683370190505b5090505b8415611799576119f86001836121c9565b9150611a05600a86612262565b611a1090603061219d565b60f81b818381518110611a3357634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611a6d600a866121b5565b94506119e7565b6000546001600160a01b038516611ad75760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016105e8565b83611b355760405162461bcd60e51b815260206004820152602860248201527f455243373231413a207175616e74697479206d75737420626520677265617465604482015267072207468616e20360c41b60648201526084016105e8565b6001600160a01b03851660008181526004602090815260408083208054600160801b6fffffffffffffffffffffffffffffffff1982166001600160801b039283168c01831690811782900483168c01909216021790558483526003909152812080546001600160e01b031916909217600160a01b4267ffffffffffffffff16021790915581905b85811015611c835760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48315611c7757611c0f6000888488611647565b611c775760405162461bcd60e51b815260206004820152603360248201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260448201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b60648201526084016105e8565b60019182019101611bbc565b506000556114fd565b828054611c989061220c565b90600052602060002090601f016020900481019282611cba5760008555611d00565b82601f10611cd357805160ff1916838001178555611d00565b82800160010185558215611d00579182015b82811115611d00578251825591602001919060010190611ce5565b506109dd929150611d80565b828054611d189061220c565b90600052602060002090601f016020900481019282611d3a5760008555611d00565b82601f10611d535782800160ff19823516178555611d00565b82800160010185558215611d00579182015b82811115611d00578235825591602001919060010190611d65565b5b808211156109dd5760008155600101611d81565b600067ffffffffffffffff80841115611db057611db06122a2565b604051601f8501601f19908116603f01168101908282118183101715611dd857611dd86122a2565b81604052809350858152868686011115611df157600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114611e2257600080fd5b919050565b600060208284031215611e38578081fd5b61107e82611e0b565b60008060408385031215611e53578081fd5b611e5c83611e0b565b9150611e6a60208401611e0b565b90509250929050565b600080600060608486031215611e87578081fd5b611e9084611e0b565b9250611e9e60208501611e0b565b9150604084013590509250925092565b60008060008060808587031215611ec3578081fd5b611ecc85611e0b565b9350611eda60208601611e0b565b925060408501359150606085013567ffffffffffffffff811115611efc578182fd5b8501601f81018713611f0c578182fd5b611f1b87823560208401611d95565b91505092959194509250565b60008060408385031215611f39578182fd5b611f4283611e0b565b915060208301358015158114611f56578182fd5b809150509250929050565b60008060408385031215611f73578182fd5b611f7c83611e0b565b946020939093013593505050565b600060208284031215611f9b578081fd5b813561107e816122b8565b600060208284031215611fb7578081fd5b815161107e816122b8565b60008060208385031215611fd4578182fd5b823567ffffffffffffffff80821115611feb578384fd5b818501915085601f830112611ffe578384fd5b81358181111561200c578485fd5b86602082850101111561201d578485fd5b60209290920196919550909350505050565b600060208284031215612040578081fd5b813567ffffffffffffffff811115612056578182fd5b8201601f81018413612066578182fd5b61179984823560208401611d95565b600060208284031215612086578081fd5b5035919050565b6000806040838503121561209f578182fd5b82359150611e6a60208401611e0b565b600081518084526120c78160208601602086016121e0565b601f01601f19169290920160200192915050565b600083516120ed8184602088016121e0565b8351908301906121018183602088016121e0565b01949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261213c60808301846120af565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561217e57835183529284019291840191600101612162565b50909695505050505050565b60208152600061107e60208301846120af565b600082198211156121b0576121b0612276565b500190565b6000826121c4576121c461228c565b500490565b6000828210156121db576121db612276565b500390565b60005b838110156121fb5781810151838201526020016121e3565b83811115610ea05750506000910152565b600181811c9082168061222057607f821691505b6020821081141561224157634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561225b5761225b612276565b5060010190565b6000826122715761227161228c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461113b57600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220b36807b071423bdcaed084e015f9a3c90643882e852512ffe25a9b1737cf255464736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004e57a7ce50336fa69c25c86d32d541ae0b9fb235000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000a4144547261696e6572730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034144540000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _adBoosterPackAddress (address): 0x4e57a7CE50336FA69C25C86d32d541aE0B9fB235
Arg [1] : _name (string): ADTrainers
Arg [2] : _symbol (string): ADT
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000004e57a7ce50336fa69c25c86d32d541ae0b9fb235
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [4] : 4144547261696e65727300000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 4144540000000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
1075:3293:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3940:366:21;;;;;;:::i;:::-;;:::i;:::-;;;7421:14:22;;7414:22;7396:41;;7384:2;7369:18;3940:366:21;;;;;;;;5776:98;;;:::i;:::-;;;;;;;:::i;7290:210::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;6033:55:22;;;6015:74;;6003:2;5988:18;7290:210:21;5970:125:22;6826:403:21;;;;;;:::i;:::-;;:::i;:::-;;2242:98;2295:7;2321:12;2242:98;;;17049:25:22;;;17037:2;17022:18;2242:98:21;17004:76:22;8140:156:21;;;;;;:::i;:::-;;:::i;2889:984::-;;;;;;:::i;:::-;;:::i;1162:41:20:-;;1199:4;1162:41;;4025:104;;;;;;:::i;:::-;;:::i;4135:80::-;;;:::i;8362:171:21:-;;;;;;:::i;:::-;;:::i;2412:184::-;;;;;;:::i;:::-;;:::i;1209:20:20:-;;;;;-1:-1:-1;;;1209:20:20;;;;;;1121:35;;;;;-1:-1:-1;;;;;1121:35:20;;;3922:97;;;;;;:::i;:::-;;:::i;5592:122:21:-;;;;;;:::i;:::-;;:::i;4365:218::-;;;;;;:::i;:::-;;:::i;1668:101:0:-;;;:::i;1288:28:20:-;;;:::i;2917:370::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1036:85:0:-;1108:6;;-1:-1:-1;;;;;1108:6:0;1036:85;;2211:262:20;;;;;;:::i;:::-;;:::i;5938:102:21:-;;;:::i;7567:283::-;;;;;;:::i;:::-;;:::i;8599:344::-;;;;;;:::i;:::-;;:::i;2540:252:20:-;;;;;;:::i;:::-;;:::i;1441:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1256:26;;;:::i;2798:113::-;;;;;;:::i;:::-;;:::i;3752:164::-;;;;;;:::i;:::-;;:::i;3410:275::-;;;;;;:::i;:::-;;:::i;1918:198:0:-;;;;;;:::i;:::-;;:::i;4221:145:20:-;;;;;;:::i;:::-;;:::i;3940:366:21:-;4042:4;-1:-1:-1;;;;;;4077:40:21;;-1:-1:-1;;;4077:40:21;;:104;;-1:-1:-1;;;;;;;4133:48:21;;-1:-1:-1;;;4133:48:21;4077:104;:170;;;-1:-1:-1;;;;;;;4197:50:21;;-1:-1:-1;;;4197:50:21;4077:170;:222;;;-1:-1:-1;;;;;;;;;;937:40:16;;;4263:36:21;4058:241;3940:366;-1:-1:-1;;3940:366:21:o;5776:98::-;5830:13;5862:5;5855:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5776:98;:::o;7290:210::-;7358:7;7385:16;7393:7;9246:4;9279:12;-1:-1:-1;9269:22:21;9189:109;7385:16;7377:74;;;;-1:-1:-1;;;7377:74:21;;16691:2:22;7377:74:21;;;16673:21:22;16730:2;16710:18;;;16703:30;16769:34;16749:18;;;16742:62;-1:-1:-1;;;16820:18:22;;;16813:43;16873:19;;7377:74:21;;;;;;;;;-1:-1:-1;7469:24:21;;;;:15;:24;;;;;;-1:-1:-1;;;;;7469:24:21;;7290:210::o;6826:403::-;6898:13;6914:24;6930:7;6914:15;:24::i;:::-;6898:40;;6962:5;-1:-1:-1;;;;;6956:11:21;:2;-1:-1:-1;;;;;6956:11:21;;;6948:58;;;;-1:-1:-1;;;6948:58:21;;13465:2:22;6948:58:21;;;13447:21:22;13504:2;13484:18;;;13477:30;13543:34;13523:18;;;13516:62;-1:-1:-1;;;13594:18:22;;;13587:32;13636:19;;6948:58:21;13437:224:22;6948:58:21;719:10:13;-1:-1:-1;;;;;7038:21:21;;;;:62;;-1:-1:-1;7063:37:21;7080:5;719:10:13;3410:275:20;:::i;7063:37:21:-;7017:166;;;;-1:-1:-1;;;7017:166:21;;10669:2:22;7017:166:21;;;10651:21:22;10708:2;10688:18;;;10681:30;10747:34;10727:18;;;10720:62;10818:27;10798:18;;;10791:55;10863:19;;7017:166:21;10641:247:22;7017:166:21;7194:28;7203:2;7207:7;7216:5;7194:8;:28::i;:::-;6826:403;;;:::o;8140:156::-;8261:28;8271:4;8277:2;8281:7;8261:9;:28::i;2889:984::-;2978:7;3013:16;3023:5;3013:9;:16::i;:::-;3005:5;:24;2997:71;;;;-1:-1:-1;;;2997:71:21;;7874:2:22;2997:71:21;;;7856:21:22;7913:2;7893:18;;;7886:30;7952:34;7932:18;;;7925:62;-1:-1:-1;;;8003:18:22;;;7996:32;8045:19;;2997:71:21;7846:224:22;2997:71:21;3078:22;2321:12;;;3078:22;;3335:455;3355:14;3351:1;:18;3335:455;;;3394:31;3428:14;;;:11;:14;;;;;;;;;3394:48;;;;;;;;;-1:-1:-1;;;;;3394:48:21;;;;;-1:-1:-1;;;3394:48:21;;;;;;;;;;;;3464:28;3460:109;;3536:14;;;-1:-1:-1;3460:109:21;3611:5;-1:-1:-1;;;;;3590:26:21;:17;-1:-1:-1;;;;;3590:26:21;;3586:190;;;3659:5;3644:11;:20;3640:83;;;-1:-1:-1;3699:1:21;-1:-1:-1;3692:8:21;;-1:-1:-1;;;3692:8:21;3640:83;3744:13;;;;;3586:190;-1:-1:-1;3371:3:21;;3335:455;;;-1:-1:-1;3810:56:21;;-1:-1:-1;;;3810:56:21;;15504:2:22;3810:56:21;;;15486:21:22;15543:2;15523:18;;;15516:30;15582:34;15562:18;;;15555:62;15653:16;15633:18;;;15626:44;15687:19;;3810:56:21;15476:236:22;4025:104:20;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;4101:21:20;;::::1;::::0;:14:::1;::::0;:21:::1;::::0;::::1;::::0;::::1;:::i;:::-;;4025:104:::0;:::o;4135:80::-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;4200:8:20::1;::::0;;-1:-1:-1;;;;4188:20:20;::::1;-1:-1:-1::0;;;4200:8:20;;;::::1;;;4199:9;4188:20:::0;;::::1;;::::0;;4135:80::o;8362:171:21:-;8487:39;8504:4;8510:2;8514:7;8487:39;;;;;;;;;;;;:16;:39::i;2412:184::-;2479:7;2321:12;;2506:5;:21;2498:69;;;;-1:-1:-1;;;2498:69:21;;9095:2:22;2498:69:21;;;9077:21:22;9134:2;9114:18;;;9107:30;9173:34;9153:18;;;9146:62;-1:-1:-1;;;9224:18:22;;;9217:33;9267:19;;2498:69:21;9067:225:22;2498:69:21;-1:-1:-1;2584:5:21;2412:184::o;3922:97:20:-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;3993:19:20::1;:12;4008:4:::0;;3993:19:::1;:::i;5592:122:21:-:0;5656:7;5682:20;5694:7;5682:11;:20::i;:::-;:25;;5592:122;-1:-1:-1;;5592:122:21:o;4365:218::-;4429:7;-1:-1:-1;;;;;4456:19:21;;4448:75;;;;-1:-1:-1;;;4448:75:21;;11095:2:22;4448:75:21;;;11077:21:22;11134:2;11114:18;;;11107:30;11173:34;11153:18;;;11146:62;-1:-1:-1;;;11224:18:22;;;11217:41;11275:19;;4448:75:21;11067:233:22;4448:75:21;-1:-1:-1;;;;;;4548:19:21;;;;;:12;:19;;;;;:27;-1:-1:-1;;;;;4548:27:21;;4365:218::o;1668:101:0:-;1108:6;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;1732:30:::1;1759:1;1732:18;:30::i;:::-;1668:101::o:0;1288:28:20:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2917:370::-;3003:16;3035:18;3056:17;3066:6;3056:9;:17::i;:::-;3035:38;;3084:26;3127:10;3113:25;;;;;;-1:-1:-1;;;3113:25:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3113:25:20;;3084:54;;3153:9;3148:107;3168:10;3164:1;:14;3148:107;;;3214:30;3234:6;3242:1;3214:19;:30::i;:::-;3199:9;3209:1;3199:12;;;;;;-1:-1:-1;;;3199:12:20;;;;;;;;;;;;;;;;;;:45;3180:3;;;;:::i;:::-;;;;3148:107;;;-1:-1:-1;3271:9:20;2917:370;-1:-1:-1;;;2917:370:20:o;2211:262::-;1846:20;;-1:-1:-1;;;;;1846:20:20;1832:10;:34;1811:117;;;;-1:-1:-1;;;1811:117:20;;14690:2:22;1811:117:20;;;14672:21:22;14729:2;14709:18;;;14702:30;14768:34;14748:18;;;14741:62;-1:-1:-1;;;14819:18:22;;;14812:34;14863:19;;1811:117:20;14662:226:22;1811:117:20;1199:4:::1;2355:9;2339:13;2295:7:21::0;2321:12;;2242:98;2339:13:20::1;:25;;;;:::i;:::-;:39;;2318:113;;;::::0;-1:-1:-1;;;2318:113:20;;16335:2:22;2318:113:20::1;::::0;::::1;16317:21:22::0;16374:2;16354:18;;;16347:30;16413:29;16393:18;;;16386:57;16460:18;;2318:113:20::1;16307:177:22::0;2318:113:20::1;2441:25;2451:3;2456:9;2441;:25::i;5938:102:21:-:0;5994:13;6026:7;6019:14;;;;;:::i;7567:283::-;-1:-1:-1;;;;;7661:24:21;;719:10:13;7661:24:21;;7653:63;;;;-1:-1:-1;;;7653:63:21;;12691:2:22;7653:63:21;;;12673:21:22;12730:2;12710:18;;;12703:30;12769:28;12749:18;;;12742:56;12815:18;;7653:63:21;12663:176:22;7653:63:21;719:10:13;7727:32:21;;;;:18;:32;;;;;;;;-1:-1:-1;;;;;7727:42:21;;;;;;;;;;;;:53;;-1:-1:-1;;7727:53:21;;;;;;;;;;7795:48;;7396:41:22;;;7727:42:21;;719:10:13;7795:48:21;;7369:18:22;7795:48:21;;;;;;;7567:283;;:::o;8599:344::-;8752:28;8762:4;8768:2;8772:7;8752:9;:28::i;:::-;8811:48;8834:4;8840:2;8844:7;8853:5;8811:22;:48::i;:::-;8790:146;;;;-1:-1:-1;;;8790:146:21;;13868:2:22;8790:146:21;;;13850:21:22;13907:2;13887:18;;;13880:30;13946:34;13926:18;;;13919:62;-1:-1:-1;;;13997:18:22;;;13990:49;14056:19;;8790:146:21;13840:241:22;8790:146:21;8599:344;;;;:::o;2540:252:20:-;2649:13;2686:12;2694:3;9246:4:21;9279:12;-1:-1:-1;9269:22:21;9189:109;2686:12:20;2678:42;;;;-1:-1:-1;;;2678:42:20;;10323:2:22;2678:42:20;;;10305:21:22;10362:2;10342:18;;;10335:30;10401:19;10381:18;;;10374:47;10438:18;;2678:42:20;10295:167:22;2678:42:20;2738:8;;-1:-1:-1;;;2738:8:20;;;;:47;;2771:14;2738:47;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2749:19;2764:3;2749:14;:19::i;1256:26::-;;;;;;;:::i;2798:113::-;2857:7;2883:21;2897:6;2883:13;:21::i;3752:164::-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;3865:20:20::1;:44:::0;;-1:-1:-1;;;;;;3865:44:20::1;-1:-1:-1::0;;;;;3865:44:20;;;::::1;::::0;;;::::1;::::0;;3752:164::o;3410:275::-;-1:-1:-1;;;;;3557:25:20;;3533:4;3557:25;;;:14;:25;;;;;;;;3553:67;;;-1:-1:-1;3605:4:20;3598:11;;3553:67;-1:-1:-1;;;;;8036:25:21;;;8013:4;8036:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;3637:41:20;3630:48;3410:275;-1:-1:-1;;;3410:275:20:o;1918:198:0:-;1108:6;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;-1:-1:-1;;;;;2006:22:0;::::1;1998:73;;;::::0;-1:-1:-1;;;1998:73:0;;8277:2:22;1998:73:0::1;::::0;::::1;8259:21:22::0;8316:2;8296:18;;;8289:30;8355:34;8335:18;;;8328:62;-1:-1:-1;;;8406:18:22;;;8399:36;8452:19;;1998:73:0::1;8249:228:22::0;1998:73:0::1;2081:28;2100:8;2081:18;:28::i;:::-;1918:198:::0;:::o;4221:145:20:-;1108:6:0;;-1:-1:-1;;;;;1108:6:0;719:10:13;1248:23:0;1240:68;;;;-1:-1:-1;;;1240:68:0;;11914:2:22;1240:68:0;;;11896:21:22;;;11933:18;;;11926:30;-1:-1:-1;;;;;;;;;;;11972:18:22;;;11965:62;12044:18;;1240:68:0;11886:182:22;1240:68:0;-1:-1:-1;;;;;4330:29:20::1;;::::0;;;:14:::1;:29;::::0;;;;;;-1:-1:-1;;4297:62:20;::::1;4330:29;::::0;;::::1;4329:30;4297:62;::::0;;4221:145::o;13970:189:21:-;14080:24;;;;:15;:24;;;;;;:29;;-1:-1:-1;;;;;;14080:29:21;-1:-1:-1;;;;;14080:29:21;;;;;;;;;14124:28;;14080:24;;14124:28;;;;;;;13970:189;;;:::o;11901:1958::-;12011:35;12049:20;12061:7;12049:11;:20::i;:::-;12122:18;;12011:58;;-1:-1:-1;12080:22:21;;-1:-1:-1;;;;;12106:34:21;719:10:13;-1:-1:-1;;;;;12106:34:21;;:86;;;-1:-1:-1;719:10:13;12156:20:21;12168:7;12156:11;:20::i;:::-;-1:-1:-1;;;;;12156:36:21;;12106:86;:152;;;-1:-1:-1;12225:18:21;;12208:50;;719:10:13;3410:275:20;:::i;12208:50:21:-;12080:179;;12278:17;12270:80;;;;-1:-1:-1;;;12270:80:21;;13046:2:22;12270:80:21;;;13028:21:22;13085:2;13065:18;;;13058:30;13124:34;13104:18;;;13097:62;13195:20;13175:18;;;13168:48;13233:19;;12270:80:21;13018:240:22;12270:80:21;12391:4;-1:-1:-1;;;;;12369:26:21;:13;:18;;;-1:-1:-1;;;;;12369:26:21;;12361:77;;;;-1:-1:-1;;;12361:77:21;;11507:2:22;12361:77:21;;;11489:21:22;11546:2;11526:18;;;11519:30;11585:34;11565:18;;;11558:62;-1:-1:-1;;;11636:18:22;;;11629:36;11682:19;;12361:77:21;11479:228:22;12361:77:21;-1:-1:-1;;;;;12456:16:21;;12448:66;;;;-1:-1:-1;;;12448:66:21;;9499:2:22;12448:66:21;;;9481:21:22;9538:2;9518:18;;;9511:30;9577:34;9557:18;;;9550:62;-1:-1:-1;;;9628:18:22;;;9621:35;9673:19;;12448:66:21;9471:227:22;12448:66:21;12630:49;12647:1;12651:7;12660:13;:18;;;12630:8;:49::i;:::-;-1:-1:-1;;;;;12969:18:21;;;;;;;:12;:18;;;;;;;;:31;;-1:-1:-1;;12969:31:21;;;-1:-1:-1;;;;;12969:31:21;;;-1:-1:-1;;12969:31:21;;;;;;;13014:16;;;;;;;;;:29;;;;;;;;-1:-1:-1;13014:29:21;;;;;;;;;;;;;13058:20;;;:11;:20;;;;;;:30;;-1:-1:-1;;;;;;13102:61:21;;;;-1:-1:-1;;;13147:15:21;13102:61;;;;;;13433:11;;;13462:24;;;;;:29;13433:11;;13462:29;13458:290;;13529:20;13537:11;9246:4;9279:12;-1:-1:-1;9269:22:21;9189:109;13529:20;13525:209;;;13605:18;;;13573:24;;;:11;:24;;;;;;;;:50;;13687:28;;;;13645:70;;-1:-1:-1;;;13645:70:21;-1:-1:-1;;;;;;13645:70:21;;;-1:-1:-1;;;;;13573:50:21;;;13645:70;;;;;;;13525:209;11901:1958;13792:7;13788:2;-1:-1:-1;;;;;13773:27:21;13782:4;-1:-1:-1;;;;;13773:27:21;;;;;;;;;;;13810:42;11901:1958;;;;;:::o;5011:524::-;-1:-1:-1;;;;;;;;;;;;;;;;;5113:16:21;5121:7;9246:4;9279:12;-1:-1:-1;9269:22:21;9189:109;5113:16;5105:71;;;;-1:-1:-1;;;5105:71:21;;8684:2:22;5105:71:21;;;8666:21:22;8723:2;8703:18;;;8696:30;8762:34;8742:18;;;8735:62;-1:-1:-1;;;8813:18:22;;;8806:40;8863:19;;5105:71:21;8656:232:22;5105:71:21;5231:7;5211:240;5277:31;5311:17;;;:11;:17;;;;;;;;;5277:51;;;;;;;;;-1:-1:-1;;;;;5277:51:21;;;;;-1:-1:-1;;;5277:51:21;;;;;;;;;;;;5350:28;5346:91;;5409:9;5011:524;-1:-1:-1;;;5011:524:21:o;5346:91::-;-1:-1:-1;;;5251:6:21;5211:240;;2270:187:0;2362:6;;;-1:-1:-1;;;;;2378:17:0;;;-1:-1:-1;;;;;;2378:17:0;;;;;;;2410:40;;2362:6;;;2378:17;2362:6;;2410:40;;2343:16;;2410:40;2270:187;;:::o;9304:102:21:-;9372:27;9382:2;9386:8;9372:27;;;;;;;;;;;;:9;:27::i;14712:783::-;14862:4;-1:-1:-1;;;;;14882:13:21;;1087:20:12;1133:8;14878:611:21;;14917:72;;-1:-1:-1;;;14917:72:21;;-1:-1:-1;;;;;14917:36:21;;;;;:72;;719:10:13;;14968:4:21;;14974:7;;14983:5;;14917:72;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;14917:72:21;;;;;;;;-1:-1:-1;;14917:72:21;;;;;;;;;;;;:::i;:::-;;;14913:524;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15160:13:21;;15156:267;;15202:61;;-1:-1:-1;;;15202:61:21;;13868:2:22;15202:61:21;;;13850:21:22;13907:2;13887:18;;;13880:30;13946:34;13926:18;;;13919:62;-1:-1:-1;;;13997:18:22;;;13990:49;14056:19;;15202:61:21;13840:241:22;15156:267:21;15375:6;15369:13;15360:6;15356:2;15352:15;15345:38;14913:524;-1:-1:-1;;;;;;15039:55:21;-1:-1:-1;;;15039:55:21;;-1:-1:-1;15032:62:21;;14878:611;-1:-1:-1;15474:4:21;14878:611;14712:783;;;;;;:::o;6106:330::-;6179:13;6212:16;6220:7;9246:4;9279:12;-1:-1:-1;9269:22:21;9189:109;6212:16;6204:76;;;;-1:-1:-1;;;6204:76:21;;12275:2:22;6204:76:21;;;12257:21:22;12314:2;12294:18;;;12287:30;12353:34;12333:18;;;12326:62;12424:17;12404:18;;;12397:45;12459:19;;6204:76:21;12247:237:22;6204:76:21;6291:21;6315:10;:8;:10::i;:::-;6291:34;;6348:7;6342:21;6367:1;6342:26;;:87;;;;;;;;;;;;;;;;;6395:7;6404:18;:7;:16;:18::i;:::-;6378:45;;;;;;;;;:::i;:::-;;;;;;;;;;;;;6335:94;6106:330;-1:-1:-1;;;6106:330:21:o;4589:226::-;4650:7;-1:-1:-1;;;;;4677:19:21;;4669:81;;;;-1:-1:-1;;;4669:81:21;;9905:2:22;4669:81:21;;;9887:21:22;9944:2;9924:18;;;9917:30;9983:34;9963:18;;;9956:62;10054:19;10034:18;;;10027:47;10091:19;;4669:81:21;9877:239:22;4669:81:21;-1:-1:-1;;;;;;4775:19:21;;;;;:12;:19;;;;;:32;-1:-1:-1;;;4775:32:21;;-1:-1:-1;;;;;4775:32:21;;4589:226::o;9757:157::-;9875:32;9881:2;9885:8;9895:5;9902:4;9875:5;:32::i;3293:111:20:-;3353:13;3385:12;3378:19;;;;;:::i;328:703:14:-;384:13;601:10;597:51;;-1:-1:-1;;627:10:14;;;;;;;;;;;;-1:-1:-1;;;627:10:14;;;;;328:703::o;597:51::-;672:5;657:12;711:75;718:9;;711:75;;743:8;;;;:::i;:::-;;-1:-1:-1;765:10:14;;-1:-1:-1;773:2:14;765:10;;:::i;:::-;;;711:75;;;795:19;827:6;817:17;;;;;;-1:-1:-1;;;817:17:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;817:17:14;;795:39;;844:150;851:10;;844:150;;877:11;887:1;877:11;;:::i;:::-;;-1:-1:-1;945:10:14;953:2;945:5;:10;:::i;:::-;932:24;;:2;:24;:::i;:::-;919:39;;902:6;909;902:14;;;;;;-1:-1:-1;;;902:14:14;;;;;;;;;;;;:56;;;;;;;;;;-1:-1:-1;972:11:14;981:2;972:11;;:::i;:::-;;;844:150;;10161:1498:21;10294:20;10317:12;-1:-1:-1;;;;;10347:16:21;;10339:62;;;;-1:-1:-1;;;10339:62:21;;14288:2:22;10339:62:21;;;14270:21:22;14327:2;14307:18;;;14300:30;14366:34;14346:18;;;14339:62;-1:-1:-1;;;14417:18:22;;;14410:31;14458:19;;10339:62:21;14260:223:22;10339:62:21;10419:13;10411:66;;;;-1:-1:-1;;;10411:66:21;;15095:2:22;10411:66:21;;;15077:21:22;15134:2;15114:18;;;15107:30;15173:34;15153:18;;;15146:62;-1:-1:-1;;;15224:18:22;;;15217:38;15272:19;;10411:66:21;15067:230:22;10411:66:21;-1:-1:-1;;;;;10821:16:21;;;;;;:12;:16;;;;;;;;:45;;-1:-1:-1;;;;;10821:45:21;;-1:-1:-1;;;;;10821:45:21;;;;;;;;;;10880:50;;;;;;;;;;;;;;10945:25;;;:11;:25;;;;;:35;;-1:-1:-1;;;;;;10994:66:21;;;;-1:-1:-1;;;11044:15:21;10994:66;;;;;;;10945:25;;11125:405;11145:8;11141:1;:12;11125:405;;;11183:38;;11208:12;;-1:-1:-1;;;;;11183:38:21;;;11200:1;;11183:38;;11200:1;;11183:38;11243:4;11239:244;;;11304:59;11335:1;11339:2;11343:12;11357:5;11304:22;:59::i;:::-;11271:193;;;;-1:-1:-1;;;11271:193:21;;13868:2:22;11271:193:21;;;13850:21:22;13907:2;13887:18;;;13880:30;13946:34;13926:18;;;13919:62;-1:-1:-1;;;13997:18:22;;;13990:49;14056:19;;11271:193:21;13840:241:22;11271:193:21;11501:14;;;;;11155:3;11125:405;;;-1:-1:-1;11544:12:21;:27;11592:60;8599:344;-1:-1:-1;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:631:22;78:5;108:18;149:2;141:6;138:14;135:2;;;155:18;;:::i;:::-;230:2;224:9;198:2;284:15;;-1:-1:-1;;280:24:22;;;306:2;276:33;272:42;260:55;;;330:18;;;350:22;;;327:46;324:2;;;376:18;;:::i;:::-;416:10;412:2;405:22;445:6;436:15;;475:6;467;460:22;515:3;506:6;501:3;497:16;494:25;491:2;;;532:1;529;522:12;491:2;582:6;577:3;570:4;562:6;558:17;545:44;637:1;630:4;621:6;613;609:19;605:30;598:41;;;;88:557;;;;;:::o;650:196::-;718:20;;-1:-1:-1;;;;;767:54:22;;757:65;;747:2;;836:1;833;826:12;747:2;699:147;;;:::o;851:196::-;910:6;963:2;951:9;942:7;938:23;934:32;931:2;;;984:6;976;969:22;931:2;1012:29;1031:9;1012:29;:::i;1052:270::-;1120:6;1128;1181:2;1169:9;1160:7;1156:23;1152:32;1149:2;;;1202:6;1194;1187:22;1149:2;1230:29;1249:9;1230:29;:::i;:::-;1220:39;;1278:38;1312:2;1301:9;1297:18;1278:38;:::i;:::-;1268:48;;1139:183;;;;;:::o;1327:338::-;1404:6;1412;1420;1473:2;1461:9;1452:7;1448:23;1444:32;1441:2;;;1494:6;1486;1479:22;1441:2;1522:29;1541:9;1522:29;:::i;:::-;1512:39;;1570:38;1604:2;1593:9;1589:18;1570:38;:::i;:::-;1560:48;;1655:2;1644:9;1640:18;1627:32;1617:42;;1431:234;;;;;:::o;1670:696::-;1765:6;1773;1781;1789;1842:3;1830:9;1821:7;1817:23;1813:33;1810:2;;;1864:6;1856;1849:22;1810:2;1892:29;1911:9;1892:29;:::i;:::-;1882:39;;1940:38;1974:2;1963:9;1959:18;1940:38;:::i;:::-;1930:48;;2025:2;2014:9;2010:18;1997:32;1987:42;;2080:2;2069:9;2065:18;2052:32;2107:18;2099:6;2096:30;2093:2;;;2144:6;2136;2129:22;2093:2;2172:22;;2225:4;2217:13;;2213:27;-1:-1:-1;2203:2:22;;2259:6;2251;2244:22;2203:2;2287:73;2352:7;2347:2;2334:16;2329:2;2325;2321:11;2287:73;:::i;:::-;2277:83;;;1800:566;;;;;;;:::o;2371:367::-;2436:6;2444;2497:2;2485:9;2476:7;2472:23;2468:32;2465:2;;;2518:6;2510;2503:22;2465:2;2546:29;2565:9;2546:29;:::i;:::-;2536:39;;2625:2;2614:9;2610:18;2597:32;2672:5;2665:13;2658:21;2651:5;2648:32;2638:2;;2699:6;2691;2684:22;2638:2;2727:5;2717:15;;;2455:283;;;;;:::o;2743:264::-;2811:6;2819;2872:2;2860:9;2851:7;2847:23;2843:32;2840:2;;;2893:6;2885;2878:22;2840:2;2921:29;2940:9;2921:29;:::i;:::-;2911:39;2997:2;2982:18;;;;2969:32;;-1:-1:-1;;;2830:177:22:o;3012:255::-;3070:6;3123:2;3111:9;3102:7;3098:23;3094:32;3091:2;;;3144:6;3136;3129:22;3091:2;3188:9;3175:23;3207:30;3231:5;3207:30;:::i;3272:259::-;3341:6;3394:2;3382:9;3373:7;3369:23;3365:32;3362:2;;;3415:6;3407;3400:22;3362:2;3452:9;3446:16;3471:30;3495:5;3471:30;:::i;3536:642::-;3607:6;3615;3668:2;3656:9;3647:7;3643:23;3639:32;3636:2;;;3689:6;3681;3674:22;3636:2;3734:9;3721:23;3763:18;3804:2;3796:6;3793:14;3790:2;;;3825:6;3817;3810:22;3790:2;3868:6;3857:9;3853:22;3843:32;;3913:7;3906:4;3902:2;3898:13;3894:27;3884:2;;3940:6;3932;3925:22;3884:2;3985;3972:16;4011:2;4003:6;4000:14;3997:2;;;4032:6;4024;4017:22;3997:2;4082:7;4077:2;4068:6;4064:2;4060:15;4056:24;4053:37;4050:2;;;4108:6;4100;4093:22;4050:2;4144;4136:11;;;;;4166:6;;-1:-1:-1;3626:552:22;;-1:-1:-1;;;;3626:552:22:o;4183:480::-;4252:6;4305:2;4293:9;4284:7;4280:23;4276:32;4273:2;;;4326:6;4318;4311:22;4273:2;4371:9;4358:23;4404:18;4396:6;4393:30;4390:2;;;4441:6;4433;4426:22;4390:2;4469:22;;4522:4;4514:13;;4510:27;-1:-1:-1;4500:2:22;;4556:6;4548;4541:22;4500:2;4584:73;4649:7;4644:2;4631:16;4626:2;4622;4618:11;4584:73;:::i;4668:190::-;4727:6;4780:2;4768:9;4759:7;4755:23;4751:32;4748:2;;;4801:6;4793;4786:22;4748:2;-1:-1:-1;4829:23:22;;4738:120;-1:-1:-1;4738:120:22:o;4863:264::-;4931:6;4939;4992:2;4980:9;4971:7;4967:23;4963:32;4960:2;;;5013:6;5005;4998:22;4960:2;5054:9;5041:23;5031:33;;5083:38;5117:2;5106:9;5102:18;5083:38;:::i;5132:257::-;5173:3;5211:5;5205:12;5238:6;5233:3;5226:19;5254:63;5310:6;5303:4;5298:3;5294:14;5287:4;5280:5;5276:16;5254:63;:::i;:::-;5371:2;5350:15;-1:-1:-1;;5346:29:22;5337:39;;;;5378:4;5333:50;;5181:208;-1:-1:-1;;5181:208:22:o;5394:470::-;5573:3;5611:6;5605:13;5627:53;5673:6;5668:3;5661:4;5653:6;5649:17;5627:53;:::i;:::-;5743:13;;5702:16;;;;5765:57;5743:13;5702:16;5799:4;5787:17;;5765:57;:::i;:::-;5838:20;;5581:283;-1:-1:-1;;;;5581:283:22:o;6100:511::-;6294:4;-1:-1:-1;;;;;6404:2:22;6396:6;6392:15;6381:9;6374:34;6456:2;6448:6;6444:15;6439:2;6428:9;6424:18;6417:43;;6496:6;6491:2;6480:9;6476:18;6469:34;6539:3;6534:2;6523:9;6519:18;6512:31;6560:45;6600:3;6589:9;6585:19;6577:6;6560:45;:::i;:::-;6552:53;6303:308;-1:-1:-1;;;;;;6303:308:22:o;6616:635::-;6787:2;6839:21;;;6909:13;;6812:18;;;6931:22;;;6758:4;;6787:2;7010:15;;;;6984:2;6969:18;;;6758:4;7056:169;7070:6;7067:1;7064:13;7056:169;;;7131:13;;7119:26;;7200:15;;;;7165:12;;;;7092:1;7085:9;7056:169;;;-1:-1:-1;7242:3:22;;6767:484;-1:-1:-1;;;;;;6767:484:22:o;7448:219::-;7597:2;7586:9;7579:21;7560:4;7617:44;7657:2;7646:9;7642:18;7634:6;7617:44;:::i;17085:128::-;17125:3;17156:1;17152:6;17149:1;17146:13;17143:2;;;17162:18;;:::i;:::-;-1:-1:-1;17198:9:22;;17133:80::o;17218:120::-;17258:1;17284;17274:2;;17289:18;;:::i;:::-;-1:-1:-1;17323:9:22;;17264:74::o;17343:125::-;17383:4;17411:1;17408;17405:8;17402:2;;;17416:18;;:::i;:::-;-1:-1:-1;17453:9:22;;17392:76::o;17473:258::-;17545:1;17555:113;17569:6;17566:1;17563:13;17555:113;;;17645:11;;;17639:18;17626:11;;;17619:39;17591:2;17584:10;17555:113;;;17686:6;17683:1;17680:13;17677:2;;;-1:-1:-1;;17721:1:22;17703:16;;17696:27;17526:205::o;17736:380::-;17815:1;17811:12;;;;17858;;;17879:2;;17933:4;17925:6;17921:17;17911:27;;17879:2;17986;17978:6;17975:14;17955:18;17952:38;17949:2;;;18032:10;18027:3;18023:20;18020:1;18013:31;18067:4;18064:1;18057:15;18095:4;18092:1;18085:15;17949:2;;17791:325;;;:::o;18121:135::-;18160:3;-1:-1:-1;;18181:17:22;;18178:2;;;18201:18;;:::i;:::-;-1:-1:-1;18248:1:22;18237:13;;18168:88::o;18261:112::-;18293:1;18319;18309:2;;18324:18;;:::i;:::-;-1:-1:-1;18358:9:22;;18299:74::o;18378:127::-;18439:10;18434:3;18430:20;18427:1;18420:31;18470:4;18467:1;18460:15;18494:4;18491:1;18484:15;18510:127;18571:10;18566:3;18562:20;18559:1;18552:31;18602:4;18599:1;18592:15;18626:4;18623:1;18616:15;18642:127;18703:10;18698:3;18694:20;18691:1;18684:31;18734:4;18731:1;18724:15;18758:4;18755:1;18748:15;18774:131;-1:-1:-1;;;;;;18848:32:22;;18838:43;;18828:2;;18895:1;18892;18885:12
Swarm Source
ipfs://b36807b071423bdcaed084e015f9a3c90643882e852512ffe25a9b1737cf2554
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.