Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
2,009 TXN
Holders
188
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TRANSACTIONS
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.15; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@projectopensea/operator-filter-registry/src/DefaultOperatorFilterer.sol"; /** * @title THE TRANSACTIONS * @author your friendly neighborhood CURION (@curi0n) * @dev NFT contract for THE TRANSACTIONS, uses ONLY the OpenSea's Operator Filter Registry! (DefaultOperatorFilterer) */ contract TRANSACTIONS is ERC1155, Ownable, RrpRequesterV0, DefaultOperatorFilterer { using Strings for uint256; string public name = "The Transactions"; string public symbol = "TXN"; address public airnode; address public paymentSplitterAddress; address public pendingsAddress; address public sponsorAddressWhichIsNotSponsorWallet; address public sponsorWallet; bool public revealed = false; bool public paused = false; bool public randIdIsOn = true; bytes32 public endpointIdUint256Array; string private baseURI; string private unrevealedBaseURI; uint256 public totalMinted = 0; //minted amount uint256 public qrngGasForwarded; //gas forwarded to airnode sponsor wallet uint256 public pendingsSupply = 998; uint256 public blurVictimSupply = 9; uint256 public nominalMaxSupply = 2000; uint256 public totalSupply = nominalMaxSupply + blurVictimSupply; uint256 public totalMintedPostClaim = 0; //backup incase RNG gets wonky uint256 public mintPhase = 0; uint256 public mintPrice = 0.072 ether; uint256[] public remainingIds; //remaining ids to be minted after pendings holders 999-2000 uint256[] public lastMintedIds; //pendings mapping (uint256 => bool) public usedInFreeMintPendingIds; //used to check whether pending has been used for free 1:1 for Pendings holders mapping (uint256 => bool) public usedInPaidMintPendingIds; //used to check whether pending has been used for paid 1:1 for Pendings holders //blocks/transactions mapping(address => uint256) public amountMinted; mapping(bytes32 => bool) public expectingRequestWithIdToBeFulfilled; mapping(bytes32 => address) public requestIdToSender; mapping(bytes32 => uint256) public requestIdToOriginFunction; mapping(bytes32 => uint256) public requestIdToReservedId; //have to update these on mint/burn/transfer mapping(address => uint256[]) public ownedIds; mapping(address => uint256) public amountMintedPerAddressWhitelist; mapping(address => uint256) public amountMintedPerAddressPublic; error MaxSupplyReached(); error ForwardFailed(); error InsufficientFunds(); error MintIsClosed(); error UnknownAirnodeRequestId(); error InvalidId(); error NoOwnedIds(); error NoRemainingIds(); error PendingAlreadyUsedInFreeMint(); error ZeroPendingsBalance(); error NotOwnerOfThisPendings(); error PendingAlreadyUsedForPaidMint(); error IdNotFoundInArray(); error TooManyAddresses(); error OnlyContractOrOwnerCanCall(); error MintLimitPerWalletReached(); event RequestedUint256Array(bytes32 indexed requestId, uint256 size); event ReceivedUint256Array(bytes32 indexed requestId, uint256[] response); event TransactionMinedFromBlock(uint256 indexed _id, address _sender, bytes32 _requestId); constructor(address _airnodeRrp) ERC1155("") RrpRequesterV0(_airnodeRrp) {} // fallback payable functions for anything sent to contract not via mint functions receive() external payable {} //msg.data must be empty fallback() external payable {} //when msg.data is not empty //================================================================ // MINTING BLOCKS //================================================================ //mint batch of blocks with owned pendings Ids. must own all supplied Ids or will revert. //if public mint, ids argument only serves to give quantity of mint for batch mint, no effect on single mint function batchClaimPendingsOwner(uint256[] memory _pendingsIds) public { for(uint256 i = 0; i < _pendingsIds.length; i++){ claimSinglePendingsOwner(_pendingsIds[i]); } } function batchMintPendingsOwner(uint256[] memory _pendingsIds) public payable { for(uint256 i = 0; i < _pendingsIds.length; i++){ mintSingleBlockPendingsHolderWhitelist(_pendingsIds[i]); } } // send transaction to generate a block wity RN-based outcome of ID function mintSinglePublic() public payable { if(paused){ revert MintIsClosed(); } address sender = msg.sender; if(mintPhase == 0){ revert MintIsClosed(); } if(msg.value < mintPrice + qrngGasForwarded) { revert InsufficientFunds(); } if(totalMinted == nominalMaxSupply){revert MaxSupplyReached(); } if(amountMintedPerAddressPublic[sender] > 0){ revert MintLimitPerWalletReached(); } totalMintedPostClaim++; //remove last persons minted ID from remainingIds if(lastMintedIds.length > 0){ removeIdFromRemainingIds(lastMintedIds[0]); } (bool fwd, ) = sponsorWallet.call{value: qrngGasForwarded }(""); if(!fwd){ revert ForwardFailed(); } requestRandomTransactionOutcome(sender, 3, 9999); } //most people have 1 or 2 pendings so this might be more gas efficient to define the function in terms of single mints function claimSinglePendingsOwner(uint256 _pendingsId) public { if(paused){ revert MintIsClosed(); } address sender = msg.sender; if(mintPhase == 0){ revert MintIsClosed(); } if(totalMinted == nominalMaxSupply){revert MaxSupplyReached(); } if((IERC721(pendingsAddress).balanceOf(sender) == 0)) { revert ZeroPendingsBalance(); } if(!(IERC721(pendingsAddress).ownerOf(_pendingsId) == sender)) { revert NotOwnerOfThisPendings(); } if(usedInFreeMintPendingIds[_pendingsId]){ revert PendingAlreadyUsedInFreeMint(); } usedInFreeMintPendingIds[_pendingsId] = true; totalMinted++; requestRandomTransactionOutcome(sender, 1, _pendingsId); emit TransferSingle(sender, address(0), sender, _pendingsId, 1); } function mintSingleBlockPendingsHolderWhitelist(uint256 _pendingsId) public payable { if(paused){ revert MintIsClosed(); } //user must own the pending they have a balance of > 0 with, must have mintPrice+forwardingFee for airnode //this pendingsId must not have been used before to mint a block address sender = msg.sender; if(mintPhase == 0){ revert MintIsClosed(); } if(totalMinted == nominalMaxSupply){revert MaxSupplyReached(); } if(msg.value < mintPrice + qrngGasForwarded) { revert InsufficientFunds(); } if((IERC721(pendingsAddress).balanceOf(sender) == 0)) { revert ZeroPendingsBalance(); } if(!(IERC721(pendingsAddress).ownerOf(_pendingsId) == sender)) { revert NotOwnerOfThisPendings(); } if(amountMintedPerAddressWhitelist[sender] > IERC721(pendingsAddress).balanceOf(sender)){ revert MintLimitPerWalletReached(); } if(usedInPaidMintPendingIds[_pendingsId]){ revert PendingAlreadyUsedForPaidMint(); } usedInPaidMintPendingIds[_pendingsId] = true; totalMinted++; totalMintedPostClaim++; amountMintedPerAddressWhitelist[sender]++; //remove last persons minted ID from remainingIds if(lastMintedIds.length > 0){ removeIdFromRemainingIds(lastMintedIds[0]); } (bool fwd, ) = sponsorWallet.call{value: qrngGasForwarded }(""); if(!fwd){ revert ForwardFailed(); } requestRandomTransactionOutcome(sender, 2, 9999); emit TransferSingle(sender, address(0), sender, _pendingsId, 1); } /// @notice sends request to QRNG generator to get a random number function requestRandomTransactionOutcome(address _minter, uint256 _originFunctionId, uint256 _pendingsId) private { bytes32 requestId = airnodeRrp.makeFullRequest( airnode, endpointIdUint256Array, sponsorAddressWhichIsNotSponsorWallet, sponsorWallet, address(this), this.fulfillMint.selector, //specified callback function // Using Airnode ABI to encode the parameters abi.encode(bytes32("1u"), bytes32("size"), 1) ); expectingRequestWithIdToBeFulfilled[requestId] = true; requestIdToSender[requestId] = _minter; requestIdToOriginFunction[requestId] = _originFunctionId; requestIdToReservedId[requestId] = _pendingsId; emit RequestedUint256Array(requestId, 1); } /// @dev see the pun here? :) function fulfillMint(bytes32 _requestId, bytes calldata data) external onlyAirnodeRrp { if( !expectingRequestWithIdToBeFulfilled[_requestId] ) { revert UnknownAirnodeRequestId(); } expectingRequestWithIdToBeFulfilled[_requestId] = false; uint256[] memory qrngUint256Array = abi.decode(data, (uint256[])); address sender = requestIdToSender[_requestId]; uint256 thisOriginFunctionId = requestIdToOriginFunction[_requestId]; uint256 thisReservedId = requestIdToReservedId[_requestId]; //testing uint256 thisId; if(thisOriginFunctionId==1){ thisId = thisReservedId; } else { if(randIdIsOn){ thisId = getIdFromQrnAndManageSupply(qrngUint256Array[0]); } else { thisId = pendingsSupply+totalMintedPostClaim; //this is incremented in the mint functions } } ownedIds[sender].push(thisId); _mint(sender, thisId, 1, ""); emit TransactionMinedFromBlock(thisId, sender, _requestId); } /** @notice Returns the ID of the token to be minted via random selection without replacement. Remaining IDS starts as 999-2000 */ function getIdFromQrnAndManageSupply(uint256 _QRN) private returns (uint256) { uint256 thisRandomIndex = (_QRN % remainingIds.length-1); //includes 0 because this gets an index not an ID. max index is length-1. uint256 thisRandomId = remainingIds[thisRandomIndex]; lastMintedIds.push(thisRandomId); //remove this ID from the remainingIds array return thisRandomId; } function airdropToBlurVictims(address[] memory _addresses) public onlyOwner { if(_addresses.length > blurVictimSupply){ revert TooManyAddresses(); } for(uint256 i=0; i < _addresses.length; i++){ _mint(_addresses[i], nominalMaxSupply+i+1, 1, ""); } } //================================================================ // HELPERS //================================================================ //find desired ID, move last ID to its place, pop last ID function removeIdFromRemainingIds(uint256 _id) private { if(remainingIds.length == 0){ revert NoRemainingIds(); } if(_id > nominalMaxSupply){ revert InvalidId(); } for(uint256 i=0; i < remainingIds.length; i++){ if(remainingIds[i] == _id){ remainingIds[i] = remainingIds[remainingIds.length-1]; remainingIds.pop(); } } } //check case of ONE owned! function removeIdFromOwnedIds(address _user, uint256 _id) private { if(ownedIds[_user].length == 0){ revert NoOwnedIds(); } if(_id > nominalMaxSupply){ revert InvalidId(); } for(uint256 i=0; i < ownedIds[_user].length; i++){ if(ownedIds[_user][i] == _id){ ownedIds[_user][i] = ownedIds[_user][ownedIds[_user].length-1]; ownedIds[_user].pop(); } } } //in the case that not all free mints are claimed, add these Ids to the remainingIds array function addUnusedFreeMintsToRemainingIds() public onlyOwner { for(uint256 i=1; i <= pendingsSupply; i++){ if(!usedInFreeMintPendingIds[i]){ remainingIds.push(i); } } } //================================================================ // GETTERS //================================================================ function getHasPendingsIdBeenUsedForFreeBlockMint(uint256 _pendingsId) public view returns(bool) { return usedInFreeMintPendingIds[_pendingsId]; } function getHasPendingsIdBeenUsedForPaidBlockMint(uint256 _pendingsId) public view returns(bool) { return usedInPaidMintPendingIds[_pendingsId]; } function getOwnedIds(address _owner) public view returns(uint256[] memory) { return ownedIds[_owner]; } function uri(uint256 _id) public view override returns (string memory) { if(_id > totalSupply) { return "Id is beyond max";} else { if(revealed){ return string(abi.encodePacked(baseURI, Strings.toString(_id),".json")); } else { return string(abi.encodePacked(unrevealedBaseURI, Strings.toString(_id),".json")); } } } function totalMintedSoFar() public view returns (uint256) { return totalMinted; } //================================================================ // SETTERS, OVERRIDES, MISC //================================================================ function setAirnodeRequestParameters( address _airnode, //goerli: 0x9d3C147cA16DB954873A498e0af5852AB39139f2 bytes32 _endpointIdUint256Array, //goerli: 0x27cc2713e7f968e4e86ed274a051a5c8aaee9cca66946f23af6f29ecea9704c3 address _sponsorWallet, //derived with this contract address address _sponsorAddressWhichIsNotSponsorWallet, //this contract address or creator EOA uint256 _qrngGasForwarded ) external onlyOwner { airnode = _airnode; endpointIdUint256Array = _endpointIdUint256Array; sponsorWallet = _sponsorWallet; sponsorAddressWhichIsNotSponsorWallet = _sponsorAddressWhichIsNotSponsorWallet; qrngGasForwarded = _qrngGasForwarded; } // generates id array of 999-2000 for random selection based mints function setIdArray() public onlyOwner { for(uint256 i=pendingsSupply+1; i <= nominalMaxSupply; i++){ remainingIds.push(i); } } function setRandIsOn(bool _randIdIsOn) public onlyOwner { randIdIsOn = _randIdIsOn; } function setBaseURI(string memory _uri) public onlyOwner { baseURI = _uri; } function setUnrevealedBaseURI(string memory _uri) public onlyOwner { unrevealedBaseURI = _uri; } function reveal() public onlyOwner { revealed = true; } function setPaused(bool _paused) public onlyOwner { paused = _paused; } function setPendingsAddress(address _pendingsAddress) public onlyOwner { pendingsAddress = _pendingsAddress; } function setMintPhase(uint256 _phase) public onlyOwner { mintPhase = _phase; } function setPaymentSplitterAddress(address payable _paymentSplitterAddress) public onlyOwner { paymentSplitterAddress = payable(_paymentSplitterAddress); } function setMintPrice(uint256 _publicMintCost) public onlyOwner { mintPrice = _publicMintCost; } function setBlurVictimSupply(uint256 _blurVictimSupply) public onlyOwner { blurVictimSupply = _blurVictimSupply; totalSupply = nominalMaxSupply + blurVictimSupply; } function setQrngGasForwarded(uint256 _qrngGasForwarded) public onlyOwner { qrngGasForwarded = _qrngGasForwarded; } //================================================================ // WITHDRAWALS //================================================================ function withdrawERC20FromContract(address _to, address _token) external onlyOwner { IERC20(_token).transfer(_to, IERC20(_token).balanceOf(address(this))); } //if this doesnt work, import IAirnodeRrpV0.sol and use airnodeRrpInterface.requestWithdrawal(airnode, sponsorWallet); function withdrawEthFromSponsorWallet() external onlyOwner { airnodeRrp.requestWithdrawal(airnode, sponsorWallet); } function withdrawEthFromContract() external onlyOwner { (bool os, ) = payable(paymentSplitterAddress).call{ value: address(this).balance }(''); if(!os){ revert ForwardFailed(); } } //================================================================ // OPENSEA OPERATOR FILTERING - RELATED OVERRIDES //================================================================ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data) public override onlyAllowedOperator(from) { //added update to mappings which track owned IDs if(from != address(0)) { removeIdFromOwnedIds(from, tokenId); ownedIds[to].push(tokenId); } super.safeTransferFrom(from, to, tokenId, amount, data); } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { //added update to mappings which track owned IDs if(from != address(0)) { for(uint256 i=0; i < ids.length; i++) { removeIdFromOwnedIds(from, ids[i]); ownedIds[to].push(ids[i]); } } super.safeBatchTransferFrom(from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAuthorizationUtilsV0.sol"; import "./ITemplateUtilsV0.sol"; import "./IWithdrawalUtilsV0.sol"; interface IAirnodeRrpV0 is IAuthorizationUtilsV0, ITemplateUtilsV0, IWithdrawalUtilsV0 { event SetSponsorshipStatus( address indexed sponsor, address indexed requester, bool sponsorshipStatus ); event MadeTemplateRequest( address indexed airnode, bytes32 indexed requestId, uint256 requesterRequestCount, uint256 chainId, address requester, bytes32 templateId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes parameters ); event MadeFullRequest( address indexed airnode, bytes32 indexed requestId, uint256 requesterRequestCount, uint256 chainId, address requester, bytes32 endpointId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes parameters ); event FulfilledRequest( address indexed airnode, bytes32 indexed requestId, bytes data ); event FailedRequest( address indexed airnode, bytes32 indexed requestId, string errorMessage ); function setSponsorshipStatus(address requester, bool sponsorshipStatus) external; function makeTemplateRequest( bytes32 templateId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes calldata parameters ) external returns (bytes32 requestId); function makeFullRequest( address airnode, bytes32 endpointId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes calldata parameters ) external returns (bytes32 requestId); function fulfill( bytes32 requestId, address airnode, address fulfillAddress, bytes4 fulfillFunctionId, bytes calldata data, bytes calldata signature ) external returns (bool callSuccess, bytes memory callData); function fail( bytes32 requestId, address airnode, address fulfillAddress, bytes4 fulfillFunctionId, string calldata errorMessage ) external; function sponsorToRequesterToSponsorshipStatus( address sponsor, address requester ) external view returns (bool sponsorshipStatus); function requesterToRequestCountPlusOne(address requester) external view returns (uint256 requestCountPlusOne); function requestIsAwaitingFulfillment(bytes32 requestId) external view returns (bool isAwaitingFulfillment); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IAuthorizationUtilsV0 { function checkAuthorizationStatus( address[] calldata authorizers, address airnode, bytes32 requestId, bytes32 endpointId, address sponsor, address requester ) external view returns (bool status); function checkAuthorizationStatuses( address[] calldata authorizers, address airnode, bytes32[] calldata requestIds, bytes32[] calldata endpointIds, address[] calldata sponsors, address[] calldata requesters ) external view returns (bool[] memory statuses); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITemplateUtilsV0 { event CreatedTemplate( bytes32 indexed templateId, address airnode, bytes32 endpointId, bytes parameters ); function createTemplate( address airnode, bytes32 endpointId, bytes calldata parameters ) external returns (bytes32 templateId); function getTemplates(bytes32[] calldata templateIds) external view returns ( address[] memory airnodes, bytes32[] memory endpointIds, bytes[] memory parameters ); function templates(bytes32 templateId) external view returns (address airnode, bytes32 endpointId, bytes memory parameters); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWithdrawalUtilsV0 { event RequestedWithdrawal( address indexed airnode, address indexed sponsor, bytes32 indexed withdrawalRequestId, address sponsorWallet ); event FulfilledWithdrawal( address indexed airnode, address indexed sponsor, bytes32 indexed withdrawalRequestId, address sponsorWallet, uint256 amount ); function requestWithdrawal(address airnode, address sponsorWallet) external; function fulfillWithdrawal( bytes32 withdrawalRequestId, address airnode, address sponsor ) external payable; function sponsorToWithdrawalRequestCount(address sponsor) external view returns (uint256 withdrawalRequestCount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../interfaces/IAirnodeRrpV0.sol"; /// @title The contract to be inherited to make Airnode RRP requests contract RrpRequesterV0 { IAirnodeRrpV0 public immutable airnodeRrp; /// @dev Reverts if the caller is not the Airnode RRP contract. /// Use it as a modifier for fulfill and error callback methods, but also /// check `requestId`. modifier onlyAirnodeRrp() { require(msg.sender == address(airnodeRrp), "Caller not Airnode RRP"); _; } /// @dev Airnode RRP address is set at deployment and is immutable. /// RrpRequester is made its own sponsor by default. RrpRequester can also /// be sponsored by others and use these sponsorships while making /// requests, i.e., using this default sponsorship is optional. /// @param _airnodeRrp Airnode RRP contract address constructor(address _airnodeRrp) { airnodeRrp = IAirnodeRrpV0(_airnodeRrp); IAirnodeRrpV0(_airnodeRrp).setSponsorshipStatus(address(this), true); } }
// 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) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @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, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// 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/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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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://consensys.net/diligence/blog/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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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 // 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 << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.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. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); 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)); } } } } 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); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } 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) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "remappings": [ "@api3/=lib/airnode/packages/", "@openzeppelin/=lib/openzeppelin-contracts/", "@projectopensea/operator-filter-registry/=lib/operator-filter-registry/", "@solmate/=lib/solmate/src/", "airnode/=lib/airnode/", "ds-test/=lib/solmate/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/operator-filter-registry/lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "operator-filter-registry/=lib/operator-filter-registry/src/", "prb-test/=lib/prb-test/src/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_airnodeRrp","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ForwardFailed","type":"error"},{"inputs":[],"name":"IdNotFoundInArray","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidId","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"MintIsClosed","type":"error"},{"inputs":[],"name":"MintLimitPerWalletReached","type":"error"},{"inputs":[],"name":"NoOwnedIds","type":"error"},{"inputs":[],"name":"NoRemainingIds","type":"error"},{"inputs":[],"name":"NotOwnerOfThisPendings","type":"error"},{"inputs":[],"name":"OnlyContractOrOwnerCanCall","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"PendingAlreadyUsedForPaidMint","type":"error"},{"inputs":[],"name":"PendingAlreadyUsedInFreeMint","type":"error"},{"inputs":[],"name":"TooManyAddresses","type":"error"},{"inputs":[],"name":"UnknownAirnodeRequestId","type":"error"},{"inputs":[],"name":"ZeroPendingsBalance","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256[]","name":"response","type":"uint256[]"}],"name":"ReceivedUint256Array","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"}],"name":"RequestedUint256Array","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_requestId","type":"bytes32"}],"name":"TransactionMinedFromBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addUnusedFreeMintsToRemainingIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"airdropToBlurVictims","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airnode","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airnodeRrp","outputs":[{"internalType":"contract IAirnodeRrpV0","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountMintedPerAddressPublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountMintedPerAddressWhitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pendingsIds","type":"uint256[]"}],"name":"batchClaimPendingsOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pendingsIds","type":"uint256[]"}],"name":"batchMintPendingsOwner","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"blurVictimSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pendingsId","type":"uint256"}],"name":"claimSinglePendingsOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endpointIdUint256Array","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"expectingRequestWithIdToBeFulfilled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"fulfillMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pendingsId","type":"uint256"}],"name":"getHasPendingsIdBeenUsedForFreeBlockMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pendingsId","type":"uint256"}],"name":"getHasPendingsIdBeenUsedForPaidBlockMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getOwnedIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastMintedIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pendingsId","type":"uint256"}],"name":"mintSingleBlockPendingsHolderWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintSinglePublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nominalMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownedIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentSplitterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingsSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"qrngGasForwarded","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randIdIsOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"remainingIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestIdToOriginFunction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestIdToReservedId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestIdToSender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","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":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_airnode","type":"address"},{"internalType":"bytes32","name":"_endpointIdUint256Array","type":"bytes32"},{"internalType":"address","name":"_sponsorWallet","type":"address"},{"internalType":"address","name":"_sponsorAddressWhichIsNotSponsorWallet","type":"address"},{"internalType":"uint256","name":"_qrngGasForwarded","type":"uint256"}],"name":"setAirnodeRequestParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blurVictimSupply","type":"uint256"}],"name":"setBlurVictimSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setIdArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_phase","type":"uint256"}],"name":"setMintPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicMintCost","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_paymentSplitterAddress","type":"address"}],"name":"setPaymentSplitterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pendingsAddress","type":"address"}],"name":"setPendingsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qrngGasForwarded","type":"uint256"}],"name":"setQrngGasForwarded","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_randIdIsOn","type":"bool"}],"name":"setRandIsOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setUnrevealedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sponsorAddressWhichIsNotSponsorWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sponsorWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMintedPostClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMintedSoFar","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedInFreeMintPendingIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedInPaidMintPendingIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"withdrawERC20FromContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEthFromContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEthFromSponsorWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e0604052601060a09081526f546865205472616e73616374696f6e7360801b60c052600490620000319082620003e4565b506040805180820190915260038152622a2c2760e91b60208201526005906200005b9082620003e4565b50600a805462ffffff60a01b1916600160b01b1790556000600e556103e6601055600960118190556107d06012819055620000979190620004b0565b6013556000601455600060155566ffcb9e57d40000601655348015620000bc57600080fd5b506040516200439738038062004397833981016040819052620000df91620004d8565b733cc6cdda760b79bafa08df41ecfa224f810dceb6600182604051806020016040528060008152506200011881620002db60201b60201c565b506200012433620002ed565b6001600160a01b0381166080819052604051632b77c09f60e21b81523060048201526001602482015263addf027c90604401600060405180830381600087803b1580156200017157600080fd5b505af115801562000186573d6000803e3d6000fd5b5050506daaeb6d7670e522a718067333cd4e3b159150620002d290505780156200022057604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200020157600080fd5b505af115801562000216573d6000803e3d6000fd5b50505050620002d2565b6001600160a01b03821615620002715760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620001e6565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620002b857600080fd5b505af1158015620002cd573d6000803e3d6000fd5b505050505b5050506200050a565b6002620002e98282620003e4565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200036a57607f821691505b6020821081036200038b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003df57600081815260208120601f850160051c81016020861015620003ba5750805b601f850160051c820191505b81811015620003db57828155600101620003c6565b5050505b505050565b81516001600160401b038111156200040057620004006200033f565b620004188162000411845462000355565b8462000391565b602080601f831160018114620004505760008415620004375750858301515b600019600386901b1c1916600185901b178555620003db565b600085815260208120601f198616915b82811015620004815788860151825594840194600190910190840162000460565b5085821015620004a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620004d257634e487b7160e01b600052601160045260246000fd5b92915050565b600060208284031215620004eb57600080fd5b81516001600160a01b03811681146200050357600080fd5b9392505050565b608051613e5c6200053b60003960008181610913015281816115bd01528181611bd801526125a00152613e5c6000f3fe6080604052600436106103f95760003560e01c80636d3ced2911610211578063a7a2f9f511610122578063e68abbbe116100b0578063f2fde38b11610077578063f2fde38b14610cc2578063f4a0a52814610ce2578063f6f0049614610d02578063f7e832c914610d22578063fca21d1114610d3857005b8063e68abbbe14610be9578063e985e9c514610c19578063ee6d9d6d14610c62578063eec1cbb714610c82578063f242432a14610ca257005b8063bf90fb4e116100f4578063bf90fb4e14610b4e578063c01c008914610b6e578063c30a850f14610b83578063c9d9030614610b99578063e185a2cc14610bc957005b8063a7a2f9f514610af3578063a93304f114610b13578063aeecfd8b14610b1b578063b34738d314610b2e57005b80639530256f1161019f578063a22cb46511610171578063a22cb46514610a5b578063a2309ff814610a7b578063a36ff4d814610a91578063a475b5dd14610ab1578063a654102e14610ac657005b80639530256f146109f057806395d89b4114610a105780639a7110fe14610a25578063a19954af14610a4557005b80637d2788ac116101e35780637d2788ac14610935578063851244f7146109555780638c73681c146109855780638da5cb5b146109b2578063943431bf146109d057005b80636d3ced29146108c15780636f2eec90146108d6578063715018a6146108ec57806371bab6661461090157005b806341f434341161030b5780635c975abb11610299578063618665db1161026b578063618665db14610836578063656ec7ac1461085657806365701b0d146108765780636817c76c1461088b5780636c4f0698146108a157005b80635c975abb146107c05780635cb2b649146107e15780635e4b68f6146108015780636128cf921461081657005b80634e1273f4116102dd5780634e1273f414610701578063504875bf1461072e578063518302271461074f57806355f804b31461077057806359db9d871461079057005b806341f4343414610687578063438a67e7146106a957806343b70f7a146106d65780634b27d3c5146106ec57005b806318160ddd1161038857806325bbb9df1161035a57806325bbb9df146105da57806325d12581146105fa5780632eb2c2d61461061a57806332caae2d1461063a57806334ce7f8e1461065a57005b806318160ddd146105435780631bf828631461055957806321224fa11461056c578063219c0eee1461058c57005b80630e89341c116103cc5780630e89341c1461049d57806312f7b963146104bd57806316c38b3c146104dd57806317881cbf146104fd57806317fd6db61461051357005b8062fdd58e1461040257806301414a1d1461043557806301ffc9a71461044b57806306fdde031461047b57005b3661040057005b005b34801561040e57600080fd5b5061042261041d36600461317b565b610d65565b6040519081526020015b60405180910390f35b34801561044157600080fd5b50610422600f5481565b34801561045757600080fd5b5061046b6104663660046131bd565b610dfe565b604051901515815260200161042c565b34801561048757600080fd5b50610490610e4e565b60405161042c9190613231565b3480156104a957600080fd5b506104906104b8366004613244565b610edc565b3480156104c957600080fd5b506104006104d836600461333c565b610f63565b3480156104e957600080fd5b506104006104f8366004613386565b610ffe565b34801561050957600080fd5b5061042260155481565b34801561051f57600080fd5b5061046b61052e366004613244565b6000908152601a602052604090205460ff1690565b34801561054f57600080fd5b5061042260135481565b610400610567366004613244565b611024565b34801561057857600080fd5b5061042261058736600461317b565b61141b565b34801561059857600080fd5b506105c26105a7366004613244565b601d602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161042c565b3480156105e657600080fd5b506104006105f53660046133a3565b61144b565b34801561060657600080fd5b506008546105c2906001600160a01b031681565b34801561062657600080fd5b506104006106353660046134e1565b61149c565b34801561064657600080fd5b50610422610655366004613244565b611567565b34801561066657600080fd5b5061042261067536600461358e565b60216020526000908152604090205481565b34801561069357600080fd5b506105c26daaeb6d7670e522a718067333cd4e81565b3480156106b557600080fd5b506104226106c436600461358e565b601b6020526000908152604090205481565b3480156106e257600080fd5b5061042260125481565b3480156106f857600080fd5b50610400611588565b34801561070d57600080fd5b5061072161071c3660046135ab565b61161d565b60405161042c9190613649565b34801561073a57600080fd5b50600a5461046b90600160b01b900460ff1681565b34801561075b57600080fd5b50600a5461046b90600160a01b900460ff1681565b34801561077c57600080fd5b5061040061078b36600461365c565b611746565b34801561079c57600080fd5b5061046b6107ab366004613244565b601a6020526000908152604090205460ff1681565b3480156107cc57600080fd5b50600a5461046b90600160a81b900460ff1681565b3480156107ed57600080fd5b506009546105c2906001600160a01b031681565b34801561080d57600080fd5b5061040061175a565b34801561082257600080fd5b50610400610831366004613244565b6117c9565b34801561084257600080fd5b5061040061085136600461358e565b611a04565b34801561086257600080fd5b506104006108713660046136a4565b611a2e565b34801561088257600080fd5b50610400611a6e565b34801561089757600080fd5b5061042260165481565b3480156108ad57600080fd5b506104006108bc36600461358e565b611aea565b3480156108cd57600080fd5b50610400611b14565b3480156108e257600080fd5b5061042260105481565b3480156108f857600080fd5b50610400611b86565b34801561090d57600080fd5b506105c27f000000000000000000000000000000000000000000000000000000000000000081565b34801561094157600080fd5b50610400610950366004613386565b611b9a565b34801561096157600080fd5b5061046b610970366004613244565b601c6020526000908152604090205460ff1681565b34801561099157600080fd5b506104226109a036600461358e565b60226020526000908152604090205481565b3480156109be57600080fd5b506003546001600160a01b03166105c2565b3480156109dc57600080fd5b506104006109eb366004613244565b611bc0565b3480156109fc57600080fd5b50610400610a0b3660046136d8565b611bcd565b348015610a1c57600080fd5b50610490611db3565b348015610a3157600080fd5b506007546105c2906001600160a01b031681565b348015610a5157600080fd5b50610422600b5481565b348015610a6757600080fd5b50610400610a76366004613753565b611dc0565b348015610a8757600080fd5b50610422600e5481565b348015610a9d57600080fd5b506006546105c2906001600160a01b031681565b348015610abd57600080fd5b50610400611dd9565b348015610ad257600080fd5b50610422610ae1366004613244565b601f6020526000908152604090205481565b348015610aff57600080fd5b50610400610b0e366004613244565b611df6565b610400611e03565b610400610b293660046136a4565b611f96565b348015610b3a57600080fd5b50610400610b49366004613244565b611fd6565b348015610b5a57600080fd5b50600a546105c2906001600160a01b031681565b348015610b7a57600080fd5b50600e54610422565b348015610b8f57600080fd5b5061042260115481565b348015610ba557600080fd5b5061046b610bb4366004613244565b60009081526019602052604090205460ff1690565b348015610bd557600080fd5b50610400610be436600461365c565b611ff7565b348015610bf557600080fd5b5061046b610c04366004613244565b60196020526000908152604090205460ff1681565b348015610c2557600080fd5b5061046b610c3436600461378c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610c6e57600080fd5b50610422610c7d366004613244565b61200b565b348015610c8e57600080fd5b50610721610c9d36600461358e565b61201b565b348015610cae57600080fd5b50610400610cbd3660046137ba565b612085565b348015610cce57600080fd5b50610400610cdd36600461358e565b6120ef565b348015610cee57600080fd5b50610400610cfd366004613244565b612165565b348015610d0e57600080fd5b50610400610d1d36600461378c565b612172565b348015610d2e57600080fd5b5061042260145481565b348015610d4457600080fd5b50610422610d53366004613244565b601e6020526000908152604090205481565b60006001600160a01b038316610dd55760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610e2f57506001600160e01b031982166303a24d0760e21b145b80610df857506301ffc9a760e01b6001600160e01b0319831614610df8565b60048054610e5b90613822565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8790613822565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b6060601354821115610f1457505060408051808201909152601081526f092c840d2e640c4caf2dedcc840dac2f60831b602082015290565b600a54600160a01b900460ff1615610f5857600c610f318361225b565b604051602001610f4292919061385c565b6040516020818303038152906040529050919050565b600d610f318361225b565b610f6b6122ed565b60115481511115610f8f57604051637e1d76fb60e01b815260040160405180910390fd5b60005b8151811015610ffa57610fe8828281518110610fb057610fb06138f3565b602002602001015182601254610fc6919061391f565b610fd190600161391f565b600160405180602001604052806000815250612347565b80610ff281613932565b915050610f92565b5050565b6110066122ed565b600a8054911515600160a81b0260ff60a81b19909216919091179055565b600a54600160a81b900460ff161561104f576040516306ce844d60e01b815260040160405180910390fd5b6015543390600003611074576040516306ce844d60e01b815260040160405180910390fd5b601254600e54036110985760405163d05cb60960e01b815260040160405180910390fd5b600f546016546110a8919061391f565b3410156110c85760405163356680b760e01b815260040160405180910390fd5b6008546040516370a0823160e01b81526001600160a01b038381166004830152909116906370a0823190602401602060405180830381865afa158015611112573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611136919061394b565b60000361115657604051638c7c198160e01b815260040160405180910390fd5b6008546040516331a9108f60e11b8152600481018490526001600160a01b03838116921690636352211e90602401602060405180830381865afa1580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c59190613964565b6001600160a01b0316146111ec576040516379d7dc0560e11b815260040160405180910390fd5b6008546040516370a0823160e01b81526001600160a01b038381166004830152909116906370a0823190602401602060405180830381865afa158015611236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125a919061394b565b6001600160a01b0382166000908152602160205260409020541115611292576040516359fdd76d60e01b815260040160405180910390fd5b6000828152601a602052604090205460ff16156112c25760405163188a552b60e01b815260040160405180910390fd5b6000828152601a60205260408120805460ff19166001179055600e8054916112e983613932565b9091555050601480549060006112fe83613932565b90915550506001600160a01b038116600090815260216020526040812080549161132783613932565b90915550506018541561135b5761135b601860008154811061134b5761134b6138f3565b9060005260206000200154612449565b600a54600f546040516000926001600160a01b031691908381818185875af1925050503d80600081146113aa576040519150601f19603f3d011682016040523d82523d6000602084013e6113af565b606091505b50509050806113d15760405163096dc0e160e01b815260040160405180910390fd5b6113df82600261270f612544565b60408051848152600160208201526001600160a01b038416916000918391600080516020613e07833981519152910160405180910390a4505050565b60208052816000526040600020818154811061143657600080fd5b90600052602060002001600091509150505481565b6114536122ed565b600680546001600160a01b03199081166001600160a01b0397881617909155600b94909455600a8054851693861693909317909255600980549093169316929092179055600f55565b846001600160a01b03811633146114b6576114b6336126c0565b6001600160a01b038616156115525760005b8451811015611550576114f4878683815181106114e7576114e76138f3565b6020026020010151612779565b6001600160a01b03861660009081526020805260409020855186908390811061151f5761151f6138f3565b602090810291909101810151825460018101845560009384529190922001558061154881613932565b9150506114c8565b505b61155f86868686866128f6565b505050505050565b6018818154811061157757600080fd5b600091825260209091200154905081565b6115906122ed565b600654600a54604051631d414cbd60e01b81526001600160a01b03928316600482015290821660248201527f000000000000000000000000000000000000000000000000000000000000000090911690631d414cbd90604401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50505050565b606081518351146116825760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610dcc565b600083516001600160401b0381111561169d5761169d61325d565b6040519080825280602002602001820160405280156116c6578160200160208202803683370190505b50905060005b845181101561173e576117118582815181106116ea576116ea6138f3565b6020026020010151858381518110611704576117046138f3565b6020026020010151610d65565b828281518110611723576117236138f3565b602090810291909101015261173781613932565b90506116cc565b509392505050565b61174e6122ed565b600c610ffa82826139c7565b6117626122ed565b60006010546001611773919061391f565b90505b60125481116117c657601780546001810182556000919091527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1501819055806117be81613932565b915050611776565b50565b600a54600160a81b900460ff16156117f4576040516306ce844d60e01b815260040160405180910390fd5b6015543390600003611819576040516306ce844d60e01b815260040160405180910390fd5b601254600e540361183d5760405163d05cb60960e01b815260040160405180910390fd5b6008546040516370a0823160e01b81526001600160a01b038381166004830152909116906370a0823190602401602060405180830381865afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab919061394b565b6000036118cb57604051638c7c198160e01b815260040160405180910390fd5b6008546040516331a9108f60e11b8152600481018490526001600160a01b03838116921690636352211e90602401602060405180830381865afa158015611916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193a9190613964565b6001600160a01b031614611961576040516379d7dc0560e11b815260040160405180910390fd5b60008281526019602052604090205460ff161561199157604051634208e2d760e11b815260040160405180910390fd5b6000828152601960205260408120805460ff19166001179055600e8054916119b883613932565b91905055506119c981600184612544565b60408051838152600160208201526001600160a01b038316916000918391600080516020613e07833981519152910160405180910390a45050565b611a0c6122ed565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8151811015610ffa57611a5c828281518110611a4f57611a4f6138f3565b60200260200101516117c9565b80611a6681613932565b915050611a31565b611a766122ed565b6007546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611ac3576040519150601f19603f3d011682016040523d82523d6000602084013e611ac8565b606091505b50509050806117c65760405163096dc0e160e01b815260040160405180910390fd5b611af26122ed565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b611b1c6122ed565b60015b60105481116117c65760008181526019602052604090205460ff16611b7457601780546001810182556000919091527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15018190555b80611b7e81613932565b915050611b1f565b611b8e6122ed565b611b986000612942565b565b611ba26122ed565b600a8054911515600160b01b0260ff60b01b19909216919091179055565b611bc86122ed565b601555565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c3e5760405162461bcd60e51b8152602060048201526016602482015275043616c6c6572206e6f74204169726e6f6465205252560541b6044820152606401610dcc565b6000838152601c602052604090205460ff16611c6d576040516311f47ed360e31b815260040160405180910390fd5b6000838152601c60205260408120805460ff19169055611c8f828401846136a4565b6000858152601d6020908152604080832054601e835281842054601f909352908320549394506001600160a01b03169290916001839003611cd1575080611d20565b600a54600160b01b900460ff1615611d0d57611d0685600081518110611cf957611cf96138f3565b6020026020010151612994565b9050611d20565b601454601054611d1d919061391f565b90505b6001600160a01b038416600090815260208080526040808320805460018181018355918552838520018590558151928301909152918152611d65918691849190612347565b604080516001600160a01b0386168152602081018a905282917f1a724b7cebc96fef75b77ab5a4229975fb491821e8468cbad40ace53ac90e0e9910160405180910390a25050505050505050565b60058054610e5b90613822565b81611dca816126c0565b611dd48383612a10565b505050565b611de16122ed565b600a805460ff60a01b1916600160a01b179055565b611dfe6122ed565b600f55565b600a54600160a81b900460ff1615611e2e576040516306ce844d60e01b815260040160405180910390fd5b6015543390600003611e53576040516306ce844d60e01b815260040160405180910390fd5b600f54601654611e63919061391f565b341015611e835760405163356680b760e01b815260040160405180910390fd5b601254600e5403611ea75760405163d05cb60960e01b815260040160405180910390fd5b6001600160a01b03811660009081526022602052604090205415611ede576040516359fdd76d60e01b815260040160405180910390fd5b60148054906000611eee83613932565b909155505060185415611f1257611f12601860008154811061134b5761134b6138f3565b600a54600f546040516000926001600160a01b031691908381818185875af1925050503d8060008114611f61576040519150601f19603f3d011682016040523d82523d6000602084013e611f66565b606091505b5050905080611f885760405163096dc0e160e01b815260040160405180910390fd5b610ffa82600361270f612544565b60005b8151811015610ffa57611fc4828281518110611fb757611fb76138f3565b6020026020010151611024565b80611fce81613932565b915050611f99565b611fde6122ed565b6011819055601254611ff190829061391f565b60135550565b611fff6122ed565b600d610ffa82826139c7565b6017818154811061157757600080fd5b6001600160a01b0381166000908152602080805260409182902080548351818402810184019094528084526060939283018282801561207957602002820191906000526020600020905b815481526020019060010190808311612065575b50505050509050919050565b846001600160a01b038116331461209f5761209f336126c0565b6001600160a01b038616156120e2576120b88685612779565b6001600160a01b038516600090815260208080526040822080546001810182559083529120018490555b61155f8686868686612a1b565b6120f76122ed565b6001600160a01b03811661215c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dcc565b6117c681612942565b61216d6122ed565b601655565b61217a6122ed565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90849083906370a0823190602401602060405180830381865afa1580156121c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ec919061394b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612237573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd49190613a86565b6060600061226883612a60565b60010190506000816001600160401b038111156122875761228761325d565b6040519080825280601f01601f1916602001820160405280156122b1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846122bb57509392505050565b6003546001600160a01b03163314611b985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610dcc565b6001600160a01b0384166123a75760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610dcc565b3360006123b385612b38565b905060006123c085612b38565b90506000868152602081815260408083206001600160a01b038b168452909152812080548792906123f290849061391f565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020613e07833981519152910160405180910390a461244083600089898989612b83565b50505050505050565b60175460000361246c57604051632aafbbcd60e01b815260040160405180910390fd5b60125481111561248f57604051631bf4348160e31b815260040160405180910390fd5b60005b601754811015610ffa5781601782815481106124b0576124b06138f3565b90600052602060002001540361253257601780546124d090600190613aa3565b815481106124e0576124e06138f3565b9060005260206000200154601782815481106124fe576124fe6138f3565b600091825260209091200155601780548061251b5761251b613ab6565b600190038181906000526020600020016000905590555b8061253c81613932565b915050612492565b600654600b54600954600a546040805161317560f01b60208201526373697a6560e01b818301526001606080830191909152825180830390910181526080820192839052636e6be03f60e01b9092526000956001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811696636e6be03f966125ee969383169591949083169392909216913091639530256f60e01b91608401613acc565b6020604051808303816000875af115801561260d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612631919061394b565b6000818152601c602090815260408083208054600160ff199091168117909155601d835281842080546001600160a01b0319166001600160a01b038b16179055601e8352818420889055601f8352928190208690555191825291925082917f6529de56040715a55618ee5797cd3bc856b65ded8fee01e2a24c8481de9e2aaf910160405180910390a250505050565b6daaeb6d7670e522a718067333cd4e3b156117c657604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561272d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127519190613a86565b6117c657604051633b79c77360e21b81526001600160a01b0382166004820152602401610dcc565b6001600160a01b038216600090815260208052604081205490036127b05760405163259a4f3760e01b815260040160405180910390fd5b6012548111156127d357604051631bf4348160e31b815260040160405180910390fd5b60005b6001600160a01b0383166000908152602080526040902054811015611dd4576001600160a01b03831660009081526020805260409020805483919083908110612821576128216138f3565b9060005260206000200154036128e4576001600160a01b03831660009081526020805260409020805461285690600190613aa3565b81548110612866576128666138f3565b60009182526020808320909101546001600160a01b0386168352908052604090912080548390811061289a5761289a6138f3565b60009182526020808320909101929092556001600160a01b0385168152908052604090208054806128cd576128cd613ab6565b600190038181906000526020600020016000905590555b806128ee81613932565b9150506127d6565b6001600160a01b03851633148061291257506129128533610c34565b61292e5760405162461bcd60e51b8152600401610dcc90613b2c565b61293b8585858585612cde565b5050505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60175460009081906001906129a99085613b7a565b6129b39190613aa3565b90506000601782815481106129ca576129ca6138f3565b60009182526020822001546018805460018101825592527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e909101819055949350505050565b610ffa338383612eb3565b6001600160a01b038516331480612a375750612a378533610c34565b612a535760405162461bcd60e51b8152600401610dcc90613b2c565b61293b8585858585612f93565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612a9f5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612acb576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612ae957662386f26fc10000830492506010015b6305f5e1008310612b01576305f5e100830492506008015b6127108310612b1557612710830492506004015b60648310612b27576064830492506002015b600a8310610df85760010192915050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612b7257612b726138f3565b602090810291909101015292915050565b6001600160a01b0384163b1561155f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612bc79089908990889088908890600401613b9c565b6020604051808303816000875af1925050508015612c02575060408051601f3d908101601f19168201909252612bff91810190613be1565b60015b612cae57612c0e613bfe565b806308c379a003612c475750612c22613c1a565b80612c2d5750612c49565b8060405162461bcd60e51b8152600401610dcc9190613231565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610dcc565b6001600160e01b0319811663f23a6e6160e01b146124405760405162461bcd60e51b8152600401610dcc90613ca3565b8151835114612d405760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610dcc565b6001600160a01b038416612d665760405162461bcd60e51b8152600401610dcc90613ceb565b3360005b8451811015612e4d576000858281518110612d8757612d876138f3565b602002602001015190506000858381518110612da557612da56138f3565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015612df55760405162461bcd60e51b8152600401610dcc90613d30565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612e3290849061391f565b9250508190555050505080612e4690613932565b9050612d6a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612e9d929190613d7a565b60405180910390a461155f8187878787876130ab565b816001600160a01b0316836001600160a01b031603612f265760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610dcc565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416612fb95760405162461bcd60e51b8152600401610dcc90613ceb565b336000612fc585612b38565b90506000612fd285612b38565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156130155760405162461bcd60e51b8152600401610dcc90613d30565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061305290849061391f565b909155505060408051888152602081018890526001600160a01b03808b16928c82169291881691600080516020613e07833981519152910160405180910390a46130a0848a8a8a8a8a612b83565b505050505050505050565b6001600160a01b0384163b1561155f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906130ef9089908990889088908890600401613da8565b6020604051808303816000875af192505050801561312a575060408051601f3d908101601f1916820190925261312791810190613be1565b60015b61313657612c0e613bfe565b6001600160e01b0319811663bc197c8160e01b146124405760405162461bcd60e51b8152600401610dcc90613ca3565b6001600160a01b03811681146117c657600080fd5b6000806040838503121561318e57600080fd5b823561319981613166565b946020939093013593505050565b6001600160e01b0319811681146117c657600080fd5b6000602082840312156131cf57600080fd5b81356131da816131a7565b9392505050565b60005b838110156131fc5781810151838201526020016131e4565b50506000910152565b6000815180845261321d8160208601602086016131e1565b601f01601f19169290920160200192915050565b6020815260006131da6020830184613205565b60006020828403121561325657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156132985761329861325d565b6040525050565b60006001600160401b038211156132b8576132b861325d565b5060051b60200190565b600082601f8301126132d357600080fd5b813560206132e08261329f565b6040516132ed8282613273565b83815260059390931b850182019282810191508684111561330d57600080fd5b8286015b8481101561333157803561332481613166565b8352918301918301613311565b509695505050505050565b60006020828403121561334e57600080fd5b81356001600160401b0381111561336457600080fd5b613370848285016132c2565b949350505050565b80151581146117c657600080fd5b60006020828403121561339857600080fd5b81356131da81613378565b600080600080600060a086880312156133bb57600080fd5b85356133c681613166565b94506020860135935060408601356133dd81613166565b925060608601356133ed81613166565b949793965091946080013592915050565b600082601f83011261340f57600080fd5b8135602061341c8261329f565b6040516134298282613273565b83815260059390931b850182019282810191508684111561344957600080fd5b8286015b84811015613331578035835291830191830161344d565b60006001600160401b0383111561347d5761347d61325d565b604051613494601f8501601f191660200182613273565b8091508381528484840111156134a957600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126134d257600080fd5b6131da83833560208501613464565b600080600080600060a086880312156134f957600080fd5b853561350481613166565b9450602086013561351481613166565b935060408601356001600160401b038082111561353057600080fd5b61353c89838a016133fe565b9450606088013591508082111561355257600080fd5b61355e89838a016133fe565b9350608088013591508082111561357457600080fd5b50613581888289016134c1565b9150509295509295909350565b6000602082840312156135a057600080fd5b81356131da81613166565b600080604083850312156135be57600080fd5b82356001600160401b03808211156135d557600080fd5b6135e1868387016132c2565b935060208501359150808211156135f757600080fd5b50613604858286016133fe565b9150509250929050565b600081518084526020808501945080840160005b8381101561363e57815187529582019590820190600101613622565b509495945050505050565b6020815260006131da602083018461360e565b60006020828403121561366e57600080fd5b81356001600160401b0381111561368457600080fd5b8201601f8101841361369557600080fd5b61337084823560208401613464565b6000602082840312156136b657600080fd5b81356001600160401b038111156136cc57600080fd5b613370848285016133fe565b6000806000604084860312156136ed57600080fd5b8335925060208401356001600160401b038082111561370b57600080fd5b818601915086601f83011261371f57600080fd5b81358181111561372e57600080fd5b87602082850101111561374057600080fd5b6020830194508093505050509250925092565b6000806040838503121561376657600080fd5b823561377181613166565b9150602083013561378181613378565b809150509250929050565b6000806040838503121561379f57600080fd5b82356137aa81613166565b9150602083013561378181613166565b600080600080600060a086880312156137d257600080fd5b85356137dd81613166565b945060208601356137ed81613166565b9350604086013592506060860135915060808601356001600160401b0381111561381657600080fd5b613581888289016134c1565b600181811c9082168061383657607f821691505b60208210810361385657634e487b7160e01b600052602260045260246000fd5b50919050565b600080845461386a81613822565b600182811680156138825760018114613897576138c6565b60ff19841687528215158302870194506138c6565b8860005260208060002060005b858110156138bd5781548a8201529084019082016138a4565b50505082870194505b5050505083516138da8183602088016131e1565b64173539b7b760d91b9101908152600501949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610df857610df8613909565b60006001820161394457613944613909565b5060010190565b60006020828403121561395d57600080fd5b5051919050565b60006020828403121561397657600080fd5b81516131da81613166565b601f821115611dd457600081815260208120601f850160051c810160208610156139a85750805b601f850160051c820191505b8181101561155f578281556001016139b4565b81516001600160401b038111156139e0576139e061325d565b6139f4816139ee8454613822565b84613981565b602080601f831160018114613a295760008415613a115750858301515b600019600386901b1c1916600185901b17855561155f565b600085815260208120601f198616915b82811015613a5857888601518255948401946001909101908401613a39565b5085821015613a765787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215613a9857600080fd5b81516131da81613378565b81810381811115610df857610df8613909565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0388811682526020820188905286811660408301528581166060830152841660808201526001600160e01b0319831660a082015260e060c08201819052600090613b1f90830184613205565b9998505050505050505050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b600082613b9757634e487b7160e01b600052601260045260246000fd5b500690565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613bd690830184613205565b979650505050505050565b600060208284031215613bf357600080fd5b81516131da816131a7565b600060033d1115613c175760046000803e5060005160e01c5b90565b600060443d1015613c285790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613c5757505050505090565b8285019150815181811115613c6f5750505050505090565b843d8701016020828501011115613c895750505050505090565b613c9860208286010187613273565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613d8d604083018561360e565b8281036020840152613d9f818561360e565b95945050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613dd49083018661360e565b8281036060840152613de6818661360e565b90508281036080840152613dfa8185613205565b9897505050505050505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a264697066735822122056559dd7da68d13027f83c0432c43bffc5e6dbd94194edfb157e1abd4d09828864736f6c63430008110033000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd
Deployed Bytecode
0x6080604052600436106103f95760003560e01c80636d3ced2911610211578063a7a2f9f511610122578063e68abbbe116100b0578063f2fde38b11610077578063f2fde38b14610cc2578063f4a0a52814610ce2578063f6f0049614610d02578063f7e832c914610d22578063fca21d1114610d3857005b8063e68abbbe14610be9578063e985e9c514610c19578063ee6d9d6d14610c62578063eec1cbb714610c82578063f242432a14610ca257005b8063bf90fb4e116100f4578063bf90fb4e14610b4e578063c01c008914610b6e578063c30a850f14610b83578063c9d9030614610b99578063e185a2cc14610bc957005b8063a7a2f9f514610af3578063a93304f114610b13578063aeecfd8b14610b1b578063b34738d314610b2e57005b80639530256f1161019f578063a22cb46511610171578063a22cb46514610a5b578063a2309ff814610a7b578063a36ff4d814610a91578063a475b5dd14610ab1578063a654102e14610ac657005b80639530256f146109f057806395d89b4114610a105780639a7110fe14610a25578063a19954af14610a4557005b80637d2788ac116101e35780637d2788ac14610935578063851244f7146109555780638c73681c146109855780638da5cb5b146109b2578063943431bf146109d057005b80636d3ced29146108c15780636f2eec90146108d6578063715018a6146108ec57806371bab6661461090157005b806341f434341161030b5780635c975abb11610299578063618665db1161026b578063618665db14610836578063656ec7ac1461085657806365701b0d146108765780636817c76c1461088b5780636c4f0698146108a157005b80635c975abb146107c05780635cb2b649146107e15780635e4b68f6146108015780636128cf921461081657005b80634e1273f4116102dd5780634e1273f414610701578063504875bf1461072e578063518302271461074f57806355f804b31461077057806359db9d871461079057005b806341f4343414610687578063438a67e7146106a957806343b70f7a146106d65780634b27d3c5146106ec57005b806318160ddd1161038857806325bbb9df1161035a57806325bbb9df146105da57806325d12581146105fa5780632eb2c2d61461061a57806332caae2d1461063a57806334ce7f8e1461065a57005b806318160ddd146105435780631bf828631461055957806321224fa11461056c578063219c0eee1461058c57005b80630e89341c116103cc5780630e89341c1461049d57806312f7b963146104bd57806316c38b3c146104dd57806317881cbf146104fd57806317fd6db61461051357005b8062fdd58e1461040257806301414a1d1461043557806301ffc9a71461044b57806306fdde031461047b57005b3661040057005b005b34801561040e57600080fd5b5061042261041d36600461317b565b610d65565b6040519081526020015b60405180910390f35b34801561044157600080fd5b50610422600f5481565b34801561045757600080fd5b5061046b6104663660046131bd565b610dfe565b604051901515815260200161042c565b34801561048757600080fd5b50610490610e4e565b60405161042c9190613231565b3480156104a957600080fd5b506104906104b8366004613244565b610edc565b3480156104c957600080fd5b506104006104d836600461333c565b610f63565b3480156104e957600080fd5b506104006104f8366004613386565b610ffe565b34801561050957600080fd5b5061042260155481565b34801561051f57600080fd5b5061046b61052e366004613244565b6000908152601a602052604090205460ff1690565b34801561054f57600080fd5b5061042260135481565b610400610567366004613244565b611024565b34801561057857600080fd5b5061042261058736600461317b565b61141b565b34801561059857600080fd5b506105c26105a7366004613244565b601d602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161042c565b3480156105e657600080fd5b506104006105f53660046133a3565b61144b565b34801561060657600080fd5b506008546105c2906001600160a01b031681565b34801561062657600080fd5b506104006106353660046134e1565b61149c565b34801561064657600080fd5b50610422610655366004613244565b611567565b34801561066657600080fd5b5061042261067536600461358e565b60216020526000908152604090205481565b34801561069357600080fd5b506105c26daaeb6d7670e522a718067333cd4e81565b3480156106b557600080fd5b506104226106c436600461358e565b601b6020526000908152604090205481565b3480156106e257600080fd5b5061042260125481565b3480156106f857600080fd5b50610400611588565b34801561070d57600080fd5b5061072161071c3660046135ab565b61161d565b60405161042c9190613649565b34801561073a57600080fd5b50600a5461046b90600160b01b900460ff1681565b34801561075b57600080fd5b50600a5461046b90600160a01b900460ff1681565b34801561077c57600080fd5b5061040061078b36600461365c565b611746565b34801561079c57600080fd5b5061046b6107ab366004613244565b601a6020526000908152604090205460ff1681565b3480156107cc57600080fd5b50600a5461046b90600160a81b900460ff1681565b3480156107ed57600080fd5b506009546105c2906001600160a01b031681565b34801561080d57600080fd5b5061040061175a565b34801561082257600080fd5b50610400610831366004613244565b6117c9565b34801561084257600080fd5b5061040061085136600461358e565b611a04565b34801561086257600080fd5b506104006108713660046136a4565b611a2e565b34801561088257600080fd5b50610400611a6e565b34801561089757600080fd5b5061042260165481565b3480156108ad57600080fd5b506104006108bc36600461358e565b611aea565b3480156108cd57600080fd5b50610400611b14565b3480156108e257600080fd5b5061042260105481565b3480156108f857600080fd5b50610400611b86565b34801561090d57600080fd5b506105c27f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd81565b34801561094157600080fd5b50610400610950366004613386565b611b9a565b34801561096157600080fd5b5061046b610970366004613244565b601c6020526000908152604090205460ff1681565b34801561099157600080fd5b506104226109a036600461358e565b60226020526000908152604090205481565b3480156109be57600080fd5b506003546001600160a01b03166105c2565b3480156109dc57600080fd5b506104006109eb366004613244565b611bc0565b3480156109fc57600080fd5b50610400610a0b3660046136d8565b611bcd565b348015610a1c57600080fd5b50610490611db3565b348015610a3157600080fd5b506007546105c2906001600160a01b031681565b348015610a5157600080fd5b50610422600b5481565b348015610a6757600080fd5b50610400610a76366004613753565b611dc0565b348015610a8757600080fd5b50610422600e5481565b348015610a9d57600080fd5b506006546105c2906001600160a01b031681565b348015610abd57600080fd5b50610400611dd9565b348015610ad257600080fd5b50610422610ae1366004613244565b601f6020526000908152604090205481565b348015610aff57600080fd5b50610400610b0e366004613244565b611df6565b610400611e03565b610400610b293660046136a4565b611f96565b348015610b3a57600080fd5b50610400610b49366004613244565b611fd6565b348015610b5a57600080fd5b50600a546105c2906001600160a01b031681565b348015610b7a57600080fd5b50600e54610422565b348015610b8f57600080fd5b5061042260115481565b348015610ba557600080fd5b5061046b610bb4366004613244565b60009081526019602052604090205460ff1690565b348015610bd557600080fd5b50610400610be436600461365c565b611ff7565b348015610bf557600080fd5b5061046b610c04366004613244565b60196020526000908152604090205460ff1681565b348015610c2557600080fd5b5061046b610c3436600461378c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610c6e57600080fd5b50610422610c7d366004613244565b61200b565b348015610c8e57600080fd5b50610721610c9d36600461358e565b61201b565b348015610cae57600080fd5b50610400610cbd3660046137ba565b612085565b348015610cce57600080fd5b50610400610cdd36600461358e565b6120ef565b348015610cee57600080fd5b50610400610cfd366004613244565b612165565b348015610d0e57600080fd5b50610400610d1d36600461378c565b612172565b348015610d2e57600080fd5b5061042260145481565b348015610d4457600080fd5b50610422610d53366004613244565b601e6020526000908152604090205481565b60006001600160a01b038316610dd55760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610e2f57506001600160e01b031982166303a24d0760e21b145b80610df857506301ffc9a760e01b6001600160e01b0319831614610df8565b60048054610e5b90613822565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8790613822565b8015610ed45780601f10610ea957610100808354040283529160200191610ed4565b820191906000526020600020905b815481529060010190602001808311610eb757829003601f168201915b505050505081565b6060601354821115610f1457505060408051808201909152601081526f092c840d2e640c4caf2dedcc840dac2f60831b602082015290565b600a54600160a01b900460ff1615610f5857600c610f318361225b565b604051602001610f4292919061385c565b6040516020818303038152906040529050919050565b600d610f318361225b565b610f6b6122ed565b60115481511115610f8f57604051637e1d76fb60e01b815260040160405180910390fd5b60005b8151811015610ffa57610fe8828281518110610fb057610fb06138f3565b602002602001015182601254610fc6919061391f565b610fd190600161391f565b600160405180602001604052806000815250612347565b80610ff281613932565b915050610f92565b5050565b6110066122ed565b600a8054911515600160a81b0260ff60a81b19909216919091179055565b600a54600160a81b900460ff161561104f576040516306ce844d60e01b815260040160405180910390fd5b6015543390600003611074576040516306ce844d60e01b815260040160405180910390fd5b601254600e54036110985760405163d05cb60960e01b815260040160405180910390fd5b600f546016546110a8919061391f565b3410156110c85760405163356680b760e01b815260040160405180910390fd5b6008546040516370a0823160e01b81526001600160a01b038381166004830152909116906370a0823190602401602060405180830381865afa158015611112573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611136919061394b565b60000361115657604051638c7c198160e01b815260040160405180910390fd5b6008546040516331a9108f60e11b8152600481018490526001600160a01b03838116921690636352211e90602401602060405180830381865afa1580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c59190613964565b6001600160a01b0316146111ec576040516379d7dc0560e11b815260040160405180910390fd5b6008546040516370a0823160e01b81526001600160a01b038381166004830152909116906370a0823190602401602060405180830381865afa158015611236573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125a919061394b565b6001600160a01b0382166000908152602160205260409020541115611292576040516359fdd76d60e01b815260040160405180910390fd5b6000828152601a602052604090205460ff16156112c25760405163188a552b60e01b815260040160405180910390fd5b6000828152601a60205260408120805460ff19166001179055600e8054916112e983613932565b9091555050601480549060006112fe83613932565b90915550506001600160a01b038116600090815260216020526040812080549161132783613932565b90915550506018541561135b5761135b601860008154811061134b5761134b6138f3565b9060005260206000200154612449565b600a54600f546040516000926001600160a01b031691908381818185875af1925050503d80600081146113aa576040519150601f19603f3d011682016040523d82523d6000602084013e6113af565b606091505b50509050806113d15760405163096dc0e160e01b815260040160405180910390fd5b6113df82600261270f612544565b60408051848152600160208201526001600160a01b038416916000918391600080516020613e07833981519152910160405180910390a4505050565b60208052816000526040600020818154811061143657600080fd5b90600052602060002001600091509150505481565b6114536122ed565b600680546001600160a01b03199081166001600160a01b0397881617909155600b94909455600a8054851693861693909317909255600980549093169316929092179055600f55565b846001600160a01b03811633146114b6576114b6336126c0565b6001600160a01b038616156115525760005b8451811015611550576114f4878683815181106114e7576114e76138f3565b6020026020010151612779565b6001600160a01b03861660009081526020805260409020855186908390811061151f5761151f6138f3565b602090810291909101810151825460018101845560009384529190922001558061154881613932565b9150506114c8565b505b61155f86868686866128f6565b505050505050565b6018818154811061157757600080fd5b600091825260209091200154905081565b6115906122ed565b600654600a54604051631d414cbd60e01b81526001600160a01b03928316600482015290821660248201527f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd90911690631d414cbd90604401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50505050565b606081518351146116825760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610dcc565b600083516001600160401b0381111561169d5761169d61325d565b6040519080825280602002602001820160405280156116c6578160200160208202803683370190505b50905060005b845181101561173e576117118582815181106116ea576116ea6138f3565b6020026020010151858381518110611704576117046138f3565b6020026020010151610d65565b828281518110611723576117236138f3565b602090810291909101015261173781613932565b90506116cc565b509392505050565b61174e6122ed565b600c610ffa82826139c7565b6117626122ed565b60006010546001611773919061391f565b90505b60125481116117c657601780546001810182556000919091527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1501819055806117be81613932565b915050611776565b50565b600a54600160a81b900460ff16156117f4576040516306ce844d60e01b815260040160405180910390fd5b6015543390600003611819576040516306ce844d60e01b815260040160405180910390fd5b601254600e540361183d5760405163d05cb60960e01b815260040160405180910390fd5b6008546040516370a0823160e01b81526001600160a01b038381166004830152909116906370a0823190602401602060405180830381865afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab919061394b565b6000036118cb57604051638c7c198160e01b815260040160405180910390fd5b6008546040516331a9108f60e11b8152600481018490526001600160a01b03838116921690636352211e90602401602060405180830381865afa158015611916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193a9190613964565b6001600160a01b031614611961576040516379d7dc0560e11b815260040160405180910390fd5b60008281526019602052604090205460ff161561199157604051634208e2d760e11b815260040160405180910390fd5b6000828152601960205260408120805460ff19166001179055600e8054916119b883613932565b91905055506119c981600184612544565b60408051838152600160208201526001600160a01b038316916000918391600080516020613e07833981519152910160405180910390a45050565b611a0c6122ed565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8151811015610ffa57611a5c828281518110611a4f57611a4f6138f3565b60200260200101516117c9565b80611a6681613932565b915050611a31565b611a766122ed565b6007546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611ac3576040519150601f19603f3d011682016040523d82523d6000602084013e611ac8565b606091505b50509050806117c65760405163096dc0e160e01b815260040160405180910390fd5b611af26122ed565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b611b1c6122ed565b60015b60105481116117c65760008181526019602052604090205460ff16611b7457601780546001810182556000919091527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15018190555b80611b7e81613932565b915050611b1f565b611b8e6122ed565b611b986000612942565b565b611ba26122ed565b600a8054911515600160b01b0260ff60b01b19909216919091179055565b611bc86122ed565b601555565b336001600160a01b037f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd1614611c3e5760405162461bcd60e51b8152602060048201526016602482015275043616c6c6572206e6f74204169726e6f6465205252560541b6044820152606401610dcc565b6000838152601c602052604090205460ff16611c6d576040516311f47ed360e31b815260040160405180910390fd5b6000838152601c60205260408120805460ff19169055611c8f828401846136a4565b6000858152601d6020908152604080832054601e835281842054601f909352908320549394506001600160a01b03169290916001839003611cd1575080611d20565b600a54600160b01b900460ff1615611d0d57611d0685600081518110611cf957611cf96138f3565b6020026020010151612994565b9050611d20565b601454601054611d1d919061391f565b90505b6001600160a01b038416600090815260208080526040808320805460018181018355918552838520018590558151928301909152918152611d65918691849190612347565b604080516001600160a01b0386168152602081018a905282917f1a724b7cebc96fef75b77ab5a4229975fb491821e8468cbad40ace53ac90e0e9910160405180910390a25050505050505050565b60058054610e5b90613822565b81611dca816126c0565b611dd48383612a10565b505050565b611de16122ed565b600a805460ff60a01b1916600160a01b179055565b611dfe6122ed565b600f55565b600a54600160a81b900460ff1615611e2e576040516306ce844d60e01b815260040160405180910390fd5b6015543390600003611e53576040516306ce844d60e01b815260040160405180910390fd5b600f54601654611e63919061391f565b341015611e835760405163356680b760e01b815260040160405180910390fd5b601254600e5403611ea75760405163d05cb60960e01b815260040160405180910390fd5b6001600160a01b03811660009081526022602052604090205415611ede576040516359fdd76d60e01b815260040160405180910390fd5b60148054906000611eee83613932565b909155505060185415611f1257611f12601860008154811061134b5761134b6138f3565b600a54600f546040516000926001600160a01b031691908381818185875af1925050503d8060008114611f61576040519150601f19603f3d011682016040523d82523d6000602084013e611f66565b606091505b5050905080611f885760405163096dc0e160e01b815260040160405180910390fd5b610ffa82600361270f612544565b60005b8151811015610ffa57611fc4828281518110611fb757611fb76138f3565b6020026020010151611024565b80611fce81613932565b915050611f99565b611fde6122ed565b6011819055601254611ff190829061391f565b60135550565b611fff6122ed565b600d610ffa82826139c7565b6017818154811061157757600080fd5b6001600160a01b0381166000908152602080805260409182902080548351818402810184019094528084526060939283018282801561207957602002820191906000526020600020905b815481526020019060010190808311612065575b50505050509050919050565b846001600160a01b038116331461209f5761209f336126c0565b6001600160a01b038616156120e2576120b88685612779565b6001600160a01b038516600090815260208080526040822080546001810182559083529120018490555b61155f8686868686612a1b565b6120f76122ed565b6001600160a01b03811661215c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dcc565b6117c681612942565b61216d6122ed565b601655565b61217a6122ed565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90849083906370a0823190602401602060405180830381865afa1580156121c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ec919061394b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015612237573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd49190613a86565b6060600061226883612a60565b60010190506000816001600160401b038111156122875761228761325d565b6040519080825280601f01601f1916602001820160405280156122b1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846122bb57509392505050565b6003546001600160a01b03163314611b985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610dcc565b6001600160a01b0384166123a75760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610dcc565b3360006123b385612b38565b905060006123c085612b38565b90506000868152602081815260408083206001600160a01b038b168452909152812080548792906123f290849061391f565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020613e07833981519152910160405180910390a461244083600089898989612b83565b50505050505050565b60175460000361246c57604051632aafbbcd60e01b815260040160405180910390fd5b60125481111561248f57604051631bf4348160e31b815260040160405180910390fd5b60005b601754811015610ffa5781601782815481106124b0576124b06138f3565b90600052602060002001540361253257601780546124d090600190613aa3565b815481106124e0576124e06138f3565b9060005260206000200154601782815481106124fe576124fe6138f3565b600091825260209091200155601780548061251b5761251b613ab6565b600190038181906000526020600020016000905590555b8061253c81613932565b915050612492565b600654600b54600954600a546040805161317560f01b60208201526373697a6560e01b818301526001606080830191909152825180830390910181526080820192839052636e6be03f60e01b9092526000956001600160a01b037f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd811696636e6be03f966125ee969383169591949083169392909216913091639530256f60e01b91608401613acc565b6020604051808303816000875af115801561260d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612631919061394b565b6000818152601c602090815260408083208054600160ff199091168117909155601d835281842080546001600160a01b0319166001600160a01b038b16179055601e8352818420889055601f8352928190208690555191825291925082917f6529de56040715a55618ee5797cd3bc856b65ded8fee01e2a24c8481de9e2aaf910160405180910390a250505050565b6daaeb6d7670e522a718067333cd4e3b156117c657604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561272d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127519190613a86565b6117c657604051633b79c77360e21b81526001600160a01b0382166004820152602401610dcc565b6001600160a01b038216600090815260208052604081205490036127b05760405163259a4f3760e01b815260040160405180910390fd5b6012548111156127d357604051631bf4348160e31b815260040160405180910390fd5b60005b6001600160a01b0383166000908152602080526040902054811015611dd4576001600160a01b03831660009081526020805260409020805483919083908110612821576128216138f3565b9060005260206000200154036128e4576001600160a01b03831660009081526020805260409020805461285690600190613aa3565b81548110612866576128666138f3565b60009182526020808320909101546001600160a01b0386168352908052604090912080548390811061289a5761289a6138f3565b60009182526020808320909101929092556001600160a01b0385168152908052604090208054806128cd576128cd613ab6565b600190038181906000526020600020016000905590555b806128ee81613932565b9150506127d6565b6001600160a01b03851633148061291257506129128533610c34565b61292e5760405162461bcd60e51b8152600401610dcc90613b2c565b61293b8585858585612cde565b5050505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60175460009081906001906129a99085613b7a565b6129b39190613aa3565b90506000601782815481106129ca576129ca6138f3565b60009182526020822001546018805460018101825592527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e909101819055949350505050565b610ffa338383612eb3565b6001600160a01b038516331480612a375750612a378533610c34565b612a535760405162461bcd60e51b8152600401610dcc90613b2c565b61293b8585858585612f93565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612a9f5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612acb576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612ae957662386f26fc10000830492506010015b6305f5e1008310612b01576305f5e100830492506008015b6127108310612b1557612710830492506004015b60648310612b27576064830492506002015b600a8310610df85760010192915050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612b7257612b726138f3565b602090810291909101015292915050565b6001600160a01b0384163b1561155f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612bc79089908990889088908890600401613b9c565b6020604051808303816000875af1925050508015612c02575060408051601f3d908101601f19168201909252612bff91810190613be1565b60015b612cae57612c0e613bfe565b806308c379a003612c475750612c22613c1a565b80612c2d5750612c49565b8060405162461bcd60e51b8152600401610dcc9190613231565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610dcc565b6001600160e01b0319811663f23a6e6160e01b146124405760405162461bcd60e51b8152600401610dcc90613ca3565b8151835114612d405760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610dcc565b6001600160a01b038416612d665760405162461bcd60e51b8152600401610dcc90613ceb565b3360005b8451811015612e4d576000858281518110612d8757612d876138f3565b602002602001015190506000858381518110612da557612da56138f3565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015612df55760405162461bcd60e51b8152600401610dcc90613d30565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612e3290849061391f565b9250508190555050505080612e4690613932565b9050612d6a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612e9d929190613d7a565b60405180910390a461155f8187878787876130ab565b816001600160a01b0316836001600160a01b031603612f265760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610dcc565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416612fb95760405162461bcd60e51b8152600401610dcc90613ceb565b336000612fc585612b38565b90506000612fd285612b38565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156130155760405162461bcd60e51b8152600401610dcc90613d30565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061305290849061391f565b909155505060408051888152602081018890526001600160a01b03808b16928c82169291881691600080516020613e07833981519152910160405180910390a46130a0848a8a8a8a8a612b83565b505050505050505050565b6001600160a01b0384163b1561155f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906130ef9089908990889088908890600401613da8565b6020604051808303816000875af192505050801561312a575060408051601f3d908101601f1916820190925261312791810190613be1565b60015b61313657612c0e613bfe565b6001600160e01b0319811663bc197c8160e01b146124405760405162461bcd60e51b8152600401610dcc90613ca3565b6001600160a01b03811681146117c657600080fd5b6000806040838503121561318e57600080fd5b823561319981613166565b946020939093013593505050565b6001600160e01b0319811681146117c657600080fd5b6000602082840312156131cf57600080fd5b81356131da816131a7565b9392505050565b60005b838110156131fc5781810151838201526020016131e4565b50506000910152565b6000815180845261321d8160208601602086016131e1565b601f01601f19169290920160200192915050565b6020815260006131da6020830184613205565b60006020828403121561325657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156132985761329861325d565b6040525050565b60006001600160401b038211156132b8576132b861325d565b5060051b60200190565b600082601f8301126132d357600080fd5b813560206132e08261329f565b6040516132ed8282613273565b83815260059390931b850182019282810191508684111561330d57600080fd5b8286015b8481101561333157803561332481613166565b8352918301918301613311565b509695505050505050565b60006020828403121561334e57600080fd5b81356001600160401b0381111561336457600080fd5b613370848285016132c2565b949350505050565b80151581146117c657600080fd5b60006020828403121561339857600080fd5b81356131da81613378565b600080600080600060a086880312156133bb57600080fd5b85356133c681613166565b94506020860135935060408601356133dd81613166565b925060608601356133ed81613166565b949793965091946080013592915050565b600082601f83011261340f57600080fd5b8135602061341c8261329f565b6040516134298282613273565b83815260059390931b850182019282810191508684111561344957600080fd5b8286015b84811015613331578035835291830191830161344d565b60006001600160401b0383111561347d5761347d61325d565b604051613494601f8501601f191660200182613273565b8091508381528484840111156134a957600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126134d257600080fd5b6131da83833560208501613464565b600080600080600060a086880312156134f957600080fd5b853561350481613166565b9450602086013561351481613166565b935060408601356001600160401b038082111561353057600080fd5b61353c89838a016133fe565b9450606088013591508082111561355257600080fd5b61355e89838a016133fe565b9350608088013591508082111561357457600080fd5b50613581888289016134c1565b9150509295509295909350565b6000602082840312156135a057600080fd5b81356131da81613166565b600080604083850312156135be57600080fd5b82356001600160401b03808211156135d557600080fd5b6135e1868387016132c2565b935060208501359150808211156135f757600080fd5b50613604858286016133fe565b9150509250929050565b600081518084526020808501945080840160005b8381101561363e57815187529582019590820190600101613622565b509495945050505050565b6020815260006131da602083018461360e565b60006020828403121561366e57600080fd5b81356001600160401b0381111561368457600080fd5b8201601f8101841361369557600080fd5b61337084823560208401613464565b6000602082840312156136b657600080fd5b81356001600160401b038111156136cc57600080fd5b613370848285016133fe565b6000806000604084860312156136ed57600080fd5b8335925060208401356001600160401b038082111561370b57600080fd5b818601915086601f83011261371f57600080fd5b81358181111561372e57600080fd5b87602082850101111561374057600080fd5b6020830194508093505050509250925092565b6000806040838503121561376657600080fd5b823561377181613166565b9150602083013561378181613378565b809150509250929050565b6000806040838503121561379f57600080fd5b82356137aa81613166565b9150602083013561378181613166565b600080600080600060a086880312156137d257600080fd5b85356137dd81613166565b945060208601356137ed81613166565b9350604086013592506060860135915060808601356001600160401b0381111561381657600080fd5b613581888289016134c1565b600181811c9082168061383657607f821691505b60208210810361385657634e487b7160e01b600052602260045260246000fd5b50919050565b600080845461386a81613822565b600182811680156138825760018114613897576138c6565b60ff19841687528215158302870194506138c6565b8860005260208060002060005b858110156138bd5781548a8201529084019082016138a4565b50505082870194505b5050505083516138da8183602088016131e1565b64173539b7b760d91b9101908152600501949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610df857610df8613909565b60006001820161394457613944613909565b5060010190565b60006020828403121561395d57600080fd5b5051919050565b60006020828403121561397657600080fd5b81516131da81613166565b601f821115611dd457600081815260208120601f850160051c810160208610156139a85750805b601f850160051c820191505b8181101561155f578281556001016139b4565b81516001600160401b038111156139e0576139e061325d565b6139f4816139ee8454613822565b84613981565b602080601f831160018114613a295760008415613a115750858301515b600019600386901b1c1916600185901b17855561155f565b600085815260208120601f198616915b82811015613a5857888601518255948401946001909101908401613a39565b5085821015613a765787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215613a9857600080fd5b81516131da81613378565b81810381811115610df857610df8613909565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0388811682526020820188905286811660408301528581166060830152841660808201526001600160e01b0319831660a082015260e060c08201819052600090613b1f90830184613205565b9998505050505050505050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b600082613b9757634e487b7160e01b600052601260045260246000fd5b500690565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613bd690830184613205565b979650505050505050565b600060208284031215613bf357600080fd5b81516131da816131a7565b600060033d1115613c175760046000803e5060005160e01c5b90565b600060443d1015613c285790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613c5757505050505090565b8285019150815181811115613c6f5750505050505090565b843d8701016020828501011115613c895750505050505090565b613c9860208286010187613273565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613d8d604083018561360e565b8281036020840152613d9f818561360e565b95945050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613dd49083018661360e565b8281036060840152613de6818661360e565b90508281036080840152613dfa8185613205565b9897505050505050505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a264697066735822122056559dd7da68d13027f83c0432c43bffc5e6dbd94194edfb157e1abd4d09828864736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd
-----Decoded View---------------
Arg [0] : _airnodeRrp (address): 0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd
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.