ERC-721
Overview
Max Total Supply
2,183 SCG
Holders
25
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
11 SCGLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SudoChance
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* _________ .___ _________ .__ / _____/__ __ __| _/____ \_ ___ \| |__ _____ ____ ____ ____ \_____ \| | \/ __ |/ _ \/ \ \/| | \\__ \ / \_/ ___\/ __ \ / \ | / /_/ ( <_> ) \___| Y \/ __ \| | \ \__\ ___/ /_______ /____/\____ |\____/ \______ /___| (____ /___| /\___ >___ > \/ \/ \/ \/ \/ \/ \/ \/ Official Twitter: https://twitter.com/sudoswapgame Coded by: https://twitter.com/HakoCode */ pragma solidity 0.8.16; import "./ERC721A/IERC721A.sol"; import "./ERC721A/ERC721A.sol"; import "./SudoSwap/ILSSVMPairFactory.sol"; import "./SudoSwap/ILSSVMPair.sol"; import "./SudoSwap/ICurve.sol"; import {SafeTransferLib} from "./Solmate/SafeTransferLib.sol"; import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; contract SudoChance is ERC721A, RrpRequesterV0 { using SafeTransferLib for address payable; ILSSVMPairFactory private constant SUDO_PAIR_FACTORY = ILSSVMPairFactory(0xb16c1342E617A5B6E4b631EB114483FDB289c0A4); ICurve constant private SUDO_EXP_CURVE = ICurve(0x432f962D8209781da23fB37b6B59ee15dE7d9841); address constant private API3_AIRNODE_RRP_ADDRESS = 0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd; address constant private API3_AIRNODE_ADDRESS = 0x9d3C147cA16DB954873A498e0af5852AB39139f2; bytes32 constant private API3_UINT256_ENDPOINT_ID = 0xfb6d017bb87991b7495f563db3c8cf59ff87b09781947bb1e417006ad7f55a78; uint256 constant public MAX_SUPPLY = 2500; uint128 constant public STARTING_PRICE = 0.002 ether; uint128 constant public EXP_DELTA = 1001500000000000000; GameState public currentState; ILSSVMPair public gameSudoPool; uint256 public numberOfTicketSold; bytes32 private lastRandomnessRequestId; uint256 private lastRandomNumber; address private teamWallet; address private sponsorWallet; enum GameState { CREATED, ACTIVE, PRIZE, ENDED } event RequestedUint256(bytes32 indexed requestId); event ReceivedUint256(bytes32 indexed requestId, uint256 response); constructor() ERC721A("SudoChance Genesis", "SCG") RrpRequesterV0(API3_AIRNODE_RRP_ADDRESS) { currentState = GameState.CREATED; teamWallet = _msgSenderERC721A(); } receive() external payable {} fallback() external payable {} function intializeGame(address _sponsorWallet) external onlyTeam { require(currentState == GameState.CREATED, "Game already active"); sponsorWallet = _sponsorWallet; setupSudoPool(); _mintERC2309(address(gameSudoPool), MAX_SUPPLY); currentState = GameState.ACTIVE; } function setupSudoPool() internal { gameSudoPool = SUDO_PAIR_FACTORY.createPairETH( IERC721A(this), SUDO_EXP_CURVE, payable(0), ILSSVMPair.PoolType.TRADE, EXP_DELTA, 0, STARTING_PRICE, new uint256[](0) ); } function getBurnCount() view public returns (uint256) { return _totalBurned(); } function distributePrize() external onlyTeam { require(currentState == GameState.PRIZE, "Game not in prize phase"); (,address winner) = getRandomGameWinner(); gameSudoPool.withdrawAllETH(); payable(teamWallet).safeTransferETH(address(this).balance / 10); payable(winner).safeTransferETH(address(this).balance); currentState = GameState.ENDED; } function getRandomGameWinner() public view returns (uint256, address) { require(lastRandomNumber != 0, "Randomness not initialized"); uint256 entropy = lastRandomNumber; uint256 winningTicketId; for (uint i = 0; i < 10; i++) { (winningTicketId, entropy) = getNextRandom(MAX_SUPPLY, entropy, 25); address ticketOwner = ownerOf(winningTicketId); if (ticketOwner != address(0) && ticketOwner != address(gameSudoPool)) { return (winningTicketId, ticketOwner); } } revert("No winner found"); } function getNextRandom(uint256 maxNumber, uint256 entropy, uint256 bits) private pure returns (uint256, uint256) { uint256 maxB = (uint256(1)<<bits); if (entropy < maxB) entropy = uint256(keccak256(abi.encode(entropy))); uint256 rnd = (entropy & (maxB - 1)) % maxNumber; return (rnd, entropy >> bits); } function makeRequestUint256(bool test) external onlyTeam { bytes32 requestId = airnodeRrp.makeFullRequest( API3_AIRNODE_ADDRESS, API3_UINT256_ENDPOINT_ID, address(this), sponsorWallet, address(this), this.fulfillUint256.selector, "" ); emit RequestedUint256(requestId); if (!test) lastRandomnessRequestId = requestId; } function fulfillUint256(bytes32 requestId, bytes calldata data) external onlyAirnodeRrp { require(lastRandomnessRequestId == requestId, "Invalid id"); lastRandomNumber = abi.decode(data, (uint256)); lastRandomnessRequestId = 0x0; emit ReceivedUint256(requestId, lastRandomNumber); } function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override { require(currentState == GameState.ACTIVE || currentState == GameState.CREATED, "Game must be active"); if (to == address(0) && from != address(gameSudoPool)) revert("Can't burn directly"); } function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override { if (to == address(gameSudoPool) && from != address(0)) { for (uint i = 0; i < quantity; i++) _burn(startTokenId + i); } else if (from == address(gameSudoPool) && to != address(0)) { uint256 currentTicketSold = numberOfTicketSold; unchecked { currentTicketSold++; } numberOfTicketSold = currentTicketSold; if (numberOfTicketSold >= MAX_SUPPLY) currentState = GameState.PRIZE; } } function balanceOf(address owner) public view virtual override returns (uint256) { uint256 realBalance = super.balanceOf(owner); if (owner == address(gameSudoPool) && msg.sender != tx.origin) return realBalance + getBurnCount(); else return realBalance; } function ownerOf(uint256 tokenId) public view virtual override returns (address) { TokenOwnership memory ownership = explicitOwnershipOf(tokenId); if (ownership.burned && msg.sender != tx.origin) return address(gameSudoPool); else return ownership.addr; } function explicitOwnershipOf(uint256 tokenId) public view virtual returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = super.balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds[index]; } } function tokenByIndex(uint256 index) public view returns (uint256) { require(index < totalSupply(), "ERC721A: global index out of bounds"); return index; } function tokenURI(uint256 tokenId) override public view returns (string memory) { string memory base = "data:application/json;base64,"; string memory tokenID = Strings.toString(tokenId); string memory json = string(abi.encodePacked( '{\n\t"name": "SC Ticket #', tokenID, '",\n\t"description": "', "SudoChance is an innovative game on SudoSwap where the winner gets all of the liquidity in the pool", '",\n\t"image": "', "ipfs://Qmczti8PU1uumZt6kV4FXSE1pL7gABVFfVpRaHsLqFxTpm", '"\n}')); return string(abi.encodePacked(base, Base64.encode(bytes(json)))); } modifier onlyTeam() { require(msg.sender == teamWallet, "Not allowed"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "../interfaces/IAirnodeRrpV0.sol"; /// @title The contract to be inherited to make Airnode RRP requests contract RrpRequesterV0 { IAirnodeRrpV0 public immutable airnodeRrp; /// @dev Reverts if the caller is not the Airnode RRP contract. /// Use it as a modifier for fulfill and error callback methods, but also /// check `requestId`. modifier onlyAirnodeRrp() { require(msg.sender == address(airnodeRrp), "Caller not Airnode RRP"); _; } /// @dev Airnode RRP address is set at deployment and is immutable. /// RrpRequester is made its own sponsor by default. RrpRequester can also /// be sponsored by others and use these sponsorships while making /// requests, i.e., using this default sponsorship is optional. /// @param _airnodeRrp Airnode RRP contract address constructor(address _airnodeRrp) { airnodeRrp = IAirnodeRrpV0(_airnodeRrp); IAirnodeRrpV0(_airnodeRrp).setSponsorshipStatus(address(this), true); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "./ERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument. mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "APPROVE_FAILED"); } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; import {CurveErrorCodes} from "./CurveErrorCodes.sol"; interface ICurve { /** @notice Validates if a delta value is valid for the curve. The criteria for validity can be different for each type of curve, for instance ExponentialCurve requires delta to be greater than 1. @param delta The delta value to be validated @return valid True if delta is valid, false otherwise */ function validateDelta(uint128 delta) external pure returns (bool valid); /** @notice Validates if a new spot price is valid for the curve. Spot price is generally assumed to be the immediate sell price of 1 NFT to the pool, in units of the pool's paired token. @param newSpotPrice The new spot price to be set @return valid True if the new spot price is valid, false otherwise */ function validateSpotPrice(uint128 newSpotPrice) external view returns (bool valid); /** @notice Given the current state of the pair and the trade, computes how much the user should pay to purchase an NFT from the pair, the new spot price, and other values. @param spotPrice The current selling spot price of the pair, in tokens @param delta The delta parameter of the pair, what it means depends on the curve @param numItems The number of NFTs the user is buying from the pair @param feeMultiplier Determines how much fee the LP takes from this trade, 18 decimals @param protocolFeeMultiplier Determines how much fee the protocol takes from this trade, 18 decimals @return error Any math calculation errors, only Error.OK means the returned values are valid @return newSpotPrice The updated selling spot price, in tokens @return newDelta The updated delta, used to parameterize the bonding curve @return inputValue The amount that the user should pay, in tokens @return protocolFee The amount of fee to send to the protocol, in tokens */ function getBuyInfo( uint128 spotPrice, uint128 delta, uint256 numItems, uint256 feeMultiplier, uint256 protocolFeeMultiplier ) external view returns ( CurveErrorCodes.Error error, uint128 newSpotPrice, uint128 newDelta, uint256 inputValue, uint256 protocolFee ); /** @notice Given the current state of the pair and the trade, computes how much the user should receive when selling NFTs to the pair, the new spot price, and other values. @param spotPrice The current selling spot price of the pair, in tokens @param delta The delta parameter of the pair, what it means depends on the curve @param numItems The number of NFTs the user is selling to the pair @param feeMultiplier Determines how much fee the LP takes from this trade, 18 decimals @param protocolFeeMultiplier Determines how much fee the protocol takes from this trade, 18 decimals @return error Any math calculation errors, only Error.OK means the returned values are valid @return newSpotPrice The updated selling spot price, in tokens @return newDelta The updated delta, used to parameterize the bonding curve @return outputValue The amount that the user should receive, in tokens @return protocolFee The amount of fee to send to the protocol, in tokens */ function getSellInfo( uint128 spotPrice, uint128 delta, uint256 numItems, uint256 feeMultiplier, uint256 protocolFeeMultiplier ) external view returns ( CurveErrorCodes.Error error, uint128 newSpotPrice, uint128 newDelta, uint256 outputValue, uint256 protocolFee ); }
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.16; interface ILSSVMPair { enum PoolType { TOKEN, NFT, TRADE } function withdrawAllETH() external; }
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.16; import "../ERC721A/IERC721A.sol"; import "./ILSSVMPair.sol"; import "./ICurve.sol"; interface ILSSVMPairFactory { /** @notice Creates a pair contract using EIP-1167. @param _nft The NFT contract of the collection the pair trades @param _bondingCurve The bonding curve for the pair to price NFTs, must be whitelisted @param _assetRecipient The address that will receive the assets traders give during trades. If set to address(0), assets will be sent to the pool address. Not available to TRADE pools. @param _poolType TOKEN, NFT, or TRADE @param _delta The delta value used by the bonding curve. The meaning of delta depends on the specific curve. @param _fee The fee taken by the LP in each trade. Can only be non-zero if _poolType is Trade. @param _spotPrice The initial selling spot price @param _initialNFTIDs The list of IDs of NFTs to transfer from the sender to the pair @return pair The new pair */ function createPairETH( IERC721A _nft, ICurve _bondingCurve, address payable _assetRecipient, ILSSVMPair.PoolType _poolType, uint128 _delta, uint96 _fee, uint128 _spotPrice, uint256[] calldata _initialNFTIDs ) external payable returns (ILSSVMPair pair); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _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 {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 1; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary 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 virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f || // ERC165 interface ID for ERC721Metadata. interfaceId == 0x780e9d63; } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ 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, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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 {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @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 for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, 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. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev 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 { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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 _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` 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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress); }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.0; contract CurveErrorCodes { enum Error { OK, // No error INVALID_NUMITEMS, // The numItem value is 0 SPOT_PRICE_OVERFLOW // The updated spot price doesn't fit into 128 bits } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAuthorizationUtilsV0.sol"; import "./ITemplateUtilsV0.sol"; import "./IWithdrawalUtilsV0.sol"; interface IAirnodeRrpV0 is IAuthorizationUtilsV0, ITemplateUtilsV0, IWithdrawalUtilsV0 { event SetSponsorshipStatus( address indexed sponsor, address indexed requester, bool sponsorshipStatus ); event MadeTemplateRequest( address indexed airnode, bytes32 indexed requestId, uint256 requesterRequestCount, uint256 chainId, address requester, bytes32 templateId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes parameters ); event MadeFullRequest( address indexed airnode, bytes32 indexed requestId, uint256 requesterRequestCount, uint256 chainId, address requester, bytes32 endpointId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes parameters ); event FulfilledRequest( address indexed airnode, bytes32 indexed requestId, bytes data ); event FailedRequest( address indexed airnode, bytes32 indexed requestId, string errorMessage ); function setSponsorshipStatus(address requester, bool sponsorshipStatus) external; function makeTemplateRequest( bytes32 templateId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes calldata parameters ) external returns (bytes32 requestId); function makeFullRequest( address airnode, bytes32 endpointId, address sponsor, address sponsorWallet, address fulfillAddress, bytes4 fulfillFunctionId, bytes calldata parameters ) external returns (bytes32 requestId); function fulfill( bytes32 requestId, address airnode, address fulfillAddress, bytes4 fulfillFunctionId, bytes calldata data, bytes calldata signature ) external returns (bool callSuccess, bytes memory callData); function fail( bytes32 requestId, address airnode, address fulfillAddress, bytes4 fulfillFunctionId, string calldata errorMessage ) external; function sponsorToRequesterToSponsorshipStatus( address sponsor, address requester ) external view returns (bool sponsorshipStatus); function requesterToRequestCountPlusOne(address requester) external view returns (uint256 requestCountPlusOne); function requestIsAwaitingFulfillment(bytes32 requestId) external view returns (bool isAwaitingFulfillment); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWithdrawalUtilsV0 { event RequestedWithdrawal( address indexed airnode, address indexed sponsor, bytes32 indexed withdrawalRequestId, address sponsorWallet ); event FulfilledWithdrawal( address indexed airnode, address indexed sponsor, bytes32 indexed withdrawalRequestId, address sponsorWallet, uint256 amount ); function requestWithdrawal(address airnode, address sponsorWallet) external; function fulfillWithdrawal( bytes32 withdrawalRequestId, address airnode, address sponsor ) external payable; function sponsorToWithdrawalRequestCount(address sponsor) external view returns (uint256 withdrawalRequestCount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITemplateUtilsV0 { event CreatedTemplate( bytes32 indexed templateId, address airnode, bytes32 endpointId, bytes parameters ); function createTemplate( address airnode, bytes32 endpointId, bytes calldata parameters ) external returns (bytes32 templateId); function getTemplates(bytes32[] calldata templateIds) external view returns ( address[] memory airnodes, bytes32[] memory endpointIds, bytes[] memory parameters ); function templates(bytes32 templateId) external view returns ( address airnode, bytes32 endpointId, bytes memory parameters ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IAuthorizationUtilsV0 { function checkAuthorizationStatus( address[] calldata authorizers, address airnode, bytes32 requestId, bytes32 endpointId, address sponsor, address requester ) external view returns (bool status); function checkAuthorizationStatuses( address[] calldata authorizers, address airnode, bytes32[] calldata requestIds, bytes32[] calldata endpointIds, address[] calldata sponsors, address[] calldata requesters ) external view returns (bool[] memory statuses); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"response","type":"uint256"}],"name":"ReceivedUint256","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestedUint256","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"EXP_DELTA","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STARTING_PRICE","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airnodeRrp","outputs":[{"internalType":"contract IAirnodeRrpV0","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentState","outputs":[{"internalType":"enum SudoChance.GameState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributePrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"fulfillUint256","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gameSudoPool","outputs":[{"internalType":"contract ILSSVMPair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRandomGameWinner","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sponsorWallet","type":"address"}],"name":"intializeGame","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"test","type":"bool"}],"name":"makeRequestUint256","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfTicketSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5073a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd604051806040016040528060128152602001715375646f4368616e63652047656e6573697360701b8152506040518060400160405280600381526020016253434760e81b81525081600290816200007f9190620001db565b5060036200008e8282620001db565b50600160005550506001600160a01b0381166080819052604051632b77c09f60e21b81523060048201526001602482015263addf027c90604401600060405180830381600087803b158015620000e357600080fd5b505af1158015620000f8573d6000803e3d6000fd5b50506008805460ff1916905550339150620001109050565b600c80546001600160a01b0319166001600160a01b0392909216919091179055620002a7565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200016157607f821691505b6020821081036200018257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001d657600081815260208120601f850160051c81016020861015620001b15750805b601f850160051c820191505b81811015620001d257828155600101620001bd565b5050505b505050565b81516001600160401b03811115620001f757620001f762000136565b6200020f816200020884546200014c565b8462000188565b602080601f8311600181146200024757600084156200022e5750858301515b600019600386901b1c1916600185901b178555620001d2565b600085815260208120601f198616915b82811015620002785788860151825594840194600190910190840162000257565b5085821015620002975787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805161297c620002d16000396000818161040701528181610ce30152610d99015261297c6000f3fe6080604052600436106101b95760003560e01c806370a08231116100eb578063b88d4fde1161008f578063dbc7372a11610061578063dbc7372a1461059d578063e7cf548c146105cf578063e985e9c5146105e4578063f7ac139e1461062d57005b8063b88d4fde146104d5578063c23dc68f146104f5578063c87b56dd14610562578063d12f70291461058257005b806395d89b41116100c857806395d89b411461043e5780639c94fa87146104535780639d7a147e14610478578063a22cb465146104b557005b806370a08231146103d557806371bab666146103f557806377b6e5041461042957005b80632f745c591161015d57806342842e0e1161012f57806342842e0e1461035557806342bc7e5b146103755780634f6ccce7146103955780636352211e146103b557005b80632f745c59146102df5780632fb4cf97146102ff57806332cb6b0c1461031f5780633718d90a1461033557005b8063095ea7b311610196578063095ea7b3146102515780630c3f6acf1461027157806318160ddd1461029857806323b872dd146102bf57005b806301ffc9a7146101c257806306fdde03146101f7578063081812fc1461021957005b366101c057005b005b3480156101ce57600080fd5b506101e26101dd36600461217b565b610643565b60405190151581526020015b60405180910390f35b34801561020357600080fd5b5061020c610714565b6040516101ee91906121e8565b34801561022557600080fd5b506102396102343660046121fb565b6107a6565b6040516001600160a01b0390911681526020016101ee565b34801561025d57600080fd5b506101c061026c366004612229565b610803565b34801561027d57600080fd5b5060085461028b9060ff1681565b6040516101ee919061226b565b3480156102a457600080fd5b5060015460005403600019015b6040519081526020016101ee565b3480156102cb57600080fd5b506101c06102da366004612285565b6108c9565b3480156102eb57600080fd5b506102b16102fa366004612229565b610ab8565b34801561030b57600080fd5b506101c061031a3660046122db565b610bd7565b34801561032b57600080fd5b506102b16109c481565b34801561034157600080fd5b506101c06103503660046122f6565b610d8e565b34801561036157600080fd5b506101c0610370366004612285565b610ea7565b34801561038157600080fd5b506101c0610390366004612372565b610ec7565b3480156103a157600080fd5b506102b16103b03660046121fb565b610fd9565b3480156103c157600080fd5b506102396103d03660046121fb565b611066565b3480156103e157600080fd5b506102b16103f0366004612372565b6110af565b34801561040157600080fd5b506102397f000000000000000000000000000000000000000000000000000000000000000081565b34801561043557600080fd5b506101c06110fe565b34801561044a57600080fd5b5061020c61126a565b34801561045f57600080fd5b506008546102399061010090046001600160a01b031681565b34801561048457600080fd5b50610494670de60af19e8dc00081565b6040516fffffffffffffffffffffffffffffffff90911681526020016101ee565b3480156104c157600080fd5b506101c06104d036600461238f565b611279565b3480156104e157600080fd5b506101c06104f03660046123da565b6112e5565b34801561050157600080fd5b506105156105103660046121fb565b61132f565b6040516101ee919081516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260609182015162ffffff169181019190915260800190565b34801561056e57600080fd5b5061020c61057d3660046121fb565b6113b7565b34801561058e57600080fd5b5061049466071afd498d000081565b3480156105a957600080fd5b506105b2611453565b604080519283526001600160a01b039091166020830152016101ee565b3480156105db57600080fd5b506102b161156f565b3480156105f057600080fd5b506101e26105ff3660046124ba565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561063957600080fd5b506102b160095481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806106a657507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806106da57507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b8061070e57507f780e9d63000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060028054610723906124f3565b80601f016020809104026020016040519081016040528092919081815260200182805461074f906124f3565b801561079c5780601f106107715761010080835404028352916020019161079c565b820191906000526020600020905b81548152906001019060200180831161077f57829003601f168201915b5050505050905090565b60006107b18261157f565b6107e7576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061080e82611066565b9050336001600160a01b038216146108605761082a81336105ff565b610860576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006108d4826115b4565b9050836001600160a01b0316816001600160a01b031614610921576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600660205260409020805461094d8187335b6001600160a01b039081169116811491141790565b6109785761095b86336105ff565b61097857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109b8576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109c5868686600161163c565b80156109d057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610a6257600184016000818152600460205260408120549003610a60576000548114610a605760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610ab0868686600161173a565b505050505050565b600080600080610ac7866117f6565b905060008167ffffffffffffffff811115610ae457610ae46123c4565b604051908082528060200260200182016040528015610b0d578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b838614610baf57610b488161185e565b91508160400151610ba75781516001600160a01b031615610b6857815194505b886001600160a01b0316856001600160a01b031603610ba75780838780600101985081518110610b9a57610b9a612527565b6020026020010181815250505b600101610b38565b50818781518110610bc257610bc2612527565b60200260200101519550505050505092915050565b600c546001600160a01b03163314610c245760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064015b60405180910390fd5b600d546040517f6e6be03f000000000000000000000000000000000000000000000000000000008152739d3c147ca16db954873a498e0af5852ab39139f260048201527ffb6d017bb87991b7495f563db3c8cf59ff87b09781947bb1e417006ad7f55a78602482015230604482018190526001600160a01b03928316606483015260848201527f3718d90a0000000000000000000000000000000000000000000000000000000060a482015260e060c4820152600060e48201819052917f00000000000000000000000000000000000000000000000000000000000000001690636e6be03f90610104016020604051808303816000875af1158015610d2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d51919061253d565b60405190915081907fcba2da2f3c0c732a104019a3104936397dde7343964c1518ceb760052e4537b190600090a281610d8a57600a8190555b5050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610e065760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206e6f74204169726e6f646520525250000000000000000000006044820152606401610c1b565b82600a5414610e575760405162461bcd60e51b815260206004820152600a60248201527f496e76616c6964206964000000000000000000000000000000000000000000006044820152606401610c1b565b610e63818301836121fb565b600b8190556000600a5560405190815283907f1ca47bacd454c26163f84eff4aa514e291ba9fa67ad6029e39567c122bbed30f9060200160405180910390a2505050565b610ec2838383604051806020016040528060008152506112e5565b505050565b600c546001600160a01b03163314610f0f5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610c1b565b600060085460ff166003811115610f2857610f28612255565b14610f755760405162461bcd60e51b815260206004820152601360248201527f47616d6520616c726561647920616374697665000000000000000000000000006044820152606401610c1b565b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055610fa56118dd565b600854610fc29061010090046001600160a01b03166109c46119dc565b600880546001919060ff191682805b021790555050565b6000610fee6001546000546000199190030190565b82106110625760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f7560448201527f6e647300000000000000000000000000000000000000000000000000000000006064820152608401610c1b565b5090565b6000806110728361132f565b9050806040015180156110855750333214155b156110a257505060085461010090046001600160a01b0316919050565b5192915050565b50919050565b6000806110bb836117f6565b6008549091506001600160a01b03848116610100909204161480156110e05750333214155b1561070e576110ed61156f565b6110f7908261256c565b9392505050565b600c546001600160a01b031633146111465760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610c1b565b600260085460ff16600381111561115f5761115f612255565b146111ac5760405162461bcd60e51b815260206004820152601760248201527f47616d65206e6f7420696e207072697a652070686173650000000000000000006044820152606401610c1b565b60006111b6611453565b915050600860019054906101000a90046001600160a01b03166001600160a01b03166390386bbf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b50505050611243600a476112319190612595565b600c546001600160a01b031690611b33565b6112566001600160a01b03821647611b33565b600880546003919060ff1916600183610fd1565b606060038054610723906124f3565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112f08484846108c9565b6001600160a01b0383163b156113295761130c84848484611b8e565b611329576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061138857506000548310155b156113935792915050565b61139c8361185e565b90508060400151156113ae5792915050565b6110f783611c7a565b60408051808201909152601d81527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000602082015260609060006113f984611cf2565b905060008160405160200161140e91906125a9565b60405160208183030381529060405290508261142982611e27565b60405160200161143a929190612745565b6040516020818303038152906040529350505050919050565b600080600b546000036114a85760405162461bcd60e51b815260206004820152601a60248201527f52616e646f6d6e657373206e6f7420696e697469616c697a65640000000000006044820152606401610c1b565b600b546000805b600a811015611526576114c66109c4846019611f7a565b9350915060006114d583611066565b90506001600160a01b0381161580159061150257506008546001600160a01b038281166101009092041614155b156115135791959194509092505050565b508061151e81612774565b9150506114af565b5060405162461bcd60e51b815260206004820152600f60248201527f4e6f2077696e6e657220666f756e6400000000000000000000000000000000006044820152606401610c1b565b600061157a60015490565b905090565b600081600111158015611593575060005482105b801561070e575050600090815260046020526040902054600160e01b161590565b6000818060011161160a5760005481101561160a5760008181526004602052604081205490600160e01b82169003611608575b806000036110f75750600019016000818152600460205260409020546115e7565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160085460ff16600381111561165557611655612255565b14806116775750600060085460ff16600381111561167557611675612255565b145b6116c35760405162461bcd60e51b815260206004820152601360248201527f47616d65206d75737420626520616374697665000000000000000000000000006044820152606401610c1b565b6001600160a01b0383161580156116ed57506008546001600160a01b038581166101009092041614155b156113295760405162461bcd60e51b815260206004820152601360248201527f43616e2774206275726e206469726563746c79000000000000000000000000006044820152606401610c1b565b6008546001600160a01b038481166101009092041614801561176457506001600160a01b03841615155b1561179e5760005b8181101561179857611786611781828561256c565b611fd8565b8061179081612774565b91505061176c565b50611329565b6008546001600160a01b03858116610100909204161480156117c857506001600160a01b03831615155b156113295760098054600101908190556109c481106117ef576008805460ff191660021790555b5050505050565b60006001600160a01b038216611838576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461070e90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b73b16c1342e617a5b6e4b631eb114483fdb289c0a463ce9c095d3073432f962d8209781da23fb37b6b59ee15de7d984160006002670de60af19e8dc0008266071afd498d00008160405190808252806020026020018201604052801561194d578160200160208202803683370190505b506040518963ffffffff1660e01b815260040161197198979695949392919061278d565b6020604051808303816000875af1158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b4919061284a565b600860016101000a8154816001600160a01b0302191690836001600160a01b03160217905550565b6000546001600160a01b038316611a1f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003611a59576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388821115611a95576040517f3db1f9af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611aa2600084838561163c565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600482528083206001871460e11b4260a01b17851790558051600019868801018152905185927fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d928290030190a48082016000908155610ec29084838561173a565b600080600080600085875af1905080610ec25760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610c1b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611bc3903390899088908890600401612867565b6020604051808303816000875af1925050508015611bfe575060408051601f3d908101601f19168201909252611bfb918101906128a3565b60015b611c5c573d808015611c2c576040519150601f19603f3d011682016040523d82523d6000602084013e611c31565b606091505b508051600003611c54576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261070e611caa836115b4565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b606081600003611d3557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611d5f5780611d4981612774565b9150611d589050600a83612595565b9150611d39565b60008167ffffffffffffffff811115611d7a57611d7a6123c4565b6040519080825280601f01601f191660200182016040528015611da4576020820181803683370190505b5090505b8415611c7257611db96001836128c0565b9150611dc6600a866128d3565b611dd190603061256c565b60f81b818381518110611de657611de6612527565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611e20600a86612595565b9450611da8565b60608151600003611e4657505060408051602081019091526000815290565b60006040518060600160405280604081526020016129076040913990506000600384516002611e75919061256c565b611e7f9190612595565b611e8a9060046128e7565b67ffffffffffffffff811115611ea257611ea26123c4565b6040519080825280601f01601f191660200182016040528015611ecc576020820181803683370190505b509050600182016020820185865187015b80821015611f38576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611edd565b5050600386510660018114611f545760028114611f6757611f6f565b603d6001830353603d6002830353611f6f565b603d60018303535b509195945050505050565b6000806001831b80851015611fb1576040805160208101879052016040516020818303038152906040528051906020012060001c94505b600086611fbf6001846128c0565b8716611fcb91906128d3565b979590941c955050505050565b611fe3816000611fe6565b50565b6000611ff1836115b4565b90508060008061200f86600090815260066020526040902080549091565b91509150841561204f57612024818433610938565b61204f5761203283336105ff565b61204f57604051632ce44b5f60e11b815260040160405180910390fd5b61205d83600088600161163c565b801561206857600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b8516900361210f5760018601600081815260046020526040812054900361210d57600054811461210d5760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461215583600088600161173a565b5050600180548101905550505050565b6001600160e01b031981168114611fe357600080fd5b60006020828403121561218d57600080fd5b81356110f781612165565b60005b838110156121b357818101518382015260200161219b565b50506000910152565b600081518084526121d4816020860160208601612198565b601f01601f19169290920160200192915050565b6020815260006110f760208301846121bc565b60006020828403121561220d57600080fd5b5035919050565b6001600160a01b0381168114611fe357600080fd5b6000806040838503121561223c57600080fd5b823561224781612214565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061227f5761227f612255565b91905290565b60008060006060848603121561229a57600080fd5b83356122a581612214565b925060208401356122b581612214565b929592945050506040919091013590565b803580151581146122d657600080fd5b919050565b6000602082840312156122ed57600080fd5b6110f7826122c6565b60008060006040848603121561230b57600080fd5b83359250602084013567ffffffffffffffff8082111561232a57600080fd5b818601915086601f83011261233e57600080fd5b81358181111561234d57600080fd5b87602082850101111561235f57600080fd5b6020830194508093505050509250925092565b60006020828403121561238457600080fd5b81356110f781612214565b600080604083850312156123a257600080fd5b82356123ad81612214565b91506123bb602084016122c6565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156123f057600080fd5b84356123fb81612214565b9350602085013561240b81612214565b925060408501359150606085013567ffffffffffffffff8082111561242f57600080fd5b818701915087601f83011261244357600080fd5b813581811115612455576124556123c4565b604051601f8201601f19908116603f0116810190838211818310171561247d5761247d6123c4565b816040528281528a602084870101111561249657600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156124cd57600080fd5b82356124d881612214565b915060208301356124e881612214565b809150509250929050565b600181811c9082168061250757607f821691505b6020821081036110a957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561254f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070e5761070e612556565b634e487b7160e01b600052601260045260246000fd5b6000826125a4576125a461257f565b500490565b7f7b0a09226e616d65223a20225343205469636b657420230000000000000000008152600082516125e1816017850160208701612198565b7f222c0a09226465736372697074696f6e223a202200000000000000000000000060179390910192830152507f5375646f4368616e636520697320616e20696e6e6f7661746976652067616d65602b8201527f206f6e205375646f53776170207768657265207468652077696e6e6572206765604b8201527f747320616c6c206f6620746865206c697175696469747920696e207468652070606b8201527f6f6f6c0000000000000000000000000000000000000000000000000000000000608b8201527f222c0a0922696d616765223a2022000000000000000000000000000000000000608e8201527f697066733a2f2f516d637a74693850553175756d5a74366b5634465853453170609c8201527f4c376741425646665670526148734c71467854706d000000000000000000000060bc8201527f220a7d000000000000000000000000000000000000000000000000000000000060d182015260d401919050565b60008351612757818460208801612198565b83519083019061276b818360208801612198565b01949350505050565b60006001820161278657612786612556565b5060010190565b60006101008083016001600160a01b03808d1685526020818d1681870152818c16604087015260038b106127c3576127c3612255565b606086018b90526fffffffffffffffffffffffffffffffff8a811660808801526bffffffffffffffffffffffff8a1660a0880152881660c087015260e086019390935250845190819052610120840191808601919060005b828110156128375783518552938101939281019260010161281b565b50929d9c50505050505050505050505050565b60006020828403121561285c57600080fd5b81516110f781612214565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261289960808301846121bc565b9695505050505050565b6000602082840312156128b557600080fd5b81516110f781612165565b8181038181111561070e5761070e612556565b6000826128e2576128e261257f565b500690565b600081600019048311821515161561290157612901612556565b50029056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122042a2e380c7cb2e70098d824aaa95e8607b8b1c24b2afed2c749d9d0e491ba91464736f6c63430008100033
Deployed Bytecode
0x6080604052600436106101b95760003560e01c806370a08231116100eb578063b88d4fde1161008f578063dbc7372a11610061578063dbc7372a1461059d578063e7cf548c146105cf578063e985e9c5146105e4578063f7ac139e1461062d57005b8063b88d4fde146104d5578063c23dc68f146104f5578063c87b56dd14610562578063d12f70291461058257005b806395d89b41116100c857806395d89b411461043e5780639c94fa87146104535780639d7a147e14610478578063a22cb465146104b557005b806370a08231146103d557806371bab666146103f557806377b6e5041461042957005b80632f745c591161015d57806342842e0e1161012f57806342842e0e1461035557806342bc7e5b146103755780634f6ccce7146103955780636352211e146103b557005b80632f745c59146102df5780632fb4cf97146102ff57806332cb6b0c1461031f5780633718d90a1461033557005b8063095ea7b311610196578063095ea7b3146102515780630c3f6acf1461027157806318160ddd1461029857806323b872dd146102bf57005b806301ffc9a7146101c257806306fdde03146101f7578063081812fc1461021957005b366101c057005b005b3480156101ce57600080fd5b506101e26101dd36600461217b565b610643565b60405190151581526020015b60405180910390f35b34801561020357600080fd5b5061020c610714565b6040516101ee91906121e8565b34801561022557600080fd5b506102396102343660046121fb565b6107a6565b6040516001600160a01b0390911681526020016101ee565b34801561025d57600080fd5b506101c061026c366004612229565b610803565b34801561027d57600080fd5b5060085461028b9060ff1681565b6040516101ee919061226b565b3480156102a457600080fd5b5060015460005403600019015b6040519081526020016101ee565b3480156102cb57600080fd5b506101c06102da366004612285565b6108c9565b3480156102eb57600080fd5b506102b16102fa366004612229565b610ab8565b34801561030b57600080fd5b506101c061031a3660046122db565b610bd7565b34801561032b57600080fd5b506102b16109c481565b34801561034157600080fd5b506101c06103503660046122f6565b610d8e565b34801561036157600080fd5b506101c0610370366004612285565b610ea7565b34801561038157600080fd5b506101c0610390366004612372565b610ec7565b3480156103a157600080fd5b506102b16103b03660046121fb565b610fd9565b3480156103c157600080fd5b506102396103d03660046121fb565b611066565b3480156103e157600080fd5b506102b16103f0366004612372565b6110af565b34801561040157600080fd5b506102397f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd81565b34801561043557600080fd5b506101c06110fe565b34801561044a57600080fd5b5061020c61126a565b34801561045f57600080fd5b506008546102399061010090046001600160a01b031681565b34801561048457600080fd5b50610494670de60af19e8dc00081565b6040516fffffffffffffffffffffffffffffffff90911681526020016101ee565b3480156104c157600080fd5b506101c06104d036600461238f565b611279565b3480156104e157600080fd5b506101c06104f03660046123da565b6112e5565b34801561050157600080fd5b506105156105103660046121fb565b61132f565b6040516101ee919081516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260609182015162ffffff169181019190915260800190565b34801561056e57600080fd5b5061020c61057d3660046121fb565b6113b7565b34801561058e57600080fd5b5061049466071afd498d000081565b3480156105a957600080fd5b506105b2611453565b604080519283526001600160a01b039091166020830152016101ee565b3480156105db57600080fd5b506102b161156f565b3480156105f057600080fd5b506101e26105ff3660046124ba565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561063957600080fd5b506102b160095481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806106a657507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806106da57507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b8061070e57507f780e9d63000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b606060028054610723906124f3565b80601f016020809104026020016040519081016040528092919081815260200182805461074f906124f3565b801561079c5780601f106107715761010080835404028352916020019161079c565b820191906000526020600020905b81548152906001019060200180831161077f57829003601f168201915b5050505050905090565b60006107b18261157f565b6107e7576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061080e82611066565b9050336001600160a01b038216146108605761082a81336105ff565b610860576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006108d4826115b4565b9050836001600160a01b0316816001600160a01b031614610921576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600660205260409020805461094d8187335b6001600160a01b039081169116811491141790565b6109785761095b86336105ff565b61097857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109b8576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109c5868686600161163c565b80156109d057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610a6257600184016000818152600460205260408120549003610a60576000548114610a605760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610ab0868686600161173a565b505050505050565b600080600080610ac7866117f6565b905060008167ffffffffffffffff811115610ae457610ae46123c4565b604051908082528060200260200182016040528015610b0d578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b838614610baf57610b488161185e565b91508160400151610ba75781516001600160a01b031615610b6857815194505b886001600160a01b0316856001600160a01b031603610ba75780838780600101985081518110610b9a57610b9a612527565b6020026020010181815250505b600101610b38565b50818781518110610bc257610bc2612527565b60200260200101519550505050505092915050565b600c546001600160a01b03163314610c245760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064015b60405180910390fd5b600d546040517f6e6be03f000000000000000000000000000000000000000000000000000000008152739d3c147ca16db954873a498e0af5852ab39139f260048201527ffb6d017bb87991b7495f563db3c8cf59ff87b09781947bb1e417006ad7f55a78602482015230604482018190526001600160a01b03928316606483015260848201527f3718d90a0000000000000000000000000000000000000000000000000000000060a482015260e060c4820152600060e48201819052917f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd1690636e6be03f90610104016020604051808303816000875af1158015610d2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d51919061253d565b60405190915081907fcba2da2f3c0c732a104019a3104936397dde7343964c1518ceb760052e4537b190600090a281610d8a57600a8190555b5050565b336001600160a01b037f000000000000000000000000a0ad79d995ddeeb18a14eaef56a549a04e3aa1bd1614610e065760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206e6f74204169726e6f646520525250000000000000000000006044820152606401610c1b565b82600a5414610e575760405162461bcd60e51b815260206004820152600a60248201527f496e76616c6964206964000000000000000000000000000000000000000000006044820152606401610c1b565b610e63818301836121fb565b600b8190556000600a5560405190815283907f1ca47bacd454c26163f84eff4aa514e291ba9fa67ad6029e39567c122bbed30f9060200160405180910390a2505050565b610ec2838383604051806020016040528060008152506112e5565b505050565b600c546001600160a01b03163314610f0f5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610c1b565b600060085460ff166003811115610f2857610f28612255565b14610f755760405162461bcd60e51b815260206004820152601360248201527f47616d6520616c726561647920616374697665000000000000000000000000006044820152606401610c1b565b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055610fa56118dd565b600854610fc29061010090046001600160a01b03166109c46119dc565b600880546001919060ff191682805b021790555050565b6000610fee6001546000546000199190030190565b82106110625760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f7560448201527f6e647300000000000000000000000000000000000000000000000000000000006064820152608401610c1b565b5090565b6000806110728361132f565b9050806040015180156110855750333214155b156110a257505060085461010090046001600160a01b0316919050565b5192915050565b50919050565b6000806110bb836117f6565b6008549091506001600160a01b03848116610100909204161480156110e05750333214155b1561070e576110ed61156f565b6110f7908261256c565b9392505050565b600c546001600160a01b031633146111465760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610c1b565b600260085460ff16600381111561115f5761115f612255565b146111ac5760405162461bcd60e51b815260206004820152601760248201527f47616d65206e6f7420696e207072697a652070686173650000000000000000006044820152606401610c1b565b60006111b6611453565b915050600860019054906101000a90046001600160a01b03166001600160a01b03166390386bbf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561120957600080fd5b505af115801561121d573d6000803e3d6000fd5b50505050611243600a476112319190612595565b600c546001600160a01b031690611b33565b6112566001600160a01b03821647611b33565b600880546003919060ff1916600183610fd1565b606060038054610723906124f3565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112f08484846108c9565b6001600160a01b0383163b156113295761130c84848484611b8e565b611329576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061138857506000548310155b156113935792915050565b61139c8361185e565b90508060400151156113ae5792915050565b6110f783611c7a565b60408051808201909152601d81527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000602082015260609060006113f984611cf2565b905060008160405160200161140e91906125a9565b60405160208183030381529060405290508261142982611e27565b60405160200161143a929190612745565b6040516020818303038152906040529350505050919050565b600080600b546000036114a85760405162461bcd60e51b815260206004820152601a60248201527f52616e646f6d6e657373206e6f7420696e697469616c697a65640000000000006044820152606401610c1b565b600b546000805b600a811015611526576114c66109c4846019611f7a565b9350915060006114d583611066565b90506001600160a01b0381161580159061150257506008546001600160a01b038281166101009092041614155b156115135791959194509092505050565b508061151e81612774565b9150506114af565b5060405162461bcd60e51b815260206004820152600f60248201527f4e6f2077696e6e657220666f756e6400000000000000000000000000000000006044820152606401610c1b565b600061157a60015490565b905090565b600081600111158015611593575060005482105b801561070e575050600090815260046020526040902054600160e01b161590565b6000818060011161160a5760005481101561160a5760008181526004602052604081205490600160e01b82169003611608575b806000036110f75750600019016000818152600460205260409020546115e7565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160085460ff16600381111561165557611655612255565b14806116775750600060085460ff16600381111561167557611675612255565b145b6116c35760405162461bcd60e51b815260206004820152601360248201527f47616d65206d75737420626520616374697665000000000000000000000000006044820152606401610c1b565b6001600160a01b0383161580156116ed57506008546001600160a01b038581166101009092041614155b156113295760405162461bcd60e51b815260206004820152601360248201527f43616e2774206275726e206469726563746c79000000000000000000000000006044820152606401610c1b565b6008546001600160a01b038481166101009092041614801561176457506001600160a01b03841615155b1561179e5760005b8181101561179857611786611781828561256c565b611fd8565b8061179081612774565b91505061176c565b50611329565b6008546001600160a01b03858116610100909204161480156117c857506001600160a01b03831615155b156113295760098054600101908190556109c481106117ef576008805460ff191660021790555b5050505050565b60006001600160a01b038216611838576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461070e90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b73b16c1342e617a5b6e4b631eb114483fdb289c0a463ce9c095d3073432f962d8209781da23fb37b6b59ee15de7d984160006002670de60af19e8dc0008266071afd498d00008160405190808252806020026020018201604052801561194d578160200160208202803683370190505b506040518963ffffffff1660e01b815260040161197198979695949392919061278d565b6020604051808303816000875af1158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b4919061284a565b600860016101000a8154816001600160a01b0302191690836001600160a01b03160217905550565b6000546001600160a01b038316611a1f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003611a59576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388821115611a95576040517f3db1f9af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611aa2600084838561163c565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600482528083206001871460e11b4260a01b17851790558051600019868801018152905185927fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d928290030190a48082016000908155610ec29084838561173a565b600080600080600085875af1905080610ec25760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610c1b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611bc3903390899088908890600401612867565b6020604051808303816000875af1925050508015611bfe575060408051601f3d908101601f19168201909252611bfb918101906128a3565b60015b611c5c573d808015611c2c576040519150601f19603f3d011682016040523d82523d6000602084013e611c31565b606091505b508051600003611c54576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261070e611caa836115b4565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b606081600003611d3557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611d5f5780611d4981612774565b9150611d589050600a83612595565b9150611d39565b60008167ffffffffffffffff811115611d7a57611d7a6123c4565b6040519080825280601f01601f191660200182016040528015611da4576020820181803683370190505b5090505b8415611c7257611db96001836128c0565b9150611dc6600a866128d3565b611dd190603061256c565b60f81b818381518110611de657611de6612527565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611e20600a86612595565b9450611da8565b60608151600003611e4657505060408051602081019091526000815290565b60006040518060600160405280604081526020016129076040913990506000600384516002611e75919061256c565b611e7f9190612595565b611e8a9060046128e7565b67ffffffffffffffff811115611ea257611ea26123c4565b6040519080825280601f01601f191660200182016040528015611ecc576020820181803683370190505b509050600182016020820185865187015b80821015611f38576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611edd565b5050600386510660018114611f545760028114611f6757611f6f565b603d6001830353603d6002830353611f6f565b603d60018303535b509195945050505050565b6000806001831b80851015611fb1576040805160208101879052016040516020818303038152906040528051906020012060001c94505b600086611fbf6001846128c0565b8716611fcb91906128d3565b979590941c955050505050565b611fe3816000611fe6565b50565b6000611ff1836115b4565b90508060008061200f86600090815260066020526040902080549091565b91509150841561204f57612024818433610938565b61204f5761203283336105ff565b61204f57604051632ce44b5f60e11b815260040160405180910390fd5b61205d83600088600161163c565b801561206857600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b8516900361210f5760018601600081815260046020526040812054900361210d57600054811461210d5760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461215583600088600161173a565b5050600180548101905550505050565b6001600160e01b031981168114611fe357600080fd5b60006020828403121561218d57600080fd5b81356110f781612165565b60005b838110156121b357818101518382015260200161219b565b50506000910152565b600081518084526121d4816020860160208601612198565b601f01601f19169290920160200192915050565b6020815260006110f760208301846121bc565b60006020828403121561220d57600080fd5b5035919050565b6001600160a01b0381168114611fe357600080fd5b6000806040838503121561223c57600080fd5b823561224781612214565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061227f5761227f612255565b91905290565b60008060006060848603121561229a57600080fd5b83356122a581612214565b925060208401356122b581612214565b929592945050506040919091013590565b803580151581146122d657600080fd5b919050565b6000602082840312156122ed57600080fd5b6110f7826122c6565b60008060006040848603121561230b57600080fd5b83359250602084013567ffffffffffffffff8082111561232a57600080fd5b818601915086601f83011261233e57600080fd5b81358181111561234d57600080fd5b87602082850101111561235f57600080fd5b6020830194508093505050509250925092565b60006020828403121561238457600080fd5b81356110f781612214565b600080604083850312156123a257600080fd5b82356123ad81612214565b91506123bb602084016122c6565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156123f057600080fd5b84356123fb81612214565b9350602085013561240b81612214565b925060408501359150606085013567ffffffffffffffff8082111561242f57600080fd5b818701915087601f83011261244357600080fd5b813581811115612455576124556123c4565b604051601f8201601f19908116603f0116810190838211818310171561247d5761247d6123c4565b816040528281528a602084870101111561249657600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156124cd57600080fd5b82356124d881612214565b915060208301356124e881612214565b809150509250929050565b600181811c9082168061250757607f821691505b6020821081036110a957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561254f57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561070e5761070e612556565b634e487b7160e01b600052601260045260246000fd5b6000826125a4576125a461257f565b500490565b7f7b0a09226e616d65223a20225343205469636b657420230000000000000000008152600082516125e1816017850160208701612198565b7f222c0a09226465736372697074696f6e223a202200000000000000000000000060179390910192830152507f5375646f4368616e636520697320616e20696e6e6f7661746976652067616d65602b8201527f206f6e205375646f53776170207768657265207468652077696e6e6572206765604b8201527f747320616c6c206f6620746865206c697175696469747920696e207468652070606b8201527f6f6f6c0000000000000000000000000000000000000000000000000000000000608b8201527f222c0a0922696d616765223a2022000000000000000000000000000000000000608e8201527f697066733a2f2f516d637a74693850553175756d5a74366b5634465853453170609c8201527f4c376741425646665670526148734c71467854706d000000000000000000000060bc8201527f220a7d000000000000000000000000000000000000000000000000000000000060d182015260d401919050565b60008351612757818460208801612198565b83519083019061276b818360208801612198565b01949350505050565b60006001820161278657612786612556565b5060010190565b60006101008083016001600160a01b03808d1685526020818d1681870152818c16604087015260038b106127c3576127c3612255565b606086018b90526fffffffffffffffffffffffffffffffff8a811660808801526bffffffffffffffffffffffff8a1660a0880152881660c087015260e086019390935250845190819052610120840191808601919060005b828110156128375783518552938101939281019260010161281b565b50929d9c50505050505050505050505050565b60006020828403121561285c57600080fd5b81516110f781612214565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261289960808301846121bc565b9695505050505050565b6000602082840312156128b557600080fd5b81516110f781612165565b8181038181111561070e5761070e612556565b6000826128e2576128e261257f565b500690565b600081600019048311821515161561290157612901612556565b50029056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122042a2e380c7cb2e70098d824aaa95e8607b8b1c24b2afed2c749d9d0e491ba91464736f6c63430008100033
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.