ERC-1155
Overview
Max Total Supply
1,535 QUEEN
Holders
568
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:
TheQueen
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "../ERC721AQueryable.sol"; enum Stage { HiveClosed, QueenDinner, Sale } interface IFood { function holderClaim(address holder, uint256 amount) external; } contract TheQueen is ERC1155, ERC2981, Ownable { using Address for address payable; using Strings for uint256; uint32 public constant TOTAL_SUPPLY = 10000; uint32 public constant WALLET_LIMIT = 3; uint32 public constant BASIC_SUPPLY = 10000; uint32 public constant BASIC_ID = 0; Stage public _stage = Stage.HiveClosed; address public constant BLACKHOLE = 0x000000000000000000000000000000000000dEaD; IERC721 public immutable _swarmGas; IFood public immutable _food; uint256 public immutable _swarmFoodPerPair; struct Status { uint32 basicSupply; uint32 basicMinted; uint32 walletLimit; uint256 ethPrice; uint32 userMinted; bool started; bool soldout; } uint32 public _basicMinted; mapping(address => uint32) public _userMinted; address public _burner; bool public _started; uint256 public _ethPrice; string public _metadataURI = "https://meta.the-swarm.xyz/thequeen/json/"; constructor( address swarmGas, address food, uint256 swarmFoodPerPair ) ERC1155(""){ _swarmGas = IERC721(swarmGas); _food = IFood(food); _swarmFoodPerPair = swarmFoodPerPair; } function claim(uint256[] memory tokenIds) external { require(_stage == Stage.QueenDinner, "Hive: Claiming is not started yet"); require(tokenIds.length > 0 && tokenIds.length % 2 == 0, "Hive: You must provide token pairs"); uint32 pairs = uint32(tokenIds.length / 2); require(tx.origin == msg.sender, "Swarm gas !"); _userMinted[msg.sender] += pairs; require(_userMinted[msg.sender] <= WALLET_LIMIT, "The queen say no more"); for (uint256 i = 0; i < tokenIds.length; ) { _swarmGas.transferFrom(msg.sender, BLACKHOLE, tokenIds[i]); unchecked { i++; } } internalClaim(msg.sender, BASIC_ID, pairs); _food.holderClaim(msg.sender, pairs * _swarmFoodPerPair); } function internalClaim( address minter, uint32 id, uint32 amount ) internal { if (id == BASIC_ID) { _basicMinted += amount; require(_basicMinted <= BASIC_SUPPLY, "The queen say no more"); } else { require(false, "This is not the Queen"); } _mint(minter, id, amount, ""); } function mint(uint32 amount, bool useEth) external payable { require(_stage == Stage.Sale, "Hive: Sale is not started"); require(tx.origin == msg.sender, "Swarm gas !"); _userMinted[msg.sender] += amount; require(_userMinted[msg.sender] <= WALLET_LIMIT, "The queen say no more"); require(msg.value == _ethPrice * amount, "Swarm need more gas"); internalMint(msg.sender, BASIC_ID, amount); } function internalMint( address minter, uint32 id, uint32 amount ) internal { if (id == BASIC_ID) { _basicMinted += amount; require(_basicMinted <= BASIC_SUPPLY, "The queen say no more"); } else { require(false, "This is not the Queen"); } _mint(minter, id, amount, ""); } function burn( address who, uint32 amount, uint32 id ) external { require(msg.sender == _burner, "Consume"); _burn(who, id, amount); } function _status(address minter) public view returns (Status memory) { return Status({ basicSupply: BASIC_SUPPLY, basicMinted: _basicMinted, walletLimit: WALLET_LIMIT, ethPrice: _ethPrice, userMinted: _userMinted[minter], started: _started, soldout: _basicMinted >= BASIC_SUPPLY }); } function uri(uint256 id) public view override returns (string memory) { string memory baseURI = _metadataURI; return string(abi.encodePacked(baseURI, "queen.json")); } function setMetadataURI(string memory metadataURI) external onlyOwner { _metadataURI = metadataURI; } function setBurner(address burner) external onlyOwner { _burner = burner; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC1155) returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == type(IERC1155).interfaceId || super.supportsInterface(interfaceId); } function setFeeNumerator(uint96 feeNumerator) public onlyOwner { _setDefaultRoyalty(owner(), feeNumerator); } function setEthPrice(uint256 price) public onlyOwner { _ethPrice = price; } function withdrawFund(address tokenAddress) external onlyOwner { payable(msg.sender).sendValue(address(this).balance); } function name() public pure returns (string memory) { return "The Queen"; } function symbol() public pure returns (string memory) { return "QUEEN"; } function setStage(Stage stage) external onlyOwner { _stage = stage; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import "../ERC721A.sol"; error InvalidQueryRange(); /** * @title ERC721A Queryable * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * - `addr` = `address(0)` * - `startTimestamp` = `0` * - `burned` = `false` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ function explicitOwnershipOf(uint256 tokenId) public view returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _currentIndex) { return ownership; } ownership = _ownerships[tokenId]; if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start` < `stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _currentIndex; // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, _currentIndex)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(totalSupply) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K pfp collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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: balance query for the zero address"); 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 owner nor 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: transfer caller is not owner nor 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}. * * 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` * * 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}. * * 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 a {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 `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 _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 // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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.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/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 be 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.7.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev 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 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.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"swarmGas","type":"address"},{"internalType":"address","name":"food","type":"address"},{"internalType":"uint256","name":"swarmFoodPerPair","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"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"},{"inputs":[],"name":"BASIC_ID","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASIC_SUPPLY","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLACKHOLE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WALLET_LIMIT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_basicMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_burner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ethPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_food","outputs":[{"internalType":"contract IFood","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_metadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_stage","outputs":[{"internalType":"enum Stage","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"_status","outputs":[{"components":[{"internalType":"uint32","name":"basicSupply","type":"uint32"},{"internalType":"uint32","name":"basicMinted","type":"uint32"},{"internalType":"uint32","name":"walletLimit","type":"uint32"},{"internalType":"uint256","name":"ethPrice","type":"uint256"},{"internalType":"uint32","name":"userMinted","type":"uint32"},{"internalType":"bool","name":"started","type":"bool"},{"internalType":"bool","name":"soldout","type":"bool"}],"internalType":"struct TheQueen.Status","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_swarmFoodPerPair","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_swarmGas","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_userMinted","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"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":"address","name":"who","type":"address"},{"internalType":"uint32","name":"amount","type":"uint32"},{"internalType":"uint32","name":"id","type":"uint32"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","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":"uint32","name":"amount","type":"uint32"},{"internalType":"bool","name":"useEth","type":"bool"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"id","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":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"burner","type":"address"}],"name":"setBurner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setEthPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setFeeNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"metadataURI","type":"string"}],"name":"setMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Stage","name":"stage","type":"uint8"}],"name":"setStage","outputs":[],"stateMutability":"nonpayable","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":"pure","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":"address","name":"tokenAddress","type":"address"}],"name":"withdrawFund","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040526000600560146101000a81548160ff021916908360028111156200002d576200002c6200022e565b5b0217905550604051806060016040528060298152602001620063a460299139600990816200005c9190620004d7565b503480156200006a57600080fd5b50604051620063cd380380620063cd833981810160405281019062000090919062000659565b60405180602001604052806000815250620000b1816200014b60201b60201c565b50620000d2620000c66200016060201b60201c565b6200016860201b60201c565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508060c08181525050505050620006b5565b80600290816200015c9190620004d7565b5050565b600033905090565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002df57607f821691505b602082108103620002f557620002f462000297565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200035f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000320565b6200036b868362000320565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003b8620003b2620003ac8462000383565b6200038d565b62000383565b9050919050565b6000819050919050565b620003d48362000397565b620003ec620003e382620003bf565b8484546200032d565b825550505050565b600090565b62000403620003f4565b62000410818484620003c9565b505050565b5b8181101562000438576200042c600082620003f9565b60018101905062000416565b5050565b601f82111562000487576200045181620002fb565b6200045c8462000310565b810160208510156200046c578190505b620004846200047b8562000310565b83018262000415565b50505b505050565b600082821c905092915050565b6000620004ac600019846008026200048c565b1980831691505092915050565b6000620004c7838362000499565b9150826002028217905092915050565b620004e2826200025d565b67ffffffffffffffff811115620004fe57620004fd62000268565b5b6200050a8254620002c6565b620005178282856200043c565b600060209050601f8311600181146200054f57600084156200053a578287015190505b620005468582620004b9565b865550620005b6565b601f1984166200055f86620002fb565b60005b82811015620005895784890151825560018201915060208501945060208101905062000562565b86831015620005a95784890151620005a5601f89168262000499565b8355505b6001600288020188555050505b505050505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005f082620005c3565b9050919050565b6200060281620005e3565b81146200060e57600080fd5b50565b6000815190506200062281620005f7565b92915050565b620006338162000383565b81146200063f57600080fd5b50565b600081519050620006538162000628565b92915050565b600080600060608486031215620006755762000674620005be565b5b6000620006858682870162000611565b9350506020620006988682870162000611565b9250506040620006ab8682870162000642565b9150509250925092565b60805160a05160c051615caa620006fa6000396000818161153f0152611ba1015260008181610c85015261150201526000818161143d015261191a0152615caa6000f3fe60806040526004361061022e5760003560e01c80636ba4c1381161012e578063b3337638116100ab578063d9e06e8c1161006f578063d9e06e8c14610833578063e985e9c51461085e578063ea252caa1461089b578063f242432a146108c4578063f2fde38b146108ed5761022e565b8063b33376381461076d578063c01c3bcf14610798578063c267e673146107b4578063ce3cd997146107df578063d4a67623146108085761022e565b8063942494ca116100f2578063942494ca1461068857806395d89b41146106b35780639a7cfa4f146106de578063a22cb4651461071b578063a996d6ce146107445761022e565b80636ba4c138146105c9578063715018a6146105f2578063750521f5146106095780638da5cb5b14610632578063902d55a51461065d5761022e565b80631cd3a4ac116101bc5780634df22a54116101805780634df22a54146104e45780634e1273f41461050f5780635376f1a31461054c578063610936b914610575578063653a819e146105a05761022e565b80631cd3a4ac146103fc578063289bf114146104275780632a55205a146104525780632eb2c2d614610490578063351ed951146104b95761022e565b80630767516511610203578063076751651461030157806307eac2421461033e5780630e89341c1461036957806316396b63146103a657806316a2ae35146103d15761022e565b80629f926214610233578062fdd58e1461025c57806301ffc9a71461029957806306fdde03146102d6575b600080fd5b34801561023f57600080fd5b5061025a6004803603810190610255919061377d565b610916565b005b34801561026857600080fd5b50610283600480360381019061027e9190613808565b61099c565b6040516102909190613857565b60405180910390f35b3480156102a557600080fd5b506102c060048036038101906102bb91906138ca565b610a64565b6040516102cd9190613912565b60405180910390f35b3480156102e257600080fd5b506102eb610b46565b6040516102f891906139c6565b60405180910390f35b34801561030d57600080fd5b50610328600480360381019061032391906139e8565b610b83565b6040516103359190613a34565b60405180910390f35b34801561034a57600080fd5b50610353610ba6565b6040516103609190613857565b60405180910390f35b34801561037557600080fd5b50610390600480360381019061038b919061377d565b610bac565b60405161039d91906139c6565b60405180910390f35b3480156103b257600080fd5b506103bb610c65565b6040516103c89190613ac6565b60405180910390f35b3480156103dd57600080fd5b506103e6610c78565b6040516103f39190613a34565b60405180910390f35b34801561040857600080fd5b50610411610c7d565b60405161041e9190613af0565b60405180910390f35b34801561043357600080fd5b5061043c610c83565b6040516104499190613b6a565b60405180910390f35b34801561045e57600080fd5b5061047960048036038101906104749190613b85565b610ca7565b604051610487929190613bc5565b60405180910390f35b34801561049c57600080fd5b506104b760048036038101906104b29190613deb565b610e91565b005b3480156104c557600080fd5b506104ce610f32565b6040516104db9190613a34565b60405180910390f35b3480156104f057600080fd5b506104f9610f37565b6040516105069190613912565b60405180910390f35b34801561051b57600080fd5b5061053660048036038101906105319190613f7d565b610f4a565b60405161054391906140b3565b60405180910390f35b34801561055857600080fd5b50610573600480360381019061056e91906139e8565b611063565b005b34801561058157600080fd5b5061058a61110b565b6040516105979190613af0565b60405180910390f35b3480156105ac57600080fd5b506105c760048036038101906105c29190614119565b611131565b005b3480156105d557600080fd5b506105f060048036038101906105eb9190614146565b6111c1565b005b3480156105fe57600080fd5b506106076115c2565b005b34801561061557600080fd5b50610630600480360381019061062b9190614230565b61164a565b005b34801561063e57600080fd5b506106476116d9565b6040516106549190613af0565b60405180910390f35b34801561066957600080fd5b50610672611703565b60405161067f9190613a34565b60405180910390f35b34801561069457600080fd5b5061069d611709565b6040516106aa9190613a34565b60405180910390f35b3480156106bf57600080fd5b506106c861170f565b6040516106d591906139c6565b60405180910390f35b3480156106ea57600080fd5b50610705600480360381019061070091906139e8565b61174c565b6040516107129190614325565b60405180910390f35b34801561072757600080fd5b50610742600480360381019061073d919061436c565b611842565b005b34801561075057600080fd5b5061076b600480360381019061076691906139e8565b611858565b005b34801561077957600080fd5b50610782611918565b60405161078f91906143cd565b60405180910390f35b6107b260048036038101906107ad9190614414565b61193c565b005b3480156107c057600080fd5b506107c9611b9f565b6040516107d69190613857565b60405180910390f35b3480156107eb57600080fd5b5061080660048036038101906108019190614479565b611bc3565b005b34801561081457600080fd5b5061081d611c6c565b60405161082a91906139c6565b60405180910390f35b34801561083f57600080fd5b50610848611cfa565b6040516108559190613a34565b60405180910390f35b34801561086a57600080fd5b50610885600480360381019061088091906144a6565b611d10565b6040516108929190613912565b60405180910390f35b3480156108a757600080fd5b506108c260048036038101906108bd91906144e6565b611da4565b005b3480156108d057600080fd5b506108eb60048036038101906108e69190614539565b611e50565b005b3480156108f957600080fd5b50610914600480360381019061090f91906139e8565b611ef1565b005b61091e611fe8565b73ffffffffffffffffffffffffffffffffffffffff1661093c6116d9565b73ffffffffffffffffffffffffffffffffffffffff1614610992576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109899061461c565b60405180910390fd5b8060088190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a03906146ae565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b2f57507fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610b3f5750610b3e82611ff0565b5b9050919050565b60606040518060400160405280600981526020017f54686520517565656e0000000000000000000000000000000000000000000000815250905090565b60066020528060005260406000206000915054906101000a900463ffffffff1681565b60085481565b6060600060098054610bbd906146fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610be9906146fd565b8015610c365780601f10610c0b57610100808354040283529160200191610c36565b820191906000526020600020905b815481529060010190602001808311610c1957829003601f168201915b5050505050905080604051602001610c4e91906147b6565b604051602081830303815290604052915050919050565b600560149054906101000a900460ff1681565b600081565b61dead81565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000600460008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610e3c5760036040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610e4661206a565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610e729190614807565b610e7c9190614890565b90508160000151819350935050509250929050565b610e99611fe8565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610edf5750610ede85610ed9611fe8565b611d10565b5b610f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1590614933565b60405180910390fd5b610f2b8585858585612074565b5050505050565b600381565b600760149054906101000a900460ff1681565b60608151835114610f90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f87906149c5565b60405180910390fd5b6000835167ffffffffffffffff811115610fad57610fac613bf3565b5b604051908082528060200260200182016040528015610fdb5781602001602082028036833780820191505090505b50905060005b84518110156110585761102885828151811061100057610fff6149e5565b5b602002602001015185838151811061101b5761101a6149e5565b5b602002602001015161099c565b82828151811061103b5761103a6149e5565b5b6020026020010181815250508061105190614a14565b9050610fe1565b508091505092915050565b61106b611fe8565b73ffffffffffffffffffffffffffffffffffffffff166110896116d9565b73ffffffffffffffffffffffffffffffffffffffff16146110df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d69061461c565b60405180910390fd5b611108473373ffffffffffffffffffffffffffffffffffffffff1661239590919063ffffffff16565b50565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611139611fe8565b73ffffffffffffffffffffffffffffffffffffffff166111576116d9565b73ffffffffffffffffffffffffffffffffffffffff16146111ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a49061461c565b60405180910390fd5b6111be6111b86116d9565b82612489565b50565b600160028111156111d5576111d4613a4f565b5b600560149054906101000a900460ff1660028111156111f7576111f6613a4f565b5b14611237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122e90614ace565b60405180910390fd5b6000815111801561125557506000600282516112539190614aee565b145b611294576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128b90614b91565b60405180910390fd5b6000600282516112a49190614890565b90503373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130b90614bfd565b60405180910390fd5b80600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff166113729190614c1d565b92506101000a81548163ffffffff021916908363ffffffff160217905550600363ffffffff16600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff16111561142f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142690614ca3565b60405180910390fd5b60005b82518110156114f3577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3361dead86858151811061148e5761148d6149e5565b5b60200260200101516040518463ffffffff1660e01b81526004016114b493929190614cc3565b600060405180830381600087803b1580156114ce57600080fd5b505af11580156114e2573d6000803e3d6000fd5b505050508080600101915050611432565b506115003360008361261e565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166395723792337f00000000000000000000000000000000000000000000000000000000000000008463ffffffff1661156f9190614807565b6040518363ffffffff1660e01b815260040161158c929190613bc5565b600060405180830381600087803b1580156115a657600080fd5b505af11580156115ba573d6000803e3d6000fd5b505050505050565b6115ca611fe8565b73ffffffffffffffffffffffffffffffffffffffff166115e86116d9565b73ffffffffffffffffffffffffffffffffffffffff161461163e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116359061461c565b60405180910390fd5b6116486000612747565b565b611652611fe8565b73ffffffffffffffffffffffffffffffffffffffff166116706116d9565b73ffffffffffffffffffffffffffffffffffffffff16146116c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116bd9061461c565b60405180910390fd5b80600990816116d59190614e9c565b5050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61271081565b61271081565b60606040518060400160405280600581526020017f515545454e000000000000000000000000000000000000000000000000000000815250905090565b6117546136da565b6040518060e0016040528061271063ffffffff168152602001600560159054906101000a900463ffffffff1663ffffffff168152602001600363ffffffff1681526020016008548152602001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff168152602001600760149054906101000a900460ff161515815260200161271063ffffffff16600560159054906101000a900463ffffffff1663ffffffff16101515158152509050919050565b61185461184d611fe8565b838361280d565b5050565b611860611fe8565b73ffffffffffffffffffffffffffffffffffffffff1661187e6116d9565b73ffffffffffffffffffffffffffffffffffffffff16146118d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cb9061461c565b60405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60028081111561194f5761194e613a4f565b5b600560149054906101000a900460ff16600281111561197157611970613a4f565b5b146119b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a890614fba565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611a1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1690614bfd565b60405180910390fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff16611a7d9190614c1d565b92506101000a81548163ffffffff021916908363ffffffff160217905550600363ffffffff16600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161115611b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3190614ca3565b60405180910390fd5b8163ffffffff16600854611b4e9190614807565b3414611b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8690615026565b60405180910390fd5b611b9b33600084612979565b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b611bcb611fe8565b73ffffffffffffffffffffffffffffffffffffffff16611be96116d9565b73ffffffffffffffffffffffffffffffffffffffff1614611c3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c369061461c565b60405180910390fd5b80600560146101000a81548160ff02191690836002811115611c6457611c63613a4f565b5b021790555050565b60098054611c79906146fd565b80601f0160208091040260200160405190810160405280929190818152602001828054611ca5906146fd565b8015611cf25780601f10611cc757610100808354040283529160200191611cf2565b820191906000526020600020905b815481529060010190602001808311611cd557829003601f168201915b505050505081565b600560159054906101000a900463ffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2b90615092565b60405180910390fd5b611e4b838263ffffffff168463ffffffff16612aa2565b505050565b611e58611fe8565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480611e9e5750611e9d85611e98611fe8565b611d10565b5b611edd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed490615124565b60405180910390fd5b611eea8585858585612ce8565b5050505050565b611ef9611fe8565b73ffffffffffffffffffffffffffffffffffffffff16611f176116d9565b73ffffffffffffffffffffffffffffffffffffffff1614611f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f649061461c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd3906151b6565b60405180910390fd5b611fe581612747565b50565b600033905090565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612063575061206282612f83565b5b9050919050565b6000612710905090565b81518351146120b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120af90615248565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211e906152da565b60405180910390fd5b6000612131611fe8565b9050612141818787878787613065565b60005b84518110156122f2576000858281518110612162576121616149e5565b5b602002602001015190506000858381518110612181576121806149e5565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612222576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122199061536c565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122d7919061538c565b92505081905550505050806122eb90614a14565b9050612144565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516123699291906153e2565b60405180910390a461237f81878787878761306d565b61238d818787878787613075565b505050505050565b804710156123d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cf90615465565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516123fe906154b6565b60006040518083038185875af1925050503d806000811461243b576040519150601f19603f3d011682016040523d82523d6000602084013e612440565b606091505b5050905080612484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161247b9061553d565b60405180910390fd5b505050565b61249161206a565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156124ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e6906155cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361255e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125559061563b565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600063ffffffff168263ffffffff16036126d95780600560158282829054906101000a900463ffffffff166126539190614c1d565b92506101000a81548163ffffffff021916908363ffffffff16021790555061271063ffffffff16600560159054906101000a900463ffffffff1663ffffffff1611156126d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126cb90614ca3565b60405180910390fd5b61271b565b600061271a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612711906156a7565b60405180910390fd5b5b612742838363ffffffff168363ffffffff166040518060200160405280600081525061324c565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361287b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287290615739565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161296c9190613912565b60405180910390a3505050565b600063ffffffff168263ffffffff1603612a345780600560158282829054906101000a900463ffffffff166129ae9190614c1d565b92506101000a81548163ffffffff021916908363ffffffff16021790555061271063ffffffff16600560159054906101000a900463ffffffff1663ffffffff161115612a2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2690614ca3565b60405180910390fd5b612a76565b6000612a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6c906156a7565b60405180910390fd5b5b612a9d838363ffffffff168363ffffffff166040518060200160405280600081525061324c565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612b11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b08906157cb565b60405180910390fd5b6000612b1b611fe8565b90506000612b28846133fc565b90506000612b35846133fc565b9050612b5583876000858560405180602001604052806000815250613065565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015612bec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612be39061585d565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051612cb992919061587d565b60405180910390a4612cdf8488600086866040518060200160405280600081525061306d565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4e906152da565b60405180910390fd5b6000612d61611fe8565b90506000612d6e856133fc565b90506000612d7b856133fc565b9050612d8b838989858589613065565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015612e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e199061536c565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ed7919061538c565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051612f5492919061587d565b60405180910390a4612f6a848a8a86868a61306d565b612f78848a8a8a8a8a613476565b505050505050505050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061304e57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061305e575061305d8261364d565b5b9050919050565b505050505050565b505050505050565b6130948473ffffffffffffffffffffffffffffffffffffffff166136b7565b15613244578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016130da9594939291906158fb565b6020604051808303816000875af192505050801561311657506040513d601f19601f820116820180604052508101906131139190615978565b60015b6131bb576131226159b2565b806308c379a00361317e57506131366159d4565b806131415750613180565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161317591906139c6565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131b290615ad6565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613242576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161323990615b68565b60405180910390fd5b505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036132bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132b290615bfa565b60405180910390fd5b60006132c5611fe8565b905060006132d2856133fc565b905060006132df856133fc565b90506132f083600089858589613065565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461334f919061538c565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516133cd92919061587d565b60405180910390a46133e48360008985858961306d565b6133f383600089898989613476565b50505050505050565b60606000600167ffffffffffffffff81111561341b5761341a613bf3565b5b6040519080825280602002602001820160405280156134495781602001602082028036833780820191505090505b5090508281600081518110613461576134606149e5565b5b60200260200101818152505080915050919050565b6134958473ffffffffffffffffffffffffffffffffffffffff166136b7565b15613645578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016134db959493929190615c1a565b6020604051808303816000875af192505050801561351757506040513d601f19601f820116820180604052508101906135149190615978565b60015b6135bc576135236159b2565b806308c379a00361357f57506135376159d4565b806135425750613581565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161357691906139c6565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135b390615ad6565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161363a90615b68565b60405180910390fd5b505b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6040518060e00160405280600063ffffffff168152602001600063ffffffff168152602001600063ffffffff16815260200160008152602001600063ffffffff1681526020016000151581526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61375a81613747565b811461376557600080fd5b50565b60008135905061377781613751565b92915050565b6000602082840312156137935761379261373d565b5b60006137a184828501613768565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137d5826137aa565b9050919050565b6137e5816137ca565b81146137f057600080fd5b50565b600081359050613802816137dc565b92915050565b6000806040838503121561381f5761381e61373d565b5b600061382d858286016137f3565b925050602061383e85828601613768565b9150509250929050565b61385181613747565b82525050565b600060208201905061386c6000830184613848565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6138a781613872565b81146138b257600080fd5b50565b6000813590506138c48161389e565b92915050565b6000602082840312156138e0576138df61373d565b5b60006138ee848285016138b5565b91505092915050565b60008115159050919050565b61390c816138f7565b82525050565b60006020820190506139276000830184613903565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561396757808201518184015260208101905061394c565b83811115613976576000848401525b50505050565b6000601f19601f8301169050919050565b60006139988261392d565b6139a28185613938565b93506139b2818560208601613949565b6139bb8161397c565b840191505092915050565b600060208201905081810360008301526139e0818461398d565b905092915050565b6000602082840312156139fe576139fd61373d565b5b6000613a0c848285016137f3565b91505092915050565b600063ffffffff82169050919050565b613a2e81613a15565b82525050565b6000602082019050613a496000830184613a25565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613a8f57613a8e613a4f565b5b50565b6000819050613aa082613a7e565b919050565b6000613ab082613a92565b9050919050565b613ac081613aa5565b82525050565b6000602082019050613adb6000830184613ab7565b92915050565b613aea816137ca565b82525050565b6000602082019050613b056000830184613ae1565b92915050565b6000819050919050565b6000613b30613b2b613b26846137aa565b613b0b565b6137aa565b9050919050565b6000613b4282613b15565b9050919050565b6000613b5482613b37565b9050919050565b613b6481613b49565b82525050565b6000602082019050613b7f6000830184613b5b565b92915050565b60008060408385031215613b9c57613b9b61373d565b5b6000613baa85828601613768565b9250506020613bbb85828601613768565b9150509250929050565b6000604082019050613bda6000830185613ae1565b613be76020830184613848565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613c2b8261397c565b810181811067ffffffffffffffff82111715613c4a57613c49613bf3565b5b80604052505050565b6000613c5d613733565b9050613c698282613c22565b919050565b600067ffffffffffffffff821115613c8957613c88613bf3565b5b602082029050602081019050919050565b600080fd5b6000613cb2613cad84613c6e565b613c53565b90508083825260208201905060208402830185811115613cd557613cd4613c9a565b5b835b81811015613cfe5780613cea8882613768565b845260208401935050602081019050613cd7565b5050509392505050565b600082601f830112613d1d57613d1c613bee565b5b8135613d2d848260208601613c9f565b91505092915050565b600080fd5b600067ffffffffffffffff821115613d5657613d55613bf3565b5b613d5f8261397c565b9050602081019050919050565b82818337600083830152505050565b6000613d8e613d8984613d3b565b613c53565b905082815260208101848484011115613daa57613da9613d36565b5b613db5848285613d6c565b509392505050565b600082601f830112613dd257613dd1613bee565b5b8135613de2848260208601613d7b565b91505092915050565b600080600080600060a08688031215613e0757613e0661373d565b5b6000613e15888289016137f3565b9550506020613e26888289016137f3565b945050604086013567ffffffffffffffff811115613e4757613e46613742565b5b613e5388828901613d08565b935050606086013567ffffffffffffffff811115613e7457613e73613742565b5b613e8088828901613d08565b925050608086013567ffffffffffffffff811115613ea157613ea0613742565b5b613ead88828901613dbd565b9150509295509295909350565b600067ffffffffffffffff821115613ed557613ed4613bf3565b5b602082029050602081019050919050565b6000613ef9613ef484613eba565b613c53565b90508083825260208201905060208402830185811115613f1c57613f1b613c9a565b5b835b81811015613f455780613f3188826137f3565b845260208401935050602081019050613f1e565b5050509392505050565b600082601f830112613f6457613f63613bee565b5b8135613f74848260208601613ee6565b91505092915050565b60008060408385031215613f9457613f9361373d565b5b600083013567ffffffffffffffff811115613fb257613fb1613742565b5b613fbe85828601613f4f565b925050602083013567ffffffffffffffff811115613fdf57613fde613742565b5b613feb85828601613d08565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61402a81613747565b82525050565b600061403c8383614021565b60208301905092915050565b6000602082019050919050565b600061406082613ff5565b61406a8185614000565b935061407583614011565b8060005b838110156140a657815161408d8882614030565b975061409883614048565b925050600181019050614079565b5085935050505092915050565b600060208201905081810360008301526140cd8184614055565b905092915050565b60006bffffffffffffffffffffffff82169050919050565b6140f6816140d5565b811461410157600080fd5b50565b600081359050614113816140ed565b92915050565b60006020828403121561412f5761412e61373d565b5b600061413d84828501614104565b91505092915050565b60006020828403121561415c5761415b61373d565b5b600082013567ffffffffffffffff81111561417a57614179613742565b5b61418684828501613d08565b91505092915050565b600067ffffffffffffffff8211156141aa576141a9613bf3565b5b6141b38261397c565b9050602081019050919050565b60006141d36141ce8461418f565b613c53565b9050828152602081018484840111156141ef576141ee613d36565b5b6141fa848285613d6c565b509392505050565b600082601f83011261421757614216613bee565b5b81356142278482602086016141c0565b91505092915050565b6000602082840312156142465761424561373d565b5b600082013567ffffffffffffffff81111561426457614263613742565b5b61427084828501614202565b91505092915050565b61428281613a15565b82525050565b614291816138f7565b82525050565b60e0820160008201516142ad6000850182614279565b5060208201516142c06020850182614279565b5060408201516142d36040850182614279565b5060608201516142e66060850182614021565b5060808201516142f96080850182614279565b5060a082015161430c60a0850182614288565b5060c082015161431f60c0850182614288565b50505050565b600060e08201905061433a6000830184614297565b92915050565b614349816138f7565b811461435457600080fd5b50565b60008135905061436681614340565b92915050565b600080604083850312156143835761438261373d565b5b6000614391858286016137f3565b92505060206143a285828601614357565b9150509250929050565b60006143b782613b37565b9050919050565b6143c7816143ac565b82525050565b60006020820190506143e260008301846143be565b92915050565b6143f181613a15565b81146143fc57600080fd5b50565b60008135905061440e816143e8565b92915050565b6000806040838503121561442b5761442a61373d565b5b6000614439858286016143ff565b925050602061444a85828601614357565b9150509250929050565b6003811061446157600080fd5b50565b60008135905061447381614454565b92915050565b60006020828403121561448f5761448e61373d565b5b600061449d84828501614464565b91505092915050565b600080604083850312156144bd576144bc61373d565b5b60006144cb858286016137f3565b92505060206144dc858286016137f3565b9150509250929050565b6000806000606084860312156144ff576144fe61373d565b5b600061450d868287016137f3565b935050602061451e868287016143ff565b925050604061452f868287016143ff565b9150509250925092565b600080600080600060a086880312156145555761455461373d565b5b6000614563888289016137f3565b9550506020614574888289016137f3565b945050604061458588828901613768565b935050606061459688828901613768565b925050608086013567ffffffffffffffff8111156145b7576145b6613742565b5b6145c388828901613dbd565b9150509295509295909350565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614606602083613938565b9150614611826145d0565b602082019050919050565b60006020820190508181036000830152614635816145f9565b9050919050565b7f455243313135353a2062616c616e636520717565727920666f7220746865207a60008201527f65726f2061646472657373000000000000000000000000000000000000000000602082015250565b6000614698602b83613938565b91506146a38261463c565b604082019050919050565b600060208201905081810360008301526146c78161468b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061471557607f821691505b602082108103614728576147276146ce565b5b50919050565b600081905092915050565b60006147448261392d565b61474e818561472e565b935061475e818560208601613949565b80840191505092915050565b7f717565656e2e6a736f6e00000000000000000000000000000000000000000000600082015250565b60006147a0600a8361472e565b91506147ab8261476a565b600a82019050919050565b60006147c28284614739565b91506147cd82614793565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061481282613747565b915061481d83613747565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614856576148556147d8565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061489b82613747565b91506148a683613747565b9250826148b6576148b5614861565b5b828204905092915050565b7f455243313135353a207472616e736665722063616c6c6572206973206e6f742060008201527f6f776e6572206e6f7220617070726f7665640000000000000000000000000000602082015250565b600061491d603283613938565b9150614928826148c1565b604082019050919050565b6000602082019050818103600083015261494c81614910565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006149af602983613938565b91506149ba82614953565b604082019050919050565b600060208201905081810360008301526149de816149a2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614a1f82613747565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614a5157614a506147d8565b5b600182019050919050565b7f486976653a20436c61696d696e67206973206e6f74207374617274656420796560008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ab8602183613938565b9150614ac382614a5c565b604082019050919050565b60006020820190508181036000830152614ae781614aab565b9050919050565b6000614af982613747565b9150614b0483613747565b925082614b1457614b13614861565b5b828206905092915050565b7f486976653a20596f75206d7573742070726f7669646520746f6b656e2070616960008201527f7273000000000000000000000000000000000000000000000000000000000000602082015250565b6000614b7b602283613938565b9150614b8682614b1f565b604082019050919050565b60006020820190508181036000830152614baa81614b6e565b9050919050565b7f537761726d206761732021000000000000000000000000000000000000000000600082015250565b6000614be7600b83613938565b9150614bf282614bb1565b602082019050919050565b60006020820190508181036000830152614c1681614bda565b9050919050565b6000614c2882613a15565b9150614c3383613a15565b92508263ffffffff03821115614c4c57614c4b6147d8565b5b828201905092915050565b7f54686520717565656e20736179206e6f206d6f72650000000000000000000000600082015250565b6000614c8d601583613938565b9150614c9882614c57565b602082019050919050565b60006020820190508181036000830152614cbc81614c80565b9050919050565b6000606082019050614cd86000830186613ae1565b614ce56020830185613ae1565b614cf26040830184613848565b949350505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614d5c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614d1f565b614d668683614d1f565b95508019841693508086168417925050509392505050565b6000614d99614d94614d8f84613747565b613b0b565b613747565b9050919050565b6000819050919050565b614db383614d7e565b614dc7614dbf82614da0565b848454614d2c565b825550505050565b600090565b614ddc614dcf565b614de7818484614daa565b505050565b5b81811015614e0b57614e00600082614dd4565b600181019050614ded565b5050565b601f821115614e5057614e2181614cfa565b614e2a84614d0f565b81016020851015614e39578190505b614e4d614e4585614d0f565b830182614dec565b50505b505050565b600082821c905092915050565b6000614e7360001984600802614e55565b1980831691505092915050565b6000614e8c8383614e62565b9150826002028217905092915050565b614ea58261392d565b67ffffffffffffffff811115614ebe57614ebd613bf3565b5b614ec882546146fd565b614ed3828285614e0f565b600060209050601f831160018114614f065760008415614ef4578287015190505b614efe8582614e80565b865550614f66565b601f198416614f1486614cfa565b60005b82811015614f3c57848901518255600182019150602085019450602081019050614f17565b86831015614f595784890151614f55601f891682614e62565b8355505b6001600288020188555050505b505050505050565b7f486976653a2053616c65206973206e6f74207374617274656400000000000000600082015250565b6000614fa4601983613938565b9150614faf82614f6e565b602082019050919050565b60006020820190508181036000830152614fd381614f97565b9050919050565b7f537761726d206e656564206d6f72652067617300000000000000000000000000600082015250565b6000615010601383613938565b915061501b82614fda565b602082019050919050565b6000602082019050818103600083015261503f81615003565b9050919050565b7f436f6e73756d6500000000000000000000000000000000000000000000000000600082015250565b600061507c600783613938565b915061508782615046565b602082019050919050565b600060208201905081810360008301526150ab8161506f565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260008201527f20617070726f7665640000000000000000000000000000000000000000000000602082015250565b600061510e602983613938565b9150615119826150b2565b604082019050919050565b6000602082019050818103600083015261513d81615101565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006151a0602683613938565b91506151ab82615144565b604082019050919050565b600060208201905081810360008301526151cf81615193565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000615232602883613938565b915061523d826151d6565b604082019050919050565b6000602082019050818103600083015261526181615225565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006152c4602583613938565b91506152cf82615268565b604082019050919050565b600060208201905081810360008301526152f3816152b7565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000615356602a83613938565b9150615361826152fa565b604082019050919050565b6000602082019050818103600083015261538581615349565b9050919050565b600061539782613747565b91506153a283613747565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156153d7576153d66147d8565b5b828201905092915050565b600060408201905081810360008301526153fc8185614055565b905081810360208301526154108184614055565b90509392505050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b600061544f601d83613938565b915061545a82615419565b602082019050919050565b6000602082019050818103600083015261547e81615442565b9050919050565b600081905092915050565b50565b60006154a0600083615485565b91506154ab82615490565b600082019050919050565b60006154c182615493565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000615527603a83613938565b9150615532826154cb565b604082019050919050565b600060208201905081810360008301526155568161551a565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b60006155b9602a83613938565b91506155c48261555d565b604082019050919050565b600060208201905081810360008301526155e8816155ac565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000615625601983613938565b9150615630826155ef565b602082019050919050565b6000602082019050818103600083015261565481615618565b9050919050565b7f54686973206973206e6f742074686520517565656e0000000000000000000000600082015250565b6000615691601583613938565b915061569c8261565b565b602082019050919050565b600060208201905081810360008301526156c081615684565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000615723602983613938565b915061572e826156c7565b604082019050919050565b6000602082019050818103600083015261575281615716565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006157b5602383613938565b91506157c082615759565b604082019050919050565b600060208201905081810360008301526157e4816157a8565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000615847602483613938565b9150615852826157eb565b604082019050919050565b600060208201905081810360008301526158768161583a565b9050919050565b60006040820190506158926000830185613848565b61589f6020830184613848565b9392505050565b600081519050919050565b600082825260208201905092915050565b60006158cd826158a6565b6158d781856158b1565b93506158e7818560208601613949565b6158f08161397c565b840191505092915050565b600060a0820190506159106000830188613ae1565b61591d6020830187613ae1565b818103604083015261592f8186614055565b905081810360608301526159438185614055565b9050818103608083015261595781846158c2565b90509695505050505050565b6000815190506159728161389e565b92915050565b60006020828403121561598e5761598d61373d565b5b600061599c84828501615963565b91505092915050565b60008160e01c9050919050565b600060033d11156159d15760046000803e6159ce6000516159a5565b90505b90565b600060443d10615a61576159e6613733565b60043d036004823e80513d602482011167ffffffffffffffff82111715615a0e575050615a61565b808201805167ffffffffffffffff811115615a2c5750505050615a61565b80602083010160043d038501811115615a49575050505050615a61565b615a5882602001850186613c22565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e204552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000615ac0603483613938565b9150615acb82615a64565b604082019050919050565b60006020820190508181036000830152615aef81615ab3565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000615b52602883613938565b9150615b5d82615af6565b604082019050919050565b60006020820190508181036000830152615b8181615b45565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000615be4602183613938565b9150615bef82615b88565b604082019050919050565b60006020820190508181036000830152615c1381615bd7565b9050919050565b600060a082019050615c2f6000830188613ae1565b615c3c6020830187613ae1565b615c496040830186613848565b615c566060830185613848565b8181036080830152615c6881846158c2565b9050969550505050505056fea2646970667358221220ed44d77030cee5a481e8feb434fd3de73193f70dde60efaf8bb144305cce8a7664736f6c634300080f003368747470733a2f2f6d6574612e7468652d737761726d2e78797a2f746865717565656e2f6a736f6e2f000000000000000000000000a47da714d0265c012e85703fa7280d69fd5961df000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c870000000000000000000000000000000000000000204fce5e3e25026110000000
Deployed Bytecode
0x60806040526004361061022e5760003560e01c80636ba4c1381161012e578063b3337638116100ab578063d9e06e8c1161006f578063d9e06e8c14610833578063e985e9c51461085e578063ea252caa1461089b578063f242432a146108c4578063f2fde38b146108ed5761022e565b8063b33376381461076d578063c01c3bcf14610798578063c267e673146107b4578063ce3cd997146107df578063d4a67623146108085761022e565b8063942494ca116100f2578063942494ca1461068857806395d89b41146106b35780639a7cfa4f146106de578063a22cb4651461071b578063a996d6ce146107445761022e565b80636ba4c138146105c9578063715018a6146105f2578063750521f5146106095780638da5cb5b14610632578063902d55a51461065d5761022e565b80631cd3a4ac116101bc5780634df22a54116101805780634df22a54146104e45780634e1273f41461050f5780635376f1a31461054c578063610936b914610575578063653a819e146105a05761022e565b80631cd3a4ac146103fc578063289bf114146104275780632a55205a146104525780632eb2c2d614610490578063351ed951146104b95761022e565b80630767516511610203578063076751651461030157806307eac2421461033e5780630e89341c1461036957806316396b63146103a657806316a2ae35146103d15761022e565b80629f926214610233578062fdd58e1461025c57806301ffc9a71461029957806306fdde03146102d6575b600080fd5b34801561023f57600080fd5b5061025a6004803603810190610255919061377d565b610916565b005b34801561026857600080fd5b50610283600480360381019061027e9190613808565b61099c565b6040516102909190613857565b60405180910390f35b3480156102a557600080fd5b506102c060048036038101906102bb91906138ca565b610a64565b6040516102cd9190613912565b60405180910390f35b3480156102e257600080fd5b506102eb610b46565b6040516102f891906139c6565b60405180910390f35b34801561030d57600080fd5b50610328600480360381019061032391906139e8565b610b83565b6040516103359190613a34565b60405180910390f35b34801561034a57600080fd5b50610353610ba6565b6040516103609190613857565b60405180910390f35b34801561037557600080fd5b50610390600480360381019061038b919061377d565b610bac565b60405161039d91906139c6565b60405180910390f35b3480156103b257600080fd5b506103bb610c65565b6040516103c89190613ac6565b60405180910390f35b3480156103dd57600080fd5b506103e6610c78565b6040516103f39190613a34565b60405180910390f35b34801561040857600080fd5b50610411610c7d565b60405161041e9190613af0565b60405180910390f35b34801561043357600080fd5b5061043c610c83565b6040516104499190613b6a565b60405180910390f35b34801561045e57600080fd5b5061047960048036038101906104749190613b85565b610ca7565b604051610487929190613bc5565b60405180910390f35b34801561049c57600080fd5b506104b760048036038101906104b29190613deb565b610e91565b005b3480156104c557600080fd5b506104ce610f32565b6040516104db9190613a34565b60405180910390f35b3480156104f057600080fd5b506104f9610f37565b6040516105069190613912565b60405180910390f35b34801561051b57600080fd5b5061053660048036038101906105319190613f7d565b610f4a565b60405161054391906140b3565b60405180910390f35b34801561055857600080fd5b50610573600480360381019061056e91906139e8565b611063565b005b34801561058157600080fd5b5061058a61110b565b6040516105979190613af0565b60405180910390f35b3480156105ac57600080fd5b506105c760048036038101906105c29190614119565b611131565b005b3480156105d557600080fd5b506105f060048036038101906105eb9190614146565b6111c1565b005b3480156105fe57600080fd5b506106076115c2565b005b34801561061557600080fd5b50610630600480360381019061062b9190614230565b61164a565b005b34801561063e57600080fd5b506106476116d9565b6040516106549190613af0565b60405180910390f35b34801561066957600080fd5b50610672611703565b60405161067f9190613a34565b60405180910390f35b34801561069457600080fd5b5061069d611709565b6040516106aa9190613a34565b60405180910390f35b3480156106bf57600080fd5b506106c861170f565b6040516106d591906139c6565b60405180910390f35b3480156106ea57600080fd5b50610705600480360381019061070091906139e8565b61174c565b6040516107129190614325565b60405180910390f35b34801561072757600080fd5b50610742600480360381019061073d919061436c565b611842565b005b34801561075057600080fd5b5061076b600480360381019061076691906139e8565b611858565b005b34801561077957600080fd5b50610782611918565b60405161078f91906143cd565b60405180910390f35b6107b260048036038101906107ad9190614414565b61193c565b005b3480156107c057600080fd5b506107c9611b9f565b6040516107d69190613857565b60405180910390f35b3480156107eb57600080fd5b5061080660048036038101906108019190614479565b611bc3565b005b34801561081457600080fd5b5061081d611c6c565b60405161082a91906139c6565b60405180910390f35b34801561083f57600080fd5b50610848611cfa565b6040516108559190613a34565b60405180910390f35b34801561086a57600080fd5b50610885600480360381019061088091906144a6565b611d10565b6040516108929190613912565b60405180910390f35b3480156108a757600080fd5b506108c260048036038101906108bd91906144e6565b611da4565b005b3480156108d057600080fd5b506108eb60048036038101906108e69190614539565b611e50565b005b3480156108f957600080fd5b50610914600480360381019061090f91906139e8565b611ef1565b005b61091e611fe8565b73ffffffffffffffffffffffffffffffffffffffff1661093c6116d9565b73ffffffffffffffffffffffffffffffffffffffff1614610992576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109899061461c565b60405180910390fd5b8060088190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a03906146ae565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b2f57507fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610b3f5750610b3e82611ff0565b5b9050919050565b60606040518060400160405280600981526020017f54686520517565656e0000000000000000000000000000000000000000000000815250905090565b60066020528060005260406000206000915054906101000a900463ffffffff1681565b60085481565b6060600060098054610bbd906146fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610be9906146fd565b8015610c365780601f10610c0b57610100808354040283529160200191610c36565b820191906000526020600020905b815481529060010190602001808311610c1957829003601f168201915b5050505050905080604051602001610c4e91906147b6565b604051602081830303815290604052915050919050565b600560149054906101000a900460ff1681565b600081565b61dead81565b7f000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c8781565b6000806000600460008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610e3c5760036040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610e4661206a565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610e729190614807565b610e7c9190614890565b90508160000151819350935050509250929050565b610e99611fe8565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610edf5750610ede85610ed9611fe8565b611d10565b5b610f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1590614933565b60405180910390fd5b610f2b8585858585612074565b5050505050565b600381565b600760149054906101000a900460ff1681565b60608151835114610f90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f87906149c5565b60405180910390fd5b6000835167ffffffffffffffff811115610fad57610fac613bf3565b5b604051908082528060200260200182016040528015610fdb5781602001602082028036833780820191505090505b50905060005b84518110156110585761102885828151811061100057610fff6149e5565b5b602002602001015185838151811061101b5761101a6149e5565b5b602002602001015161099c565b82828151811061103b5761103a6149e5565b5b6020026020010181815250508061105190614a14565b9050610fe1565b508091505092915050565b61106b611fe8565b73ffffffffffffffffffffffffffffffffffffffff166110896116d9565b73ffffffffffffffffffffffffffffffffffffffff16146110df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d69061461c565b60405180910390fd5b611108473373ffffffffffffffffffffffffffffffffffffffff1661239590919063ffffffff16565b50565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611139611fe8565b73ffffffffffffffffffffffffffffffffffffffff166111576116d9565b73ffffffffffffffffffffffffffffffffffffffff16146111ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a49061461c565b60405180910390fd5b6111be6111b86116d9565b82612489565b50565b600160028111156111d5576111d4613a4f565b5b600560149054906101000a900460ff1660028111156111f7576111f6613a4f565b5b14611237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122e90614ace565b60405180910390fd5b6000815111801561125557506000600282516112539190614aee565b145b611294576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128b90614b91565b60405180910390fd5b6000600282516112a49190614890565b90503373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611314576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130b90614bfd565b60405180910390fd5b80600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff166113729190614c1d565b92506101000a81548163ffffffff021916908363ffffffff160217905550600363ffffffff16600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff16111561142f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142690614ca3565b60405180910390fd5b60005b82518110156114f3577f000000000000000000000000a47da714d0265c012e85703fa7280d69fd5961df73ffffffffffffffffffffffffffffffffffffffff166323b872dd3361dead86858151811061148e5761148d6149e5565b5b60200260200101516040518463ffffffff1660e01b81526004016114b493929190614cc3565b600060405180830381600087803b1580156114ce57600080fd5b505af11580156114e2573d6000803e3d6000fd5b505050508080600101915050611432565b506115003360008361261e565b7f000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c8773ffffffffffffffffffffffffffffffffffffffff166395723792337f0000000000000000000000000000000000000000204fce5e3e250261100000008463ffffffff1661156f9190614807565b6040518363ffffffff1660e01b815260040161158c929190613bc5565b600060405180830381600087803b1580156115a657600080fd5b505af11580156115ba573d6000803e3d6000fd5b505050505050565b6115ca611fe8565b73ffffffffffffffffffffffffffffffffffffffff166115e86116d9565b73ffffffffffffffffffffffffffffffffffffffff161461163e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116359061461c565b60405180910390fd5b6116486000612747565b565b611652611fe8565b73ffffffffffffffffffffffffffffffffffffffff166116706116d9565b73ffffffffffffffffffffffffffffffffffffffff16146116c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116bd9061461c565b60405180910390fd5b80600990816116d59190614e9c565b5050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61271081565b61271081565b60606040518060400160405280600581526020017f515545454e000000000000000000000000000000000000000000000000000000815250905090565b6117546136da565b6040518060e0016040528061271063ffffffff168152602001600560159054906101000a900463ffffffff1663ffffffff168152602001600363ffffffff1681526020016008548152602001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff168152602001600760149054906101000a900460ff161515815260200161271063ffffffff16600560159054906101000a900463ffffffff1663ffffffff16101515158152509050919050565b61185461184d611fe8565b838361280d565b5050565b611860611fe8565b73ffffffffffffffffffffffffffffffffffffffff1661187e6116d9565b73ffffffffffffffffffffffffffffffffffffffff16146118d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cb9061461c565b60405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000a47da714d0265c012e85703fa7280d69fd5961df81565b60028081111561194f5761194e613a4f565b5b600560149054906101000a900460ff16600281111561197157611970613a4f565b5b146119b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a890614fba565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611a1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1690614bfd565b60405180910390fd5b81600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900463ffffffff16611a7d9190614c1d565b92506101000a81548163ffffffff021916908363ffffffff160217905550600363ffffffff16600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1663ffffffff161115611b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3190614ca3565b60405180910390fd5b8163ffffffff16600854611b4e9190614807565b3414611b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8690615026565b60405180910390fd5b611b9b33600084612979565b5050565b7f0000000000000000000000000000000000000000204fce5e3e2502611000000081565b611bcb611fe8565b73ffffffffffffffffffffffffffffffffffffffff16611be96116d9565b73ffffffffffffffffffffffffffffffffffffffff1614611c3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c369061461c565b60405180910390fd5b80600560146101000a81548160ff02191690836002811115611c6457611c63613a4f565b5b021790555050565b60098054611c79906146fd565b80601f0160208091040260200160405190810160405280929190818152602001828054611ca5906146fd565b8015611cf25780601f10611cc757610100808354040283529160200191611cf2565b820191906000526020600020905b815481529060010190602001808311611cd557829003601f168201915b505050505081565b600560159054906101000a900463ffffffff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2b90615092565b60405180910390fd5b611e4b838263ffffffff168463ffffffff16612aa2565b505050565b611e58611fe8565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480611e9e5750611e9d85611e98611fe8565b611d10565b5b611edd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed490615124565b60405180910390fd5b611eea8585858585612ce8565b5050505050565b611ef9611fe8565b73ffffffffffffffffffffffffffffffffffffffff16611f176116d9565b73ffffffffffffffffffffffffffffffffffffffff1614611f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f649061461c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd3906151b6565b60405180910390fd5b611fe581612747565b50565b600033905090565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612063575061206282612f83565b5b9050919050565b6000612710905090565b81518351146120b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120af90615248565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211e906152da565b60405180910390fd5b6000612131611fe8565b9050612141818787878787613065565b60005b84518110156122f2576000858281518110612162576121616149e5565b5b602002602001015190506000858381518110612181576121806149e5565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612222576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122199061536c565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122d7919061538c565b92505081905550505050806122eb90614a14565b9050612144565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516123699291906153e2565b60405180910390a461237f81878787878761306d565b61238d818787878787613075565b505050505050565b804710156123d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cf90615465565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516123fe906154b6565b60006040518083038185875af1925050503d806000811461243b576040519150601f19603f3d011682016040523d82523d6000602084013e612440565b606091505b5050905080612484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161247b9061553d565b60405180910390fd5b505050565b61249161206a565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156124ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e6906155cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361255e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125559061563b565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600360008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600063ffffffff168263ffffffff16036126d95780600560158282829054906101000a900463ffffffff166126539190614c1d565b92506101000a81548163ffffffff021916908363ffffffff16021790555061271063ffffffff16600560159054906101000a900463ffffffff1663ffffffff1611156126d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126cb90614ca3565b60405180910390fd5b61271b565b600061271a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612711906156a7565b60405180910390fd5b5b612742838363ffffffff168363ffffffff166040518060200160405280600081525061324c565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361287b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287290615739565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161296c9190613912565b60405180910390a3505050565b600063ffffffff168263ffffffff1603612a345780600560158282829054906101000a900463ffffffff166129ae9190614c1d565b92506101000a81548163ffffffff021916908363ffffffff16021790555061271063ffffffff16600560159054906101000a900463ffffffff1663ffffffff161115612a2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2690614ca3565b60405180910390fd5b612a76565b6000612a75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6c906156a7565b60405180910390fd5b5b612a9d838363ffffffff168363ffffffff166040518060200160405280600081525061324c565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612b11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b08906157cb565b60405180910390fd5b6000612b1b611fe8565b90506000612b28846133fc565b90506000612b35846133fc565b9050612b5583876000858560405180602001604052806000815250613065565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015612bec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612be39061585d565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051612cb992919061587d565b60405180910390a4612cdf8488600086866040518060200160405280600081525061306d565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612d57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4e906152da565b60405180910390fd5b6000612d61611fe8565b90506000612d6e856133fc565b90506000612d7b856133fc565b9050612d8b838989858589613065565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015612e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e199061536c565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ed7919061538c565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051612f5492919061587d565b60405180910390a4612f6a848a8a86868a61306d565b612f78848a8a8a8a8a613476565b505050505050505050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061304e57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061305e575061305d8261364d565b5b9050919050565b505050505050565b505050505050565b6130948473ffffffffffffffffffffffffffffffffffffffff166136b7565b15613244578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016130da9594939291906158fb565b6020604051808303816000875af192505050801561311657506040513d601f19601f820116820180604052508101906131139190615978565b60015b6131bb576131226159b2565b806308c379a00361317e57506131366159d4565b806131415750613180565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161317591906139c6565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131b290615ad6565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613242576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161323990615b68565b60405180910390fd5b505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036132bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132b290615bfa565b60405180910390fd5b60006132c5611fe8565b905060006132d2856133fc565b905060006132df856133fc565b90506132f083600089858589613065565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461334f919061538c565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516133cd92919061587d565b60405180910390a46133e48360008985858961306d565b6133f383600089898989613476565b50505050505050565b60606000600167ffffffffffffffff81111561341b5761341a613bf3565b5b6040519080825280602002602001820160405280156134495781602001602082028036833780820191505090505b5090508281600081518110613461576134606149e5565b5b60200260200101818152505080915050919050565b6134958473ffffffffffffffffffffffffffffffffffffffff166136b7565b15613645578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016134db959493929190615c1a565b6020604051808303816000875af192505050801561351757506040513d601f19601f820116820180604052508101906135149190615978565b60015b6135bc576135236159b2565b806308c379a00361357f57506135376159d4565b806135425750613581565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161357691906139c6565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135b390615ad6565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161363a90615b68565b60405180910390fd5b505b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6040518060e00160405280600063ffffffff168152602001600063ffffffff168152602001600063ffffffff16815260200160008152602001600063ffffffff1681526020016000151581526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61375a81613747565b811461376557600080fd5b50565b60008135905061377781613751565b92915050565b6000602082840312156137935761379261373d565b5b60006137a184828501613768565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137d5826137aa565b9050919050565b6137e5816137ca565b81146137f057600080fd5b50565b600081359050613802816137dc565b92915050565b6000806040838503121561381f5761381e61373d565b5b600061382d858286016137f3565b925050602061383e85828601613768565b9150509250929050565b61385181613747565b82525050565b600060208201905061386c6000830184613848565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6138a781613872565b81146138b257600080fd5b50565b6000813590506138c48161389e565b92915050565b6000602082840312156138e0576138df61373d565b5b60006138ee848285016138b5565b91505092915050565b60008115159050919050565b61390c816138f7565b82525050565b60006020820190506139276000830184613903565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561396757808201518184015260208101905061394c565b83811115613976576000848401525b50505050565b6000601f19601f8301169050919050565b60006139988261392d565b6139a28185613938565b93506139b2818560208601613949565b6139bb8161397c565b840191505092915050565b600060208201905081810360008301526139e0818461398d565b905092915050565b6000602082840312156139fe576139fd61373d565b5b6000613a0c848285016137f3565b91505092915050565b600063ffffffff82169050919050565b613a2e81613a15565b82525050565b6000602082019050613a496000830184613a25565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613a8f57613a8e613a4f565b5b50565b6000819050613aa082613a7e565b919050565b6000613ab082613a92565b9050919050565b613ac081613aa5565b82525050565b6000602082019050613adb6000830184613ab7565b92915050565b613aea816137ca565b82525050565b6000602082019050613b056000830184613ae1565b92915050565b6000819050919050565b6000613b30613b2b613b26846137aa565b613b0b565b6137aa565b9050919050565b6000613b4282613b15565b9050919050565b6000613b5482613b37565b9050919050565b613b6481613b49565b82525050565b6000602082019050613b7f6000830184613b5b565b92915050565b60008060408385031215613b9c57613b9b61373d565b5b6000613baa85828601613768565b9250506020613bbb85828601613768565b9150509250929050565b6000604082019050613bda6000830185613ae1565b613be76020830184613848565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613c2b8261397c565b810181811067ffffffffffffffff82111715613c4a57613c49613bf3565b5b80604052505050565b6000613c5d613733565b9050613c698282613c22565b919050565b600067ffffffffffffffff821115613c8957613c88613bf3565b5b602082029050602081019050919050565b600080fd5b6000613cb2613cad84613c6e565b613c53565b90508083825260208201905060208402830185811115613cd557613cd4613c9a565b5b835b81811015613cfe5780613cea8882613768565b845260208401935050602081019050613cd7565b5050509392505050565b600082601f830112613d1d57613d1c613bee565b5b8135613d2d848260208601613c9f565b91505092915050565b600080fd5b600067ffffffffffffffff821115613d5657613d55613bf3565b5b613d5f8261397c565b9050602081019050919050565b82818337600083830152505050565b6000613d8e613d8984613d3b565b613c53565b905082815260208101848484011115613daa57613da9613d36565b5b613db5848285613d6c565b509392505050565b600082601f830112613dd257613dd1613bee565b5b8135613de2848260208601613d7b565b91505092915050565b600080600080600060a08688031215613e0757613e0661373d565b5b6000613e15888289016137f3565b9550506020613e26888289016137f3565b945050604086013567ffffffffffffffff811115613e4757613e46613742565b5b613e5388828901613d08565b935050606086013567ffffffffffffffff811115613e7457613e73613742565b5b613e8088828901613d08565b925050608086013567ffffffffffffffff811115613ea157613ea0613742565b5b613ead88828901613dbd565b9150509295509295909350565b600067ffffffffffffffff821115613ed557613ed4613bf3565b5b602082029050602081019050919050565b6000613ef9613ef484613eba565b613c53565b90508083825260208201905060208402830185811115613f1c57613f1b613c9a565b5b835b81811015613f455780613f3188826137f3565b845260208401935050602081019050613f1e565b5050509392505050565b600082601f830112613f6457613f63613bee565b5b8135613f74848260208601613ee6565b91505092915050565b60008060408385031215613f9457613f9361373d565b5b600083013567ffffffffffffffff811115613fb257613fb1613742565b5b613fbe85828601613f4f565b925050602083013567ffffffffffffffff811115613fdf57613fde613742565b5b613feb85828601613d08565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61402a81613747565b82525050565b600061403c8383614021565b60208301905092915050565b6000602082019050919050565b600061406082613ff5565b61406a8185614000565b935061407583614011565b8060005b838110156140a657815161408d8882614030565b975061409883614048565b925050600181019050614079565b5085935050505092915050565b600060208201905081810360008301526140cd8184614055565b905092915050565b60006bffffffffffffffffffffffff82169050919050565b6140f6816140d5565b811461410157600080fd5b50565b600081359050614113816140ed565b92915050565b60006020828403121561412f5761412e61373d565b5b600061413d84828501614104565b91505092915050565b60006020828403121561415c5761415b61373d565b5b600082013567ffffffffffffffff81111561417a57614179613742565b5b61418684828501613d08565b91505092915050565b600067ffffffffffffffff8211156141aa576141a9613bf3565b5b6141b38261397c565b9050602081019050919050565b60006141d36141ce8461418f565b613c53565b9050828152602081018484840111156141ef576141ee613d36565b5b6141fa848285613d6c565b509392505050565b600082601f83011261421757614216613bee565b5b81356142278482602086016141c0565b91505092915050565b6000602082840312156142465761424561373d565b5b600082013567ffffffffffffffff81111561426457614263613742565b5b61427084828501614202565b91505092915050565b61428281613a15565b82525050565b614291816138f7565b82525050565b60e0820160008201516142ad6000850182614279565b5060208201516142c06020850182614279565b5060408201516142d36040850182614279565b5060608201516142e66060850182614021565b5060808201516142f96080850182614279565b5060a082015161430c60a0850182614288565b5060c082015161431f60c0850182614288565b50505050565b600060e08201905061433a6000830184614297565b92915050565b614349816138f7565b811461435457600080fd5b50565b60008135905061436681614340565b92915050565b600080604083850312156143835761438261373d565b5b6000614391858286016137f3565b92505060206143a285828601614357565b9150509250929050565b60006143b782613b37565b9050919050565b6143c7816143ac565b82525050565b60006020820190506143e260008301846143be565b92915050565b6143f181613a15565b81146143fc57600080fd5b50565b60008135905061440e816143e8565b92915050565b6000806040838503121561442b5761442a61373d565b5b6000614439858286016143ff565b925050602061444a85828601614357565b9150509250929050565b6003811061446157600080fd5b50565b60008135905061447381614454565b92915050565b60006020828403121561448f5761448e61373d565b5b600061449d84828501614464565b91505092915050565b600080604083850312156144bd576144bc61373d565b5b60006144cb858286016137f3565b92505060206144dc858286016137f3565b9150509250929050565b6000806000606084860312156144ff576144fe61373d565b5b600061450d868287016137f3565b935050602061451e868287016143ff565b925050604061452f868287016143ff565b9150509250925092565b600080600080600060a086880312156145555761455461373d565b5b6000614563888289016137f3565b9550506020614574888289016137f3565b945050604061458588828901613768565b935050606061459688828901613768565b925050608086013567ffffffffffffffff8111156145b7576145b6613742565b5b6145c388828901613dbd565b9150509295509295909350565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614606602083613938565b9150614611826145d0565b602082019050919050565b60006020820190508181036000830152614635816145f9565b9050919050565b7f455243313135353a2062616c616e636520717565727920666f7220746865207a60008201527f65726f2061646472657373000000000000000000000000000000000000000000602082015250565b6000614698602b83613938565b91506146a38261463c565b604082019050919050565b600060208201905081810360008301526146c78161468b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061471557607f821691505b602082108103614728576147276146ce565b5b50919050565b600081905092915050565b60006147448261392d565b61474e818561472e565b935061475e818560208601613949565b80840191505092915050565b7f717565656e2e6a736f6e00000000000000000000000000000000000000000000600082015250565b60006147a0600a8361472e565b91506147ab8261476a565b600a82019050919050565b60006147c28284614739565b91506147cd82614793565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061481282613747565b915061481d83613747565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614856576148556147d8565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061489b82613747565b91506148a683613747565b9250826148b6576148b5614861565b5b828204905092915050565b7f455243313135353a207472616e736665722063616c6c6572206973206e6f742060008201527f6f776e6572206e6f7220617070726f7665640000000000000000000000000000602082015250565b600061491d603283613938565b9150614928826148c1565b604082019050919050565b6000602082019050818103600083015261494c81614910565b9050919050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006149af602983613938565b91506149ba82614953565b604082019050919050565b600060208201905081810360008301526149de816149a2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614a1f82613747565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614a5157614a506147d8565b5b600182019050919050565b7f486976653a20436c61696d696e67206973206e6f74207374617274656420796560008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ab8602183613938565b9150614ac382614a5c565b604082019050919050565b60006020820190508181036000830152614ae781614aab565b9050919050565b6000614af982613747565b9150614b0483613747565b925082614b1457614b13614861565b5b828206905092915050565b7f486976653a20596f75206d7573742070726f7669646520746f6b656e2070616960008201527f7273000000000000000000000000000000000000000000000000000000000000602082015250565b6000614b7b602283613938565b9150614b8682614b1f565b604082019050919050565b60006020820190508181036000830152614baa81614b6e565b9050919050565b7f537761726d206761732021000000000000000000000000000000000000000000600082015250565b6000614be7600b83613938565b9150614bf282614bb1565b602082019050919050565b60006020820190508181036000830152614c1681614bda565b9050919050565b6000614c2882613a15565b9150614c3383613a15565b92508263ffffffff03821115614c4c57614c4b6147d8565b5b828201905092915050565b7f54686520717565656e20736179206e6f206d6f72650000000000000000000000600082015250565b6000614c8d601583613938565b9150614c9882614c57565b602082019050919050565b60006020820190508181036000830152614cbc81614c80565b9050919050565b6000606082019050614cd86000830186613ae1565b614ce56020830185613ae1565b614cf26040830184613848565b949350505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614d5c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614d1f565b614d668683614d1f565b95508019841693508086168417925050509392505050565b6000614d99614d94614d8f84613747565b613b0b565b613747565b9050919050565b6000819050919050565b614db383614d7e565b614dc7614dbf82614da0565b848454614d2c565b825550505050565b600090565b614ddc614dcf565b614de7818484614daa565b505050565b5b81811015614e0b57614e00600082614dd4565b600181019050614ded565b5050565b601f821115614e5057614e2181614cfa565b614e2a84614d0f565b81016020851015614e39578190505b614e4d614e4585614d0f565b830182614dec565b50505b505050565b600082821c905092915050565b6000614e7360001984600802614e55565b1980831691505092915050565b6000614e8c8383614e62565b9150826002028217905092915050565b614ea58261392d565b67ffffffffffffffff811115614ebe57614ebd613bf3565b5b614ec882546146fd565b614ed3828285614e0f565b600060209050601f831160018114614f065760008415614ef4578287015190505b614efe8582614e80565b865550614f66565b601f198416614f1486614cfa565b60005b82811015614f3c57848901518255600182019150602085019450602081019050614f17565b86831015614f595784890151614f55601f891682614e62565b8355505b6001600288020188555050505b505050505050565b7f486976653a2053616c65206973206e6f74207374617274656400000000000000600082015250565b6000614fa4601983613938565b9150614faf82614f6e565b602082019050919050565b60006020820190508181036000830152614fd381614f97565b9050919050565b7f537761726d206e656564206d6f72652067617300000000000000000000000000600082015250565b6000615010601383613938565b915061501b82614fda565b602082019050919050565b6000602082019050818103600083015261503f81615003565b9050919050565b7f436f6e73756d6500000000000000000000000000000000000000000000000000600082015250565b600061507c600783613938565b915061508782615046565b602082019050919050565b600060208201905081810360008301526150ab8161506f565b9050919050565b7f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260008201527f20617070726f7665640000000000000000000000000000000000000000000000602082015250565b600061510e602983613938565b9150615119826150b2565b604082019050919050565b6000602082019050818103600083015261513d81615101565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006151a0602683613938565b91506151ab82615144565b604082019050919050565b600060208201905081810360008301526151cf81615193565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000615232602883613938565b915061523d826151d6565b604082019050919050565b6000602082019050818103600083015261526181615225565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006152c4602583613938565b91506152cf82615268565b604082019050919050565b600060208201905081810360008301526152f3816152b7565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000615356602a83613938565b9150615361826152fa565b604082019050919050565b6000602082019050818103600083015261538581615349565b9050919050565b600061539782613747565b91506153a283613747565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156153d7576153d66147d8565b5b828201905092915050565b600060408201905081810360008301526153fc8185614055565b905081810360208301526154108184614055565b90509392505050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b600061544f601d83613938565b915061545a82615419565b602082019050919050565b6000602082019050818103600083015261547e81615442565b9050919050565b600081905092915050565b50565b60006154a0600083615485565b91506154ab82615490565b600082019050919050565b60006154c182615493565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000615527603a83613938565b9150615532826154cb565b604082019050919050565b600060208201905081810360008301526155568161551a565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b60006155b9602a83613938565b91506155c48261555d565b604082019050919050565b600060208201905081810360008301526155e8816155ac565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000615625601983613938565b9150615630826155ef565b602082019050919050565b6000602082019050818103600083015261565481615618565b9050919050565b7f54686973206973206e6f742074686520517565656e0000000000000000000000600082015250565b6000615691601583613938565b915061569c8261565b565b602082019050919050565b600060208201905081810360008301526156c081615684565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000615723602983613938565b915061572e826156c7565b604082019050919050565b6000602082019050818103600083015261575281615716565b9050919050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006157b5602383613938565b91506157c082615759565b604082019050919050565b600060208201905081810360008301526157e4816157a8565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000615847602483613938565b9150615852826157eb565b604082019050919050565b600060208201905081810360008301526158768161583a565b9050919050565b60006040820190506158926000830185613848565b61589f6020830184613848565b9392505050565b600081519050919050565b600082825260208201905092915050565b60006158cd826158a6565b6158d781856158b1565b93506158e7818560208601613949565b6158f08161397c565b840191505092915050565b600060a0820190506159106000830188613ae1565b61591d6020830187613ae1565b818103604083015261592f8186614055565b905081810360608301526159438185614055565b9050818103608083015261595781846158c2565b90509695505050505050565b6000815190506159728161389e565b92915050565b60006020828403121561598e5761598d61373d565b5b600061599c84828501615963565b91505092915050565b60008160e01c9050919050565b600060033d11156159d15760046000803e6159ce6000516159a5565b90505b90565b600060443d10615a61576159e6613733565b60043d036004823e80513d602482011167ffffffffffffffff82111715615a0e575050615a61565b808201805167ffffffffffffffff811115615a2c5750505050615a61565b80602083010160043d038501811115615a49575050505050615a61565b615a5882602001850186613c22565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e204552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b6000615ac0603483613938565b9150615acb82615a64565b604082019050919050565b60006020820190508181036000830152615aef81615ab3565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b6000615b52602883613938565b9150615b5d82615af6565b604082019050919050565b60006020820190508181036000830152615b8181615b45565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000615be4602183613938565b9150615bef82615b88565b604082019050919050565b60006020820190508181036000830152615c1381615bd7565b9050919050565b600060a082019050615c2f6000830188613ae1565b615c3c6020830187613ae1565b615c496040830186613848565b615c566060830185613848565b8181036080830152615c6881846158c2565b9050969550505050505056fea2646970667358221220ed44d77030cee5a481e8feb434fd3de73193f70dde60efaf8bb144305cce8a7664736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a47da714d0265c012e85703fa7280d69fd5961df000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c870000000000000000000000000000000000000000204fce5e3e25026110000000
-----Decoded View---------------
Arg [0] : swarmGas (address): 0xA47da714D0265C012e85703Fa7280D69fd5961df
Arg [1] : food (address): 0xfd4d9E9335625D1A7b3C3908988a8Bc3F70C5c87
Arg [2] : swarmFoodPerPair (uint256): 10000000000000000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a47da714d0265c012e85703fa7280d69fd5961df
Arg [1] : 000000000000000000000000fd4d9e9335625d1a7b3c3908988a8bc3f70c5c87
Arg [2] : 0000000000000000000000000000000000000000204fce5e3e25026110000000
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.