ERC-721
NFT
Overview
Max Total Supply
9,086 SPACECRAFT
Holders
1,960
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 SPACECRAFTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SpaceCraft
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./ERC721B.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; contract SpaceCraft is ERC721B, Ownable, Pausable { using Strings for uint256; uint256 public constant MAX_SUPPLY = 10419; // must be in wei uint256 public paperTokensPerMint = 800 ether; // Token base URI string private baseTokenUri; // mapping to store all the claimed tokens mapping(uint256 => bool) public claimedTokens; // signer address for verification address public signerAddress = 0xA8e29A2566A9F7c485955B3267352663E6DB854f; // paper token address ERC20Burnable public paperTokenAddress; // Acrocalypse (ACROC) address IERC721 public nftTokenAddress; constructor( ERC20Burnable _paperTokenAddress, IERC721 _nftTokenAddress, string memory baseUri ) ERC721B("SpaceCraft", "SPACECRAFT") { baseTokenUri = baseUri; if (address(_paperTokenAddress) != address(0)) { paperTokenAddress = ERC20Burnable(_paperTokenAddress); } if (address(_nftTokenAddress) != address(0)) { nftTokenAddress = IERC721(_nftTokenAddress); } } function totalSupply() external view returns (uint256) { uint256 supply = _owners.length; return supply; } //external fallback() external payable {} receive() external payable {} // solhint-disable-line no-empty-blocks modifier callerIsUser() { // solhint-disable-next-line avoid-tx-origin require(tx.origin == msg.sender, "Cannot be called by a contract"); _; } function verifySender( bytes memory signature, uint256 tokenId, uint256 quantity ) internal view returns (bool) { bytes32 hash = ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(msg.sender, tokenId, quantity))); return ECDSA.recover(hash, signature) == signerAddress; } function mint( uint256 quantity, bytes memory signature, uint256[] memory tokenIds ) external payable whenNotPaused callerIsUser { uint256 supply = _owners.length; require((supply + quantity) <= MAX_SUPPLY, "Beyond Max Supply"); // verifying the signature require(verifySender(signature, tokenIds[0], quantity), "Invalid Access"); // token validation for (uint256 i = 0; i < tokenIds.length; i++) { // validating the claimed token ids require(!claimedTokens[tokenIds[i]], "Token ID already claimed"); // validating the token ownership require(nftTokenAddress.ownerOf(tokenIds[i]) == msg.sender, "Token owner mismatch"); claimedTokens[tokenIds[i]] = true; } // check allowance uint256 neededPaperToken = paperTokensPerMint * quantity; uint256 allowance = paperTokenAddress.allowance(msg.sender, address(this)); require(allowance >= neededPaperToken, "Insufficient Allowance"); // Burning the $PAPER Tokens paperTokenAddress.burnFrom(msg.sender, neededPaperToken); // Minting _mintLoop(msg.sender, quantity); } // Owner function mintForAddress(uint256 quantity, address _receiver) public onlyOwner { uint256 supply = _owners.length; require((supply + quantity) <= MAX_SUPPLY, "Beyond Max Supply"); _mintLoop(_receiver, quantity); } function _mintLoop(address _receiver, uint256 quantity) internal { uint256 supply = _owners.length; for (uint256 i = 0; i < quantity; i++) { _safeMint(_receiver, supply++, ""); } } function walletOfOwner(address _owner) external view returns (uint256[] memory) { uint256 ownerTokenCount = balanceOf(_owner); uint256[] memory ownedTokenIds = new uint256[](ownerTokenCount); uint256 currentTokenId = 0; uint256 ownedTokenIndex = 0; while (ownedTokenIndex < ownerTokenCount && currentTokenId <= MAX_SUPPLY) { address currentTokenOwner = ownerOf(currentTokenId); if (currentTokenOwner == _owner) { ownedTokenIds[ownedTokenIndex] = currentTokenId; ownedTokenIndex++; } currentTokenId++; } return ownedTokenIds; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "URI query for nonexistent token"); return bytes(baseTokenUri).length > 0 ? string(abi.encodePacked(baseTokenUri, tokenId.toString(), ".json")) : ""; } function checkTokensStatus(uint256[] memory tokenIds) external view returns (bool[] memory result) { require(tokenIds.length > 0, "Token Ids not set"); bool[] memory unclaimedTokenIds = new bool[](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; i++) { if (claimedTokens[tokenIds[i]]) { unclaimedTokenIds[i] = true; } } return unclaimedTokenIds; } function updateTokensClaimedStatus(uint256[] memory tokenIds, bool[] memory newClaimStatus) external onlyOwner { require(tokenIds.length > 0, "Token Ids not set"); require(newClaimStatus.length > 0, "Claim status not set"); require(tokenIds.length == newClaimStatus.length, "Data mismatch"); for (uint256 i = 0; i < tokenIds.length; i++) { if (claimedTokens[tokenIds[i]] != newClaimStatus[i]) { claimedTokens[tokenIds[i]] = newClaimStatus[i]; } } } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function setTokenUri(string memory newBaseTokenUri) external onlyOwner { baseTokenUri = newBaseTokenUri; } function setSignerAddress(address newSignerAddress) external onlyOwner { if (address(newSignerAddress) != address(0)) { signerAddress = newSignerAddress; } } function setNFTAddress(IERC721 newAddress) external onlyOwner { if (address(newAddress) != address(0)) { nftTokenAddress = IERC721(newAddress); } } function setPaperTokenAddress(ERC20Burnable newAddress) external onlyOwner { if (address(newAddress) != address(0)) { paperTokenAddress = ERC20Burnable(newAddress); } } function setPaperTokensPerMint(uint256 newPaperTokensNeeded) external onlyOwner { if (paperTokensPerMint != newPaperTokensNeeded) { paperTokensPerMint = newPaperTokensNeeded; } } function withdraw(uint256 percentWithdrawl) external onlyOwner { require(address(this).balance > 0, "No funds available"); require(percentWithdrawl > 0 && percentWithdrawl <= 100, "Invalid Withdrawl percent"); Address.sendValue(payable(owner()), (address(this).balance * percentWithdrawl) / 100); } }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.4; /******************** * @author: Squeebo * ********************/ 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/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; abstract contract ERC721B is Context, ERC165, IERC721, IERC721Metadata { using Address for address; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address address[] internal _owners; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); uint256 count = 0; uint256 length = _owners.length; for (uint256 i = 0; i < length; ++i) { if (owner == _owners[i]) { ++count; } } delete length; return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721B.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _owners.length && _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721B.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _owners.push(to); emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721B.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _owners[tokenId] = address(0); emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721B.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721B.ownerOf(tokenId), 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.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ERC20Burnable","name":"_paperTokenAddress","type":"address"},{"internalType":"contract IERC721","name":"_nftTokenAddress","type":"address"},{"internalType":"string","name":"baseUri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"checkTokensStatus","outputs":[{"internalType":"bool[]","name":"result","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"mintForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftTokenAddress","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"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":"paperTokenAddress","outputs":[{"internalType":"contract ERC20Burnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paperTokensPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"contract IERC721","name":"newAddress","type":"address"}],"name":"setNFTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20Burnable","name":"newAddress","type":"address"}],"name":"setPaperTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPaperTokensNeeded","type":"uint256"}],"name":"setPaperTokensPerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSignerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseTokenUri","type":"string"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool[]","name":"newClaimStatus","type":"bool[]"}],"name":"updateTokensClaimedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"percentWithdrawl","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052682b5e3af16b18800000600655600980546001600160a01b03191673a8e29a2566a9f7c485955b3267352663e6db854f1790553480156200004457600080fd5b5060405162003c0638038062003c06833981016040819052620000679162000278565b6040518060400160405280600a81526020016914dc1858d950dc98599d60b21b8152506040518060400160405280600a81526020016914d41050d150d490519560b21b8152508160009080519060200190620000c5929190620001d2565b508051620000db906001906020840190620001d2565b505050620000f8620000f26200017c60201b60201c565b62000180565b6005805460ff60a01b1916905580516200011a906007906020840190620001d2565b506001600160a01b038316156200014757600a80546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156200017357600b80546001600160a01b0319166001600160a01b0384161790555b505050620003ee565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001e09062000382565b90600052602060002090601f0160209004810192826200020457600085556200024f565b82601f106200021f57805160ff19168380011785556200024f565b828001600101855582156200024f579182015b828111156200024f57825182559160200191906001019062000232565b506200025d92915062000261565b5090565b5b808211156200025d576000815560010162000262565b6000806000606084860312156200028e57600080fd5b83516200029b81620003d5565b80935050602080850151620002b081620003d5565b60408601519093506001600160401b0380821115620002ce57600080fd5b818701915087601f830112620002e357600080fd5b815181811115620002f857620002f8620003bf565b604051601f8201601f19908116603f01168101908382118183101715620003235762000323620003bf565b816040528281528a868487010111156200033c57600080fd5b600093505b8284101562000360578484018601518185018701529285019262000341565b82841115620003725760008684830101525b8096505050505050509250925092565b600181811c908216806200039757607f821691505b60208210811415620003b957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620003eb57600080fd5b50565b61380880620003fe6000396000f3fe6080604052600436106102475760003560e01c80636352211e1161013e578063a22cb465116100bf578063e5a342a311610079578063efbd73f411610061578063efbd73f4146106cb578063f2fde38b146106eb578063fc85be411461070b57005b8063e5a342a314610652578063e985e9c51461068257005b8063c22c294c116100a7578063c22c294c146105ff578063c2edf2bd1461061f578063c87b56dd1461063257005b8063a22cb465146105bf578063b88d4fde146105df57005b80637778d1c6116101105780638da5cb5b116100f85780638da5cb5b1461056c57806395d89b411461058a5780639b103e671461059f57005b80637778d1c6146105375780638456cb591461055757005b80636352211e146104c257806369d03738146104e257806370a0823114610502578063715018a61461052257005b80632e1a7d4d116101c857806342842e0e1161019a578063574453e611610182578063574453e6146104635780635b7633d0146104835780635c975abb146104a357005b806342842e0e14610416578063438b63001461043657005b80632e1a7d4d1461039e5780632e866124146103be57806332cb6b0c146103eb5780633f4ba83a1461040157005b806306fdde0311610219578063095ea7b311610201578063095ea7b31461033f57806318160ddd1461035f57806323b872dd1461037e57005b806306fdde03146102fd578063081812fc1461031f57005b806301ffc9a714610250578063046dc16614610285578063059cd0cd146102a55780630675b7c6146102dd57005b3661024e57005b005b34801561025c57600080fd5b5061027061026b3660046132a5565b610721565b60405190151581526020015b60405180910390f35b34801561029157600080fd5b5061024e6102a0366004613026565b610806565b3480156102b157600080fd5b50600b546102c5906001600160a01b031681565b6040516001600160a01b03909116815260200161027c565b3480156102e957600080fd5b5061024e6102f83660046132df565b6108a0565b34801561030957600080fd5b50610312610911565b60405161027c91906135c1565b34801561032b57600080fd5b506102c561033a366004613328565b6109a3565b34801561034b57600080fd5b5061024e61035a36600461317b565b610a3c565b34801561036b57600080fd5b506002545b60405190815260200161027c565b34801561038a57600080fd5b5061024e610399366004613099565b610b6e565b3480156103aa57600080fd5b5061024e6103b9366004613328565b610bf5565b3480156103ca57600080fd5b506103de6103d93660046131a7565b610d2c565b60405161027c9190613543565b3480156103f757600080fd5b506103706128b381565b34801561040d57600080fd5b5061024e610e4a565b34801561042257600080fd5b5061024e610431366004613099565b610eae565b34801561044257600080fd5b50610456610451366004613026565b610ec9565b60405161027c9190613589565b34801561046f57600080fd5b5061024e61047e3660046131dc565b610fa9565b34801561048f57600080fd5b506009546102c5906001600160a01b031681565b3480156104af57600080fd5b50600554600160a01b900460ff16610270565b3480156104ce57600080fd5b506102c56104dd366004613328565b6111c9565b3480156104ee57600080fd5b5061024e6104fd366004613026565b611269565b34801561050e57600080fd5b5061037061051d366004613026565b6112ff565b34801561052e57600080fd5b5061024e6113e4565b34801561054357600080fd5b5061024e610552366004613328565b611448565b34801561056357600080fd5b5061024e6114b0565b34801561057857600080fd5b506005546001600160a01b03166102c5565b34801561059657600080fd5b50610312611512565b3480156105ab57600080fd5b50600a546102c5906001600160a01b031681565b3480156105cb57600080fd5b5061024e6105da366004613146565b611521565b3480156105eb57600080fd5b5061024e6105fa3660046130da565b6115e6565b34801561060b57600080fd5b5061024e61061a366004613026565b611674565b61024e61062d36600461337f565b61170a565b34801561063e57600080fd5b5061031261064d366004613328565b611bee565b34801561065e57600080fd5b5061027061066d366004613328565b60086020526000908152604090205460ff1681565b34801561068e57600080fd5b5061027061069d366004613060565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b3480156106d757600080fd5b5061024e6106e636600461335a565b611ca1565b3480156106f757600080fd5b5061024e610706366004613026565b611d63565b34801561071757600080fd5b5061037060065481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806107b457507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061080057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6005546001600160a01b031633146108655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381161561089d576009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b50565b6005546001600160a01b031633146108fa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b805161090d906007906020840190612e87565b5050565b606060008054610920906136b7565b80601f016020809104026020016040519081016040528092919081815260200182805461094c906136b7565b80156109995780601f1061096e57610100808354040283529160200191610999565b820191906000526020600020905b81548152906001019060200180831161097c57829003601f168201915b5050505050905090565b60006109ae82611e42565b610a205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161085c565b506000908152600360205260409020546001600160a01b031690565b6000610a47826111c9565b9050806001600160a01b0316836001600160a01b03161415610ad15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161085c565b336001600160a01b0382161480610aed5750610aed813361069d565b610b5f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161085c565b610b698383611e8c565b505050565b610b783382611f07565b610bea5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161085c565b610b69838383612002565b6005546001600160a01b03163314610c4f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b60004711610c9f5760405162461bcd60e51b815260206004820152601260248201527f4e6f2066756e647320617661696c61626c650000000000000000000000000000604482015260640161085c565b600081118015610cb0575060648111155b610cfc5760405162461bcd60e51b815260206004820152601960248201527f496e76616c69642057697468647261776c2070657263656e7400000000000000604482015260640161085c565b61089d610d116005546001600160a01b031690565b6064610d1d8447613655565b610d279190613641565b612192565b60606000825111610d7f5760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f7420736574000000000000000000000000000000604482015260640161085c565b6000825167ffffffffffffffff811115610d9b57610d9b613779565b604051908082528060200260200182016040528015610dc4578160200160208202803683370190505b50905060005b8351811015610e435760086000858381518110610de957610de9613763565b60209081029190910181015182528101919091526040016000205460ff1615610e31576001828281518110610e2057610e20613763565b911515602092830291909101909101525b80610e3b816136f2565b915050610dca565b5092915050565b6005546001600160a01b03163314610ea45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b610eac6122ab565b565b610b69838383604051806020016040528060008152506115e6565b60606000610ed6836112ff565b905060008167ffffffffffffffff811115610ef357610ef3613779565b604051908082528060200260200182016040528015610f1c578160200160208202803683370190505b5090506000805b8381108015610f3457506128b38211155b15610f9f576000610f44836111c9565b9050866001600160a01b0316816001600160a01b03161415610f8c5782848381518110610f7357610f73613763565b602090810291909101015281610f88816136f2565b9250505b82610f96816136f2565b93505050610f23565b5090949350505050565b6005546001600160a01b031633146110035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b60008251116110545760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f7420736574000000000000000000000000000000604482015260640161085c565b60008151116110a55760405162461bcd60e51b815260206004820152601460248201527f436c61696d20737461747573206e6f7420736574000000000000000000000000604482015260640161085c565b80518251146110f65760405162461bcd60e51b815260206004820152600d60248201527f44617461206d69736d6174636800000000000000000000000000000000000000604482015260640161085c565b60005b8251811015610b695781818151811061111457611114613763565b602002602001015115156008600085848151811061113457611134613763565b60209081029190910181015182528101919091526040016000205460ff161515146111b75781818151811061116b5761116b613763565b60200260200101516008600085848151811061118957611189613763565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806111c1816136f2565b9150506110f9565b600080600283815481106111df576111df613763565b6000918252602090912001546001600160a01b03169050806108005760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161085c565b6005546001600160a01b031633146112c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6001600160a01b0381161561089d57600b80546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b60006001600160a01b03821661137d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161085c565b600254600090815b818110156113db57600281815481106113a0576113a0613763565b6000918252602090912001546001600160a01b03868116911614156113cb576113c8836136f2565b92505b6113d4816136f2565b9050611385565b50909392505050565b6005546001600160a01b0316331461143e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b610eac600061236c565b6005546001600160a01b031633146114a25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b806006541461089d57600655565b6005546001600160a01b0316331461150a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b610eac6123cb565b606060018054610920906136b7565b6001600160a01b03821633141561157a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161085c565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6115f03383611f07565b6116625760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161085c565b61166e8484848461247b565b50505050565b6005546001600160a01b031633146116ce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6001600160a01b0381161561089d57600a80546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600554600160a01b900460ff16156117645760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161085c565b3233146117b35760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e74726163740000604482015260640161085c565b6002546128b36117c38583613629565b11156118115760405162461bcd60e51b815260206004820152601160248201527f4265796f6e64204d617820537570706c79000000000000000000000000000000604482015260640161085c565b611836838360008151811061182857611828613763565b602002602001015186612504565b6118825760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420416363657373000000000000000000000000000000000000604482015260640161085c565b60005b8251811015611a5c57600860008483815181106118a4576118a4613763565b60209081029190910181015182528101919091526040016000205460ff161561190f5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e20494420616c726561647920636c61696d65640000000000000000604482015260640161085c565b600b54835133916001600160a01b031690636352211e9086908590811061193857611938613763565b60200260200101516040518263ffffffff1660e01b815260040161195e91815260200190565b60206040518083038186803b15801561197657600080fd5b505afa15801561198a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ae9190613043565b6001600160a01b031614611a045760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206f776e6572206d69736d61746368000000000000000000000000604482015260640161085c565b600160086000858481518110611a1c57611a1c613763565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611a54906136f2565b915050611885565b50600084600654611a6d9190613655565b600a546040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529192506000916001600160a01b039091169063dd62ed3e9060440160206040518083038186803b158015611ad557600080fd5b505afa158015611ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0d9190613341565b905081811015611b5f5760405162461bcd60e51b815260206004820152601660248201527f496e73756666696369656e7420416c6c6f77616e636500000000000000000000604482015260640161085c565b600a546040517f79cc6790000000000000000000000000000000000000000000000000000000008152336004820152602481018490526001600160a01b03909116906379cc679090604401600060405180830381600087803b158015611bc457600080fd5b505af1158015611bd8573d6000803e3d6000fd5b50505050611be633876125e1565b505050505050565b6060611bf982611e42565b611c455760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015260640161085c565b600060078054611c54906136b7565b905011611c705760405180602001604052806000815250610800565b6007611c7b83612626565b604051602001611c8c929190613434565b60405160208183030381529060405292915050565b6005546001600160a01b03163314611cfb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6002546128b3611d0b8483613629565b1115611d595760405162461bcd60e51b815260206004820152601160248201527f4265796f6e64204d617820537570706c79000000000000000000000000000000604482015260640161085c565b610b6982846125e1565b6005546001600160a01b03163314611dbd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6001600160a01b038116611e395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161085c565b61089d8161236c565b60025460009082108015610800575060006001600160a01b031660028381548110611e6f57611e6f613763565b6000918252602090912001546001600160a01b0316141592915050565b6000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611ece826111c9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f1282611e42565b611f845760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161085c565b6000611f8f836111c9565b9050806001600160a01b0316846001600160a01b03161480611fca5750836001600160a01b0316611fbf846109a3565b6001600160a01b0316145b80611ffa57506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612015826111c9565b6001600160a01b0316146120915760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161085c565b6001600160a01b03821661210c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161085c565b612117600082611e8c565b816002828154811061212b5761212b613763565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b804710156121e25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161085c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461222f576040519150601f19603f3d011682016040523d82523d6000602084013e612234565b606091505b5050905080610b695760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161085c565b600554600160a01b900460ff166123045760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161085c565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600554600160a01b900460ff16156124255760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161085c565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861234f3390565b612486848484612002565b61249284848484612758565b61166e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161085c565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481018390526054810182905260009081906125b590607401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6009549091506001600160a01b03166125ce8287612905565b6001600160a01b03161495945050505050565b60025460005b8281101561166e5761261484836125fd816136f2565b945060405180602001604052806000815250612929565b8061261e816136f2565b9150506125e7565b60608161266657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612690578061267a816136f2565b91506126899050600a83613641565b915061266a565b60008167ffffffffffffffff8111156126ab576126ab613779565b6040519080825280601f01601f1916602001820160405280156126d5576020820181803683370190505b5090505b8415611ffa576126ea600183613674565b91506126f7600a8661370d565b612702906030613629565b60f81b81838151811061271757612717613763565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612751600a86613641565b94506126d9565b60006001600160a01b0384163b156128fa576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a02906127b5903390899088908890600401613507565b602060405180830381600087803b1580156127cf57600080fd5b505af19250505080156127ff575060408051601f3d908101601f191682019092526127fc918101906132c2565b60015b6128af573d80801561282d576040519150601f19603f3d011682016040523d82523d6000602084013e612832565b606091505b5080516128a75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161085c565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611ffa565b506001949350505050565b600080600061291485856129b2565b9150915061292181612a22565b509392505050565b6129338383612c13565b6129406000848484612758565b610b695760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161085c565b6000808251604114156129e95760208301516040840151606085015160001a6129dd87828585612d48565b94509450505050612a1b565b825160401415612a135760208301516040840151612a08868383612e35565b935093505050612a1b565b506000905060025b9250929050565b6000816004811115612a3657612a3661374d565b1415612a3f5750565b6001816004811115612a5357612a5361374d565b1415612aa15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161085c565b6002816004811115612ab557612ab561374d565b1415612b035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161085c565b6003816004811115612b1757612b1761374d565b1415612b8b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161085c565b6004816004811115612b9f57612b9f61374d565b141561089d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161085c565b6001600160a01b038216612c695760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161085c565b612c7281611e42565b15612cbf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161085c565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d7f5750600090506003612e2c565b8460ff16601b14158015612d9757508460ff16601c14155b15612da85750600090506004612e2c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612dfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612e2557600060019250925050612e2c565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681612e6b60ff86901c601b613629565b9050612e7987828885612d48565b935093505050935093915050565b828054612e93906136b7565b90600052602060002090601f016020900481019282612eb55760008555612efb565b82601f10612ece57805160ff1916838001178555612efb565b82800160010185558215612efb579182015b82811115612efb578251825591602001919060010190612ee0565b50612f07929150612f0b565b5090565b5b80821115612f075760008155600101612f0c565b600067ffffffffffffffff831115612f3a57612f3a613779565b612f4d6020601f19601f860116016135d4565b9050828152838383011115612f6157600080fd5b828260208301376000602084830101529392505050565b600082601f830112612f8957600080fd5b81356020612f9e612f9983613605565b6135d4565b80838252828201915082860187848660051b8901011115612fbe57600080fd5b60005b85811015612fdd57813584529284019290840190600101612fc1565b5090979650505050505050565b80358015158114612ffa57600080fd5b919050565b600082601f83011261301057600080fd5b61301f83833560208501612f20565b9392505050565b60006020828403121561303857600080fd5b813561301f8161378f565b60006020828403121561305557600080fd5b815161301f8161378f565b6000806040838503121561307357600080fd5b823561307e8161378f565b9150602083013561308e8161378f565b809150509250929050565b6000806000606084860312156130ae57600080fd5b83356130b98161378f565b925060208401356130c98161378f565b929592945050506040919091013590565b600080600080608085870312156130f057600080fd5b84356130fb8161378f565b9350602085013561310b8161378f565b925060408501359150606085013567ffffffffffffffff81111561312e57600080fd5b61313a87828801612fff565b91505092959194509250565b6000806040838503121561315957600080fd5b82356131648161378f565b915061317260208401612fea565b90509250929050565b6000806040838503121561318e57600080fd5b82356131998161378f565b946020939093013593505050565b6000602082840312156131b957600080fd5b813567ffffffffffffffff8111156131d057600080fd5b611ffa84828501612f78565b600080604083850312156131ef57600080fd5b823567ffffffffffffffff8082111561320757600080fd5b61321386838701612f78565b935060209150818501358181111561322a57600080fd5b85019050601f8101861361323d57600080fd5b803561324b612f9982613605565b80828252848201915084840189868560051b870101111561326b57600080fd5b600094505b838510156132955761328181612fea565b835260019490940193918501918501613270565b5080955050505050509250929050565b6000602082840312156132b757600080fd5b813561301f816137a4565b6000602082840312156132d457600080fd5b815161301f816137a4565b6000602082840312156132f157600080fd5b813567ffffffffffffffff81111561330857600080fd5b8201601f8101841361331957600080fd5b611ffa84823560208401612f20565b60006020828403121561333a57600080fd5b5035919050565b60006020828403121561335357600080fd5b5051919050565b6000806040838503121561336d57600080fd5b82359150602083013561308e8161378f565b60008060006060848603121561339457600080fd5b83359250602084013567ffffffffffffffff808211156133b357600080fd5b6133bf87838801612fff565b935060408601359150808211156133d557600080fd5b506133e286828701612f78565b9150509250925092565b6000815180845261340481602086016020860161368b565b601f01601f19169290920160200192915050565b6000815161342a81856020860161368b565b9290920192915050565b600080845481600182811c91508083168061345057607f831692505b602080841082141561347057634e487b7160e01b86526022600452602486fd5b8180156134845760018114613495576134c2565b60ff198616895284890196506134c2565b60008b81526020902060005b868110156134ba5781548b8201529085019083016134a1565b505084890196505b5050505050506134fe6134d58286613418565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b95945050505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261353960808301846133ec565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561357d57835115158352928401929184019160010161355f565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561357d578351835292840192918401916001016135a5565b60208152600061301f60208301846133ec565b604051601f8201601f1916810167ffffffffffffffff811182821017156135fd576135fd613779565b604052919050565b600067ffffffffffffffff82111561361f5761361f613779565b5060051b60200190565b6000821982111561363c5761363c613721565b500190565b60008261365057613650613737565b500490565b600081600019048311821515161561366f5761366f613721565b500290565b60008282101561368657613686613721565b500390565b60005b838110156136a657818101518382015260200161368e565b8381111561166e5750506000910152565b600181811c908216806136cb57607f821691505b602082108114156136ec57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561370657613706613721565b5060010190565b60008261371c5761371c613737565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461089d57600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461089d57600080fdfea264697066735822122081ddb095b8b9e84ae43dc503d2c3572f736262303a3dc3ea822e0fe76689e65164736f6c6343000807003300000000000000000000000021018cbc9ad730542130be180b577b74db2a9397000000000000000000000000d73acd7f5099fdd910215dbff029185f21ffbcf000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d62553534456653334456575a4a5333666e7a424e5a335942336a55344172713838386b7042484762696570752f00000000000000000000
Deployed Bytecode
0x6080604052600436106102475760003560e01c80636352211e1161013e578063a22cb465116100bf578063e5a342a311610079578063efbd73f411610061578063efbd73f4146106cb578063f2fde38b146106eb578063fc85be411461070b57005b8063e5a342a314610652578063e985e9c51461068257005b8063c22c294c116100a7578063c22c294c146105ff578063c2edf2bd1461061f578063c87b56dd1461063257005b8063a22cb465146105bf578063b88d4fde146105df57005b80637778d1c6116101105780638da5cb5b116100f85780638da5cb5b1461056c57806395d89b411461058a5780639b103e671461059f57005b80637778d1c6146105375780638456cb591461055757005b80636352211e146104c257806369d03738146104e257806370a0823114610502578063715018a61461052257005b80632e1a7d4d116101c857806342842e0e1161019a578063574453e611610182578063574453e6146104635780635b7633d0146104835780635c975abb146104a357005b806342842e0e14610416578063438b63001461043657005b80632e1a7d4d1461039e5780632e866124146103be57806332cb6b0c146103eb5780633f4ba83a1461040157005b806306fdde0311610219578063095ea7b311610201578063095ea7b31461033f57806318160ddd1461035f57806323b872dd1461037e57005b806306fdde03146102fd578063081812fc1461031f57005b806301ffc9a714610250578063046dc16614610285578063059cd0cd146102a55780630675b7c6146102dd57005b3661024e57005b005b34801561025c57600080fd5b5061027061026b3660046132a5565b610721565b60405190151581526020015b60405180910390f35b34801561029157600080fd5b5061024e6102a0366004613026565b610806565b3480156102b157600080fd5b50600b546102c5906001600160a01b031681565b6040516001600160a01b03909116815260200161027c565b3480156102e957600080fd5b5061024e6102f83660046132df565b6108a0565b34801561030957600080fd5b50610312610911565b60405161027c91906135c1565b34801561032b57600080fd5b506102c561033a366004613328565b6109a3565b34801561034b57600080fd5b5061024e61035a36600461317b565b610a3c565b34801561036b57600080fd5b506002545b60405190815260200161027c565b34801561038a57600080fd5b5061024e610399366004613099565b610b6e565b3480156103aa57600080fd5b5061024e6103b9366004613328565b610bf5565b3480156103ca57600080fd5b506103de6103d93660046131a7565b610d2c565b60405161027c9190613543565b3480156103f757600080fd5b506103706128b381565b34801561040d57600080fd5b5061024e610e4a565b34801561042257600080fd5b5061024e610431366004613099565b610eae565b34801561044257600080fd5b50610456610451366004613026565b610ec9565b60405161027c9190613589565b34801561046f57600080fd5b5061024e61047e3660046131dc565b610fa9565b34801561048f57600080fd5b506009546102c5906001600160a01b031681565b3480156104af57600080fd5b50600554600160a01b900460ff16610270565b3480156104ce57600080fd5b506102c56104dd366004613328565b6111c9565b3480156104ee57600080fd5b5061024e6104fd366004613026565b611269565b34801561050e57600080fd5b5061037061051d366004613026565b6112ff565b34801561052e57600080fd5b5061024e6113e4565b34801561054357600080fd5b5061024e610552366004613328565b611448565b34801561056357600080fd5b5061024e6114b0565b34801561057857600080fd5b506005546001600160a01b03166102c5565b34801561059657600080fd5b50610312611512565b3480156105ab57600080fd5b50600a546102c5906001600160a01b031681565b3480156105cb57600080fd5b5061024e6105da366004613146565b611521565b3480156105eb57600080fd5b5061024e6105fa3660046130da565b6115e6565b34801561060b57600080fd5b5061024e61061a366004613026565b611674565b61024e61062d36600461337f565b61170a565b34801561063e57600080fd5b5061031261064d366004613328565b611bee565b34801561065e57600080fd5b5061027061066d366004613328565b60086020526000908152604090205460ff1681565b34801561068e57600080fd5b5061027061069d366004613060565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b3480156106d757600080fd5b5061024e6106e636600461335a565b611ca1565b3480156106f757600080fd5b5061024e610706366004613026565b611d63565b34801561071757600080fd5b5061037060065481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806107b457507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061080057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6005546001600160a01b031633146108655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381161561089d576009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b50565b6005546001600160a01b031633146108fa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b805161090d906007906020840190612e87565b5050565b606060008054610920906136b7565b80601f016020809104026020016040519081016040528092919081815260200182805461094c906136b7565b80156109995780601f1061096e57610100808354040283529160200191610999565b820191906000526020600020905b81548152906001019060200180831161097c57829003601f168201915b5050505050905090565b60006109ae82611e42565b610a205760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161085c565b506000908152600360205260409020546001600160a01b031690565b6000610a47826111c9565b9050806001600160a01b0316836001600160a01b03161415610ad15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f7200000000000000000000000000000000000000000000000000000000000000606482015260840161085c565b336001600160a01b0382161480610aed5750610aed813361069d565b610b5f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161085c565b610b698383611e8c565b505050565b610b783382611f07565b610bea5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161085c565b610b69838383612002565b6005546001600160a01b03163314610c4f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b60004711610c9f5760405162461bcd60e51b815260206004820152601260248201527f4e6f2066756e647320617661696c61626c650000000000000000000000000000604482015260640161085c565b600081118015610cb0575060648111155b610cfc5760405162461bcd60e51b815260206004820152601960248201527f496e76616c69642057697468647261776c2070657263656e7400000000000000604482015260640161085c565b61089d610d116005546001600160a01b031690565b6064610d1d8447613655565b610d279190613641565b612192565b60606000825111610d7f5760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f7420736574000000000000000000000000000000604482015260640161085c565b6000825167ffffffffffffffff811115610d9b57610d9b613779565b604051908082528060200260200182016040528015610dc4578160200160208202803683370190505b50905060005b8351811015610e435760086000858381518110610de957610de9613763565b60209081029190910181015182528101919091526040016000205460ff1615610e31576001828281518110610e2057610e20613763565b911515602092830291909101909101525b80610e3b816136f2565b915050610dca565b5092915050565b6005546001600160a01b03163314610ea45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b610eac6122ab565b565b610b69838383604051806020016040528060008152506115e6565b60606000610ed6836112ff565b905060008167ffffffffffffffff811115610ef357610ef3613779565b604051908082528060200260200182016040528015610f1c578160200160208202803683370190505b5090506000805b8381108015610f3457506128b38211155b15610f9f576000610f44836111c9565b9050866001600160a01b0316816001600160a01b03161415610f8c5782848381518110610f7357610f73613763565b602090810291909101015281610f88816136f2565b9250505b82610f96816136f2565b93505050610f23565b5090949350505050565b6005546001600160a01b031633146110035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b60008251116110545760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f7420736574000000000000000000000000000000604482015260640161085c565b60008151116110a55760405162461bcd60e51b815260206004820152601460248201527f436c61696d20737461747573206e6f7420736574000000000000000000000000604482015260640161085c565b80518251146110f65760405162461bcd60e51b815260206004820152600d60248201527f44617461206d69736d6174636800000000000000000000000000000000000000604482015260640161085c565b60005b8251811015610b695781818151811061111457611114613763565b602002602001015115156008600085848151811061113457611134613763565b60209081029190910181015182528101919091526040016000205460ff161515146111b75781818151811061116b5761116b613763565b60200260200101516008600085848151811061118957611189613763565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806111c1816136f2565b9150506110f9565b600080600283815481106111df576111df613763565b6000918252602090912001546001600160a01b03169050806108005760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161085c565b6005546001600160a01b031633146112c35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6001600160a01b0381161561089d57600b80546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b60006001600160a01b03821661137d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161085c565b600254600090815b818110156113db57600281815481106113a0576113a0613763565b6000918252602090912001546001600160a01b03868116911614156113cb576113c8836136f2565b92505b6113d4816136f2565b9050611385565b50909392505050565b6005546001600160a01b0316331461143e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b610eac600061236c565b6005546001600160a01b031633146114a25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b806006541461089d57600655565b6005546001600160a01b0316331461150a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b610eac6123cb565b606060018054610920906136b7565b6001600160a01b03821633141561157a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161085c565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6115f03383611f07565b6116625760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161085c565b61166e8484848461247b565b50505050565b6005546001600160a01b031633146116ce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6001600160a01b0381161561089d57600a80546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600554600160a01b900460ff16156117645760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161085c565b3233146117b35760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e74726163740000604482015260640161085c565b6002546128b36117c38583613629565b11156118115760405162461bcd60e51b815260206004820152601160248201527f4265796f6e64204d617820537570706c79000000000000000000000000000000604482015260640161085c565b611836838360008151811061182857611828613763565b602002602001015186612504565b6118825760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420416363657373000000000000000000000000000000000000604482015260640161085c565b60005b8251811015611a5c57600860008483815181106118a4576118a4613763565b60209081029190910181015182528101919091526040016000205460ff161561190f5760405162461bcd60e51b815260206004820152601860248201527f546f6b656e20494420616c726561647920636c61696d65640000000000000000604482015260640161085c565b600b54835133916001600160a01b031690636352211e9086908590811061193857611938613763565b60200260200101516040518263ffffffff1660e01b815260040161195e91815260200190565b60206040518083038186803b15801561197657600080fd5b505afa15801561198a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ae9190613043565b6001600160a01b031614611a045760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206f776e6572206d69736d61746368000000000000000000000000604482015260640161085c565b600160086000858481518110611a1c57611a1c613763565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611a54906136f2565b915050611885565b50600084600654611a6d9190613655565b600a546040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529192506000916001600160a01b039091169063dd62ed3e9060440160206040518083038186803b158015611ad557600080fd5b505afa158015611ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0d9190613341565b905081811015611b5f5760405162461bcd60e51b815260206004820152601660248201527f496e73756666696369656e7420416c6c6f77616e636500000000000000000000604482015260640161085c565b600a546040517f79cc6790000000000000000000000000000000000000000000000000000000008152336004820152602481018490526001600160a01b03909116906379cc679090604401600060405180830381600087803b158015611bc457600080fd5b505af1158015611bd8573d6000803e3d6000fd5b50505050611be633876125e1565b505050505050565b6060611bf982611e42565b611c455760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015260640161085c565b600060078054611c54906136b7565b905011611c705760405180602001604052806000815250610800565b6007611c7b83612626565b604051602001611c8c929190613434565b60405160208183030381529060405292915050565b6005546001600160a01b03163314611cfb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6002546128b3611d0b8483613629565b1115611d595760405162461bcd60e51b815260206004820152601160248201527f4265796f6e64204d617820537570706c79000000000000000000000000000000604482015260640161085c565b610b6982846125e1565b6005546001600160a01b03163314611dbd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161085c565b6001600160a01b038116611e395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161085c565b61089d8161236c565b60025460009082108015610800575060006001600160a01b031660028381548110611e6f57611e6f613763565b6000918252602090912001546001600160a01b0316141592915050565b6000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190611ece826111c9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f1282611e42565b611f845760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606482015260840161085c565b6000611f8f836111c9565b9050806001600160a01b0316846001600160a01b03161480611fca5750836001600160a01b0316611fbf846109a3565b6001600160a01b0316145b80611ffa57506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612015826111c9565b6001600160a01b0316146120915760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161085c565b6001600160a01b03821661210c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161085c565b612117600082611e8c565b816002828154811061212b5761212b613763565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b804710156121e25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161085c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461222f576040519150601f19603f3d011682016040523d82523d6000602084013e612234565b606091505b5050905080610b695760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161085c565b600554600160a01b900460ff166123045760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161085c565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600554600160a01b900460ff16156124255760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161085c565b600580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861234f3390565b612486848484612002565b61249284848484612758565b61166e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161085c565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481018390526054810182905260009081906125b590607401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6009549091506001600160a01b03166125ce8287612905565b6001600160a01b03161495945050505050565b60025460005b8281101561166e5761261484836125fd816136f2565b945060405180602001604052806000815250612929565b8061261e816136f2565b9150506125e7565b60608161266657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612690578061267a816136f2565b91506126899050600a83613641565b915061266a565b60008167ffffffffffffffff8111156126ab576126ab613779565b6040519080825280601f01601f1916602001820160405280156126d5576020820181803683370190505b5090505b8415611ffa576126ea600183613674565b91506126f7600a8661370d565b612702906030613629565b60f81b81838151811061271757612717613763565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612751600a86613641565b94506126d9565b60006001600160a01b0384163b156128fa576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a02906127b5903390899088908890600401613507565b602060405180830381600087803b1580156127cf57600080fd5b505af19250505080156127ff575060408051601f3d908101601f191682019092526127fc918101906132c2565b60015b6128af573d80801561282d576040519150601f19603f3d011682016040523d82523d6000602084013e612832565b606091505b5080516128a75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161085c565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050611ffa565b506001949350505050565b600080600061291485856129b2565b9150915061292181612a22565b509392505050565b6129338383612c13565b6129406000848484612758565b610b695760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e7465720000000000000000000000000000606482015260840161085c565b6000808251604114156129e95760208301516040840151606085015160001a6129dd87828585612d48565b94509450505050612a1b565b825160401415612a135760208301516040840151612a08868383612e35565b935093505050612a1b565b506000905060025b9250929050565b6000816004811115612a3657612a3661374d565b1415612a3f5750565b6001816004811115612a5357612a5361374d565b1415612aa15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161085c565b6002816004811115612ab557612ab561374d565b1415612b035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161085c565b6003816004811115612b1757612b1761374d565b1415612b8b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161085c565b6004816004811115612b9f57612b9f61374d565b141561089d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161085c565b6001600160a01b038216612c695760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161085c565b612c7281611e42565b15612cbf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161085c565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d7f5750600090506003612e2c565b8460ff16601b14158015612d9757508460ff16601c14155b15612da85750600090506004612e2c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612dfc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612e2557600060019250925050612e2c565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681612e6b60ff86901c601b613629565b9050612e7987828885612d48565b935093505050935093915050565b828054612e93906136b7565b90600052602060002090601f016020900481019282612eb55760008555612efb565b82601f10612ece57805160ff1916838001178555612efb565b82800160010185558215612efb579182015b82811115612efb578251825591602001919060010190612ee0565b50612f07929150612f0b565b5090565b5b80821115612f075760008155600101612f0c565b600067ffffffffffffffff831115612f3a57612f3a613779565b612f4d6020601f19601f860116016135d4565b9050828152838383011115612f6157600080fd5b828260208301376000602084830101529392505050565b600082601f830112612f8957600080fd5b81356020612f9e612f9983613605565b6135d4565b80838252828201915082860187848660051b8901011115612fbe57600080fd5b60005b85811015612fdd57813584529284019290840190600101612fc1565b5090979650505050505050565b80358015158114612ffa57600080fd5b919050565b600082601f83011261301057600080fd5b61301f83833560208501612f20565b9392505050565b60006020828403121561303857600080fd5b813561301f8161378f565b60006020828403121561305557600080fd5b815161301f8161378f565b6000806040838503121561307357600080fd5b823561307e8161378f565b9150602083013561308e8161378f565b809150509250929050565b6000806000606084860312156130ae57600080fd5b83356130b98161378f565b925060208401356130c98161378f565b929592945050506040919091013590565b600080600080608085870312156130f057600080fd5b84356130fb8161378f565b9350602085013561310b8161378f565b925060408501359150606085013567ffffffffffffffff81111561312e57600080fd5b61313a87828801612fff565b91505092959194509250565b6000806040838503121561315957600080fd5b82356131648161378f565b915061317260208401612fea565b90509250929050565b6000806040838503121561318e57600080fd5b82356131998161378f565b946020939093013593505050565b6000602082840312156131b957600080fd5b813567ffffffffffffffff8111156131d057600080fd5b611ffa84828501612f78565b600080604083850312156131ef57600080fd5b823567ffffffffffffffff8082111561320757600080fd5b61321386838701612f78565b935060209150818501358181111561322a57600080fd5b85019050601f8101861361323d57600080fd5b803561324b612f9982613605565b80828252848201915084840189868560051b870101111561326b57600080fd5b600094505b838510156132955761328181612fea565b835260019490940193918501918501613270565b5080955050505050509250929050565b6000602082840312156132b757600080fd5b813561301f816137a4565b6000602082840312156132d457600080fd5b815161301f816137a4565b6000602082840312156132f157600080fd5b813567ffffffffffffffff81111561330857600080fd5b8201601f8101841361331957600080fd5b611ffa84823560208401612f20565b60006020828403121561333a57600080fd5b5035919050565b60006020828403121561335357600080fd5b5051919050565b6000806040838503121561336d57600080fd5b82359150602083013561308e8161378f565b60008060006060848603121561339457600080fd5b83359250602084013567ffffffffffffffff808211156133b357600080fd5b6133bf87838801612fff565b935060408601359150808211156133d557600080fd5b506133e286828701612f78565b9150509250925092565b6000815180845261340481602086016020860161368b565b601f01601f19169290920160200192915050565b6000815161342a81856020860161368b565b9290920192915050565b600080845481600182811c91508083168061345057607f831692505b602080841082141561347057634e487b7160e01b86526022600452602486fd5b8180156134845760018114613495576134c2565b60ff198616895284890196506134c2565b60008b81526020902060005b868110156134ba5781548b8201529085019083016134a1565b505084890196505b5050505050506134fe6134d58286613418565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b95945050505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261353960808301846133ec565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561357d57835115158352928401929184019160010161355f565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561357d578351835292840192918401916001016135a5565b60208152600061301f60208301846133ec565b604051601f8201601f1916810167ffffffffffffffff811182821017156135fd576135fd613779565b604052919050565b600067ffffffffffffffff82111561361f5761361f613779565b5060051b60200190565b6000821982111561363c5761363c613721565b500190565b60008261365057613650613737565b500490565b600081600019048311821515161561366f5761366f613721565b500290565b60008282101561368657613686613721565b500390565b60005b838110156136a657818101518382015260200161368e565b8381111561166e5750506000910152565b600181811c908216806136cb57607f821691505b602082108114156136ec57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561370657613706613721565b5060010190565b60008261371c5761371c613737565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461089d57600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461089d57600080fdfea264697066735822122081ddb095b8b9e84ae43dc503d2c3572f736262303a3dc3ea822e0fe76689e65164736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000021018cbc9ad730542130be180b577b74db2a9397000000000000000000000000d73acd7f5099fdd910215dbff029185f21ffbcf000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d62553534456653334456575a4a5333666e7a424e5a335942336a55344172713838386b7042484762696570752f00000000000000000000
-----Decoded View---------------
Arg [0] : _paperTokenAddress (address): 0x21018CBC9ad730542130bE180b577b74DB2a9397
Arg [1] : _nftTokenAddress (address): 0xD73ACd7F5099fdd910215Dbff029185F21ffBCf0
Arg [2] : baseUri (string): ipfs://QmbU54EfS3DVWZJS3fnzBNZ3YB3jU4Arq888kpBHGbiepu/
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000021018cbc9ad730542130be180b577b74db2a9397
Arg [1] : 000000000000000000000000d73acd7f5099fdd910215dbff029185f21ffbcf0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [4] : 697066733a2f2f516d62553534456653334456575a4a5333666e7a424e5a3359
Arg [5] : 42336a55344172713838386b7042484762696570752f00000000000000000000
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.