Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 15808781 | 748 days ago | IN | 0 ETH | 0.02969413 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Land
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "./interface/ILand.sol"; import "./Abstract/NFT.sol"; contract Land is Initializable, ILand, NFT, ReentrancyGuardUpgradeable, PausableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; CountersUpgradeable.Counter private tokenID; address owner; address landSale; mapping(uint256 => uint256) public linkedTokenId; mapping(uint256 => uint256) public linkedLandId; mapping(address => uint256[]) public userLand; mapping(uint256 => LandData) landDetails; mapping(uint256 => bool) landIdStatus; mapping(uint256 => uint256) idIndex; mapping(address => bool) blacklisted; modifier islandIdAvaialble(uint256 x, uint256 y) { uint256 _landId = _encodeLandId(x, y); require(!landIdStatus[_landId], "already mint"); _; } modifier isCategoriesExist(uint256 _categories) { require( Type(_categories) == Type.Normal || Type(_categories) == Type.Platinum || Type(_categories) == Type.Premium, "categories not exist" ); _; } modifier isLandIdExist(uint256 _landId) { require(landIdStatus[_landId], "landId not exist"); _; } modifier isNotNull(uint256 _length) { require(_length != 0, "zero length"); _; } modifier isLengthEqual(uint256 x, uint256 y) { require(x == y, "The coordinates should have the same length"); _; } modifier isLandOwner(uint256 x, uint256 y) { require(msg.sender == _ownerOfLand(x, y), "not land owner"); _; } modifier isNotNullAddress(address _address) { require(_address != address(0), "null address"); _; } modifier onlyOwner() { require(owner == msg.sender, "Caller is not a owner"); _; } modifier onlyLandSale() { require(landSale == msg.sender, "not land Sale COntract"); _; } function initialize( address _owner, string memory _name, string memory _symbol ) external initializer { __ERC721_init(_name, _symbol); owner = _owner; } function updatedPlatformOwner(address _owner) external onlyOwner nonReentrant { owner = _owner; emit PlatFormOwnerUpdate(msg.sender, _owner); } function blackListAddress(address _landOwner, bool _status) external onlyOwner nonReentrant { blacklisted[_landOwner] = _status; emit Blacklisted(_landOwner, _status); } function pause() external onlyOwner nonReentrant { _pause(); } function unpaused() external onlyOwner nonReentrant { _unpause(); } function setLandSale(address _landSale) external onlyOwner nonReentrant { landSale = _landSale; } function createLand( address _beneficiary, uint256 x, uint256 y, uint256 _categories, string memory _uri ) external isNotNullAddress(_beneficiary) isCategoriesExist(_categories) islandIdAvaialble(x, y) nonReentrant onlyLandSale { _create(_beneficiary, x, y, _categories, _uri); emit CreateLand(_beneficiary, x, y, _categories); } function transferLand( uint256 x, uint256 y, address to ) external isLandOwner(x, y) isNotNullAddress(to) isLandIdExist(_encodeLandId(x, y)) nonReentrant { uint256 landId = _encodeLandId(x, y); _transferLand(msg.sender, to, landId); uint256 tokenId = linkedTokenId[landId]; _safeTransfer(msg.sender, to, tokenId, ""); emit TransferLand(msg.sender, to, x, y); } function transferManyLand( uint256[] memory x, uint256[] memory y, address to ) external isNotNull(x.length) isNotNullAddress(to) isLengthEqual(x.length, y.length) nonReentrant { _isMultipleLandIdExist(x, y); for (uint256 i = 0; i < x.length; i++) { uint256 landId = _encodeLandId(x[i], y[i]); _transferLand(msg.sender, to, landId); uint256 tokenId = linkedTokenId[landId]; _safeTransfer(msg.sender, to, tokenId, ""); } emit TransferManyLand(msg.sender, to, x, y); } function updateLandData(uint256 _landId, string memory _tokenURI) external isNotNull(_landId) nonReentrant onlyOwner { _updateLandData(_landId, _tokenURI); emit UpdateLandData(msg.sender, _landId, _tokenURI); } function updateMultipleLandData( uint256[] memory _landId, string[] memory _tokenURI ) external isNotNull(_landId.length) isLengthEqual(_landId.length, _tokenURI.length) nonReentrant onlyOwner { for (uint256 i = 0; i < _landId.length; i++) { _updateLandData(_landId[i], _tokenURI[i]); } emit UpdateMultipleLandData(msg.sender, _landId, _tokenURI); } function updateManyLandData( uint256[] memory x, uint256[] memory y, string[] memory _tokenURI ) external isNotNull(x.length) isLengthEqual(x.length, y.length) nonReentrant onlyOwner { for (uint256 i = 0; i < x.length; i++) { uint256 landId = _encodeLandId(x[i], y[i]); _updateLandData(landId, _tokenURI[i]); } emit UpdateManyLandData(msg.sender, x, y, _tokenURI); } function encodeLandId(uint256 x, uint256 y) external pure returns (uint256) { return _encodeLandId(x, y); } function decodeLandId(uint256 _landId) external pure returns (uint256, uint256) { return _decodeLandId(_landId); } function userLandInfo(uint256 _landId) external view returns (LandData memory) { return landDetails[_landId]; } function ownerOfLand(uint256 x, uint256 y) external view returns (address) { return _ownerOfLand(x, y); } function ownerOfLandMany(uint256[] memory x, uint256[] memory y) external view returns (address[] memory) { require(x.length > 0, "You should supply at least one coordinate"); require( x.length == y.length, "The coordinates should have the same length" ); address[] memory addrs = new address[](x.length); for (uint256 i = 0; i < x.length; i++) { addrs[i] = _ownerOfLand(x[i], y[i]); } return addrs; } function landData(uint256 x, uint256 y) external view returns (string memory) { uint256 landId = _encodeLandId(x, y); uint256 tokenId = linkedTokenId[landId]; return tokenURI(tokenId); } function safeTransferFrom( address from, address to, uint256 _landId ) public virtual override { safeTransferFrom(from, to, _landId, ""); uint256 landIds = linkedLandId[_landId]; _transferLand(from, to, landIds); } function safeTransferFrom( address from, address to, uint256 _landId, bytes memory data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), _landId), "ERC721: caller is not token owner or approved" ); uint256 landIds = linkedLandId[_landId]; _transferLand(from, to, landIds); _safeTransfer(from, to, _landId, data); } function transferFrom( address from, address to, uint256 _landId ) public virtual override isLandIdExist(linkedLandId[_landId]) { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), _landId), "ERC721: caller is not token owner or approved" ); uint256 landIds = linkedLandId[_landId]; // _landId -> tokenID _transferLand(from, to, landIds); _safeTransfer(from, to, _landId, ""); } function _create( address _beneficiary, uint256 x, uint256 y, uint256 _categories, string memory _uri ) internal { uint256 _landId = _encodeLandId(x, y); idIndex[_landId] = userLand[_beneficiary].length; userLand[_beneficiary].push(_landId); landDetails[_landId] = LandData(_categories, block.timestamp); landIdStatus[_landId] = true; uint256 tokenId = generateTokenId(_landId); _mintLand(_beneficiary, tokenId); _updateLandData(_landId, _uri); } function _mintLand(address _beneficiary, uint256 _tokenId) internal { _mintNFT(_beneficiary, _tokenId); } function _transferLand( address _from, address _to, uint256 _landId ) internal { delete userLand[_from][(idIndex[_landId])]; idIndex[_landId] = userLand[_to].length; userLand[_to].push(_landId); landDetails[_landId].timestamp = block.timestamp; } function _encodeLandId(uint256 x, uint256 y) internal pure returns (uint256 result) { require( x < 10000 && y < 10000, "The coordinates should be inside bounds" ); return ((uint256(x) * factor) & clearLow) | (uint256(y) & clearHigh); } function _decodeLandId(uint256 _landId) internal pure returns (uint256 x, uint256 y) { x = _expandNegative128BitCast((_landId & clearLow) >> 128); y = _expandNegative128BitCast(_landId & clearHigh); require( x < 10000 && y < 10000, "The coordinates should be inside bounds" ); } function _expandNegative128BitCast(uint256 value) internal pure returns (uint256) { if (value & (1 << 127) != 0) { return uint256(value | clearLow); } return uint256(value); } function generateTokenId(uint256 _landId) internal returns (uint256) { tokenID.increment(); linkedTokenId[_landId] = tokenID.current(); linkedLandId[(tokenID.current())] = _landId; return tokenID.current(); } function _isMultipleLandIdExist(uint256[] memory x, uint256[] memory y) internal view { for (uint256 i = 0; i < x.length; i++) { uint256 _landId = _encodeLandId(x[i], y[i]); require(landIdStatus[_landId], "landId not exist"); } } function _ownerOfLand(uint256 x, uint256 y) internal view returns (address) { uint256 landId = _encodeLandId(x, y); uint256 tokenId = linkedTokenId[landId]; return ownerOf(tokenId); } function _updateLandData(uint256 _landId, string memory _tokenURI) internal { uint256 _tokenId = linkedTokenId[_landId]; _updateURI(_tokenId, _tokenURI); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; abstract contract NFT is ERC721Upgradeable { uint256 constant clearLow = 0xffffffffffffffffffffffffffffffff00000000000000000000000000000000; uint256 constant clearHigh = 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff; uint256 constant factor = 0x100000000000000000000000000000000; mapping(uint256 => string) tokenMetadataCID; modifier isNFTOwner(uint256 _tokenId) { require(msg.sender == ownerOf(_tokenId), "You are not nft owner"); _; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); return tokenMetadataCID[tokenId]; } function _mintNFT(address _to, uint256 _tokenID) internal { _safeMint(_to, _tokenID); } function burn(uint256 _tokenId) internal isNFTOwner(_tokenId) { _burn(_tokenId); } function _updateURI(uint256 _tokenId, string memory _uri) internal { tokenMetadataCID[_tokenId] = _uri; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface ILand { struct LandData { uint256 categories; uint256 timestamp; } enum Type { Normal, Platinum, Premium } event Blacklisted(address account, bool value); event CreateLand( address _beneficiary, uint256 x, uint256 y, uint256 _categories ); event PlatFormOwnerUpdate(address oldAddress, address newAddress); event TransferLand(address from, address to, uint256 x, uint256 y); event TransferManyLand(address from, address to, uint256[] x, uint256[] y); event UpdateLandData(address landOwner, uint256 _landId, string _tokenURI); event UpdateMultipleLandData( address landOwner, uint256[] _landId, string[] _tokenURI ); event UpdateManyLandData( address landOwner, uint256[] x, uint256[] y, string[] _tokenURI ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable 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. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721Upgradeable.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any (single) token transfer. This includes minting and burning. * See {_beforeConsecutiveTokenTransfer}. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any (single) transfer of tokens. This includes minting and burning. * See {_afterConsecutiveTokenTransfer}. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called before consecutive token transfers. * Calling conditions are similar to {_beforeTokenTransfer}. * * The default implementation include balances updates that extensions such as {ERC721Consecutive} cannot perform * directly. */ function _beforeConsecutiveTokenTransfer( address from, address to, uint256, /*first*/ uint96 size ) internal virtual { if (from != address(0)) { _balances[from] -= size; } if (to != address(0)) { _balances[to] += size; } } /** * @dev Hook that is called after consecutive token transfers. * Calling conditions are similar to {_afterTokenTransfer}. */ function _afterConsecutiveTokenTransfer( address, /*from*/ address, /*to*/ uint256, /*first*/ uint96 /*size*/ ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/MathUpgradeable.sol"; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = MathUpgradeable.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, MathUpgradeable.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0-rc.1) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"x","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"y","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_categories","type":"uint256"}],"name":"CreateLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"PlatFormOwnerUpdate","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"x","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"y","type":"uint256"}],"name":"TransferLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"x","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"y","type":"uint256[]"}],"name":"TransferManyLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"landOwner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_landId","type":"uint256"},{"indexed":false,"internalType":"string","name":"_tokenURI","type":"string"}],"name":"UpdateLandData","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"landOwner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"x","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"y","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"_tokenURI","type":"string[]"}],"name":"UpdateManyLandData","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"landOwner","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_landId","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"_tokenURI","type":"string[]"}],"name":"UpdateMultipleLandData","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_landOwner","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"blackListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"},{"internalType":"uint256","name":"_categories","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"createLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_landId","type":"uint256"}],"name":"decodeLandId","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"encodeLandId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"landData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"linkedLandId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"linkedTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"}],"name":"ownerOfLand","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"x","type":"uint256[]"},{"internalType":"uint256[]","name":"y","type":"uint256[]"}],"name":"ownerOfLandMany","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"_landId","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":"_landId","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":"_landSale","type":"address"}],"name":"setLandSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"_landId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"x","type":"uint256"},{"internalType":"uint256","name":"y","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"transferLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"x","type":"uint256[]"},{"internalType":"uint256[]","name":"y","type":"uint256[]"},{"internalType":"address","name":"to","type":"address"}],"name":"transferManyLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_landId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"updateLandData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"x","type":"uint256[]"},{"internalType":"uint256[]","name":"y","type":"uint256[]"},{"internalType":"string[]","name":"_tokenURI","type":"string[]"}],"name":"updateManyLandData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_landId","type":"uint256[]"},{"internalType":"string[]","name":"_tokenURI","type":"string[]"}],"name":"updateMultipleLandData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"updatedPlatformOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userLand","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_landId","type":"uint256"}],"name":"userLandInfo","outputs":[{"components":[{"internalType":"uint256","name":"categories","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct ILand.LandData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50613718806100206000396000f3fe608060405234801561001057600080fd5b50600436106102415760003560e01c80636352211e11610145578063a506e5dc116100bd578063bf621b581161008c578063c87b56dd11610071578063c87b56dd1461054e578063e107ba4914610561578063e985e9c51461057457600080fd5b8063bf621b581461051a578063c81bd2cf1461052d57600080fd5b8063a506e5dc146104d9578063b0b62f5a146104ec578063b6ae1ada146104f4578063b88d4fde1461050757600080fd5b8063864bb6c41161011457806390657147116100f957806390657147146104ab57806395d89b41146104be578063a22cb465146104c657600080fd5b8063864bb6c4146104855780638ec0149c1461049857600080fd5b80636352211e1461044457806370a0823114610457578063794be7071461046a5780638456cb591461047d57600080fd5b806323b872dd116101d85780634b93e1e0116101a7578063513bc21f1161018c578063513bc21f146103be57806353e82a80146103d15780635c975abb1461043957600080fd5b80634b93e1e01461038357806350c0af8d1461039657600080fd5b806323b872dd1461033757806342842e0e1461034a57806345837e5f1461035d57806345b784371461037057600080fd5b8063095ea7b311610214578063095ea7b3146102c3578063108f5fcf146102d65780631a816cdb146102f65780631ac7f5231461030957600080fd5b806301ffc9a71461024657806303fd50991461026e57806306fdde0314610283578063081812fc14610298575b600080fd5b6102596102543660046132ad565b6105b0565b60405190151581526020015b60405180910390f35b61028161027c366004613233565b61064d565b005b61028b61084c565b60405161026591906135c3565b6102ab6102a63660046132e5565b6108de565b6040516001600160a01b039091168152602001610265565b6102816102d1366004613078565b610905565b6102e96102e436600461316b565b610a37565b6040516102659190613576565b6102816103043660046131c2565b610c21565b6103296103173660046132e5565b60ff6020526000908152604090205481565b604051908152602001610265565b610281610345366004612f19565b610e15565b610281610358366004612f19565b610f21565b61028161036b3660046132fd565b610f5d565b6102ab61037e366004613338565b611042565b61028161039136600461310a565b611055565b6103a96103a43660046132e5565b611202565b60408051928352602083019190915201610265565b6102816103cc3660046130a1565b611217565b61041e6103df3660046132e5565b60408051808201909152600080825260208201525060009081526101026020908152604091829020825180840190935280548352600101549082015290565b60408051825181526020928301519281019290925201610265565b60ca5460ff16610259565b6102ab6104523660046132e5565b6114c5565b610329610465366004612ecd565b61152a565b610281610478366004612fcd565b6115c4565b61028161168c565b610329610493366004613078565b6116fa565b61028b6104a6366004613338565b61172c565b6102816104b9366004613007565b61175e565b61028b61189d565b6102816104d4366004612fcd565b6118ac565b6102816104e7366004613359565b6118b7565b610281611a6e565b610281610502366004612ecd565b611ad0565b610281610515366004612f54565b611b8f565b610281610528366004612ecd565b611c21565b61032961053b3660046132e5565b6101006020526000908152604090205481565b61028b61055c3660046132e5565b611c9e565b61032961056f366004613338565b611dc9565b610259610582366004612ee7565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061061357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061064757507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b82518061068f5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b60448201526064015b60405180910390fd5b835183518082146106f65760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b6106fe611dd5565b60fd546001600160a01b031633146107505760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b60005b86518110156107fc5760006107b688838151811061078157634e487b7160e01b600052603260045260246000fd5b60200260200101518884815181106107a957634e487b7160e01b600052603260045260246000fd5b6020026020010151611e2f565b90506107e9818784815181106107dc57634e487b7160e01b600052603260045260246000fd5b6020026020010151611ee8565b50806107f481613685565b915050610753565b507fa359c97b8feae07eebe0a49b2fc96c81c6d74dea5e419c4141fdd60dfc2193e3338787876040516108329493929190613506565b60405180910390a16108446001609855565b505050505050565b60606065805461085b9061364a565b80601f01602080910402602001604051908101604052809291908181526020018280546108879061364a565b80156108d45780601f106108a9576101008083540402835291602001916108d4565b820191906000526020600020905b8154815290600101906020018083116108b757829003601f168201915b5050505050905090565b60006108e982611f01565b506000908152606960205260409020546001600160a01b031690565b6000610910826114c5565b9050806001600160a01b0316836001600160a01b0316141561099a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610686565b336001600160a01b03821614806109b657506109b68133610582565b610a285760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610686565b610a328383611f65565b505050565b60606000835111610ab05760405162461bcd60e51b815260206004820152602960248201527f596f752073686f756c6420737570706c79206174206c65617374206f6e65206360448201527f6f6f7264696e61746500000000000000000000000000000000000000000000006064820152608401610686565b8151835114610b155760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b6000835167ffffffffffffffff811115610b3f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610b68578160200160208202803683370190505b50905060005b8451811015610c1957610bcf858281518110610b9a57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610bc257634e487b7160e01b600052603260045260246000fd5b6020026020010151611fd3565b828281518110610bef57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280610c1181613685565b915050610b6e565b509392505050565b825180610c5e5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610686565b816001600160a01b038116610ca45760405162461bcd60e51b815260206004820152600c60248201526b6e756c6c206164647265737360a01b6044820152606401610686565b84518451808214610d0b5760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b610d13611dd5565b610d1d8787611ffb565b60005b8751811015610dc4576000610d76898381518110610d4e57634e487b7160e01b600052603260045260246000fd5b60200260200101518984815181106107a957634e487b7160e01b600052603260045260246000fd5b9050610d833388836120bc565b600081815260ff60209081526040808320548151928301909152918152610daf9033908a90849061215f565b50508080610dbc90613685565b915050610d20565b507f1e7e35c702b8b27aba7c8c339de25ffe66ae8c848c01dd0454a7310643269ebc33868989604051610dfa949392919061344d565b60405180910390a1610e0c6001609855565b50505050505050565b600081815261010060209081526040808320548084526101039092529091205460ff16610e775760405162461bcd60e51b815260206004820152601060248201526f1b185b991259081b9bdd08195e1a5cdd60821b6044820152606401610686565b610e82335b836121dd565b610ee45760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610686565b60008281526101006020526040902054610eff8585836120bc565b610f1a8585856040518060200160405280600081525061215f565b5050505050565b610f3c83838360405180602001604052806000815250611b8f565b60008181526101006020526040902054610f578484836120bc565b50505050565b8180610f995760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610686565b610fa1611dd5565b60fd546001600160a01b03163314610ff35760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b610ffd8383611ee8565b7fc9b18d444f275d7705b66349a3674971e9fa81f644dc8e8563e3b44b867eff003384846040516110309392919061354e565b60405180910390a1610a326001609855565b600061104e8383611fd3565b9392505050565b8151806110925760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610686565b825182518082146110f95760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b611101611dd5565b60fd546001600160a01b031633146111535760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b60005b85518110156111bc576111aa86828151811061118257634e487b7160e01b600052603260045260246000fd5b60200260200101518683815181106107dc57634e487b7160e01b600052603260045260246000fd5b806111b481613685565b915050611156565b507fe21d303b24fa3eec516dc5b1bf0a9fabc670dc9c4719b476ca91e910b7b1dcbe3386866040516111f0939291906134d2565b60405180910390a1610f1a6001609855565b60008061120e8361225c565b91509150915091565b846001600160a01b03811661125d5760405162461bcd60e51b815260206004820152600c60248201526b6e756c6c206164647265737360a01b6044820152606401610686565b82600081600281111561128057634e487b7160e01b600052602160045260246000fd5b600281111561129f57634e487b7160e01b600052602160045260246000fd5b14806112e9575060018160028111156112c857634e487b7160e01b600052602160045260246000fd5b60028111156112e757634e487b7160e01b600052602160045260246000fd5b145b806113325750600281600281111561131157634e487b7160e01b600052602160045260246000fd5b600281111561133057634e487b7160e01b600052602160045260246000fd5b145b61137e5760405162461bcd60e51b815260206004820152601460248201527f63617465676f72696573206e6f742065786973740000000000000000000000006044820152606401610686565b8585600061138c8383611e2f565b6000818152610103602052604090205490915060ff16156113ef5760405162461bcd60e51b815260206004820152600c60248201527f616c7265616479206d696e7400000000000000000000000000000000000000006044820152606401610686565b6113f7611dd5565b60fe546001600160a01b031633146114515760405162461bcd60e51b815260206004820152601660248201527f6e6f74206c616e642053616c6520434f6e7472616374000000000000000000006044820152606401610686565b61145e8a8a8a8a8a6122fe565b604080516001600160a01b038c168152602081018b9052908101899052606081018890527fe24a880c1d9d4016c7facf7bfb03c8f948dcb49bfed0a444d90bd6ad98962fe59060800160405180910390a16114b96001609855565b50505050505050505050565b6000818152606760205260408120546001600160a01b0316806106475760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610686565b60006001600160a01b0382166115a85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610686565b506001600160a01b031660009081526068602052604090205490565b60fd546001600160a01b031633146116165760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b61161e611dd5565b6001600160a01b03821660008181526101056020908152604091829020805460ff19168515159081179091558251938452908301527fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd8910160405180910390a16116886001609855565b5050565b60fd546001600160a01b031633146116de5760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b6116e6611dd5565b6116ee6123a1565b6116f86001609855565b565b610101602052816000526040600020818154811061171757600080fd5b90600052602060002001600091509150505481565b6060600061173a8484611e2f565b600081815260ff602052604090205490915061175581611c9e565b95945050505050565b600054610100900460ff161580801561177e5750600054600160ff909116105b806117985750303b158015611798575060005460ff166001145b61180a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610686565b6000805460ff19166001179055801561182d576000805461ff0019166101001790555b61183783836123fb565b60fd80546001600160a01b0319166001600160a01b0386161790558015610f57576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b60606066805461085b9061364a565b611688338383612470565b82826118c38282611fd3565b6001600160a01b0316336001600160a01b0316146119235760405162461bcd60e51b815260206004820152600e60248201527f6e6f74206c616e64206f776e65720000000000000000000000000000000000006044820152606401610686565b826001600160a01b0381166119695760405162461bcd60e51b815260206004820152600c60248201526b6e756c6c206164647265737360a01b6044820152606401610686565b6119738686611e2f565b6000818152610103602052604090205460ff166119c55760405162461bcd60e51b815260206004820152601060248201526f1b185b991259081b9bdd08195e1a5cdd60821b6044820152606401610686565b6119cd611dd5565b60006119d98888611e2f565b90506119e63387836120bc565b600081815260ff60209081526040808320548151928301909152918152611a129033908990849061215f565b604080513381526001600160a01b03891660208201529081018a9052606081018990527f7b3ab90261ccf3289c4759a5c2866f38200fd793efd91a992f2708e08f03e2c29060800160405180910390a15050610e0c6001609855565b60fd546001600160a01b03163314611ac05760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b611ac8611dd5565b6116ee61253f565b60fd546001600160a01b03163314611b225760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b611b2a611dd5565b60fd80546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fbbe9ed898d7743249ff374595c478ed2ce048db23ab4e4226952084709fa36a8910160405180910390a1611b8c6001609855565b50565b611b9833610e7c565b611bfa5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610686565b60008281526101006020526040902054611c158585836120bc565b610f1a8585858561215f565b60fd546001600160a01b03163314611c735760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b611c7b611dd5565b60fe80546001600160a01b0319166001600160a01b038316179055600160985550565b6000818152606760205260409020546060906001600160a01b0316611d2b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610686565b60008281526097602052604090208054611d449061364a565b80601f0160208091040260200160405190810160405280929190818152602001828054611d709061364a565b8015611dbd5780601f10611d9257610100808354040283529160200191611dbd565b820191906000526020600020905b815481529060010190602001808311611da057829003601f168201915b50505050509050919050565b600061104e8383611e2f565b60026098541415611e285760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610686565b6002609855565b600061271083108015611e43575061271082105b611e9f5760405162461bcd60e51b815260206004820152602760248201527f54686520636f6f7264696e617465732073686f756c6420626520696e7369646560448201526620626f756e647360c81b6064820152608401610686565b6fffffffffffffffffffffffffffffffff82166fffffffffffffffffffffffffffffffff19611edf7001000000000000000000000000000000008661362b565b16179392505050565b600082815260ff6020526040902054610a328183612578565b6000818152606760205260409020546001600160a01b0316611b8c5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610686565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f9a826114c5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611fe08484611e2f565b600081815260ff6020526040902054909150611755816114c5565b60005b8251811015610a3257600061205484838151811061202c57634e487b7160e01b600052603260045260246000fd5b60200260200101518484815181106107a957634e487b7160e01b600052603260045260246000fd5b6000818152610103602052604090205490915060ff166120a95760405162461bcd60e51b815260206004820152601060248201526f1b185b991259081b9bdd08195e1a5cdd60821b6044820152606401610686565b50806120b481613685565b915050611ffe565b6001600160a01b038316600090815261010160209081526040808320848452610104909252909120548154811061210357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091018290556001600160a01b03909316815261010183526040808220805484845261010486528284208190556001808201835591845285842001849055928252610102909352919091204291015550565b61216a848484612597565b61217684848484612790565b610f575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610686565b6000806121e9836114c5565b9050806001600160a01b0316846001600160a01b0316148061223057506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806122545750836001600160a01b0316612249846108de565b6001600160a01b0316145b949350505050565b60008061226c608084901c6128e8565b91506122896fffffffffffffffffffffffffffffffff84166128e8565b90506127108210801561229d575061271081105b6122f95760405162461bcd60e51b815260206004820152602760248201527f54686520636f6f7264696e617465732073686f756c6420626520696e7369646560448201526620626f756e647360c81b6064820152608401610686565b915091565b600061230a8585611e2f565b6001600160a01b038716600090815261010160209081526040808320805485855261010484528285208190556001808201835591855283852001859055815180830183528881524281850190815286865261010285528386209151825551908201556101039092528220805460ff1916909117905590915061238b8261291d565b90506123978782612957565b610e0c8284611ee8565b6123a9612961565b60ca805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123de3390565b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff166124665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610686565b61168882826129b4565b816001600160a01b0316836001600160a01b031614156124d25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610686565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612547612a46565b60ca805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336123de565b60008281526097602090815260409091208251610a3292840190612cbb565b826001600160a01b03166125aa826114c5565b6001600160a01b03161461260e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610686565b6001600160a01b0382166126895760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610686565b826001600160a01b031661269c826114c5565b6001600160a01b0316146127005760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610686565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b156128dd57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127d4903390899088908890600401613496565b602060405180830381600087803b1580156127ee57600080fd5b505af192505050801561281e575060408051601f3d908101601f1916820190925261281b918101906132c9565b60015b6128c3573d80801561284c576040519150601f19603f3d011682016040523d82523d6000602084013e612851565b606091505b5080516128bb5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610686565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612254565b506001949350505050565b60006f8000000000000000000000000000000082161561291957506fffffffffffffffffffffffffffffffff191790565b5090565b600061292d60fc80546001019055565b60fc8054600084815260ff6020908152604080832084905592825261010090522083905554610647565b6116888282612a98565b60ca5460ff16156116f85760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610686565b600054610100900460ff16612a1f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610686565b8151612a32906065906020850190612cbb565b508051610a32906066906020840190612cbb565b60ca5460ff166116f85760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610686565b6116888282611688828260405180602001604052806000815250612abc8383612b30565b612ac96000848484612790565b610a325760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610686565b6001600160a01b038216612b865760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610686565b6000818152606760205260409020546001600160a01b031615612beb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610686565b6000818152606760205260409020546001600160a01b031615612c505760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610686565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612cc79061364a565b90600052602060002090601f016020900481019282612ce95760008555612d2f565b82601f10612d0257805160ff1916838001178555612d2f565b82800160010185558215612d2f579182015b82811115612d2f578251825591602001919060010190612d14565b506129199291505b808211156129195760008155600101612d37565b600067ffffffffffffffff831115612d6557612d656136b6565b612d78601f8401601f19166020016135d6565b9050828152838383011115612d8c57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114612dba57600080fd5b919050565b600082601f830112612dcf578081fd5b81356020612de4612ddf83613607565b6135d6565b80838252828201915082860187848660051b8901011115612e03578586fd5b855b85811015612e4457813567ffffffffffffffff811115612e23578788fd5b612e318a87838c0101612eae565b8552509284019290840190600101612e05565b5090979650505050505050565b600082601f830112612e61578081fd5b81356020612e71612ddf83613607565b80838252828201915082860187848660051b8901011115612e90578586fd5b855b85811015612e4457813584529284019290840190600101612e92565b600082601f830112612ebe578081fd5b61104e83833560208501612d4b565b600060208284031215612ede578081fd5b61104e82612da3565b60008060408385031215612ef9578081fd5b612f0283612da3565b9150612f1060208401612da3565b90509250929050565b600080600060608486031215612f2d578081fd5b612f3684612da3565b9250612f4460208501612da3565b9150604084013590509250925092565b60008060008060808587031215612f69578081fd5b612f7285612da3565b9350612f8060208601612da3565b925060408501359150606085013567ffffffffffffffff811115612fa2578182fd5b8501601f81018713612fb2578182fd5b612fc187823560208401612d4b565b91505092959194509250565b60008060408385031215612fdf578182fd5b612fe883612da3565b915060208301358015158114612ffc578182fd5b809150509250929050565b60008060006060848603121561301b578283fd5b61302484612da3565b9250602084013567ffffffffffffffff80821115613040578384fd5b61304c87838801612eae565b93506040860135915080821115613061578283fd5b5061306e86828701612eae565b9150509250925092565b6000806040838503121561308a578182fd5b61309383612da3565b946020939093013593505050565b600080600080600060a086880312156130b8578081fd5b6130c186612da3565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff8111156130f1578182fd5b6130fd88828901612eae565b9150509295509295909350565b6000806040838503121561311c578182fd5b823567ffffffffffffffff80821115613133578384fd5b61313f86838701612e51565b93506020850135915080821115613154578283fd5b5061316185828601612dbf565b9150509250929050565b6000806040838503121561317d578182fd5b823567ffffffffffffffff80821115613194578384fd5b6131a086838701612e51565b935060208501359150808211156131b5578283fd5b5061316185828601612e51565b6000806000606084860312156131d6578081fd5b833567ffffffffffffffff808211156131ed578283fd5b6131f987838801612e51565b9450602086013591508082111561320e578283fd5b5061321b86828701612e51565b92505061322a60408501612da3565b90509250925092565b600080600060608486031215613247578081fd5b833567ffffffffffffffff8082111561325e578283fd5b61326a87838801612e51565b9450602086013591508082111561327f578283fd5b61328b87838801612e51565b935060408601359150808211156132a0578283fd5b5061306e86828701612dbf565b6000602082840312156132be578081fd5b813561104e816136cc565b6000602082840312156132da578081fd5b815161104e816136cc565b6000602082840312156132f6578081fd5b5035919050565b6000806040838503121561330f578182fd5b82359150602083013567ffffffffffffffff81111561332c578182fd5b61316185828601612eae565b6000806040838503121561334a578182fd5b50508035926020909101359150565b60008060006060848603121561336d578081fd5b833592506020840135915061322a60408501612da3565b6000815180845260208085019450848260051b8601828601855b85811015612e445783830389526133b6838351613402565b9885019892509084019060010161339e565b6000815180845260208085019450808401835b838110156133f7578151875295820195908201906001016133db565b509495945050505050565b60008151808452815b818110156134275760208185018101518683018201520161340b565b818111156134385782602083870101525b50601f01601f19169290920160200192915050565b60006001600160a01b0380871683528086166020840152506080604083015261347960808301856133c8565b828103606084015261348b81856133c8565b979650505050505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526134c86080830184613402565b9695505050505050565b6001600160a01b03841681526060602082015260006134f460608301856133c8565b82810360408401526134c88185613384565b6001600160a01b038516815260806020820152600061352860808301866133c8565b828103604084015261353a81866133c8565b9050828103606084015261348b8185613384565b6001600160a01b03841681528260208201526060604082015260006117556060830184613402565b6020808252825182820181905260009190848201906040850190845b818110156135b75783516001600160a01b031683529284019291840191600101613592565b50909695505050505050565b60208152600061104e6020830184613402565b604051601f8201601f1916810167ffffffffffffffff811182821017156135ff576135ff6136b6565b604052919050565b600067ffffffffffffffff821115613621576136216136b6565b5060051b60200190565b6000816000190483118215151615613645576136456136a0565b500290565b600181811c9082168061365e57607f821691505b6020821081141561367f57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613699576136996136a0565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114611b8c57600080fdfea2646970667358221220a66232d28d7b638767088c1f98e3b427be64520963ce9988ff231262cd04584664736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102415760003560e01c80636352211e11610145578063a506e5dc116100bd578063bf621b581161008c578063c87b56dd11610071578063c87b56dd1461054e578063e107ba4914610561578063e985e9c51461057457600080fd5b8063bf621b581461051a578063c81bd2cf1461052d57600080fd5b8063a506e5dc146104d9578063b0b62f5a146104ec578063b6ae1ada146104f4578063b88d4fde1461050757600080fd5b8063864bb6c41161011457806390657147116100f957806390657147146104ab57806395d89b41146104be578063a22cb465146104c657600080fd5b8063864bb6c4146104855780638ec0149c1461049857600080fd5b80636352211e1461044457806370a0823114610457578063794be7071461046a5780638456cb591461047d57600080fd5b806323b872dd116101d85780634b93e1e0116101a7578063513bc21f1161018c578063513bc21f146103be57806353e82a80146103d15780635c975abb1461043957600080fd5b80634b93e1e01461038357806350c0af8d1461039657600080fd5b806323b872dd1461033757806342842e0e1461034a57806345837e5f1461035d57806345b784371461037057600080fd5b8063095ea7b311610214578063095ea7b3146102c3578063108f5fcf146102d65780631a816cdb146102f65780631ac7f5231461030957600080fd5b806301ffc9a71461024657806303fd50991461026e57806306fdde0314610283578063081812fc14610298575b600080fd5b6102596102543660046132ad565b6105b0565b60405190151581526020015b60405180910390f35b61028161027c366004613233565b61064d565b005b61028b61084c565b60405161026591906135c3565b6102ab6102a63660046132e5565b6108de565b6040516001600160a01b039091168152602001610265565b6102816102d1366004613078565b610905565b6102e96102e436600461316b565b610a37565b6040516102659190613576565b6102816103043660046131c2565b610c21565b6103296103173660046132e5565b60ff6020526000908152604090205481565b604051908152602001610265565b610281610345366004612f19565b610e15565b610281610358366004612f19565b610f21565b61028161036b3660046132fd565b610f5d565b6102ab61037e366004613338565b611042565b61028161039136600461310a565b611055565b6103a96103a43660046132e5565b611202565b60408051928352602083019190915201610265565b6102816103cc3660046130a1565b611217565b61041e6103df3660046132e5565b60408051808201909152600080825260208201525060009081526101026020908152604091829020825180840190935280548352600101549082015290565b60408051825181526020928301519281019290925201610265565b60ca5460ff16610259565b6102ab6104523660046132e5565b6114c5565b610329610465366004612ecd565b61152a565b610281610478366004612fcd565b6115c4565b61028161168c565b610329610493366004613078565b6116fa565b61028b6104a6366004613338565b61172c565b6102816104b9366004613007565b61175e565b61028b61189d565b6102816104d4366004612fcd565b6118ac565b6102816104e7366004613359565b6118b7565b610281611a6e565b610281610502366004612ecd565b611ad0565b610281610515366004612f54565b611b8f565b610281610528366004612ecd565b611c21565b61032961053b3660046132e5565b6101006020526000908152604090205481565b61028b61055c3660046132e5565b611c9e565b61032961056f366004613338565b611dc9565b610259610582366004612ee7565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061061357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061064757507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b82518061068f5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b60448201526064015b60405180910390fd5b835183518082146106f65760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b6106fe611dd5565b60fd546001600160a01b031633146107505760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b60005b86518110156107fc5760006107b688838151811061078157634e487b7160e01b600052603260045260246000fd5b60200260200101518884815181106107a957634e487b7160e01b600052603260045260246000fd5b6020026020010151611e2f565b90506107e9818784815181106107dc57634e487b7160e01b600052603260045260246000fd5b6020026020010151611ee8565b50806107f481613685565b915050610753565b507fa359c97b8feae07eebe0a49b2fc96c81c6d74dea5e419c4141fdd60dfc2193e3338787876040516108329493929190613506565b60405180910390a16108446001609855565b505050505050565b60606065805461085b9061364a565b80601f01602080910402602001604051908101604052809291908181526020018280546108879061364a565b80156108d45780601f106108a9576101008083540402835291602001916108d4565b820191906000526020600020905b8154815290600101906020018083116108b757829003601f168201915b5050505050905090565b60006108e982611f01565b506000908152606960205260409020546001600160a01b031690565b6000610910826114c5565b9050806001600160a01b0316836001600160a01b0316141561099a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610686565b336001600160a01b03821614806109b657506109b68133610582565b610a285760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610686565b610a328383611f65565b505050565b60606000835111610ab05760405162461bcd60e51b815260206004820152602960248201527f596f752073686f756c6420737570706c79206174206c65617374206f6e65206360448201527f6f6f7264696e61746500000000000000000000000000000000000000000000006064820152608401610686565b8151835114610b155760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b6000835167ffffffffffffffff811115610b3f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610b68578160200160208202803683370190505b50905060005b8451811015610c1957610bcf858281518110610b9a57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610bc257634e487b7160e01b600052603260045260246000fd5b6020026020010151611fd3565b828281518110610bef57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280610c1181613685565b915050610b6e565b509392505050565b825180610c5e5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610686565b816001600160a01b038116610ca45760405162461bcd60e51b815260206004820152600c60248201526b6e756c6c206164647265737360a01b6044820152606401610686565b84518451808214610d0b5760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b610d13611dd5565b610d1d8787611ffb565b60005b8751811015610dc4576000610d76898381518110610d4e57634e487b7160e01b600052603260045260246000fd5b60200260200101518984815181106107a957634e487b7160e01b600052603260045260246000fd5b9050610d833388836120bc565b600081815260ff60209081526040808320548151928301909152918152610daf9033908a90849061215f565b50508080610dbc90613685565b915050610d20565b507f1e7e35c702b8b27aba7c8c339de25ffe66ae8c848c01dd0454a7310643269ebc33868989604051610dfa949392919061344d565b60405180910390a1610e0c6001609855565b50505050505050565b600081815261010060209081526040808320548084526101039092529091205460ff16610e775760405162461bcd60e51b815260206004820152601060248201526f1b185b991259081b9bdd08195e1a5cdd60821b6044820152606401610686565b610e82335b836121dd565b610ee45760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610686565b60008281526101006020526040902054610eff8585836120bc565b610f1a8585856040518060200160405280600081525061215f565b5050505050565b610f3c83838360405180602001604052806000815250611b8f565b60008181526101006020526040902054610f578484836120bc565b50505050565b8180610f995760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610686565b610fa1611dd5565b60fd546001600160a01b03163314610ff35760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b610ffd8383611ee8565b7fc9b18d444f275d7705b66349a3674971e9fa81f644dc8e8563e3b44b867eff003384846040516110309392919061354e565b60405180910390a1610a326001609855565b600061104e8383611fd3565b9392505050565b8151806110925760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b6044820152606401610686565b825182518082146110f95760405162461bcd60e51b815260206004820152602b60248201527f54686520636f6f7264696e617465732073686f756c642068617665207468652060448201526a0e6c2daca40d8cadccee8d60ab1b6064820152608401610686565b611101611dd5565b60fd546001600160a01b031633146111535760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b60005b85518110156111bc576111aa86828151811061118257634e487b7160e01b600052603260045260246000fd5b60200260200101518683815181106107dc57634e487b7160e01b600052603260045260246000fd5b806111b481613685565b915050611156565b507fe21d303b24fa3eec516dc5b1bf0a9fabc670dc9c4719b476ca91e910b7b1dcbe3386866040516111f0939291906134d2565b60405180910390a1610f1a6001609855565b60008061120e8361225c565b91509150915091565b846001600160a01b03811661125d5760405162461bcd60e51b815260206004820152600c60248201526b6e756c6c206164647265737360a01b6044820152606401610686565b82600081600281111561128057634e487b7160e01b600052602160045260246000fd5b600281111561129f57634e487b7160e01b600052602160045260246000fd5b14806112e9575060018160028111156112c857634e487b7160e01b600052602160045260246000fd5b60028111156112e757634e487b7160e01b600052602160045260246000fd5b145b806113325750600281600281111561131157634e487b7160e01b600052602160045260246000fd5b600281111561133057634e487b7160e01b600052602160045260246000fd5b145b61137e5760405162461bcd60e51b815260206004820152601460248201527f63617465676f72696573206e6f742065786973740000000000000000000000006044820152606401610686565b8585600061138c8383611e2f565b6000818152610103602052604090205490915060ff16156113ef5760405162461bcd60e51b815260206004820152600c60248201527f616c7265616479206d696e7400000000000000000000000000000000000000006044820152606401610686565b6113f7611dd5565b60fe546001600160a01b031633146114515760405162461bcd60e51b815260206004820152601660248201527f6e6f74206c616e642053616c6520434f6e7472616374000000000000000000006044820152606401610686565b61145e8a8a8a8a8a6122fe565b604080516001600160a01b038c168152602081018b9052908101899052606081018890527fe24a880c1d9d4016c7facf7bfb03c8f948dcb49bfed0a444d90bd6ad98962fe59060800160405180910390a16114b96001609855565b50505050505050505050565b6000818152606760205260408120546001600160a01b0316806106475760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610686565b60006001600160a01b0382166115a85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610686565b506001600160a01b031660009081526068602052604090205490565b60fd546001600160a01b031633146116165760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b61161e611dd5565b6001600160a01b03821660008181526101056020908152604091829020805460ff19168515159081179091558251938452908301527fcf3473b85df1594d47b6958f29a32bea0abff9dd68296f7bf33443646793cfd8910160405180910390a16116886001609855565b5050565b60fd546001600160a01b031633146116de5760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b6116e6611dd5565b6116ee6123a1565b6116f86001609855565b565b610101602052816000526040600020818154811061171757600080fd5b90600052602060002001600091509150505481565b6060600061173a8484611e2f565b600081815260ff602052604090205490915061175581611c9e565b95945050505050565b600054610100900460ff161580801561177e5750600054600160ff909116105b806117985750303b158015611798575060005460ff166001145b61180a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610686565b6000805460ff19166001179055801561182d576000805461ff0019166101001790555b61183783836123fb565b60fd80546001600160a01b0319166001600160a01b0386161790558015610f57576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b60606066805461085b9061364a565b611688338383612470565b82826118c38282611fd3565b6001600160a01b0316336001600160a01b0316146119235760405162461bcd60e51b815260206004820152600e60248201527f6e6f74206c616e64206f776e65720000000000000000000000000000000000006044820152606401610686565b826001600160a01b0381166119695760405162461bcd60e51b815260206004820152600c60248201526b6e756c6c206164647265737360a01b6044820152606401610686565b6119738686611e2f565b6000818152610103602052604090205460ff166119c55760405162461bcd60e51b815260206004820152601060248201526f1b185b991259081b9bdd08195e1a5cdd60821b6044820152606401610686565b6119cd611dd5565b60006119d98888611e2f565b90506119e63387836120bc565b600081815260ff60209081526040808320548151928301909152918152611a129033908990849061215f565b604080513381526001600160a01b03891660208201529081018a9052606081018990527f7b3ab90261ccf3289c4759a5c2866f38200fd793efd91a992f2708e08f03e2c29060800160405180910390a15050610e0c6001609855565b60fd546001600160a01b03163314611ac05760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b611ac8611dd5565b6116ee61253f565b60fd546001600160a01b03163314611b225760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b611b2a611dd5565b60fd80546001600160a01b0319166001600160a01b0383169081179091556040805133815260208101929092527fbbe9ed898d7743249ff374595c478ed2ce048db23ab4e4226952084709fa36a8910160405180910390a1611b8c6001609855565b50565b611b9833610e7c565b611bfa5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608401610686565b60008281526101006020526040902054611c158585836120bc565b610f1a8585858561215f565b60fd546001600160a01b03163314611c735760405162461bcd60e51b815260206004820152601560248201527421b0b63632b91034b9903737ba10309037bbb732b960591b6044820152606401610686565b611c7b611dd5565b60fe80546001600160a01b0319166001600160a01b038316179055600160985550565b6000818152606760205260409020546060906001600160a01b0316611d2b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610686565b60008281526097602052604090208054611d449061364a565b80601f0160208091040260200160405190810160405280929190818152602001828054611d709061364a565b8015611dbd5780601f10611d9257610100808354040283529160200191611dbd565b820191906000526020600020905b815481529060010190602001808311611da057829003601f168201915b50505050509050919050565b600061104e8383611e2f565b60026098541415611e285760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610686565b6002609855565b600061271083108015611e43575061271082105b611e9f5760405162461bcd60e51b815260206004820152602760248201527f54686520636f6f7264696e617465732073686f756c6420626520696e7369646560448201526620626f756e647360c81b6064820152608401610686565b6fffffffffffffffffffffffffffffffff82166fffffffffffffffffffffffffffffffff19611edf7001000000000000000000000000000000008661362b565b16179392505050565b600082815260ff6020526040902054610a328183612578565b6000818152606760205260409020546001600160a01b0316611b8c5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610686565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f9a826114c5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611fe08484611e2f565b600081815260ff6020526040902054909150611755816114c5565b60005b8251811015610a3257600061205484838151811061202c57634e487b7160e01b600052603260045260246000fd5b60200260200101518484815181106107a957634e487b7160e01b600052603260045260246000fd5b6000818152610103602052604090205490915060ff166120a95760405162461bcd60e51b815260206004820152601060248201526f1b185b991259081b9bdd08195e1a5cdd60821b6044820152606401610686565b50806120b481613685565b915050611ffe565b6001600160a01b038316600090815261010160209081526040808320848452610104909252909120548154811061210357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091018290556001600160a01b03909316815261010183526040808220805484845261010486528284208190556001808201835591845285842001849055928252610102909352919091204291015550565b61216a848484612597565b61217684848484612790565b610f575760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610686565b6000806121e9836114c5565b9050806001600160a01b0316846001600160a01b0316148061223057506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b806122545750836001600160a01b0316612249846108de565b6001600160a01b0316145b949350505050565b60008061226c608084901c6128e8565b91506122896fffffffffffffffffffffffffffffffff84166128e8565b90506127108210801561229d575061271081105b6122f95760405162461bcd60e51b815260206004820152602760248201527f54686520636f6f7264696e617465732073686f756c6420626520696e7369646560448201526620626f756e647360c81b6064820152608401610686565b915091565b600061230a8585611e2f565b6001600160a01b038716600090815261010160209081526040808320805485855261010484528285208190556001808201835591855283852001859055815180830183528881524281850190815286865261010285528386209151825551908201556101039092528220805460ff1916909117905590915061238b8261291d565b90506123978782612957565b610e0c8284611ee8565b6123a9612961565b60ca805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123de3390565b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff166124665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610686565b61168882826129b4565b816001600160a01b0316836001600160a01b031614156124d25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610686565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612547612a46565b60ca805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336123de565b60008281526097602090815260409091208251610a3292840190612cbb565b826001600160a01b03166125aa826114c5565b6001600160a01b03161461260e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610686565b6001600160a01b0382166126895760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610686565b826001600160a01b031661269c826114c5565b6001600160a01b0316146127005760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610686565b600081815260696020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260688552838620805460001901905590871680865283862080546001019055868652606790945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b156128dd57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127d4903390899088908890600401613496565b602060405180830381600087803b1580156127ee57600080fd5b505af192505050801561281e575060408051601f3d908101601f1916820190925261281b918101906132c9565b60015b6128c3573d80801561284c576040519150601f19603f3d011682016040523d82523d6000602084013e612851565b606091505b5080516128bb5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610686565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612254565b506001949350505050565b60006f8000000000000000000000000000000082161561291957506fffffffffffffffffffffffffffffffff191790565b5090565b600061292d60fc80546001019055565b60fc8054600084815260ff6020908152604080832084905592825261010090522083905554610647565b6116888282612a98565b60ca5460ff16156116f85760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610686565b600054610100900460ff16612a1f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610686565b8151612a32906065906020850190612cbb565b508051610a32906066906020840190612cbb565b60ca5460ff166116f85760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610686565b6116888282611688828260405180602001604052806000815250612abc8383612b30565b612ac96000848484612790565b610a325760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610686565b6001600160a01b038216612b865760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610686565b6000818152606760205260409020546001600160a01b031615612beb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610686565b6000818152606760205260409020546001600160a01b031615612c505760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610686565b6001600160a01b038216600081815260686020908152604080832080546001019055848352606790915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612cc79061364a565b90600052602060002090601f016020900481019282612ce95760008555612d2f565b82601f10612d0257805160ff1916838001178555612d2f565b82800160010185558215612d2f579182015b82811115612d2f578251825591602001919060010190612d14565b506129199291505b808211156129195760008155600101612d37565b600067ffffffffffffffff831115612d6557612d656136b6565b612d78601f8401601f19166020016135d6565b9050828152838383011115612d8c57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114612dba57600080fd5b919050565b600082601f830112612dcf578081fd5b81356020612de4612ddf83613607565b6135d6565b80838252828201915082860187848660051b8901011115612e03578586fd5b855b85811015612e4457813567ffffffffffffffff811115612e23578788fd5b612e318a87838c0101612eae565b8552509284019290840190600101612e05565b5090979650505050505050565b600082601f830112612e61578081fd5b81356020612e71612ddf83613607565b80838252828201915082860187848660051b8901011115612e90578586fd5b855b85811015612e4457813584529284019290840190600101612e92565b600082601f830112612ebe578081fd5b61104e83833560208501612d4b565b600060208284031215612ede578081fd5b61104e82612da3565b60008060408385031215612ef9578081fd5b612f0283612da3565b9150612f1060208401612da3565b90509250929050565b600080600060608486031215612f2d578081fd5b612f3684612da3565b9250612f4460208501612da3565b9150604084013590509250925092565b60008060008060808587031215612f69578081fd5b612f7285612da3565b9350612f8060208601612da3565b925060408501359150606085013567ffffffffffffffff811115612fa2578182fd5b8501601f81018713612fb2578182fd5b612fc187823560208401612d4b565b91505092959194509250565b60008060408385031215612fdf578182fd5b612fe883612da3565b915060208301358015158114612ffc578182fd5b809150509250929050565b60008060006060848603121561301b578283fd5b61302484612da3565b9250602084013567ffffffffffffffff80821115613040578384fd5b61304c87838801612eae565b93506040860135915080821115613061578283fd5b5061306e86828701612eae565b9150509250925092565b6000806040838503121561308a578182fd5b61309383612da3565b946020939093013593505050565b600080600080600060a086880312156130b8578081fd5b6130c186612da3565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff8111156130f1578182fd5b6130fd88828901612eae565b9150509295509295909350565b6000806040838503121561311c578182fd5b823567ffffffffffffffff80821115613133578384fd5b61313f86838701612e51565b93506020850135915080821115613154578283fd5b5061316185828601612dbf565b9150509250929050565b6000806040838503121561317d578182fd5b823567ffffffffffffffff80821115613194578384fd5b6131a086838701612e51565b935060208501359150808211156131b5578283fd5b5061316185828601612e51565b6000806000606084860312156131d6578081fd5b833567ffffffffffffffff808211156131ed578283fd5b6131f987838801612e51565b9450602086013591508082111561320e578283fd5b5061321b86828701612e51565b92505061322a60408501612da3565b90509250925092565b600080600060608486031215613247578081fd5b833567ffffffffffffffff8082111561325e578283fd5b61326a87838801612e51565b9450602086013591508082111561327f578283fd5b61328b87838801612e51565b935060408601359150808211156132a0578283fd5b5061306e86828701612dbf565b6000602082840312156132be578081fd5b813561104e816136cc565b6000602082840312156132da578081fd5b815161104e816136cc565b6000602082840312156132f6578081fd5b5035919050565b6000806040838503121561330f578182fd5b82359150602083013567ffffffffffffffff81111561332c578182fd5b61316185828601612eae565b6000806040838503121561334a578182fd5b50508035926020909101359150565b60008060006060848603121561336d578081fd5b833592506020840135915061322a60408501612da3565b6000815180845260208085019450848260051b8601828601855b85811015612e445783830389526133b6838351613402565b9885019892509084019060010161339e565b6000815180845260208085019450808401835b838110156133f7578151875295820195908201906001016133db565b509495945050505050565b60008151808452815b818110156134275760208185018101518683018201520161340b565b818111156134385782602083870101525b50601f01601f19169290920160200192915050565b60006001600160a01b0380871683528086166020840152506080604083015261347960808301856133c8565b828103606084015261348b81856133c8565b979650505050505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526134c86080830184613402565b9695505050505050565b6001600160a01b03841681526060602082015260006134f460608301856133c8565b82810360408401526134c88185613384565b6001600160a01b038516815260806020820152600061352860808301866133c8565b828103604084015261353a81866133c8565b9050828103606084015261348b8185613384565b6001600160a01b03841681528260208201526060604082015260006117556060830184613402565b6020808252825182820181905260009190848201906040850190845b818110156135b75783516001600160a01b031683529284019291840191600101613592565b50909695505050505050565b60208152600061104e6020830184613402565b604051601f8201601f1916810167ffffffffffffffff811182821017156135ff576135ff6136b6565b604052919050565b600067ffffffffffffffff821115613621576136216136b6565b5060051b60200190565b6000816000190483118215151615613645576136456136a0565b500290565b600181811c9082168061365e57607f821691505b6020821081141561367f57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613699576136996136a0565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114611b8c57600080fdfea2646970667358221220a66232d28d7b638767088c1f98e3b427be64520963ce9988ff231262cd04584664736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.