NFT
Overview
TokenID
5225
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
JuiceboxFrens
Compiler Version
v0.8.8+commit.dddeac2f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: None pragma solidity ^0.8.8; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeCast.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "./Treasury.sol"; import "./ERC2981.sol"; struct SaleConfig { uint32 preSaleStartTime; uint32 publicSaleStartTime; uint32 txLimit; uint32 supplyLimit; } contract JuiceboxFrens is Ownable, ERC721, ERC2981, Treasury { using SafeCast for uint256; using ECDSA for bytes32; uint256 public constant mintPrice = 0.024 ether; uint256 public totalSupply = 0; SaleConfig public saleConfig; string public baseURI; address public whitelistSigner; mapping(address => uint256) private presaleMinted; address payable public withdrawalAddress; bytes32 private DOMAIN_SEPARATOR; bytes32 private TYPEHASH = keccak256("presale(address buyer,uint256 limit)"); address[] private mintPayees = [ 0xD32E3382Aa09323a08C226c6662E12B434c701B3, 0x3A6E953A119bA4665877EA1A095855405AAb360D ]; uint256[] private mintShares = [98, 2]; constructor(string memory inputBaseUri) ERC721("Juicebox Frens", "JBF") Treasury(mintPayees, mintShares) { baseURI = inputBaseUri; saleConfig = SaleConfig({ preSaleStartTime: 1647645600, // Fri Mar 18 2022 23:20:00 GMT+0000 publicSaleStartTime: 1647818400, // Sun Mar 20 2022 23:20:00 GMT+0000 txLimit: 3, supplyLimit: 6969 }); _setRoyalties(address(this), 500); // 5% royalties uint256 chainId; assembly { chainId := chainid() } DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes("JuiceboxFrens")), keccak256(bytes("1")), chainId, address(this) ) ); } function _baseURI() internal view override returns (string memory) { return baseURI; } function setBaseURI(string calldata newBaseUri) external onlyOwner { baseURI = newBaseUri; } function setRoyalties(address recipient, uint256 value) external onlyOwner { require(recipient != address(0), "zero address"); _setRoyalties(recipient, value); } function setWhiteListSigner(address signerToSet) external onlyOwner { require(signerToSet != address(0), "zero address"); whitelistSigner = signerToSet; } function configureSales( uint256 preSaleStartTime, uint256 publicSaleStartTime, uint256 txLimit, uint256 supplyLimit ) external onlyOwner { uint32 _preSaleStartTime = preSaleStartTime.toUint32(); uint32 _publicSaleStartTime = publicSaleStartTime.toUint32(); uint32 _txLimit = txLimit.toUint32(); uint32 _supplyLimit = supplyLimit.toUint32(); require(0 < _preSaleStartTime, "Invalid time"); require(_preSaleStartTime < _publicSaleStartTime, "Invalid time"); saleConfig = SaleConfig({ preSaleStartTime: _preSaleStartTime, publicSaleStartTime: _publicSaleStartTime, txLimit: _txLimit, supplyLimit: _supplyLimit }); } function buyPresale( bytes memory signature, uint256 numberOfTokens, uint256 approvedLimit ) external payable { require( block.timestamp >= saleConfig.preSaleStartTime && block.timestamp < saleConfig.publicSaleStartTime, "Presale is not active" ); require(whitelistSigner != address(0), "White list signer not yet set"); require(msg.value == (mintPrice * numberOfTokens), "Incorrect payment"); require( (presaleMinted[msg.sender] + numberOfTokens) <= approvedLimit, "Wallet limit exceeded" ); bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, keccak256(abi.encode(TYPEHASH, msg.sender, approvedLimit)) ) ); address signer = digest.recover(signature); require( signer != address(0) && signer == whitelistSigner, "Invalid signature" ); presaleMinted[msg.sender] = presaleMinted[msg.sender] + numberOfTokens; mint(msg.sender, numberOfTokens); } function buy(uint256 numberOfTokens) external payable { SaleConfig memory _saleConfig = saleConfig; require( block.timestamp >= _saleConfig.publicSaleStartTime, "Sale is not active" ); require( numberOfTokens <= _saleConfig.txLimit, "Transaction limit exceeded" ); require(msg.value == (mintPrice * numberOfTokens), "Incorrect payment"); mint(msg.sender, numberOfTokens); } function mint(address to, uint256 numberOfTokens) private { require( (totalSupply + numberOfTokens) <= saleConfig.supplyLimit, "Not enough tokens left" ); uint256 newId = totalSupply; for (uint256 i = 0; i < numberOfTokens; i++) { newId += 1; _safeMint(to, newId); } totalSupply = newId; } function reserve(address to, uint256 numberOfTokens) external onlyOwner { mint(to, numberOfTokens); } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } }
// 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 (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 v4.4.1 (utils/math/SafeCast.sol) pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); return uint224(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); return uint128(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); return uint96(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); return uint64(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); return uint32(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits"); return int128(value); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits"); return int64(value); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits"); return int32(value); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits"); return int16(value); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits"); return int8(value); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); return int256(value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: None pragma solidity 0.8.8; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; contract Treasury is PaymentSplitter { uint256 private _numberOfPayees; constructor(address[] memory payees, uint256[] memory shares_) payable PaymentSplitter(payees, shares_) { _numberOfPayees = payees.length; } function withdrawAll() external { require(address(this).balance > 0, "No balance to withdraw"); for (uint256 i = 0; i < _numberOfPayees; i++) { release(payable(payee(i))); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; import './IERC2981.sol'; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 contract ERC2981 is ERC165, IERC2981 { struct RoyaltyInfo { address recipient; uint24 amount; } RoyaltyInfo private _royalties; /// @dev Sets token royalties /// @param recipient recipient of the royalties /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0) function _setRoyalties(address recipient, uint256 value) internal { require(value <= 10000, 'ERC2981Royalties: Too high'); _royalties = RoyaltyInfo(recipient, uint24(value)); } /// @inheritdoc IERC2981 function royaltyInfo(uint256, uint256 value) external view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // 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/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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: None pragma solidity ^0.8.8; /// /// @dev Interface for the NFT Royalty Standard /// interface IERC2981 { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns ( address receiver, uint256 royaltyAmount ); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"inputBaseUri","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":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","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"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint256","name":"approvedLimit","type":"uint256"}],"name":"buyPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"preSaleStartTime","type":"uint256"},{"internalType":"uint256","name":"publicSaleStartTime","type":"uint256"},{"internalType":"uint256","name":"txLimit","type":"uint256"},{"internalType":"uint256","name":"supplyLimit","type":"uint256"}],"name":"configureSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"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":[],"name":"saleConfig","outputs":[{"internalType":"uint32","name":"preSaleStartTime","type":"uint32"},{"internalType":"uint32","name":"publicSaleStartTime","type":"uint32"},{"internalType":"uint32","name":"txLimit","type":"uint32"},{"internalType":"uint32","name":"supplyLimit","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signerToSet","type":"address"}],"name":"setWhiteListSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60006010557f62b1d609957efd7198a66f841063387013c1f07f57cbb6ae3cd625ddd9f9ebab60175560c060405273d32e3382aa09323a08c226c6662e12b434c701b36080908152733a6e953a119ba4665877ea1a095855405aab360d60a0526200006f90601890600262000769565b5060408051808201909152606281526002602082018190526200009591601991620007d3565b50348015620000a357600080fd5b5060405162003d6838038062003d68833981016040819052620000c691620008c0565b60188054806020026020016040519081016040528092919081815260200182805480156200011e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620000ff575b505050505060198054806020026020016040519081016040528092919081815260200182805480156200017157602002820191906000526020600020905b8154815260200190600101908083116200015c575b505050505081816040518060400160405280600e81526020016d4a75696365626f78204672656e7360901b8152506040518060400160405280600381526020016225212360e91b815250620001d5620001cf6200048960201b60201c565b6200048d565b8151620001ea90600190602085019062000816565b5080516200020090600290602084019062000816565b5050508051825114620002755760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620002c85760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200026c565b60005b825181101562000334576200031f838281518110620002ee57620002ee6200099c565b60200260200101518383815181106200030b576200030b6200099c565b6020026020010151620004dd60201b60201c565b806200032b81620009c8565b915050620002cb565b50509151600f55505080516200035290601290602084019062000816565b506040805160808101825263623513a08152636237b6a06020820152600391810191909152611b39606090910152601180546001600160801b0319166d1b39000000036237b6a0623513a0179055620003ae306101f4620006cb565b50604080518082018252600d81526c4a75696365626f784672656e7360981b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f56e71787d3f41ab7ff719fcb006abffc0206634c61b8062ed45ea510768d640a818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012060165562000a3e565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166200054a5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200026c565b600081116200059c5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200026c565b6001600160a01b0382166000908152600a602052604090205415620006185760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200026c565b600c8054600181019091557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b0319166001600160a01b0384169081179091556000908152600a6020526040902081905560085462000682908290620009e6565b600855604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6127108111156200071f5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f206869676800000000000060448201526064016200026c565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260078054600160a01b9093026001600160b81b0319909316909117919091179055565b828054828255906000526020600020908101928215620007c1579160200282015b82811115620007c157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200078a565b50620007cf92915062000893565b5090565b828054828255906000526020600020908101928215620007c1579160200282015b82811115620007c1578251829060ff16905591602001919060010190620007f4565b828054620008249062000a01565b90600052602060002090601f016020900481019282620008485760008555620007c1565b82601f106200086357805160ff1916838001178555620007c1565b82800160010185558215620007c1579182015b82811115620007c157825182559160200191906001019062000876565b5b80821115620007cf576000815560010162000894565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620008d457600080fd5b82516001600160401b0380821115620008ec57600080fd5b818501915085601f8301126200090157600080fd5b815181811115620009165762000916620008aa565b604051601f8201601f19908116603f01168101908382118183101715620009415762000941620008aa565b8160405282815288868487010111156200095a57600080fd5b600093505b828410156200097e57848401860151818501870152928501926200095f565b82841115620009905760008684830101525b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415620009df57620009df620009b2565b5060010190565b60008219821115620009fc57620009fc620009b2565b500190565b600181811c9082168062000a1657607f821691505b6020821081141562000a3857634e487b7160e01b600052602260045260246000fd5b50919050565b61331a8062000a4e6000396000f3fe60806040526004361061023f5760003560e01c806384bdb6e01161012e578063c87b56dd116100ab578063e33b7de31161006f578063e33b7de31461079e578063e985e9c5146107b3578063ef81b4d4146107fc578063f2bcd0221461081c578063f2fde38b1461083c57600080fd5b8063c87b56dd146106df578063cc47a40b146106ff578063ce7c2ac21461071f578063d79779b214610755578063d96a094a1461078b57600080fd5b806390aa0b0f116100f257806390aa0b0f146105e757806395d89b41146106545780639852595c14610669578063a22cb4651461069f578063b88d4fde146106bf57600080fd5b806384bdb6e014610554578063853828b6146105745780638b83209b146105895780638c7ea24b146105a95780638da5cb5b146105c957600080fd5b8063406072a9116101bc5780636817c76c116101805780636817c76c146104cf5780636c0360eb146104ea57806370a08231146104ff578063715018a61461051f578063802fb8e91461053457600080fd5b8063406072a91461040957806342842e0e1461044f57806348b750441461046f57806355f804b31461048f5780636352211e146104af57600080fd5b80631916558711610203578063191655871461036257806323b872dd146103825780632a55205a146103a25780633266e957146103e15780633a98ef39146103f457600080fd5b806301ffc9a71461028d57806306fdde03146102c2578063081812fc146102e4578063095ea7b31461031c57806318160ddd1461033e57600080fd5b36610288577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561029957600080fd5b506102ad6102a8366004612ba4565b61085c565b60405190151581526020015b60405180910390f35b3480156102ce57600080fd5b506102d761086d565b6040516102b99190612c19565b3480156102f057600080fd5b506103046102ff366004612c2c565b6108ff565b6040516001600160a01b0390911681526020016102b9565b34801561032857600080fd5b5061033c610337366004612c5a565b610999565b005b34801561034a57600080fd5b5061035460105481565b6040519081526020016102b9565b34801561036e57600080fd5b5061033c61037d366004612c86565b610aaf565b34801561038e57600080fd5b5061033c61039d366004612ca3565b610bdd565b3480156103ae57600080fd5b506103c26103bd366004612ce4565b610c0e565b604080516001600160a01b0390931683526020830191909152016102b9565b61033c6103ef366004612da9565b610c63565b34801561040057600080fd5b50600854610354565b34801561041557600080fd5b50610354610424366004612df7565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b34801561045b57600080fd5b5061033c61046a366004612ca3565b610f0a565b34801561047b57600080fd5b5061033c61048a366004612df7565b610f25565b34801561049b57600080fd5b5061033c6104aa366004612e30565b61110d565b3480156104bb57600080fd5b506103046104ca366004612c2c565b611143565b3480156104db57600080fd5b50610354665543df729c000081565b3480156104f657600080fd5b506102d76111ba565b34801561050b57600080fd5b5061035461051a366004612c86565b611248565b34801561052b57600080fd5b5061033c6112cf565b34801561054057600080fd5b5061033c61054f366004612ea2565b611305565b34801561056057600080fd5b5061033c61056f366004612c86565b611482565b34801561058057600080fd5b5061033c611513565b34801561059557600080fd5b506103046105a4366004612c2c565b61158a565b3480156105b557600080fd5b5061033c6105c4366004612c5a565b6115ba565b3480156105d557600080fd5b506000546001600160a01b0316610304565b3480156105f357600080fd5b506011546106249063ffffffff808216916401000000008104821691600160401b8204811691600160601b90041684565b6040805163ffffffff958616815293851660208501529184169183019190915290911660608201526080016102b9565b34801561066057600080fd5b506102d7611637565b34801561067557600080fd5b50610354610684366004612c86565b6001600160a01b03166000908152600b602052604090205490565b3480156106ab57600080fd5b5061033c6106ba366004612ee2565b611646565b3480156106cb57600080fd5b5061033c6106da366004612f10565b611651565b3480156106eb57600080fd5b506102d76106fa366004612c2c565b611689565b34801561070b57600080fd5b5061033c61071a366004612c5a565b611764565b34801561072b57600080fd5b5061035461073a366004612c86565b6001600160a01b03166000908152600a602052604090205490565b34801561076157600080fd5b50610354610770366004612c86565b6001600160a01b03166000908152600d602052604090205490565b61033c610799366004612c2c565b611798565b3480156107aa57600080fd5b50600954610354565b3480156107bf57600080fd5b506102ad6107ce366004612df7565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561080857600080fd5b50601354610304906001600160a01b031681565b34801561082857600080fd5b50601554610304906001600160a01b031681565b34801561084857600080fd5b5061033c610857366004612c86565b6118da565b600061086782611972565b92915050565b60606001805461087c90612f7c565b80601f01602080910402602001604051908101604052809291908181526020018280546108a890612f7c565b80156108f55780601f106108ca576101008083540402835291602001916108f5565b820191906000526020600020905b8154815290600101906020018083116108d857829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b031661097d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006109a482611143565b9050806001600160a01b0316836001600160a01b03161415610a125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610974565b336001600160a01b0382161480610a2e5750610a2e81336107ce565b610aa05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610974565b610aaa8383611997565b505050565b6001600160a01b0381166000908152600a6020526040902054610ae45760405162461bcd60e51b815260040161097490612fb7565b6000610aef60095490565b610af99047613013565b90506000610b268383610b21866001600160a01b03166000908152600b602052604090205490565b611a05565b905080610b455760405162461bcd60e51b81526004016109749061302b565b6001600160a01b0383166000908152600b602052604081208054839290610b6d908490613013565b925050819055508060096000828254610b869190613013565b90915550610b9690508382611a4b565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610be73382611b64565b610c035760405162461bcd60e51b815260040161097490613076565b610aaa838383611c5a565b604080518082019091526007546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610c4f90866130c7565b610c5991906130fc565b9150509250929050565b60115463ffffffff164210801590610c8a5750601154640100000000900463ffffffff1642105b610cce5760405162461bcd60e51b815260206004820152601560248201527450726573616c65206973206e6f742061637469766560581b6044820152606401610974565b6013546001600160a01b0316610d265760405162461bcd60e51b815260206004820152601d60248201527f5768697465206c697374207369676e6572206e6f7420796574207365740000006044820152606401610974565b610d3782665543df729c00006130c7565b3414610d795760405162461bcd60e51b8152602060048201526011602482015270125b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610974565b336000908152601460205260409020548190610d96908490613013565b1115610ddc5760405162461bcd60e51b815260206004820152601560248201527415d85b1b195d081b1a5b5a5d08195e18d959591959605a1b6044820152606401610974565b6016546017546040805160208101929092523390820152606081018390526000919060800160405160208183030381529060405280519060200120604051602001610e3e92919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000610e648286611df6565b90506001600160a01b03811615801590610e8b57506013546001600160a01b038281169116145b610ecb5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610974565b33600090815260146020526040902054610ee6908590613013565b33600081815260146020526040902091909155610f039085611e1a565b5050505050565b610aaa83838360405180602001604052806000815250611651565b6001600160a01b0381166000908152600a6020526040902054610f5a5760405162461bcd60e51b815260040161097490612fb7565b6001600160a01b0382166000908152600d60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b158015610fb257600080fd5b505afa158015610fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fea9190613110565b610ff49190613013565b9050600061102d8383610b2187876001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b90508061104c5760405162461bcd60e51b81526004016109749061302b565b6001600160a01b038085166000908152600e6020908152604080832093871683529290529081208054839290611083908490613013565b90915550506001600160a01b0384166000908152600d6020526040812080548392906110b0908490613013565b909155506110c19050848483611ec0565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b6000546001600160a01b031633146111375760405162461bcd60e51b815260040161097490613129565b610aaa60128383612afe565b6000818152600360205260408120546001600160a01b0316806108675760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610974565b601280546111c790612f7c565b80601f01602080910402602001604051908101604052809291908181526020018280546111f390612f7c565b80156112405780601f1061121557610100808354040283529160200191611240565b820191906000526020600020905b81548152906001019060200180831161122357829003601f168201915b505050505081565b60006001600160a01b0382166112b35760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610974565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146112f95760405162461bcd60e51b815260040161097490613129565b6113036000611f12565b565b6000546001600160a01b0316331461132f5760405162461bcd60e51b815260040161097490613129565b600061133a85611f62565b9050600061134785611f62565b9050600061135485611f62565b9050600061136185611f62565b90508363ffffffff166000106113a85760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b6044820152606401610974565b8263ffffffff168463ffffffff16106113f25760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b6044820152606401610974565b6040805160808101825263ffffffff958616808252948616602082018190529386169181018290529190941660609091018190526011805467ffffffffffffffff1916909317640100000000909202919091176fffffffffffffffff00000000000000001916600160401b90930263ffffffff60601b191692909217600160601b90920291909117905550505050565b6000546001600160a01b031633146114ac5760405162461bcd60e51b815260040161097490613129565b6001600160a01b0381166114f15760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610974565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000471161155c5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610974565b60005b600f548110156115875761157561037d8261158a565b8061157f8161315e565b91505061155f565b50565b6000600c828154811061159f5761159f613179565b6000918252602090912001546001600160a01b031692915050565b6000546001600160a01b031633146115e45760405162461bcd60e51b815260040161097490613129565b6001600160a01b0382166116295760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610974565b6116338282611fcb565b5050565b60606002805461087c90612f7c565b611633338383612067565b61165b3383611b64565b6116775760405162461bcd60e51b815260040161097490613076565b61168384848484612136565b50505050565b6000818152600360205260409020546060906001600160a01b03166117085760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610974565b6000611712612169565b90506000815111611732576040518060200160405280600081525061175d565b8061173c84612178565b60405160200161174d92919061318f565b6040516020818303038152906040525b9392505050565b6000546001600160a01b0316331461178e5760405162461bcd60e51b815260040161097490613129565b6116338282611e1a565b6040805160808101825260115463ffffffff80821683526401000000008204811660208401819052600160401b8304821694840194909452600160601b909104166060820152904210156118235760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610974565b806040015163ffffffff1682111561187d5760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e206c696d69742065786365656465640000000000006044820152606401610974565b61188e82665543df729c00006130c7565b34146118d05760405162461bcd60e51b8152602060048201526011602482015270125b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610974565b6116333383611e1a565b6000546001600160a01b031633146119045760405162461bcd60e51b815260040161097490613129565b6001600160a01b0381166119695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610974565b61158781611f12565b60006001600160e01b0319821663152a902d60e11b1480610867575061086782612276565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906119cc82611143565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6008546001600160a01b0384166000908152600a602052604081205490918391611a2f90866130c7565b611a3991906130fc565b611a4391906131be565b949350505050565b80471015611a9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610974565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611ae8576040519150601f19603f3d011682016040523d82523d6000602084013e611aed565b606091505b5050905080610aaa5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610974565b6000818152600360205260408120546001600160a01b0316611bdd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610974565b6000611be883611143565b9050806001600160a01b0316846001600160a01b03161480611c235750836001600160a01b0316611c18846108ff565b6001600160a01b0316145b80611a4357506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff16949350505050565b826001600160a01b0316611c6d82611143565b6001600160a01b031614611cd15760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610974565b6001600160a01b038216611d335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610974565b611d3e600082611997565b6001600160a01b0383166000908152600460205260408120805460019290611d679084906131be565b90915550506001600160a01b0382166000908152600460205260408120805460019290611d95908490613013565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000806000611e0585856122c6565b91509150611e1281612336565b509392505050565b601154601054600160601b90910463ffffffff1690611e3a908390613013565b1115611e815760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b6044820152606401610974565b60105460005b82811015611eb857611e9a600183613013565b9150611ea684836124f1565b80611eb08161315e565b915050611e87565b506010555050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610aaa90849061250b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600063ffffffff821115611fc75760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610974565b5090565b61271081111561201d5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610974565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260078054600160a01b9093026001600160b81b0319909316909117919091179055565b816001600160a01b0316836001600160a01b031614156120c95760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610974565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612141848484611c5a565b61214d848484846125dd565b6116835760405162461bcd60e51b8152600401610974906131d5565b60606012805461087c90612f7c565b60608161219c5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121c657806121b08161315e565b91506121bf9050600a836130fc565b91506121a0565b60008167ffffffffffffffff8111156121e1576121e1612d06565b6040519080825280601f01601f19166020018201604052801561220b576020820181803683370190505b5090505b8415611a43576122206001836131be565b915061222d600a86613227565b612238906030613013565b60f81b81838151811061224d5761224d613179565b60200101906001600160f81b031916908160001a90535061226f600a866130fc565b945061220f565b60006001600160e01b031982166380ac58cd60e01b14806122a757506001600160e01b03198216635b5e139f60e01b145b8061086757506301ffc9a760e01b6001600160e01b0319831614610867565b6000808251604114156122fd5760208301516040840151606085015160001a6122f1878285856126ea565b9450945050505061232f565b825160401415612327576020830151604084015161231c8683836127d7565b93509350505061232f565b506000905060025b9250929050565b600081600481111561234a5761234a61323b565b14156123535750565b60018160048111156123675761236761323b565b14156123b55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610974565b60028160048111156123c9576123c961323b565b14156124175760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610974565b600381600481111561242b5761242b61323b565b14156124845760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610974565b60048160048111156124985761249861323b565b14156115875760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610974565b611633828260405180602001604052806000815250612810565b6000612560826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128439092919063ffffffff16565b805190915015610aaa578080602001905181019061257e9190613251565b610aaa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610974565b60006001600160a01b0384163b156126df57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061262190339089908890889060040161326e565b602060405180830381600087803b15801561263b57600080fd5b505af192505050801561266b575060408051601f3d908101601f19168201909252612668918101906132ab565b60015b6126c5573d808015612699576040519150601f19603f3d011682016040523d82523d6000602084013e61269e565b606091505b5080516126bd5760405162461bcd60e51b8152600401610974906131d5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a43565b506001949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561272157506000905060036127ce565b8460ff16601b1415801561273957508460ff16601c14155b1561274a57506000905060046127ce565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561279e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127c7576000600192509250506127ce565b9150600090505b94509492505050565b6000806001600160ff1b038316816127f460ff86901c601b613013565b9050612802878288856126ea565b935093505050935093915050565b61281a8383612852565b61282760008484846125dd565b610aaa5760405162461bcd60e51b8152600401610974906131d5565b6060611a438484600085612994565b6001600160a01b0382166128a85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610974565b6000818152600360205260409020546001600160a01b03161561290d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610974565b6001600160a01b0382166000908152600460205260408120805460019290612936908490613013565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060824710156129f55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610974565b6001600160a01b0385163b612a4c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610974565b600080866001600160a01b03168587604051612a6891906132c8565b60006040518083038185875af1925050503d8060008114612aa5576040519150601f19603f3d011682016040523d82523d6000602084013e612aaa565b606091505b5091509150612aba828286612ac5565b979650505050505050565b60608315612ad457508161175d565b825115612ae45782518084602001fd5b8160405162461bcd60e51b81526004016109749190612c19565b828054612b0a90612f7c565b90600052602060002090601f016020900481019282612b2c5760008555612b72565b82601f10612b455782800160ff19823516178555612b72565b82800160010185558215612b72579182015b82811115612b72578235825591602001919060010190612b57565b50611fc79291505b80821115611fc75760008155600101612b7a565b6001600160e01b03198116811461158757600080fd5b600060208284031215612bb657600080fd5b813561175d81612b8e565b60005b83811015612bdc578181015183820152602001612bc4565b838111156116835750506000910152565b60008151808452612c05816020860160208601612bc1565b601f01601f19169290920160200192915050565b60208152600061175d6020830184612bed565b600060208284031215612c3e57600080fd5b5035919050565b6001600160a01b038116811461158757600080fd5b60008060408385031215612c6d57600080fd5b8235612c7881612c45565b946020939093013593505050565b600060208284031215612c9857600080fd5b813561175d81612c45565b600080600060608486031215612cb857600080fd5b8335612cc381612c45565b92506020840135612cd381612c45565b929592945050506040919091013590565b60008060408385031215612cf757600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612d2d57600080fd5b813567ffffffffffffffff80821115612d4857612d48612d06565b604051601f8301601f19908116603f01168101908282118183101715612d7057612d70612d06565b81604052838152866020858801011115612d8957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215612dbe57600080fd5b833567ffffffffffffffff811115612dd557600080fd5b612de186828701612d1c565b9660208601359650604090950135949350505050565b60008060408385031215612e0a57600080fd5b8235612e1581612c45565b91506020830135612e2581612c45565b809150509250929050565b60008060208385031215612e4357600080fd5b823567ffffffffffffffff80821115612e5b57600080fd5b818501915085601f830112612e6f57600080fd5b813581811115612e7e57600080fd5b866020828501011115612e9057600080fd5b60209290920196919550909350505050565b60008060008060808587031215612eb857600080fd5b5050823594602084013594506040840135936060013592509050565b801515811461158757600080fd5b60008060408385031215612ef557600080fd5b8235612f0081612c45565b91506020830135612e2581612ed4565b60008060008060808587031215612f2657600080fd5b8435612f3181612c45565b93506020850135612f4181612c45565b925060408501359150606085013567ffffffffffffffff811115612f6457600080fd5b612f7087828801612d1c565b91505092959194509250565b600181811c90821680612f9057607f821691505b60208210811415612fb157634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561302657613026612ffd565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008160001904831182151516156130e1576130e1612ffd565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261310b5761310b6130e6565b500490565b60006020828403121561312257600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060001982141561317257613172612ffd565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600083516131a1818460208801612bc1565b8351908301906131b5818360208801612bc1565b01949350505050565b6000828210156131d0576131d0612ffd565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613236576132366130e6565b500690565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561326357600080fd5b815161175d81612ed4565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906132a190830184612bed565b9695505050505050565b6000602082840312156132bd57600080fd5b815161175d81612b8e565b600082516132da818460208701612bc1565b919091019291505056fea2646970667358221220c8b00ff3a254b240cea6198ac9b10bcee6637a4f65929271401d8ac883b7d32a64736f6c6343000808003300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5a69584a48776263533563664b594c7768357378796942327a556e715a7337797a48646e77427736336234772f00000000000000000000
Deployed Bytecode
0x60806040526004361061023f5760003560e01c806384bdb6e01161012e578063c87b56dd116100ab578063e33b7de31161006f578063e33b7de31461079e578063e985e9c5146107b3578063ef81b4d4146107fc578063f2bcd0221461081c578063f2fde38b1461083c57600080fd5b8063c87b56dd146106df578063cc47a40b146106ff578063ce7c2ac21461071f578063d79779b214610755578063d96a094a1461078b57600080fd5b806390aa0b0f116100f257806390aa0b0f146105e757806395d89b41146106545780639852595c14610669578063a22cb4651461069f578063b88d4fde146106bf57600080fd5b806384bdb6e014610554578063853828b6146105745780638b83209b146105895780638c7ea24b146105a95780638da5cb5b146105c957600080fd5b8063406072a9116101bc5780636817c76c116101805780636817c76c146104cf5780636c0360eb146104ea57806370a08231146104ff578063715018a61461051f578063802fb8e91461053457600080fd5b8063406072a91461040957806342842e0e1461044f57806348b750441461046f57806355f804b31461048f5780636352211e146104af57600080fd5b80631916558711610203578063191655871461036257806323b872dd146103825780632a55205a146103a25780633266e957146103e15780633a98ef39146103f457600080fd5b806301ffc9a71461028d57806306fdde03146102c2578063081812fc146102e4578063095ea7b31461031c57806318160ddd1461033e57600080fd5b36610288577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561029957600080fd5b506102ad6102a8366004612ba4565b61085c565b60405190151581526020015b60405180910390f35b3480156102ce57600080fd5b506102d761086d565b6040516102b99190612c19565b3480156102f057600080fd5b506103046102ff366004612c2c565b6108ff565b6040516001600160a01b0390911681526020016102b9565b34801561032857600080fd5b5061033c610337366004612c5a565b610999565b005b34801561034a57600080fd5b5061035460105481565b6040519081526020016102b9565b34801561036e57600080fd5b5061033c61037d366004612c86565b610aaf565b34801561038e57600080fd5b5061033c61039d366004612ca3565b610bdd565b3480156103ae57600080fd5b506103c26103bd366004612ce4565b610c0e565b604080516001600160a01b0390931683526020830191909152016102b9565b61033c6103ef366004612da9565b610c63565b34801561040057600080fd5b50600854610354565b34801561041557600080fd5b50610354610424366004612df7565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b34801561045b57600080fd5b5061033c61046a366004612ca3565b610f0a565b34801561047b57600080fd5b5061033c61048a366004612df7565b610f25565b34801561049b57600080fd5b5061033c6104aa366004612e30565b61110d565b3480156104bb57600080fd5b506103046104ca366004612c2c565b611143565b3480156104db57600080fd5b50610354665543df729c000081565b3480156104f657600080fd5b506102d76111ba565b34801561050b57600080fd5b5061035461051a366004612c86565b611248565b34801561052b57600080fd5b5061033c6112cf565b34801561054057600080fd5b5061033c61054f366004612ea2565b611305565b34801561056057600080fd5b5061033c61056f366004612c86565b611482565b34801561058057600080fd5b5061033c611513565b34801561059557600080fd5b506103046105a4366004612c2c565b61158a565b3480156105b557600080fd5b5061033c6105c4366004612c5a565b6115ba565b3480156105d557600080fd5b506000546001600160a01b0316610304565b3480156105f357600080fd5b506011546106249063ffffffff808216916401000000008104821691600160401b8204811691600160601b90041684565b6040805163ffffffff958616815293851660208501529184169183019190915290911660608201526080016102b9565b34801561066057600080fd5b506102d7611637565b34801561067557600080fd5b50610354610684366004612c86565b6001600160a01b03166000908152600b602052604090205490565b3480156106ab57600080fd5b5061033c6106ba366004612ee2565b611646565b3480156106cb57600080fd5b5061033c6106da366004612f10565b611651565b3480156106eb57600080fd5b506102d76106fa366004612c2c565b611689565b34801561070b57600080fd5b5061033c61071a366004612c5a565b611764565b34801561072b57600080fd5b5061035461073a366004612c86565b6001600160a01b03166000908152600a602052604090205490565b34801561076157600080fd5b50610354610770366004612c86565b6001600160a01b03166000908152600d602052604090205490565b61033c610799366004612c2c565b611798565b3480156107aa57600080fd5b50600954610354565b3480156107bf57600080fd5b506102ad6107ce366004612df7565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561080857600080fd5b50601354610304906001600160a01b031681565b34801561082857600080fd5b50601554610304906001600160a01b031681565b34801561084857600080fd5b5061033c610857366004612c86565b6118da565b600061086782611972565b92915050565b60606001805461087c90612f7c565b80601f01602080910402602001604051908101604052809291908181526020018280546108a890612f7c565b80156108f55780601f106108ca576101008083540402835291602001916108f5565b820191906000526020600020905b8154815290600101906020018083116108d857829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b031661097d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006109a482611143565b9050806001600160a01b0316836001600160a01b03161415610a125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610974565b336001600160a01b0382161480610a2e5750610a2e81336107ce565b610aa05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610974565b610aaa8383611997565b505050565b6001600160a01b0381166000908152600a6020526040902054610ae45760405162461bcd60e51b815260040161097490612fb7565b6000610aef60095490565b610af99047613013565b90506000610b268383610b21866001600160a01b03166000908152600b602052604090205490565b611a05565b905080610b455760405162461bcd60e51b81526004016109749061302b565b6001600160a01b0383166000908152600b602052604081208054839290610b6d908490613013565b925050819055508060096000828254610b869190613013565b90915550610b9690508382611a4b565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610be73382611b64565b610c035760405162461bcd60e51b815260040161097490613076565b610aaa838383611c5a565b604080518082019091526007546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610c4f90866130c7565b610c5991906130fc565b9150509250929050565b60115463ffffffff164210801590610c8a5750601154640100000000900463ffffffff1642105b610cce5760405162461bcd60e51b815260206004820152601560248201527450726573616c65206973206e6f742061637469766560581b6044820152606401610974565b6013546001600160a01b0316610d265760405162461bcd60e51b815260206004820152601d60248201527f5768697465206c697374207369676e6572206e6f7420796574207365740000006044820152606401610974565b610d3782665543df729c00006130c7565b3414610d795760405162461bcd60e51b8152602060048201526011602482015270125b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610974565b336000908152601460205260409020548190610d96908490613013565b1115610ddc5760405162461bcd60e51b815260206004820152601560248201527415d85b1b195d081b1a5b5a5d08195e18d959591959605a1b6044820152606401610974565b6016546017546040805160208101929092523390820152606081018390526000919060800160405160208183030381529060405280519060200120604051602001610e3e92919061190160f01b81526002810192909252602282015260420190565b60408051601f19818403018152919052805160209091012090506000610e648286611df6565b90506001600160a01b03811615801590610e8b57506013546001600160a01b038281169116145b610ecb5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610974565b33600090815260146020526040902054610ee6908590613013565b33600081815260146020526040902091909155610f039085611e1a565b5050505050565b610aaa83838360405180602001604052806000815250611651565b6001600160a01b0381166000908152600a6020526040902054610f5a5760405162461bcd60e51b815260040161097490612fb7565b6001600160a01b0382166000908152600d60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b158015610fb257600080fd5b505afa158015610fc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fea9190613110565b610ff49190613013565b9050600061102d8383610b2187876001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b90508061104c5760405162461bcd60e51b81526004016109749061302b565b6001600160a01b038085166000908152600e6020908152604080832093871683529290529081208054839290611083908490613013565b90915550506001600160a01b0384166000908152600d6020526040812080548392906110b0908490613013565b909155506110c19050848483611ec0565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b6000546001600160a01b031633146111375760405162461bcd60e51b815260040161097490613129565b610aaa60128383612afe565b6000818152600360205260408120546001600160a01b0316806108675760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610974565b601280546111c790612f7c565b80601f01602080910402602001604051908101604052809291908181526020018280546111f390612f7c565b80156112405780601f1061121557610100808354040283529160200191611240565b820191906000526020600020905b81548152906001019060200180831161122357829003601f168201915b505050505081565b60006001600160a01b0382166112b35760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610974565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146112f95760405162461bcd60e51b815260040161097490613129565b6113036000611f12565b565b6000546001600160a01b0316331461132f5760405162461bcd60e51b815260040161097490613129565b600061133a85611f62565b9050600061134785611f62565b9050600061135485611f62565b9050600061136185611f62565b90508363ffffffff166000106113a85760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b6044820152606401610974565b8263ffffffff168463ffffffff16106113f25760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b6044820152606401610974565b6040805160808101825263ffffffff958616808252948616602082018190529386169181018290529190941660609091018190526011805467ffffffffffffffff1916909317640100000000909202919091176fffffffffffffffff00000000000000001916600160401b90930263ffffffff60601b191692909217600160601b90920291909117905550505050565b6000546001600160a01b031633146114ac5760405162461bcd60e51b815260040161097490613129565b6001600160a01b0381166114f15760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610974565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000471161155c5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610974565b60005b600f548110156115875761157561037d8261158a565b8061157f8161315e565b91505061155f565b50565b6000600c828154811061159f5761159f613179565b6000918252602090912001546001600160a01b031692915050565b6000546001600160a01b031633146115e45760405162461bcd60e51b815260040161097490613129565b6001600160a01b0382166116295760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b6044820152606401610974565b6116338282611fcb565b5050565b60606002805461087c90612f7c565b611633338383612067565b61165b3383611b64565b6116775760405162461bcd60e51b815260040161097490613076565b61168384848484612136565b50505050565b6000818152600360205260409020546060906001600160a01b03166117085760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610974565b6000611712612169565b90506000815111611732576040518060200160405280600081525061175d565b8061173c84612178565b60405160200161174d92919061318f565b6040516020818303038152906040525b9392505050565b6000546001600160a01b0316331461178e5760405162461bcd60e51b815260040161097490613129565b6116338282611e1a565b6040805160808101825260115463ffffffff80821683526401000000008204811660208401819052600160401b8304821694840194909452600160601b909104166060820152904210156118235760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610974565b806040015163ffffffff1682111561187d5760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e206c696d69742065786365656465640000000000006044820152606401610974565b61188e82665543df729c00006130c7565b34146118d05760405162461bcd60e51b8152602060048201526011602482015270125b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610974565b6116333383611e1a565b6000546001600160a01b031633146119045760405162461bcd60e51b815260040161097490613129565b6001600160a01b0381166119695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610974565b61158781611f12565b60006001600160e01b0319821663152a902d60e11b1480610867575061086782612276565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906119cc82611143565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6008546001600160a01b0384166000908152600a602052604081205490918391611a2f90866130c7565b611a3991906130fc565b611a4391906131be565b949350505050565b80471015611a9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610974565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611ae8576040519150601f19603f3d011682016040523d82523d6000602084013e611aed565b606091505b5050905080610aaa5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610974565b6000818152600360205260408120546001600160a01b0316611bdd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610974565b6000611be883611143565b9050806001600160a01b0316846001600160a01b03161480611c235750836001600160a01b0316611c18846108ff565b6001600160a01b0316145b80611a4357506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff16949350505050565b826001600160a01b0316611c6d82611143565b6001600160a01b031614611cd15760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610974565b6001600160a01b038216611d335760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610974565b611d3e600082611997565b6001600160a01b0383166000908152600460205260408120805460019290611d679084906131be565b90915550506001600160a01b0382166000908152600460205260408120805460019290611d95908490613013565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000806000611e0585856122c6565b91509150611e1281612336565b509392505050565b601154601054600160601b90910463ffffffff1690611e3a908390613013565b1115611e815760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b6044820152606401610974565b60105460005b82811015611eb857611e9a600183613013565b9150611ea684836124f1565b80611eb08161315e565b915050611e87565b506010555050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610aaa90849061250b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600063ffffffff821115611fc75760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610974565b5090565b61271081111561201d5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610974565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260078054600160a01b9093026001600160b81b0319909316909117919091179055565b816001600160a01b0316836001600160a01b031614156120c95760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610974565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612141848484611c5a565b61214d848484846125dd565b6116835760405162461bcd60e51b8152600401610974906131d5565b60606012805461087c90612f7c565b60608161219c5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121c657806121b08161315e565b91506121bf9050600a836130fc565b91506121a0565b60008167ffffffffffffffff8111156121e1576121e1612d06565b6040519080825280601f01601f19166020018201604052801561220b576020820181803683370190505b5090505b8415611a43576122206001836131be565b915061222d600a86613227565b612238906030613013565b60f81b81838151811061224d5761224d613179565b60200101906001600160f81b031916908160001a90535061226f600a866130fc565b945061220f565b60006001600160e01b031982166380ac58cd60e01b14806122a757506001600160e01b03198216635b5e139f60e01b145b8061086757506301ffc9a760e01b6001600160e01b0319831614610867565b6000808251604114156122fd5760208301516040840151606085015160001a6122f1878285856126ea565b9450945050505061232f565b825160401415612327576020830151604084015161231c8683836127d7565b93509350505061232f565b506000905060025b9250929050565b600081600481111561234a5761234a61323b565b14156123535750565b60018160048111156123675761236761323b565b14156123b55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610974565b60028160048111156123c9576123c961323b565b14156124175760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610974565b600381600481111561242b5761242b61323b565b14156124845760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610974565b60048160048111156124985761249861323b565b14156115875760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610974565b611633828260405180602001604052806000815250612810565b6000612560826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128439092919063ffffffff16565b805190915015610aaa578080602001905181019061257e9190613251565b610aaa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610974565b60006001600160a01b0384163b156126df57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061262190339089908890889060040161326e565b602060405180830381600087803b15801561263b57600080fd5b505af192505050801561266b575060408051601f3d908101601f19168201909252612668918101906132ab565b60015b6126c5573d808015612699576040519150601f19603f3d011682016040523d82523d6000602084013e61269e565b606091505b5080516126bd5760405162461bcd60e51b8152600401610974906131d5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a43565b506001949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561272157506000905060036127ce565b8460ff16601b1415801561273957508460ff16601c14155b1561274a57506000905060046127ce565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561279e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127c7576000600192509250506127ce565b9150600090505b94509492505050565b6000806001600160ff1b038316816127f460ff86901c601b613013565b9050612802878288856126ea565b935093505050935093915050565b61281a8383612852565b61282760008484846125dd565b610aaa5760405162461bcd60e51b8152600401610974906131d5565b6060611a438484600085612994565b6001600160a01b0382166128a85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610974565b6000818152600360205260409020546001600160a01b03161561290d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610974565b6001600160a01b0382166000908152600460205260408120805460019290612936908490613013565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060824710156129f55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610974565b6001600160a01b0385163b612a4c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610974565b600080866001600160a01b03168587604051612a6891906132c8565b60006040518083038185875af1925050503d8060008114612aa5576040519150601f19603f3d011682016040523d82523d6000602084013e612aaa565b606091505b5091509150612aba828286612ac5565b979650505050505050565b60608315612ad457508161175d565b825115612ae45782518084602001fd5b8160405162461bcd60e51b81526004016109749190612c19565b828054612b0a90612f7c565b90600052602060002090601f016020900481019282612b2c5760008555612b72565b82601f10612b455782800160ff19823516178555612b72565b82800160010185558215612b72579182015b82811115612b72578235825591602001919060010190612b57565b50611fc79291505b80821115611fc75760008155600101612b7a565b6001600160e01b03198116811461158757600080fd5b600060208284031215612bb657600080fd5b813561175d81612b8e565b60005b83811015612bdc578181015183820152602001612bc4565b838111156116835750506000910152565b60008151808452612c05816020860160208601612bc1565b601f01601f19169290920160200192915050565b60208152600061175d6020830184612bed565b600060208284031215612c3e57600080fd5b5035919050565b6001600160a01b038116811461158757600080fd5b60008060408385031215612c6d57600080fd5b8235612c7881612c45565b946020939093013593505050565b600060208284031215612c9857600080fd5b813561175d81612c45565b600080600060608486031215612cb857600080fd5b8335612cc381612c45565b92506020840135612cd381612c45565b929592945050506040919091013590565b60008060408385031215612cf757600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600082601f830112612d2d57600080fd5b813567ffffffffffffffff80821115612d4857612d48612d06565b604051601f8301601f19908116603f01168101908282118183101715612d7057612d70612d06565b81604052838152866020858801011115612d8957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215612dbe57600080fd5b833567ffffffffffffffff811115612dd557600080fd5b612de186828701612d1c565b9660208601359650604090950135949350505050565b60008060408385031215612e0a57600080fd5b8235612e1581612c45565b91506020830135612e2581612c45565b809150509250929050565b60008060208385031215612e4357600080fd5b823567ffffffffffffffff80821115612e5b57600080fd5b818501915085601f830112612e6f57600080fd5b813581811115612e7e57600080fd5b866020828501011115612e9057600080fd5b60209290920196919550909350505050565b60008060008060808587031215612eb857600080fd5b5050823594602084013594506040840135936060013592509050565b801515811461158757600080fd5b60008060408385031215612ef557600080fd5b8235612f0081612c45565b91506020830135612e2581612ed4565b60008060008060808587031215612f2657600080fd5b8435612f3181612c45565b93506020850135612f4181612c45565b925060408501359150606085013567ffffffffffffffff811115612f6457600080fd5b612f7087828801612d1c565b91505092959194509250565b600181811c90821680612f9057607f821691505b60208210811415612fb157634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561302657613026612ffd565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008160001904831182151516156130e1576130e1612ffd565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261310b5761310b6130e6565b500490565b60006020828403121561312257600080fd5b5051919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060001982141561317257613172612ffd565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600083516131a1818460208801612bc1565b8351908301906131b5818360208801612bc1565b01949350505050565b6000828210156131d0576131d0612ffd565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613236576132366130e6565b500690565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561326357600080fd5b815161175d81612ed4565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906132a190830184612bed565b9695505050505050565b6000602082840312156132bd57600080fd5b815161175d81612b8e565b600082516132da818460208701612bc1565b919091019291505056fea2646970667358221220c8b00ff3a254b240cea6198ac9b10bcee6637a4f65929271401d8ac883b7d32a64736f6c63430008080033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5a69584a48776263533563664b594c7768357378796942327a556e715a7337797a48646e77427736336234772f00000000000000000000
-----Decoded View---------------
Arg [0] : inputBaseUri (string): ipfs://QmZiXJHwbcS5cfKYLwh5sxyiB2zUnqZs7yzHdnwBw63b4w/
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [2] : 697066733a2f2f516d5a69584a48776263533563664b594c7768357378796942
Arg [3] : 327a556e715a7337797a48646e77427736336234772f00000000000000000000
Loading...
Loading
Loading...
Loading
[ 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.