Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
1,554 Elefren
Holders
428
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 ElefrenLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ElefrenETH
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./ERC721NES.sol"; abstract contract Security { modifier onlySender() { require(tx.origin == msg.sender, "The caller is another contract"); _; } } interface IFSBContract { function mintAirdrop(address _minter, uint256 _mintAmount) external; } contract ElefrenETH is Ownable, ERC721NES, Security { uint256 public maxSupply = 5555; uint256 public maxSupplyBorneo = 2877; bool public mintIsActive; uint256 public mintWlCost; uint256 public mintPublicCost; string private _baseTokenURI; mapping(address => uint256) private minter; mapping(address => bool) private freeMinter; mapping(address => uint256) private maximusMinter; bytes32 public merkleRoot; address signatureAddress = address(0x109491702DC66B91E5FAD7d586889679a86A8B76); mapping(uint256 => bool) private _nonces; uint256 multiplier = 1; // For each token, this map stores the current block.number // if token is mapped to 0, it is currently unstaked. mapping(uint256 => uint256) public tokenToWhenStaked; // For each token, this map stores the total duration staked // measured by block.number mapping(uint256 => uint256) public tokenToTotalDurationStaked; Phase public currentPhase; IFSBContract public fsbToken; enum Phase { PhaseT, PhaseOO, PhaseTT, PhaseOOT } constructor() ERC721A("ELEFREN", "Elefren") { currentPhase = Phase.PhaseT; } function mintWl(bytes32[] calldata _merkleProof, uint256 _mintAmount, bool _toStake) external payable onlySender { uint256 _totalSupply = totalSupply(); require(mintIsActive, "Mint is not live"); require(_totalSupply < maxSupplyBorneo, "Sold Out Borneo Phase"); require(_totalSupply < maxSupply, "Sold Out"); require(msg.value >= (_mintAmount * mintWlCost), "Not enought ETH"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Not allowed to mint" ); minter[msg.sender] += _mintAmount; _elefrenMint(_mintAmount, _toStake); fsbToken.mintAirdrop(msg.sender, _mintAmount); } function mintPublic(uint256 _mintAmount, bool _toStake) external payable onlySender { uint256 _totalSupply = totalSupply(); require(mintIsActive, "Mint is not live"); require(currentPhase == Phase.PhaseOO, "Public mint is not live"); require(_totalSupply < maxSupplyBorneo, "Sold Out Borneo Phase"); require(_totalSupply < maxSupply, "Sold Out"); require(msg.value >= (_mintAmount * mintPublicCost), "Not enought ETH"); minter[msg.sender] += _mintAmount; _elefrenMint(_mintAmount, _toStake); fsbToken.mintAirdrop(msg.sender, _mintAmount); } function mintFreeMaximus(bytes32[] calldata _merkleProof, bool _toStake) external onlySender { uint256 _totalSupply = totalSupply(); require(currentPhase >= Phase.PhaseTT, "Maximus phase TT is not live"); require(maxSupply > _totalSupply, "Sold Out"); require(!freeMinter[msg.sender], "You have already minted"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Not allowed to mint" ); freeMinter[msg.sender] = true; _elefrenMint(1, _toStake); } function mintMaximus(uint256 _mintAmount, bytes32[] calldata _merkleProof, bool _toStake) external onlySender { uint256 _totalSupply = totalSupply(); require(currentPhase >= Phase.PhaseOOT, "Maximus phase OOT is not live"); require(maxSupply > _totalSupply, "Sold Out"); require(maximusMinter[msg.sender] + _mintAmount <= minter[msg.sender], "Exceed maximum allowed to mint"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Not allowed to mint" ); maximusMinter[msg.sender] += _mintAmount; _elefrenMint(_mintAmount, _toStake); } function _elefrenMint(uint256 _quantity, bool _toStake) private { uint256 startIndex = _currentIndex; _mint(msg.sender, _quantity, "", false); if(_toStake) { for(uint256 i = startIndex; i < startIndex + _quantity; i++) { stake(i); } } } /** * @dev returns the additional balance between when token was staked until now */ function getCurrentAdditionalBalance(uint256 tokenId) public view returns (uint256) { if (tokenToWhenStaked[tokenId] > 0) { return block.number - tokenToWhenStaked[tokenId]; } else { return 0; } } /** * @dev returns total duration the token has been staked. */ function getCumulativeDurationStaked(uint256 tokenId) public view returns (uint256) { return tokenToTotalDurationStaked[tokenId] + getCurrentAdditionalBalance(tokenId); } /** * @dev Returns the amount of tokens rewarded up until this point. */ function getStakingRewards(uint256 tokenId) public view returns (uint256) { return getCumulativeDurationStaked(tokenId) * multiplier; } /** * @dev Stakes a token and records the start block number or time stamp. */ function stake(uint256 tokenId) public { require( ownerOf(tokenId) == msg.sender, "You are not the owner of this token" ); tokenToWhenStaked[tokenId] = block.number; _stake(tokenId); } /** * @dev Unstakes a token and records the start block number or time stamp. */ function unstake(uint256 tokenId, uint256 _nonce, bytes memory _signature) public _validSignature(msg.sender, tokenId, _nonce, _signature) { require( ownerOf(tokenId) == msg.sender, "You are not the owner of this token" ); require(!_nonces[_nonce], "Nonce already used"); _nonces[_nonce] = true; tokenToTotalDurationStaked[tokenId] += getCurrentAdditionalBalance( tokenId ); _unstake(tokenId); } modifier _validSignature(address _to, uint256 _tokenId, uint256 _nonce, bytes memory _signature){ bytes32 message = keccak256(abi.encodePacked(_to, _tokenId, _nonce)); assert(ECDSA.recover(message, _signature) == signatureAddress); _; } /* ADMIN ESSENTIALS */ function adminMint(uint256 quantity, address _target) external onlyOwner { uint256 _totalSupply = totalSupply(); require(maxSupply >= _totalSupply + quantity, "Sold out"); _mint(_target, quantity, "", false); } function setBaseURI(string calldata baseURI) external onlyOwner { _baseTokenURI = baseURI; } function setMintWlCost(uint256 _mintWlCost) external onlyOwner { mintWlCost = _mintWlCost; } function setMintPublicCost(uint256 _mintPublicCost) external onlyOwner { mintPublicCost = _mintPublicCost; } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { merkleRoot = _merkleRoot; } function toggleSale() public onlyOwner { mintIsActive = !mintIsActive; } function setCurrentPhase(Phase phase) external onlyOwner { require(uint8(phase) <= 4, 'invalid phase'); currentPhase = phase; } function setFsbToken(address _fsbToken) external onlyOwner { fsbToken = IFSBContract(_fsbToken); } /* ADMIN ESSENTIALS */ function hasMinted(address _addr) public view returns (uint256) { return minter[_addr]; } function getCurrentPhase() public view returns (Phase) { return currentPhase; } function withdrawFunds() external onlyOwner { (bool success, ) = msg.sender.call{value: address(this).balance}(""); require(success, "Transfer failed."); } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree 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. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // Creator: base64.tech pragma solidity ^0.8.13; import "./ERC721A.sol"; /** * @dev Extension of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, * that allows for Non Escrow Staking. By calling the stake function on a token, you disable * the ability to transfer the token. By calling the unstake function on a token you re-enable * the ability to transfer the token. * * This implementation extends ERC721A, but can be modified to extend your own ERC721 implementation * or the standard Open Zeppelin version. */ abstract contract ERC721NES is ERC721A { // This is an optional reference to an external contract allows // you to abstract away your staking interface to another contract. // if this variable is set, stake / unstake can only be called from // the stakingController if it is not set stake / unstake can be called // directly on the implementing contract. address public stakingController; // Event published when a token is staked. event Staked(uint256 tokenId); // Event published when a token is unstaked. event Unstaked(uint256 tokenId); // Mapping of tokenId storing its staked status mapping(uint256 => bool) public tokenToIsStaked; /** * @dev sets stakingController, scope of this method is internal, so this defaults * to requiring setting the staking controller contact upon deployment or requires * a public OnlyOwner helper method to be exposed in the implementing contract. */ function _setStakingController(address _stakingController) internal { stakingController = _stakingController; } /** * @dev returns whether a token is currently staked */ function isStaked(uint256 tokenId) public view returns (bool) { return tokenToIsStaked[tokenId]; } /** * @dev marks a token as staked, calling this function * you disable the ability to transfer the token. */ function _stake(uint256 tokenId) internal { require(!isStaked(tokenId), "token is already staked"); tokenToIsStaked[tokenId] = true; emit Staked(tokenId); } /** * @dev marks a token as unstaked. By calling this function * you re-enable the ability to transfer the token. */ function _unstake(uint256 tokenId) internal { require(isStaked(tokenId), "token isn't staked"); tokenToIsStaked[tokenId] = false; emit Unstaked(tokenId); } /** * @dev marks a token as staked, can only be performed by delegated * staking controller contract. By calling this function you * disable the ability to transfer the token. */ function stakeFromController(uint256 tokenId, address originator) public { require( msg.sender == stakingController, "Function can only be called from staking controller contract" ); require( ownerOf(tokenId) == originator, "Originator is not the owner of this token" ); _stake(tokenId); } /** * @dev marks a token as unstaked, can only be performed delegated * staking controller contract. By calling this function you * re-enable the ability to transfer the token. */ function unstakeFromController(uint256 tokenId, address originator) public { require( msg.sender == stakingController, "Function can only be called from staking controller contract" ); require( ownerOf(tokenId) == originator, "Originator is not the owner of this token" ); _unstake(tokenId); } /** * @dev perform safe mint and stake */ function _safemintAndStake(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; for (uint256 i = 0; i < quantity; i++) { startTokenId++; tokenToIsStaked[startTokenId] = true; } _safeMint(to, quantity, ""); } /** * @dev perform mint and stake */ function _mintAndStake(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; for (uint256 i = 0; i < quantity; i++) { startTokenId++; tokenToIsStaked[startTokenId] = true; } _mint(to, quantity, "", false); } /** * @dev overrides transferFrom to prevent transfer if token is staked */ function transferFrom( address from, address to, uint256 tokenId ) public override { require( isStaked(tokenId) == false, "You can not transfer a staked token" ); super.transferFrom(from, to, tokenId); } /** * @dev overrides safeTransferFrom to prevent transfer if token is staked */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { require( isStaked(tokenId) == false, "You can not transfer a staked token" ); super.safeTransferFrom(from, to, tokenId, ""); } /** * @dev overrides safeTransferFrom to prevent transfer if token is staked */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { require( isStaked(tokenId) == false, "You can not transfer a staked token" ); super.safeTransferFrom(from, to, tokenId, _data); } }
// 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.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error UnableDetermineTokenOwner(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Does not support burning tokens to address(0). * * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal _currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _currentIndex; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { if (index >= totalSupply()) revert TokenIndexOutOfBounds(); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds(); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx; address currOwnershipAddr; // Counter overflow is impossible as the loop breaks when uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } // Execution should never reach this point. assert(false); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken(); unchecked { for (uint256 curr = tokenId; ; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) revert ApprovalCallerNotOwnerNorApproved(); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _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 { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) revert TransferToNonERC721ReceiverImplementer(); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.56e77 (2**256) - 1 unchecked { _addressData[to].balance += uint128(quantity); _addressData[to].numberMinted += uint128(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if ( safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data) ) { revert TransferToNonERC721ReceiverImplementer(); } updatedIndex++; } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership .startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) revert TransferToNonERC721ReceiverImplementer(); else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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`. * * 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; /** * @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 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerIndexOutOfBounds","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TokenIndexOutOfBounds","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Staked","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":"uint256","name":"tokenId","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"_target","type":"address"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","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":"currentPhase","outputs":[{"internalType":"enum ElefrenETH.Phase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fsbToken","outputs":[{"internalType":"contract IFSBContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCumulativeDurationStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCurrentAdditionalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentPhase","outputs":[{"internalType":"enum ElefrenETH.Phase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStakingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"hasMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyBorneo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"bool","name":"_toStake","type":"bool"}],"name":"mintFreeMaximus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"bool","name":"_toStake","type":"bool"}],"name":"mintMaximus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"bool","name":"_toStake","type":"bool"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPublicCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"bool","name":"_toStake","type":"bool"}],"name":"mintWl","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintWlCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum ElefrenETH.Phase","name":"phase","type":"uint8"}],"name":"setCurrentPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fsbToken","type":"address"}],"name":"setFsbToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPublicCost","type":"uint256"}],"name":"setMintPublicCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintWlCost","type":"uint256"}],"name":"setMintWlCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"originator","type":"address"}],"name":"stakeFromController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingController","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","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":"","type":"uint256"}],"name":"tokenToIsStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToTotalDurationStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToWhenStaked","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"originator","type":"address"}],"name":"unstakeFromController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526115b3600a55610b3d600b55601480546001600160a01b03191673109491702dc66b91e5fad7d586889679a86a8b7617905560016016553480156200004857600080fd5b506040518060400160405280600781526020016622a622a32922a760c91b8152506040518060400160405280600781526020016622b632b33932b760c91b815250620000a36200009d620000e160201b60201c565b620000e5565b8151620000b890600290602085019062000135565b508051620000ce90600390602084019062000135565b50506019805460ff191690555062000217565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200014390620001db565b90600052602060002090601f016020900481019282620001675760008555620001b2565b82601f106200018257805160ff1916838001178555620001b2565b82800160010185558215620001b2579182015b82811115620001b257825182559160200191906001019062000195565b50620001c0929150620001c4565b5090565b5b80821115620001c05760008155600101620001c5565b600181811c90821680620001f057607f821691505b6020821081036200021157634e487b7160e01b600052602260045260246000fd5b50919050565b6133cd80620002276000396000f3fe6080604052600436106103355760003560e01c8063715018a6116101ab578063ad0614f9116100f7578063d1633fe411610095578063e9931ffe1161006f578063e9931ffe146109ab578063f1da6b97146109be578063f293df7e146109eb578063f2fde38b14610a0b57600080fd5b8063d1633fe414610936578063d5abeb011461094c578063e985e9c51461096257600080fd5b8063c2edd72c116100d1578063c2edd72c146108c0578063c87b56dd146108d6578063cd3f2910146108f6578063cd6ef9b11461091657600080fd5b8063ad0614f914610850578063b88d4fde14610870578063baa51f861461089057600080fd5b806395d89b4111610164578063a3a40ea51161013e578063a3a40ea5146107c8578063a694fc3a146107e0578063a8bd983d14610800578063a96533e91461082057600080fd5b806395d89b41146107735780639a35025114610788578063a22cb465146107a857600080fd5b8063715018a6146106cb5780637bb634f5146106e05780637cb64759146107005780637d8966e41461072057806386367540146107355780638da5cb5b1461075557600080fd5b806329f04d1a11610285578063471a429411610223578063592109da116101fd578063592109da1461064b5780636352211e1461066b57806370a082311461068b578063713e6a09146106ab57600080fd5b8063471a4294146105f15780634f6ccce71461060b57806355f804b31461062b57600080fd5b8063370577791161025f578063370577791461054957806338e21cce1461057657806342842e0e146105ac57806345ae9e9c146105cc57600080fd5b806329f04d1a146105005780632eb4a7ab146105135780632f745c591461052957600080fd5b8063095ea7b3116102f257806318160ddd116102cc57806318160ddd1461049657806323b872dd146104ab57806323e9afb0146104cb57806324600fc3146104eb57600080fd5b8063095ea7b3146104345780630be9e099146104565780630dc28efe1461047657600080fd5b806301510ed31461033a57806301ffc9a714610363578063055ad42e14610393578063067f9c10146103ba57806306fdde03146103da578063081812fc146103fc575b600080fd5b34801561034657600080fd5b50610350600e5481565b6040519081526020015b60405180910390f35b34801561036f57600080fd5b5061038361037e366004612ae2565b610a2b565b604051901515815260200161035a565b34801561039f57600080fd5b506019546103ad9060ff1681565b60405161035a9190612b15565b3480156103c657600080fd5b506103506103d5366004612b3d565b610a98565b3480156103e657600080fd5b506103ef610ab0565b60405161035a9190612bae565b34801561040857600080fd5b5061041c610417366004612b3d565b610b42565b6040516001600160a01b03909116815260200161035a565b34801561044057600080fd5b5061045461044f366004612bd8565b610b88565b005b34801561046257600080fd5b50610454610471366004612c02565b610c15565b34801561048257600080fd5b50610454610491366004612c1d565b610c45565b3480156104a257600080fd5b50600154610350565b3480156104b757600080fd5b506104546104c6366004612c49565b610cc1565b3480156104d757600080fd5b506103506104e6366004612b3d565b610cfb565b3480156104f757600080fd5b50610454610d1f565b61045461050e366004612c95565b610db5565b34801561051f57600080fd5b5061035060135481565b34801561053557600080fd5b50610350610544366004612bd8565b610fe1565b34801561055557600080fd5b50610350610564366004612b3d565b60186020526000908152604090205481565b34801561058257600080fd5b50610350610591366004612c02565b6001600160a01b031660009081526010602052604090205490565b3480156105b857600080fd5b506104546105c7366004612c49565b6110be565b3480156105d857600080fd5b5060195461041c9061010090046001600160a01b031681565b3480156105fd57600080fd5b50600c546103839060ff1681565b34801561061757600080fd5b50610350610626366004612b3d565b611108565b34801561063757600080fd5b50610454610646366004612cb8565b611136565b34801561065757600080fd5b50610454610666366004612c1d565b61114a565b34801561067757600080fd5b5061041c610686366004612b3d565b6111ba565b34801561069757600080fd5b506103506106a6366004612c02565b6111cc565b3480156106b757600080fd5b5060085461041c906001600160a01b031681565b3480156106d757600080fd5b5061045461121a565b3480156106ec57600080fd5b506104546106fb366004612d6d565b61122e565b34801561070c57600080fd5b5061045461071b366004612b3d565b61141f565b34801561072c57600080fd5b5061045461142c565b34801561074157600080fd5b50610454610750366004612b3d565b611448565b34801561076157600080fd5b506000546001600160a01b031661041c565b34801561077f57600080fd5b506103ef611455565b34801561079457600080fd5b506104546107a3366004612c1d565b611464565b3480156107b457600080fd5b506104546107c3366004612dca565b6114d0565b3480156107d457600080fd5b5060195460ff166103ad565b3480156107ec57600080fd5b506104546107fb366004612b3d565b611565565b34801561080c57600080fd5b5061045461081b366004612df4565b6115af565b34801561082c57600080fd5b5061038361083b366004612b3d565b60096020526000908152604090205460ff1681565b34801561085c57600080fd5b5061035061086b366004612b3d565b611782565b34801561087c57600080fd5b5061045461088b366004612ee9565b6117bc565b34801561089c57600080fd5b506103836108ab366004612b3d565b60009081526009602052604090205460ff1690565b3480156108cc57600080fd5b50610350600b5481565b3480156108e257600080fd5b506103ef6108f1366004612b3d565b6117fd565b34801561090257600080fd5b50610454610911366004612f50565b611883565b34801561092257600080fd5b50610454610931366004612f71565b611907565b34801561094257600080fd5b50610350600d5481565b34801561095857600080fd5b50610350600a5481565b34801561096e57600080fd5b5061038361097d366004612fc0565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6104546109b9366004612fea565b611a66565b3480156109ca57600080fd5b506103506109d9366004612b3d565b60176020526000908152604090205481565b3480156109f757600080fd5b50610454610a06366004612b3d565b611cc0565b348015610a1757600080fd5b50610454610a26366004612c02565b611ccd565b60006001600160e01b031982166380ac58cd60e01b1480610a5c57506001600160e01b03198216635b5e139f60e01b145b80610a7757506001600160e01b0319821663780e9d6360e01b145b80610a9257506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000601654610aa683610cfb565b610a929190613051565b606060028054610abf90613070565b80601f0160208091040260200160405190810160405280929190818152602001828054610aeb90613070565b8015610b385780601f10610b0d57610100808354040283529160200191610b38565b820191906000526020600020905b815481529060010190602001808311610b1b57829003601f168201915b5050505050905090565b6000610b4f826001541190565b610b6c576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610b93826111ba565b9050806001600160a01b0316836001600160a01b031603610bc75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610be75750610be5813361097d565b155b15610c05576040516367d9dca160e11b815260040160405180910390fd5b610c10838383611d43565b505050565b610c1d611d9f565b601980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610c4d611d9f565b6000610c5860015490565b9050610c6483826130aa565b600a541015610ca55760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b60448201526064015b60405180910390fd5b610c108284604051806020016040528060008152506000611df9565b60008181526009602052604090205460ff1615610cf05760405162461bcd60e51b8152600401610c9c906130c2565b610c10838383611f4a565b6000610d0682611782565b600083815260186020526040902054610a9291906130aa565b610d27611d9f565b604051600090339047908381818185875af1925050503d8060008114610d69576040519150601f19603f3d011682016040523d82523d6000602084013e610d6e565b606091505b5050905080610db25760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610c9c565b50565b323314610dd45760405162461bcd60e51b8152600401610c9c90613105565b6000610ddf60015490565b600c5490915060ff16610e275760405162461bcd60e51b815260206004820152601060248201526f4d696e74206973206e6f74206c69766560801b6044820152606401610c9c565b600160195460ff166003811115610e4057610e40612aff565b14610e8d5760405162461bcd60e51b815260206004820152601760248201527f5075626c6963206d696e74206973206e6f74206c6976650000000000000000006044820152606401610c9c565b600b548110610ed65760405162461bcd60e51b8152602060048201526015602482015274536f6c64204f757420426f726e656f20506861736560581b6044820152606401610c9c565b600a548110610ef75760405162461bcd60e51b8152600401610c9c9061313c565b600e54610f049084613051565b341015610f455760405162461bcd60e51b815260206004820152600f60248201526e09cdee840cadcdeeaced0e8408aa89608b1b6044820152606401610c9c565b3360009081526010602052604081208054859290610f649084906130aa565b90915550610f7490508383611f55565b601954604051637eebe20160e11b8152336004820152602481018590526101009091046001600160a01b03169063fdd7c40290604401600060405180830381600087803b158015610fc457600080fd5b505af1158015610fd8573d6000803e3d6000fd5b50505050505050565b6000610fec836111cc565b821061100b576040516306ed618760e11b815260040160405180910390fd5b600061101660015490565b905060008060005b838110156110ac576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561107057805192505b876001600160a01b0316836001600160a01b0316036110a35786840361109c57509350610a9292505050565b6001909301925b5060010161101e565b506110b561315e565b50505092915050565b60008181526009602052604090205460ff16156110ed5760405162461bcd60e51b8152600401610c9c906130c2565b610c1083838360405180602001604052806000815250611fac565b600061111360015490565b8210611132576040516329c8c00760e21b815260040160405180910390fd5b5090565b61113e611d9f565b610c10600f8383612a3c565b6008546001600160a01b031633146111745760405162461bcd60e51b8152600401610c9c90613174565b806001600160a01b0316611187836111ba565b6001600160a01b0316146111ad5760405162461bcd60e51b8152600401610c9c906131d1565b6111b682611fe0565b5050565b60006111c582612086565b5192915050565b60006001600160a01b0382166111f5576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160801b031690565b611222611d9f565b61122c600061211a565b565b32331461124d5760405162461bcd60e51b8152600401610c9c90613105565b600061125860015490565b9050600360195460ff16600381111561127357611273612aff565b10156112c15760405162461bcd60e51b815260206004820152601d60248201527f4d6178696d7573207068617365204f4f54206973206e6f74206c6976650000006044820152606401610c9c565b80600a54116112e25760405162461bcd60e51b8152600401610c9c9061313c565b336000908152601060209081526040808320546012909252909120546113099087906130aa565b11156113575760405162461bcd60e51b815260206004820152601e60248201527f457863656564206d6178696d756d20616c6c6f77656420746f206d696e7400006044820152606401610c9c565b6040516001600160601b03193360601b1660208201526000906034016040516020818303038152906040528051906020012090506113cc85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601354915084905061216a565b6113e85760405162461bcd60e51b8152600401610c9c9061321a565b33600090815260126020526040812080548892906114079084906130aa565b9091555061141790508684611f55565b505050505050565b611427611d9f565b601355565b611434611d9f565b600c805460ff19811660ff90911615179055565b611450611d9f565b600d55565b606060038054610abf90613070565b6008546001600160a01b0316331461148e5760405162461bcd60e51b8152600401610c9c90613174565b806001600160a01b03166114a1836111ba565b6001600160a01b0316146114c75760405162461bcd60e51b8152600401610c9c906131d1565b6111b682612180565b336001600160a01b038316036114f95760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3361156f826111ba565b6001600160a01b0316146115955760405162461bcd60e51b8152600401610c9c90613247565b6000818152601760205260409020439055610db281612180565b3233146115ce5760405162461bcd60e51b8152600401610c9c90613105565b60006115d960015490565b9050600260195460ff1660038111156115f4576115f4612aff565b10156116425760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d7573207068617365205454206973206e6f74206c697665000000006044820152606401610c9c565b80600a54116116635760405162461bcd60e51b8152600401610c9c9061313c565b3360009081526011602052604090205460ff16156116c35760405162461bcd60e51b815260206004820152601760248201527f596f75206861766520616c7265616479206d696e7465640000000000000000006044820152606401610c9c565b6040516001600160601b03193360601b16602082015260009060340160405160208183030381529060405280519060200120905061173885858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601354915084905061216a565b6117545760405162461bcd60e51b8152600401610c9c9061321a565b336000908152601160205260409020805460ff1916600190811790915561177b9084611f55565b5050505050565b600081815260176020526040812054156117af57600082815260176020526040902054610a92904361328a565b506000919050565b919050565b60008281526009602052604090205460ff16156117eb5760405162461bcd60e51b8152600401610c9c906130c2565b6117f784848484611fac565b50505050565b606061180a826001541190565b61182757604051630a14c4b560e41b815260040160405180910390fd5b600061183161222a565b90508051600003611851576040518060200160405280600081525061187c565b8061185b84612239565b60405160200161186c9291906132a1565b6040516020818303038152906040525b9392505050565b61188b611d9f565b600481600381111561189f5761189f612aff565b60ff1611156118e05760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420706861736560981b6044820152606401610c9c565b6019805482919060ff191660018360038111156118ff576118ff612aff565b021790555050565b3383838360008484846040516020016119429392919060609390931b6001600160601b03191683526014830191909152603482015260540190565b60408051601f1981840301815291905280516020909101206014549091506001600160a01b03166119738284612341565b6001600160a01b0316146119895761198961315e565b33611993896111ba565b6001600160a01b0316146119b95760405162461bcd60e51b8152600401610c9c90613247565b60008781526015602052604090205460ff1615611a0d5760405162461bcd60e51b8152602060048201526012602482015271139bdb98d948185b1c9958591e481d5cd95960721b6044820152606401610c9c565b6000878152601560205260409020805460ff19166001179055611a2f88611782565b60008981526018602052604081208054909190611a4d9084906130aa565b90915550611a5c905088611fe0565b5050505050505050565b323314611a855760405162461bcd60e51b8152600401610c9c90613105565b6000611a9060015490565b600c5490915060ff16611ad85760405162461bcd60e51b815260206004820152601060248201526f4d696e74206973206e6f74206c69766560801b6044820152606401610c9c565b600b548110611b215760405162461bcd60e51b8152602060048201526015602482015274536f6c64204f757420426f726e656f20506861736560581b6044820152606401610c9c565b600a548110611b425760405162461bcd60e51b8152600401610c9c9061313c565b600d54611b4f9084613051565b341015611b905760405162461bcd60e51b815260206004820152600f60248201526e09cdee840cadcdeeaced0e8408aa89608b1b6044820152606401610c9c565b6040516001600160601b03193360601b166020820152600090603401604051602081830303815290604052805190602001209050611c0586868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601354915084905061216a565b611c215760405162461bcd60e51b8152600401610c9c9061321a565b3360009081526010602052604081208054869290611c409084906130aa565b90915550611c5090508484611f55565b601954604051637eebe20160e11b8152336004820152602481018690526101009091046001600160a01b03169063fdd7c40290604401600060405180830381600087803b158015611ca057600080fd5b505af1158015611cb4573d6000803e3d6000fd5b50505050505050505050565b611cc8611d9f565b600e55565b611cd5611d9f565b6001600160a01b038116611d3a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c9c565b610db28161211a565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000546001600160a01b0316331461122c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9c565b6001546001600160a01b038516611e2257604051622e076360e81b815260040160405180910390fd5b83600003611e435760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03851660008181526005602090815260408083208054600160801b6001600160801b031982166001600160801b039283168c01831690811782900483168c01909216021790558483526004909152812080546001600160e01b031916909217600160a01b426001600160401b0316021790915581905b85811015611f415760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015611f175750611f156000888488612365565b155b15611f35576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101611ec0565b5060015561177b565b610c10838383612467565b60006001549050611f783384604051806020016040528060008152506000611df9565b8115610c1057805b611f8a84836130aa565b8110156117f757611f9a81611565565b80611fa4816132d0565b915050611f80565b611fb7848484612467565b611fc384848484612365565b6117f7576040516368d2bf6b60e11b815260040160405180910390fd5b60008181526009602052604090205460ff166120335760405162461bcd60e51b81526020600482015260126024820152711d1bdad95b881a5cdb89dd081cdd185ad95960721b6044820152606401610c9c565b60008181526009602052604090819020805460ff19169055517f11725367022c3ff288940f4b5473aa61c2da6a24af7363a1128ee2401e8983b29061207b9083815260200190565b60405180910390a150565b60408051808201909152600080825260208201526120a5826001541190565b6120c257604051636f96cda160e11b815260040160405180910390fd5b815b6000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612110579392505050565b50600019016120c4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826121778584612681565b14949350505050565b60008181526009602052604090205460ff16156121df5760405162461bcd60e51b815260206004820152601760248201527f746f6b656e20697320616c7265616479207374616b65640000000000000000006044820152606401610c9c565b60008181526009602052604090819020805460ff19166001179055517feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca279061207b9083815260200190565b6060600f8054610abf90613070565b6060816000036122605750506040805180820190915260018152600360fc1b602082015290565b8160005b811561228a5780612274816132d0565b91506122839050600a836132ff565b9150612264565b6000816001600160401b038111156122a4576122a4612e47565b6040519080825280601f01601f1916602001820160405280156122ce576020820181803683370190505b5090505b8415612339576122e360018361328a565b91506122f0600a86613313565b6122fb9060306130aa565b60f81b81838151811061231057612310613327565b60200101906001600160f81b031916908160001a905350612332600a866132ff565b94506122d2565b949350505050565b600080600061235085856126c6565b9150915061235d81612734565b509392505050565b60006001600160a01b0384163b1561245c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906123a990339089908890889060040161333d565b6020604051808303816000875af19250505080156123e4575060408051601f3d908101601f191682019092526123e19181019061337a565b60015b612442573d808015612412576040519150601f19603f3d011682016040523d82523d6000602084013e612417565b606091505b50805160000361243a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612339565b506001949350505050565b600061247282612086565b80519091506000906001600160a01b0316336001600160a01b031614806124a957503361249e84610b42565b6001600160a01b0316145b806124bb575081516124bb903361097d565b9050806124db57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146125105760405162a1148160e81b815260040160405180910390fd5b6001600160a01b03841661253757604051633a954ecd60e21b815260040160405180910390fd5b6125476000848460000151611d43565b6001600160a01b03858116600090815260056020908152604080832080546001600160801b03198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600490935281842080546001600160e01b031916909117600160a01b426001600160401b03160217905590860180835291205490911661263a576125ee816001541190565b1561263a57825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461177b565b600081815b845181101561235d576126b2828683815181106126a5576126a5613327565b60200260200101516128ea565b9150806126be816132d0565b915050612686565b60008082516041036126fc5760208301516040840151606085015160001a6126f087828585612916565b9450945050505061272d565b8251604003612725576020830151604084015161271a868383612a03565b93509350505061272d565b506000905060025b9250929050565b600081600481111561274857612748612aff565b036127505750565b600181600481111561276457612764612aff565b036127b15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c9c565b60028160048111156127c5576127c5612aff565b036128125760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c9c565b600381600481111561282657612826612aff565b0361287e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c9c565b600481600481111561289257612892612aff565b03610db25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610c9c565b600081831061290657600082815260208490526040902061187c565b5060009182526020526040902090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561294d57506000905060036129fa565b8460ff16601b1415801561296557508460ff16601c14155b1561297657506000905060046129fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129f3576000600192509250506129fa565b9150600090505b94509492505050565b6000806001600160ff1b03831681612a2060ff86901c601b6130aa565b9050612a2e87828885612916565b935093505050935093915050565b828054612a4890613070565b90600052602060002090601f016020900481019282612a6a5760008555612ab0565b82601f10612a835782800160ff19823516178555612ab0565b82800160010185558215612ab0579182015b82811115612ab0578235825591602001919060010190612a95565b506111329291505b808211156111325760008155600101612ab8565b6001600160e01b031981168114610db257600080fd5b600060208284031215612af457600080fd5b813561187c81612acc565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612b3757634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215612b4f57600080fd5b5035919050565b60005b83811015612b71578181015183820152602001612b59565b838111156117f75750506000910152565b60008151808452612b9a816020860160208601612b56565b601f01601f19169290920160200192915050565b60208152600061187c6020830184612b82565b80356001600160a01b03811681146117b757600080fd5b60008060408385031215612beb57600080fd5b612bf483612bc1565b946020939093013593505050565b600060208284031215612c1457600080fd5b61187c82612bc1565b60008060408385031215612c3057600080fd5b82359150612c4060208401612bc1565b90509250929050565b600080600060608486031215612c5e57600080fd5b612c6784612bc1565b9250612c7560208501612bc1565b9150604084013590509250925092565b803580151581146117b757600080fd5b60008060408385031215612ca857600080fd5b82359150612c4060208401612c85565b60008060208385031215612ccb57600080fd5b82356001600160401b0380821115612ce257600080fd5b818501915085601f830112612cf657600080fd5b813581811115612d0557600080fd5b866020828501011115612d1757600080fd5b60209290920196919550909350505050565b60008083601f840112612d3b57600080fd5b5081356001600160401b03811115612d5257600080fd5b6020830191508360208260051b850101111561272d57600080fd5b60008060008060608587031215612d8357600080fd5b8435935060208501356001600160401b03811115612da057600080fd5b612dac87828801612d29565b9094509250612dbf905060408601612c85565b905092959194509250565b60008060408385031215612ddd57600080fd5b612de683612bc1565b9150612c4060208401612c85565b600080600060408486031215612e0957600080fd5b83356001600160401b03811115612e1f57600080fd5b612e2b86828701612d29565b9094509250612e3e905060208501612c85565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612e6e57600080fd5b81356001600160401b0380821115612e8857612e88612e47565b604051601f8301601f19908116603f01168101908282118183101715612eb057612eb0612e47565b81604052838152866020858801011115612ec957600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215612eff57600080fd5b612f0885612bc1565b9350612f1660208601612bc1565b92506040850135915060608501356001600160401b03811115612f3857600080fd5b612f4487828801612e5d565b91505092959194509250565b600060208284031215612f6257600080fd5b81356004811061187c57600080fd5b600080600060608486031215612f8657600080fd5b833592506020840135915060408401356001600160401b03811115612faa57600080fd5b612fb686828701612e5d565b9150509250925092565b60008060408385031215612fd357600080fd5b612fdc83612bc1565b9150612c4060208401612bc1565b6000806000806060858703121561300057600080fd5b84356001600160401b0381111561301657600080fd5b61302287828801612d29565b90955093505060208501359150612dbf60408601612c85565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561306b5761306b61303b565b500290565b600181811c9082168061308457607f821691505b6020821081036130a457634e487b7160e01b600052602260045260246000fd5b50919050565b600082198211156130bd576130bd61303b565b500190565b60208082526023908201527f596f752063616e206e6f74207472616e736665722061207374616b656420746f60408201526235b2b760e91b606082015260800190565b6020808252601e908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604082015260600190565b60208082526008908201526714dbdb190813dd5d60c21b604082015260600190565b634e487b7160e01b600052600160045260246000fd5b6020808252603c908201527f46756e6374696f6e2063616e206f6e6c792062652063616c6c65642066726f6d60408201527f207374616b696e6720636f6e74726f6c6c657220636f6e747261637400000000606082015260800190565b60208082526029908201527f4f726967696e61746f72206973206e6f7420746865206f776e6572206f6620746040820152683434b9903a37b5b2b760b91b606082015260800190565b602080825260139082015272139bdd08185b1b1bddd959081d1bc81b5a5b9d606a1b604082015260600190565b60208082526023908201527f596f7520617265206e6f7420746865206f776e6572206f66207468697320746f60408201526235b2b760e91b606082015260800190565b60008282101561329c5761329c61303b565b500390565b600083516132b3818460208801612b56565b8351908301906132c7818360208801612b56565b01949350505050565b6000600182016132e2576132e261303b565b5060010190565b634e487b7160e01b600052601260045260246000fd5b60008261330e5761330e6132e9565b500490565b600082613322576133226132e9565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061337090830184612b82565b9695505050505050565b60006020828403121561338c57600080fd5b815161187c81612acc56fea26469706673582212201e03d61360a45895ad2ef7a19dc55131b19e18535a97bcfddd6542f48387ef1864736f6c634300080d0033
Deployed Bytecode
0x6080604052600436106103355760003560e01c8063715018a6116101ab578063ad0614f9116100f7578063d1633fe411610095578063e9931ffe1161006f578063e9931ffe146109ab578063f1da6b97146109be578063f293df7e146109eb578063f2fde38b14610a0b57600080fd5b8063d1633fe414610936578063d5abeb011461094c578063e985e9c51461096257600080fd5b8063c2edd72c116100d1578063c2edd72c146108c0578063c87b56dd146108d6578063cd3f2910146108f6578063cd6ef9b11461091657600080fd5b8063ad0614f914610850578063b88d4fde14610870578063baa51f861461089057600080fd5b806395d89b4111610164578063a3a40ea51161013e578063a3a40ea5146107c8578063a694fc3a146107e0578063a8bd983d14610800578063a96533e91461082057600080fd5b806395d89b41146107735780639a35025114610788578063a22cb465146107a857600080fd5b8063715018a6146106cb5780637bb634f5146106e05780637cb64759146107005780637d8966e41461072057806386367540146107355780638da5cb5b1461075557600080fd5b806329f04d1a11610285578063471a429411610223578063592109da116101fd578063592109da1461064b5780636352211e1461066b57806370a082311461068b578063713e6a09146106ab57600080fd5b8063471a4294146105f15780634f6ccce71461060b57806355f804b31461062b57600080fd5b8063370577791161025f578063370577791461054957806338e21cce1461057657806342842e0e146105ac57806345ae9e9c146105cc57600080fd5b806329f04d1a146105005780632eb4a7ab146105135780632f745c591461052957600080fd5b8063095ea7b3116102f257806318160ddd116102cc57806318160ddd1461049657806323b872dd146104ab57806323e9afb0146104cb57806324600fc3146104eb57600080fd5b8063095ea7b3146104345780630be9e099146104565780630dc28efe1461047657600080fd5b806301510ed31461033a57806301ffc9a714610363578063055ad42e14610393578063067f9c10146103ba57806306fdde03146103da578063081812fc146103fc575b600080fd5b34801561034657600080fd5b50610350600e5481565b6040519081526020015b60405180910390f35b34801561036f57600080fd5b5061038361037e366004612ae2565b610a2b565b604051901515815260200161035a565b34801561039f57600080fd5b506019546103ad9060ff1681565b60405161035a9190612b15565b3480156103c657600080fd5b506103506103d5366004612b3d565b610a98565b3480156103e657600080fd5b506103ef610ab0565b60405161035a9190612bae565b34801561040857600080fd5b5061041c610417366004612b3d565b610b42565b6040516001600160a01b03909116815260200161035a565b34801561044057600080fd5b5061045461044f366004612bd8565b610b88565b005b34801561046257600080fd5b50610454610471366004612c02565b610c15565b34801561048257600080fd5b50610454610491366004612c1d565b610c45565b3480156104a257600080fd5b50600154610350565b3480156104b757600080fd5b506104546104c6366004612c49565b610cc1565b3480156104d757600080fd5b506103506104e6366004612b3d565b610cfb565b3480156104f757600080fd5b50610454610d1f565b61045461050e366004612c95565b610db5565b34801561051f57600080fd5b5061035060135481565b34801561053557600080fd5b50610350610544366004612bd8565b610fe1565b34801561055557600080fd5b50610350610564366004612b3d565b60186020526000908152604090205481565b34801561058257600080fd5b50610350610591366004612c02565b6001600160a01b031660009081526010602052604090205490565b3480156105b857600080fd5b506104546105c7366004612c49565b6110be565b3480156105d857600080fd5b5060195461041c9061010090046001600160a01b031681565b3480156105fd57600080fd5b50600c546103839060ff1681565b34801561061757600080fd5b50610350610626366004612b3d565b611108565b34801561063757600080fd5b50610454610646366004612cb8565b611136565b34801561065757600080fd5b50610454610666366004612c1d565b61114a565b34801561067757600080fd5b5061041c610686366004612b3d565b6111ba565b34801561069757600080fd5b506103506106a6366004612c02565b6111cc565b3480156106b757600080fd5b5060085461041c906001600160a01b031681565b3480156106d757600080fd5b5061045461121a565b3480156106ec57600080fd5b506104546106fb366004612d6d565b61122e565b34801561070c57600080fd5b5061045461071b366004612b3d565b61141f565b34801561072c57600080fd5b5061045461142c565b34801561074157600080fd5b50610454610750366004612b3d565b611448565b34801561076157600080fd5b506000546001600160a01b031661041c565b34801561077f57600080fd5b506103ef611455565b34801561079457600080fd5b506104546107a3366004612c1d565b611464565b3480156107b457600080fd5b506104546107c3366004612dca565b6114d0565b3480156107d457600080fd5b5060195460ff166103ad565b3480156107ec57600080fd5b506104546107fb366004612b3d565b611565565b34801561080c57600080fd5b5061045461081b366004612df4565b6115af565b34801561082c57600080fd5b5061038361083b366004612b3d565b60096020526000908152604090205460ff1681565b34801561085c57600080fd5b5061035061086b366004612b3d565b611782565b34801561087c57600080fd5b5061045461088b366004612ee9565b6117bc565b34801561089c57600080fd5b506103836108ab366004612b3d565b60009081526009602052604090205460ff1690565b3480156108cc57600080fd5b50610350600b5481565b3480156108e257600080fd5b506103ef6108f1366004612b3d565b6117fd565b34801561090257600080fd5b50610454610911366004612f50565b611883565b34801561092257600080fd5b50610454610931366004612f71565b611907565b34801561094257600080fd5b50610350600d5481565b34801561095857600080fd5b50610350600a5481565b34801561096e57600080fd5b5061038361097d366004612fc0565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6104546109b9366004612fea565b611a66565b3480156109ca57600080fd5b506103506109d9366004612b3d565b60176020526000908152604090205481565b3480156109f757600080fd5b50610454610a06366004612b3d565b611cc0565b348015610a1757600080fd5b50610454610a26366004612c02565b611ccd565b60006001600160e01b031982166380ac58cd60e01b1480610a5c57506001600160e01b03198216635b5e139f60e01b145b80610a7757506001600160e01b0319821663780e9d6360e01b145b80610a9257506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000601654610aa683610cfb565b610a929190613051565b606060028054610abf90613070565b80601f0160208091040260200160405190810160405280929190818152602001828054610aeb90613070565b8015610b385780601f10610b0d57610100808354040283529160200191610b38565b820191906000526020600020905b815481529060010190602001808311610b1b57829003601f168201915b5050505050905090565b6000610b4f826001541190565b610b6c576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610b93826111ba565b9050806001600160a01b0316836001600160a01b031603610bc75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610be75750610be5813361097d565b155b15610c05576040516367d9dca160e11b815260040160405180910390fd5b610c10838383611d43565b505050565b610c1d611d9f565b601980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610c4d611d9f565b6000610c5860015490565b9050610c6483826130aa565b600a541015610ca55760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b60448201526064015b60405180910390fd5b610c108284604051806020016040528060008152506000611df9565b60008181526009602052604090205460ff1615610cf05760405162461bcd60e51b8152600401610c9c906130c2565b610c10838383611f4a565b6000610d0682611782565b600083815260186020526040902054610a9291906130aa565b610d27611d9f565b604051600090339047908381818185875af1925050503d8060008114610d69576040519150601f19603f3d011682016040523d82523d6000602084013e610d6e565b606091505b5050905080610db25760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610c9c565b50565b323314610dd45760405162461bcd60e51b8152600401610c9c90613105565b6000610ddf60015490565b600c5490915060ff16610e275760405162461bcd60e51b815260206004820152601060248201526f4d696e74206973206e6f74206c69766560801b6044820152606401610c9c565b600160195460ff166003811115610e4057610e40612aff565b14610e8d5760405162461bcd60e51b815260206004820152601760248201527f5075626c6963206d696e74206973206e6f74206c6976650000000000000000006044820152606401610c9c565b600b548110610ed65760405162461bcd60e51b8152602060048201526015602482015274536f6c64204f757420426f726e656f20506861736560581b6044820152606401610c9c565b600a548110610ef75760405162461bcd60e51b8152600401610c9c9061313c565b600e54610f049084613051565b341015610f455760405162461bcd60e51b815260206004820152600f60248201526e09cdee840cadcdeeaced0e8408aa89608b1b6044820152606401610c9c565b3360009081526010602052604081208054859290610f649084906130aa565b90915550610f7490508383611f55565b601954604051637eebe20160e11b8152336004820152602481018590526101009091046001600160a01b03169063fdd7c40290604401600060405180830381600087803b158015610fc457600080fd5b505af1158015610fd8573d6000803e3d6000fd5b50505050505050565b6000610fec836111cc565b821061100b576040516306ed618760e11b815260040160405180910390fd5b600061101660015490565b905060008060005b838110156110ac576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561107057805192505b876001600160a01b0316836001600160a01b0316036110a35786840361109c57509350610a9292505050565b6001909301925b5060010161101e565b506110b561315e565b50505092915050565b60008181526009602052604090205460ff16156110ed5760405162461bcd60e51b8152600401610c9c906130c2565b610c1083838360405180602001604052806000815250611fac565b600061111360015490565b8210611132576040516329c8c00760e21b815260040160405180910390fd5b5090565b61113e611d9f565b610c10600f8383612a3c565b6008546001600160a01b031633146111745760405162461bcd60e51b8152600401610c9c90613174565b806001600160a01b0316611187836111ba565b6001600160a01b0316146111ad5760405162461bcd60e51b8152600401610c9c906131d1565b6111b682611fe0565b5050565b60006111c582612086565b5192915050565b60006001600160a01b0382166111f5576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160801b031690565b611222611d9f565b61122c600061211a565b565b32331461124d5760405162461bcd60e51b8152600401610c9c90613105565b600061125860015490565b9050600360195460ff16600381111561127357611273612aff565b10156112c15760405162461bcd60e51b815260206004820152601d60248201527f4d6178696d7573207068617365204f4f54206973206e6f74206c6976650000006044820152606401610c9c565b80600a54116112e25760405162461bcd60e51b8152600401610c9c9061313c565b336000908152601060209081526040808320546012909252909120546113099087906130aa565b11156113575760405162461bcd60e51b815260206004820152601e60248201527f457863656564206d6178696d756d20616c6c6f77656420746f206d696e7400006044820152606401610c9c565b6040516001600160601b03193360601b1660208201526000906034016040516020818303038152906040528051906020012090506113cc85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601354915084905061216a565b6113e85760405162461bcd60e51b8152600401610c9c9061321a565b33600090815260126020526040812080548892906114079084906130aa565b9091555061141790508684611f55565b505050505050565b611427611d9f565b601355565b611434611d9f565b600c805460ff19811660ff90911615179055565b611450611d9f565b600d55565b606060038054610abf90613070565b6008546001600160a01b0316331461148e5760405162461bcd60e51b8152600401610c9c90613174565b806001600160a01b03166114a1836111ba565b6001600160a01b0316146114c75760405162461bcd60e51b8152600401610c9c906131d1565b6111b682612180565b336001600160a01b038316036114f95760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b3361156f826111ba565b6001600160a01b0316146115955760405162461bcd60e51b8152600401610c9c90613247565b6000818152601760205260409020439055610db281612180565b3233146115ce5760405162461bcd60e51b8152600401610c9c90613105565b60006115d960015490565b9050600260195460ff1660038111156115f4576115f4612aff565b10156116425760405162461bcd60e51b815260206004820152601c60248201527f4d6178696d7573207068617365205454206973206e6f74206c697665000000006044820152606401610c9c565b80600a54116116635760405162461bcd60e51b8152600401610c9c9061313c565b3360009081526011602052604090205460ff16156116c35760405162461bcd60e51b815260206004820152601760248201527f596f75206861766520616c7265616479206d696e7465640000000000000000006044820152606401610c9c565b6040516001600160601b03193360601b16602082015260009060340160405160208183030381529060405280519060200120905061173885858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601354915084905061216a565b6117545760405162461bcd60e51b8152600401610c9c9061321a565b336000908152601160205260409020805460ff1916600190811790915561177b9084611f55565b5050505050565b600081815260176020526040812054156117af57600082815260176020526040902054610a92904361328a565b506000919050565b919050565b60008281526009602052604090205460ff16156117eb5760405162461bcd60e51b8152600401610c9c906130c2565b6117f784848484611fac565b50505050565b606061180a826001541190565b61182757604051630a14c4b560e41b815260040160405180910390fd5b600061183161222a565b90508051600003611851576040518060200160405280600081525061187c565b8061185b84612239565b60405160200161186c9291906132a1565b6040516020818303038152906040525b9392505050565b61188b611d9f565b600481600381111561189f5761189f612aff565b60ff1611156118e05760405162461bcd60e51b815260206004820152600d60248201526c696e76616c696420706861736560981b6044820152606401610c9c565b6019805482919060ff191660018360038111156118ff576118ff612aff565b021790555050565b3383838360008484846040516020016119429392919060609390931b6001600160601b03191683526014830191909152603482015260540190565b60408051601f1981840301815291905280516020909101206014549091506001600160a01b03166119738284612341565b6001600160a01b0316146119895761198961315e565b33611993896111ba565b6001600160a01b0316146119b95760405162461bcd60e51b8152600401610c9c90613247565b60008781526015602052604090205460ff1615611a0d5760405162461bcd60e51b8152602060048201526012602482015271139bdb98d948185b1c9958591e481d5cd95960721b6044820152606401610c9c565b6000878152601560205260409020805460ff19166001179055611a2f88611782565b60008981526018602052604081208054909190611a4d9084906130aa565b90915550611a5c905088611fe0565b5050505050505050565b323314611a855760405162461bcd60e51b8152600401610c9c90613105565b6000611a9060015490565b600c5490915060ff16611ad85760405162461bcd60e51b815260206004820152601060248201526f4d696e74206973206e6f74206c69766560801b6044820152606401610c9c565b600b548110611b215760405162461bcd60e51b8152602060048201526015602482015274536f6c64204f757420426f726e656f20506861736560581b6044820152606401610c9c565b600a548110611b425760405162461bcd60e51b8152600401610c9c9061313c565b600d54611b4f9084613051565b341015611b905760405162461bcd60e51b815260206004820152600f60248201526e09cdee840cadcdeeaced0e8408aa89608b1b6044820152606401610c9c565b6040516001600160601b03193360601b166020820152600090603401604051602081830303815290604052805190602001209050611c0586868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601354915084905061216a565b611c215760405162461bcd60e51b8152600401610c9c9061321a565b3360009081526010602052604081208054869290611c409084906130aa565b90915550611c5090508484611f55565b601954604051637eebe20160e11b8152336004820152602481018690526101009091046001600160a01b03169063fdd7c40290604401600060405180830381600087803b158015611ca057600080fd5b505af1158015611cb4573d6000803e3d6000fd5b50505050505050505050565b611cc8611d9f565b600e55565b611cd5611d9f565b6001600160a01b038116611d3a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c9c565b610db28161211a565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000546001600160a01b0316331461122c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9c565b6001546001600160a01b038516611e2257604051622e076360e81b815260040160405180910390fd5b83600003611e435760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03851660008181526005602090815260408083208054600160801b6001600160801b031982166001600160801b039283168c01831690811782900483168c01909216021790558483526004909152812080546001600160e01b031916909217600160a01b426001600160401b0316021790915581905b85811015611f415760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015611f175750611f156000888488612365565b155b15611f35576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101611ec0565b5060015561177b565b610c10838383612467565b60006001549050611f783384604051806020016040528060008152506000611df9565b8115610c1057805b611f8a84836130aa565b8110156117f757611f9a81611565565b80611fa4816132d0565b915050611f80565b611fb7848484612467565b611fc384848484612365565b6117f7576040516368d2bf6b60e11b815260040160405180910390fd5b60008181526009602052604090205460ff166120335760405162461bcd60e51b81526020600482015260126024820152711d1bdad95b881a5cdb89dd081cdd185ad95960721b6044820152606401610c9c565b60008181526009602052604090819020805460ff19169055517f11725367022c3ff288940f4b5473aa61c2da6a24af7363a1128ee2401e8983b29061207b9083815260200190565b60405180910390a150565b60408051808201909152600080825260208201526120a5826001541190565b6120c257604051636f96cda160e11b815260040160405180910390fd5b815b6000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612110579392505050565b50600019016120c4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826121778584612681565b14949350505050565b60008181526009602052604090205460ff16156121df5760405162461bcd60e51b815260206004820152601760248201527f746f6b656e20697320616c7265616479207374616b65640000000000000000006044820152606401610c9c565b60008181526009602052604090819020805460ff19166001179055517feebbaa86c348cb664e392b180fd0ff2e1998af9fa833ef69a778cb0b42d3ca279061207b9083815260200190565b6060600f8054610abf90613070565b6060816000036122605750506040805180820190915260018152600360fc1b602082015290565b8160005b811561228a5780612274816132d0565b91506122839050600a836132ff565b9150612264565b6000816001600160401b038111156122a4576122a4612e47565b6040519080825280601f01601f1916602001820160405280156122ce576020820181803683370190505b5090505b8415612339576122e360018361328a565b91506122f0600a86613313565b6122fb9060306130aa565b60f81b81838151811061231057612310613327565b60200101906001600160f81b031916908160001a905350612332600a866132ff565b94506122d2565b949350505050565b600080600061235085856126c6565b9150915061235d81612734565b509392505050565b60006001600160a01b0384163b1561245c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906123a990339089908890889060040161333d565b6020604051808303816000875af19250505080156123e4575060408051601f3d908101601f191682019092526123e19181019061337a565b60015b612442573d808015612412576040519150601f19603f3d011682016040523d82523d6000602084013e612417565b606091505b50805160000361243a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612339565b506001949350505050565b600061247282612086565b80519091506000906001600160a01b0316336001600160a01b031614806124a957503361249e84610b42565b6001600160a01b0316145b806124bb575081516124bb903361097d565b9050806124db57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146125105760405162a1148160e81b815260040160405180910390fd5b6001600160a01b03841661253757604051633a954ecd60e21b815260040160405180910390fd5b6125476000848460000151611d43565b6001600160a01b03858116600090815260056020908152604080832080546001600160801b03198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600490935281842080546001600160e01b031916909117600160a01b426001600160401b03160217905590860180835291205490911661263a576125ee816001541190565b1561263a57825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461177b565b600081815b845181101561235d576126b2828683815181106126a5576126a5613327565b60200260200101516128ea565b9150806126be816132d0565b915050612686565b60008082516041036126fc5760208301516040840151606085015160001a6126f087828585612916565b9450945050505061272d565b8251604003612725576020830151604084015161271a868383612a03565b93509350505061272d565b506000905060025b9250929050565b600081600481111561274857612748612aff565b036127505750565b600181600481111561276457612764612aff565b036127b15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c9c565b60028160048111156127c5576127c5612aff565b036128125760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c9c565b600381600481111561282657612826612aff565b0361287e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610c9c565b600481600481111561289257612892612aff565b03610db25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610c9c565b600081831061290657600082815260208490526040902061187c565b5060009182526020526040902090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561294d57506000905060036129fa565b8460ff16601b1415801561296557508460ff16601c14155b1561297657506000905060046129fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129f3576000600192509250506129fa565b9150600090505b94509492505050565b6000806001600160ff1b03831681612a2060ff86901c601b6130aa565b9050612a2e87828885612916565b935093505050935093915050565b828054612a4890613070565b90600052602060002090601f016020900481019282612a6a5760008555612ab0565b82601f10612a835782800160ff19823516178555612ab0565b82800160010185558215612ab0579182015b82811115612ab0578235825591602001919060010190612a95565b506111329291505b808211156111325760008155600101612ab8565b6001600160e01b031981168114610db257600080fd5b600060208284031215612af457600080fd5b813561187c81612acc565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612b3757634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215612b4f57600080fd5b5035919050565b60005b83811015612b71578181015183820152602001612b59565b838111156117f75750506000910152565b60008151808452612b9a816020860160208601612b56565b601f01601f19169290920160200192915050565b60208152600061187c6020830184612b82565b80356001600160a01b03811681146117b757600080fd5b60008060408385031215612beb57600080fd5b612bf483612bc1565b946020939093013593505050565b600060208284031215612c1457600080fd5b61187c82612bc1565b60008060408385031215612c3057600080fd5b82359150612c4060208401612bc1565b90509250929050565b600080600060608486031215612c5e57600080fd5b612c6784612bc1565b9250612c7560208501612bc1565b9150604084013590509250925092565b803580151581146117b757600080fd5b60008060408385031215612ca857600080fd5b82359150612c4060208401612c85565b60008060208385031215612ccb57600080fd5b82356001600160401b0380821115612ce257600080fd5b818501915085601f830112612cf657600080fd5b813581811115612d0557600080fd5b866020828501011115612d1757600080fd5b60209290920196919550909350505050565b60008083601f840112612d3b57600080fd5b5081356001600160401b03811115612d5257600080fd5b6020830191508360208260051b850101111561272d57600080fd5b60008060008060608587031215612d8357600080fd5b8435935060208501356001600160401b03811115612da057600080fd5b612dac87828801612d29565b9094509250612dbf905060408601612c85565b905092959194509250565b60008060408385031215612ddd57600080fd5b612de683612bc1565b9150612c4060208401612c85565b600080600060408486031215612e0957600080fd5b83356001600160401b03811115612e1f57600080fd5b612e2b86828701612d29565b9094509250612e3e905060208501612c85565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612e6e57600080fd5b81356001600160401b0380821115612e8857612e88612e47565b604051601f8301601f19908116603f01168101908282118183101715612eb057612eb0612e47565b81604052838152866020858801011115612ec957600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215612eff57600080fd5b612f0885612bc1565b9350612f1660208601612bc1565b92506040850135915060608501356001600160401b03811115612f3857600080fd5b612f4487828801612e5d565b91505092959194509250565b600060208284031215612f6257600080fd5b81356004811061187c57600080fd5b600080600060608486031215612f8657600080fd5b833592506020840135915060408401356001600160401b03811115612faa57600080fd5b612fb686828701612e5d565b9150509250925092565b60008060408385031215612fd357600080fd5b612fdc83612bc1565b9150612c4060208401612bc1565b6000806000806060858703121561300057600080fd5b84356001600160401b0381111561301657600080fd5b61302287828801612d29565b90955093505060208501359150612dbf60408601612c85565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561306b5761306b61303b565b500290565b600181811c9082168061308457607f821691505b6020821081036130a457634e487b7160e01b600052602260045260246000fd5b50919050565b600082198211156130bd576130bd61303b565b500190565b60208082526023908201527f596f752063616e206e6f74207472616e736665722061207374616b656420746f60408201526235b2b760e91b606082015260800190565b6020808252601e908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604082015260600190565b60208082526008908201526714dbdb190813dd5d60c21b604082015260600190565b634e487b7160e01b600052600160045260246000fd5b6020808252603c908201527f46756e6374696f6e2063616e206f6e6c792062652063616c6c65642066726f6d60408201527f207374616b696e6720636f6e74726f6c6c657220636f6e747261637400000000606082015260800190565b60208082526029908201527f4f726967696e61746f72206973206e6f7420746865206f776e6572206f6620746040820152683434b9903a37b5b2b760b91b606082015260800190565b602080825260139082015272139bdd08185b1b1bddd959081d1bc81b5a5b9d606a1b604082015260600190565b60208082526023908201527f596f7520617265206e6f7420746865206f776e6572206f66207468697320746f60408201526235b2b760e91b606082015260800190565b60008282101561329c5761329c61303b565b500390565b600083516132b3818460208801612b56565b8351908301906132c7818360208801612b56565b01949350505050565b6000600182016132e2576132e261303b565b5060010190565b634e487b7160e01b600052601260045260246000fd5b60008261330e5761330e6132e9565b500490565b600082613322576133226132e9565b500690565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061337090830184612b82565b9695505050505050565b60006020828403121561338c57600080fd5b815161187c81612acc56fea26469706673582212201e03d61360a45895ad2ef7a19dc55131b19e18535a97bcfddd6542f48387ef1864736f6c634300080d0033
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.