ERC-721
NFT
Overview
Max Total Supply
2,259 ESXSC
Holders
562
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 ESXSCLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
EstateXSkyscraperCollection
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; /// @title EstateX Skyscraper Collection /// @author EstateX B.V. import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; contract EstateXSkyscraperCollection is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; using SafeERC20 for IERC20; struct Building { uint32 firstTokenId; // The first token in this building uint32 totalTokenAmount; // The amount of tokens in this building uint32 claimTokenAmount; // The amount of tokens allocated for claim, starts at "firstTokenId". uint32 publicMinted; // The amount of public tokens that have been minted. uint32 claimMinted; // The amount of claimable tokens that have been minted. uint48 tokenPrice; uint48 points; } mapping(uint256 => Building) public buildings; uint256 public nextBuildingId = 0; // Map token ids to building ids for faster lookup. mapping(uint256 => uint256) public tokenIdToBuildingId; mapping(address => bool) public approvedTokens; bool public isRevealed = false; address private claimMintVerificationAddress; address private publicMintVerificationAddress; struct SignedClaimMint { uint256 buildingId; uint256 tokenId; address sender; uint8 v; bytes32 r; bytes32 s; } struct SignedPublicMint { uint256 nonce; address sender; uint8 v; bytes32 r; bytes32 s; } mapping(uint256 => bool) nonceUsed; enum ContractState { OFF, CLAIM, PUBLIC } ContractState public contractState = ContractState.OFF; AggregatorV3Interface public priceFeed; string public baseURI; string public preRevealBaseURI; constructor() ERC721("EstateX Skyscraper Collection", "ESXSC") Ownable() { priceFeed = AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419); approvedTokens[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = true; // USDC approvedTokens[0xdAC17F958D2ee523a2206206994597C13D831ec7] = true; // USDT } // // Modifiers // /** * Ensure current state is correct for this method. */ modifier isNotContractState(ContractState contractState_) { require(contractState != contractState_, "invalid contract state"); _; } /** * Ensure current state is correct for this method. */ modifier isContractState(ContractState contractState_) { require(contractState == contractState_, "invalid contract state"); _; } /** * Ensure correct amount of Ether present in transaction. */ modifier correctValue(uint256 expectedValue) { require(expectedValue <= msg.value, "ether value sent is not correct"); _; } // // Price Feed // function getTokentoUSD() public view returns (int256) { (, int256 price, , , ) = priceFeed.latestRoundData(); return price; } function getPriceEth(uint256 buildingId) public view returns (uint256) { int256 price = getTokentoUSD(); return (uint256(buildings[buildingId].tokenPrice) * 10 ** 18) / uint256(price); } // // Mint // /** * Verifies given signature for claim mint. * * @param signedMint The signed claim mint struct to verify. */ modifier verifyClaimMintSignature(SignedClaimMint calldata signedMint) { require(!_exists(signedMint.tokenId), "token already minted"); require(signedMint.sender == msg.sender, "invalid signature"); bytes32 msgHash = keccak256(abi.encode(signedMint.buildingId, signedMint.tokenId, signedMint.sender)); address signer = ECDSA.recover(msgHash, signedMint.v, signedMint.r, signedMint.s); // Check if the coupon has been signed by the correct private key. require(signer == claimMintVerificationAddress, "invalid signature"); _; } /** * Verifies given signature for public mint. * * @param signedMint The signed public mint struct to verify. */ modifier verifyPublicMintSignature(SignedPublicMint calldata signedMint) { require(signedMint.sender == msg.sender, "invalid signature"); require(nonceUsed[signedMint.nonce] == false, "signature already used"); bytes32 msgHash = keccak256(abi.encode(signedMint.nonce, signedMint.sender)); address signer = ECDSA.recover(msgHash, signedMint.v, signedMint.r, signedMint.s); // Check if the coupon has been signed by the correct private key. require(signer == publicMintVerificationAddress, "invalid signature"); // Set nonce to used nonceUsed[signedMint.nonce] = true; _; } /** * Validates the given building id and returns the corresponding building struct. * * @param buildingId The building id to verify and use. */ function _validateAndGetBuilding(uint256 buildingId) internal view returns (Building storage) { require(buildingId < nextBuildingId, "invalid building id"); return buildings[buildingId]; } /** * Mints the given token id. * * @param receiver The address that should receive the token. * @param buildingId The building id this token is part of. * @param tokenId The token id to mint. */ function _mintTokenId(address receiver, uint256 buildingId, uint256 tokenId) internal { require(buildingId < nextBuildingId, "invalid building id"); Building storage building = buildings[buildingId]; require( tokenId >= building.firstTokenId && tokenId < building.firstTokenId + building.totalTokenAmount, "invalid token id" ); tokenIdToBuildingId[tokenId] = buildingId; _safeMint(receiver, tokenId); } /** * Mints the given token id as a claim mint. * * @param receiver The address that should receive the token. * @param buildingId The building id this token is part of. * @param tokenId The token id to mint. * @param building The building this token is part of. */ function _mintClaim(address receiver, uint256 buildingId, uint256 tokenId, Building storage building) internal { building.claimMinted += 1; _mintTokenId(receiver, buildingId, tokenId); } /** * Mints the given amount of tokens as a public mint. * * @param receiver The address that should receive the token. * @param buildingId The building id this token is part of. * @param quantity The amount of tokens to mint. * @param building The building this token is part of. */ function _mintPublic(address receiver, uint256 buildingId, uint32 quantity, Building storage building) internal { require(quantity > 0, "invalid quantity"); require(building.publicMinted + quantity <= building.totalTokenAmount - building.claimTokenAmount, "sold out"); uint256 oldPublicMinted = building.publicMinted; building.publicMinted += quantity; for (uint256 i = 0; i < quantity; i++) { uint256 tokenId = building.firstTokenId + building.claimTokenAmount + oldPublicMinted + i; _mintTokenId(receiver, buildingId, tokenId); } } /** * Transfers the given amount of third-party tokens to this contract. * This can be used as an alternative to ETH. * * @param tokenAddress The address of the third-party token to use. * @param building The building of which the price for our token should be used from. * @param quantity The amount of our tokens which should be used for the price calculation. */ function _transferTokensForMint(address tokenAddress, Building storage building, uint256 quantity) internal { require(approvedTokens[tokenAddress], "token not approved"); uint256 transferAmount = (building.tokenPrice * quantity * (10 ** IERC20Metadata(tokenAddress).decimals())) / (10 ** 8); IERC20(tokenAddress).safeTransferFrom(msg.sender, address(this), transferAmount); } /** * Executes a claim mint payed with ethereum. * * @param signedMint The signed claim mint struct to verify. */ function mintClaim( SignedClaimMint calldata signedMint ) external nonReentrant isNotContractState(ContractState.OFF) verifyClaimMintSignature(signedMint) { Building storage building = _validateAndGetBuilding(signedMint.buildingId); _mintClaim(msg.sender, signedMint.buildingId, signedMint.tokenId, building); } /** * Executes a public mint payed with ethereum. * * @param signedMint The signed public mint struct to verify. * @param buildingId The id of the building the tokens should be minted from. * @param quantity The amount of tokens to mint. */ function mintEthPublic( SignedPublicMint calldata signedMint, uint256 buildingId, uint32 quantity ) external payable nonReentrant isContractState(ContractState.PUBLIC) verifyPublicMintSignature(signedMint) correctValue(getPriceEth(buildingId) * quantity) { Building storage building = _validateAndGetBuilding(buildingId); _mintPublic(msg.sender, buildingId, quantity, building); } /** * Executes a public mint payed with a third-party token. * * @param buildingId The id of the building the tokens should be minted from. * @param quantity The amount of tokens to mint. * @param tokenAddress The address of the third-party token to use. */ function mintTokenPublic( SignedPublicMint calldata signedMint, uint256 buildingId, uint32 quantity, address tokenAddress ) external nonReentrant isContractState(ContractState.PUBLIC) verifyPublicMintSignature(signedMint) { Building storage building = _validateAndGetBuilding(buildingId); _transferTokensForMint(tokenAddress, building, quantity); _mintPublic(msg.sender, buildingId, quantity, building); } /** * Executes a reserved mint for a claim token. * * @param receiver The address that should receive the token. * @param buildingId The id of the building this token should be minted from. * @param tokenId The token id to mint. */ function mintReservedClaim(address receiver, uint256 buildingId, uint256 tokenId) external nonReentrant onlyOwner { Building storage building = _validateAndGetBuilding(buildingId); _mintClaim(receiver, buildingId, tokenId, building); } /** * Executes a reserved mint for public tokens. * * @param receiver The address that should receive the tokens. * @param buildingId The id of the building the tokens should be minted from. * @param quantity The amount of tokens to mint. */ function mintReservedPublic(address receiver, uint256 buildingId, uint32 quantity) external nonReentrant onlyOwner { Building storage building = _validateAndGetBuilding(buildingId); _mintPublic(receiver, buildingId, quantity, building); } /** * @notice Burns `tokenId`. The caller must own `tokenId` or be an * approved operator. */ // solhint-disable-next-line comprehensive-interface function burn(uint256[] memory ids) external { for (uint i; i < ids.length; i++) { require(_isApprovedOrOwner(msg.sender, ids[i]), "ERC721: caller is not token owner or approved"); _burn(ids[i]); } } // // Admin // /** * Adds a new building to the collection. * The building id will be assigned automatically. * * @param totalTokenAmount The total amount of tokens in this building. * @param claimTokenAmount The amount of tokens allocated for claim. * @param tokenPrice The price of a single token in USD with 8 decimals. * @param points The amount of points this building is worth. */ function addBuilding( uint32 totalTokenAmount, uint32 claimTokenAmount, uint48 tokenPrice, uint48 points ) external onlyOwner { _addBuilding(totalTokenAmount, claimTokenAmount, tokenPrice, points); } /** * Adds many new buildings to the collection. * The building id will be assigned automatically. * * All args have to be arrays of the same length. The first building * will be created with data from the first index of each array, and so on. * * @param totalTokenAmount The total amount of tokens in each building. * @param claimTokenAmount The amount of tokens allocated for claim. * @param tokenPrice The price of a single token in USD with 8 decimals. * @param points The amount of points each building is worth. */ function addManyBuildings( uint32[] calldata totalTokenAmount, uint32[] calldata claimTokenAmount, uint48[] calldata tokenPrice, uint48[] calldata points ) external onlyOwner { require(totalTokenAmount.length == claimTokenAmount.length, "invalid length"); require(totalTokenAmount.length == tokenPrice.length, "invalid length"); require(totalTokenAmount.length == points.length, "invalid length"); for (uint256 i = 0; i < totalTokenAmount.length; i++) { _addBuilding(totalTokenAmount[i], claimTokenAmount[i], tokenPrice[i], points[i]); } } /** * Adds a new building to the collection. * The building id will be assigned automatically. * * @param totalTokenAmount The total amount of tokens in this building. * @param claimTokenAmount The amount of tokens allocated for claim. * @param tokenPrice The price of a single token in USD. * @param points The amount of points this building is worth. */ function _addBuilding(uint32 totalTokenAmount, uint32 claimTokenAmount, uint48 tokenPrice, uint48 points) internal { uint32 firstTokenId = 1; if (nextBuildingId > 0) { Building storage previousBuilding = buildings[nextBuildingId - 1]; firstTokenId = previousBuilding.firstTokenId + previousBuilding.totalTokenAmount; } buildings[nextBuildingId] = Building( firstTokenId, totalTokenAmount, claimTokenAmount, 0, 0, tokenPrice, points ); nextBuildingId++; } /** * Updates the token price for a building. * * @param newTokenPrice The new token price. * @param buildingId The new token price. */ function setTokenPrice(uint256 buildingId, uint48 newTokenPrice) external onlyOwner { require(buildingId < nextBuildingId, "invalid building id"); buildings[buildingId].tokenPrice = newTokenPrice; } /** * Updates the amount of tokens allocated for claim for given building. * * @param buildingId The id of the building to update. * @param newClaimTokenAmount The new amount of tokens allocated for claim. */ function setClaimTokenAmount(uint256 buildingId, uint32 newClaimTokenAmount) external onlyOwner { require(buildingId < nextBuildingId, "invalid building id"); Building storage building = buildings[buildingId]; require(newClaimTokenAmount <= building.totalTokenAmount - building.publicMinted, "invalid claim amount"); require(newClaimTokenAmount >= building.claimMinted, "invalid claim amount"); building.claimTokenAmount = newClaimTokenAmount; } /** * Sets the contract state. * * @param contractState_ The new state of the contract. */ function setContractState(uint256 contractState_) external onlyOwner { require(contractState_ < 3, "invalid contract state"); if (contractState_ == 0) { contractState = ContractState.OFF; } else if (contractState_ == 1) { contractState = ContractState.CLAIM; } else { contractState = ContractState.PUBLIC; } } /** * Sets the price feed address. * * @param newFeed The new price feed address. */ function setPriceFeed(address newFeed) external onlyOwner { require(newFeed != address(0), "invalid address"); priceFeed = AggregatorV3Interface(newFeed); } /** * Sets given token to be approved. * * @param token The token address. */ function setApprovedToken(address token, bool approved) external onlyOwner { require(token != address(0), "invalid address"); approvedTokens[token] = approved; } /** * Set the ECDSA verification address for the claim mint. * * @param addr The verification address to use */ function setClaimVerificationAddress(address addr) external onlyOwner { require(addr != address(0), "invalid address"); claimMintVerificationAddress = addr; } /** * Set the ECDSA verification address for the public mint. * * @param addr The verification address to use */ function setPublicVerificationAddress(address addr) external onlyOwner { require(addr != address(0), "invalid address"); publicMintVerificationAddress = addr; } /** * Sets base URI. * * @param newBaseURI The new base URI. */ function setBaseURI(string memory newBaseURI) external onlyOwner { baseURI = newBaseURI; } /** * Sets prereveal base URI. * * @param newBaseURI The new prereveal base URI. */ function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { preRevealBaseURI = newBaseURI; } /** * Set wether the collection should be revealed or not. Changes the baseURI used. * * @param state The new revealed state. */ function setRevealed(bool state) external onlyOwner { isRevealed = state; } /** * Withdraw contract funds to a given address. * * @param account The account to withdraw to. * @param amount The amount to withdraw. */ function ownerWithdraw(address payable account, uint256 amount) external virtual onlyOwner { require(account != address(0), "invalid address"); Address.sendValue(account, amount); } /** * Withdraw contract funds to a given address. * * @param account The account to withdraw to. * @param amount The amount to withdraw. */ function ownerWithdraw(address payable account, uint256 amount, address tokenAddress) external virtual onlyOwner { require(account != address(0), "invalid address"); IERC20(tokenAddress).safeTransfer(account, amount); } // // Views // /** * Returns either the public or pre-reveal base uri for the token metadata. */ function _baseURI() internal view virtual override returns (string memory) { if (isRevealed) { return baseURI; } return preRevealBaseURI; } function getPoints(address account) external view returns (uint256) { uint256 totalPoints = 0; for (uint256 i; i < balanceOf(account); i++) { uint256 tokenId = tokenOfOwnerByIndex(account, i); uint256 buildingId = tokenIdToBuildingId[tokenId]; totalPoints += buildings[buildingId].points; } return totalPoints; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData( uint80 _roundId ) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound); function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"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":[{"internalType":"uint32","name":"totalTokenAmount","type":"uint32"},{"internalType":"uint32","name":"claimTokenAmount","type":"uint32"},{"internalType":"uint48","name":"tokenPrice","type":"uint48"},{"internalType":"uint48","name":"points","type":"uint48"}],"name":"addBuilding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"totalTokenAmount","type":"uint32[]"},{"internalType":"uint32[]","name":"claimTokenAmount","type":"uint32[]"},{"internalType":"uint48[]","name":"tokenPrice","type":"uint48[]"},{"internalType":"uint48[]","name":"points","type":"uint48[]"}],"name":"addManyBuildings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"buildings","outputs":[{"internalType":"uint32","name":"firstTokenId","type":"uint32"},{"internalType":"uint32","name":"totalTokenAmount","type":"uint32"},{"internalType":"uint32","name":"claimTokenAmount","type":"uint32"},{"internalType":"uint32","name":"publicMinted","type":"uint32"},{"internalType":"uint32","name":"claimMinted","type":"uint32"},{"internalType":"uint48","name":"tokenPrice","type":"uint48"},{"internalType":"uint48","name":"points","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractState","outputs":[{"internalType":"enum EstateXSkyscraperCollection.ContractState","name":"","type":"uint8"}],"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":"account","type":"address"}],"name":"getPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"buildingId","type":"uint256"}],"name":"getPriceEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokentoUSD","outputs":[{"internalType":"int256","name":"","type":"int256"}],"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":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct EstateXSkyscraperCollection.SignedClaimMint","name":"signedMint","type":"tuple"}],"name":"mintClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct EstateXSkyscraperCollection.SignedPublicMint","name":"signedMint","type":"tuple"},{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"mintEthPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintReservedClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"mintReservedPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct EstateXSkyscraperCollection.SignedPublicMint","name":"signedMint","type":"tuple"},{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint32","name":"quantity","type":"uint32"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"mintTokenPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextBuildingId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address payable","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"ownerWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"preRevealBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint32","name":"newClaimTokenAmount","type":"uint32"}],"name":"setClaimTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setClaimVerificationAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"contractState_","type":"uint256"}],"name":"setContractState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setPreRevealBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFeed","type":"address"}],"name":"setPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setPublicVerificationAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"buildingId","type":"uint256"},{"internalType":"uint48","name":"newTokenPrice","type":"uint48"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToBuildingId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600d556010805460ff199081169091556013805490911690553480156200002c57600080fd5b506040518060400160405280601d81526020017f4573746174655820536b797363726170657220436f6c6c656374696f6e00000081525060405180604001604052806005815260200164455358534360d81b815250816000908162000092919062000264565b506001620000a1828262000264565b505050620000be620000b86200016960201b60201c565b6200016d565b6001600b81905560138054610100600160a81b031916745f4ec3df9cbd43714fe2740f5e3616155c5b841900179055600f6020527fdf82e8e0ca2e8ef371057fa5118f2005d1fe0db2f7f1913ccbb77b1c43aa5725805460ff19908116831790915573dac17f958d2ee523a2206206994597c13d831ec76000527f9bb1b6fca755b661f193c87a7d9b676dd6054634c764cdbc36564f69cab2d7298054909116909117905562000330565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001ea57607f821691505b6020821081036200020b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200025f57600081815260208120601f850160051c810160208610156200023a5750805b601f850160051c820191505b818110156200025b5782815560010162000246565b5050505b505050565b81516001600160401b03811115620002805762000280620001bf565b6200029881620002918454620001d5565b8462000211565b602080601f831160018114620002d05760008415620002b75750858301515b600019600386901b1c1916600185901b1785556200025b565b600085815260208120601f198616915b828110156200030157888601518255948401946001909101908401620002e0565b5085821015620003205787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6147ab80620003406000396000f3fe6080604052600436106102e45760003560e01c8063701dc23111610190578063c723e2db116100dc578063e24d4a6b11610095578063ee204abb1161006f578063ee204abb146109a0578063f2fde38b146109c0578063f38ade9b146109e0578063fb7265ff14610a0057600080fd5b8063e24d4a6b1461092c578063e985e9c514610942578063eb6ac8e11461098b57600080fd5b8063c723e2db1461086c578063c87b56dd1461088c578063cdd88292146108ac578063d3a7520c146108cc578063d9c88e14146108ec578063e0a808531461090c57600080fd5b806385209ee0116101495780639c06a840116101235780639c06a840146107ec578063a22cb4651461080c578063b80f55c91461082c578063b88d4fde1461084c57600080fd5b806385209ee0146107925780638da5cb5b146107b957806395d89b41146107d757600080fd5b8063701dc231146106d857806370a08231146106f8578063715018a614610718578063724e78da1461072d578063741bef1a1461074d5780637e6a34001461077257600080fd5b806336626d9f1161024f57806354214f69116102085780635dbc3135116101e25780635dbc3135146106535780636352211e146106735780636c0360eb146106935780636d1ea3fa146106a857600080fd5b806354214f69146105f9578063549ec98b1461061357806355f804b31461063357600080fd5b806336626d9f146104925780633d3a2ed1146104b257806342842e0e146104d257806343660be9146104f25780634c96a062146105125780634f6ccce7146105d957600080fd5b80630cb0feaa116102a15780630cb0feaa146103dd57806318160ddd1461040a57806323b872dd1461041f5780632f745c591461043f5780633000be661461045f57806335b244911461047257600080fd5b806301ffc9a7146102e9578063044edc3c1461031e57806306fdde0314610340578063081812fc14610362578063086b74b91461039a578063095ea7b3146103bd575b600080fd5b3480156102f557600080fd5b50610309610304366004613949565b610a20565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b5061033e61033936600461397b565b610a4b565b005b34801561034c57600080fd5b50610355610abd565b6040516103159190613a0d565b34801561036e57600080fd5b5061038261037d366004613a20565b610b4f565b6040516001600160a01b039091168152602001610315565b3480156103a657600080fd5b506103af610be4565b604051908152602001610315565b3480156103c957600080fd5b5061033e6103d8366004613a39565b610c69565b3480156103e957600080fd5b506103af6103f8366004613a20565b600e6020526000908152604090205481565b34801561041657600080fd5b506008546103af565b34801561042b57600080fd5b5061033e61043a366004613a65565b610d79565b34801561044b57600080fd5b506103af61045a366004613a39565b610daa565b61033e61046d366004613ad7565b610e40565b34801561047e57600080fd5b5061033e61048d366004613b14565b611085565b34801561049e57600080fd5b5061033e6104ad366004613b49565b6110fa565b3480156104be57600080fd5b5061033e6104cd366004613b9a565b6112c5565b3480156104de57600080fd5b5061033e6104ed366004613a65565b611337565b3480156104fe57600080fd5b5061033e61050d366004613bcd565b611352565b34801561051e57600080fd5b5061058961052d366004613a20565b600c6020526000908152604090205463ffffffff808216916401000000008104821691600160401b8204811691600160601b8104821691600160801b8204169065ffffffffffff600160a01b8204811691600160d01b90041687565b6040805163ffffffff98891681529688166020880152948716948601949094529185166060850152909316608083015265ffffffffffff92831660a08301529190911660c082015260e001610315565b3480156105e557600080fd5b506103af6105f4366004613a20565b6113d4565b34801561060557600080fd5b506010546103099060ff1681565b34801561061f57600080fd5b5061033e61062e366004613b9a565b611467565b34801561063f57600080fd5b5061033e61064e366004613c98565b6114df565b34801561065f57600080fd5b5061033e61066e366004613ce1565b611519565b34801561067f57600080fd5b5061038261068e366004613a20565b611583565b34801561069f57600080fd5b506103556115fa565b3480156106b457600080fd5b506103096106c3366004613b9a565b600f6020526000908152604090205460ff1681565b3480156106e457600080fd5b5061033e6106f3366004613d16565b611688565b34801561070457600080fd5b506103af610713366004613b9a565b611863565b34801561072457600080fd5b5061033e6118ea565b34801561073957600080fd5b5061033e610748366004613b9a565b611920565b34801561075957600080fd5b506013546103829061010090046001600160a01b031681565b34801561077e57600080fd5b5061033e61078d366004613d36565b611998565b34801561079e57600080fd5b506013546107ac9060ff1681565b6040516103159190613d85565b3480156107c557600080fd5b50600a546001600160a01b0316610382565b3480156107e357600080fd5b50610355611a13565b3480156107f857600080fd5b5061033e610807366004613dad565b611a22565b34801561081857600080fd5b5061033e610827366004613d36565b611a5e565b34801561083857600080fd5b5061033e610847366004613e01565b611a69565b34801561085857600080fd5b5061033e610867366004613ea7565b611b2e565b34801561087857600080fd5b5061033e610887366004613f73565b611b60565b34801561089857600080fd5b506103556108a7366004613a20565b611cb3565b3480156108b857600080fd5b5061033e6108c7366004614037565b611d8e565b3480156108d857600080fd5b506103af6108e7366004613a20565b611edf565b3480156108f857600080fd5b5061033e610907366004613a39565b611f29565b34801561091857600080fd5b5061033e61092736600461405a565b611f83565b34801561093857600080fd5b506103af600d5481565b34801561094e57600080fd5b5061030961095d366004614077565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561099757600080fd5b50610355611fc0565b3480156109ac57600080fd5b506103af6109bb366004613b9a565b611fcd565b3480156109cc57600080fd5b5061033e6109db366004613b9a565b612047565b3480156109ec57600080fd5b5061033e6109fb366004613c98565b6120e2565b348015610a0c57600080fd5b5061033e610a1b366004613a20565b612118565b60006001600160e01b0319821663780e9d6360e01b1480610a455750610a45826121ad565b92915050565b600a546001600160a01b03163314610a7e5760405162461bcd60e51b8152600401610a75906140a5565b60405180910390fd5b6001600160a01b038316610aa45760405162461bcd60e51b8152600401610a75906140da565b610ab86001600160a01b03821684846121fd565b505050565b606060008054610acc90614103565b80601f0160208091040260200160405190810160405280929190818152602001828054610af890614103565b8015610b455780601f10610b1a57610100808354040283529160200191610b45565b820191906000526020600020905b815481529060010190602001808311610b2857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610bc85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a75565b506000908152600460205260409020546001600160a01b031690565b600080601360019054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190614151565b509195945050505050565b6000610c7482611583565b9050806001600160a01b0316836001600160a01b031603610ce15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a75565b336001600160a01b0382161480610cfd5750610cfd813361095d565b610d6f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a75565b610ab88383612260565b610d8333826122ce565b610d9f5760405162461bcd60e51b8152600401610a75906141a1565b610ab88383836123c5565b6000610db583611863565b8210610e175760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a75565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b5403610e625760405162461bcd60e51b8152600401610a75906141f2565b6002600b8190558060135460ff166002811115610e8157610e81613d6f565b14610e9e5760405162461bcd60e51b8152600401610a7590614229565b8333610eb06040830160208401613b9a565b6001600160a01b031614610ed65760405162461bcd60e51b8152600401610a7590614259565b803560009081526012602052604090205460ff1615610f305760405162461bcd60e51b81526020600482015260166024820152751cda59db985d1d5c9948185b1c9958591e481d5cd95960521b6044820152606401610a75565b60008135610f446040840160208501613b9a565b604051602001610f679291909182526001600160a01b0316602082015260400190565b6040516020818303038152906040528051906020012090506000610fa782846040016020810190610f989190614293565b85606001358660800135612570565b6011549091506001600160a01b03808316911614610fd75760405162461bcd60e51b8152600401610a7590614259565b82356000908152601260205260409020805460ff1916600117905563ffffffff851661100287611edf565b61100c91906142c6565b3481111561105c5760405162461bcd60e51b815260206004820152601f60248201527f65746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a75565b600061106788612598565b9050611075338989846125cd565b50506001600b5550505050505050565b6002600b54036110a75760405162461bcd60e51b8152600401610a75906141f2565b6002600b55600a546001600160a01b031633146110d65760405162461bcd60e51b8152600401610a75906140a5565b60006110e183612598565b90506110ef848484846125cd565b50506001600b555050565b6002600b540361111c5760405162461bcd60e51b8152600401610a75906141f2565b6002600b8190558060135460ff16600281111561113b5761113b613d6f565b146111585760405162461bcd60e51b8152600401610a7590614229565b843361116a6040830160208401613b9a565b6001600160a01b0316146111905760405162461bcd60e51b8152600401610a7590614259565b803560009081526012602052604090205460ff16156111ea5760405162461bcd60e51b81526020600482015260166024820152751cda59db985d1d5c9948185b1c9958591e481d5cd95960521b6044820152606401610a75565b600081356111fe6040840160208501613b9a565b6040516020016112219291909182526001600160a01b0316602082015260400190565b604051602081830303815290604052805190602001209050600061125282846040016020810190610f989190614293565b6011549091506001600160a01b038083169116146112825760405162461bcd60e51b8152600401610a7590614259565b82356000908152601260205260408120805460ff191660011790556112a688612598565b90506112b986828963ffffffff16612747565b611075338989846125cd565b600a546001600160a01b031633146112ef5760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166113155760405162461bcd60e51b8152600401610a75906140da565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b610ab883838360405180602001604052806000815250611b2e565b600a546001600160a01b0316331461137c5760405162461bcd60e51b8152600401610a75906140a5565b600d54821061139d5760405162461bcd60e51b8152600401610a75906142dd565b6000918252600c6020526040909120805465ffffffffffff909216600160a01b0265ffffffffffff60a01b19909216919091179055565b60006113df60085490565b82106114425760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a75565b600882815481106114555761145561430a565b90600052602060002001549050919050565b600a546001600160a01b031633146114915760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166114b75760405162461bcd60e51b8152600401610a75906140da565b601080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600a546001600160a01b031633146115095760405162461bcd60e51b8152600401610a75906140a5565b60146115158282614366565b5050565b6002600b540361153b5760405162461bcd60e51b8152600401610a75906141f2565b6002600b55600a546001600160a01b0316331461156a5760405162461bcd60e51b8152600401610a75906140a5565b600061157583612598565b90506110ef8484848461285f565b6000818152600260205260408120546001600160a01b031680610a455760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a75565b6014805461160790614103565b80601f016020809104026020016040519081016040528092919081815260200182805461163390614103565b80156116805780601f1061165557610100808354040283529160200191611680565b820191906000526020600020905b81548152906001019060200180831161166357829003601f168201915b505050505081565b6002600b54036116aa5760405162461bcd60e51b8152600401610a75906141f2565b6002600b5560008060135460ff1660028111156116c9576116c9613d6f565b036116e65760405162461bcd60e51b8152600401610a7590614229565b8161170c81602001356000908152600260205260409020546001600160a01b0316151590565b156117505760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481b5a5b9d195960621b6044820152606401610a75565b336117616060830160408401613b9a565b6001600160a01b0316146117875760405162461bcd60e51b8152600401610a7590614259565b6000813560208301356117a06060850160408601613b9a565b6040805160208101949094528301919091526001600160a01b0316606082015260800160408051601f19818403018152919052805160209091012090506000611802826117f36080860160608701614293565b85608001358660a00135612570565b6010549091506001600160a01b0380831661010090920416146118375760405162461bcd60e51b8152600401610a7590614259565b60006118438635612598565b905061185633873560208901358461285f565b50506001600b5550505050565b60006001600160a01b0382166118ce5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a75565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119145760405162461bcd60e51b8152600401610a75906140a5565b61191e60006128aa565b565b600a546001600160a01b0316331461194a5760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166119705760405162461bcd60e51b8152600401610a75906140da565b601380546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600a546001600160a01b031633146119c25760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0382166119e85760405162461bcd60e51b8152600401610a75906140da565b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b606060018054610acc90614103565b600a546001600160a01b03163314611a4c5760405162461bcd60e51b8152600401610a75906140a5565b611a58848484846128fc565b50505050565b611515338383612a8b565b60005b815181101561151557611a9833838381518110611a8b57611a8b61430a565b60200260200101516122ce565b611afa5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610a75565b611b1c828281518110611b0f57611b0f61430a565b6020026020010151612b59565b80611b2681614426565b915050611a6c565b611b3833836122ce565b611b545760405162461bcd60e51b8152600401610a75906141a1565b611a5884848484612c00565b600a546001600160a01b03163314611b8a5760405162461bcd60e51b8152600401610a75906140a5565b868514611ba95760405162461bcd60e51b8152600401610a759061443f565b868314611bc85760405162461bcd60e51b8152600401610a759061443f565b868114611be75760405162461bcd60e51b8152600401610a759061443f565b60005b87811015611ca857611c96898983818110611c0757611c0761430a565b9050602002016020810190611c1c9190614467565b888884818110611c2e57611c2e61430a565b9050602002016020810190611c439190614467565b878785818110611c5557611c5561430a565b9050602002016020810190611c6a9190614482565b868686818110611c7c57611c7c61430a565b9050602002016020810190611c919190614482565b6128fc565b80611ca081614426565b915050611bea565b505050505050505050565b6000818152600260205260409020546060906001600160a01b0316611d325760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a75565b6000611d3c612c33565b90506000815111611d5c5760405180602001604052806000815250611d87565b80611d6684612c5b565b604051602001611d7792919061449d565b6040516020818303038152906040525b9392505050565b600a546001600160a01b03163314611db85760405162461bcd60e51b8152600401610a75906140a5565b600d548210611dd95760405162461bcd60e51b8152600401610a75906142dd565b6000828152600c602052604090208054611e0a9063ffffffff600160601b82048116916401000000009004166144cc565b63ffffffff168263ffffffff161115611e5c5760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a590818db185a5b48185b5bdd5b9d60621b6044820152606401610a75565b805463ffffffff600160801b90910481169083161015611eb55760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a590818db185a5b48185b5bdd5b9d60621b6044820152606401610a75565b805463ffffffff909216600160401b026bffffffff00000000000000001990921691909117905550565b600080611eea610be4565b6000848152600c60205260409020549091508190611f1f90600160a01b900465ffffffffffff16670de0b6b3a76400006142c6565b611d8791906144ff565b600a546001600160a01b03163314611f535760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b038216611f795760405162461bcd60e51b8152600401610a75906140da565b6115158282612d5c565b600a546001600160a01b03163314611fad5760405162461bcd60e51b8152600401610a75906140a5565b6010805460ff1916911515919091179055565b6015805461160790614103565b600080805b611fdb84611863565b811015612040576000611fee8583610daa565b6000818152600e6020908152604080832054808452600c909252909120549192509061202990600160d01b900465ffffffffffff1685614513565b93505050808061203890614426565b915050611fd2565b5092915050565b600a546001600160a01b031633146120715760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166120d65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a75565b6120df816128aa565b50565b600a546001600160a01b0316331461210c5760405162461bcd60e51b8152600401610a75906140a5565b60156115158282614366565b600a546001600160a01b031633146121425760405162461bcd60e51b8152600401610a75906140a5565b600381106121625760405162461bcd60e51b8152600401610a7590614229565b8060000361218257601380546000919060ff19166001835b021790555050565b8060010361219d57601380546001919060ff1916828061217a565b506013805460ff19166002179055565b60006001600160e01b031982166380ac58cd60e01b14806121de57506001600160e01b03198216635b5e139f60e01b145b80610a4557506301ffc9a760e01b6001600160e01b0319831614610a45565b6040516001600160a01b038316602482015260448101829052610ab890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612e75565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061229582611583565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166123475760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a75565b600061235283611583565b9050806001600160a01b0316846001600160a01b0316148061238d5750836001600160a01b031661238284610b4f565b6001600160a01b0316145b806123bd57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166123d882611583565b6001600160a01b0316146124405760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a75565b6001600160a01b0382166124a25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a75565b6124ad838383612f47565b6124b8600082612260565b6001600160a01b03831660009081526003602052604081208054600192906124e1908490614526565b90915550506001600160a01b038216600090815260036020526040812080546001929061250f908490614513565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080600061258187878787612fff565b9150915061258e816130ec565b5095945050505050565b6000600d5482106125bb5760405162461bcd60e51b8152600401610a75906142dd565b506000908152600c6020526040902090565b60008263ffffffff16116126165760405162461bcd60e51b815260206004820152601060248201526f696e76616c6964207175616e7469747960801b6044820152606401610a75565b80546126399063ffffffff600160401b82048116916401000000009004166144cc565b815463ffffffff91821691612658918591600160601b90910416614539565b63ffffffff1611156126975760405162461bcd60e51b81526020600482015260086024820152671cdbdb19081bdd5d60c21b6044820152606401610a75565b8054600160601b900463ffffffff168282600c6126b48385614539565b92506101000a81548163ffffffff021916908363ffffffff16021790555060005b8363ffffffff1681101561273f578254600090829084906127059063ffffffff600160401b820481169116614539565b63ffffffff166127159190614513565b61271f9190614513565b905061272c8787836132a2565b508061273781614426565b9150506126d5565b505050505050565b6001600160a01b0383166000908152600f602052604090205460ff166127a45760405162461bcd60e51b81526020600482015260126024820152711d1bdad95b881b9bdd08185c1c1c9bdd995960721b6044820152606401610a75565b60006305f5e100846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061280d9190614556565b61281890600a614657565b8454612834908590600160a01b900465ffffffffffff166142c6565b61283e91906142c6565b61284891906144ff565b9050611a586001600160a01b038516333084613362565b80546001908290601090612881908490600160801b900463ffffffff16614539565b92506101000a81548163ffffffff021916908363ffffffff160217905550611a588484846132a2565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600d546001901561294f576000600c60006001600d5461291c9190614526565b81526020810191909152604001600020805490915061294b9063ffffffff640100000000820481169116614539565b9150505b6040805160e08101825263ffffffff808416825287811660208084019182528883168486019081526000606086018181526080870182815265ffffffffffff808d1660a08a019081528c821660c08b01908152600d80548752600c9098529a852099518a54985196519451935191519b518316600160d01b026001600160d01b039c909316600160a01b0265ffffffffffff60a01b19928b16600160801b029290921669ffffffffffffffffffff60801b19948b16600160601b0263ffffffff60601b19968c16600160401b02969096166fffffffffffffffff000000000000000019988c166401000000000267ffffffffffffffff19909b1692909b169190911798909817959095169790971791909117169390931717949094169190911790915581549190612a7f83614426565b91905055505050505050565b816001600160a01b0316836001600160a01b031603612aec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a75565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000612b6482611583565b9050612b7281600084612f47565b612b7d600083612260565b6001600160a01b0381166000908152600360205260408120805460019290612ba6908490614526565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612c0b8484846123c5565b612c178484848461339a565b611a585760405162461bcd60e51b8152600401610a7590614666565b60105460609060ff1615612c4e5760148054610acc90614103565b60158054610acc90614103565b606081600003612c825750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612cac5780612c9681614426565b9150612ca59050600a836144ff565b9150612c86565b60008167ffffffffffffffff811115612cc757612cc7613bf9565b6040519080825280601f01601f191660200182016040528015612cf1576020820181803683370190505b5090505b84156123bd57612d06600183614526565b9150612d13600a866146b8565b612d1e906030614513565b60f81b818381518110612d3357612d3361430a565b60200101906001600160f81b031916908160001a905350612d55600a866144ff565b9450612cf5565b80471015612dac5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a75565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612df9576040519150601f19603f3d011682016040523d82523d6000602084013e612dfe565b606091505b5050905080610ab85760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a75565b6000612eca826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134989092919063ffffffff16565b805190915015610ab85780806020019051810190612ee891906146cc565b610ab85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a75565b6001600160a01b038316612fa257612f9d81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612fc5565b816001600160a01b0316836001600160a01b031614612fc557612fc583826134a7565b6001600160a01b038216612fdc57610ab881613544565b826001600160a01b0316826001600160a01b031614610ab857610ab882826135f3565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561303657506000905060036130e3565b8460ff16601b1415801561304e57508460ff16601c14155b1561305f57506000905060046130e3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156130b3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166130dc576000600192509250506130e3565b9150600090505b94509492505050565b600081600481111561310057613100613d6f565b036131085750565b600181600481111561311c5761311c613d6f565b036131695760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a75565b600281600481111561317d5761317d613d6f565b036131ca5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a75565b60038160048111156131de576131de613d6f565b036132365760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a75565b600481600481111561324a5761324a613d6f565b036120df5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a75565b600d5482106132c35760405162461bcd60e51b8152600401610a75906142dd565b6000828152600c60205260409020805463ffffffff168210801590613308575080546132ff9063ffffffff640100000000820481169116614539565b63ffffffff1682105b6133475760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b881a5960821b6044820152606401610a75565b6000828152600e60205260409020839055611a588483613637565b6040516001600160a01b0380851660248301528316604482015260648101829052611a589085906323b872dd60e01b90608401612229565b60006001600160a01b0384163b1561349057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906133de9033908990889088906004016146e9565b6020604051808303816000875af1925050508015613419575060408051601f3d908101601f1916820190925261341691810190614726565b60015b613476573d808015613447576040519150601f19603f3d011682016040523d82523d6000602084013e61344c565b606091505b50805160000361346e5760405162461bcd60e51b8152600401610a7590614666565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123bd565b5060016123bd565b60606123bd8484600085613651565b600060016134b484611863565b6134be9190614526565b600083815260076020526040902054909150808214613511576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061355690600190614526565b6000838152600960205260408120546008805493945090928490811061357e5761357e61430a565b90600052602060002001549050806008838154811061359f5761359f61430a565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806135d7576135d7614743565b6001900381819060005260206000200160009055905550505050565b60006135fe83611863565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b611515828260405180602001604052806000815250613779565b6060824710156136b25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a75565b843b6137005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a75565b600080866001600160a01b0316858760405161371c9190614759565b60006040518083038185875af1925050503d8060008114613759576040519150601f19603f3d011682016040523d82523d6000602084013e61375e565b606091505b509150915061376e8282866137ac565b979650505050505050565b61378383836137e5565b613790600084848461339a565b610ab85760405162461bcd60e51b8152600401610a7590614666565b606083156137bb575081611d87565b8251156137cb5782518084602001fd5b8160405162461bcd60e51b8152600401610a759190613a0d565b6001600160a01b03821661383b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a75565b6000818152600260205260409020546001600160a01b0316156138a05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a75565b6138ac60008383612f47565b6001600160a01b03821660009081526003602052604081208054600192906138d5908490614513565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b0319811681146120df57600080fd5b60006020828403121561395b57600080fd5b8135611d8781613933565b6001600160a01b03811681146120df57600080fd5b60008060006060848603121561399057600080fd5b833561399b81613966565b92506020840135915060408401356139b281613966565b809150509250925092565b60005b838110156139d85781810151838201526020016139c0565b50506000910152565b600081518084526139f98160208601602086016139bd565b601f01601f19169290920160200192915050565b602081526000611d8760208301846139e1565b600060208284031215613a3257600080fd5b5035919050565b60008060408385031215613a4c57600080fd5b8235613a5781613966565b946020939093013593505050565b600080600060608486031215613a7a57600080fd5b8335613a8581613966565b92506020840135613a9581613966565b929592945050506040919091013590565b600060a08284031215613ab857600080fd5b50919050565b803563ffffffff81168114613ad257600080fd5b919050565b600080600060e08486031215613aec57600080fd5b613af68585613aa6565b925060a08401359150613b0b60c08501613abe565b90509250925092565b600080600060608486031215613b2957600080fd5b8335613b3481613966565b925060208401359150613b0b60408501613abe565b6000806000806101008587031215613b6057600080fd5b613b6a8686613aa6565b935060a08501359250613b7f60c08601613abe565b915060e0850135613b8f81613966565b939692955090935050565b600060208284031215613bac57600080fd5b8135611d8781613966565b803565ffffffffffff81168114613ad257600080fd5b60008060408385031215613be057600080fd5b82359150613bf060208401613bb7565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613c3857613c38613bf9565b604052919050565b600067ffffffffffffffff831115613c5a57613c5a613bf9565b613c6d601f8401601f1916602001613c0f565b9050828152838383011115613c8157600080fd5b828260208301376000602084830101529392505050565b600060208284031215613caa57600080fd5b813567ffffffffffffffff811115613cc157600080fd5b8201601f81018413613cd257600080fd5b6123bd84823560208401613c40565b600080600060608486031215613cf657600080fd5b8335613d0181613966565b95602085013595506040909401359392505050565b600060c08284031215613ab857600080fd5b80151581146120df57600080fd5b60008060408385031215613d4957600080fd5b8235613d5481613966565b91506020830135613d6481613d28565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613da757634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060808587031215613dc357600080fd5b613dcc85613abe565b9350613dda60208601613abe565b9250613de860408601613bb7565b9150613df660608601613bb7565b905092959194509250565b60006020808385031215613e1457600080fd5b823567ffffffffffffffff80821115613e2c57600080fd5b818501915085601f830112613e4057600080fd5b813581811115613e5257613e52613bf9565b8060051b9150613e63848301613c0f565b8181529183018401918481019088841115613e7d57600080fd5b938501935b83851015613e9b57843582529385019390850190613e82565b98975050505050505050565b60008060008060808587031215613ebd57600080fd5b8435613ec881613966565b93506020850135613ed881613966565b925060408501359150606085013567ffffffffffffffff811115613efb57600080fd5b8501601f81018713613f0c57600080fd5b613f1b87823560208401613c40565b91505092959194509250565b60008083601f840112613f3957600080fd5b50813567ffffffffffffffff811115613f5157600080fd5b6020830191508360208260051b8501011115613f6c57600080fd5b9250929050565b6000806000806000806000806080898b031215613f8f57600080fd5b883567ffffffffffffffff80821115613fa757600080fd5b613fb38c838d01613f27565b909a50985060208b0135915080821115613fcc57600080fd5b613fd88c838d01613f27565b909850965060408b0135915080821115613ff157600080fd5b613ffd8c838d01613f27565b909650945060608b013591508082111561401657600080fd5b506140238b828c01613f27565b999c989b5096995094979396929594505050565b6000806040838503121561404a57600080fd5b82359150613bf060208401613abe565b60006020828403121561406c57600080fd5b8135611d8781613d28565b6000806040838503121561408a57600080fd5b823561409581613966565b91506020830135613d6481613966565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b600181811c9082168061411757607f821691505b602082108103613ab857634e487b7160e01b600052602260045260246000fd5b805169ffffffffffffffffffff81168114613ad257600080fd5b600080600080600060a0868803121561416957600080fd5b61417286614137565b945060208601519350604086015192506060860151915061419560808701614137565b90509295509295909350565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260169082015275696e76616c696420636f6e747261637420737461746560501b604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b60ff811681146120df57600080fd5b6000602082840312156142a557600080fd5b8135611d8781614284565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a4557610a456142b0565b6020808252601390820152721a5b9d985b1a5908189d5a5b191a5b99c81a59606a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b601f821115610ab857600081815260208120601f850160051c810160208610156143475750805b601f850160051c820191505b8181101561273f57828155600101614353565b815167ffffffffffffffff81111561438057614380613bf9565b6143948161438e8454614103565b84614320565b602080601f8311600181146143c957600084156143b15750858301515b600019600386901b1c1916600185901b17855561273f565b600085815260208120601f198616915b828110156143f8578886015182559484019460019091019084016143d9565b50858210156144165787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201614438576144386142b0565b5060010190565b6020808252600e908201526d0d2dcecc2d8d2c840d8cadccee8d60931b604082015260600190565b60006020828403121561447957600080fd5b611d8782613abe565b60006020828403121561449457600080fd5b611d8782613bb7565b600083516144af8184602088016139bd565b8351908301906144c38183602088016139bd565b01949350505050565b63ffffffff828116828216039080821115612040576120406142b0565b634e487b7160e01b600052601260045260246000fd5b60008261450e5761450e6144e9565b500490565b80820180821115610a4557610a456142b0565b81810381811115610a4557610a456142b0565b63ffffffff818116838216019080821115612040576120406142b0565b60006020828403121561456857600080fd5b8151611d8781614284565b600181815b808511156145ae578160001904821115614594576145946142b0565b808516156145a157918102915b93841c9390800290614578565b509250929050565b6000826145c557506001610a45565b816145d257506000610a45565b81600181146145e857600281146145f25761460e565b6001915050610a45565b60ff841115614603576146036142b0565b50506001821b610a45565b5060208310610133831016604e8410600b8410161715614631575081810a610a45565b61463b8383614573565b806000190482111561464f5761464f6142b0565b029392505050565b6000611d8760ff8416836145b6565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826146c7576146c76144e9565b500690565b6000602082840312156146de57600080fd5b8151611d8781613d28565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061471c908301846139e1565b9695505050505050565b60006020828403121561473857600080fd5b8151611d8781613933565b634e487b7160e01b600052603160045260246000fd5b6000825161476b8184602087016139bd565b919091019291505056fea26469706673582212206d3886a1cb2ed0f6816daa8aaa3b0c3aa3d9b3bc1c9a7ee699fd1a32e657c0a864736f6c63430008120033
Deployed Bytecode
0x6080604052600436106102e45760003560e01c8063701dc23111610190578063c723e2db116100dc578063e24d4a6b11610095578063ee204abb1161006f578063ee204abb146109a0578063f2fde38b146109c0578063f38ade9b146109e0578063fb7265ff14610a0057600080fd5b8063e24d4a6b1461092c578063e985e9c514610942578063eb6ac8e11461098b57600080fd5b8063c723e2db1461086c578063c87b56dd1461088c578063cdd88292146108ac578063d3a7520c146108cc578063d9c88e14146108ec578063e0a808531461090c57600080fd5b806385209ee0116101495780639c06a840116101235780639c06a840146107ec578063a22cb4651461080c578063b80f55c91461082c578063b88d4fde1461084c57600080fd5b806385209ee0146107925780638da5cb5b146107b957806395d89b41146107d757600080fd5b8063701dc231146106d857806370a08231146106f8578063715018a614610718578063724e78da1461072d578063741bef1a1461074d5780637e6a34001461077257600080fd5b806336626d9f1161024f57806354214f69116102085780635dbc3135116101e25780635dbc3135146106535780636352211e146106735780636c0360eb146106935780636d1ea3fa146106a857600080fd5b806354214f69146105f9578063549ec98b1461061357806355f804b31461063357600080fd5b806336626d9f146104925780633d3a2ed1146104b257806342842e0e146104d257806343660be9146104f25780634c96a062146105125780634f6ccce7146105d957600080fd5b80630cb0feaa116102a15780630cb0feaa146103dd57806318160ddd1461040a57806323b872dd1461041f5780632f745c591461043f5780633000be661461045f57806335b244911461047257600080fd5b806301ffc9a7146102e9578063044edc3c1461031e57806306fdde0314610340578063081812fc14610362578063086b74b91461039a578063095ea7b3146103bd575b600080fd5b3480156102f557600080fd5b50610309610304366004613949565b610a20565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b5061033e61033936600461397b565b610a4b565b005b34801561034c57600080fd5b50610355610abd565b6040516103159190613a0d565b34801561036e57600080fd5b5061038261037d366004613a20565b610b4f565b6040516001600160a01b039091168152602001610315565b3480156103a657600080fd5b506103af610be4565b604051908152602001610315565b3480156103c957600080fd5b5061033e6103d8366004613a39565b610c69565b3480156103e957600080fd5b506103af6103f8366004613a20565b600e6020526000908152604090205481565b34801561041657600080fd5b506008546103af565b34801561042b57600080fd5b5061033e61043a366004613a65565b610d79565b34801561044b57600080fd5b506103af61045a366004613a39565b610daa565b61033e61046d366004613ad7565b610e40565b34801561047e57600080fd5b5061033e61048d366004613b14565b611085565b34801561049e57600080fd5b5061033e6104ad366004613b49565b6110fa565b3480156104be57600080fd5b5061033e6104cd366004613b9a565b6112c5565b3480156104de57600080fd5b5061033e6104ed366004613a65565b611337565b3480156104fe57600080fd5b5061033e61050d366004613bcd565b611352565b34801561051e57600080fd5b5061058961052d366004613a20565b600c6020526000908152604090205463ffffffff808216916401000000008104821691600160401b8204811691600160601b8104821691600160801b8204169065ffffffffffff600160a01b8204811691600160d01b90041687565b6040805163ffffffff98891681529688166020880152948716948601949094529185166060850152909316608083015265ffffffffffff92831660a08301529190911660c082015260e001610315565b3480156105e557600080fd5b506103af6105f4366004613a20565b6113d4565b34801561060557600080fd5b506010546103099060ff1681565b34801561061f57600080fd5b5061033e61062e366004613b9a565b611467565b34801561063f57600080fd5b5061033e61064e366004613c98565b6114df565b34801561065f57600080fd5b5061033e61066e366004613ce1565b611519565b34801561067f57600080fd5b5061038261068e366004613a20565b611583565b34801561069f57600080fd5b506103556115fa565b3480156106b457600080fd5b506103096106c3366004613b9a565b600f6020526000908152604090205460ff1681565b3480156106e457600080fd5b5061033e6106f3366004613d16565b611688565b34801561070457600080fd5b506103af610713366004613b9a565b611863565b34801561072457600080fd5b5061033e6118ea565b34801561073957600080fd5b5061033e610748366004613b9a565b611920565b34801561075957600080fd5b506013546103829061010090046001600160a01b031681565b34801561077e57600080fd5b5061033e61078d366004613d36565b611998565b34801561079e57600080fd5b506013546107ac9060ff1681565b6040516103159190613d85565b3480156107c557600080fd5b50600a546001600160a01b0316610382565b3480156107e357600080fd5b50610355611a13565b3480156107f857600080fd5b5061033e610807366004613dad565b611a22565b34801561081857600080fd5b5061033e610827366004613d36565b611a5e565b34801561083857600080fd5b5061033e610847366004613e01565b611a69565b34801561085857600080fd5b5061033e610867366004613ea7565b611b2e565b34801561087857600080fd5b5061033e610887366004613f73565b611b60565b34801561089857600080fd5b506103556108a7366004613a20565b611cb3565b3480156108b857600080fd5b5061033e6108c7366004614037565b611d8e565b3480156108d857600080fd5b506103af6108e7366004613a20565b611edf565b3480156108f857600080fd5b5061033e610907366004613a39565b611f29565b34801561091857600080fd5b5061033e61092736600461405a565b611f83565b34801561093857600080fd5b506103af600d5481565b34801561094e57600080fd5b5061030961095d366004614077565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561099757600080fd5b50610355611fc0565b3480156109ac57600080fd5b506103af6109bb366004613b9a565b611fcd565b3480156109cc57600080fd5b5061033e6109db366004613b9a565b612047565b3480156109ec57600080fd5b5061033e6109fb366004613c98565b6120e2565b348015610a0c57600080fd5b5061033e610a1b366004613a20565b612118565b60006001600160e01b0319821663780e9d6360e01b1480610a455750610a45826121ad565b92915050565b600a546001600160a01b03163314610a7e5760405162461bcd60e51b8152600401610a75906140a5565b60405180910390fd5b6001600160a01b038316610aa45760405162461bcd60e51b8152600401610a75906140da565b610ab86001600160a01b03821684846121fd565b505050565b606060008054610acc90614103565b80601f0160208091040260200160405190810160405280929190818152602001828054610af890614103565b8015610b455780601f10610b1a57610100808354040283529160200191610b45565b820191906000526020600020905b815481529060010190602001808311610b2857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610bc85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a75565b506000908152600460205260409020546001600160a01b031690565b600080601360019054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190614151565b509195945050505050565b6000610c7482611583565b9050806001600160a01b0316836001600160a01b031603610ce15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a75565b336001600160a01b0382161480610cfd5750610cfd813361095d565b610d6f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a75565b610ab88383612260565b610d8333826122ce565b610d9f5760405162461bcd60e51b8152600401610a75906141a1565b610ab88383836123c5565b6000610db583611863565b8210610e175760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a75565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b5403610e625760405162461bcd60e51b8152600401610a75906141f2565b6002600b8190558060135460ff166002811115610e8157610e81613d6f565b14610e9e5760405162461bcd60e51b8152600401610a7590614229565b8333610eb06040830160208401613b9a565b6001600160a01b031614610ed65760405162461bcd60e51b8152600401610a7590614259565b803560009081526012602052604090205460ff1615610f305760405162461bcd60e51b81526020600482015260166024820152751cda59db985d1d5c9948185b1c9958591e481d5cd95960521b6044820152606401610a75565b60008135610f446040840160208501613b9a565b604051602001610f679291909182526001600160a01b0316602082015260400190565b6040516020818303038152906040528051906020012090506000610fa782846040016020810190610f989190614293565b85606001358660800135612570565b6011549091506001600160a01b03808316911614610fd75760405162461bcd60e51b8152600401610a7590614259565b82356000908152601260205260409020805460ff1916600117905563ffffffff851661100287611edf565b61100c91906142c6565b3481111561105c5760405162461bcd60e51b815260206004820152601f60248201527f65746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a75565b600061106788612598565b9050611075338989846125cd565b50506001600b5550505050505050565b6002600b54036110a75760405162461bcd60e51b8152600401610a75906141f2565b6002600b55600a546001600160a01b031633146110d65760405162461bcd60e51b8152600401610a75906140a5565b60006110e183612598565b90506110ef848484846125cd565b50506001600b555050565b6002600b540361111c5760405162461bcd60e51b8152600401610a75906141f2565b6002600b8190558060135460ff16600281111561113b5761113b613d6f565b146111585760405162461bcd60e51b8152600401610a7590614229565b843361116a6040830160208401613b9a565b6001600160a01b0316146111905760405162461bcd60e51b8152600401610a7590614259565b803560009081526012602052604090205460ff16156111ea5760405162461bcd60e51b81526020600482015260166024820152751cda59db985d1d5c9948185b1c9958591e481d5cd95960521b6044820152606401610a75565b600081356111fe6040840160208501613b9a565b6040516020016112219291909182526001600160a01b0316602082015260400190565b604051602081830303815290604052805190602001209050600061125282846040016020810190610f989190614293565b6011549091506001600160a01b038083169116146112825760405162461bcd60e51b8152600401610a7590614259565b82356000908152601260205260408120805460ff191660011790556112a688612598565b90506112b986828963ffffffff16612747565b611075338989846125cd565b600a546001600160a01b031633146112ef5760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166113155760405162461bcd60e51b8152600401610a75906140da565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b610ab883838360405180602001604052806000815250611b2e565b600a546001600160a01b0316331461137c5760405162461bcd60e51b8152600401610a75906140a5565b600d54821061139d5760405162461bcd60e51b8152600401610a75906142dd565b6000918252600c6020526040909120805465ffffffffffff909216600160a01b0265ffffffffffff60a01b19909216919091179055565b60006113df60085490565b82106114425760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a75565b600882815481106114555761145561430a565b90600052602060002001549050919050565b600a546001600160a01b031633146114915760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166114b75760405162461bcd60e51b8152600401610a75906140da565b601080546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600a546001600160a01b031633146115095760405162461bcd60e51b8152600401610a75906140a5565b60146115158282614366565b5050565b6002600b540361153b5760405162461bcd60e51b8152600401610a75906141f2565b6002600b55600a546001600160a01b0316331461156a5760405162461bcd60e51b8152600401610a75906140a5565b600061157583612598565b90506110ef8484848461285f565b6000818152600260205260408120546001600160a01b031680610a455760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a75565b6014805461160790614103565b80601f016020809104026020016040519081016040528092919081815260200182805461163390614103565b80156116805780601f1061165557610100808354040283529160200191611680565b820191906000526020600020905b81548152906001019060200180831161166357829003601f168201915b505050505081565b6002600b54036116aa5760405162461bcd60e51b8152600401610a75906141f2565b6002600b5560008060135460ff1660028111156116c9576116c9613d6f565b036116e65760405162461bcd60e51b8152600401610a7590614229565b8161170c81602001356000908152600260205260409020546001600160a01b0316151590565b156117505760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481b5a5b9d195960621b6044820152606401610a75565b336117616060830160408401613b9a565b6001600160a01b0316146117875760405162461bcd60e51b8152600401610a7590614259565b6000813560208301356117a06060850160408601613b9a565b6040805160208101949094528301919091526001600160a01b0316606082015260800160408051601f19818403018152919052805160209091012090506000611802826117f36080860160608701614293565b85608001358660a00135612570565b6010549091506001600160a01b0380831661010090920416146118375760405162461bcd60e51b8152600401610a7590614259565b60006118438635612598565b905061185633873560208901358461285f565b50506001600b5550505050565b60006001600160a01b0382166118ce5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a75565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119145760405162461bcd60e51b8152600401610a75906140a5565b61191e60006128aa565b565b600a546001600160a01b0316331461194a5760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166119705760405162461bcd60e51b8152600401610a75906140da565b601380546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600a546001600160a01b031633146119c25760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0382166119e85760405162461bcd60e51b8152600401610a75906140da565b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b606060018054610acc90614103565b600a546001600160a01b03163314611a4c5760405162461bcd60e51b8152600401610a75906140a5565b611a58848484846128fc565b50505050565b611515338383612a8b565b60005b815181101561151557611a9833838381518110611a8b57611a8b61430a565b60200260200101516122ce565b611afa5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610a75565b611b1c828281518110611b0f57611b0f61430a565b6020026020010151612b59565b80611b2681614426565b915050611a6c565b611b3833836122ce565b611b545760405162461bcd60e51b8152600401610a75906141a1565b611a5884848484612c00565b600a546001600160a01b03163314611b8a5760405162461bcd60e51b8152600401610a75906140a5565b868514611ba95760405162461bcd60e51b8152600401610a759061443f565b868314611bc85760405162461bcd60e51b8152600401610a759061443f565b868114611be75760405162461bcd60e51b8152600401610a759061443f565b60005b87811015611ca857611c96898983818110611c0757611c0761430a565b9050602002016020810190611c1c9190614467565b888884818110611c2e57611c2e61430a565b9050602002016020810190611c439190614467565b878785818110611c5557611c5561430a565b9050602002016020810190611c6a9190614482565b868686818110611c7c57611c7c61430a565b9050602002016020810190611c919190614482565b6128fc565b80611ca081614426565b915050611bea565b505050505050505050565b6000818152600260205260409020546060906001600160a01b0316611d325760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a75565b6000611d3c612c33565b90506000815111611d5c5760405180602001604052806000815250611d87565b80611d6684612c5b565b604051602001611d7792919061449d565b6040516020818303038152906040525b9392505050565b600a546001600160a01b03163314611db85760405162461bcd60e51b8152600401610a75906140a5565b600d548210611dd95760405162461bcd60e51b8152600401610a75906142dd565b6000828152600c602052604090208054611e0a9063ffffffff600160601b82048116916401000000009004166144cc565b63ffffffff168263ffffffff161115611e5c5760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a590818db185a5b48185b5bdd5b9d60621b6044820152606401610a75565b805463ffffffff600160801b90910481169083161015611eb55760405162461bcd60e51b81526020600482015260146024820152731a5b9d985b1a590818db185a5b48185b5bdd5b9d60621b6044820152606401610a75565b805463ffffffff909216600160401b026bffffffff00000000000000001990921691909117905550565b600080611eea610be4565b6000848152600c60205260409020549091508190611f1f90600160a01b900465ffffffffffff16670de0b6b3a76400006142c6565b611d8791906144ff565b600a546001600160a01b03163314611f535760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b038216611f795760405162461bcd60e51b8152600401610a75906140da565b6115158282612d5c565b600a546001600160a01b03163314611fad5760405162461bcd60e51b8152600401610a75906140a5565b6010805460ff1916911515919091179055565b6015805461160790614103565b600080805b611fdb84611863565b811015612040576000611fee8583610daa565b6000818152600e6020908152604080832054808452600c909252909120549192509061202990600160d01b900465ffffffffffff1685614513565b93505050808061203890614426565b915050611fd2565b5092915050565b600a546001600160a01b031633146120715760405162461bcd60e51b8152600401610a75906140a5565b6001600160a01b0381166120d65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a75565b6120df816128aa565b50565b600a546001600160a01b0316331461210c5760405162461bcd60e51b8152600401610a75906140a5565b60156115158282614366565b600a546001600160a01b031633146121425760405162461bcd60e51b8152600401610a75906140a5565b600381106121625760405162461bcd60e51b8152600401610a7590614229565b8060000361218257601380546000919060ff19166001835b021790555050565b8060010361219d57601380546001919060ff1916828061217a565b506013805460ff19166002179055565b60006001600160e01b031982166380ac58cd60e01b14806121de57506001600160e01b03198216635b5e139f60e01b145b80610a4557506301ffc9a760e01b6001600160e01b0319831614610a45565b6040516001600160a01b038316602482015260448101829052610ab890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612e75565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061229582611583565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166123475760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a75565b600061235283611583565b9050806001600160a01b0316846001600160a01b0316148061238d5750836001600160a01b031661238284610b4f565b6001600160a01b0316145b806123bd57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166123d882611583565b6001600160a01b0316146124405760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a75565b6001600160a01b0382166124a25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a75565b6124ad838383612f47565b6124b8600082612260565b6001600160a01b03831660009081526003602052604081208054600192906124e1908490614526565b90915550506001600160a01b038216600090815260036020526040812080546001929061250f908490614513565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080600061258187878787612fff565b9150915061258e816130ec565b5095945050505050565b6000600d5482106125bb5760405162461bcd60e51b8152600401610a75906142dd565b506000908152600c6020526040902090565b60008263ffffffff16116126165760405162461bcd60e51b815260206004820152601060248201526f696e76616c6964207175616e7469747960801b6044820152606401610a75565b80546126399063ffffffff600160401b82048116916401000000009004166144cc565b815463ffffffff91821691612658918591600160601b90910416614539565b63ffffffff1611156126975760405162461bcd60e51b81526020600482015260086024820152671cdbdb19081bdd5d60c21b6044820152606401610a75565b8054600160601b900463ffffffff168282600c6126b48385614539565b92506101000a81548163ffffffff021916908363ffffffff16021790555060005b8363ffffffff1681101561273f578254600090829084906127059063ffffffff600160401b820481169116614539565b63ffffffff166127159190614513565b61271f9190614513565b905061272c8787836132a2565b508061273781614426565b9150506126d5565b505050505050565b6001600160a01b0383166000908152600f602052604090205460ff166127a45760405162461bcd60e51b81526020600482015260126024820152711d1bdad95b881b9bdd08185c1c1c9bdd995960721b6044820152606401610a75565b60006305f5e100846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061280d9190614556565b61281890600a614657565b8454612834908590600160a01b900465ffffffffffff166142c6565b61283e91906142c6565b61284891906144ff565b9050611a586001600160a01b038516333084613362565b80546001908290601090612881908490600160801b900463ffffffff16614539565b92506101000a81548163ffffffff021916908363ffffffff160217905550611a588484846132a2565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600d546001901561294f576000600c60006001600d5461291c9190614526565b81526020810191909152604001600020805490915061294b9063ffffffff640100000000820481169116614539565b9150505b6040805160e08101825263ffffffff808416825287811660208084019182528883168486019081526000606086018181526080870182815265ffffffffffff808d1660a08a019081528c821660c08b01908152600d80548752600c9098529a852099518a54985196519451935191519b518316600160d01b026001600160d01b039c909316600160a01b0265ffffffffffff60a01b19928b16600160801b029290921669ffffffffffffffffffff60801b19948b16600160601b0263ffffffff60601b19968c16600160401b02969096166fffffffffffffffff000000000000000019988c166401000000000267ffffffffffffffff19909b1692909b169190911798909817959095169790971791909117169390931717949094169190911790915581549190612a7f83614426565b91905055505050505050565b816001600160a01b0316836001600160a01b031603612aec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a75565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000612b6482611583565b9050612b7281600084612f47565b612b7d600083612260565b6001600160a01b0381166000908152600360205260408120805460019290612ba6908490614526565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612c0b8484846123c5565b612c178484848461339a565b611a585760405162461bcd60e51b8152600401610a7590614666565b60105460609060ff1615612c4e5760148054610acc90614103565b60158054610acc90614103565b606081600003612c825750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612cac5780612c9681614426565b9150612ca59050600a836144ff565b9150612c86565b60008167ffffffffffffffff811115612cc757612cc7613bf9565b6040519080825280601f01601f191660200182016040528015612cf1576020820181803683370190505b5090505b84156123bd57612d06600183614526565b9150612d13600a866146b8565b612d1e906030614513565b60f81b818381518110612d3357612d3361430a565b60200101906001600160f81b031916908160001a905350612d55600a866144ff565b9450612cf5565b80471015612dac5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a75565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612df9576040519150601f19603f3d011682016040523d82523d6000602084013e612dfe565b606091505b5050905080610ab85760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a75565b6000612eca826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134989092919063ffffffff16565b805190915015610ab85780806020019051810190612ee891906146cc565b610ab85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a75565b6001600160a01b038316612fa257612f9d81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612fc5565b816001600160a01b0316836001600160a01b031614612fc557612fc583826134a7565b6001600160a01b038216612fdc57610ab881613544565b826001600160a01b0316826001600160a01b031614610ab857610ab882826135f3565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561303657506000905060036130e3565b8460ff16601b1415801561304e57508460ff16601c14155b1561305f57506000905060046130e3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156130b3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166130dc576000600192509250506130e3565b9150600090505b94509492505050565b600081600481111561310057613100613d6f565b036131085750565b600181600481111561311c5761311c613d6f565b036131695760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a75565b600281600481111561317d5761317d613d6f565b036131ca5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a75565b60038160048111156131de576131de613d6f565b036132365760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a75565b600481600481111561324a5761324a613d6f565b036120df5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a75565b600d5482106132c35760405162461bcd60e51b8152600401610a75906142dd565b6000828152600c60205260409020805463ffffffff168210801590613308575080546132ff9063ffffffff640100000000820481169116614539565b63ffffffff1682105b6133475760405162461bcd60e51b815260206004820152601060248201526f1a5b9d985b1a59081d1bdad95b881a5960821b6044820152606401610a75565b6000828152600e60205260409020839055611a588483613637565b6040516001600160a01b0380851660248301528316604482015260648101829052611a589085906323b872dd60e01b90608401612229565b60006001600160a01b0384163b1561349057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906133de9033908990889088906004016146e9565b6020604051808303816000875af1925050508015613419575060408051601f3d908101601f1916820190925261341691810190614726565b60015b613476573d808015613447576040519150601f19603f3d011682016040523d82523d6000602084013e61344c565b606091505b50805160000361346e5760405162461bcd60e51b8152600401610a7590614666565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123bd565b5060016123bd565b60606123bd8484600085613651565b600060016134b484611863565b6134be9190614526565b600083815260076020526040902054909150808214613511576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061355690600190614526565b6000838152600960205260408120546008805493945090928490811061357e5761357e61430a565b90600052602060002001549050806008838154811061359f5761359f61430a565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806135d7576135d7614743565b6001900381819060005260206000200160009055905550505050565b60006135fe83611863565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b611515828260405180602001604052806000815250613779565b6060824710156136b25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a75565b843b6137005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a75565b600080866001600160a01b0316858760405161371c9190614759565b60006040518083038185875af1925050503d8060008114613759576040519150601f19603f3d011682016040523d82523d6000602084013e61375e565b606091505b509150915061376e8282866137ac565b979650505050505050565b61378383836137e5565b613790600084848461339a565b610ab85760405162461bcd60e51b8152600401610a7590614666565b606083156137bb575081611d87565b8251156137cb5782518084602001fd5b8160405162461bcd60e51b8152600401610a759190613a0d565b6001600160a01b03821661383b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a75565b6000818152600260205260409020546001600160a01b0316156138a05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a75565b6138ac60008383612f47565b6001600160a01b03821660009081526003602052604081208054600192906138d5908490614513565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b0319811681146120df57600080fd5b60006020828403121561395b57600080fd5b8135611d8781613933565b6001600160a01b03811681146120df57600080fd5b60008060006060848603121561399057600080fd5b833561399b81613966565b92506020840135915060408401356139b281613966565b809150509250925092565b60005b838110156139d85781810151838201526020016139c0565b50506000910152565b600081518084526139f98160208601602086016139bd565b601f01601f19169290920160200192915050565b602081526000611d8760208301846139e1565b600060208284031215613a3257600080fd5b5035919050565b60008060408385031215613a4c57600080fd5b8235613a5781613966565b946020939093013593505050565b600080600060608486031215613a7a57600080fd5b8335613a8581613966565b92506020840135613a9581613966565b929592945050506040919091013590565b600060a08284031215613ab857600080fd5b50919050565b803563ffffffff81168114613ad257600080fd5b919050565b600080600060e08486031215613aec57600080fd5b613af68585613aa6565b925060a08401359150613b0b60c08501613abe565b90509250925092565b600080600060608486031215613b2957600080fd5b8335613b3481613966565b925060208401359150613b0b60408501613abe565b6000806000806101008587031215613b6057600080fd5b613b6a8686613aa6565b935060a08501359250613b7f60c08601613abe565b915060e0850135613b8f81613966565b939692955090935050565b600060208284031215613bac57600080fd5b8135611d8781613966565b803565ffffffffffff81168114613ad257600080fd5b60008060408385031215613be057600080fd5b82359150613bf060208401613bb7565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613c3857613c38613bf9565b604052919050565b600067ffffffffffffffff831115613c5a57613c5a613bf9565b613c6d601f8401601f1916602001613c0f565b9050828152838383011115613c8157600080fd5b828260208301376000602084830101529392505050565b600060208284031215613caa57600080fd5b813567ffffffffffffffff811115613cc157600080fd5b8201601f81018413613cd257600080fd5b6123bd84823560208401613c40565b600080600060608486031215613cf657600080fd5b8335613d0181613966565b95602085013595506040909401359392505050565b600060c08284031215613ab857600080fd5b80151581146120df57600080fd5b60008060408385031215613d4957600080fd5b8235613d5481613966565b91506020830135613d6481613d28565b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613da757634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060808587031215613dc357600080fd5b613dcc85613abe565b9350613dda60208601613abe565b9250613de860408601613bb7565b9150613df660608601613bb7565b905092959194509250565b60006020808385031215613e1457600080fd5b823567ffffffffffffffff80821115613e2c57600080fd5b818501915085601f830112613e4057600080fd5b813581811115613e5257613e52613bf9565b8060051b9150613e63848301613c0f565b8181529183018401918481019088841115613e7d57600080fd5b938501935b83851015613e9b57843582529385019390850190613e82565b98975050505050505050565b60008060008060808587031215613ebd57600080fd5b8435613ec881613966565b93506020850135613ed881613966565b925060408501359150606085013567ffffffffffffffff811115613efb57600080fd5b8501601f81018713613f0c57600080fd5b613f1b87823560208401613c40565b91505092959194509250565b60008083601f840112613f3957600080fd5b50813567ffffffffffffffff811115613f5157600080fd5b6020830191508360208260051b8501011115613f6c57600080fd5b9250929050565b6000806000806000806000806080898b031215613f8f57600080fd5b883567ffffffffffffffff80821115613fa757600080fd5b613fb38c838d01613f27565b909a50985060208b0135915080821115613fcc57600080fd5b613fd88c838d01613f27565b909850965060408b0135915080821115613ff157600080fd5b613ffd8c838d01613f27565b909650945060608b013591508082111561401657600080fd5b506140238b828c01613f27565b999c989b5096995094979396929594505050565b6000806040838503121561404a57600080fd5b82359150613bf060208401613abe565b60006020828403121561406c57600080fd5b8135611d8781613d28565b6000806040838503121561408a57600080fd5b823561409581613966565b91506020830135613d6481613966565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b600181811c9082168061411757607f821691505b602082108103613ab857634e487b7160e01b600052602260045260246000fd5b805169ffffffffffffffffffff81168114613ad257600080fd5b600080600080600060a0868803121561416957600080fd5b61417286614137565b945060208601519350604086015192506060860151915061419560808701614137565b90509295509295909350565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260169082015275696e76616c696420636f6e747261637420737461746560501b604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b60ff811681146120df57600080fd5b6000602082840312156142a557600080fd5b8135611d8781614284565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a4557610a456142b0565b6020808252601390820152721a5b9d985b1a5908189d5a5b191a5b99c81a59606a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b601f821115610ab857600081815260208120601f850160051c810160208610156143475750805b601f850160051c820191505b8181101561273f57828155600101614353565b815167ffffffffffffffff81111561438057614380613bf9565b6143948161438e8454614103565b84614320565b602080601f8311600181146143c957600084156143b15750858301515b600019600386901b1c1916600185901b17855561273f565b600085815260208120601f198616915b828110156143f8578886015182559484019460019091019084016143d9565b50858210156144165787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201614438576144386142b0565b5060010190565b6020808252600e908201526d0d2dcecc2d8d2c840d8cadccee8d60931b604082015260600190565b60006020828403121561447957600080fd5b611d8782613abe565b60006020828403121561449457600080fd5b611d8782613bb7565b600083516144af8184602088016139bd565b8351908301906144c38183602088016139bd565b01949350505050565b63ffffffff828116828216039080821115612040576120406142b0565b634e487b7160e01b600052601260045260246000fd5b60008261450e5761450e6144e9565b500490565b80820180821115610a4557610a456142b0565b81810381811115610a4557610a456142b0565b63ffffffff818116838216019080821115612040576120406142b0565b60006020828403121561456857600080fd5b8151611d8781614284565b600181815b808511156145ae578160001904821115614594576145946142b0565b808516156145a157918102915b93841c9390800290614578565b509250929050565b6000826145c557506001610a45565b816145d257506000610a45565b81600181146145e857600281146145f25761460e565b6001915050610a45565b60ff841115614603576146036142b0565b50506001821b610a45565b5060208310610133831016604e8410600b8410161715614631575081810a610a45565b61463b8383614573565b806000190482111561464f5761464f6142b0565b029392505050565b6000611d8760ff8416836145b6565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826146c7576146c76144e9565b500690565b6000602082840312156146de57600080fd5b8151611d8781613d28565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061471c908301846139e1565b9695505050505050565b60006020828403121561473857600080fd5b8151611d8781613933565b634e487b7160e01b600052603160045260246000fd5b6000825161476b8184602087016139bd565b919091019291505056fea26469706673582212206d3886a1cb2ed0f6816daa8aaa3b0c3aa3d9b3bc1c9a7ee699fd1a32e657c0a864736f6c63430008120033
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.