ERC-721
Overview
Max Total Supply
101 BBBPS4
Holders
40
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 BBBPS4Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BrawlerBearzBattlePassSeason4
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import {IBrawlerBearzDynamicItems} from "./interfaces/IBrawlerBearzDynamicItems.sol"; import "./tunnel/FxBaseRootTunnel.sol"; /******************************************************************************* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|,|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@@|,*|&@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,**%@@@@@@@@%|******%&@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&##*****|||**,(%%%%%**|%@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***,#%%%%**#&@@@@@#**,|@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@*,(@@@@@@@@@@**,(&@@@@#**%@@@@@@||(%@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@%|,****&@((@&***&@@@@@@%||||||||#%&@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@&%#*****||||||**#%&@%%||||||||#@&%#(@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@&**,(&@@@@@%|||||*##&&&&##|||||(%@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@**,%@@@@@@@(|*|#%@@@@@@@@#||#%%@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@#||||#@@@@||*|%@@@@@@@@&|||%%&@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@#,,,,,,*|**||%|||||||###&@@@@@@@#|||#%@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@&#||*|||||%%%@%%%#|||%@@@@@@@@&(|(%&@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@&&%%(||||@@@@@@&|||||(%&((||(#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@%%(||||||||||#%#(|||||%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@&%#######%%@@**||(#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%##%%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ********************************************************************************/ /** * @title BrawlerBearzBattlePassSeason4 * @author @scottybmitch * @dev Battle pass public mint and L2 sync on mint, non-transferable, or sellable */ contract BrawlerBearzBattlePassSeason4 is FxBaseRootTunnel, ERC721AQueryable, ERC721ABurnable, Ownable { using Strings for uint256; /// @dev Sync actions bytes32 public constant MINTED = keccak256("MINTED"); /// @notice Vendor contract IBrawlerBearzDynamicItems public vendorContract; // @dev Base uri for the nft string private baseURI = "ipfs://bafybeielzvnm3axmc4fy5bd26ootdscrybbi6hezhu7gzristdroaxt4au/"; /// @notice Pro battle pass tier uint256 constant PRO_PASS = 1; /// @notice Pro pass mint price uint256 public proPrice = 0.045 ether; /// @notice Pro battle pass tier uint256 constant ENTRY_PASS = 2; /// @notice Pro pass mint price uint256 public entryPrice = 0.01 ether; // @dev Treasury address public treasury = payable(0x39bfA2b4319581bc885A2d4b9F0C90C2e1c24B87); /* * @notice All mints live ~ December 2nd, 9AM EST * @dev Mints go live date */ uint256 public liveAt = 1701525600; /* * @notice All mints expired * @dev Mints expire at */ uint256 public expiresAt = 1702746000; /// @notice Mapping of token id to the pass type mapping(uint256 => uint256) private tokenIdToPassType; /// @dev Thrown on approval error CannotApproveAll(); /// @dev Thrown on transfer error Nontransferable(); modifier mintIsActive() { require( block.timestamp > liveAt && block.timestamp < expiresAt, "Minting is not active." ); _; } constructor( address _checkpointManager, address _fxRoot, address _vendorContractAddress ) FxBaseRootTunnel(_checkpointManager, _fxRoot) ERC721A("Brawler Bearz Battle Pass: S4", "BBBPS4") { vendorContract = IBrawlerBearzDynamicItems(_vendorContractAddress); } /** * @notice Pro pass mints * @param _amount The amount of passes to mint **/ function proPassMint(uint256 _amount) external payable mintIsActive { require(msg.value >= _amount * proPrice, "Not enough funds."); address to = _msgSender(); // Mint a supply crate per mint uint256[] memory itemIds = new uint256[](_amount); uint256[] memory tokenIds = new uint256[](_amount); uint256 nextTokenId = _nextTokenId(); for (uint256 i; i < _amount; ) { itemIds[i] = 364; // https://opensea.io/assets/ethereum/0xbd24a76f4135f930f5c49f6c30e0e30a61b97537/364 tokenIds[i] = nextTokenId + i; tokenIdToPassType[nextTokenId + i] = PRO_PASS; // Set pass type unchecked { ++i; } } vendorContract.dropItems(to, itemIds); // Mint passes _mint(to, _amount); // Sync w/ child _sendMessageToChild( abi.encode(MINTED, abi.encode(to, PRO_PASS, tokenIds)) ); } /** * @notice Entry pass mints * @param _amount The amount of passes to mint **/ function entryPassMint(uint256 _amount) external payable mintIsActive { require(msg.value >= _amount * entryPrice, "Not enough funds."); address to = _msgSender(); uint256[] memory tokenIds = new uint256[](_amount); uint256 nextTokenId = _nextTokenId(); for (uint256 i; i < _amount; ) { tokenIds[i] = nextTokenId + i; tokenIdToPassType[nextTokenId + i] = ENTRY_PASS; unchecked { ++i; } } // Mint passes _mint(to, _amount); // Sync w/ child _sendMessageToChild( abi.encode(MINTED, abi.encode(to, ENTRY_PASS, tokenIds)) ); } /** * @notice Returns the URI for a given token id * @param _tokenId A tokenId */ function tokenURI( uint256 _tokenId ) public view override returns (string memory) { if (!_exists(_tokenId)) revert OwnerQueryForNonexistentToken(); return string( abi.encodePacked( baseURI, Strings.toString(tokenIdToPassType[_tokenId]) ) ); } // @dev Check if mint is live function isLive() public view returns (bool) { return block.timestamp > liveAt && block.timestamp < expiresAt; } // @dev Returns the starting token ID. function _startTokenId() internal view virtual override returns (uint256) { return 1; } /** * @notice Sets entries price * @param _entryPrice A base uri */ function setEntryPrice(uint256 _entryPrice) external onlyOwner { entryPrice = _entryPrice; } /** * @notice Sets pro price * @param _proPrice A base uri */ function setProPrice(uint256 _proPrice) external onlyOwner { proPrice = _proPrice; } /** * @notice Sets the base URI of the NFT * @param _baseURI A base uri */ function setBaseURI(string calldata _baseURI) external onlyOwner { baseURI = _baseURI; } /** * @notice Treasury mints * @param _amount The amount of passes to mint to the treasury wallet **/ function treasuryMint(uint256 _amount) external onlyOwner { _mint(treasury, _amount); } /** * @notice Sets timestamps for live and expires timeframe * @param _liveAt A unix timestamp for live date * @param _expiresAt A unix timestamp for expiration date */ function setMintWindow( uint256 _liveAt, uint256 _expiresAt ) external onlyOwner { liveAt = _liveAt; expiresAt = _expiresAt; } /** * @notice Sets the treasury recipient * @param _treasury The treasury address */ function setTreasury(address _treasury) public onlyOwner { treasury = payable(_treasury); } /** * Set FxChildTunnel * @param _fxChildTunnel - the fxChildTunnel address */ function setFxChildTunnel( address _fxChildTunnel ) public override onlyOwner { fxChildTunnel = _fxChildTunnel; } /** * @notice Sets the bearz vendor item contract * @dev only owner call this function * @param _vendorContractAddress The new contract address */ function setVendorContractAddress( address _vendorContractAddress ) external onlyOwner { vendorContract = IBrawlerBearzDynamicItems(_vendorContractAddress); } /// @notice Withdraws funds from contract function withdraw() public onlyOwner { (bool success, ) = treasury.call{value: address(this).balance}(""); require(success, "999"); } /// @dev Prevent approvals of token outside of the treasury wallet function setApprovalForAll( address operator, bool approved ) public virtual override { if (_msgSenderERC721A() != treasury) { revert CannotApproveAll(); } super.setApprovalForAll(operator, approved); } /// @dev Prevent token transfer unless burning function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override(ERC721A) { // Treasury is allowed to sell passes if (from == treasury) { // If the item is coming from the treasury, we process as if it were a processing a pro pass mint uint256[] memory itemIds = new uint256[](quantity); uint256[] memory tokenIds = new uint256[](quantity); uint256 nextTokenId = startTokenId; for (uint256 i; i < quantity; ) { itemIds[i] = 364; // https://opensea.io/assets/ethereum/0xbd24a76f4135f930f5c49f6c30e0e30a61b97537/364 tokenIds[i] = nextTokenId + i; tokenIdToPassType[nextTokenId + i] = PRO_PASS; unchecked { ++i; } } // Mint a supply crate per mint vendorContract.dropItems(to, itemIds); // Sync w/ child _sendMessageToChild( abi.encode(MINTED, abi.encode(to, PRO_PASS, tokenIds)) ); } else if (to != address(0) && from != address(0)) { // Cannot transfer otherwise, soul bound revert Nontransferable(); } super._beforeTokenTransfers(from, to, startTokenId, quantity); } function _processMessageFromChild(bytes memory message) internal override { // noop } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; interface IBrawlerBearzDynamicItems is IERC1155Upgradeable { struct CustomMetadata { string typeOf; string name; uint256 xp; // Min XP required to equip string rarity; // LEGENDARY, SUPER_RARE, RARE, UNCOMMON, COMMON uint256 atk; // Correlated to Strength uint256 def; // Correlated to Endurance uint256 usageChance; // Duration string usageDuration; // Persistent / Consumable string description; uint256 intel; // Correlated to intelligence uint256 luck; // Correlated to luck } function getMetadata(uint256 tokenId) external view returns (CustomMetadata memory); function getMetadataBatch(uint256[] calldata tokenIds) external view returns (CustomMetadata[] memory); function getItemType(uint256 tokenId) external view returns (string memory); function getItemName(uint256 tokenId) external view returns (string memory); function getItemXPReq(uint256 tokenId) external view returns (uint256); function setItemMetadata( uint256 tokenId, string calldata typeOf, string calldata name, uint256 xp ) external; function setItemMetadataStruct( uint256 tokenId, CustomMetadata memory metadata ) external; function shopDrop(address _toAddress, uint256 _amount) external; function dropItems(address _toAddress, uint256[] calldata itemIds) external; function burnItemForOwnerAddress( uint256 _typeId, uint256 _quantity, address _materialOwnerAddress ) external; function burnItemsForOwnerAddress( uint256[] memory _typeIds, uint256[] memory _quantities, address _materialOwnerAddress ) external; function mintItemToAddress( uint256 _typeId, uint256 _quantity, address _toAddress ) external; function mintBatchItemsToAddress( uint256[] memory _typeIds, uint256[] memory _quantities, address _toAddress ) external; function bulkSafeTransfer( uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients ) external; }
pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; library ExitPayloadReader { using RLPReader for bytes; using RLPReader for RLPReader.RLPItem; uint8 constant WORD_SIZE = 32; struct ExitPayload { RLPReader.RLPItem[] data; } struct Receipt { RLPReader.RLPItem[] data; bytes raw; uint256 logIndex; } struct Log { RLPReader.RLPItem data; RLPReader.RLPItem[] list; } struct LogTopics { RLPReader.RLPItem[] data; } // copy paste of private copy() from RLPReader to avoid changing of existing contracts function copy( uint256 src, uint256 dest, uint256 len ) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } function toExitPayload(bytes memory data) internal pure returns (ExitPayload memory) { RLPReader.RLPItem[] memory payloadData = data.toRlpItem().toList(); return ExitPayload(payloadData); } function getHeaderNumber(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[0].toUint(); } function getBlockProof(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[1].toBytes(); } function getBlockNumber(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[2].toUint(); } function getBlockTime(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[3].toUint(); } function getTxRoot(ExitPayload memory payload) internal pure returns (bytes32) { return bytes32(payload.data[4].toUint()); } function getReceiptRoot(ExitPayload memory payload) internal pure returns (bytes32) { return bytes32(payload.data[5].toUint()); } function getReceipt(ExitPayload memory payload) internal pure returns (Receipt memory receipt) { receipt.raw = payload.data[6].toBytes(); RLPReader.RLPItem memory receiptItem = receipt.raw.toRlpItem(); if (receiptItem.isList()) { // legacy tx receipt.data = receiptItem.toList(); } else { // pop first byte before parsting receipt bytes memory typedBytes = receipt.raw; bytes memory result = new bytes(typedBytes.length - 1); uint256 srcPtr; uint256 destPtr; assembly { srcPtr := add(33, typedBytes) destPtr := add(0x20, result) } copy(srcPtr, destPtr, result.length); receipt.data = result.toRlpItem().toList(); } receipt.logIndex = getReceiptLogIndex(payload); return receipt; } function getReceiptProof(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[7].toBytes(); } function getBranchMaskAsBytes(ExitPayload memory payload) internal pure returns (bytes memory) { return payload.data[8].toBytes(); } function getBranchMaskAsUint(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[8].toUint(); } function getReceiptLogIndex(ExitPayload memory payload) internal pure returns (uint256) { return payload.data[9].toUint(); } // Receipt methods function toBytes(Receipt memory receipt) internal pure returns (bytes memory) { return receipt.raw; } function getLog(Receipt memory receipt) internal pure returns (Log memory) { RLPReader.RLPItem memory logData = receipt.data[3].toList()[receipt.logIndex]; return Log(logData, logData.toList()); } // Log methods function getEmitter(Log memory log) internal pure returns (address) { return RLPReader.toAddress(log.list[0]); } function getTopics(Log memory log) internal pure returns (LogTopics memory) { return LogTopics(log.list[1].toList()); } function getData(Log memory log) internal pure returns (bytes memory) { return log.list[2].toBytes(); } function toRlpBytes(Log memory log) internal pure returns (bytes memory) { return log.data.toRlpBytes(); } // LogTopics methods function getField(LogTopics memory topics, uint256 index) internal pure returns (RLPReader.RLPItem memory) { return topics.data[index]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Merkle { function checkMembership( bytes32 leaf, uint256 index, bytes32 rootHash, bytes memory proof ) internal pure returns (bool) { require(proof.length % 32 == 0, "Invalid proof length"); uint256 proofHeight = proof.length / 32; // Proof of size n means, height of the tree is n+1. // In a tree of height n+1, max #leafs possible is 2 ^ n require(index < 2**proofHeight, "Leaf index is too big"); bytes32 proofElement; bytes32 computedHash = leaf; for (uint256 i = 32; i <= proof.length; i += 32) { assembly { proofElement := mload(add(proof, i)) } if (index % 2 == 0) { computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } index = index / 2; } return computedHash == rootHash; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {RLPReader} from "./RLPReader.sol"; library MerklePatriciaProof { /* * @dev Verifies a merkle patricia proof. * @param value The terminating value in the trie. * @param encodedPath The path in the trie leading to value. * @param rlpParentNodes The rlp encoded stack of nodes. * @param root The root hash of the trie. * @return The boolean validity of the proof. */ function verify( bytes memory value, bytes memory encodedPath, bytes memory rlpParentNodes, bytes32 root ) internal pure returns (bool) { RLPReader.RLPItem memory item = RLPReader.toRlpItem(rlpParentNodes); RLPReader.RLPItem[] memory parentNodes = RLPReader.toList(item); bytes memory currentNode; RLPReader.RLPItem[] memory currentNodeList; bytes32 nodeKey = root; uint256 pathPtr = 0; bytes memory path = _getNibbleArray(encodedPath); if (path.length == 0) { return false; } for (uint256 i = 0; i < parentNodes.length; i++) { if (pathPtr > path.length) { return false; } currentNode = RLPReader.toRlpBytes(parentNodes[i]); if (nodeKey != keccak256(currentNode)) { return false; } currentNodeList = RLPReader.toList(parentNodes[i]); if (currentNodeList.length == 17) { if (pathPtr == path.length) { if (keccak256(RLPReader.toBytes(currentNodeList[16])) == keccak256(value)) { return true; } else { return false; } } uint8 nextPathNibble = uint8(path[pathPtr]); if (nextPathNibble > 16) { return false; } nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[nextPathNibble])); pathPtr += 1; } else if (currentNodeList.length == 2) { uint256 traversed = _nibblesToTraverse(RLPReader.toBytes(currentNodeList[0]), path, pathPtr); if (pathPtr + traversed == path.length) { //leaf node if (keccak256(RLPReader.toBytes(currentNodeList[1])) == keccak256(value)) { return true; } else { return false; } } //extension node if (traversed == 0) { return false; } pathPtr += traversed; nodeKey = bytes32(RLPReader.toUintStrict(currentNodeList[1])); } else { return false; } } } function _nibblesToTraverse( bytes memory encodedPartialPath, bytes memory path, uint256 pathPtr ) private pure returns (uint256) { uint256 len = 0; // encodedPartialPath has elements that are each two hex characters (1 byte), but partialPath // and slicedPath have elements that are each one hex character (1 nibble) bytes memory partialPath = _getNibbleArray(encodedPartialPath); bytes memory slicedPath = new bytes(partialPath.length); // pathPtr counts nibbles in path // partialPath.length is a number of nibbles for (uint256 i = pathPtr; i < pathPtr + partialPath.length; i++) { bytes1 pathNibble = path[i]; slicedPath[i - pathPtr] = pathNibble; } if (keccak256(partialPath) == keccak256(slicedPath)) { len = partialPath.length; } else { len = 0; } return len; } // bytes b must be hp encoded function _getNibbleArray(bytes memory b) internal pure returns (bytes memory) { bytes memory nibbles = ""; if (b.length > 0) { uint8 offset; uint8 hpNibble = uint8(_getNthNibbleOfBytes(0, b)); if (hpNibble == 1 || hpNibble == 3) { nibbles = new bytes(b.length * 2 - 1); bytes1 oddNibble = _getNthNibbleOfBytes(1, b); nibbles[0] = oddNibble; offset = 1; } else { nibbles = new bytes(b.length * 2 - 2); offset = 0; } for (uint256 i = offset; i < nibbles.length; i++) { nibbles[i] = _getNthNibbleOfBytes(i - offset + 2, b); } } return nibbles; } function _getNthNibbleOfBytes(uint256 n, bytes memory str) private pure returns (bytes1) { return bytes1(n % 2 == 0 ? uint8(str[n / 2]) / 0x10 : uint8(str[n / 2]) % 0x10); } }
/* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity ^0.8.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint256 len; uint256 memPtr; } struct Iterator { RLPItem item; // Item that's being iterated over. uint256 nextPtr; // Position of the next item in the list. } /* * @dev Returns the next element in the iteration. Reverts if it has not next element. * @param self The iterator. * @return The next element in the iteration. */ function next(Iterator memory self) internal pure returns (RLPItem memory) { require(hasNext(self)); uint256 ptr = self.nextPtr; uint256 itemLength = _itemLength(ptr); self.nextPtr = ptr + itemLength; return RLPItem(itemLength, ptr); } /* * @dev Returns true if the iteration has more elements. * @param self The iterator. * @return true if the iteration has more elements. */ function hasNext(Iterator memory self) internal pure returns (bool) { RLPItem memory item = self.item; return self.nextPtr < item.memPtr + item.len; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint256 memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @dev Create an iterator. Reverts if item is not a list. * @param self The RLP item. * @return An 'Iterator' over the item. */ function iterator(RLPItem memory self) internal pure returns (Iterator memory) { require(isList(self)); uint256 ptr = self.memPtr + _payloadOffset(self.memPtr); return Iterator(self, ptr); } /* * @param item RLP encoded bytes */ function rlpLen(RLPItem memory item) internal pure returns (uint256) { return item.len; } /* * @param item RLP encoded bytes */ function payloadLen(RLPItem memory item) internal pure returns (uint256) { return item.len - _payloadOffset(item.memPtr); } /* * @param item RLP encoded list in bytes */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint256 items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint256 memPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 dataLen; for (uint256 i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint256 memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /* * @dev A cheaper version of keccak256(toRlpBytes(item)) that avoids copying memory. * @return keccak256 hash of RLP encoded bytes. */ function rlpBytesKeccak256(RLPItem memory item) internal pure returns (bytes32) { uint256 ptr = item.memPtr; uint256 len = item.len; bytes32 result; assembly { result := keccak256(ptr, len) } return result; } function payloadLocation(RLPItem memory item) internal pure returns (uint256, uint256) { uint256 offset = _payloadOffset(item.memPtr); uint256 memPtr = item.memPtr + offset; uint256 len = item.len - offset; // data length return (memPtr, len); } /* * @dev A cheaper version of keccak256(toBytes(item)) that avoids copying memory. * @return keccak256 hash of the item payload. */ function payloadKeccak256(RLPItem memory item) internal pure returns (bytes32) { (uint256 memPtr, uint256 len) = payloadLocation(item); bytes32 result; assembly { result := keccak256(memPtr, len) } return result; } /** RLPItem conversions into data types **/ // @returns raw rlp encoding in bytes function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { bytes memory result = new bytes(item.len); if (result.length == 0) return result; uint256 ptr; assembly { ptr := add(0x20, result) } copy(item.memPtr, ptr, item.len); return result; } // any non-zero byte is considered true function toBoolean(RLPItem memory item) internal pure returns (bool) { require(item.len == 1); uint256 result; uint256 memPtr = item.memPtr; assembly { result := byte(0, mload(memPtr)) } return result == 0 ? false : true; } function toAddress(RLPItem memory item) internal pure returns (address) { // 1 byte for the length prefix require(item.len == 21); return address(uint160(toUint(item))); } function toUint(RLPItem memory item) internal pure returns (uint256) { require(item.len > 0 && item.len <= 33); uint256 offset = _payloadOffset(item.memPtr); uint256 len = item.len - offset; uint256 result; uint256 memPtr = item.memPtr + offset; assembly { result := mload(memPtr) // shfit to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } // enforces 32 byte length function toUintStrict(RLPItem memory item) internal pure returns (uint256) { // one byte prefix require(item.len == 33); uint256 result; uint256 memPtr = item.memPtr + 1; assembly { result := mload(memPtr) } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); uint256 offset = _payloadOffset(item.memPtr); uint256 len = item.len - offset; // data length bytes memory result = new bytes(len); uint256 destPtr; assembly { destPtr := add(0x20, result) } copy(item.memPtr + offset, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint256) { if (item.len == 0) return 0; uint256 count = 0; uint256 currPtr = item.memPtr + _payloadOffset(item.memPtr); uint256 endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint256 memPtr) private pure returns (uint256) { uint256 itemLen; uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) itemLen = 1; else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1; else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint256 memPtr) private pure returns (uint256) { uint256 byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) return 0; else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1; else if (byte0 < LIST_SHORT_START) // being explicit return byte0 - (STRING_LONG_START - 1) + 1; else return byte0 - (LIST_LONG_START - 1) + 1; } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy( uint256 src, uint256 dest, uint256 len ) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } if (len == 0) return; // left over bytes. Mask is used to remove unwanted bytes from the word uint256 mask = 256**(WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {RLPReader} from "../lib/RLPReader.sol"; import {MerklePatriciaProof} from "../lib/MerklePatriciaProof.sol"; import {Merkle} from "../lib/Merkle.sol"; import "../lib/ExitPayloadReader.sol"; interface IFxStateSender { function sendMessageToChild(address _receiver, bytes calldata _data) external; } contract ICheckpointManager { struct HeaderBlock { bytes32 root; uint256 start; uint256 end; uint256 createdAt; address proposer; } /** * @notice mapping of checkpoint header numbers to block details * @dev These checkpoints are submited by plasma contracts */ mapping(uint256 => HeaderBlock) public headerBlocks; } abstract contract FxBaseRootTunnel { using RLPReader for RLPReader.RLPItem; using Merkle for bytes32; using ExitPayloadReader for bytes; using ExitPayloadReader for ExitPayloadReader.ExitPayload; using ExitPayloadReader for ExitPayloadReader.Log; using ExitPayloadReader for ExitPayloadReader.LogTopics; using ExitPayloadReader for ExitPayloadReader.Receipt; // keccak256(MessageSent(bytes)) bytes32 public constant SEND_MESSAGE_EVENT_SIG = 0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036; // state sender contract IFxStateSender public fxRoot; // root chain manager ICheckpointManager public checkpointManager; // child tunnel contract which receives and sends messages address public fxChildTunnel; // storage to avoid duplicate exits mapping(bytes32 => bool) public processedExits; constructor(address _checkpointManager, address _fxRoot) { checkpointManager = ICheckpointManager(_checkpointManager); fxRoot = IFxStateSender(_fxRoot); } // set fxChildTunnel if not set already function setFxChildTunnel(address _fxChildTunnel) public virtual { require( fxChildTunnel == address(0x0), "FxBaseRootTunnel: CHILD_TUNNEL_ALREADY_SET" ); fxChildTunnel = _fxChildTunnel; } /** * @notice Send bytes message to Child Tunnel * @param message bytes message that will be sent to Child Tunnel * some message examples - * abi.encode(tokenId); * abi.encode(tokenId, tokenMetadata); * abi.encode(messageType, messageData); */ function _sendMessageToChild(bytes memory message) internal { fxRoot.sendMessageToChild(fxChildTunnel, message); } function _validateAndExtractMessage(bytes memory inputData) internal returns (bytes memory) { ExitPayloadReader.ExitPayload memory payload = inputData .toExitPayload(); bytes memory branchMaskBytes = payload.getBranchMaskAsBytes(); uint256 blockNumber = payload.getBlockNumber(); // checking if exit has already been processed // unique exit is identified using hash of (blockNumber, branchMask, receiptLogIndex) bytes32 exitHash = keccak256( abi.encodePacked( blockNumber, // first 2 nibbles are dropped while generating nibble array // this allows branch masks that are valid but bypass exitHash check (changing first 2 nibbles only) // so converting to nibble array and then hashing it MerklePatriciaProof._getNibbleArray(branchMaskBytes), payload.getReceiptLogIndex() ) ); require( processedExits[exitHash] == false, "FxRootTunnel: EXIT_ALREADY_PROCESSED" ); processedExits[exitHash] = true; ExitPayloadReader.Receipt memory receipt = payload.getReceipt(); ExitPayloadReader.Log memory log = receipt.getLog(); // check child tunnel require( fxChildTunnel == log.getEmitter(), "FxRootTunnel: INVALID_FX_CHILD_TUNNEL" ); bytes32 receiptRoot = payload.getReceiptRoot(); // verify receipt inclusion require( MerklePatriciaProof.verify( receipt.toBytes(), branchMaskBytes, payload.getReceiptProof(), receiptRoot ), "FxRootTunnel: INVALID_RECEIPT_PROOF" ); // verify checkpoint inclusion _checkBlockMembershipInCheckpoint( blockNumber, payload.getBlockTime(), payload.getTxRoot(), receiptRoot, payload.getHeaderNumber(), payload.getBlockProof() ); ExitPayloadReader.LogTopics memory topics = log.getTopics(); require( bytes32(topics.getField(0).toUint()) == SEND_MESSAGE_EVENT_SIG, // topic0 is event sig "FxRootTunnel: INVALID_SIGNATURE" ); // received message data bytes memory message = abi.decode(log.getData(), (bytes)); // event decodes params again, so decoding bytes to get message return message; } function _checkBlockMembershipInCheckpoint( uint256 blockNumber, uint256 blockTime, bytes32 txRoot, bytes32 receiptRoot, uint256 headerNumber, bytes memory blockProof ) private view returns (uint256) { ( bytes32 headerRoot, uint256 startBlock, , uint256 createdAt, ) = checkpointManager.headerBlocks(headerNumber); require( keccak256( abi.encodePacked(blockNumber, blockTime, txRoot, receiptRoot) ).checkMembership(blockNumber - startBlock, headerRoot, blockProof), "FxRootTunnel: INVALID_HEADER" ); return createdAt; } /** * @notice receive message from L2 to L1, validated by proof * @dev This function verifies if the transaction actually happened on child chain * * @param inputData RLP encoded data of the reference tx containing following list of fields * 0 - headerNumber - Checkpoint header block number containing the reference tx * 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root * 2 - blockNumber - Block number containing the reference tx on child chain * 3 - blockTime - Reference tx block time * 4 - txRoot - Transactions root of block * 5 - receiptRoot - Receipts root of block * 6 - receipt - Receipt of the reference transaction * 7 - receiptProof - Merkle proof of the reference receipt * 8 - branchMask - 32 bits denoting the path of receipt in merkle tree * 9 - receiptLogIndex - Log Index to read from the receipt */ function receiveMessage(bytes memory inputData) public virtual { bytes memory message = _validateAndExtractMessage(inputData); _processMessageFromChild(message); } /** * @notice Process message received from Child Tunnel * @dev function needs to be implemented to handle message as per requirement * This is called by onStateReceive function. * Since it is called via a system call, any event will not be emitted during its execution. * @param message bytes message that was sent from Child Tunnel */ function _processMessageFromChild(bytes memory message) internal virtual; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // 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 { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). 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 0; } /** * @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. } // ============================================================= // 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 payable 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 payable 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 payable 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 payable 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`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. 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 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // 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.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // 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 payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @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 payable; /** * @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 payable; /** * @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 from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 500, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_checkpointManager","type":"address"},{"internalType":"address","name":"_fxRoot","type":"address"},{"internalType":"address","name":"_vendorContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CannotApproveAll","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"Nontransferable","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MINTED","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_MESSAGE_EVENT_SIG","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkpointManager","outputs":[{"internalType":"contract ICheckpointManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"entryPassMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"entryPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"expiresAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","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":[],"name":"fxChildTunnel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"contract IFxStateSender","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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liveAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"proPassMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"proPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"processedExits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"inputData","type":"bytes"}],"name":"receiveMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_entryPrice","type":"uint256"}],"name":"setEntryPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxChildTunnel","type":"address"}],"name":"setFxChildTunnel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liveAt","type":"uint256"},{"internalType":"uint256","name":"_expiresAt","type":"uint256"}],"name":"setMintWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proPrice","type":"uint256"}],"name":"setProPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vendorContractAddress","type":"address"}],"name":"setVendorContractAddress","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":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"treasuryMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vendorContract","outputs":[{"internalType":"contract IBrawlerBearzDynamicItems","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
61010060405260436080818152906200497060a03980516200002a91600e91602090910190620001e0565b50669fdf42f6e48000600f55662386f26fc10000601055601180546001600160a01b0319167339bfa2b4319581bc885a2d4b9f0c90c2e1c24b8717905563656b386060125563657dd7906013553480156200008457600080fd5b50604051620049b3380380620049b3833981016040819052620000a791620002c0565b604080518082018252601d81527f427261776c657220426561727a20426174746c6520506173733a205334000000602080830191825283518085019094526006808552651090909414cd60d21b91850191909152600180546001600160a01b03808a166001600160a01b031992831617909255600080549289169290911691909117905582519293926200013c9290620001e0565b50805162000152906007906020840190620001e0565b505060016004555062000165336200018e565b600d80546001600160a01b0319166001600160a01b0392909216919091179055506200035f9050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001ee906200032e565b90600052602060002090601f0160209004810192826200021257600085556200025d565b82601f106200022d57805160ff19168380011785556200025d565b828001600101855582156200025d579182015b828111156200025d57825182559160200191906001019062000240565b506200026b9291506200026f565b5090565b5b808211156200026b576000815560010162000270565b60006001600160a01b0382165b92915050565b620002a48162000286565b8114620002b057600080fd5b50565b8051620002938162000299565b600080600060608486031215620002da57620002da600080fd5b6000620002e88686620002b3565b9350506020620002fb86828701620002b3565b92505060406200030e86828701620002b3565b9150509250925092565b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200034357607f821691505b6020821081141562000359576200035962000318565b50919050565b614601806200036f6000396000f3fe6080604052600436106102f85760003560e01c80638622a6891161019a578063b8f7a665116100e1578063ea07e68a1161008a578063f2fde38b11610064578063f2fde38b146108a9578063f745adfc146108c9578063f953cec7146108df57600080fd5b8063ea07e68a14610849578063efdc778814610869578063f0f442601461088957600080fd5b8063c87b56dd116100bb578063c87b56dd146107c0578063de9b771f146107e0578063e985e9c51461080057600080fd5b8063b8f7a66514610751578063c0857ba014610766578063c23dc68f1461079357600080fd5b80639a9f122311610143578063a9cdd60d1161011d578063a9cdd60d146106fe578063aea4e49e1461071e578063b88d4fde1461073e57600080fd5b80639a9f1223146106ab578063a22cb465146106be578063a6e77af1146106de57600080fd5b806395d89b411161017457806395d89b4114610656578063972c49281461066b57806399a2557a1461068b57600080fd5b80638622a6891461060f5780638da5cb5b1461062557806391ccf6911461064357600080fd5b806342966c681161025e57806361d027b31161020757806370a08231116101e157806370a08231146105ad578063715018a6146105cd5780638462151c146105e257600080fd5b806361d027b31461054d5780636255c3ac1461056d5780636352211e1461058d57600080fd5b806355f804b31161023857806355f804b3146104d05780635bbb2177146104f0578063607f2d421461051d57600080fd5b806342966c681461048457806353b0e17d146104a457806353f8bb9a146104ba57600080fd5b80630f867751116102c05780633ccfd60b1161029a5780633ccfd60b146104285780633e9c7f691461043d57806342842e0e1461047157600080fd5b80630f867751146103d857806318160ddd146103f857806323b872dd1461041557600080fd5b806301ffc9a7146102fd57806306fdde0314610333578063081812fc14610355578063095ea7b3146103825780630e387de614610397575b600080fd5b34801561030957600080fd5b5061031d6103183660046135c5565b6108ff565b60405161032a91906135f0565b60405180910390f35b34801561033f57600080fd5b50610348610951565b60405161032a919061365c565b34801561036157600080fd5b5061037561037036600461367e565b6109e3565b60405161032a91906136b9565b6103956103903660046136db565b610a27565b005b3480156103a357600080fd5b506103cb7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b60405161032a919061371e565b3480156103e457600080fd5b506103956103f336600461372c565b610ac7565b34801561040457600080fd5b5060055460045403600019016103cb565b61039561042336600461374e565b610ada565b34801561043457600080fd5b50610395610c82565b34801561044957600080fd5b506103cb7f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae369025281565b61039561047f36600461374e565b610d17565b34801561049057600080fd5b5061039561049f36600461367e565b610d37565b3480156104b057600080fd5b506103cb600f5481565b3480156104c657600080fd5b506103cb60125481565b3480156104dc57600080fd5b506103956104eb3660046137f0565b610d42565b3480156104fc57600080fd5b5061051061050b366004613883565b610d56565b60405161032a9190613981565b34801561052957600080fd5b5061031d61053836600461367e565b60036020526000908152604090205460ff1681565b34801561055957600080fd5b50601154610375906001600160a01b031681565b34801561057957600080fd5b5061039561058836600461367e565b610e22565b34801561059957600080fd5b506103756105a836600461367e565b610e2f565b3480156105b957600080fd5b506103cb6105c8366004613992565b610e3a565b3480156105d957600080fd5b50610395610e89565b3480156105ee57600080fd5b506106026105fd366004613992565b610e9d565b60405161032a9190613a05565b34801561061b57600080fd5b506103cb60135481565b34801561063157600080fd5b50600c546001600160a01b0316610375565b61039561065136600461367e565b610fad565b34801561066257600080fd5b50610348611200565b34801561067757600080fd5b50600254610375906001600160a01b031681565b34801561069757600080fd5b506106026106a6366004613a16565b61120f565b6103956106b936600461367e565b61139b565b3480156106ca57600080fd5b506103956106d9366004613a5e565b6114f0565b3480156106ea57600080fd5b506103956106f936600461367e565b611532565b34801561070a57600080fd5b50610395610719366004613992565b61153f565b34801561072a57600080fd5b50610395610739366004613992565b611569565b61039561074c366004613b84565b611593565b34801561075d57600080fd5b5061031d6115d7565b34801561077257600080fd5b50600154610786906001600160a01b031681565b60405161032a9190613c22565b34801561079f57600080fd5b506107b36107ae36600461367e565b6115f0565b60405161032a9190613c30565b3480156107cc57600080fd5b506103486107db36600461367e565b611678565b3480156107ec57600080fd5b50600054610786906001600160a01b031681565b34801561080c57600080fd5b5061031d61081b366004613c3e565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561085557600080fd5b50600d54610786906001600160a01b031681565b34801561087557600080fd5b5061039561088436600461367e565b6116e2565b34801561089557600080fd5b506103956108a4366004613992565b611700565b3480156108b557600080fd5b506103956108c4366004613992565b61172a565b3480156108d557600080fd5b506103cb60105481565b3480156108eb57600080fd5b506103956108fa366004613c71565b611761565b60006301ffc9a760e01b6001600160e01b03198316148061093057506380ac58cd60e01b6001600160e01b03198316145b8061094b5750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606006805461096090613cc2565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90613cc2565b80156109d95780601f106109ae576101008083540402835291602001916109d9565b820191906000526020600020905b8154815290600101906020018083116109bc57829003601f168201915b5050505050905090565b60006109ee8261176c565b610a0b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b6000610a3282610e2f565b9050336001600160a01b03821614610a6b57610a4e813361081b565b610a6b576040516367d9dca160e11b815260040160405180910390fd5b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610acf6117a1565b601291909155601355565b6000610ae5826117cb565b9050836001600160a01b0316816001600160a01b031614610b185760405162a1148160e81b815260040160405180910390fd5b6000828152600a602052604090208054610b448187335b6001600160a01b039081169116811491141790565b610b6f57610b52863361081b565b610b6f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610b9657604051633a954ecd60e21b815260040160405180910390fd5b610ba38686866001611834565b8015610bae57600082555b6001600160a01b038681166000908152600960205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260086020526040902055600160e11b8316610c395760018401600081815260086020526040902054610c37576004548114610c375760008181526008602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610c8a6117a1565b6011546040516000916001600160a01b0316904790610ca890613ce9565b60006040518083038185875af1925050503d8060008114610ce5576040519150601f19603f3d011682016040523d82523d6000602084013e610cea565b606091505b5050905080610d145760405162461bcd60e51b8152600401610d0b90613d0e565b60405180910390fd5b50565b610d3283838360405180602001604052806000815250611593565b505050565b610d14816001611a3e565b610d4a6117a1565b610d32600e838361350a565b60608160008167ffffffffffffffff811115610d7457610d74613a91565b604051908082528060200260200182016040528015610dc657816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610d925790505b50905060005b828114610e1957610df4868683818110610de857610de8613d1e565b905060200201356115f0565b828281518110610e0657610e06613d1e565b6020908102919091010152600101610dcc565b50949350505050565b610e2a6117a1565b600f55565b600061094b826117cb565b60006001600160a01b038216610e63576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526009602052604090205467ffffffffffffffff1690565b610e916117a1565b610e9b6000611b90565b565b60606000806000610ead85610e3a565b905060008167ffffffffffffffff811115610eca57610eca613a91565b604051908082528060200260200182016040528015610ef3578160200160208202803683370190505b509050610f2060408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614610fa157610f3381611be2565b9150816040015115610f4457610f99565b81516001600160a01b031615610f5957815194505b876001600160a01b0316856001600160a01b03161415610f995780838780600101985081518110610f8c57610f8c613d1e565b6020026020010181815250505b600101610f23565b50909695505050505050565b60125442118015610fbf575060135442105b610fdb5760405162461bcd60e51b8152600401610d0b90613d68565b600f54610fe89082613d8e565b3410156110075760405162461bcd60e51b8152600401610d0b90613de1565b3360008267ffffffffffffffff81111561102357611023613a91565b60405190808252806020026020018201604052801561104c578160200160208202803683370190505b50905060008367ffffffffffffffff81111561106a5761106a613a91565b604051908082528060200260200182016040528015611093578160200160208202803683370190505b50905060006110a160045490565b905060005b8581101561111e5761016c8482815181106110c3576110c3613d1e565b60209081029190910101526110d88183613df1565b8382815181106110ea576110ea613d1e565b60209081029190910101526001601460006111058486613df1565b81526020810191909152604001600020556001016110a6565b50600d546040516311b211c160e31b81526001600160a01b0390911690638d908e08906111519087908790600401613e09565b600060405180830381600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b5050505061118d8486611c61565b6111f97f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae3690252856001856040516020016111c793929190613e29565b60408051601f19818403018152908290526111e59291602001613e5f565b604051602081830303815290604052611d65565b5050505050565b60606007805461096090613cc2565b606081831061123157604051631960ccad60e11b815260040160405180910390fd5b60008061123d60045490565b9050600185101561124d57600194505b80841115611259578093505b600061126487610e3a565b905084861015611283578585038181101561127d578091505b50611287565b5060005b60008167ffffffffffffffff8111156112a2576112a2613a91565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509050816112de57935061139492505050565b60006112e9886115f0565b9050600081604001516112fa575080515b885b88811415801561130c5750848714155b156113885761131a81611be2565b925082604001511561132b57611380565b82516001600160a01b03161561134057825191505b8a6001600160a01b0316826001600160a01b03161415611380578084888060010199508151811061137357611373613d1e565b6020026020010181815250505b6001016112fc565b50505092835250909150505b9392505050565b601254421180156113ad575060135442105b6113c95760405162461bcd60e51b8152600401610d0b90613d68565b6010546113d69082613d8e565b3410156113f55760405162461bcd60e51b8152600401610d0b90613de1565b3360008267ffffffffffffffff81111561141157611411613a91565b60405190808252806020026020018201604052801561143a578160200160208202803683370190505b509050600061144860045490565b905060005b848110156114a55761145f8183613df1565b83828151811061147157611471613d1e565b602090810291909101015260026014600061148c8486613df1565b815260208101919091526040016000205560010161144d565b506114b08385611c61565b6114ea7f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae3690252846002856040516020016111c793929190613e29565b50505050565b6011546001600160a01b0316336001600160a01b031614611524576040516301473cbb60e71b815260040160405180910390fd5b61152e8282611dc9565b5050565b61153a6117a1565b601055565b6115476117a1565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6115716117a1565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61159e848484610ada565b6001600160a01b0383163b156114ea576115ba84848484611e38565b6114ea576040516368d2bf6b60e11b815260040160405180910390fd5b6000601254421180156115eb575060135442105b905090565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061164957506004548310155b156116545792915050565b61165d83611be2565b905080604001511561166f5792915050565b61139483611f30565b60606116838261176c565b6116a057604051636f96cda160e11b815260040160405180910390fd5b600082815260146020526040902054600e906116bb90611fa8565b6040516020016116cc929190613f0c565b6040516020818303038152906040529050919050565b6116ea6117a1565b601154610d14906001600160a01b031682611c61565b6117086117a1565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6117326117a1565b6001600160a01b0381166117585760405162461bcd60e51b8152600401610d0b90613f6a565b610d1481611b90565b6000610d3282612052565b600081600111158015611780575060045482105b801561094b575050600090815260086020526040902054600160e01b161590565b600c546001600160a01b03163314610e9b5760405162461bcd60e51b8152600401610d0b90613fac565b6000818060011161181b5760045481101561181b57600081815260086020526040902054600160e01b8116611819575b806113945750600019016000818152600860205260409020546117fb565b505b604051636f96cda160e11b815260040160405180910390fd5b6011546001600160a01b03858116911614156119fb5760008167ffffffffffffffff81111561186557611865613a91565b60405190808252806020026020018201604052801561188e578160200160208202803683370190505b50905060008267ffffffffffffffff8111156118ac576118ac613a91565b6040519080825280602002602001820160405280156118d5578160200160208202803683370190505b5090508360005b848110156119545761016c8482815181106118f9576118f9613d1e565b602090810291909101015261190e8183613df1565b83828151811061192057611920613d1e565b602090810291909101015260016014600061193b8486613df1565b81526020810191909152604001600020556001016118dc565b50600d546040516311b211c160e31b81526001600160a01b0390911690638d908e08906119879089908790600401613e09565b600060405180830381600087803b1580156119a157600080fd5b505af11580156119b5573d6000803e3d6000fd5b505050506119f37f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae3690252876001856040516020016111c793929190613e29565b5050506114ea565b6001600160a01b03831615801590611a1b57506001600160a01b03841615155b15611a395760405163399f41e760e01b815260040160405180910390fd5b6114ea565b6000611a49836117cb565b905080600080611a67866000908152600a6020526040902080549091565b915091508415611aa757611a7c818433610b2f565b611aa757611a8a833361081b565b611aa757604051632ce44b5f60e11b815260040160405180910390fd5b611ab5836000886001611834565b8015611ac057600082555b6001600160a01b038316600081815260096020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260086020526040902055600160e11b8416611b475760018601600081815260086020526040902054611b45576004548114611b455760008181526008602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060058054600101905550505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526008602052604090205461094b90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60045481611c825760405163b562e8dd60e01b815260040160405180910390fd5b611c8f6000848385611834565b6001600160a01b03831660008181526009602090815260408083208054680100000000000000018802019055848352600890915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611d3e57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611d06565b5081611d5c57604051622e076360e81b815260040160405180910390fd5b60045550505050565b60005460025460405163b472047760e01b81526001600160a01b039283169263b472047792611d9b929116908590600401613fbc565b600060405180830381600087803b158015611db557600080fd5b505af11580156111f9573d6000803e3d6000fd5b336000818152600b602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611e2c9085906135f0565b60405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611e6d903390899088908890600401613fca565b602060405180830381600087803b158015611e8757600080fd5b505af1925050508015611eb7575060408051601f3d908101601f19168201909252611eb491810190614019565b60015b611f12573d808015611ee5576040519150601f19603f3d011682016040523d82523d6000602084013e611eea565b606091505b508051611f0a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261094b611f60836117cb565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60606000611fb583612252565b600101905060008167ffffffffffffffff811115611fd557611fd5613a91565b6040519080825280601f01601f191660200182016040528015611fff576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846120455761204a565b612009565b509392505050565b6060600061205f83612334565b9050600061206c82612393565b90506000612079836123bc565b9050600081612087846123e5565b612090866125a3565b6040516020016120a293929190614050565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff16156120ea5760405162461bcd60e51b8152600401610d0b906140c4565b6000818152600360205260408120805460ff1916600117905561210c856125bf565b9050600061211982612709565b905061212481612799565b6002546001600160a01b039081169116146121515760405162461bcd60e51b8152600401610d0b90614116565b600061215c876127c2565b905061217c61216c846020015190565b876121768a6127de565b846127fa565b6121985760405162461bcd60e51b8152600401610d0b90614166565b6121c6856121a589612ab0565b6121ae8a612acc565b846121b88c612ae8565b6121c18d612b04565b612b20565b5060006121d283612c28565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036612208612203836000612c64565b612c9c565b146122255760405162461bcd60e51b8152600401610d0b906141aa565b600061223084612d15565b8060200190518101906122439190614212565b9b9a5050505050505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061229b577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106122c7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106122e557662386f26fc10000830492506010015b6305f5e10083106122fd576305f5e100830492506008015b612710831061231157612710830492506004015b60648310612323576064830492506002015b600a831061094b5760010192915050565b604080516020810190915260608152600061237e6123798460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b612d31565b60408051602081019091529081529392505050565b606061094b82600001516008815181106123af576123af613d1e565b6020026020010151612e47565b600061094b82600001516002815181106123d8576123d8613d1e565b6020026020010151612c9c565b6040805160208101909152600081528151606091901561094b5760008061240d600086612ee4565b60f81c9050600181148061242457508060ff166003145b156124cc576001855160026124399190613d8e565b612443919061424d565b67ffffffffffffffff81111561245b5761245b613a91565b6040519080825280601f01601f191660200182016040528015612485576020820181803683370190505b5092506000612495600187612ee4565b905080846000815181106124ab576124ab613d1e565b60200101906001600160f81b031916908160001a9053506001925050612530565b6002855160026124dc9190613d8e565b6124e6919061424d565b67ffffffffffffffff8111156124fe576124fe613a91565b6040519080825280601f01601f191660200182016040528015612528576020820181803683370190505b509250600091505b60ff82165b835181101561259a5761255f61254e60ff85168361424d565b612559906002613df1565b87612ee4565b84828151811061257157612571613d1e565b60200101906001600160f81b031916908160001a9053508061259281614268565b915050612535565b50505092915050565b600061094b82600001516009815181106123d8576123d8613d1e565b6125e360405180606001604052806060815260200160608152602001600081525090565b6125fd82600001516006815181106123af576123af613d1e565b60208281018290526040805180820182526000808252908301528051808201909152825181529181019082015261263381612f65565b156126485761264181612d31565b82526126f5565b6020820151805160009061265e9060019061424d565b67ffffffffffffffff81111561267657612676613a91565b6040519080825280601f01601f1916602001820160405280156126a0576020820181803683370190505b5090506000808360210191508260200190506126be82828551612f9e565b6040805180820182526000808252602091820152815180830190925284518252808501908201526126ee90612d31565b8652505050505b6126fe836125a3565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000612757836000015160038151811061274a5761274a613d1e565b6020026020010151612d31565b83604001518151811061276c5761276c613d1e565b60200260200101519050604051806040016040528082815260200161279083612d31565b90529392505050565b600061094b82602001516000815181106127b5576127b5613d1e565b6020026020010151613019565b600061094b82600001516005815181106123d8576123d8613d1e565b606061094b82600001516007815181106123af576123af613d1e565b60008061282e8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b9050600061283b82612d31565b90506060808560008061284d8b6123e5565b9050805160001415612869576000975050505050505050611f28565b60005b8651811015612aa057815183111561288f57600098505050505050505050611f28565b6128b18782815181106128a4576128a4613d1e565b6020026020010151613033565b9550858051906020012084146128d257600098505050505050505050611f28565b6128e787828151811061274a5761274a613d1e565b94508451601114156129bc578151831415612949578c8051906020012061291a866010815181106123af576123af613d1e565b80519060200120141561293857600198505050505050505050611f28565b600098505050505050505050611f28565b600082848151811061295d5761295d613d1e565b016020015160f81c905060108111156129825760009950505050505050505050611f28565b6129a7868260ff168151811061299a5761299a613d1e565b60200260200101516130b3565b94506129b4600185613df1565b935050612a8e565b8451600214156129385760006129e86129e1876000815181106123af576123af613d1e565b84866130e1565b83519091506129f78286613df1565b1415612a4c578d80519060200120612a1b876001815181106123af576123af613d1e565b805190602001201415612a3a5760019950505050505050505050611f28565b60009950505050505050505050611f28565b80612a635760009950505050505050505050611f28565b612a6d8185613df1565b9350612a858660018151811061299a5761299a613d1e565b9450612a8e9050565b80612a9881614268565b91505061286c565b5050505050505050949350505050565b600061094b82600001516003815181106123d8576123d8613d1e565b600061094b82600001516004815181106123d8576123d8613d1e565b600061094b82600001516000815181106123d8576123d8613d1e565b606061094b82600001516001815181106123af576123af613d1e565b6001546040516320a9cea560e11b81526000918291829182916001600160a01b03909116906341539d4a90612b5990899060040161371e565b60a06040518083038186803b158015612b7157600080fd5b505afa158015612b85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ba99190614299565b5093505092509250612bff828b612bc0919061424d565b84878d8d8d8d604051602001612bd99493929190614311565b60405160208183030381529060405280519060200120613202909392919063ffffffff16565b612c1b5760405162461bcd60e51b8152600401610d0b9061438d565b9998505050505050505050565b6040805160208101909152606081526040518060200160405280612c5c846020015160018151811061274a5761274a613d1e565b905292915050565b60408051808201909152600080825260208201528251805183908110612c8c57612c8c613d1e565b6020026020010151905092915050565b805160009015801590612cb157508151602110155b612cba57600080fd5b6000612cc98360200151613316565b90506000818460000151612cdd919061424d565b9050600080838660200151612cf29190613df1565b9050805191506020831015610e1957506020919091036101000a90049392505050565b606061094b82602001516002815181106123af576123af613d1e565b6060612d3c82612f65565b612d4557600080fd5b6000612d5083613397565b905060008167ffffffffffffffff811115612d6d57612d6d613a91565b604051908082528060200260200182016040528015612db257816020015b6040805180820190915260008082526020820152815260200190600190039081612d8b5790505b5090506000612dc48560200151613316565b8560200151612dd39190613df1565b90506000805b84811015612e3c57612dea8361341a565b9150604051806040016040528083815260200184815250848281518110612e1357612e13613d1e565b6020908102919091010152612e288284613df1565b925080612e3481614268565b915050612dd9565b509195945050505050565b8051606090612e5557600080fd5b6000612e648360200151613316565b90506000818460000151612e78919061424d565b905060008167ffffffffffffffff811115612e9557612e95613a91565b6040519080825280601f01601f191660200182016040528015612ebf576020820181803683370190505b5090506000816020019050610e19848760200151612edd9190613df1565b82856134be565b6000612ef160028461439d565b15612f2b57601082612f046002866143b5565b81518110612f1457612f14613d1e565b0160200151612f26919060f81c6143cd565b612f5b565b601082612f396002866143b5565b81518110612f4957612f49613d1e565b0160200151612f5b919060f81c6143de565b60f81b9392505050565b8051600090612f7657506000919050565b6020820151805160001a9060c0821015612f94575060009392505050565b5060019392505050565b80612fa857505050565b60208110612fe05782518252612fbf602084613df1565b9250612fcc602083613df1565b9150612fd960208261424d565b9050612fa8565b60006001612fef83602061424d565b612ffb906101006144fd565b613005919061424d565b935183518516941916939093179091525050565b805160009060151461302a57600080fd5b61094b82612c9c565b60606000826000015167ffffffffffffffff81111561305457613054613a91565b6040519080825280601f01601f19166020018201604052801561307e576020820181803683370190505b5090508051600014156130915792915050565b60008160200190506130ac84602001518286600001516134be565b5092915050565b80516000906021146130c457600080fd5b600080836020015160016130d89190613df1565b51949350505050565b600080806130ee866123e5565b90506000815167ffffffffffffffff81111561310c5761310c613a91565b6040519080825280601f01601f191660200182016040528015613136576020820181803683370190505b509050845b82516131479087613df1565b8110156131d257600087828151811061316257613162613d1e565b01602001517fff000000000000000000000000000000000000000000000000000000000000001690508083613197898561424d565b815181106131a7576131a7613d1e565b60200101906001600160f81b031916908160001a9053505080806131ca90614268565b91505061313b565b508080519060200120828051906020012014156131f257815192506131f7565b600092505b509095945050505050565b600060208251613212919061439d565b1561322f5760405162461bcd60e51b8152600401610d0b90614540565b60006020835161323f91906143b5565b905061324c8160026144fd565b851061326a5760405162461bcd60e51b8152600401610d0b90614584565b60008660205b855181116133085785810151925061328960028961439d565b6132bd5781836040516020016132a0929190614594565b6040516020818303038152906040528051906020012091506132e9565b82826040516020016132d0929190614594565b6040516020818303038152906040528051906020012091505b6132f46002896143b5565b9750613301602082613df1565b9050613270565b509094149695505050505050565b8051600090811a608081101561332f5750600092915050565b60b881108061334a575060c0811080159061334a575060f881105b156133585750600192915050565b60c08110156133855761336d600160b86145ba565b61337a9060ff168261424d565b611394906001613df1565b61336d600160f86145ba565b50919050565b80516000906133a857506000919050565b6000806133b88460200151613316565b84602001516133c79190613df1565b90506000846000015185602001516133df9190613df1565b90505b80821015613411576133f38261341a565b6133fd9083613df1565b91508261340981614268565b9350506133e2565b50909392505050565b80516000908190811a608081101561343557600191506130ac565b60b881101561345b5761344960808261424d565b613454906001613df1565b91506130ac565b60c08110156134885760b78103600185019450806020036101000a855104600182018101935050506130ac565b60f881101561349c5761344960c08261424d565b60019390930151602084900360f7016101000a900490920160f5190192915050565b806134c857505050565b6020811061350057825182526134df602084613df1565b92506134ec602083613df1565b91506134f960208261424d565b90506134c8565b80612fe057505050565b82805461351690613cc2565b90600052602060002090601f016020900481019282613538576000855561357e565b82601f106135515782800160ff1982351617855561357e565b8280016001018555821561357e579182015b8281111561357e578235825591602001919060010190613563565b5061358a92915061358e565b5090565b5b8082111561358a576000815560010161358f565b6001600160e01b031981165b8114610d1457600080fd5b803561094b816135a3565b6000602082840312156135da576135da600080fd5b6000611f2884846135ba565b8015155b82525050565b6020810161094b82846135e6565b60005b83811015613619578181015183820152602001613601565b838111156114ea5750506000910152565b6000613634825190565b80845260208401935061364b8185602086016135fe565b601f01601f19169290920192915050565b60208082528101611394818461362a565b806135af565b803561094b8161366d565b60006020828403121561369357613693600080fd5b6000611f288484613673565b60006001600160a01b03821661094b565b6135ea8161369f565b6020810161094b82846136b0565b6135af8161369f565b803561094b816136c7565b600080604083850312156136f1576136f1600080fd5b60006136fd85856136d0565b925050602061370e85828601613673565b9150509250929050565b806135ea565b6020810161094b8284613718565b6000806040838503121561374257613742600080fd5b60006136fd8585613673565b60008060006060848603121561376657613766600080fd5b600061377286866136d0565b9350506020613783868287016136d0565b925050604061379486828701613673565b9150509250925092565b60008083601f8401126137b3576137b3600080fd5b50813567ffffffffffffffff8111156137ce576137ce600080fd5b6020830191508360018202830111156137e9576137e9600080fd5b9250929050565b6000806020838503121561380657613806600080fd5b823567ffffffffffffffff81111561382057613820600080fd5b61382c8582860161379e565b92509250509250929050565b60008083601f84011261384d5761384d600080fd5b50813567ffffffffffffffff81111561386857613868600080fd5b6020830191508360208202830111156137e9576137e9600080fd5b6000806020838503121561389957613899600080fd5b823567ffffffffffffffff8111156138b3576138b3600080fd5b61382c85828601613838565b67ffffffffffffffff81166135ea565b62ffffff81166135ea565b805160808301906138eb84826136b0565b5060208201516138fe60208501826138bf565b50604082015161391160408501826135e6565b5060608201516114ea60608501826138cf565b600061393083836138da565b505060800190565b6000613942825190565b80845260209384019383018060005b838110156139765781516139658882613924565b975060208301925050600101613951565b509495945050505050565b602080825281016113948184613938565b6000602082840312156139a7576139a7600080fd5b6000611f2884846136d0565b60006139bf8383613718565b505060200190565b60006139d1825190565b80845260209384019383018060005b838110156139765781516139f488826139b3565b9750602083019250506001016139e0565b6020808252810161139481846139c7565b600080600060608486031215613a2e57613a2e600080fd5b6000613a3a86866136d0565b935050602061378386828701613673565b8015156135af565b803561094b81613a4b565b60008060408385031215613a7457613a74600080fd5b6000613a8085856136d0565b925050602061370e85828601613a53565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715613acd57613acd613a91565b6040525050565b6000613adf60405190565b9050613aeb8282613aa7565b919050565b600067ffffffffffffffff821115613b0a57613b0a613a91565b601f19601f83011660200192915050565b82818337506000910152565b6000613b3a613b3584613af0565b613ad4565b905082815260208101848484011115613b5557613b55600080fd5b61204a848285613b1b565b600082601f830112613b7457613b74600080fd5b8135611f28848260208601613b27565b60008060008060808587031215613b9d57613b9d600080fd5b6000613ba987876136d0565b9450506020613bba878288016136d0565b9350506040613bcb87828801613673565b925050606085013567ffffffffffffffff811115613beb57613beb600080fd5b613bf787828801613b60565b91505092959194509250565b600061094b8261369f565b600061094b82613c03565b6135ea81613c0e565b6020810161094b8284613c19565b6080810161094b82846138da565b60008060408385031215613c5457613c54600080fd5b6000613c6085856136d0565b925050602061370e858286016136d0565b600060208284031215613c8657613c86600080fd5b813567ffffffffffffffff811115613ca057613ca0600080fd5b611f2884828501613b60565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613cd657607f821691505b6020821081141561339157613391613cac565b60008161094b565b600381526000602082016239393960e81b815291505b5060200190565b6020808252810161094b81613cf1565b634e487b7160e01b600052603260045260246000fd5b601681526000602082017f4d696e74696e67206973206e6f74206163746976652e0000000000000000000081529150613d07565b6020808252810161094b81613d34565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613da857613da8613d78565b500290565b601181526000602082017f4e6f7420656e6f7567682066756e64732e00000000000000000000000000000081529150613d07565b6020808252810161094b81613dad565b60008219821115613e0457613e04613d78565b500190565b60408101613e1782856136b0565b8181036020830152611f2881846139c7565b60608101613e3782866136b0565b613e446020830185613718565b8181036040830152613e5681846139c7565b95945050505050565b60408101613e6d8285613718565b8181036020830152611f28818461362a565b60008154613e8c81613cc2565b600182168015613ea35760018114613eb45761259a565b60ff1983168652818601935061259a565b60008581526020902060005b83811015613edc57815488820152600190910190602001613ec0565b505050939093019392505050565b6000613ef4825190565b613f028185602086016135fe565b9290920192915050565b6000613f188285613e7f565b9150611f288284613eea565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b6020808252810161094b81613f24565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000613d07565b6020808252810161094b81613f7a565b60408101613e6d82856136b0565b60808101613fd882876136b0565b613fe560208301866136b0565b613ff26040830185613718565b8181036060830152614004818461362a565b9695505050505050565b805161094b816135a3565b60006020828403121561402e5761402e600080fd5b6000611f28848461400e565b634e487b7160e01b600052601260045260246000fd5b600061405c8286613718565b60208201915061406c8285613eea565b91506140788284613718565b506020019392505050565b602481526000602082017f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434581526314d4d15160e21b60208201529150613f63565b6020808252810161094b81614083565b602581526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54815264155393915360da1b60208201529150613f63565b6020808252810161094b816140d4565b602381526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505281526227a7a360e91b60208201529150613f63565b6020808252810161094b81614126565b601f81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450081529150613d07565b6020808252810161094b81614176565b60006141c8613b3584613af0565b9050828152602081018484840111156141e3576141e3600080fd5b61204a8482856135fe565b600082601f83011261420257614202600080fd5b8151611f288482602086016141ba565b60006020828403121561422757614227600080fd5b815167ffffffffffffffff81111561424157614241600080fd5b611f28848285016141ee565b6000825b92508282101561426357614263613d78565b500390565b600060001982141561427c5761427c613d78565b5060010190565b805161094b8161366d565b805161094b816136c7565b600080600080600060a086880312156142b4576142b4600080fd5b60006142c08888614283565b95505060206142d188828901614283565b94505060406142e288828901614283565b93505060606142f388828901614283565b92505060806143048882890161428e565b9150509295509295909350565b600061431d8287613718565b60208201915061432d8286613718565b60208201915061433d8285613718565b60208201915061434d8284613718565b50602001949350505050565b601c81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000081529150613d07565b6020808252810161094b81614359565b6000825b9250826143b0576143b061403a565b500690565b6000825b9250826143c8576143c861403a565b500490565b600060ff8216915060ff83166143a1565b600060ff8216915060ff83166143b9565b80825b600185111561442e5780860481111561440d5761440d613d78565b600185161561441b57908102905b80026144278560011c90565b94506143f2565b94509492505050565b60008261444657506001611394565b8161445357506000611394565b81600181146144695760028114614473576144a0565b6001915050611394565b60ff84111561448457614484613d78565b8360020a91508482111561449a5761449a613d78565b50611394565b5060208310610133831016604e8410600b84101617156144d3575081810a838111156144ce576144ce613d78565b611394565b6144e084848460016143ef565b925090508184048111156144f6576144f6613d78565b0292915050565b60006113946000198484614437565b601481526000602082017f496e76616c69642070726f6f66206c656e67746800000000000000000000000081529150613d07565b6020808252810161094b8161450c565b601581526000602082017f4c65616620696e64657820697320746f6f20626967000000000000000000000081529150613d07565b6020808252810161094b81614550565b60006145a08285613718565b6020820191506145b08284613718565b5060200192915050565b600060ff8216915060ff831661425156fea26469706673582212205e3a4564dd9fe77bf2822d788ebdca633b942dffe23d374c766e846a523d85d864736f6c63430008090033697066733a2f2f62616679626569656c7a766e6d3361786d6334667935626432366f6f7464736372796262693668657a687537677a7269737464726f6178743461752f00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2000000000000000000000000bd24a76f4135f930f5c49f6c30e0e30a61b97537
Deployed Bytecode
0x6080604052600436106102f85760003560e01c80638622a6891161019a578063b8f7a665116100e1578063ea07e68a1161008a578063f2fde38b11610064578063f2fde38b146108a9578063f745adfc146108c9578063f953cec7146108df57600080fd5b8063ea07e68a14610849578063efdc778814610869578063f0f442601461088957600080fd5b8063c87b56dd116100bb578063c87b56dd146107c0578063de9b771f146107e0578063e985e9c51461080057600080fd5b8063b8f7a66514610751578063c0857ba014610766578063c23dc68f1461079357600080fd5b80639a9f122311610143578063a9cdd60d1161011d578063a9cdd60d146106fe578063aea4e49e1461071e578063b88d4fde1461073e57600080fd5b80639a9f1223146106ab578063a22cb465146106be578063a6e77af1146106de57600080fd5b806395d89b411161017457806395d89b4114610656578063972c49281461066b57806399a2557a1461068b57600080fd5b80638622a6891461060f5780638da5cb5b1461062557806391ccf6911461064357600080fd5b806342966c681161025e57806361d027b31161020757806370a08231116101e157806370a08231146105ad578063715018a6146105cd5780638462151c146105e257600080fd5b806361d027b31461054d5780636255c3ac1461056d5780636352211e1461058d57600080fd5b806355f804b31161023857806355f804b3146104d05780635bbb2177146104f0578063607f2d421461051d57600080fd5b806342966c681461048457806353b0e17d146104a457806353f8bb9a146104ba57600080fd5b80630f867751116102c05780633ccfd60b1161029a5780633ccfd60b146104285780633e9c7f691461043d57806342842e0e1461047157600080fd5b80630f867751146103d857806318160ddd146103f857806323b872dd1461041557600080fd5b806301ffc9a7146102fd57806306fdde0314610333578063081812fc14610355578063095ea7b3146103825780630e387de614610397575b600080fd5b34801561030957600080fd5b5061031d6103183660046135c5565b6108ff565b60405161032a91906135f0565b60405180910390f35b34801561033f57600080fd5b50610348610951565b60405161032a919061365c565b34801561036157600080fd5b5061037561037036600461367e565b6109e3565b60405161032a91906136b9565b6103956103903660046136db565b610a27565b005b3480156103a357600080fd5b506103cb7f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03681565b60405161032a919061371e565b3480156103e457600080fd5b506103956103f336600461372c565b610ac7565b34801561040457600080fd5b5060055460045403600019016103cb565b61039561042336600461374e565b610ada565b34801561043457600080fd5b50610395610c82565b34801561044957600080fd5b506103cb7f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae369025281565b61039561047f36600461374e565b610d17565b34801561049057600080fd5b5061039561049f36600461367e565b610d37565b3480156104b057600080fd5b506103cb600f5481565b3480156104c657600080fd5b506103cb60125481565b3480156104dc57600080fd5b506103956104eb3660046137f0565b610d42565b3480156104fc57600080fd5b5061051061050b366004613883565b610d56565b60405161032a9190613981565b34801561052957600080fd5b5061031d61053836600461367e565b60036020526000908152604090205460ff1681565b34801561055957600080fd5b50601154610375906001600160a01b031681565b34801561057957600080fd5b5061039561058836600461367e565b610e22565b34801561059957600080fd5b506103756105a836600461367e565b610e2f565b3480156105b957600080fd5b506103cb6105c8366004613992565b610e3a565b3480156105d957600080fd5b50610395610e89565b3480156105ee57600080fd5b506106026105fd366004613992565b610e9d565b60405161032a9190613a05565b34801561061b57600080fd5b506103cb60135481565b34801561063157600080fd5b50600c546001600160a01b0316610375565b61039561065136600461367e565b610fad565b34801561066257600080fd5b50610348611200565b34801561067757600080fd5b50600254610375906001600160a01b031681565b34801561069757600080fd5b506106026106a6366004613a16565b61120f565b6103956106b936600461367e565b61139b565b3480156106ca57600080fd5b506103956106d9366004613a5e565b6114f0565b3480156106ea57600080fd5b506103956106f936600461367e565b611532565b34801561070a57600080fd5b50610395610719366004613992565b61153f565b34801561072a57600080fd5b50610395610739366004613992565b611569565b61039561074c366004613b84565b611593565b34801561075d57600080fd5b5061031d6115d7565b34801561077257600080fd5b50600154610786906001600160a01b031681565b60405161032a9190613c22565b34801561079f57600080fd5b506107b36107ae36600461367e565b6115f0565b60405161032a9190613c30565b3480156107cc57600080fd5b506103486107db36600461367e565b611678565b3480156107ec57600080fd5b50600054610786906001600160a01b031681565b34801561080c57600080fd5b5061031d61081b366004613c3e565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561085557600080fd5b50600d54610786906001600160a01b031681565b34801561087557600080fd5b5061039561088436600461367e565b6116e2565b34801561089557600080fd5b506103956108a4366004613992565b611700565b3480156108b557600080fd5b506103956108c4366004613992565b61172a565b3480156108d557600080fd5b506103cb60105481565b3480156108eb57600080fd5b506103956108fa366004613c71565b611761565b60006301ffc9a760e01b6001600160e01b03198316148061093057506380ac58cd60e01b6001600160e01b03198316145b8061094b5750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606006805461096090613cc2565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90613cc2565b80156109d95780601f106109ae576101008083540402835291602001916109d9565b820191906000526020600020905b8154815290600101906020018083116109bc57829003601f168201915b5050505050905090565b60006109ee8261176c565b610a0b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600a60205260409020546001600160a01b031690565b6000610a3282610e2f565b9050336001600160a01b03821614610a6b57610a4e813361081b565b610a6b576040516367d9dca160e11b815260040160405180910390fd5b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610acf6117a1565b601291909155601355565b6000610ae5826117cb565b9050836001600160a01b0316816001600160a01b031614610b185760405162a1148160e81b815260040160405180910390fd5b6000828152600a602052604090208054610b448187335b6001600160a01b039081169116811491141790565b610b6f57610b52863361081b565b610b6f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610b9657604051633a954ecd60e21b815260040160405180910390fd5b610ba38686866001611834565b8015610bae57600082555b6001600160a01b038681166000908152600960205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260086020526040902055600160e11b8316610c395760018401600081815260086020526040902054610c37576004548114610c375760008181526008602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610c8a6117a1565b6011546040516000916001600160a01b0316904790610ca890613ce9565b60006040518083038185875af1925050503d8060008114610ce5576040519150601f19603f3d011682016040523d82523d6000602084013e610cea565b606091505b5050905080610d145760405162461bcd60e51b8152600401610d0b90613d0e565b60405180910390fd5b50565b610d3283838360405180602001604052806000815250611593565b505050565b610d14816001611a3e565b610d4a6117a1565b610d32600e838361350a565b60608160008167ffffffffffffffff811115610d7457610d74613a91565b604051908082528060200260200182016040528015610dc657816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610d925790505b50905060005b828114610e1957610df4868683818110610de857610de8613d1e565b905060200201356115f0565b828281518110610e0657610e06613d1e565b6020908102919091010152600101610dcc565b50949350505050565b610e2a6117a1565b600f55565b600061094b826117cb565b60006001600160a01b038216610e63576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526009602052604090205467ffffffffffffffff1690565b610e916117a1565b610e9b6000611b90565b565b60606000806000610ead85610e3a565b905060008167ffffffffffffffff811115610eca57610eca613a91565b604051908082528060200260200182016040528015610ef3578160200160208202803683370190505b509050610f2060408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614610fa157610f3381611be2565b9150816040015115610f4457610f99565b81516001600160a01b031615610f5957815194505b876001600160a01b0316856001600160a01b03161415610f995780838780600101985081518110610f8c57610f8c613d1e565b6020026020010181815250505b600101610f23565b50909695505050505050565b60125442118015610fbf575060135442105b610fdb5760405162461bcd60e51b8152600401610d0b90613d68565b600f54610fe89082613d8e565b3410156110075760405162461bcd60e51b8152600401610d0b90613de1565b3360008267ffffffffffffffff81111561102357611023613a91565b60405190808252806020026020018201604052801561104c578160200160208202803683370190505b50905060008367ffffffffffffffff81111561106a5761106a613a91565b604051908082528060200260200182016040528015611093578160200160208202803683370190505b50905060006110a160045490565b905060005b8581101561111e5761016c8482815181106110c3576110c3613d1e565b60209081029190910101526110d88183613df1565b8382815181106110ea576110ea613d1e565b60209081029190910101526001601460006111058486613df1565b81526020810191909152604001600020556001016110a6565b50600d546040516311b211c160e31b81526001600160a01b0390911690638d908e08906111519087908790600401613e09565b600060405180830381600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b5050505061118d8486611c61565b6111f97f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae3690252856001856040516020016111c793929190613e29565b60408051601f19818403018152908290526111e59291602001613e5f565b604051602081830303815290604052611d65565b5050505050565b60606007805461096090613cc2565b606081831061123157604051631960ccad60e11b815260040160405180910390fd5b60008061123d60045490565b9050600185101561124d57600194505b80841115611259578093505b600061126487610e3a565b905084861015611283578585038181101561127d578091505b50611287565b5060005b60008167ffffffffffffffff8111156112a2576112a2613a91565b6040519080825280602002602001820160405280156112cb578160200160208202803683370190505b509050816112de57935061139492505050565b60006112e9886115f0565b9050600081604001516112fa575080515b885b88811415801561130c5750848714155b156113885761131a81611be2565b925082604001511561132b57611380565b82516001600160a01b03161561134057825191505b8a6001600160a01b0316826001600160a01b03161415611380578084888060010199508151811061137357611373613d1e565b6020026020010181815250505b6001016112fc565b50505092835250909150505b9392505050565b601254421180156113ad575060135442105b6113c95760405162461bcd60e51b8152600401610d0b90613d68565b6010546113d69082613d8e565b3410156113f55760405162461bcd60e51b8152600401610d0b90613de1565b3360008267ffffffffffffffff81111561141157611411613a91565b60405190808252806020026020018201604052801561143a578160200160208202803683370190505b509050600061144860045490565b905060005b848110156114a55761145f8183613df1565b83828151811061147157611471613d1e565b602090810291909101015260026014600061148c8486613df1565b815260208101919091526040016000205560010161144d565b506114b08385611c61565b6114ea7f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae3690252846002856040516020016111c793929190613e29565b50505050565b6011546001600160a01b0316336001600160a01b031614611524576040516301473cbb60e71b815260040160405180910390fd5b61152e8282611dc9565b5050565b61153a6117a1565b601055565b6115476117a1565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6115716117a1565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61159e848484610ada565b6001600160a01b0383163b156114ea576115ba84848484611e38565b6114ea576040516368d2bf6b60e11b815260040160405180910390fd5b6000601254421180156115eb575060135442105b905090565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061164957506004548310155b156116545792915050565b61165d83611be2565b905080604001511561166f5792915050565b61139483611f30565b60606116838261176c565b6116a057604051636f96cda160e11b815260040160405180910390fd5b600082815260146020526040902054600e906116bb90611fa8565b6040516020016116cc929190613f0c565b6040516020818303038152906040529050919050565b6116ea6117a1565b601154610d14906001600160a01b031682611c61565b6117086117a1565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6117326117a1565b6001600160a01b0381166117585760405162461bcd60e51b8152600401610d0b90613f6a565b610d1481611b90565b6000610d3282612052565b600081600111158015611780575060045482105b801561094b575050600090815260086020526040902054600160e01b161590565b600c546001600160a01b03163314610e9b5760405162461bcd60e51b8152600401610d0b90613fac565b6000818060011161181b5760045481101561181b57600081815260086020526040902054600160e01b8116611819575b806113945750600019016000818152600860205260409020546117fb565b505b604051636f96cda160e11b815260040160405180910390fd5b6011546001600160a01b03858116911614156119fb5760008167ffffffffffffffff81111561186557611865613a91565b60405190808252806020026020018201604052801561188e578160200160208202803683370190505b50905060008267ffffffffffffffff8111156118ac576118ac613a91565b6040519080825280602002602001820160405280156118d5578160200160208202803683370190505b5090508360005b848110156119545761016c8482815181106118f9576118f9613d1e565b602090810291909101015261190e8183613df1565b83828151811061192057611920613d1e565b602090810291909101015260016014600061193b8486613df1565b81526020810191909152604001600020556001016118dc565b50600d546040516311b211c160e31b81526001600160a01b0390911690638d908e08906119879089908790600401613e09565b600060405180830381600087803b1580156119a157600080fd5b505af11580156119b5573d6000803e3d6000fd5b505050506119f37f5a1aa6b3e98d297b5b07a16097bb7f47aa9c559c07c644e033b9aa6ae3690252876001856040516020016111c793929190613e29565b5050506114ea565b6001600160a01b03831615801590611a1b57506001600160a01b03841615155b15611a395760405163399f41e760e01b815260040160405180910390fd5b6114ea565b6000611a49836117cb565b905080600080611a67866000908152600a6020526040902080549091565b915091508415611aa757611a7c818433610b2f565b611aa757611a8a833361081b565b611aa757604051632ce44b5f60e11b815260040160405180910390fd5b611ab5836000886001611834565b8015611ac057600082555b6001600160a01b038316600081815260096020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260086020526040902055600160e11b8416611b475760018601600081815260086020526040902054611b45576004548114611b455760008181526008602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060058054600101905550505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526008602052604090205461094b90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60045481611c825760405163b562e8dd60e01b815260040160405180910390fd5b611c8f6000848385611834565b6001600160a01b03831660008181526009602090815260408083208054680100000000000000018802019055848352600890915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611d3e57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611d06565b5081611d5c57604051622e076360e81b815260040160405180910390fd5b60045550505050565b60005460025460405163b472047760e01b81526001600160a01b039283169263b472047792611d9b929116908590600401613fbc565b600060405180830381600087803b158015611db557600080fd5b505af11580156111f9573d6000803e3d6000fd5b336000818152600b602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611e2c9085906135f0565b60405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611e6d903390899088908890600401613fca565b602060405180830381600087803b158015611e8757600080fd5b505af1925050508015611eb7575060408051601f3d908101601f19168201909252611eb491810190614019565b60015b611f12573d808015611ee5576040519150601f19603f3d011682016040523d82523d6000602084013e611eea565b606091505b508051611f0a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261094b611f60836117cb565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60606000611fb583612252565b600101905060008167ffffffffffffffff811115611fd557611fd5613a91565b6040519080825280601f01601f191660200182016040528015611fff576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846120455761204a565b612009565b509392505050565b6060600061205f83612334565b9050600061206c82612393565b90506000612079836123bc565b9050600081612087846123e5565b612090866125a3565b6040516020016120a293929190614050565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff16156120ea5760405162461bcd60e51b8152600401610d0b906140c4565b6000818152600360205260408120805460ff1916600117905561210c856125bf565b9050600061211982612709565b905061212481612799565b6002546001600160a01b039081169116146121515760405162461bcd60e51b8152600401610d0b90614116565b600061215c876127c2565b905061217c61216c846020015190565b876121768a6127de565b846127fa565b6121985760405162461bcd60e51b8152600401610d0b90614166565b6121c6856121a589612ab0565b6121ae8a612acc565b846121b88c612ae8565b6121c18d612b04565b612b20565b5060006121d283612c28565b90507f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036612208612203836000612c64565b612c9c565b146122255760405162461bcd60e51b8152600401610d0b906141aa565b600061223084612d15565b8060200190518101906122439190614212565b9b9a5050505050505050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061229b577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106122c7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106122e557662386f26fc10000830492506010015b6305f5e10083106122fd576305f5e100830492506008015b612710831061231157612710830492506004015b60648310612323576064830492506002015b600a831061094b5760010192915050565b604080516020810190915260608152600061237e6123798460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b612d31565b60408051602081019091529081529392505050565b606061094b82600001516008815181106123af576123af613d1e565b6020026020010151612e47565b600061094b82600001516002815181106123d8576123d8613d1e565b6020026020010151612c9c565b6040805160208101909152600081528151606091901561094b5760008061240d600086612ee4565b60f81c9050600181148061242457508060ff166003145b156124cc576001855160026124399190613d8e565b612443919061424d565b67ffffffffffffffff81111561245b5761245b613a91565b6040519080825280601f01601f191660200182016040528015612485576020820181803683370190505b5092506000612495600187612ee4565b905080846000815181106124ab576124ab613d1e565b60200101906001600160f81b031916908160001a9053506001925050612530565b6002855160026124dc9190613d8e565b6124e6919061424d565b67ffffffffffffffff8111156124fe576124fe613a91565b6040519080825280601f01601f191660200182016040528015612528576020820181803683370190505b509250600091505b60ff82165b835181101561259a5761255f61254e60ff85168361424d565b612559906002613df1565b87612ee4565b84828151811061257157612571613d1e565b60200101906001600160f81b031916908160001a9053508061259281614268565b915050612535565b50505092915050565b600061094b82600001516009815181106123d8576123d8613d1e565b6125e360405180606001604052806060815260200160608152602001600081525090565b6125fd82600001516006815181106123af576123af613d1e565b60208281018290526040805180820182526000808252908301528051808201909152825181529181019082015261263381612f65565b156126485761264181612d31565b82526126f5565b6020820151805160009061265e9060019061424d565b67ffffffffffffffff81111561267657612676613a91565b6040519080825280601f01601f1916602001820160405280156126a0576020820181803683370190505b5090506000808360210191508260200190506126be82828551612f9e565b6040805180820182526000808252602091820152815180830190925284518252808501908201526126ee90612d31565b8652505050505b6126fe836125a3565b604083015250919050565b604080516080810182526000918101828152606080830193909352815260208101919091526000612757836000015160038151811061274a5761274a613d1e565b6020026020010151612d31565b83604001518151811061276c5761276c613d1e565b60200260200101519050604051806040016040528082815260200161279083612d31565b90529392505050565b600061094b82602001516000815181106127b5576127b5613d1e565b6020026020010151613019565b600061094b82600001516005815181106123d8576123d8613d1e565b606061094b82600001516007815181106123af576123af613d1e565b60008061282e8460408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b9050600061283b82612d31565b90506060808560008061284d8b6123e5565b9050805160001415612869576000975050505050505050611f28565b60005b8651811015612aa057815183111561288f57600098505050505050505050611f28565b6128b18782815181106128a4576128a4613d1e565b6020026020010151613033565b9550858051906020012084146128d257600098505050505050505050611f28565b6128e787828151811061274a5761274a613d1e565b94508451601114156129bc578151831415612949578c8051906020012061291a866010815181106123af576123af613d1e565b80519060200120141561293857600198505050505050505050611f28565b600098505050505050505050611f28565b600082848151811061295d5761295d613d1e565b016020015160f81c905060108111156129825760009950505050505050505050611f28565b6129a7868260ff168151811061299a5761299a613d1e565b60200260200101516130b3565b94506129b4600185613df1565b935050612a8e565b8451600214156129385760006129e86129e1876000815181106123af576123af613d1e565b84866130e1565b83519091506129f78286613df1565b1415612a4c578d80519060200120612a1b876001815181106123af576123af613d1e565b805190602001201415612a3a5760019950505050505050505050611f28565b60009950505050505050505050611f28565b80612a635760009950505050505050505050611f28565b612a6d8185613df1565b9350612a858660018151811061299a5761299a613d1e565b9450612a8e9050565b80612a9881614268565b91505061286c565b5050505050505050949350505050565b600061094b82600001516003815181106123d8576123d8613d1e565b600061094b82600001516004815181106123d8576123d8613d1e565b600061094b82600001516000815181106123d8576123d8613d1e565b606061094b82600001516001815181106123af576123af613d1e565b6001546040516320a9cea560e11b81526000918291829182916001600160a01b03909116906341539d4a90612b5990899060040161371e565b60a06040518083038186803b158015612b7157600080fd5b505afa158015612b85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ba99190614299565b5093505092509250612bff828b612bc0919061424d565b84878d8d8d8d604051602001612bd99493929190614311565b60405160208183030381529060405280519060200120613202909392919063ffffffff16565b612c1b5760405162461bcd60e51b8152600401610d0b9061438d565b9998505050505050505050565b6040805160208101909152606081526040518060200160405280612c5c846020015160018151811061274a5761274a613d1e565b905292915050565b60408051808201909152600080825260208201528251805183908110612c8c57612c8c613d1e565b6020026020010151905092915050565b805160009015801590612cb157508151602110155b612cba57600080fd5b6000612cc98360200151613316565b90506000818460000151612cdd919061424d565b9050600080838660200151612cf29190613df1565b9050805191506020831015610e1957506020919091036101000a90049392505050565b606061094b82602001516002815181106123af576123af613d1e565b6060612d3c82612f65565b612d4557600080fd5b6000612d5083613397565b905060008167ffffffffffffffff811115612d6d57612d6d613a91565b604051908082528060200260200182016040528015612db257816020015b6040805180820190915260008082526020820152815260200190600190039081612d8b5790505b5090506000612dc48560200151613316565b8560200151612dd39190613df1565b90506000805b84811015612e3c57612dea8361341a565b9150604051806040016040528083815260200184815250848281518110612e1357612e13613d1e565b6020908102919091010152612e288284613df1565b925080612e3481614268565b915050612dd9565b509195945050505050565b8051606090612e5557600080fd5b6000612e648360200151613316565b90506000818460000151612e78919061424d565b905060008167ffffffffffffffff811115612e9557612e95613a91565b6040519080825280601f01601f191660200182016040528015612ebf576020820181803683370190505b5090506000816020019050610e19848760200151612edd9190613df1565b82856134be565b6000612ef160028461439d565b15612f2b57601082612f046002866143b5565b81518110612f1457612f14613d1e565b0160200151612f26919060f81c6143cd565b612f5b565b601082612f396002866143b5565b81518110612f4957612f49613d1e565b0160200151612f5b919060f81c6143de565b60f81b9392505050565b8051600090612f7657506000919050565b6020820151805160001a9060c0821015612f94575060009392505050565b5060019392505050565b80612fa857505050565b60208110612fe05782518252612fbf602084613df1565b9250612fcc602083613df1565b9150612fd960208261424d565b9050612fa8565b60006001612fef83602061424d565b612ffb906101006144fd565b613005919061424d565b935183518516941916939093179091525050565b805160009060151461302a57600080fd5b61094b82612c9c565b60606000826000015167ffffffffffffffff81111561305457613054613a91565b6040519080825280601f01601f19166020018201604052801561307e576020820181803683370190505b5090508051600014156130915792915050565b60008160200190506130ac84602001518286600001516134be565b5092915050565b80516000906021146130c457600080fd5b600080836020015160016130d89190613df1565b51949350505050565b600080806130ee866123e5565b90506000815167ffffffffffffffff81111561310c5761310c613a91565b6040519080825280601f01601f191660200182016040528015613136576020820181803683370190505b509050845b82516131479087613df1565b8110156131d257600087828151811061316257613162613d1e565b01602001517fff000000000000000000000000000000000000000000000000000000000000001690508083613197898561424d565b815181106131a7576131a7613d1e565b60200101906001600160f81b031916908160001a9053505080806131ca90614268565b91505061313b565b508080519060200120828051906020012014156131f257815192506131f7565b600092505b509095945050505050565b600060208251613212919061439d565b1561322f5760405162461bcd60e51b8152600401610d0b90614540565b60006020835161323f91906143b5565b905061324c8160026144fd565b851061326a5760405162461bcd60e51b8152600401610d0b90614584565b60008660205b855181116133085785810151925061328960028961439d565b6132bd5781836040516020016132a0929190614594565b6040516020818303038152906040528051906020012091506132e9565b82826040516020016132d0929190614594565b6040516020818303038152906040528051906020012091505b6132f46002896143b5565b9750613301602082613df1565b9050613270565b509094149695505050505050565b8051600090811a608081101561332f5750600092915050565b60b881108061334a575060c0811080159061334a575060f881105b156133585750600192915050565b60c08110156133855761336d600160b86145ba565b61337a9060ff168261424d565b611394906001613df1565b61336d600160f86145ba565b50919050565b80516000906133a857506000919050565b6000806133b88460200151613316565b84602001516133c79190613df1565b90506000846000015185602001516133df9190613df1565b90505b80821015613411576133f38261341a565b6133fd9083613df1565b91508261340981614268565b9350506133e2565b50909392505050565b80516000908190811a608081101561343557600191506130ac565b60b881101561345b5761344960808261424d565b613454906001613df1565b91506130ac565b60c08110156134885760b78103600185019450806020036101000a855104600182018101935050506130ac565b60f881101561349c5761344960c08261424d565b60019390930151602084900360f7016101000a900490920160f5190192915050565b806134c857505050565b6020811061350057825182526134df602084613df1565b92506134ec602083613df1565b91506134f960208261424d565b90506134c8565b80612fe057505050565b82805461351690613cc2565b90600052602060002090601f016020900481019282613538576000855561357e565b82601f106135515782800160ff1982351617855561357e565b8280016001018555821561357e579182015b8281111561357e578235825591602001919060010190613563565b5061358a92915061358e565b5090565b5b8082111561358a576000815560010161358f565b6001600160e01b031981165b8114610d1457600080fd5b803561094b816135a3565b6000602082840312156135da576135da600080fd5b6000611f2884846135ba565b8015155b82525050565b6020810161094b82846135e6565b60005b83811015613619578181015183820152602001613601565b838111156114ea5750506000910152565b6000613634825190565b80845260208401935061364b8185602086016135fe565b601f01601f19169290920192915050565b60208082528101611394818461362a565b806135af565b803561094b8161366d565b60006020828403121561369357613693600080fd5b6000611f288484613673565b60006001600160a01b03821661094b565b6135ea8161369f565b6020810161094b82846136b0565b6135af8161369f565b803561094b816136c7565b600080604083850312156136f1576136f1600080fd5b60006136fd85856136d0565b925050602061370e85828601613673565b9150509250929050565b806135ea565b6020810161094b8284613718565b6000806040838503121561374257613742600080fd5b60006136fd8585613673565b60008060006060848603121561376657613766600080fd5b600061377286866136d0565b9350506020613783868287016136d0565b925050604061379486828701613673565b9150509250925092565b60008083601f8401126137b3576137b3600080fd5b50813567ffffffffffffffff8111156137ce576137ce600080fd5b6020830191508360018202830111156137e9576137e9600080fd5b9250929050565b6000806020838503121561380657613806600080fd5b823567ffffffffffffffff81111561382057613820600080fd5b61382c8582860161379e565b92509250509250929050565b60008083601f84011261384d5761384d600080fd5b50813567ffffffffffffffff81111561386857613868600080fd5b6020830191508360208202830111156137e9576137e9600080fd5b6000806020838503121561389957613899600080fd5b823567ffffffffffffffff8111156138b3576138b3600080fd5b61382c85828601613838565b67ffffffffffffffff81166135ea565b62ffffff81166135ea565b805160808301906138eb84826136b0565b5060208201516138fe60208501826138bf565b50604082015161391160408501826135e6565b5060608201516114ea60608501826138cf565b600061393083836138da565b505060800190565b6000613942825190565b80845260209384019383018060005b838110156139765781516139658882613924565b975060208301925050600101613951565b509495945050505050565b602080825281016113948184613938565b6000602082840312156139a7576139a7600080fd5b6000611f2884846136d0565b60006139bf8383613718565b505060200190565b60006139d1825190565b80845260209384019383018060005b838110156139765781516139f488826139b3565b9750602083019250506001016139e0565b6020808252810161139481846139c7565b600080600060608486031215613a2e57613a2e600080fd5b6000613a3a86866136d0565b935050602061378386828701613673565b8015156135af565b803561094b81613a4b565b60008060408385031215613a7457613a74600080fd5b6000613a8085856136d0565b925050602061370e85828601613a53565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715613acd57613acd613a91565b6040525050565b6000613adf60405190565b9050613aeb8282613aa7565b919050565b600067ffffffffffffffff821115613b0a57613b0a613a91565b601f19601f83011660200192915050565b82818337506000910152565b6000613b3a613b3584613af0565b613ad4565b905082815260208101848484011115613b5557613b55600080fd5b61204a848285613b1b565b600082601f830112613b7457613b74600080fd5b8135611f28848260208601613b27565b60008060008060808587031215613b9d57613b9d600080fd5b6000613ba987876136d0565b9450506020613bba878288016136d0565b9350506040613bcb87828801613673565b925050606085013567ffffffffffffffff811115613beb57613beb600080fd5b613bf787828801613b60565b91505092959194509250565b600061094b8261369f565b600061094b82613c03565b6135ea81613c0e565b6020810161094b8284613c19565b6080810161094b82846138da565b60008060408385031215613c5457613c54600080fd5b6000613c6085856136d0565b925050602061370e858286016136d0565b600060208284031215613c8657613c86600080fd5b813567ffffffffffffffff811115613ca057613ca0600080fd5b611f2884828501613b60565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613cd657607f821691505b6020821081141561339157613391613cac565b60008161094b565b600381526000602082016239393960e81b815291505b5060200190565b6020808252810161094b81613cf1565b634e487b7160e01b600052603260045260246000fd5b601681526000602082017f4d696e74696e67206973206e6f74206163746976652e0000000000000000000081529150613d07565b6020808252810161094b81613d34565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613da857613da8613d78565b500290565b601181526000602082017f4e6f7420656e6f7567682066756e64732e00000000000000000000000000000081529150613d07565b6020808252810161094b81613dad565b60008219821115613e0457613e04613d78565b500190565b60408101613e1782856136b0565b8181036020830152611f2881846139c7565b60608101613e3782866136b0565b613e446020830185613718565b8181036040830152613e5681846139c7565b95945050505050565b60408101613e6d8285613718565b8181036020830152611f28818461362a565b60008154613e8c81613cc2565b600182168015613ea35760018114613eb45761259a565b60ff1983168652818601935061259a565b60008581526020902060005b83811015613edc57815488820152600190910190602001613ec0565b505050939093019392505050565b6000613ef4825190565b613f028185602086016135fe565b9290920192915050565b6000613f188285613e7f565b9150611f288284613eea565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b6020808252810161094b81613f24565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000613d07565b6020808252810161094b81613f7a565b60408101613e6d82856136b0565b60808101613fd882876136b0565b613fe560208301866136b0565b613ff26040830185613718565b8181036060830152614004818461362a565b9695505050505050565b805161094b816135a3565b60006020828403121561402e5761402e600080fd5b6000611f28848461400e565b634e487b7160e01b600052601260045260246000fd5b600061405c8286613718565b60208201915061406c8285613eea565b91506140788284613718565b506020019392505050565b602481526000602082017f4678526f6f7454756e6e656c3a20455849545f414c52454144595f50524f434581526314d4d15160e21b60208201529150613f63565b6020808252810161094b81614083565b602581526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f46585f4348494c445f54815264155393915360da1b60208201529150613f63565b6020808252810161094b816140d4565b602381526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f524543454950545f505281526227a7a360e91b60208201529150613f63565b6020808252810161094b81614126565b601f81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f5349474e41545552450081529150613d07565b6020808252810161094b81614176565b60006141c8613b3584613af0565b9050828152602081018484840111156141e3576141e3600080fd5b61204a8482856135fe565b600082601f83011261420257614202600080fd5b8151611f288482602086016141ba565b60006020828403121561422757614227600080fd5b815167ffffffffffffffff81111561424157614241600080fd5b611f28848285016141ee565b6000825b92508282101561426357614263613d78565b500390565b600060001982141561427c5761427c613d78565b5060010190565b805161094b8161366d565b805161094b816136c7565b600080600080600060a086880312156142b4576142b4600080fd5b60006142c08888614283565b95505060206142d188828901614283565b94505060406142e288828901614283565b93505060606142f388828901614283565b92505060806143048882890161428e565b9150509295509295909350565b600061431d8287613718565b60208201915061432d8286613718565b60208201915061433d8285613718565b60208201915061434d8284613718565b50602001949350505050565b601c81526000602082017f4678526f6f7454756e6e656c3a20494e56414c49445f4845414445520000000081529150613d07565b6020808252810161094b81614359565b6000825b9250826143b0576143b061403a565b500690565b6000825b9250826143c8576143c861403a565b500490565b600060ff8216915060ff83166143a1565b600060ff8216915060ff83166143b9565b80825b600185111561442e5780860481111561440d5761440d613d78565b600185161561441b57908102905b80026144278560011c90565b94506143f2565b94509492505050565b60008261444657506001611394565b8161445357506000611394565b81600181146144695760028114614473576144a0565b6001915050611394565b60ff84111561448457614484613d78565b8360020a91508482111561449a5761449a613d78565b50611394565b5060208310610133831016604e8410600b84101617156144d3575081810a838111156144ce576144ce613d78565b611394565b6144e084848460016143ef565b925090508184048111156144f6576144f6613d78565b0292915050565b60006113946000198484614437565b601481526000602082017f496e76616c69642070726f6f66206c656e67746800000000000000000000000081529150613d07565b6020808252810161094b8161450c565b601581526000602082017f4c65616620696e64657820697320746f6f20626967000000000000000000000081529150613d07565b6020808252810161094b81614550565b60006145a08285613718565b6020820191506145b08284613718565b5060200192915050565b600060ff8216915060ff831661425156fea26469706673582212205e3a4564dd9fe77bf2822d788ebdca633b942dffe23d374c766e846a523d85d864736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2000000000000000000000000bd24a76f4135f930f5c49f6c30e0e30a61b97537
-----Decoded View---------------
Arg [0] : _checkpointManager (address): 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287
Arg [1] : _fxRoot (address): 0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2
Arg [2] : _vendorContractAddress (address): 0xbd24A76F4135F930F5c49f6c30e0E30A61b97537
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000086e4dc95c7fbdbf52e33d563bbdb00823894c287
Arg [1] : 000000000000000000000000fe5e5d361b2ad62c541bab87c45a0b9b018389a2
Arg [2] : 000000000000000000000000bd24a76f4135f930f5c49f6c30e0e30a61b97537
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.