ERC-721
Overview
Max Total Supply
93 JPA
Holders
78
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 JPALoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
JPA
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; // oooo ooooooooo. .o. // `888 `888 `Y88. .888. // 888 888 .d88' .8"888. // 888 888ooo88P' .8' `888. // 888 888 .88ooo8888. // 888 888 .8' `888. // .o. 88P o888o o88o o8888o // `Y888P import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol"; contract JPA is ERC721, ERC721URIStorage, ERC721Enumerable, ERC721Royalty, Ownable, DefaultOperatorFilterer, PaymentSplitter, ChainlinkClient, ReentrancyGuard { error InvalidPrice(address emitter); error SaleNotStarted(address emitter); error SoldOut(address emitter); error EtherTransferFail(address emitter); event Sold(address indexed to, uint256 price, uint256 tokenId); event MetadataUpdate(uint256 _tokenId); event StableDilutionMetadataRequested(uint256 _tokenId); event StableDilutionMetadataReceived(uint256 _tokenId); event PermanentURI(string _value, uint256 indexed _id); using Strings for uint256; using Chainlink for Chainlink.Request; uint256 public constant getExpiryTime = 5 minutes; uint256 private constant STARTING_INDEX = 0; uint256 public constant MAX_SUPPLY = 101; uint256 public AUCTION_PRICE = 0.15 ether; bool metadataFrozen = false; bool preminted = false; uint256 private currentMintTokenId = STARTING_INDEX; string public placeholderTokenUri; string public baseUri; uint256 public saleStartTime; bytes32 private jobId; uint256 private fee; mapping(bytes32 => uint256) requestToTokenId; mapping(bytes32 => uint256) requestToExpiration; mapping(uint256 => bytes32) tokenIdToRequest; struct ChainlinkInformation { address chainlinkToken; address chainlinkOracle; bytes32 jobId; uint256 fee; } constructor( string memory _name, string memory _symbol, string memory _placeholderTokenUri, string memory _baseUri, uint256 _saleStartTime, address _royalReceiver, uint96 _royalFeeNumerator, address[] memory payees, uint256[] memory shares_, ChainlinkInformation memory chainlinkInformation ) payable ERC721(_name, _symbol) PaymentSplitter(payees, shares_) { placeholderTokenUri = _placeholderTokenUri; baseUri = _baseUri; saleStartTime = _saleStartTime; if (_royalReceiver != address(0)) { _setDefaultRoyalty(_royalReceiver, _royalFeeNumerator); } setChainlinkToken(chainlinkInformation.chainlinkToken); setChainlinkOracle(chainlinkInformation.chainlinkOracle); jobId = chainlinkInformation.jobId; fee = chainlinkInformation.fee; } function preMint(address to) public onlyOwner { if (totalSupply() >= MAX_SUPPLY) revert SoldOut(address(this)); require(!preminted, "Only one premint is allowed"); preminted = true; mintInternal(to); } function mint() public payable nonReentrant { if (totalSupply() >= MAX_SUPPLY) revert SoldOut(address(this)); if (block.timestamp < saleStartTime) { revert SaleNotStarted(address(this)); } if (msg.value < AUCTION_PRICE) revert InvalidPrice(address(this)); uint256 refund = msg.value - AUCTION_PRICE; if (refund > 0) { (bool success, ) = msg.sender.call{value: refund}(""); require(success, "Refund failed"); } emit Sold(msg.sender, AUCTION_PRICE, currentMintTokenId); mintInternal(msg.sender); } function setLinkFee(uint256 _fee) public onlyOwner { fee = _fee; } function mintInternal(address to) private { _safeMint(to, currentMintTokenId); requestStableDilutionMetadata(currentMintTokenId, to); _setTokenURI(currentMintTokenId, placeholderTokenUri); ++currentMintTokenId; } function requestStableDilutionMetadata( uint256 tokenId, address to ) private returns (bytes32 requestId) { emit StableDilutionMetadataRequested(tokenId); Chainlink.Request memory req = buildChainlinkRequest( jobId, address(this), this.fulfill.selector ); req.add( "get", string( abi.encodePacked( baseUri, Strings.toString(tokenId), "/", Strings.toHexString(uint256(uint160(to)), 20) ) ) ); req.add("path", "metadataUrl"); requestId = sendChainlinkRequest(req, fee); requestToTokenId[requestId] = tokenId; requestToExpiration[requestId] = block.timestamp + getExpiryTime; tokenIdToRequest[tokenId] = requestId; } function cancelPendingChainlinkRequests() public onlyOwner { for ( uint256 tokenId = STARTING_INDEX; tokenId < totalSupply() + STARTING_INDEX; tokenId++ ) { bytes32 requestId = tokenIdToRequest[tokenId]; if ( requestId != 0 && block.timestamp > requestToExpiration[requestId] ) { cancelChainlinkRequest( requestId, fee, this.fulfill.selector, requestToExpiration[requestId] ); tokenIdToRequest[tokenId] = 0; requestToExpiration[requestId] = 0; } } } function fulfill( bytes32 _requestId, string memory _metadataUri ) public virtual recordChainlinkFulfillment(_requestId) { uint256 tokenId = requestToTokenId[_requestId]; tokenIdToRequest[tokenId] = 0; requestToExpiration[_requestId] = 0; emit StableDilutionMetadataReceived(tokenId); _setTokenURI(tokenId, _metadataUri); emit MetadataUpdate(tokenId); } function withdrawLink() public onlyOwner { LinkTokenInterface link = LinkTokenInterface(chainlinkTokenAddress()); require( link.transfer(msg.sender, link.balanceOf(address(this))), "Unable to transfer" ); } function setSaleStartTime(uint256 _saleStartTime) public onlyOwner { saleStartTime = _saleStartTime; } function setBaseUri(string memory _baseUri) public onlyOwner { baseUri = _baseUri; } function setPlaceholderUri( string memory _placeholderTokenUri ) public onlyOwner { placeholderTokenUri = _placeholderTokenUri; } function freezeMetadata() public onlyOwner { require(metadataFrozen == false, "Metadata already frozen"); metadataFrozen = true; for ( uint256 i = STARTING_INDEX; i < totalSupply() + STARTING_INDEX; ++i ) { emit PermanentURI(tokenURI(i), i); } } function setTokenUri( uint256[] calldata tokenIds, string[] calldata _metadataUris ) public onlyOwner { require(metadataFrozen == false, "Metadata frozen"); require( tokenIds.length == _metadataUris.length, "Arrays need to be same size" ); for (uint256 i = 0; i < tokenIds.length; i++) { _setTokenURI(tokenIds[i], _metadataUris[i]); emit MetadataUpdate(tokenIds[i]); } } function tokenURI( uint256 tokenId ) public view override(ERC721, ERC721URIStorage) returns (string memory) { return super.tokenURI(tokenId); } function setDefaultRoyalty( address receiver, uint96 feeNumerator ) public onlyOwner { super._setDefaultRoyalty(receiver, feeNumerator); } function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); } function _burn( uint256 tokenId ) internal override(ERC721, ERC721Royalty, ERC721URIStorage) { super._burn(tokenId); } function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Royalty, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function setApprovalForAll( address operator, bool approved ) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {CBORChainlink} from "./vendor/CBORChainlink.sol"; import {BufferChainlink} from "./vendor/BufferChainlink.sol"; /** * @title Library for common Chainlink functions * @dev Uses imported CBOR library for encoding to buffer */ library Chainlink { uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase using CBORChainlink for BufferChainlink.buffer; struct Request { bytes32 id; address callbackAddress; bytes4 callbackFunctionId; uint256 nonce; BufferChainlink.buffer buf; } /** * @notice Initializes a Chainlink request * @dev Sets the ID, callback address, and callback function signature on the request * @param self The uninitialized request * @param jobId The Job Specification ID * @param callbackAddr The callback address * @param callbackFunc The callback function signature * @return The initialized request */ function initialize( Request memory self, bytes32 jobId, address callbackAddr, bytes4 callbackFunc ) internal pure returns (Chainlink.Request memory) { BufferChainlink.init(self.buf, defaultBufferSize); self.id = jobId; self.callbackAddress = callbackAddr; self.callbackFunctionId = callbackFunc; return self; } /** * @notice Sets the data for the buffer without encoding CBOR on-chain * @dev CBOR can be closed with curly-brackets {} or they can be left off * @param self The initialized request * @param data The CBOR data */ function setBuffer(Request memory self, bytes memory data) internal pure { BufferChainlink.init(self.buf, data.length); BufferChainlink.append(self.buf, data); } /** * @notice Adds a string value to the request with a given key name * @param self The initialized request * @param key The name of the key * @param value The string value to add */ function add( Request memory self, string memory key, string memory value ) internal pure { self.buf.encodeString(key); self.buf.encodeString(value); } /** * @notice Adds a bytes value to the request with a given key name * @param self The initialized request * @param key The name of the key * @param value The bytes value to add */ function addBytes( Request memory self, string memory key, bytes memory value ) internal pure { self.buf.encodeString(key); self.buf.encodeBytes(value); } /** * @notice Adds a int256 value to the request with a given key name * @param self The initialized request * @param key The name of the key * @param value The int256 value to add */ function addInt( Request memory self, string memory key, int256 value ) internal pure { self.buf.encodeString(key); self.buf.encodeInt(value); } /** * @notice Adds a uint256 value to the request with a given key name * @param self The initialized request * @param key The name of the key * @param value The uint256 value to add */ function addUint( Request memory self, string memory key, uint256 value ) internal pure { self.buf.encodeString(key); self.buf.encodeUInt(value); } /** * @notice Adds an array of strings to the request with a given key name * @param self The initialized request * @param key The name of the key * @param values The array of string values to add */ function addStringArray( Request memory self, string memory key, string[] memory values ) internal pure { self.buf.encodeString(key); self.buf.startArray(); for (uint256 i = 0; i < values.length; i++) { self.buf.encodeString(values[i]); } self.buf.endSequence(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Chainlink.sol"; import "./interfaces/ENSInterface.sol"; import "./interfaces/LinkTokenInterface.sol"; import "./interfaces/ChainlinkRequestInterface.sol"; import "./interfaces/OperatorInterface.sol"; import "./interfaces/PointerInterface.sol"; import {ENSResolver as ENSResolver_Chainlink} from "./vendor/ENSResolver.sol"; /** * @title The ChainlinkClient contract * @notice Contract writers can inherit this contract in order to create requests for the * Chainlink network */ abstract contract ChainlinkClient { using Chainlink for Chainlink.Request; uint256 internal constant LINK_DIVISIBILITY = 10**18; uint256 private constant AMOUNT_OVERRIDE = 0; address private constant SENDER_OVERRIDE = address(0); uint256 private constant ORACLE_ARGS_VERSION = 1; uint256 private constant OPERATOR_ARGS_VERSION = 2; bytes32 private constant ENS_TOKEN_SUBNAME = keccak256("link"); bytes32 private constant ENS_ORACLE_SUBNAME = keccak256("oracle"); address private constant LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571; ENSInterface private s_ens; bytes32 private s_ensNode; LinkTokenInterface private s_link; OperatorInterface private s_oracle; uint256 private s_requestCount = 1; mapping(bytes32 => address) private s_pendingRequests; event ChainlinkRequested(bytes32 indexed id); event ChainlinkFulfilled(bytes32 indexed id); event ChainlinkCancelled(bytes32 indexed id); /** * @notice Creates a request that can hold additional parameters * @param specId The Job Specification ID that the request will be created for * @param callbackAddr address to operate the callback on * @param callbackFunctionSignature function signature to use for the callback * @return A Chainlink Request struct in memory */ function buildChainlinkRequest( bytes32 specId, address callbackAddr, bytes4 callbackFunctionSignature ) internal pure returns (Chainlink.Request memory) { Chainlink.Request memory req; return req.initialize(specId, callbackAddr, callbackFunctionSignature); } /** * @notice Creates a request that can hold additional parameters * @param specId The Job Specification ID that the request will be created for * @param callbackFunctionSignature function signature to use for the callback * @return A Chainlink Request struct in memory */ function buildOperatorRequest(bytes32 specId, bytes4 callbackFunctionSignature) internal view returns (Chainlink.Request memory) { Chainlink.Request memory req; return req.initialize(specId, address(this), callbackFunctionSignature); } /** * @notice Creates a Chainlink request to the stored oracle address * @dev Calls `chainlinkRequestTo` with the stored oracle address * @param req The initialized Chainlink Request * @param payment The amount of LINK to send for the request * @return requestId The request ID */ function sendChainlinkRequest(Chainlink.Request memory req, uint256 payment) internal returns (bytes32) { return sendChainlinkRequestTo(address(s_oracle), req, payment); } /** * @notice Creates a Chainlink request to the specified oracle address * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to * send LINK which creates a request on the target oracle contract. * Emits ChainlinkRequested event. * @param oracleAddress The address of the oracle for the request * @param req The initialized Chainlink Request * @param payment The amount of LINK to send for the request * @return requestId The request ID */ function sendChainlinkRequestTo( address oracleAddress, Chainlink.Request memory req, uint256 payment ) internal returns (bytes32 requestId) { uint256 nonce = s_requestCount; s_requestCount = nonce + 1; bytes memory encodedRequest = abi.encodeWithSelector( ChainlinkRequestInterface.oracleRequest.selector, SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent req.id, address(this), req.callbackFunctionId, nonce, ORACLE_ARGS_VERSION, req.buf.buf ); return _rawRequest(oracleAddress, nonce, payment, encodedRequest); } /** * @notice Creates a Chainlink request to the stored oracle address * @dev This function supports multi-word response * @dev Calls `sendOperatorRequestTo` with the stored oracle address * @param req The initialized Chainlink Request * @param payment The amount of LINK to send for the request * @return requestId The request ID */ function sendOperatorRequest(Chainlink.Request memory req, uint256 payment) internal returns (bytes32) { return sendOperatorRequestTo(address(s_oracle), req, payment); } /** * @notice Creates a Chainlink request to the specified oracle address * @dev This function supports multi-word response * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to * send LINK which creates a request on the target oracle contract. * Emits ChainlinkRequested event. * @param oracleAddress The address of the oracle for the request * @param req The initialized Chainlink Request * @param payment The amount of LINK to send for the request * @return requestId The request ID */ function sendOperatorRequestTo( address oracleAddress, Chainlink.Request memory req, uint256 payment ) internal returns (bytes32 requestId) { uint256 nonce = s_requestCount; s_requestCount = nonce + 1; bytes memory encodedRequest = abi.encodeWithSelector( OperatorInterface.operatorRequest.selector, SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent req.id, req.callbackFunctionId, nonce, OPERATOR_ARGS_VERSION, req.buf.buf ); return _rawRequest(oracleAddress, nonce, payment, encodedRequest); } /** * @notice Make a request to an oracle * @param oracleAddress The address of the oracle for the request * @param nonce used to generate the request ID * @param payment The amount of LINK to send for the request * @param encodedRequest data encoded for request type specific format * @return requestId The request ID */ function _rawRequest( address oracleAddress, uint256 nonce, uint256 payment, bytes memory encodedRequest ) private returns (bytes32 requestId) { requestId = keccak256(abi.encodePacked(this, nonce)); s_pendingRequests[requestId] = oracleAddress; emit ChainlinkRequested(requestId); require(s_link.transferAndCall(oracleAddress, payment, encodedRequest), "unable to transferAndCall to oracle"); } /** * @notice Allows a request to be cancelled if it has not been fulfilled * @dev Requires keeping track of the expiration value emitted from the oracle contract. * Deletes the request from the `pendingRequests` mapping. * Emits ChainlinkCancelled event. * @param requestId The request ID * @param payment The amount of LINK sent for the request * @param callbackFunc The callback function specified for the request * @param expiration The time of the expiration for the request */ function cancelChainlinkRequest( bytes32 requestId, uint256 payment, bytes4 callbackFunc, uint256 expiration ) internal { OperatorInterface requested = OperatorInterface(s_pendingRequests[requestId]); delete s_pendingRequests[requestId]; emit ChainlinkCancelled(requestId); requested.cancelOracleRequest(requestId, payment, callbackFunc, expiration); } /** * @notice the next request count to be used in generating a nonce * @dev starts at 1 in order to ensure consistent gas cost * @return returns the next request count to be used in a nonce */ function getNextRequestCount() internal view returns (uint256) { return s_requestCount; } /** * @notice Sets the stored oracle address * @param oracleAddress The address of the oracle contract */ function setChainlinkOracle(address oracleAddress) internal { s_oracle = OperatorInterface(oracleAddress); } /** * @notice Sets the LINK token address * @param linkAddress The address of the LINK token contract */ function setChainlinkToken(address linkAddress) internal { s_link = LinkTokenInterface(linkAddress); } /** * @notice Sets the Chainlink token address for the public * network as given by the Pointer contract */ function setPublicChainlinkToken() internal { setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress()); } /** * @notice Retrieves the stored address of the LINK token * @return The address of the LINK token */ function chainlinkTokenAddress() internal view returns (address) { return address(s_link); } /** * @notice Retrieves the stored address of the oracle contract * @return The address of the oracle contract */ function chainlinkOracleAddress() internal view returns (address) { return address(s_oracle); } /** * @notice Allows for a request which was created on another contract to be fulfilled * on this contract * @param oracleAddress The address of the oracle contract that will fulfill the request * @param requestId The request ID used for the response */ function addChainlinkExternalRequest(address oracleAddress, bytes32 requestId) internal notPendingRequest(requestId) { s_pendingRequests[requestId] = oracleAddress; } /** * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS * @dev Accounts for subnodes having different resolvers * @param ensAddress The address of the ENS contract * @param node The ENS node hash */ function useChainlinkWithENS(address ensAddress, bytes32 node) internal { s_ens = ENSInterface(ensAddress); s_ensNode = node; bytes32 linkSubnode = keccak256(abi.encodePacked(s_ensNode, ENS_TOKEN_SUBNAME)); ENSResolver_Chainlink resolver = ENSResolver_Chainlink(s_ens.resolver(linkSubnode)); setChainlinkToken(resolver.addr(linkSubnode)); updateChainlinkOracleWithENS(); } /** * @notice Sets the stored oracle contract with the address resolved by ENS * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously */ function updateChainlinkOracleWithENS() internal { bytes32 oracleSubnode = keccak256(abi.encodePacked(s_ensNode, ENS_ORACLE_SUBNAME)); ENSResolver_Chainlink resolver = ENSResolver_Chainlink(s_ens.resolver(oracleSubnode)); setChainlinkOracle(resolver.addr(oracleSubnode)); } /** * @notice Ensures that the fulfillment is valid for this contract * @dev Use if the contract developer prefers methods instead of modifiers for validation * @param requestId The request ID for fulfillment */ function validateChainlinkCallback(bytes32 requestId) internal recordChainlinkFulfillment(requestId) // solhint-disable-next-line no-empty-blocks { } /** * @dev Reverts if the sender is not the oracle of the request. * Emits ChainlinkFulfilled event. * @param requestId The request ID for fulfillment */ modifier recordChainlinkFulfillment(bytes32 requestId) { require(msg.sender == s_pendingRequests[requestId], "Source must be the oracle of the request"); delete s_pendingRequests[requestId]; emit ChainlinkFulfilled(requestId); _; } /** * @dev Reverts if the request is already pending * @param requestId The request ID for fulfillment */ modifier notPendingRequest(bytes32 requestId) { require(s_pendingRequests[requestId] == address(0), "Request is already pending"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ChainlinkRequestInterface { function oracleRequest( address sender, uint256 requestPrice, bytes32 serviceAgreementID, address callbackAddress, bytes4 callbackFunctionId, uint256 nonce, uint256 dataVersion, bytes calldata data ) external; function cancelOracleRequest( bytes32 requestId, uint256 payment, bytes4 callbackFunctionId, uint256 expiration ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ENSInterface { // Logged when the owner of a node assigns a new owner to a subnode. event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); // Logged when the owner of a node transfers ownership to a new account. event Transfer(bytes32 indexed node, address owner); // Logged when the resolver for a node changes. event NewResolver(bytes32 indexed node, address resolver); // Logged when the TTL of a node changes event NewTTL(bytes32 indexed node, uint64 ttl); function setSubnodeOwner( bytes32 node, bytes32 label, address owner ) external; function setResolver(bytes32 node, address resolver) external; function setOwner(bytes32 node, address owner) external; function setTTL(bytes32 node, uint64 ttl) external; function owner(bytes32 node) external view returns (address); function resolver(bytes32 node) external view returns (address); function ttl(bytes32 node) external view returns (uint64); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface LinkTokenInterface { function allowance(address owner, address spender) external view returns (uint256 remaining); function approve(address spender, uint256 value) external returns (bool success); function balanceOf(address owner) external view returns (uint256 balance); function decimals() external view returns (uint8 decimalPlaces); function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); function increaseApproval(address spender, uint256 subtractedValue) external; function name() external view returns (string memory tokenName); function symbol() external view returns (string memory tokenSymbol); function totalSupply() external view returns (uint256 totalTokensIssued); function transfer(address to, uint256 value) external returns (bool success); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns (bool success); function transferFrom( address from, address to, uint256 value ) external returns (bool success); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./OracleInterface.sol"; import "./ChainlinkRequestInterface.sol"; interface OperatorInterface is OracleInterface, ChainlinkRequestInterface { function operatorRequest( address sender, uint256 payment, bytes32 specId, bytes4 callbackFunctionId, uint256 nonce, uint256 dataVersion, bytes calldata data ) external; function fulfillOracleRequest2( bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data ) external returns (bool); function ownerTransferAndCall( address to, uint256 value, bytes calldata data ) external returns (bool success); function distributeFunds(address payable[] calldata receivers, uint256[] calldata amounts) external payable; function getAuthorizedSenders() external returns (address[] memory); function setAuthorizedSenders(address[] calldata senders) external; function getForwarder() external returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface OracleInterface { function fulfillOracleRequest( bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes32 data ) external returns (bool); function isAuthorizedSender(address node) external view returns (bool); function withdraw(address recipient, uint256 amount) external; function withdrawable() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface PointerInterface { function getAddress() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev A library for working with mutable byte buffers in Solidity. * * Byte buffers are mutable and expandable, and provide a variety of primitives * for writing to them. At any time you can fetch a bytes object containing the * current contents of the buffer. The bytes object should not be stored between * operations, as it may change due to resizing of the buffer. */ library BufferChainlink { /** * @dev Represents a mutable buffer. Buffers have a current value (buf) and * a capacity. The capacity may be longer than the current value, in * which case it can be extended without the need to allocate more memory. */ struct buffer { bytes buf; uint256 capacity; } /** * @dev Initializes a buffer with an initial capacity. * @param buf The buffer to initialize. * @param capacity The number of bytes of space to allocate the buffer. * @return The buffer, for chaining. */ function init(buffer memory buf, uint256 capacity) internal pure returns (buffer memory) { if (capacity % 32 != 0) { capacity += 32 - (capacity % 32); } // Allocate space for the buffer data buf.capacity = capacity; assembly { let ptr := mload(0x40) mstore(buf, ptr) mstore(ptr, 0) mstore(0x40, add(32, add(ptr, capacity))) } return buf; } /** * @dev Initializes a new buffer from an existing bytes object. * Changes to the buffer may mutate the original value. * @param b The bytes object to initialize the buffer with. * @return A new buffer. */ function fromBytes(bytes memory b) internal pure returns (buffer memory) { buffer memory buf; buf.buf = b; buf.capacity = b.length; return buf; } function resize(buffer memory buf, uint256 capacity) private pure { bytes memory oldbuf = buf.buf; init(buf, capacity); append(buf, oldbuf); } function max(uint256 a, uint256 b) private pure returns (uint256) { if (a > b) { return a; } return b; } /** * @dev Sets buffer length to 0. * @param buf The buffer to truncate. * @return The original buffer, for chaining.. */ function truncate(buffer memory buf) internal pure returns (buffer memory) { assembly { let bufptr := mload(buf) mstore(bufptr, 0) } return buf; } /** * @dev Writes a byte string to a buffer. Resizes if doing so would exceed * the capacity of the buffer. * @param buf The buffer to append to. * @param off The start offset to write to. * @param data The data to append. * @param len The number of bytes to copy. * @return The original buffer, for chaining. */ function write( buffer memory buf, uint256 off, bytes memory data, uint256 len ) internal pure returns (buffer memory) { require(len <= data.length); if (off + len > buf.capacity) { resize(buf, max(buf.capacity, len + off) * 2); } uint256 dest; uint256 src; assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen := mload(bufptr) // Start address = buffer address + offset + sizeof(buffer length) dest := add(add(bufptr, 32), off) // Update buffer length if we're extending it if gt(add(len, off), buflen) { mstore(bufptr, add(len, off)) } src := add(data, 32) } // Copy word-length chunks while possible for (; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes unchecked { uint256 mask = (256**(32 - len)) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } return buf; } /** * @dev Appends a byte string to a buffer. Resizes if doing so would exceed * the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @param len The number of bytes to copy. * @return The original buffer, for chaining. */ function append( buffer memory buf, bytes memory data, uint256 len ) internal pure returns (buffer memory) { return write(buf, buf.buf.length, data, len); } /** * @dev Appends a byte string to a buffer. Resizes if doing so would exceed * the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer, for chaining. */ function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) { return write(buf, buf.buf.length, data, data.length); } /** * @dev Writes a byte to the buffer. Resizes if doing so would exceed the * capacity of the buffer. * @param buf The buffer to append to. * @param off The offset to write the byte at. * @param data The data to append. * @return The original buffer, for chaining. */ function writeUint8( buffer memory buf, uint256 off, uint8 data ) internal pure returns (buffer memory) { if (off >= buf.capacity) { resize(buf, buf.capacity * 2); } assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen := mload(bufptr) // Address = buffer address + sizeof(buffer length) + off let dest := add(add(bufptr, off), 32) mstore8(dest, data) // Update buffer length if we extended it if eq(off, buflen) { mstore(bufptr, add(buflen, 1)) } } return buf; } /** * @dev Appends a byte to the buffer. Resizes if doing so would exceed the * capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer, for chaining. */ function appendUint8(buffer memory buf, uint8 data) internal pure returns (buffer memory) { return writeUint8(buf, buf.buf.length, data); } /** * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param off The offset to write at. * @param data The data to append. * @param len The number of bytes to write (left-aligned). * @return The original buffer, for chaining. */ function write( buffer memory buf, uint256 off, bytes32 data, uint256 len ) private pure returns (buffer memory) { if (len + off > buf.capacity) { resize(buf, (len + off) * 2); } unchecked { uint256 mask = (256**len) - 1; // Right-align data data = data >> (8 * (32 - len)); assembly { // Memory address of the buffer data let bufptr := mload(buf) // Address = buffer address + sizeof(buffer length) + off + len let dest := add(add(bufptr, off), len) mstore(dest, or(and(mload(dest), not(mask)), data)) // Update buffer length if we extended it if gt(add(off, len), mload(bufptr)) { mstore(bufptr, add(off, len)) } } } return buf; } /** * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the * capacity of the buffer. * @param buf The buffer to append to. * @param off The offset to write at. * @param data The data to append. * @return The original buffer, for chaining. */ function writeBytes20( buffer memory buf, uint256 off, bytes20 data ) internal pure returns (buffer memory) { return write(buf, off, bytes32(data), 20); } /** * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed * the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer, for chhaining. */ function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) { return write(buf, buf.buf.length, bytes32(data), 20); } /** * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed * the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer, for chaining. */ function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) { return write(buf, buf.buf.length, data, 32); } /** * @dev Writes an integer to the buffer. Resizes if doing so would exceed * the capacity of the buffer. * @param buf The buffer to append to. * @param off The offset to write at. * @param data The data to append. * @param len The number of bytes to write (right-aligned). * @return The original buffer, for chaining. */ function writeInt( buffer memory buf, uint256 off, uint256 data, uint256 len ) private pure returns (buffer memory) { if (len + off > buf.capacity) { resize(buf, (len + off) * 2); } uint256 mask = (256**len) - 1; assembly { // Memory address of the buffer data let bufptr := mload(buf) // Address = buffer address + off + sizeof(buffer length) + len let dest := add(add(bufptr, off), len) mstore(dest, or(and(mload(dest), not(mask)), data)) // Update buffer length if we extended it if gt(add(off, len), mload(bufptr)) { mstore(bufptr, add(off, len)) } } return buf; } /** * @dev Appends a byte to the end of the buffer. Resizes if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */ function appendInt( buffer memory buf, uint256 data, uint256 len ) internal pure returns (buffer memory) { return writeInt(buf, buf.buf.length, data, len); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.19; import {BufferChainlink} from "./BufferChainlink.sol"; library CBORChainlink { using BufferChainlink for BufferChainlink.buffer; uint8 private constant MAJOR_TYPE_INT = 0; uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1; uint8 private constant MAJOR_TYPE_BYTES = 2; uint8 private constant MAJOR_TYPE_STRING = 3; uint8 private constant MAJOR_TYPE_ARRAY = 4; uint8 private constant MAJOR_TYPE_MAP = 5; uint8 private constant MAJOR_TYPE_TAG = 6; uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7; uint8 private constant TAG_TYPE_BIGNUM = 2; uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3; function encodeFixedNumeric(BufferChainlink.buffer memory buf, uint8 major, uint64 value) private pure { if(value <= 23) { buf.appendUint8(uint8((major << 5) | value)); } else if (value <= 0xFF) { buf.appendUint8(uint8((major << 5) | 24)); buf.appendInt(value, 1); } else if (value <= 0xFFFF) { buf.appendUint8(uint8((major << 5) | 25)); buf.appendInt(value, 2); } else if (value <= 0xFFFFFFFF) { buf.appendUint8(uint8((major << 5) | 26)); buf.appendInt(value, 4); } else { buf.appendUint8(uint8((major << 5) | 27)); buf.appendInt(value, 8); } } function encodeIndefiniteLengthType(BufferChainlink.buffer memory buf, uint8 major) private pure { buf.appendUint8(uint8((major << 5) | 31)); } function encodeUInt(BufferChainlink.buffer memory buf, uint value) internal pure { if(value > 0xFFFFFFFFFFFFFFFF) { encodeBigNum(buf, value); } else { encodeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(value)); } } function encodeInt(BufferChainlink.buffer memory buf, int value) internal pure { if(value < -0x10000000000000000) { encodeSignedBigNum(buf, value); } else if(value > 0xFFFFFFFFFFFFFFFF) { encodeBigNum(buf, uint(value)); } else if(value >= 0) { encodeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(uint256(value))); } else { encodeFixedNumeric(buf, MAJOR_TYPE_NEGATIVE_INT, uint64(uint256(-1 - value))); } } function encodeBytes(BufferChainlink.buffer memory buf, bytes memory value) internal pure { encodeFixedNumeric(buf, MAJOR_TYPE_BYTES, uint64(value.length)); buf.append(value); } function encodeBigNum(BufferChainlink.buffer memory buf, uint value) internal pure { buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM)); encodeBytes(buf, abi.encode(value)); } function encodeSignedBigNum(BufferChainlink.buffer memory buf, int input) internal pure { buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM)); encodeBytes(buf, abi.encode(uint256(-1 - input))); } function encodeString(BufferChainlink.buffer memory buf, string memory value) internal pure { encodeFixedNumeric(buf, MAJOR_TYPE_STRING, uint64(bytes(value).length)); buf.append(bytes(value)); } function startArray(BufferChainlink.buffer memory buf) internal pure { encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY); } function startMap(BufferChainlink.buffer memory buf) internal pure { encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP); } function endSequence(BufferChainlink.buffer memory buf) internal pure { encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ENSResolver { function addr(bytes32 node) public view virtual returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `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 Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @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 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _totalReleased is the sum of all values in _released. // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. _totalReleased += payment; unchecked { _released[account] += 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 payment = releasable(token, account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" // cannot overflow. _erc20TotalReleased[token] += payment; unchecked { _erc20Released[token][account] += 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 (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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.8.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: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden 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 token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @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, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../common/ERC2981.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC721Royalty is ERC2981, ERC721 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev See {ERC721-_burn}. This override additionally checks to see if a * token-specific URI was set for the token, and if so, it deletes the token URI from * the storage mapping. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/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.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": true, "runs": 100 }, "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":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_placeholderTokenUri","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"uint256","name":"_saleStartTime","type":"uint256"},{"internalType":"address","name":"_royalReceiver","type":"address"},{"internalType":"uint96","name":"_royalFeeNumerator","type":"uint96"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"},{"components":[{"internalType":"address","name":"chainlinkToken","type":"address"},{"internalType":"address","name":"chainlinkOracle","type":"address"},{"internalType":"bytes32","name":"jobId","type":"bytes32"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct JPA.ChainlinkInformation","name":"chainlinkInformation","type":"tuple"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"EtherTransferFail","type":"error"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"InvalidPrice","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"SaleNotStarted","type":"error"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"SoldOut","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkRequested","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":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","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":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Sold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"StableDilutionMetadataReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"StableDilutionMetadataRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AUCTION_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":[],"name":"cancelPendingChainlinkRequests","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"string","name":"_metadataUri","type":"string"}],"name":"fulfill","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":[],"name":"getExpiryTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"payable","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":[],"name":"placeholderTokenUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"preMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"saleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_placeholderTokenUri","type":"string"}],"name":"setPlaceholderUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleStartTime","type":"uint256"}],"name":"setSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_metadataUris","type":"string[]"}],"name":"setTokenUri","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060408190526001601955670214e8348c4f0000601c55601d805461ffff191690555f601e55620051b838819003908190833981016040819052620000459162000977565b8282733cc6cdda760b79bafa08df41ecfa224f810dceb660018d8d60026200006e838262000b44565b5060036200007d828262000b44565b5050506200009a62000094620003c160201b60201c565b620003c5565b6daaeb6d7670e522a718067333cd4e3b15620001d55780156200012857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b5f604051808303815f87803b1580156200010b575f80fd5b505af11580156200011e573d5f803e3d5ffd5b50505050620001d5565b6001600160a01b03821615620001795760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000f3565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024015f604051808303815f87803b158015620001bd575f80fd5b505af1158015620001d0573d5f803e3d5ffd5b505050505b50508051825114620002495760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b5f8251116200029b5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000240565b5f5b82518110156200030657620002f1838281518110620002c057620002c062000c0c565b6020026020010151838381518110620002dd57620002dd62000c0c565b60200260200101516200041660201b60201c565b80620002fd8162000c34565b9150506200029d565b50506001601b5550601f6200031c898262000b44565b5060206200032b888262000b44565b5060218690556001600160a01b038516156200034d576200034d858562000601565b80516200037690601780546001600160a01b0319166001600160a01b0392909216919091179055565b6020810151620003a290601880546001600160a01b0319166001600160a01b0392909216919091179055565b6040810151602255606001516023555062000c6b975050505050505050565b3390565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b038216620004835760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000240565b5f8111620004d45760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000240565b6001600160a01b0382165f90815260106020526040902054156200054f5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000240565b60128054600181019091557fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0384169081179091555f908152601060205260409020819055600e54620005b890829062000c4f565b600e55604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6127106001600160601b0382161115620006715760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b606482015260840162000240565b6001600160a01b038216620006c95760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000240565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b909102175f55565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171562000740576200074062000701565b604052919050565b5f82601f83011262000758575f80fd5b81516001600160401b0381111562000774576200077462000701565b60206200078a601f8301601f1916820162000715565b82815285828487010111156200079e575f80fd5b5f5b83811015620007bd578581018301518282018401528201620007a0565b505f928101909101919091529392505050565b80516001600160a01b0381168114620007e7575f80fd5b919050565b80516001600160601b0381168114620007e7575f80fd5b5f6001600160401b038211156200081e576200081e62000701565b5060051b60200190565b5f82601f83011262000838575f80fd5b81516020620008516200084b8362000803565b62000715565b82815260059290921b8401810191818101908684111562000870575f80fd5b8286015b8481101562000896576200088881620007d0565b835291830191830162000874565b509695505050505050565b5f82601f830112620008b1575f80fd5b81516020620008c46200084b8362000803565b82815260059290921b84018101918181019086841115620008e3575f80fd5b8286015b84811015620008965780518352918301918301620008e7565b5f6080828403121562000911575f80fd5b604051608081016001600160401b038111828210171562000936576200093662000701565b6040529050806200094783620007d0565b81526200095760208401620007d0565b602082015260408301516040820152606083015160608201525092915050565b5f805f805f805f805f806101a08b8d03121562000992575f80fd5b8a516001600160401b0380821115620009a9575f80fd5b620009b78e838f0162000748565b9b5060208d0151915080821115620009cd575f80fd5b620009db8e838f0162000748565b9a5060408d0151915080821115620009f1575f80fd5b620009ff8e838f0162000748565b995060608d015191508082111562000a15575f80fd5b62000a238e838f0162000748565b985060808d0151975062000a3a60a08e01620007d0565b965062000a4a60c08e01620007ec565b955060e08d015191508082111562000a60575f80fd5b62000a6e8e838f0162000828565b94506101008d015191508082111562000a85575f80fd5b5062000a948d828e01620008a1565b92505062000aa78c6101208d0162000900565b90509295989b9194979a5092959850565b600181811c9082168062000acd57607f821691505b60208210810362000aec57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000b3f575f81815260208120601f850160051c8101602086101562000b1a5750805b601f850160051c820191505b8181101562000b3b5782815560010162000b26565b5050505b505050565b81516001600160401b0381111562000b605762000b6062000701565b62000b788162000b71845462000ab8565b8462000af2565b602080601f83116001811462000bae575f841562000b965750858301515b5f19600386901b1c1916600185901b17855562000b3b565b5f85815260208120601f198616915b8281101562000bde5788860151825594840194600190910190840162000bbd565b508582101562000bfc57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f6001820162000c485762000c4862000c20565b5060010190565b8082018082111562000c655762000c6562000c20565b92915050565b61453f8062000c795f395ff3fe6080604052600436106102a4575f3560e01c806370a0823111610160578063a3f8eace116100c9578063ce7c2ac211610083578063ce7c2ac2146107d8578063d111515d1461080c578063d79779b214610820578063e33b7de314610854578063e985e9c514610868578063f2fde38b14610887578063fd955ed9146108a6575f80fd5b8063a3f8eace14610729578063aeb7c35714610748578063b88d4fde1461075c578063c45ac0501461077b578063c87b56dd1461079a578063cd8ff657146107b9575f80fd5b806395acfa271161011a57806395acfa271461067a57806395d89b411461068f5780639852595c146106a35780639abc8320146106d7578063a0bcfc7f146106eb578063a22cb4651461070a575f80fd5b806370a08231146105d8578063715018a6146105f75780637fad2d121461060b5780638b83209b1461062a5780638da5cb5b146106495780638dc654a214610666575f80fd5b80632f745c591161020d57806342842e0e116101c757806342842e0e1461050a57806348b75044146105295780634cf5f7a4146105485780634f6ccce71461055c578063525f8a5c1461057b5780636352211e1461059a5780636afd4ba2146105b9575f80fd5b80632f745c591461046457806332cb6b0c1461048357806337441996146104975780633a98ef39146104b6578063406072a9146104ca57806341f43434146104e9575f80fd5b806318160ddd1161025e57806318160ddd146103b157806319165587146103cf5780631cbaee2d146103ee57806323b872dd1461040357806325cb5bc0146104225780632a55205a14610437575f80fd5b806301ffc9a7146102e857806304634d8d1461031c57806306fdde031461033d578063081812fc1461035e578063095ea7b31461038a5780631249c58b146103a9575f80fd5b366102e4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102da92919061397f565b60405180910390a1005b5f80fd5b3480156102f3575f80fd5b506103076103023660046139ad565b6108c5565b60405190151581526020015b60405180910390f35b348015610327575f80fd5b5061033b6103363660046139dc565b6108d5565b005b348015610348575f80fd5b506103516108eb565b6040516103139190613a6b565b348015610369575f80fd5b5061037d610378366004613a7d565b61097b565b6040516103139190613a94565b348015610395575f80fd5b5061033b6103a4366004613aa8565b6109a0565b61033b6109b9565b3480156103bc575f80fd5b50600b545b604051908152602001610313565b3480156103da575f80fd5b5061033b6103e9366004613ad2565b610b3a565b3480156103f9575f80fd5b506103c160215481565b34801561040e575f80fd5b5061033b61041d366004613aed565b610c13565b34801561042d575f80fd5b506103c161012c81565b348015610442575f80fd5b50610456610451366004613b2b565b610c3e565b60405161031392919061397f565b34801561046f575f80fd5b506103c161047e366004613aa8565b610ce9565b34801561048e575f80fd5b506103c1606581565b3480156104a2575f80fd5b5061033b6104b1366004613bef565b610d7d565b3480156104c1575f80fd5b50600e546103c1565b3480156104d5575f80fd5b506103c16104e4366004613c32565b610ed5565b3480156104f4575f80fd5b5061037d6daaeb6d7670e522a718067333cd4e81565b348015610515575f80fd5b5061033b610524366004613aed565b610eff565b348015610534575f80fd5b5061033b610543366004613c32565b610f24565b348015610553575f80fd5b5061035161102d565b348015610567575f80fd5b506103c1610576366004613a7d565b6110b9565b348015610586575f80fd5b5061033b610595366004613a7d565b611149565b3480156105a5575f80fd5b5061037d6105b4366004613a7d565b611156565b3480156105c4575f80fd5b5061033b6105d3366004613c5e565b61118a565b3480156105e3575f80fd5b506103c16105f2366004613ad2565b61119e565b348015610602575f80fd5b5061033b611222565b348015610616575f80fd5b5061033b610625366004613ccf565b611233565b348015610635575f80fd5b5061037d610644366004613a7d565b6113bc565b348015610654575f80fd5b50600d546001600160a01b031661037d565b348015610671575f80fd5b5061033b6113ea565b348015610685575f80fd5b506103c1601c5481565b34801561069a575f80fd5b50610351611523565b3480156106ae575f80fd5b506103c16106bd366004613ad2565b6001600160a01b03165f9081526011602052604090205490565b3480156106e2575f80fd5b50610351611532565b3480156106f6575f80fd5b5061033b610705366004613c5e565b61153f565b348015610715575f80fd5b5061033b610724366004613d42565b611553565b348015610734575f80fd5b506103c1610743366004613ad2565b611567565b348015610753575f80fd5b5061033b6115ad565b348015610767575f80fd5b5061033b610776366004613d6e565b611657565b348015610786575f80fd5b506103c1610795366004613c32565b61167d565b3480156107a5575f80fd5b506103516107b4366004613a7d565b61171c565b3480156107c4575f80fd5b5061033b6107d3366004613a7d565b611727565b3480156107e3575f80fd5b506103c16107f2366004613ad2565b6001600160a01b03165f9081526010602052604090205490565b348015610817575f80fd5b5061033b611734565b34801561082b575f80fd5b506103c161083a366004613ad2565b6001600160a01b03165f9081526013602052604090205490565b34801561085f575f80fd5b50600f546103c1565b348015610873575f80fd5b50610307610882366004613c32565b611803565b348015610892575f80fd5b5061033b6108a1366004613ad2565b611830565b3480156108b1575f80fd5b5061033b6108c0366004613ad2565b6118a6565b5f6108cf82611949565b92915050565b6108dd611953565b6108e782826119ad565b5050565b6060600280546108fa90613de8565b80601f016020809104026020016040519081016040528092919081815260200182805461092690613de8565b80156109715780601f1061094857610100808354040283529160200191610971565b820191905f5260205f20905b81548152906001019060200180831161095457829003601f168201915b5050505050905090565b5f61098582611aa5565b505f908152600660205260409020546001600160a01b031690565b816109aa81611aca565b6109b48383611b78565b505050565b6109c1611c87565b60656109cc600b5490565b106109f557306040516314671f8b60e21b81526004016109ec9190613a94565b60405180910390fd5b602154421015610a1a573060405163c9bbd13b60e01b81526004016109ec9190613a94565b601c54341015610a3f5730604051636690a80360e11b81526004016109ec9190613a94565b5f601c5434610a4e9190613e2e565b90508015610add576040515f90339083908381818185875af1925050503d805f8114610a95576040519150601f19603f3d011682016040523d82523d5f602084013e610a9a565b606091505b5050905080610adb5760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b60448201526064016109ec565b505b601c54601e5460405133927fbac9694ac0daa55169abd117086fe32c89401d9a3b15dd1d34e55e0aa4e47a9d92610b1c92918252602082015260400190565b60405180910390a2610b2d33611ce0565b50610b386001601b55565b565b6001600160a01b0381165f90815260106020526040902054610b6e5760405162461bcd60e51b81526004016109ec90613e41565b5f610b7882611567565b9050805f03610b995760405162461bcd60e51b81526004016109ec90613e87565b80600f5f828254610baa9190613ed2565b90915550506001600160a01b0382165f908152601160205260409020805482019055610bd68282611da2565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568282604051610c0792919061397f565b60405180910390a15050565b826001600160a01b0381163314610c2d57610c2d33611aca565b610c38848484611eb7565b50505050565b5f8281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610cb15750604080518082019091525f546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610ccf906001600160601b031687613ee5565b610cd99190613f10565b91519350909150505b9250929050565b5f610cf38361119e565b8210610d555760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109ec565b506001600160a01b03919091165f908152600960209081526040808320938352929052205490565b5f828152601a602052604090205482906001600160a01b03163314610df55760405162461bcd60e51b815260206004820152602860248201527f536f75726365206d75737420626520746865206f7261636c65206f6620746865604482015267081c995c5d595cdd60c21b60648201526084016109ec565b5f818152601a602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a25f83815260246020908152604080832054808452602683528184208490558684526025835281842093909355518281527f9b9df81562460abd1a099731bc59d4005ca2ba7716a57d31ddc0b6e0f17a9f75910160405180910390a1610e9c8184611ee8565b6040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a150505050565b6001600160a01b039182165f90815260146020908152604080832093909416825291909152205490565b826001600160a01b0381163314610f1957610f1933611aca565b610c38848484611f6b565b6001600160a01b0381165f90815260106020526040902054610f585760405162461bcd60e51b81526004016109ec90613e41565b5f610f63838361167d565b9050805f03610f845760405162461bcd60e51b81526004016109ec90613e87565b6001600160a01b0383165f9081526013602052604081208054839290610fab908490613ed2565b90915550506001600160a01b038084165f908152601460209081526040808320938616835292905220805482019055610fe5838383611f85565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a838360405161102092919061397f565b60405180910390a2505050565b601f805461103a90613de8565b80601f016020809104026020016040519081016040528092919081815260200182805461106690613de8565b80156110b15780601f10611088576101008083540402835291602001916110b1565b820191905f5260205f20905b81548152906001019060200180831161109457829003601f168201915b505050505081565b5f6110c3600b5490565b82106111265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109ec565b600b828154811061113957611139613f23565b905f5260205f2001549050919050565b611151611953565b602155565b5f818152600460205260408120546001600160a01b0316806108cf5760405162461bcd60e51b81526004016109ec90613f37565b611192611953565b601f6108e78282613fb6565b5f6001600160a01b0382166112075760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016109ec565b506001600160a01b03165f9081526005602052604090205490565b61122a611953565b610b385f611fdb565b61123b611953565b601d5460ff16156112805760405162461bcd60e51b815260206004820152600f60248201526e26b2ba30b230ba3090333937bd32b760891b60448201526064016109ec565b8281146112cf5760405162461bcd60e51b815260206004820152601b60248201527f417272617973206e65656420746f2062652073616d652073697a65000000000060448201526064016109ec565b5f5b838110156113b5576113528585838181106112ee576112ee613f23565b9050602002013584848481811061130757611307613f23565b90506020028101906113199190614071565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611ee892505050565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce785858381811061138557611385613f23565b9050602002013560405161139b91815260200190565b60405180910390a1806113ad816140b3565b9150506112d1565b5050505050565b5f601282815481106113d0576113d0613f23565b5f918252602090912001546001600160a01b031692915050565b6113f2611953565b5f6114056017546001600160a01b031690565b9050806001600160a01b031663a9059cbb33836001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016114439190613a94565b602060405180830381865afa15801561145e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061148291906140cb565b6040518363ffffffff1660e01b815260040161149f92919061397f565b6020604051808303815f875af11580156114bb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114df91906140e2565b6115205760405162461bcd60e51b81526020600482015260126024820152712ab730b13632903a37903a3930b739b332b960711b60448201526064016109ec565b50565b6060600380546108fa90613de8565b6020805461103a90613de8565b611547611953565b60206108e78282613fb6565b8161155d81611aca565b6109b4838361202c565b5f80611572600f5490565b61157c9047613ed2565b90506115a683826115a1866001600160a01b03165f9081526011602052604090205490565b612037565b9392505050565b6115b5611953565b5f5b5f6115c1600b5490565b6115cb9190613ed2565b811015611520575f8181526026602052604090205480158015906115fb57505f8181526025602052604090205442115b15611644576023545f82815260256020526040902054611625918391631ba20ccb60e11b90612074565b5f82815260266020908152604080832083905583835260259091528120555b508061164f816140b3565b9150506115b7565b836001600160a01b03811633146116715761167133611aca565b6113b585858585612140565b6001600160a01b0382165f818152601360205260408082205490516370a0823160e01b8152919283926370a08231906116ba903090600401613a94565b602060405180830381865afa1580156116d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f991906140cb565b6117039190613ed2565b905061171483826115a18787610ed5565b949350505050565b60606108cf82612172565b61172f611953565b602355565b61173c611953565b601d5460ff16156117895760405162461bcd60e51b815260206004820152601760248201527626b2ba30b230ba309030b63932b0b23c90333937bd32b760491b60448201526064016109ec565b601d805460ff191660011790555f5b5f6117a2600b5490565b6117ac9190613ed2565b81101561152057807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572076117de8361171c565b6040516117eb9190613a6b565b60405180910390a26117fc816140b3565b9050611798565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611838611953565b6001600160a01b03811661189d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ec565b61152081611fdb565b6118ae611953565b60656118b9600b5490565b106118d957306040516314671f8b60e21b81526004016109ec9190613a94565b601d54610100900460ff16156119315760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206f6e65207072656d696e7420697320616c6c6f776564000000000060448201526064016109ec565b601d805461ff00191661010017905561152081611ce0565b5f6108cf82612274565b600d546001600160a01b03163314610b385760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109ec565b6127106001600160601b0382161115611a1b5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016109ec565b6001600160a01b038216611a6d5760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b60448201526064016109ec565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b909102175f55565b611aae81612298565b6115205760405162461bcd60e51b81526004016109ec90613f37565b6daaeb6d7670e522a718067333cd4e3b1561152057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b35573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b5991906140e2565b6115205780604051633b79c77360e21b81526004016109ec9190613a94565b5f611b8282611156565b9050806001600160a01b0316836001600160a01b031603611bef5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109ec565b336001600160a01b0382161480611c0b5750611c0b8133611803565b611c7d5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016109ec565b6109b483836122b4565b6002601b5403611cd95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109ec565b6002601b55565b611cec81601e54612321565b611cf8601e548261233a565b50611d8d601e54601f8054611d0c90613de8565b80601f0160208091040260200160405190810160405280929190818152602001828054611d3890613de8565b8015611d835780601f10611d5a57610100808354040283529160200191611d83565b820191905f5260205f20905b815481529060010190602001808311611d6657829003601f168201915b5050505050611ee8565b601e5f8154611d9b906140b3565b9091555050565b80471015611df25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109ec565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611e3b576040519150601f19603f3d011682016040523d82523d5f602084013e611e40565b606091505b50509050806109b45760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109ec565b611ec13382612499565b611edd5760405162461bcd60e51b81526004016109ec906140fd565b6109b48383836124f6565b611ef182612298565b611f545760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016109ec565b5f8281526008602052604090206109b48282613fb6565b6109b483838360405180602001604052805f815250611657565b6109b48363a9059cbb60e01b8484604051602401611fa492919061397f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612665565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6108e7338383612736565b600e546001600160a01b0384165f90815260106020526040812054909183916120609086613ee5565b61206a9190613f10565b6117149190613e2e565b5f848152601a602052604080822080546001600160a01b0319811690915590516001600160a01b039091169186917fe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c59190a2604051636ee4d55360e01b815260048101869052602481018590526001600160e01b031984166044820152606481018390526001600160a01b03821690636ee4d553906084015f604051808303815f87803b158015612123575f80fd5b505af1158015612135573d5f803e3d5ffd5b505050505050505050565b61214a3383612499565b6121665760405162461bcd60e51b81526004016109ec906140fd565b610c38848484846127ff565b606061217d82611aa5565b5f828152600860205260408120805461219590613de8565b80601f01602080910402602001604051908101604052809291908181526020018280546121c190613de8565b801561220c5780601f106121e35761010080835404028352916020019161220c565b820191905f5260205f20905b8154815290600101906020018083116121ef57829003601f168201915b505050505090505f61222860408051602081019091525f815290565b905080515f03612239575092915050565b81511561226b57808260405160200161225392919061414a565b60405160208183030381529060405292505050919050565b61171484612832565b5f6001600160e01b0319821663780e9d6360e01b14806108cf57506108cf826128a1565b5f908152600460205260409020546001600160a01b0316151590565b5f81815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122e882611156565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6108e7828260405180602001604052805f8152506128e0565b5f7f789bf7f3b2714c765ae963ccabd7c22556e02c73d0d35b16831c16e0cd6cee538360405161236c91815260200190565b60405180910390a15f61238960225430633744199660e01b612912565b90506123f36040518060400160405280600381526020016219d95d60ea1b81525060206123b587612937565b6123c9876001600160a01b031660146129c6565b6040516020016123db93929190614178565b60408051601f19818403018152919052839190612b5b565b612447604051806040016040528060048152602001630e0c2e8d60e31b8152506040518060400160405280600b81526020016a1b595d1859185d18555c9b60aa1b81525083612b5b9092919063ffffffff16565b61245381602354612b79565b5f818152602460205260409020859055915061247161012c42613ed2565b5f83815260256020908152604080832093909355958152602690955290932081905592915050565b5f806124a483611156565b9050806001600160a01b0316846001600160a01b031614806124cb57506124cb8185611803565b806117145750836001600160a01b03166124e48461097b565b6001600160a01b031614949350505050565b826001600160a01b031661250982611156565b6001600160a01b03161461252f5760405162461bcd60e51b81526004016109ec9061421f565b6001600160a01b0382166125915760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109ec565b61259e8383836001612b92565b826001600160a01b03166125b182611156565b6001600160a01b0316146125d75760405162461bcd60e51b81526004016109ec9061421f565b5f81815260066020908152604080832080546001600160a01b03199081169091556001600160a01b038781168086526005855283862080545f1901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5f6126b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612b9e9092919063ffffffff16565b8051909150156109b457808060200190518101906126d791906140e2565b6109b45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109ec565b816001600160a01b0316836001600160a01b0316036127935760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016109ec565b6001600160a01b038381165f81815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61280a8484846124f6565b61281684848484612bac565b610c385760405162461bcd60e51b81526004016109ec90614264565b606061283d82611aa5565b5f61285260408051602081019091525f815290565b90505f8151116128705760405180602001604052805f8152506115a6565b8061287a84612937565b60405160200161288b92919061414a565b6040516020818303038152906040529392505050565b5f6001600160e01b031982166380ac58cd60e01b14806128d157506001600160e01b03198216635b5e139f60e01b145b806108cf57506108cf82612ca9565b6128ea8383612cdd565b6128f65f848484612bac565b6109b45760405162461bcd60e51b81526004016109ec90614264565b61291a613932565b612922613932565b61292e81868686612df6565b95945050505050565b60605f61294383612e33565b60010190505f816001600160401b0381111561296157612961613b4b565b6040519080825280601f01601f19166020018201604052801561298b576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461299557509392505050565b60605f6129d4836002613ee5565b6129df906002613ed2565b6001600160401b038111156129f6576129f6613b4b565b6040519080825280601f01601f191660200182016040528015612a20576020820181803683370190505b509050600360fc1b815f81518110612a3a57612a3a613f23565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110612a6857612a68613f23565b60200101906001600160f81b03191690815f1a9053505f612a8a846002613ee5565b612a95906001613ed2565b90505b6001811115612b0c576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612ac957612ac9613f23565b1a60f81b828281518110612adf57612adf613f23565b60200101906001600160f81b03191690815f1a90535060049490941c93612b05816142b6565b9050612a98565b5083156115a65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109ec565b6080830151612b6a9083612f0a565b60808301516109b49082612f0a565b6018545f906115a6906001600160a01b03168484612f21565b610c3884848484612fb2565b606061171484845f856130ea565b5f6001600160a01b0384163b15612c9e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612bef9033908990889088906004016142cb565b6020604051808303815f875af1925050508015612c29575060408051601f3d908101601f19168201909252612c26918101906142fd565b60015b612c84573d808015612c56576040519150601f19603f3d011682016040523d82523d5f602084013e612c5b565b606091505b5080515f03612c7c5760405162461bcd60e51b81526004016109ec90614264565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611714565b506001949350505050565b5f6001600160e01b0319821663152a902d60e11b14806108cf57506301ffc9a760e01b6001600160e01b03198316146108cf565b6001600160a01b038216612d335760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109ec565b612d3c81612298565b15612d595760405162461bcd60e51b81526004016109ec90614318565b612d665f83836001612b92565b612d6f81612298565b15612d8c5760405162461bcd60e51b81526004016109ec90614318565b6001600160a01b0382165f81815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b612dfe613932565b612e0e85608001516101006131c1565b50509183526001600160a01b031660208301526001600160e01b031916604082015290565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e715772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e9d576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612ebb57662386f26fc10000830492506010015b6305f5e1008310612ed3576305f5e100830492506008015b6127108310612ee757612710830492506004015b60648310612ef9576064830492506002015b600a83106108cf5760010192915050565b612f178260038351613218565b6109b4828261331f565b6019545f90612f31816001613ed2565b601955835160408086015160808701515191515f936320214ca360e11b93612f689386938493923092918a9160019160240161434f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050612fa886838684613338565b9695505050505050565b612fbe84848484613491565b600181111561302d5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016109ec565b816001600160a01b0385166130885761308381600b80545f838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b6130ab565b836001600160a01b0316856001600160a01b0316146130ab576130ab8582613517565b6001600160a01b0384166130c7576130c2816135b0565b6113b5565b846001600160a01b0316846001600160a01b0316146113b5576113b58482613657565b60608247101561314b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109ec565b5f80866001600160a01b0316858760405161316691906143b6565b5f6040518083038185875af1925050503d805f81146131a0576040519150601f19603f3d011682016040523d82523d5f602084013e6131a5565b606091505b50915091506131b687838387613699565b979650505050505050565b6131c9613966565b6131d46020836143d1565b156131fc576131e46020836143d1565b6131ef906020613e2e565b6131f99083613ed2565b91505b506020828101829052604080518085525f815290920101905290565b6017816001600160401b03161161323c57610c388360e0600585901b168317613711565b60ff816001600160401b03161161327857613262836018611fe0600586901b1617613711565b50610c38836001600160401b0383166001613728565b61ffff816001600160401b0316116132b55761329f836019611fe0600586901b1617613711565b50610c38836001600160401b0383166002613728565b63ffffffff816001600160401b0316116132f4576132de83601a611fe0600586901b1617613711565b50610c38836001600160401b0383166004613728565b61330983601b611fe0600586901b1617613711565b50610c38836001600160401b0383166008613728565b613327613966565b6115a683845f015151848551613740565b6040516bffffffffffffffffffffffff193060601b166020820152603481018490525f9060540160408051808303601f1901815282825280516020918201205f818152601a90925291812080546001600160a01b0319166001600160a01b038a1617905590925082917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af99190a2601754604051630200057560e51b81526001600160a01b0390911690634000aea0906133f9908890879087906004016143e4565b6020604051808303815f875af1158015613415573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061343991906140e2565b6117145760405162461bcd60e51b815260206004820152602360248201527f756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261604482015262636c6560e81b60648201526084016109ec565b6001811115610c38576001600160a01b038416156134d6576001600160a01b0384165f90815260056020526040812080548392906134d0908490613e2e565b90915550505b6001600160a01b03831615610c38576001600160a01b0383165f908152600560205260408120805483929061350c908490613ed2565b909155505050505050565b5f60016135238461119e565b61352d9190613e2e565b5f838152600a602052604090205490915080821461357e576001600160a01b0384165f9081526009602090815260408083208584528252808320548484528184208190558352600a90915290208190555b505f918252600a602090815260408084208490556001600160a01b039094168352600981528383209183525290812055565b600b545f906135c190600190613e2e565b5f838152600c6020526040812054600b80549394509092849081106135e8576135e8613f23565b905f5260205f200154905080600b838154811061360757613607613f23565b5f918252602080832090910192909255828152600c9091526040808220849055858252812055600b80548061363e5761363e61440a565b600190038181905f5260205f20015f9055905550505050565b5f6136618361119e565b6001600160a01b039093165f9081526009602090815260408083208684528252808320859055938252600a9052919091209190915550565b606083156137075782515f03613700576001600160a01b0385163b6137005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109ec565b5081611714565b611714838361381a565b613719613966565b6115a683845f01515184613844565b613730613966565b61171484855f0151518585613892565b613748613966565b8251821115613755575f80fd5b60208501516137648386613ed2565b11156137975761379785613787876020015187866137829190613ed2565b613905565b613792906002613ee5565b61391b565b5f808651805187602083010193508088870111156137b55787860182525b505050602084015b602084106137f557805182526137d4602083613ed2565b91506137e1602082613ed2565b90506137ee602085613e2e565b93506137bd565b5181515f1960208690036101000a019081169019919091161790525083949350505050565b81511561382a5781518083602001fd5b8060405162461bcd60e51b81526004016109ec9190613a6b565b61384c613966565b8360200151831061386c5761386c84856020015160026137929190613ee5565b8351805160208583010184815350808503613888576001810182525b5093949350505050565b61389a613966565b60208501516138a98584613ed2565b11156138bd576138bd856137878685613ed2565b5f60016138cc846101006144fe565b6138d69190613e2e565b90508551838682010185831982511617815250805184870111156138fa5783860181525b509495945050505050565b5f818311156139155750816108cf565b50919050565b815161392783836131c1565b50610c38838261331f565b6040805160a0810182525f80825260208201819052918101829052606081019190915260808101613961613966565b905290565b6040518060400160405280606081526020015f81525090565b6001600160a01b03929092168252602082015260400190565b6001600160e01b031981168114611520575f80fd5b5f602082840312156139bd575f80fd5b81356115a681613998565b6001600160a01b0381168114611520575f80fd5b5f80604083850312156139ed575f80fd5b82356139f8816139c8565b915060208301356001600160601b0381168114613a13575f80fd5b809150509250929050565b5f5b83811015613a38578181015183820152602001613a20565b50505f910152565b5f8151808452613a57816020860160208601613a1e565b601f01601f19169290920160200192915050565b602081525f6115a66020830184613a40565b5f60208284031215613a8d575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f8060408385031215613ab9575f80fd5b8235613ac4816139c8565b946020939093013593505050565b5f60208284031215613ae2575f80fd5b81356115a6816139c8565b5f805f60608486031215613aff575f80fd5b8335613b0a816139c8565b92506020840135613b1a816139c8565b929592945050506040919091013590565b5f8060408385031215613b3c575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b0380841115613b7857613b78613b4b565b604051601f8501601f19908116603f01168101908282118183101715613ba057613ba0613b4b565b81604052809350858152868686011115613bb8575f80fd5b858560208301375f602087830101525050509392505050565b5f82601f830112613be0575f80fd5b6115a683833560208501613b5f565b5f8060408385031215613c00575f80fd5b8235915060208301356001600160401b03811115613c1c575f80fd5b613c2885828601613bd1565b9150509250929050565b5f8060408385031215613c43575f80fd5b8235613c4e816139c8565b91506020830135613a13816139c8565b5f60208284031215613c6e575f80fd5b81356001600160401b03811115613c83575f80fd5b61171484828501613bd1565b5f8083601f840112613c9f575f80fd5b5081356001600160401b03811115613cb5575f80fd5b6020830191508360208260051b8501011115610ce2575f80fd5b5f805f8060408587031215613ce2575f80fd5b84356001600160401b0380821115613cf8575f80fd5b613d0488838901613c8f565b90965094506020870135915080821115613d1c575f80fd5b50613d2987828801613c8f565b95989497509550505050565b8015158114611520575f80fd5b5f8060408385031215613d53575f80fd5b8235613d5e816139c8565b91506020830135613a1381613d35565b5f805f8060808587031215613d81575f80fd5b8435613d8c816139c8565b93506020850135613d9c816139c8565b92506040850135915060608501356001600160401b03811115613dbd575f80fd5b8501601f81018713613dcd575f80fd5b613ddc87823560208401613b5f565b91505092959194509250565b600181811c90821680613dfc57607f821691505b60208210810361391557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156108cf576108cf613e1a565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b808201808211156108cf576108cf613e1a565b80820281158282048414176108cf576108cf613e1a565b634e487b7160e01b5f52601260045260245ffd5b5f82613f1e57613f1e613efc565b500490565b634e487b7160e01b5f52603260045260245ffd5b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b601f8211156109b4575f81815260208120601f850160051c81016020861015613f8f5750805b601f850160051c820191505b81811015613fae57828155600101613f9b565b505050505050565b81516001600160401b03811115613fcf57613fcf613b4b565b613fe381613fdd8454613de8565b84613f69565b602080601f831160018114614016575f8415613fff5750858301515b5f19600386901b1c1916600185901b178555613fae565b5f85815260208120601f198616915b8281101561404457888601518255948401946001909101908401614025565b508582101561406157878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f808335601e19843603018112614086575f80fd5b8301803591506001600160401b0382111561409f575f80fd5b602001915036819003821315610ce2575f80fd5b5f600182016140c4576140c4613e1a565b5060010190565b5f602082840312156140db575f80fd5b5051919050565b5f602082840312156140f2575f80fd5b81516115a681613d35565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b5f835161415b818460208801613a1e565b83519083019061416f818360208801613a1e565b01949350505050565b5f80855461418581613de8565b6001828116801561419d57600181146141b2576141de565b60ff19841687528215158302870194506141de565b895f526020805f205f5b858110156141d55781548a8201529084019082016141bc565b50505082870194505b50875192506141f1838560208b01613a1e565b602f60f81b939092019283528551916142108382860160208a01613a1e565b91909201019695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b5f816142c4576142c4613e1a565b505f190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90612fa890830184613a40565b5f6020828403121561430d575f80fd5b81516115a681613998565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e082018190525f906143a783820185613a40565b9b9a5050505050505050505050565b5f82516143c7818460208701613a1e565b9190910192915050565b5f826143df576143df613efc565b500690565b60018060a01b0384168152826020820152606060408201525f61292e6060830184613a40565b634e487b7160e01b5f52603160045260245ffd5b600181815b8085111561445857815f190482111561443e5761443e613e1a565b8085161561444b57918102915b93841c9390800290614423565b509250929050565b5f8261446e575060016108cf565b8161447a57505f6108cf565b8160018114614490576002811461449a576144b6565b60019150506108cf565b60ff8411156144ab576144ab613e1a565b50506001821b6108cf565b5060208310610133831016604e8410600b84101617156144d9575081810a6108cf565b6144e3838361441e565b805f19048211156144f6576144f6613e1a565b029392505050565b5f6115a6838361446056fea26469706673582212200f29bdcfa2fe9097b0cfdb22fd4f3070bf64a6207fb94220c1906183b56a531564736f6c6343000814003300000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000064b6d320000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a00000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000340000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000001db329cde457d68b872766f4e12f9532bca9149b38376131613564396239333634386635613966633930666538303336383561350000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000044c6f70650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034a50410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f774e5570694b38705361496f5541776855417a6855344b374657576b706f6e507343415f5538706759624d00000000000000000000000000000000000000000000000000000000000000003968747470733a2f2f6a656e6e692e737461626c652d64696c7574696f6e2e6172742f6e66742f6974656d2f67656e65726174696f6e2f31342f000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a0000000000000000000000002531896dfb32418babf6c57edd40f8ee53c0f23600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003c
Deployed Bytecode
0x6080604052600436106102a4575f3560e01c806370a0823111610160578063a3f8eace116100c9578063ce7c2ac211610083578063ce7c2ac2146107d8578063d111515d1461080c578063d79779b214610820578063e33b7de314610854578063e985e9c514610868578063f2fde38b14610887578063fd955ed9146108a6575f80fd5b8063a3f8eace14610729578063aeb7c35714610748578063b88d4fde1461075c578063c45ac0501461077b578063c87b56dd1461079a578063cd8ff657146107b9575f80fd5b806395acfa271161011a57806395acfa271461067a57806395d89b411461068f5780639852595c146106a35780639abc8320146106d7578063a0bcfc7f146106eb578063a22cb4651461070a575f80fd5b806370a08231146105d8578063715018a6146105f75780637fad2d121461060b5780638b83209b1461062a5780638da5cb5b146106495780638dc654a214610666575f80fd5b80632f745c591161020d57806342842e0e116101c757806342842e0e1461050a57806348b75044146105295780634cf5f7a4146105485780634f6ccce71461055c578063525f8a5c1461057b5780636352211e1461059a5780636afd4ba2146105b9575f80fd5b80632f745c591461046457806332cb6b0c1461048357806337441996146104975780633a98ef39146104b6578063406072a9146104ca57806341f43434146104e9575f80fd5b806318160ddd1161025e57806318160ddd146103b157806319165587146103cf5780631cbaee2d146103ee57806323b872dd1461040357806325cb5bc0146104225780632a55205a14610437575f80fd5b806301ffc9a7146102e857806304634d8d1461031c57806306fdde031461033d578063081812fc1461035e578063095ea7b31461038a5780631249c58b146103a9575f80fd5b366102e4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102da92919061397f565b60405180910390a1005b5f80fd5b3480156102f3575f80fd5b506103076103023660046139ad565b6108c5565b60405190151581526020015b60405180910390f35b348015610327575f80fd5b5061033b6103363660046139dc565b6108d5565b005b348015610348575f80fd5b506103516108eb565b6040516103139190613a6b565b348015610369575f80fd5b5061037d610378366004613a7d565b61097b565b6040516103139190613a94565b348015610395575f80fd5b5061033b6103a4366004613aa8565b6109a0565b61033b6109b9565b3480156103bc575f80fd5b50600b545b604051908152602001610313565b3480156103da575f80fd5b5061033b6103e9366004613ad2565b610b3a565b3480156103f9575f80fd5b506103c160215481565b34801561040e575f80fd5b5061033b61041d366004613aed565b610c13565b34801561042d575f80fd5b506103c161012c81565b348015610442575f80fd5b50610456610451366004613b2b565b610c3e565b60405161031392919061397f565b34801561046f575f80fd5b506103c161047e366004613aa8565b610ce9565b34801561048e575f80fd5b506103c1606581565b3480156104a2575f80fd5b5061033b6104b1366004613bef565b610d7d565b3480156104c1575f80fd5b50600e546103c1565b3480156104d5575f80fd5b506103c16104e4366004613c32565b610ed5565b3480156104f4575f80fd5b5061037d6daaeb6d7670e522a718067333cd4e81565b348015610515575f80fd5b5061033b610524366004613aed565b610eff565b348015610534575f80fd5b5061033b610543366004613c32565b610f24565b348015610553575f80fd5b5061035161102d565b348015610567575f80fd5b506103c1610576366004613a7d565b6110b9565b348015610586575f80fd5b5061033b610595366004613a7d565b611149565b3480156105a5575f80fd5b5061037d6105b4366004613a7d565b611156565b3480156105c4575f80fd5b5061033b6105d3366004613c5e565b61118a565b3480156105e3575f80fd5b506103c16105f2366004613ad2565b61119e565b348015610602575f80fd5b5061033b611222565b348015610616575f80fd5b5061033b610625366004613ccf565b611233565b348015610635575f80fd5b5061037d610644366004613a7d565b6113bc565b348015610654575f80fd5b50600d546001600160a01b031661037d565b348015610671575f80fd5b5061033b6113ea565b348015610685575f80fd5b506103c1601c5481565b34801561069a575f80fd5b50610351611523565b3480156106ae575f80fd5b506103c16106bd366004613ad2565b6001600160a01b03165f9081526011602052604090205490565b3480156106e2575f80fd5b50610351611532565b3480156106f6575f80fd5b5061033b610705366004613c5e565b61153f565b348015610715575f80fd5b5061033b610724366004613d42565b611553565b348015610734575f80fd5b506103c1610743366004613ad2565b611567565b348015610753575f80fd5b5061033b6115ad565b348015610767575f80fd5b5061033b610776366004613d6e565b611657565b348015610786575f80fd5b506103c1610795366004613c32565b61167d565b3480156107a5575f80fd5b506103516107b4366004613a7d565b61171c565b3480156107c4575f80fd5b5061033b6107d3366004613a7d565b611727565b3480156107e3575f80fd5b506103c16107f2366004613ad2565b6001600160a01b03165f9081526010602052604090205490565b348015610817575f80fd5b5061033b611734565b34801561082b575f80fd5b506103c161083a366004613ad2565b6001600160a01b03165f9081526013602052604090205490565b34801561085f575f80fd5b50600f546103c1565b348015610873575f80fd5b50610307610882366004613c32565b611803565b348015610892575f80fd5b5061033b6108a1366004613ad2565b611830565b3480156108b1575f80fd5b5061033b6108c0366004613ad2565b6118a6565b5f6108cf82611949565b92915050565b6108dd611953565b6108e782826119ad565b5050565b6060600280546108fa90613de8565b80601f016020809104026020016040519081016040528092919081815260200182805461092690613de8565b80156109715780601f1061094857610100808354040283529160200191610971565b820191905f5260205f20905b81548152906001019060200180831161095457829003601f168201915b5050505050905090565b5f61098582611aa5565b505f908152600660205260409020546001600160a01b031690565b816109aa81611aca565b6109b48383611b78565b505050565b6109c1611c87565b60656109cc600b5490565b106109f557306040516314671f8b60e21b81526004016109ec9190613a94565b60405180910390fd5b602154421015610a1a573060405163c9bbd13b60e01b81526004016109ec9190613a94565b601c54341015610a3f5730604051636690a80360e11b81526004016109ec9190613a94565b5f601c5434610a4e9190613e2e565b90508015610add576040515f90339083908381818185875af1925050503d805f8114610a95576040519150601f19603f3d011682016040523d82523d5f602084013e610a9a565b606091505b5050905080610adb5760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b60448201526064016109ec565b505b601c54601e5460405133927fbac9694ac0daa55169abd117086fe32c89401d9a3b15dd1d34e55e0aa4e47a9d92610b1c92918252602082015260400190565b60405180910390a2610b2d33611ce0565b50610b386001601b55565b565b6001600160a01b0381165f90815260106020526040902054610b6e5760405162461bcd60e51b81526004016109ec90613e41565b5f610b7882611567565b9050805f03610b995760405162461bcd60e51b81526004016109ec90613e87565b80600f5f828254610baa9190613ed2565b90915550506001600160a01b0382165f908152601160205260409020805482019055610bd68282611da2565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568282604051610c0792919061397f565b60405180910390a15050565b826001600160a01b0381163314610c2d57610c2d33611aca565b610c38848484611eb7565b50505050565b5f8281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610cb15750604080518082019091525f546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610ccf906001600160601b031687613ee5565b610cd99190613f10565b91519350909150505b9250929050565b5f610cf38361119e565b8210610d555760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109ec565b506001600160a01b03919091165f908152600960209081526040808320938352929052205490565b5f828152601a602052604090205482906001600160a01b03163314610df55760405162461bcd60e51b815260206004820152602860248201527f536f75726365206d75737420626520746865206f7261636c65206f6620746865604482015267081c995c5d595cdd60c21b60648201526084016109ec565b5f818152601a602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a25f83815260246020908152604080832054808452602683528184208490558684526025835281842093909355518281527f9b9df81562460abd1a099731bc59d4005ca2ba7716a57d31ddc0b6e0f17a9f75910160405180910390a1610e9c8184611ee8565b6040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a150505050565b6001600160a01b039182165f90815260146020908152604080832093909416825291909152205490565b826001600160a01b0381163314610f1957610f1933611aca565b610c38848484611f6b565b6001600160a01b0381165f90815260106020526040902054610f585760405162461bcd60e51b81526004016109ec90613e41565b5f610f63838361167d565b9050805f03610f845760405162461bcd60e51b81526004016109ec90613e87565b6001600160a01b0383165f9081526013602052604081208054839290610fab908490613ed2565b90915550506001600160a01b038084165f908152601460209081526040808320938616835292905220805482019055610fe5838383611f85565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a838360405161102092919061397f565b60405180910390a2505050565b601f805461103a90613de8565b80601f016020809104026020016040519081016040528092919081815260200182805461106690613de8565b80156110b15780601f10611088576101008083540402835291602001916110b1565b820191905f5260205f20905b81548152906001019060200180831161109457829003601f168201915b505050505081565b5f6110c3600b5490565b82106111265760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109ec565b600b828154811061113957611139613f23565b905f5260205f2001549050919050565b611151611953565b602155565b5f818152600460205260408120546001600160a01b0316806108cf5760405162461bcd60e51b81526004016109ec90613f37565b611192611953565b601f6108e78282613fb6565b5f6001600160a01b0382166112075760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016109ec565b506001600160a01b03165f9081526005602052604090205490565b61122a611953565b610b385f611fdb565b61123b611953565b601d5460ff16156112805760405162461bcd60e51b815260206004820152600f60248201526e26b2ba30b230ba3090333937bd32b760891b60448201526064016109ec565b8281146112cf5760405162461bcd60e51b815260206004820152601b60248201527f417272617973206e65656420746f2062652073616d652073697a65000000000060448201526064016109ec565b5f5b838110156113b5576113528585838181106112ee576112ee613f23565b9050602002013584848481811061130757611307613f23565b90506020028101906113199190614071565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611ee892505050565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce785858381811061138557611385613f23565b9050602002013560405161139b91815260200190565b60405180910390a1806113ad816140b3565b9150506112d1565b5050505050565b5f601282815481106113d0576113d0613f23565b5f918252602090912001546001600160a01b031692915050565b6113f2611953565b5f6114056017546001600160a01b031690565b9050806001600160a01b031663a9059cbb33836001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016114439190613a94565b602060405180830381865afa15801561145e573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061148291906140cb565b6040518363ffffffff1660e01b815260040161149f92919061397f565b6020604051808303815f875af11580156114bb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114df91906140e2565b6115205760405162461bcd60e51b81526020600482015260126024820152712ab730b13632903a37903a3930b739b332b960711b60448201526064016109ec565b50565b6060600380546108fa90613de8565b6020805461103a90613de8565b611547611953565b60206108e78282613fb6565b8161155d81611aca565b6109b4838361202c565b5f80611572600f5490565b61157c9047613ed2565b90506115a683826115a1866001600160a01b03165f9081526011602052604090205490565b612037565b9392505050565b6115b5611953565b5f5b5f6115c1600b5490565b6115cb9190613ed2565b811015611520575f8181526026602052604090205480158015906115fb57505f8181526025602052604090205442115b15611644576023545f82815260256020526040902054611625918391631ba20ccb60e11b90612074565b5f82815260266020908152604080832083905583835260259091528120555b508061164f816140b3565b9150506115b7565b836001600160a01b03811633146116715761167133611aca565b6113b585858585612140565b6001600160a01b0382165f818152601360205260408082205490516370a0823160e01b8152919283926370a08231906116ba903090600401613a94565b602060405180830381865afa1580156116d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f991906140cb565b6117039190613ed2565b905061171483826115a18787610ed5565b949350505050565b60606108cf82612172565b61172f611953565b602355565b61173c611953565b601d5460ff16156117895760405162461bcd60e51b815260206004820152601760248201527626b2ba30b230ba309030b63932b0b23c90333937bd32b760491b60448201526064016109ec565b601d805460ff191660011790555f5b5f6117a2600b5490565b6117ac9190613ed2565b81101561152057807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572076117de8361171c565b6040516117eb9190613a6b565b60405180910390a26117fc816140b3565b9050611798565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611838611953565b6001600160a01b03811661189d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ec565b61152081611fdb565b6118ae611953565b60656118b9600b5490565b106118d957306040516314671f8b60e21b81526004016109ec9190613a94565b601d54610100900460ff16156119315760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206f6e65207072656d696e7420697320616c6c6f776564000000000060448201526064016109ec565b601d805461ff00191661010017905561152081611ce0565b5f6108cf82612274565b600d546001600160a01b03163314610b385760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109ec565b6127106001600160601b0382161115611a1b5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016109ec565b6001600160a01b038216611a6d5760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b60448201526064016109ec565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b909102175f55565b611aae81612298565b6115205760405162461bcd60e51b81526004016109ec90613f37565b6daaeb6d7670e522a718067333cd4e3b1561152057604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b35573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b5991906140e2565b6115205780604051633b79c77360e21b81526004016109ec9190613a94565b5f611b8282611156565b9050806001600160a01b0316836001600160a01b031603611bef5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109ec565b336001600160a01b0382161480611c0b5750611c0b8133611803565b611c7d5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016109ec565b6109b483836122b4565b6002601b5403611cd95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109ec565b6002601b55565b611cec81601e54612321565b611cf8601e548261233a565b50611d8d601e54601f8054611d0c90613de8565b80601f0160208091040260200160405190810160405280929190818152602001828054611d3890613de8565b8015611d835780601f10611d5a57610100808354040283529160200191611d83565b820191905f5260205f20905b815481529060010190602001808311611d6657829003601f168201915b5050505050611ee8565b601e5f8154611d9b906140b3565b9091555050565b80471015611df25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109ec565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611e3b576040519150601f19603f3d011682016040523d82523d5f602084013e611e40565b606091505b50509050806109b45760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109ec565b611ec13382612499565b611edd5760405162461bcd60e51b81526004016109ec906140fd565b6109b48383836124f6565b611ef182612298565b611f545760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016109ec565b5f8281526008602052604090206109b48282613fb6565b6109b483838360405180602001604052805f815250611657565b6109b48363a9059cbb60e01b8484604051602401611fa492919061397f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612665565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6108e7338383612736565b600e546001600160a01b0384165f90815260106020526040812054909183916120609086613ee5565b61206a9190613f10565b6117149190613e2e565b5f848152601a602052604080822080546001600160a01b0319811690915590516001600160a01b039091169186917fe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c59190a2604051636ee4d55360e01b815260048101869052602481018590526001600160e01b031984166044820152606481018390526001600160a01b03821690636ee4d553906084015f604051808303815f87803b158015612123575f80fd5b505af1158015612135573d5f803e3d5ffd5b505050505050505050565b61214a3383612499565b6121665760405162461bcd60e51b81526004016109ec906140fd565b610c38848484846127ff565b606061217d82611aa5565b5f828152600860205260408120805461219590613de8565b80601f01602080910402602001604051908101604052809291908181526020018280546121c190613de8565b801561220c5780601f106121e35761010080835404028352916020019161220c565b820191905f5260205f20905b8154815290600101906020018083116121ef57829003601f168201915b505050505090505f61222860408051602081019091525f815290565b905080515f03612239575092915050565b81511561226b57808260405160200161225392919061414a565b60405160208183030381529060405292505050919050565b61171484612832565b5f6001600160e01b0319821663780e9d6360e01b14806108cf57506108cf826128a1565b5f908152600460205260409020546001600160a01b0316151590565b5f81815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122e882611156565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6108e7828260405180602001604052805f8152506128e0565b5f7f789bf7f3b2714c765ae963ccabd7c22556e02c73d0d35b16831c16e0cd6cee538360405161236c91815260200190565b60405180910390a15f61238960225430633744199660e01b612912565b90506123f36040518060400160405280600381526020016219d95d60ea1b81525060206123b587612937565b6123c9876001600160a01b031660146129c6565b6040516020016123db93929190614178565b60408051601f19818403018152919052839190612b5b565b612447604051806040016040528060048152602001630e0c2e8d60e31b8152506040518060400160405280600b81526020016a1b595d1859185d18555c9b60aa1b81525083612b5b9092919063ffffffff16565b61245381602354612b79565b5f818152602460205260409020859055915061247161012c42613ed2565b5f83815260256020908152604080832093909355958152602690955290932081905592915050565b5f806124a483611156565b9050806001600160a01b0316846001600160a01b031614806124cb57506124cb8185611803565b806117145750836001600160a01b03166124e48461097b565b6001600160a01b031614949350505050565b826001600160a01b031661250982611156565b6001600160a01b03161461252f5760405162461bcd60e51b81526004016109ec9061421f565b6001600160a01b0382166125915760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109ec565b61259e8383836001612b92565b826001600160a01b03166125b182611156565b6001600160a01b0316146125d75760405162461bcd60e51b81526004016109ec9061421f565b5f81815260066020908152604080832080546001600160a01b03199081169091556001600160a01b038781168086526005855283862080545f1901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5f6126b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612b9e9092919063ffffffff16565b8051909150156109b457808060200190518101906126d791906140e2565b6109b45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109ec565b816001600160a01b0316836001600160a01b0316036127935760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016109ec565b6001600160a01b038381165f81815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61280a8484846124f6565b61281684848484612bac565b610c385760405162461bcd60e51b81526004016109ec90614264565b606061283d82611aa5565b5f61285260408051602081019091525f815290565b90505f8151116128705760405180602001604052805f8152506115a6565b8061287a84612937565b60405160200161288b92919061414a565b6040516020818303038152906040529392505050565b5f6001600160e01b031982166380ac58cd60e01b14806128d157506001600160e01b03198216635b5e139f60e01b145b806108cf57506108cf82612ca9565b6128ea8383612cdd565b6128f65f848484612bac565b6109b45760405162461bcd60e51b81526004016109ec90614264565b61291a613932565b612922613932565b61292e81868686612df6565b95945050505050565b60605f61294383612e33565b60010190505f816001600160401b0381111561296157612961613b4b565b6040519080825280601f01601f19166020018201604052801561298b576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461299557509392505050565b60605f6129d4836002613ee5565b6129df906002613ed2565b6001600160401b038111156129f6576129f6613b4b565b6040519080825280601f01601f191660200182016040528015612a20576020820181803683370190505b509050600360fc1b815f81518110612a3a57612a3a613f23565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110612a6857612a68613f23565b60200101906001600160f81b03191690815f1a9053505f612a8a846002613ee5565b612a95906001613ed2565b90505b6001811115612b0c576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612ac957612ac9613f23565b1a60f81b828281518110612adf57612adf613f23565b60200101906001600160f81b03191690815f1a90535060049490941c93612b05816142b6565b9050612a98565b5083156115a65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109ec565b6080830151612b6a9083612f0a565b60808301516109b49082612f0a565b6018545f906115a6906001600160a01b03168484612f21565b610c3884848484612fb2565b606061171484845f856130ea565b5f6001600160a01b0384163b15612c9e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612bef9033908990889088906004016142cb565b6020604051808303815f875af1925050508015612c29575060408051601f3d908101601f19168201909252612c26918101906142fd565b60015b612c84573d808015612c56576040519150601f19603f3d011682016040523d82523d5f602084013e612c5b565b606091505b5080515f03612c7c5760405162461bcd60e51b81526004016109ec90614264565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611714565b506001949350505050565b5f6001600160e01b0319821663152a902d60e11b14806108cf57506301ffc9a760e01b6001600160e01b03198316146108cf565b6001600160a01b038216612d335760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109ec565b612d3c81612298565b15612d595760405162461bcd60e51b81526004016109ec90614318565b612d665f83836001612b92565b612d6f81612298565b15612d8c5760405162461bcd60e51b81526004016109ec90614318565b6001600160a01b0382165f81815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b612dfe613932565b612e0e85608001516101006131c1565b50509183526001600160a01b031660208301526001600160e01b031916604082015290565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e715772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e9d576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612ebb57662386f26fc10000830492506010015b6305f5e1008310612ed3576305f5e100830492506008015b6127108310612ee757612710830492506004015b60648310612ef9576064830492506002015b600a83106108cf5760010192915050565b612f178260038351613218565b6109b4828261331f565b6019545f90612f31816001613ed2565b601955835160408086015160808701515191515f936320214ca360e11b93612f689386938493923092918a9160019160240161434f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091529050612fa886838684613338565b9695505050505050565b612fbe84848484613491565b600181111561302d5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016109ec565b816001600160a01b0385166130885761308381600b80545f838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b6130ab565b836001600160a01b0316856001600160a01b0316146130ab576130ab8582613517565b6001600160a01b0384166130c7576130c2816135b0565b6113b5565b846001600160a01b0316846001600160a01b0316146113b5576113b58482613657565b60608247101561314b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109ec565b5f80866001600160a01b0316858760405161316691906143b6565b5f6040518083038185875af1925050503d805f81146131a0576040519150601f19603f3d011682016040523d82523d5f602084013e6131a5565b606091505b50915091506131b687838387613699565b979650505050505050565b6131c9613966565b6131d46020836143d1565b156131fc576131e46020836143d1565b6131ef906020613e2e565b6131f99083613ed2565b91505b506020828101829052604080518085525f815290920101905290565b6017816001600160401b03161161323c57610c388360e0600585901b168317613711565b60ff816001600160401b03161161327857613262836018611fe0600586901b1617613711565b50610c38836001600160401b0383166001613728565b61ffff816001600160401b0316116132b55761329f836019611fe0600586901b1617613711565b50610c38836001600160401b0383166002613728565b63ffffffff816001600160401b0316116132f4576132de83601a611fe0600586901b1617613711565b50610c38836001600160401b0383166004613728565b61330983601b611fe0600586901b1617613711565b50610c38836001600160401b0383166008613728565b613327613966565b6115a683845f015151848551613740565b6040516bffffffffffffffffffffffff193060601b166020820152603481018490525f9060540160408051808303601f1901815282825280516020918201205f818152601a90925291812080546001600160a01b0319166001600160a01b038a1617905590925082917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af99190a2601754604051630200057560e51b81526001600160a01b0390911690634000aea0906133f9908890879087906004016143e4565b6020604051808303815f875af1158015613415573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061343991906140e2565b6117145760405162461bcd60e51b815260206004820152602360248201527f756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261604482015262636c6560e81b60648201526084016109ec565b6001811115610c38576001600160a01b038416156134d6576001600160a01b0384165f90815260056020526040812080548392906134d0908490613e2e565b90915550505b6001600160a01b03831615610c38576001600160a01b0383165f908152600560205260408120805483929061350c908490613ed2565b909155505050505050565b5f60016135238461119e565b61352d9190613e2e565b5f838152600a602052604090205490915080821461357e576001600160a01b0384165f9081526009602090815260408083208584528252808320548484528184208190558352600a90915290208190555b505f918252600a602090815260408084208490556001600160a01b039094168352600981528383209183525290812055565b600b545f906135c190600190613e2e565b5f838152600c6020526040812054600b80549394509092849081106135e8576135e8613f23565b905f5260205f200154905080600b838154811061360757613607613f23565b5f918252602080832090910192909255828152600c9091526040808220849055858252812055600b80548061363e5761363e61440a565b600190038181905f5260205f20015f9055905550505050565b5f6136618361119e565b6001600160a01b039093165f9081526009602090815260408083208684528252808320859055938252600a9052919091209190915550565b606083156137075782515f03613700576001600160a01b0385163b6137005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109ec565b5081611714565b611714838361381a565b613719613966565b6115a683845f01515184613844565b613730613966565b61171484855f0151518585613892565b613748613966565b8251821115613755575f80fd5b60208501516137648386613ed2565b11156137975761379785613787876020015187866137829190613ed2565b613905565b613792906002613ee5565b61391b565b5f808651805187602083010193508088870111156137b55787860182525b505050602084015b602084106137f557805182526137d4602083613ed2565b91506137e1602082613ed2565b90506137ee602085613e2e565b93506137bd565b5181515f1960208690036101000a019081169019919091161790525083949350505050565b81511561382a5781518083602001fd5b8060405162461bcd60e51b81526004016109ec9190613a6b565b61384c613966565b8360200151831061386c5761386c84856020015160026137929190613ee5565b8351805160208583010184815350808503613888576001810182525b5093949350505050565b61389a613966565b60208501516138a98584613ed2565b11156138bd576138bd856137878685613ed2565b5f60016138cc846101006144fe565b6138d69190613e2e565b90508551838682010185831982511617815250805184870111156138fa5783860181525b509495945050505050565b5f818311156139155750816108cf565b50919050565b815161392783836131c1565b50610c38838261331f565b6040805160a0810182525f80825260208201819052918101829052606081019190915260808101613961613966565b905290565b6040518060400160405280606081526020015f81525090565b6001600160a01b03929092168252602082015260400190565b6001600160e01b031981168114611520575f80fd5b5f602082840312156139bd575f80fd5b81356115a681613998565b6001600160a01b0381168114611520575f80fd5b5f80604083850312156139ed575f80fd5b82356139f8816139c8565b915060208301356001600160601b0381168114613a13575f80fd5b809150509250929050565b5f5b83811015613a38578181015183820152602001613a20565b50505f910152565b5f8151808452613a57816020860160208601613a1e565b601f01601f19169290920160200192915050565b602081525f6115a66020830184613a40565b5f60208284031215613a8d575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f8060408385031215613ab9575f80fd5b8235613ac4816139c8565b946020939093013593505050565b5f60208284031215613ae2575f80fd5b81356115a6816139c8565b5f805f60608486031215613aff575f80fd5b8335613b0a816139c8565b92506020840135613b1a816139c8565b929592945050506040919091013590565b5f8060408385031215613b3c575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b0380841115613b7857613b78613b4b565b604051601f8501601f19908116603f01168101908282118183101715613ba057613ba0613b4b565b81604052809350858152868686011115613bb8575f80fd5b858560208301375f602087830101525050509392505050565b5f82601f830112613be0575f80fd5b6115a683833560208501613b5f565b5f8060408385031215613c00575f80fd5b8235915060208301356001600160401b03811115613c1c575f80fd5b613c2885828601613bd1565b9150509250929050565b5f8060408385031215613c43575f80fd5b8235613c4e816139c8565b91506020830135613a13816139c8565b5f60208284031215613c6e575f80fd5b81356001600160401b03811115613c83575f80fd5b61171484828501613bd1565b5f8083601f840112613c9f575f80fd5b5081356001600160401b03811115613cb5575f80fd5b6020830191508360208260051b8501011115610ce2575f80fd5b5f805f8060408587031215613ce2575f80fd5b84356001600160401b0380821115613cf8575f80fd5b613d0488838901613c8f565b90965094506020870135915080821115613d1c575f80fd5b50613d2987828801613c8f565b95989497509550505050565b8015158114611520575f80fd5b5f8060408385031215613d53575f80fd5b8235613d5e816139c8565b91506020830135613a1381613d35565b5f805f8060808587031215613d81575f80fd5b8435613d8c816139c8565b93506020850135613d9c816139c8565b92506040850135915060608501356001600160401b03811115613dbd575f80fd5b8501601f81018713613dcd575f80fd5b613ddc87823560208401613b5f565b91505092959194509250565b600181811c90821680613dfc57607f821691505b60208210810361391557634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156108cf576108cf613e1a565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b808201808211156108cf576108cf613e1a565b80820281158282048414176108cf576108cf613e1a565b634e487b7160e01b5f52601260045260245ffd5b5f82613f1e57613f1e613efc565b500490565b634e487b7160e01b5f52603260045260245ffd5b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b601f8211156109b4575f81815260208120601f850160051c81016020861015613f8f5750805b601f850160051c820191505b81811015613fae57828155600101613f9b565b505050505050565b81516001600160401b03811115613fcf57613fcf613b4b565b613fe381613fdd8454613de8565b84613f69565b602080601f831160018114614016575f8415613fff5750858301515b5f19600386901b1c1916600185901b178555613fae565b5f85815260208120601f198616915b8281101561404457888601518255948401946001909101908401614025565b508582101561406157878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f808335601e19843603018112614086575f80fd5b8301803591506001600160401b0382111561409f575f80fd5b602001915036819003821315610ce2575f80fd5b5f600182016140c4576140c4613e1a565b5060010190565b5f602082840312156140db575f80fd5b5051919050565b5f602082840312156140f2575f80fd5b81516115a681613d35565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b5f835161415b818460208801613a1e565b83519083019061416f818360208801613a1e565b01949350505050565b5f80855461418581613de8565b6001828116801561419d57600181146141b2576141de565b60ff19841687528215158302870194506141de565b895f526020805f205f5b858110156141d55781548a8201529084019082016141bc565b50505082870194505b50875192506141f1838560208b01613a1e565b602f60f81b939092019283528551916142108382860160208a01613a1e565b91909201019695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b5f816142c4576142c4613e1a565b505f190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90612fa890830184613a40565b5f6020828403121561430d575f80fd5b81516115a681613998565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e082018190525f906143a783820185613a40565b9b9a5050505050505050505050565b5f82516143c7818460208701613a1e565b9190910192915050565b5f826143df576143df613efc565b500690565b60018060a01b0384168152826020820152606060408201525f61292e6060830184613a40565b634e487b7160e01b5f52603160045260245ffd5b600181815b8085111561445857815f190482111561443e5761443e613e1a565b8085161561444b57918102915b93841c9390800290614423565b509250929050565b5f8261446e575060016108cf565b8161447a57505f6108cf565b8160018114614490576002811461449a576144b6565b60019150506108cf565b60ff8411156144ab576144ab613e1a565b50506001821b6108cf565b5060208310610133831016604e8410600b84101617156144d9575081810a6108cf565b6144e3838361441e565b805f19048211156144f6576144f6613e1a565b029392505050565b5f6115a6838361446056fea26469706673582212200f29bdcfa2fe9097b0cfdb22fd4f3070bf64a6207fb94220c1906183b56a531564736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000064b6d320000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a00000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000340000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000001db329cde457d68b872766f4e12f9532bca9149b38376131613564396239333634386635613966633930666538303336383561350000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000044c6f70650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034a50410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f774e5570694b38705361496f5541776855417a6855344b374657576b706f6e507343415f5538706759624d00000000000000000000000000000000000000000000000000000000000000003968747470733a2f2f6a656e6e692e737461626c652d64696c7574696f6e2e6172742f6e66742f6974656d2f67656e65726174696f6e2f31342f000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a0000000000000000000000002531896dfb32418babf6c57edd40f8ee53c0f23600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003c
-----Decoded View---------------
Arg [0] : _name (string): Lope
Arg [1] : _symbol (string): JPA
Arg [2] : _placeholderTokenUri (string): https://arweave.net/wNUpiK8pSaIoUAwhUAzhU4K7FWWkponPsCA_U8pgYbM
Arg [3] : _baseUri (string): https://jenni.stable-dilution.art/nft/item/generation/14/
Arg [4] : _saleStartTime (uint256): 1689703200
Arg [5] : _royalReceiver (address): 0xF50Ac39c3C3bd062dE4E47fCF8F3F9d37b94874a
Arg [6] : _royalFeeNumerator (uint96): 750
Arg [7] : payees (address[]): 0xF50Ac39c3C3bd062dE4E47fCF8F3F9d37b94874a,0x2531896dFb32418BAbF6c57edD40f8EE53C0f236
Arg [8] : shares_ (uint256[]): 40,60
Arg [9] : chainlinkInformation (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [4] : 0000000000000000000000000000000000000000000000000000000064b6d320
Arg [5] : 000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a
Arg [6] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [7] : 00000000000000000000000000000000000000000000000000000000000002e0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000340
Arg [9] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [10] : 0000000000000000000000001db329cde457d68b872766f4e12f9532bca9149b
Arg [11] : 3837613161356439623933363438663561396663393066653830333638356135
Arg [12] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [14] : 4c6f706500000000000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [16] : 4a50410000000000000000000000000000000000000000000000000000000000
Arg [17] : 000000000000000000000000000000000000000000000000000000000000003f
Arg [18] : 68747470733a2f2f617277656176652e6e65742f774e5570694b38705361496f
Arg [19] : 5541776855417a6855344b374657576b706f6e507343415f5538706759624d00
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000039
Arg [21] : 68747470733a2f2f6a656e6e692e737461626c652d64696c7574696f6e2e6172
Arg [22] : 742f6e66742f6974656d2f67656e65726174696f6e2f31342f00000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [24] : 000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a
Arg [25] : 0000000000000000000000002531896dfb32418babf6c57edd40f8ee53c0f236
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [28] : 000000000000000000000000000000000000000000000000000000000000003c
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.