ERC-721
Overview
Max Total Supply
37 SafariSurfers
Holders
6
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 SafariSurfersLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SafariSurfers
Compiler Version
v0.8.1+commit.df193b15
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @notice utils import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; /// @notice NFT add-ons import './NFT/NFT.sol'; /** * @title ERC-721 contract for Safari Surfers * @notice This contract is used to mint Safari Surfers NFT art pieces */ contract SafariSurfers is NFT{ /// @notice using safe math operations with uint using SafeMath for uint; /// @notice using MerkleProof Library to verify Merkle proofs using MerkleProof for bytes32[]; /// @dev root of the Merkle tree bytes32 public merkleRoot; /// @notice defines id the allow list is enforced to trigger merkleroot validations bool public isAllowListEnabled; /// @notice Indicates if the mint id has been already used mapping(bytes16 => bool) public mintId; /// @notice map to keep track of available options and their prices OptionNumber => Price in WEI mapping(uint256 => uint256) public prices; // @notice SafariSurfers minting event event MintSafariSurfers(address indexed to, uint256 animal, uint256 option, uint256 indexed tokenId); // @notice SafariSurfers set price events event SetMintPrice(uint256 newPrice); event SetPhysicalPrice(uint256 newPrice); event SetAnimalPrice(uint256 newPrice); /** * @notice SafariSurfers constructor * @param proxyRegistryAddress_ opensea proxy to allow approve all * @param name_ ERC721 token name * @param symbol_ ERC721 token symbol * @param baseTokenURI_ metadata base URL * @param operators_ additional SafariSurfers operators */ constructor( address proxyRegistryAddress_, string memory name_, string memory symbol_, string memory baseTokenURI_, address[] memory operators_ ) NFT(proxyRegistryAddress_, name_, symbol_, baseTokenURI_, operators_) { /// @notice initial options and their prices. prices[1] = 100000000000000; // minting price prices[2] = 50000000000000; // physical price prices[3] = 10000000000000; // choosing animal price /// @notice initializers isAllowListEnabled = false; } /** * @notice changes if the allow list is enforced or not * @param _enabled is enabled true, or not false */ function setAllowListEnabled (bool _enabled) external { require(operators[msg.sender], "only operators"); isAllowListEnabled = _enabled; } /** * @notice sets merkleRoot in case whitelist list updated * @param merkleRoot_ root of the Merkle tree **/ function setMerkleRoot(bytes32 merkleRoot_) external { require(operators[msg.sender], "only operators"); merkleRoot = merkleRoot_; } /** * @notice add a new or modifies an existing option to mint price. * @param _option the option to modify, can be new and will add a new one * @param price ETH price in wei, can be zero for free minting */ function setPrice(uint256 _option, uint256 price) public { require(operators[msg.sender], "only operators"); prices[_option] = price; // we emit the right event if (_option == 1){ emit SetMintPrice(price); } if (_option == 2){ emit SetPhysicalPrice(price); } if (_option == 3){ emit SetAnimalPrice(price); } } /** * @notice sets all three prices at once * @param mint the price of the minting an NFT * @param physical the price of adding a physical print * @param animal the price of choosing an animal */ function setPrices(uint256 mint, uint256 physical, uint256 animal) public { require(operators[msg.sender], "only operators"); prices[1] = mint; prices[2] = physical; prices[3] = animal; // we emit the price events emit SetMintPrice(mint); emit SetPhysicalPrice(physical); emit SetAnimalPrice(animal); } /** * @notice allows an admin to withdrawn all ETH from the contract */ function withdraw () external { require(operators[msg.sender], "only operators"); payable(msg.sender).transfer(address(this).balance); } /** * @notice performs SafariSurgers minting * @param to new owner of the NFT * @param option which option is being minted * @param animal which animal is being minted */ function _safariSurfersMint (address to, uint256 option, uint256 animal) internal { currentTokenId++; _safeMint(to, currentTokenId); emit MintSafariSurfers(to, animal, option, currentTokenId); } /** * @notice validates if value sent is correct to pay for the option and animal * @param value the amount of wei sent to the mint method * @param option which option has been choosen. 1 is without physical 2 is with physical * @param animal which animal has been choose. Zero is no animal, between 1 and 12 is an specific animal * @param amount how many NFTs we are minting. */ function isPriceCorrect (uint256 value, uint256 option, uint256 animal, uint256 amount ) internal view returns (bool){ if (option == 1 && animal == 0) return value >= prices[1] * amount; if (option == 1 && animal > 0) return value >= (prices[1] + prices[3]) * amount; if (option == 2 && animal == 0) return value >= (prices[1] + prices[2]) * amount; if (option == 2 && animal > 0) return value >= (prices[1] + prices[2] + prices[3]) * amount; return false; } /** * @notice public mint without allow list. Everyone who pays can mint * @param to the address who will own the NFT * @param option a valid option, 1 without physical 2 with physical * @param amount the number of tokens to mint */ function publicMint(address to, uint256 option,uint256 animal, uint256 amount) payable external whenNotPaused{ require(!isAllowListEnabled, "Minting only with allow list."); require(amount > 0 && amount < 11, "Invalid amount"); require(option > 0 && option < 3, "Not a valid option"); require(animal < 13, "Not a valid animal"); require(isPriceCorrect(msg.value, option, animal, amount), "Not enough ETH sent; check price!"); /// we are ready to mint for(uint i = 0; i < amount; i++) { _safariSurfersMint(to, option, animal); } return; } /** * @notice public mint with allow list. Only the ones submitting proof can mint * @param to the address who will own the NFT * @param option a valid option * @param amount the number of tokens to mint * @param proof merkle tree proof * @param mintId_ address of the minter */ function allowListMint(address to, uint256 option,uint256 animal, uint256 amount, bytes32[] memory proof, bytes16 mintId_) payable external whenNotPaused{ require(isAllowListEnabled, "Allow list not enabled."); require(amount > 0 && amount < 11, "Invalid amount."); require(option > 0 && option < 3, "Not a valid option."); require(animal < 13, "Not a valid animal."); require(isPriceCorrect(msg.value, option, animal, amount), "Not enough ETH sent; check price!"); require (!mintId[mintId_], "Mint id already used."); isAllowedToMint(proof, mintId_); // we are ready to mint mintId[mintId_] = true; for(uint i = 0; i < amount; i++) { _safariSurfersMint(to, option, animal); } return; } /** * @notice admin minting. Bypass most validations. * @param to the address who will own the NFT * @param option a valid option * @param amount the number of tokens to mint */ function adminMint(address to, uint256 option, uint256 animal, uint256 amount) payable external{ require(operators[msg.sender], "only operators"); require(amount > 0, "Invalid amount."); // we are ready to mint for(uint i = 0; i < amount; i++) { _safariSurfersMint(to, option, animal); } return; } /** * @notice the public function validating addresses * @param proof_ hashes validating that a leaf exists inside merkle tree aka merkleRoot **/ function isAllowedToMint(bytes32[] memory proof_, bytes16 mintId_) internal view returns (bool) { require( MerkleProof.verify( proof_, merkleRoot, keccak256(abi.encodePacked(mintId_)) ), "Not in allowed list." ); return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import './EIP712Base.sol'; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import './ContextMixin.sol'; import './NativeMetaTransaction.sol'; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */ abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, Ownable { using SafeMath for uint256; address proxyRegistryAddress; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ERC721(_name, _symbol) { proxyRegistryAddress = _proxyRegistryAddress; _initializeEIP712(_name); } function baseTokenURI() virtual public view returns (string memory); function tokenURI(uint256 _tokenId) override public virtual view returns (string memory) { return string(abi.encodePacked(baseTokenURI(), Strings.toString(_tokenId))); } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public virtual view returns (bool) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override virtual view returns (address sender) { return ContextMixin.msgSender(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } } contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string constant public ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712( string memory name ) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol'; import '../common/ERC721Tradable.sol'; contract NFT is ERC721Tradable, ERC721Burnable, ERC721Pausable { uint public currentTokenId = 0; mapping(address => bool) public operators; string internal _baseTokenURI; constructor( address _proxyRegistryAddress, string memory _name, string memory _symbol, string memory __baseTokenURI, address[] memory _operators ) ERC721Tradable(_name, _symbol, _proxyRegistryAddress) { _baseTokenURI = __baseTokenURI; for(uint i = 0; i < _operators.length; i++) { operators[_operators[i]] = true; } } /* * @dev function to update base URI for NFT marketplaces * @param __baseURI The new base URI */ function updateBaseURI(string memory __baseURI) public onlyOwner { _baseTokenURI = __baseURI; } /* * @dev set operator status * @param _operatorAddress The address to which the changes will be applied * @param _status Enabled or disabled (true/false) */ function updateOperator(address _operatorAddress, bool _status) public onlyOwner { operators[_operatorAddress] = _status; } function pause () public { require(operators[msg.sender], "only operators"); _pause(); } function unpause () public { require(operators[msg.sender], "only operators"); _unpause(); } function baseTokenURI() public view override returns(string memory) { return _baseTokenURI; } function _baseURI() internal view override returns(string memory) { return _baseTokenURI; } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override (Context, ERC721Tradable) view returns (address sender) { return ERC721Tradable._msgSender(); } function isApprovedForAll(address owner, address operator) override (ERC721Tradable, ERC721) public view returns (bool) { return super.isApprovedForAll(owner, operator); } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function tokenURI(uint256 _tokenId) override (ERC721, ERC721Tradable) public view returns (string memory) { return super.tokenURI(_tokenId); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override (ERC721Pausable, ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"proxyRegistryAddress_","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseTokenURI_","type":"string"},{"internalType":"address[]","name":"operators_","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"animal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"option","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MintSafariSurfers","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"SetAnimalPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"SetMintPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"SetPhysicalPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"option","type":"uint256"},{"internalType":"uint256","name":"animal","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"option","type":"uint256"},{"internalType":"uint256","name":"animal","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes16","name":"mintId_","type":"bytes16"}],"name":"allowListMint","outputs":[],"stateMutability":"payable","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":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowListEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes16","name":"","type":"bytes16"}],"name":"mintId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"option","type":"uint256"},{"internalType":"uint256","name":"animal","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setAllowListEnabled","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":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_option","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mint","type":"uint256"},{"internalType":"uint256","name":"physical","type":"uint256"},{"internalType":"uint256","name":"animal","type":"uint256"}],"name":"setPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"__baseURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operatorAddress","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600a805460ff191690556000600f553480156200002057600080fd5b506040516200408b3803806200408b833981016040819052620000439162000527565b84848484848383868282816000908051906020019062000065929190620003d3565b5080516200007b906001906020840190620003d3565b5050506200009862000092620001ff60201b60201c565b6200021c565b600e80546001600160a01b0319166001600160a01b038316179055620000be836200026e565b5050600e805460ff60a01b19169055508151620000e3906011906020850190620003d3565b5060005b81518110156200015f576001601060008484815181106200011857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620001568162000730565b915050620000e7565b505060156020525050655af3107a40007f27739e4bb5e6f8b5e4b57a047dca8767cc9b982a011081e086cbb0dfa9de818d555050652d79883d20007f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b555050600360005250506509184e72a0007fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c2755506013805460ff191690556200076e565b600062000216620002b860201b620015781760201c565b90505b90565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a5460ff16156200029d5760405162461bcd60e51b8152600401620002949062000698565b60405180910390fd5b620002a881620002cf565b50600a805460ff19166001179055565b6000620002166200037160201b620015871760201c565b6040518060800160405280604f81526020016200403c604f913980516020918201208251838301206040805180820190915260018152603160f81b930192909252907fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6306200033d620003cf565b604051620003539594939291906020016200066c565b60408051601f198184030181529190528051602090910120600b5550565b600033301415620003ca57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620002199050565b503390565b4690565b828054620003e190620006f3565b90600052602060002090601f01602090048101928262000405576000855562000450565b82601f106200042057805160ff191683800117855562000450565b8280016001018555821562000450579182015b828111156200045057825182559160200191906001019062000433565b506200045e92915062000462565b5090565b5b808211156200045e576000815560010162000463565b80516001600160a01b03811681146200049157600080fd5b919050565b600082601f830112620004a7578081fd5b81516001600160401b03811115620004c357620004c362000758565b6020620004d9601f8301601f19168201620006c0565b8281528582848701011115620004ed578384fd5b835b838110156200050c578581018301518282018401528201620004ef565b838111156200051d57848385840101525b5095945050505050565b600080600080600060a086880312156200053f578081fd5b6200054a8662000479565b602087810151919650906001600160401b038082111562000569578384fd5b620005778a838b0162000496565b965060408901519150808211156200058d578384fd5b6200059b8a838b0162000496565b95506060890151915080821115620005b1578384fd5b620005bf8a838b0162000496565b94506080890151915080821115620005d5578384fd5b818901915089601f830112620005e9578384fd5b815181811115620005fe57620005fe62000758565b838102915062000610848301620006c0565b8181528481019084860184860187018e10156200062b578788fd5b8795505b838610156200065857620006438162000479565b8352600195909501949186019186016200062f565b508096505050505050509295509295909350565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b6020808252600e908201526d185b1c9958591e481a5b9a5d195960921b604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715620006eb57620006eb62000758565b604052919050565b6002810460018216806200070857607f821691505b602082108114156200072a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200075157634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6138be806200077e6000396000f3fe6080604052600436106102715760003560e01c80635c975abb1161014f578063a88fe42d116100c1578063e5d720a71161007a578063e5d720a7146106cb578063e985e9c5146106de578063efeadb6d146106fe578063f0610e271461071e578063f2fde38b14610731578063f7d975771461075157610271565b8063a88fe42d14610623578063ad396a1014610643578063b88d4fde14610656578063bc31c1c114610676578063c87b56dd14610696578063d547cfb7146106b657610271565b80637cb64759116101135780637cb64759146105845780638456cb59146105a45780638da5cb5b146105b9578063931688cb146105ce57806395d89b41146105ee578063a22cb4651461060357610271565b80635c975abb146104fa5780636352211e1461050f5780636d44a3b21461052f57806370a082311461054f578063715018a61461056f57610271565b80632d0335ab116101e85780633ccfd60b116101ac5780633ccfd60b1461045b5780633f4ba83a1461047057806342842e0e1461048557806342966c68146104a557806346f720d2146104c55780634f6ccce7146104da57610271565b80632d0335ab146103d15780632eb4a7ab146103f15780632f745c59146104065780633408e4701461042657806339843ba91461043b57610271565b80630c53c51c1161023a5780630c53c51c1461033f5780630f7e59701461035257806313e7c9d81461036757806318160ddd1461038757806320379ee51461039c57806323b872dd146103b157610271565b80629a9b7b1461027657806301ffc9a7146102a157806306fdde03146102ce578063081812fc146102f0578063095ea7b31461031d575b600080fd5b34801561028257600080fd5b5061028b610771565b6040516102989190612d92565b60405180910390f35b3480156102ad57600080fd5b506102c16102bc366004612b3d565b610777565b6040516102989190612d87565b3480156102da57600080fd5b506102e361078a565b6040516102989190612ddd565b3480156102fc57600080fd5b5061031061030b366004612b25565b61081d565b6040516102989190612d01565b34801561032957600080fd5b5061033d6103383660046129a4565b610869565b005b6102e361034d366004612929565b610901565b34801561035e57600080fd5b506102e3610a81565b34801561037357600080fd5b506102c16103823660046127f7565b610a9e565b34801561039357600080fd5b5061028b610ab3565b3480156103a857600080fd5b5061028b610ab9565b3480156103bd57600080fd5b5061033d6103cc36600461284b565b610abf565b3480156103dd57600080fd5b5061028b6103ec3660046127f7565b610af7565b3480156103fd57600080fd5b5061028b610b12565b34801561041257600080fd5b5061028b6104213660046129a4565b610b18565b34801561043257600080fd5b5061028b610b6d565b34801561044757600080fd5b506102c1610456366004612b0b565b610b71565b34801561046757600080fd5b5061033d610b86565b34801561047c57600080fd5b5061033d610be4565b34801561049157600080fd5b5061033d6104a036600461284b565b610c1d565b3480156104b157600080fd5b5061033d6104c0366004612b25565b610c38565b3480156104d157600080fd5b506102c1610c68565b3480156104e657600080fd5b5061028b6104f5366004612b25565b610c71565b34801561050657600080fd5b506102c1610ccc565b34801561051b57600080fd5b5061031061052a366004612b25565b610cdc565b34801561053b57600080fd5b5061033d61054a3660046128f5565b610d11565b34801561055b57600080fd5b5061028b61056a3660046127f7565b610d7b565b34801561057b57600080fd5b5061033d610dbf565b34801561059057600080fd5b5061033d61059f366004612b25565b610e08565b3480156105b057600080fd5b5061033d610e3c565b3480156105c557600080fd5b50610310610e73565b3480156105da57600080fd5b5061033d6105e9366004612b91565b610e82565b3480156105fa57600080fd5b506102e3610ed8565b34801561060f57600080fd5b5061033d61061e3660046128f5565b610ee7565b34801561062f57600080fd5b5061033d61063e366004612bf8565b610ef9565b61033d610651366004612a09565b611037565b34801561066257600080fd5b5061033d61067136600461288b565b6111b6565b34801561068257600080fd5b5061028b610691366004612b25565b6111f5565b3480156106a257600080fd5b506102e36106b1366004612b25565b611207565b3480156106c257600080fd5b506102e3611212565b61033d6106d93660046129cf565b611221565b3480156106ea57600080fd5b506102c16106f9366004612813565b611338565b34801561070a57600080fd5b5061033d610719366004612af1565b61134b565b61033d61072c3660046129cf565b61138d565b34801561073d57600080fd5b5061033d61074c3660046127f7565b611404565b34801561075d57600080fd5b5061033d61076c366004612bd7565b611472565b600f5481565b6000610782826115e3565b90505b919050565b6060600080546107999061374e565b80601f01602080910402602001604051908101604052809291908181526020018280546107c59061374e565b80156108125780601f106107e757610100808354040283529160200191610812565b820191906000526020600020905b8154815290600101906020018083116107f557829003601f168201915b505050505090505b90565b600061082882611608565b61084d5760405162461bcd60e51b8152600401610844906133c8565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061087482610cdc565b9050806001600160a01b0316836001600160a01b031614156108a85760405162461bcd60e51b8152600401610844906134b9565b806001600160a01b03166108ba611625565b6001600160a01b031614806108d657506108d6816106f9611625565b6108f25760405162461bcd60e51b81526004016108449061323e565b6108fc838361162f565b505050565b60408051606081810183526001600160a01b0388166000818152600c60209081529085902054845283015291810186905261093f878287878761169d565b61095b5760405162461bcd60e51b815260040161084490613478565b6001600160a01b0387166000908152600c602052604090205461097f906001611743565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b906109cf90899033908a90612d15565b60405180910390a1600080306001600160a01b0316888a6040516020016109f7929190612c80565b60408051601f1981840301815290829052610a1191612c64565b6000604051808303816000865af19150503d8060008114610a4e576040519150601f19603f3d011682016040523d82523d6000602084013e610a53565b606091505b509150915081610a755760405162461bcd60e51b815260040161084490612fc9565b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b60106020526000908152604090205460ff1681565b60085490565b600b5490565b610ad0610aca611625565b8261174f565b610aec5760405162461bcd60e51b8152600401610844906134fa565b6108fc8383836117d4565b6001600160a01b03166000908152600c602052604090205490565b60125481565b6000610b2383610d7b565b8210610b415760405162461bcd60e51b815260040161084490612eba565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b4690565b60146020526000908152604090205460ff1681565b3360009081526010602052604090205460ff16610bb55760405162461bcd60e51b815260040161084490612e92565b60405133904780156108fc02916000818181858888f19350505050158015610be1573d6000803e3d6000fd5b50565b3360009081526010602052604090205460ff16610c135760405162461bcd60e51b815260040161084490612e92565b610c1b611907565b565b6108fc838383604051806020016040528060008152506111b6565b610c43610aca611625565b610c5f5760405162461bcd60e51b815260040161084490613604565b610be181611978565b60135460ff1681565b6000610c7b610ab3565b8210610c995760405162461bcd60e51b81526004016108449061354b565b60088281548110610cba57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e54600160a01b900460ff1690565b6000818152600260205260408120546001600160a01b0316806107825760405162461bcd60e51b81526004016108449061334a565b610d19611625565b6001600160a01b0316610d2a610e73565b6001600160a01b031614610d505760405162461bcd60e51b815260040161084490613443565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b60006001600160a01b038216610da35760405162461bcd60e51b815260040161084490613300565b506001600160a01b031660009081526003602052604090205490565b610dc7611625565b6001600160a01b0316610dd8610e73565b6001600160a01b031614610dfe5760405162461bcd60e51b815260040161084490613443565b610c1b6000611a27565b3360009081526010602052604090205460ff16610e375760405162461bcd60e51b815260040161084490612e92565b601255565b3360009081526010602052604090205460ff16610e6b5760405162461bcd60e51b815260040161084490612e92565b610c1b611a79565b600d546001600160a01b031690565b610e8a611625565b6001600160a01b0316610e9b610e73565b6001600160a01b031614610ec15760405162461bcd60e51b815260040161084490613443565b8051610ed49060119060208401906126bf565b5050565b6060600180546107999061374e565b610ed4610ef2611625565b8383611ada565b3360009081526010602052604090205460ff16610f285760405162461bcd60e51b815260040161084490612e92565b60156020526000805160206138698339815191528390557f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b82905560036000527fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c278190556040517f02ebcb79e897ca3a22313ba6de8fc964409964de565fb4bb6a0927871756b88c90610fbc908590612d92565b60405180910390a17f0cbd78917515d68da4a097860d4827423931402de0fc26b93d74070679a768bf82604051610ff39190612d92565b60405180910390a17f15e459658e5ae1df7c0e59a1af913afbaab0f628d2906b25f16976905524cfa38160405161102a9190612d92565b60405180910390a1505050565b61103f610ccc565b1561105c5760405162461bcd60e51b815260040161084490613214565b60135460ff1661107e5760405162461bcd60e51b81526004016108449061314c565b60008311801561108e5750600b83105b6110aa5760405162461bcd60e51b815260040161084490612df0565b6000851180156110ba5750600385105b6110d65760405162461bcd60e51b815260040161084490613654565b600d84106110f65760405162461bcd60e51b8152600401610844906130a4565b61110234868686611b7d565b61111e5760405162461bcd60e51b8152600401610844906135c3565b6001600160801b0319811660009081526014602052604090205460ff16156111585760405162461bcd60e51b815260040161084490613414565b6111628282611d15565b506001600160801b031981166000908152601460205260408120805460ff191660011790555b838110156111ad5761119b878787611d6f565b806111a581613789565b915050611188565b50505050505050565b6111c76111c1611625565b8361174f565b6111e35760405162461bcd60e51b8152600401610844906134fa565b6111ef84848484611dce565b50505050565b60156020526000908152604090205481565b606061078282611e01565b6060601180546107999061374e565b611229610ccc565b156112465760405162461bcd60e51b815260040161084490613214565b60135460ff16156112695760405162461bcd60e51b8152600401610844906132c9565b6000811180156112795750600b81105b6112955760405162461bcd60e51b81526004016108449061307c565b6000831180156112a55750600383105b6112c15760405162461bcd60e51b815260040161084490612f57565b600d82106112e15760405162461bcd60e51b815260040161084490613597565b6112ed34848484611b7d565b6113095760405162461bcd60e51b8152600401610844906135c3565b60005b818110156113315761131f858585611d6f565b8061132981613789565b91505061130c565b5050505050565b60006113448383611e3b565b9392505050565b3360009081526010602052604090205460ff1661137a5760405162461bcd60e51b815260040161084490612e92565b6013805460ff1916911515919091179055565b3360009081526010602052604090205460ff166113bc5760405162461bcd60e51b815260040161084490612e92565b600081116113dc5760405162461bcd60e51b815260040161084490612df0565b60005b81811015611331576113f2858585611d6f565b806113fc81613789565b9150506113df565b61140c611625565b6001600160a01b031661141d610e73565b6001600160a01b0316146114435760405162461bcd60e51b815260040161084490613443565b6001600160a01b0381166114695760405162461bcd60e51b815260040161084490612f83565b610be181611a27565b3360009081526010602052604090205460ff166114a15760405162461bcd60e51b815260040161084490612e92565b600082815260156020526040902081905560018214156114f3577f02ebcb79e897ca3a22313ba6de8fc964409964de565fb4bb6a0927871756b88c816040516114ea9190612d92565b60405180910390a15b8160021415611534577f0cbd78917515d68da4a097860d4827423931402de0fc26b93d74070679a768bf8160405161152b9190612d92565b60405180910390a15b8160031415610ed4577f15e459658e5ae1df7c0e59a1af913afbaab0f628d2906b25f16976905524cfa38160405161156c9190612d92565b60405180910390a15050565b6000611582611587565b905090565b6000333014156115de57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061081a9050565b503390565b60006001600160e01b0319821663780e9d6360e01b1480610782575061078282611ee7565b6000908152600260205260409020546001600160a01b0316151590565b6000611582611578565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061166482610cdc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166116c55760405162461bcd60e51b8152600401610844906131cf565b60016116d86116d387611f27565b611f85565b838686604051600081526020016040526040516116f89493929190612dbf565b6020604051602081039080840390855afa15801561171a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600061134482846136c0565b600061175a82611608565b6117765760405162461bcd60e51b815260040161084490613183565b600061178183610cdc565b9050806001600160a01b0316846001600160a01b031614806117bc5750836001600160a01b03166117b18461081d565b6001600160a01b0316145b806117cc57506117cc8185611338565b949350505050565b826001600160a01b03166117e782610cdc565b6001600160a01b03161461180d5760405162461bcd60e51b815260040161084490613000565b6001600160a01b0382166118335760405162461bcd60e51b8152600401610844906130d1565b61183e838383611fa1565b61184960008261162f565b6001600160a01b038316600090815260036020526040812080546001929061187290849061370b565b90915550506001600160a01b03821660009081526003602052604081208054600192906118a09084906136c0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46108fc8383836108fc565b61190f610ccc565b61192b5760405162461bcd60e51b815260040161084490612e64565b600e805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611961611625565b60405161196e9190612d01565b60405180910390a1565b600061198382610cdc565b905061199181600084611fa1565b61199c60008361162f565b6001600160a01b03811660009081526003602052604081208054600192906119c590849061370b565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4610ed4816000846108fc565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611a81610ccc565b15611a9e5760405162461bcd60e51b815260040161084490613214565b600e805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611961611625565b816001600160a01b0316836001600160a01b03161415611b0c5760405162461bcd60e51b815260040161084490613115565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611b70908590612d87565b60405180910390a3505050565b6000836001148015611b8d575082155b15611bc1576001600052601560205260008051602061386983398151915254611bb79083906136ec565b85101590506117cc565b836001148015611bd15750600083115b15611c275760156020527fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c27546001600052600080516020613869833981519152548391611c1d916136c0565b611bb791906136ec565b836002148015611c35575082155b15611c815760156020527f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b546001600052600080516020613869833981519152548391611c1d916136c0565b836002148015611c915750600083115b15611d0a5760156020527fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c27547f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b54600160005260008051602061386983398151915254849291611d00916136c0565b611c1d91906136c0565b506000949350505050565b6000611d4a8360125484604051602001611d2f9190612c4f565b60405160208183030381529060405280519060200120611fac565b611d665760405162461bcd60e51b81526004016108449061329b565b50600192915050565b600f8054906000611d7f83613789565b9190505550611d9083600f54611fc2565b600f54836001600160a01b03167f7081a00a1fef8e1e3aa09533824bbd89520201b3bec14aae853d5a444dbe17948385604051611b70929190613681565b611dd98484846117d4565b611de584848484611fdc565b6111ef5760405162461bcd60e51b815260040161084490612f05565b6060611e0b611212565b611e14836120f4565b604051602001611e25929190612cb7565b6040516020818303038152906040529050919050565b600e5460405163c455279160e01b81526000916001600160a01b039081169190841690829063c455279190611e74908890600401612d01565b60206040518083038186803b158015611e8c57600080fd5b505afa158015611ea0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec49190612b75565b6001600160a01b03161415611edd576001915050610b67565b6117cc848461220f565b60006001600160e01b031982166380ac58cd60e01b1480611f1857506001600160e01b03198216635b5e139f60e01b145b8061078257506107828261223d565b60006040518060800160405280604381526020016138266043913980516020918201208351848301516040808701518051908601209051611f689501612d9b565b604051602081830303815290604052805190602001209050919050565b6000611f8f610ab9565b82604051602001611f68929190612ce6565b6108fc838383612256565b600082611fb98584612286565b14949350505050565b610ed4828260405180602001604052806000815250612300565b6000611ff0846001600160a01b0316612333565b156120ec57836001600160a01b031663150b7a0261200c611625565b8786866040518563ffffffff1660e01b815260040161202e9493929190612d4a565b602060405180830381600087803b15801561204857600080fd5b505af1925050508015612078575060408051601f3d908101601f1916820190925261207591810190612b59565b60015b6120d2573d8080156120a6576040519150601f19603f3d011682016040523d82523d6000602084013e6120ab565b606091505b5080516120ca5760405162461bcd60e51b815260040161084490612f05565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117cc565b5060016117cc565b60608161211957506040805180820190915260018152600360fc1b6020820152610785565b8160005b8115612143578061212d81613789565b915061213c9050600a836136d8565b915061211d565b60008167ffffffffffffffff81111561216c57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612196576020820181803683370190505b5090505b84156117cc576121ab60018361370b565b91506121b8600a866137a4565b6121c39060306136c0565b60f81b8183815181106121e657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612208600a866136d8565b945061219a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6001600160e01b031981166301ffc9a760e01b14919050565b612261838383612342565b612269610ccc565b156108fc5760405162461bcd60e51b815260040161084490612e19565b600081815b84518110156122f85760008582815181106122b657634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122d8576122d183826123cb565b92506122e5565b6122e281846123cb565b92505b50806122f081613789565b91505061228b565b509392505050565b61230a83836123da565b6123176000848484611fdc565b6108fc5760405162461bcd60e51b815260040161084490612f05565b6001600160a01b03163b151590565b61234d8383836108fc565b6001600160a01b03831661236957612364816124c1565b61238c565b816001600160a01b0316836001600160a01b03161461238c5761238c8382612505565b6001600160a01b0382166123a8576123a3816125a2565b6108fc565b826001600160a01b0316826001600160a01b0316146108fc576108fc828261267b565b60009182526020526040902090565b6001600160a01b0382166124005760405162461bcd60e51b815260040161084490613393565b61240981611608565b156124265760405162461bcd60e51b815260040161084490613045565b61243260008383611fa1565b6001600160a01b038216600090815260036020526040812080546001929061245b9084906136c0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610ed4600083836108fc565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161251284610d7b565b61251c919061370b565b60008381526007602052604090205490915080821461256f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906125b49060019061370b565b600083815260096020526040812054600880549394509092849081106125ea57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061261957634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061265f57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061268683610d7b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546126cb9061374e565b90600052602060002090601f0160209004810192826126ed5760008555612733565b82601f1061270657805160ff1916838001178555612733565b82800160010185558215612733579182015b82811115612733578251825591602001919060010190612718565b5061273f929150612743565b5090565b5b8082111561273f5760008155600101612744565b600067ffffffffffffffff831115612772576127726137e4565b612785601f8401601f191660200161368f565b905082815283838301111561279957600080fd5b828260208301376000602084830101529392505050565b8035801515811461078557600080fd5b80356001600160801b03198116811461078557600080fd5b600082601f8301126127e8578081fd5b61134483833560208501612758565b600060208284031215612808578081fd5b8135611344816137fa565b60008060408385031215612825578081fd5b8235612830816137fa565b91506020830135612840816137fa565b809150509250929050565b60008060006060848603121561285f578081fd5b833561286a816137fa565b9250602084013561287a816137fa565b929592945050506040919091013590565b600080600080608085870312156128a0578081fd5b84356128ab816137fa565b935060208501356128bb816137fa565b925060408501359150606085013567ffffffffffffffff8111156128dd578182fd5b6128e9878288016127d8565b91505092959194509250565b60008060408385031215612907578182fd5b8235612912816137fa565b9150612920602084016127b0565b90509250929050565b600080600080600060a08688031215612940578081fd5b853561294b816137fa565b9450602086013567ffffffffffffffff811115612966578182fd5b612972888289016127d8565b9450506040860135925060608601359150608086013560ff81168114612996578182fd5b809150509295509295909350565b600080604083850312156129b6578182fd5b82356129c1816137fa565b946020939093013593505050565b600080600080608085870312156129e4578384fd5b84356129ef816137fa565b966020860135965060408601359560600135945092505050565b60008060008060008060c08789031215612a21578384fd5b8635612a2c816137fa565b955060208781013595506040880135945060608801359350608088013567ffffffffffffffff80821115612a5e578384fd5b818a0191508a601f830112612a71578384fd5b813581811115612a8357612a836137e4565b8381029150612a9384830161368f565b8181528481019084860184860187018f1015612aad578788fd5b8795505b83861015612acf578035835260019590950194918601918601612ab1565b50809750505050505050612ae560a088016127c0565b90509295509295509295565b600060208284031215612b02578081fd5b611344826127b0565b600060208284031215612b1c578081fd5b611344826127c0565b600060208284031215612b36578081fd5b5035919050565b600060208284031215612b4e578081fd5b81356113448161380f565b600060208284031215612b6a578081fd5b81516113448161380f565b600060208284031215612b86578081fd5b8151611344816137fa565b600060208284031215612ba2578081fd5b813567ffffffffffffffff811115612bb8578182fd5b8201601f81018413612bc8578182fd5b6117cc84823560208401612758565b60008060408385031215612be9578182fd5b50508035926020909101359150565b600080600060608486031215612c0c578081fd5b505081359360208301359350604090920135919050565b60008151808452612c3b816020860160208601613722565b601f01601f19169290920160200192915050565b6001600160801b031991909116815260100190565b60008251612c76818460208701613722565b9190910192915050565b60008351612c92818460208801613722565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008351612cc9818460208801613722565b835190830190612cdd818360208801613722565b01949350505050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03848116825283166020820152606060408201819052600090612d4190830184612c23565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d7d90830184612c23565b9695505050505050565b901515815260200190565b90815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526113446020830184612c23565b6020808252600f908201526e24b73b30b634b21030b6b7bab73a1760891b604082015260600190565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252600e908201526d6f6e6c79206f70657261746f727360901b604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601290820152712737ba1030903b30b634b21037b83a34b7b760711b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604082015260600190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252601390820152722737ba1030903b30b634b21030b734b6b0b61760691b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526017908201527f416c6c6f77206c697374206e6f7420656e61626c65642e000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360408201526424a3a722a960d91b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252601490820152732737ba1034b71030b63637bbb2b2103634b9ba1760611b604082015260600190565b6020808252601d908201527f4d696e74696e67206f6e6c79207769746820616c6c6f77206c6973742e000000604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526015908201527426b4b73a1034b21030b63932b0b23c903ab9b2b21760591b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636040820152600d60fb1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b602080825260129082015271139bdd0818481d985b1a5908185b9a5b585b60721b604082015260600190565b60208082526021908201527f4e6f7420656e6f756768204554482073656e743b20636865636b2070726963656040820152602160f81b606082015260800190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b6020808252601390820152722737ba1030903b30b634b21037b83a34b7b71760691b604082015260600190565b918252602082015260400190565b604051601f8201601f1916810167ffffffffffffffff811182821017156136b8576136b86137e4565b604052919050565b600082198211156136d3576136d36137b8565b500190565b6000826136e7576136e76137ce565b500490565b6000816000190483118215151615613706576137066137b8565b500290565b60008282101561371d5761371d6137b8565b500390565b60005b8381101561373d578181015183820152602001613725565b838111156111ef5750506000910152565b60028104600182168061376257607f821691505b6020821081141561378357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561379d5761379d6137b8565b5060010190565b6000826137b3576137b36137ce565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610be157600080fd5b6001600160e01b031981168114610be157600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652927739e4bb5e6f8b5e4b57a047dca8767cc9b982a011081e086cbb0dfa9de818da26469706673582212206a3d48a245c19d5fd3868c2d02f9d2904cf92628f921166b797b31334106afce64736f6c63430008010033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000d5361666172695375726665727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d5361666172695375726665727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003668747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f736166617269737572666572735f6d657461646174612f000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f55d864462c03cea2230bfb58254d51ee0c3b544000000000000000000000000b8c13681cd3d9246e84727b8eb56329d9bb1a6ad000000000000000000000000fffe14fd73d84cb6b73bf91d134af95cc7ae2c9a
Deployed Bytecode
0x6080604052600436106102715760003560e01c80635c975abb1161014f578063a88fe42d116100c1578063e5d720a71161007a578063e5d720a7146106cb578063e985e9c5146106de578063efeadb6d146106fe578063f0610e271461071e578063f2fde38b14610731578063f7d975771461075157610271565b8063a88fe42d14610623578063ad396a1014610643578063b88d4fde14610656578063bc31c1c114610676578063c87b56dd14610696578063d547cfb7146106b657610271565b80637cb64759116101135780637cb64759146105845780638456cb59146105a45780638da5cb5b146105b9578063931688cb146105ce57806395d89b41146105ee578063a22cb4651461060357610271565b80635c975abb146104fa5780636352211e1461050f5780636d44a3b21461052f57806370a082311461054f578063715018a61461056f57610271565b80632d0335ab116101e85780633ccfd60b116101ac5780633ccfd60b1461045b5780633f4ba83a1461047057806342842e0e1461048557806342966c68146104a557806346f720d2146104c55780634f6ccce7146104da57610271565b80632d0335ab146103d15780632eb4a7ab146103f15780632f745c59146104065780633408e4701461042657806339843ba91461043b57610271565b80630c53c51c1161023a5780630c53c51c1461033f5780630f7e59701461035257806313e7c9d81461036757806318160ddd1461038757806320379ee51461039c57806323b872dd146103b157610271565b80629a9b7b1461027657806301ffc9a7146102a157806306fdde03146102ce578063081812fc146102f0578063095ea7b31461031d575b600080fd5b34801561028257600080fd5b5061028b610771565b6040516102989190612d92565b60405180910390f35b3480156102ad57600080fd5b506102c16102bc366004612b3d565b610777565b6040516102989190612d87565b3480156102da57600080fd5b506102e361078a565b6040516102989190612ddd565b3480156102fc57600080fd5b5061031061030b366004612b25565b61081d565b6040516102989190612d01565b34801561032957600080fd5b5061033d6103383660046129a4565b610869565b005b6102e361034d366004612929565b610901565b34801561035e57600080fd5b506102e3610a81565b34801561037357600080fd5b506102c16103823660046127f7565b610a9e565b34801561039357600080fd5b5061028b610ab3565b3480156103a857600080fd5b5061028b610ab9565b3480156103bd57600080fd5b5061033d6103cc36600461284b565b610abf565b3480156103dd57600080fd5b5061028b6103ec3660046127f7565b610af7565b3480156103fd57600080fd5b5061028b610b12565b34801561041257600080fd5b5061028b6104213660046129a4565b610b18565b34801561043257600080fd5b5061028b610b6d565b34801561044757600080fd5b506102c1610456366004612b0b565b610b71565b34801561046757600080fd5b5061033d610b86565b34801561047c57600080fd5b5061033d610be4565b34801561049157600080fd5b5061033d6104a036600461284b565b610c1d565b3480156104b157600080fd5b5061033d6104c0366004612b25565b610c38565b3480156104d157600080fd5b506102c1610c68565b3480156104e657600080fd5b5061028b6104f5366004612b25565b610c71565b34801561050657600080fd5b506102c1610ccc565b34801561051b57600080fd5b5061031061052a366004612b25565b610cdc565b34801561053b57600080fd5b5061033d61054a3660046128f5565b610d11565b34801561055b57600080fd5b5061028b61056a3660046127f7565b610d7b565b34801561057b57600080fd5b5061033d610dbf565b34801561059057600080fd5b5061033d61059f366004612b25565b610e08565b3480156105b057600080fd5b5061033d610e3c565b3480156105c557600080fd5b50610310610e73565b3480156105da57600080fd5b5061033d6105e9366004612b91565b610e82565b3480156105fa57600080fd5b506102e3610ed8565b34801561060f57600080fd5b5061033d61061e3660046128f5565b610ee7565b34801561062f57600080fd5b5061033d61063e366004612bf8565b610ef9565b61033d610651366004612a09565b611037565b34801561066257600080fd5b5061033d61067136600461288b565b6111b6565b34801561068257600080fd5b5061028b610691366004612b25565b6111f5565b3480156106a257600080fd5b506102e36106b1366004612b25565b611207565b3480156106c257600080fd5b506102e3611212565b61033d6106d93660046129cf565b611221565b3480156106ea57600080fd5b506102c16106f9366004612813565b611338565b34801561070a57600080fd5b5061033d610719366004612af1565b61134b565b61033d61072c3660046129cf565b61138d565b34801561073d57600080fd5b5061033d61074c3660046127f7565b611404565b34801561075d57600080fd5b5061033d61076c366004612bd7565b611472565b600f5481565b6000610782826115e3565b90505b919050565b6060600080546107999061374e565b80601f01602080910402602001604051908101604052809291908181526020018280546107c59061374e565b80156108125780601f106107e757610100808354040283529160200191610812565b820191906000526020600020905b8154815290600101906020018083116107f557829003601f168201915b505050505090505b90565b600061082882611608565b61084d5760405162461bcd60e51b8152600401610844906133c8565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061087482610cdc565b9050806001600160a01b0316836001600160a01b031614156108a85760405162461bcd60e51b8152600401610844906134b9565b806001600160a01b03166108ba611625565b6001600160a01b031614806108d657506108d6816106f9611625565b6108f25760405162461bcd60e51b81526004016108449061323e565b6108fc838361162f565b505050565b60408051606081810183526001600160a01b0388166000818152600c60209081529085902054845283015291810186905261093f878287878761169d565b61095b5760405162461bcd60e51b815260040161084490613478565b6001600160a01b0387166000908152600c602052604090205461097f906001611743565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b906109cf90899033908a90612d15565b60405180910390a1600080306001600160a01b0316888a6040516020016109f7929190612c80565b60408051601f1981840301815290829052610a1191612c64565b6000604051808303816000865af19150503d8060008114610a4e576040519150601f19603f3d011682016040523d82523d6000602084013e610a53565b606091505b509150915081610a755760405162461bcd60e51b815260040161084490612fc9565b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b60106020526000908152604090205460ff1681565b60085490565b600b5490565b610ad0610aca611625565b8261174f565b610aec5760405162461bcd60e51b8152600401610844906134fa565b6108fc8383836117d4565b6001600160a01b03166000908152600c602052604090205490565b60125481565b6000610b2383610d7b565b8210610b415760405162461bcd60e51b815260040161084490612eba565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b4690565b60146020526000908152604090205460ff1681565b3360009081526010602052604090205460ff16610bb55760405162461bcd60e51b815260040161084490612e92565b60405133904780156108fc02916000818181858888f19350505050158015610be1573d6000803e3d6000fd5b50565b3360009081526010602052604090205460ff16610c135760405162461bcd60e51b815260040161084490612e92565b610c1b611907565b565b6108fc838383604051806020016040528060008152506111b6565b610c43610aca611625565b610c5f5760405162461bcd60e51b815260040161084490613604565b610be181611978565b60135460ff1681565b6000610c7b610ab3565b8210610c995760405162461bcd60e51b81526004016108449061354b565b60088281548110610cba57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e54600160a01b900460ff1690565b6000818152600260205260408120546001600160a01b0316806107825760405162461bcd60e51b81526004016108449061334a565b610d19611625565b6001600160a01b0316610d2a610e73565b6001600160a01b031614610d505760405162461bcd60e51b815260040161084490613443565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b60006001600160a01b038216610da35760405162461bcd60e51b815260040161084490613300565b506001600160a01b031660009081526003602052604090205490565b610dc7611625565b6001600160a01b0316610dd8610e73565b6001600160a01b031614610dfe5760405162461bcd60e51b815260040161084490613443565b610c1b6000611a27565b3360009081526010602052604090205460ff16610e375760405162461bcd60e51b815260040161084490612e92565b601255565b3360009081526010602052604090205460ff16610e6b5760405162461bcd60e51b815260040161084490612e92565b610c1b611a79565b600d546001600160a01b031690565b610e8a611625565b6001600160a01b0316610e9b610e73565b6001600160a01b031614610ec15760405162461bcd60e51b815260040161084490613443565b8051610ed49060119060208401906126bf565b5050565b6060600180546107999061374e565b610ed4610ef2611625565b8383611ada565b3360009081526010602052604090205460ff16610f285760405162461bcd60e51b815260040161084490612e92565b60156020526000805160206138698339815191528390557f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b82905560036000527fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c278190556040517f02ebcb79e897ca3a22313ba6de8fc964409964de565fb4bb6a0927871756b88c90610fbc908590612d92565b60405180910390a17f0cbd78917515d68da4a097860d4827423931402de0fc26b93d74070679a768bf82604051610ff39190612d92565b60405180910390a17f15e459658e5ae1df7c0e59a1af913afbaab0f628d2906b25f16976905524cfa38160405161102a9190612d92565b60405180910390a1505050565b61103f610ccc565b1561105c5760405162461bcd60e51b815260040161084490613214565b60135460ff1661107e5760405162461bcd60e51b81526004016108449061314c565b60008311801561108e5750600b83105b6110aa5760405162461bcd60e51b815260040161084490612df0565b6000851180156110ba5750600385105b6110d65760405162461bcd60e51b815260040161084490613654565b600d84106110f65760405162461bcd60e51b8152600401610844906130a4565b61110234868686611b7d565b61111e5760405162461bcd60e51b8152600401610844906135c3565b6001600160801b0319811660009081526014602052604090205460ff16156111585760405162461bcd60e51b815260040161084490613414565b6111628282611d15565b506001600160801b031981166000908152601460205260408120805460ff191660011790555b838110156111ad5761119b878787611d6f565b806111a581613789565b915050611188565b50505050505050565b6111c76111c1611625565b8361174f565b6111e35760405162461bcd60e51b8152600401610844906134fa565b6111ef84848484611dce565b50505050565b60156020526000908152604090205481565b606061078282611e01565b6060601180546107999061374e565b611229610ccc565b156112465760405162461bcd60e51b815260040161084490613214565b60135460ff16156112695760405162461bcd60e51b8152600401610844906132c9565b6000811180156112795750600b81105b6112955760405162461bcd60e51b81526004016108449061307c565b6000831180156112a55750600383105b6112c15760405162461bcd60e51b815260040161084490612f57565b600d82106112e15760405162461bcd60e51b815260040161084490613597565b6112ed34848484611b7d565b6113095760405162461bcd60e51b8152600401610844906135c3565b60005b818110156113315761131f858585611d6f565b8061132981613789565b91505061130c565b5050505050565b60006113448383611e3b565b9392505050565b3360009081526010602052604090205460ff1661137a5760405162461bcd60e51b815260040161084490612e92565b6013805460ff1916911515919091179055565b3360009081526010602052604090205460ff166113bc5760405162461bcd60e51b815260040161084490612e92565b600081116113dc5760405162461bcd60e51b815260040161084490612df0565b60005b81811015611331576113f2858585611d6f565b806113fc81613789565b9150506113df565b61140c611625565b6001600160a01b031661141d610e73565b6001600160a01b0316146114435760405162461bcd60e51b815260040161084490613443565b6001600160a01b0381166114695760405162461bcd60e51b815260040161084490612f83565b610be181611a27565b3360009081526010602052604090205460ff166114a15760405162461bcd60e51b815260040161084490612e92565b600082815260156020526040902081905560018214156114f3577f02ebcb79e897ca3a22313ba6de8fc964409964de565fb4bb6a0927871756b88c816040516114ea9190612d92565b60405180910390a15b8160021415611534577f0cbd78917515d68da4a097860d4827423931402de0fc26b93d74070679a768bf8160405161152b9190612d92565b60405180910390a15b8160031415610ed4577f15e459658e5ae1df7c0e59a1af913afbaab0f628d2906b25f16976905524cfa38160405161156c9190612d92565b60405180910390a15050565b6000611582611587565b905090565b6000333014156115de57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061081a9050565b503390565b60006001600160e01b0319821663780e9d6360e01b1480610782575061078282611ee7565b6000908152600260205260409020546001600160a01b0316151590565b6000611582611578565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061166482610cdc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166116c55760405162461bcd60e51b8152600401610844906131cf565b60016116d86116d387611f27565b611f85565b838686604051600081526020016040526040516116f89493929190612dbf565b6020604051602081039080840390855afa15801561171a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600061134482846136c0565b600061175a82611608565b6117765760405162461bcd60e51b815260040161084490613183565b600061178183610cdc565b9050806001600160a01b0316846001600160a01b031614806117bc5750836001600160a01b03166117b18461081d565b6001600160a01b0316145b806117cc57506117cc8185611338565b949350505050565b826001600160a01b03166117e782610cdc565b6001600160a01b03161461180d5760405162461bcd60e51b815260040161084490613000565b6001600160a01b0382166118335760405162461bcd60e51b8152600401610844906130d1565b61183e838383611fa1565b61184960008261162f565b6001600160a01b038316600090815260036020526040812080546001929061187290849061370b565b90915550506001600160a01b03821660009081526003602052604081208054600192906118a09084906136c0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46108fc8383836108fc565b61190f610ccc565b61192b5760405162461bcd60e51b815260040161084490612e64565b600e805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611961611625565b60405161196e9190612d01565b60405180910390a1565b600061198382610cdc565b905061199181600084611fa1565b61199c60008361162f565b6001600160a01b03811660009081526003602052604081208054600192906119c590849061370b565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4610ed4816000846108fc565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611a81610ccc565b15611a9e5760405162461bcd60e51b815260040161084490613214565b600e805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611961611625565b816001600160a01b0316836001600160a01b03161415611b0c5760405162461bcd60e51b815260040161084490613115565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611b70908590612d87565b60405180910390a3505050565b6000836001148015611b8d575082155b15611bc1576001600052601560205260008051602061386983398151915254611bb79083906136ec565b85101590506117cc565b836001148015611bd15750600083115b15611c275760156020527fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c27546001600052600080516020613869833981519152548391611c1d916136c0565b611bb791906136ec565b836002148015611c35575082155b15611c815760156020527f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b546001600052600080516020613869833981519152548391611c1d916136c0565b836002148015611c915750600083115b15611d0a5760156020527fb3a65e8276bd33b3e4f7d6081ebd9899187264822358758dca2e2bc37b2a9c27547f07d4ff730d9753101d832555708a37d38c2c45fce8cacaefc99f06074e93fe0b54600160005260008051602061386983398151915254849291611d00916136c0565b611c1d91906136c0565b506000949350505050565b6000611d4a8360125484604051602001611d2f9190612c4f565b60405160208183030381529060405280519060200120611fac565b611d665760405162461bcd60e51b81526004016108449061329b565b50600192915050565b600f8054906000611d7f83613789565b9190505550611d9083600f54611fc2565b600f54836001600160a01b03167f7081a00a1fef8e1e3aa09533824bbd89520201b3bec14aae853d5a444dbe17948385604051611b70929190613681565b611dd98484846117d4565b611de584848484611fdc565b6111ef5760405162461bcd60e51b815260040161084490612f05565b6060611e0b611212565b611e14836120f4565b604051602001611e25929190612cb7565b6040516020818303038152906040529050919050565b600e5460405163c455279160e01b81526000916001600160a01b039081169190841690829063c455279190611e74908890600401612d01565b60206040518083038186803b158015611e8c57600080fd5b505afa158015611ea0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec49190612b75565b6001600160a01b03161415611edd576001915050610b67565b6117cc848461220f565b60006001600160e01b031982166380ac58cd60e01b1480611f1857506001600160e01b03198216635b5e139f60e01b145b8061078257506107828261223d565b60006040518060800160405280604381526020016138266043913980516020918201208351848301516040808701518051908601209051611f689501612d9b565b604051602081830303815290604052805190602001209050919050565b6000611f8f610ab9565b82604051602001611f68929190612ce6565b6108fc838383612256565b600082611fb98584612286565b14949350505050565b610ed4828260405180602001604052806000815250612300565b6000611ff0846001600160a01b0316612333565b156120ec57836001600160a01b031663150b7a0261200c611625565b8786866040518563ffffffff1660e01b815260040161202e9493929190612d4a565b602060405180830381600087803b15801561204857600080fd5b505af1925050508015612078575060408051601f3d908101601f1916820190925261207591810190612b59565b60015b6120d2573d8080156120a6576040519150601f19603f3d011682016040523d82523d6000602084013e6120ab565b606091505b5080516120ca5760405162461bcd60e51b815260040161084490612f05565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117cc565b5060016117cc565b60608161211957506040805180820190915260018152600360fc1b6020820152610785565b8160005b8115612143578061212d81613789565b915061213c9050600a836136d8565b915061211d565b60008167ffffffffffffffff81111561216c57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612196576020820181803683370190505b5090505b84156117cc576121ab60018361370b565b91506121b8600a866137a4565b6121c39060306136c0565b60f81b8183815181106121e657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612208600a866136d8565b945061219a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6001600160e01b031981166301ffc9a760e01b14919050565b612261838383612342565b612269610ccc565b156108fc5760405162461bcd60e51b815260040161084490612e19565b600081815b84518110156122f85760008582815181106122b657634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122d8576122d183826123cb565b92506122e5565b6122e281846123cb565b92505b50806122f081613789565b91505061228b565b509392505050565b61230a83836123da565b6123176000848484611fdc565b6108fc5760405162461bcd60e51b815260040161084490612f05565b6001600160a01b03163b151590565b61234d8383836108fc565b6001600160a01b03831661236957612364816124c1565b61238c565b816001600160a01b0316836001600160a01b03161461238c5761238c8382612505565b6001600160a01b0382166123a8576123a3816125a2565b6108fc565b826001600160a01b0316826001600160a01b0316146108fc576108fc828261267b565b60009182526020526040902090565b6001600160a01b0382166124005760405162461bcd60e51b815260040161084490613393565b61240981611608565b156124265760405162461bcd60e51b815260040161084490613045565b61243260008383611fa1565b6001600160a01b038216600090815260036020526040812080546001929061245b9084906136c0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610ed4600083836108fc565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161251284610d7b565b61251c919061370b565b60008381526007602052604090205490915080821461256f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906125b49060019061370b565b600083815260096020526040812054600880549394509092849081106125ea57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061261957634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061265f57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061268683610d7b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546126cb9061374e565b90600052602060002090601f0160209004810192826126ed5760008555612733565b82601f1061270657805160ff1916838001178555612733565b82800160010185558215612733579182015b82811115612733578251825591602001919060010190612718565b5061273f929150612743565b5090565b5b8082111561273f5760008155600101612744565b600067ffffffffffffffff831115612772576127726137e4565b612785601f8401601f191660200161368f565b905082815283838301111561279957600080fd5b828260208301376000602084830101529392505050565b8035801515811461078557600080fd5b80356001600160801b03198116811461078557600080fd5b600082601f8301126127e8578081fd5b61134483833560208501612758565b600060208284031215612808578081fd5b8135611344816137fa565b60008060408385031215612825578081fd5b8235612830816137fa565b91506020830135612840816137fa565b809150509250929050565b60008060006060848603121561285f578081fd5b833561286a816137fa565b9250602084013561287a816137fa565b929592945050506040919091013590565b600080600080608085870312156128a0578081fd5b84356128ab816137fa565b935060208501356128bb816137fa565b925060408501359150606085013567ffffffffffffffff8111156128dd578182fd5b6128e9878288016127d8565b91505092959194509250565b60008060408385031215612907578182fd5b8235612912816137fa565b9150612920602084016127b0565b90509250929050565b600080600080600060a08688031215612940578081fd5b853561294b816137fa565b9450602086013567ffffffffffffffff811115612966578182fd5b612972888289016127d8565b9450506040860135925060608601359150608086013560ff81168114612996578182fd5b809150509295509295909350565b600080604083850312156129b6578182fd5b82356129c1816137fa565b946020939093013593505050565b600080600080608085870312156129e4578384fd5b84356129ef816137fa565b966020860135965060408601359560600135945092505050565b60008060008060008060c08789031215612a21578384fd5b8635612a2c816137fa565b955060208781013595506040880135945060608801359350608088013567ffffffffffffffff80821115612a5e578384fd5b818a0191508a601f830112612a71578384fd5b813581811115612a8357612a836137e4565b8381029150612a9384830161368f565b8181528481019084860184860187018f1015612aad578788fd5b8795505b83861015612acf578035835260019590950194918601918601612ab1565b50809750505050505050612ae560a088016127c0565b90509295509295509295565b600060208284031215612b02578081fd5b611344826127b0565b600060208284031215612b1c578081fd5b611344826127c0565b600060208284031215612b36578081fd5b5035919050565b600060208284031215612b4e578081fd5b81356113448161380f565b600060208284031215612b6a578081fd5b81516113448161380f565b600060208284031215612b86578081fd5b8151611344816137fa565b600060208284031215612ba2578081fd5b813567ffffffffffffffff811115612bb8578182fd5b8201601f81018413612bc8578182fd5b6117cc84823560208401612758565b60008060408385031215612be9578182fd5b50508035926020909101359150565b600080600060608486031215612c0c578081fd5b505081359360208301359350604090920135919050565b60008151808452612c3b816020860160208601613722565b601f01601f19169290920160200192915050565b6001600160801b031991909116815260100190565b60008251612c76818460208701613722565b9190910192915050565b60008351612c92818460208801613722565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008351612cc9818460208801613722565b835190830190612cdd818360208801613722565b01949350505050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03848116825283166020820152606060408201819052600090612d4190830184612c23565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d7d90830184612c23565b9695505050505050565b901515815260200190565b90815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526113446020830184612c23565b6020808252600f908201526e24b73b30b634b21030b6b7bab73a1760891b604082015260600190565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252600e908201526d6f6e6c79206f70657261746f727360901b604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601290820152712737ba1030903b30b634b21037b83a34b7b760711b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604082015260600190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252601390820152722737ba1030903b30b634b21030b734b6b0b61760691b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526017908201527f416c6c6f77206c697374206e6f7420656e61626c65642e000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360408201526424a3a722a960d91b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252601490820152732737ba1034b71030b63637bbb2b2103634b9ba1760611b604082015260600190565b6020808252601d908201527f4d696e74696e67206f6e6c79207769746820616c6c6f77206c6973742e000000604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526015908201527426b4b73a1034b21030b63932b0b23c903ab9b2b21760591b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636040820152600d60fb1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b602080825260129082015271139bdd0818481d985b1a5908185b9a5b585b60721b604082015260600190565b60208082526021908201527f4e6f7420656e6f756768204554482073656e743b20636865636b2070726963656040820152602160f81b606082015260800190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b6020808252601390820152722737ba1030903b30b634b21037b83a34b7b71760691b604082015260600190565b918252602082015260400190565b604051601f8201601f1916810167ffffffffffffffff811182821017156136b8576136b86137e4565b604052919050565b600082198211156136d3576136d36137b8565b500190565b6000826136e7576136e76137ce565b500490565b6000816000190483118215151615613706576137066137b8565b500290565b60008282101561371d5761371d6137b8565b500390565b60005b8381101561373d578181015183820152602001613725565b838111156111ef5750506000910152565b60028104600182168061376257607f821691505b6020821081141561378357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561379d5761379d6137b8565b5060010190565b6000826137b3576137b36137ce565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610be157600080fd5b6001600160e01b031981168114610be157600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652927739e4bb5e6f8b5e4b57a047dca8767cc9b982a011081e086cbb0dfa9de818da26469706673582212206a3d48a245c19d5fd3868c2d02f9d2904cf92628f921166b797b31334106afce64736f6c63430008010033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000d5361666172695375726665727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d5361666172695375726665727300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003668747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f736166617269737572666572735f6d657461646174612f000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f55d864462c03cea2230bfb58254d51ee0c3b544000000000000000000000000b8c13681cd3d9246e84727b8eb56329d9bb1a6ad000000000000000000000000fffe14fd73d84cb6b73bf91d134af95cc7ae2c9a
-----Decoded View---------------
Arg [0] : proxyRegistryAddress_ (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [1] : name_ (string): SafariSurfers
Arg [2] : symbol_ (string): SafariSurfers
Arg [3] : baseTokenURI_ (string): https://storage.googleapis.com/safarisurfers_metadata/
Arg [4] : operators_ (address[]): 0xF55D864462C03cEa2230bFb58254d51eE0C3B544,0xB8c13681Cd3d9246E84727b8eB56329d9Bb1a6AD,0xffFE14Fd73D84CB6b73BF91D134AF95Cc7Ae2C9a
-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [6] : 5361666172695375726665727300000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [8] : 5361666172695375726665727300000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [10] : 68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f73
Arg [11] : 6166617269737572666572735f6d657461646174612f00000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 000000000000000000000000f55d864462c03cea2230bfb58254d51ee0c3b544
Arg [14] : 000000000000000000000000b8c13681cd3d9246e84727b8eb56329d9bb1a6ad
Arg [15] : 000000000000000000000000fffe14fd73d84cb6b73bf91d134af95cc7ae2c9a
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.