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
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 14487008 | 949 days ago | IN | 0 ETH | 0.13577624 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Ship
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "../../errors.sol"; import "./IURIBuilder.sol"; import "../Property.sol"; import "./TraitSet.sol"; import "../../utils/Random.sol"; contract Ship is Property { struct ShipParams { uint128 base; uint8 flags; uint8 maxHealth; uint8 minHealth; uint8 maxSpeed; uint8 minSpeed; uint248 gilding; uint8 sails; } mapping(uint256 => ShipParams) private _params; mapping(uint256 => TraitSet) private _traits; IURIBuilder private _uriBuilder; /// @custom:oz-upgrades-unsafe-allow constructor // solhint-disable-next-line no-empty-blocks constructor() initializer {} function initialize(Tier[5] calldata tiers) public initializer { __Property_init("Ship", "SHIP", tiers); _params[1] = ShipParams({ base: 4, flags: 0, gilding: 0, maxHealth: 10, minHealth: 2, maxSpeed: 5, minSpeed: 2, sails: 0 }); _params[2] = ShipParams({ base: 4, flags: 0, gilding: 4, maxHealth: 20, minHealth: 10, maxSpeed: 10, minSpeed: 5, sails: 5 }); _params[3] = ShipParams({ base: 4, flags: 0, gilding: 8, maxHealth: 70, minHealth: 30, maxSpeed: 20, minSpeed: 10, sails: 7 }); _params[4] = ShipParams({ base: 4, flags: 4, gilding: 8, maxHealth: 160, minHealth: 80, maxSpeed: 40, minSpeed: 20, sails: 8 }); _params[5] = ShipParams({ base: 0x0546_0546_0546_0546_0546_0546_0546_0226, flags: 4, gilding: 0x044c_044c_044c_044c_044c_044c_044c_044c_044c_044c_044c_044c_00e6, maxHealth: 0, minHealth: 0, maxSpeed: 0, minSpeed: 0, sails: 11 }); } function setURIBuilder(address address_) external override onlyOwner { _uriBuilder = IURIBuilder(address_); } function traitsOf(uint256 tokenId) external view onlyOwner returns (TraitSet memory) { _ensureExists(tokenId); return _traits[tokenId]; } function tokenURI(uint256 tokenId) public view override returns (string memory) { _ensureExists(tokenId); return _uriBuilder.build(tokenId, _traits[tokenId]); } function upgrade(uint256[] calldata tokenIds, uint256[] calldata tiers) public override { super.upgrade(tokenIds, tiers); uint256 seed = _nonce; for (uint256 i; i < tokenIds.length; i++) { uint256 tier = tiers[i]; uint256 tokenId = tokenIds[i]; if (_traits[tokenId].tier >= tier) { revert IllegalUpgrade(tokenId, tier); } ShipParams memory params = _params[tier]; TraitSet memory traits; traits.tier = uint8(tier); if (tier < 5) { traits.base = Base(Random.inRange(0, params.base, seed++)); traits.gilding = uint8(Random.inRange(1, params.gilding, seed++)); traits.health = uint16(Random.inRange(params.minHealth, params.maxHealth, seed++) * 50); traits.sails = uint8(Random.inRange(1, params.sails, seed++)); traits.speed = uint16(Random.inRange(params.minSpeed, params.maxSpeed, seed++) * 5); } if (tier == 4) { traits.flags = uint8(Random.inRange(1, params.flags, seed++)); } else if (tier == 5) { traits.base = Base(Random.weighted(params.base, 8, seed++)); traits.health = 15000; traits.speed = 400; if (traits.base != Base.Turtle) { traits.gilding = uint8(Random.weighted(params.gilding, 13, seed++) + 1); traits.flags = uint8(Random.inRange(1, params.flags, seed++)); traits.sails = uint8(Random.inRange(1, params.sails, seed++)); } } _traits[tokenId] = traits; } _updateNonce(); } function _mintCore(uint256 tokenId) internal override { ShipParams memory params = _params[1]; uint256 seed = _nonce; _traits[tokenId] = TraitSet({ base: Base(Random.inRange(0, params.base, seed++)), flags: 0, gilding: 0, health: uint16(Random.inRange(params.minHealth, params.maxHealth, seed++) * 50), sails: 0, speed: uint16(Random.inRange(params.minSpeed, params.maxSpeed, seed++) * 5), tier: 1 }); } function _tierOf(uint256 tokenId) internal view override returns (uint256) { return _traits[tokenId].tier; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; error ArgumentMismatch(); error CallerNotEOA(); error IllegalUpgrade(uint256 tokenId, uint256 tier); error InsufficientFunds(); error InvalidPaymentAmount(); error InvalidProof(); error InvalidTraitType(); error MintingUnavailable(); error MintLimitExceeded(uint256 limit); error OutOfRange(uint256 min, uint256 max); error SoldOut(); error TierUnavailable(uint256 tier); error TokenNotFound(uint256 value); error Unauthorized();
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "./TraitSet.sol"; interface IURIBuilder { function build(uint256 tokenId, TraitSet calldata traits) external view returns (string memory); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "../booty/IBooty.sol"; import "../errors.sol"; // solhint-disable not-rely-on-time abstract contract Property is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, PausableUpgradeable, OwnableUpgradeable, UUPSUpgradeable { using AddressUpgradeable for address; using CountersUpgradeable for CountersUpgradeable.Counter; struct Tier { uint256 mintPrice; uint16 maxSupply; uint176 totalSupply; uint64 launchDelay; } uint64 private _launchDate; uint256 internal _nonce; mapping(uint256 => Tier) private _tiers; IBooty private _booty; CountersUpgradeable.Counter private _tokenIdCounter; modifier onlyEOA() { // solhint-disable-next-line avoid-tx-origin if (msg.sender.isContract() || msg.sender != tx.origin) { revert CallerNotEOA(); } _; } // solhint-disable-next-line func-name-mixedcase function __Property_init( string memory name_, string memory symbol_, Tier[5] calldata tiers ) internal onlyInitializing { __ERC721_init(name_, symbol_); __ERC721Enumerable_init(); __Pausable_init(); __Ownable_init(); __UUPSUpgradeable_init(); __Property_init_unchained(tiers); } // solhint-disable-next-line func-name-mixedcase function __Property_init_unchained(Tier[5] calldata tiers) internal onlyInitializing { for (uint256 i; i < tiers.length; i++) { _tiers[i + 1] = tiers[i]; } _nonce = uint256(keccak256(abi.encodePacked(block.timestamp, msg.sender))); } function mint(address to) external whenNotPaused onlyEOA { if (_launchDate + _tiers[1].launchDelay >= block.timestamp) { revert MintingUnavailable(); } if (_booty.balanceOf(msg.sender) < _tiers[1].mintPrice) { revert InsufficientFunds(); } _booty.burnFrom(msg.sender, _tiers[1].mintPrice); _tokenIdCounter.increment(); uint256 tokenId = _tokenIdCounter.current(); _tiers[1].totalSupply++; _mintCore(tokenId); _safeMint(to, tokenId); _updateNonce(); } function pause() external onlyOwner { _pause(); } function setBooty(address address_) external onlyOwner { _booty = IBooty(address_); } function setLaunchDate(uint64 timestamp) external onlyOwner { _launchDate = timestamp; } function setURIBuilder(address address_) external virtual; function totalSupply(uint256 tier) external view returns (uint256) { if (tier < 1 || tier > 5) { revert OutOfRange(1, 5); } return _tiers[tier].totalSupply; } function unpause() external onlyOwner { _unpause(); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } function upgrade(uint256[] calldata tokenIds, uint256[] calldata tiers) public virtual whenNotPaused onlyEOA { if (tokenIds.length != tiers.length) { revert ArgumentMismatch(); } uint256 totalPrice; for (uint256 i; i < tokenIds.length; i++) { uint256 toTier = tiers[i]; uint256 tokenId = tokenIds[i]; if (_launchDate + _tiers[toTier].launchDelay > block.timestamp) { revert TierUnavailable(toTier); } if (msg.sender != ownerOf(tokenId)) { revert Unauthorized(); } if (toTier < 2 || toTier > 5) { revert OutOfRange(2, 5); } if (toTier >= 3 && _tiers[toTier].totalSupply >= _tiers[toTier].maxSupply) { revert SoldOut(); } uint256 fromTier = _tierOf(tokenId); for (uint256 t = fromTier + 1; t <= toTier; t++) { totalPrice += _tiers[t].mintPrice; } _tiers[fromTier].totalSupply--; _tiers[toTier].totalSupply++; } if (_booty.balanceOf(msg.sender) < totalPrice) { revert InsufficientFunds(); } _booty.burnFrom(msg.sender, totalPrice); } // solhint-disable-next-line no-empty-blocks function _authorizeUpgrade(address) internal override onlyOwner {} function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) whenNotPaused { super._beforeTokenTransfer(from, to, tokenId); } function _ensureExists(uint256 tokenId) internal view { if (!_exists(tokenId)) { revert TokenNotFound(tokenId); } } function _mintCore(uint256 tokenId) internal virtual; function _tierOf(uint256 tokenId) internal view virtual returns (uint256); function _updateNonce() internal { _nonce = uint256(keccak256(abi.encodePacked(block.timestamp, msg.sender, _nonce))); } // See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[32] private __gap; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; enum Base { Maple, Sunken, Oak, Teak, Black, Blue, Cherry, Turtle } struct TraitSet { Base base; uint8 flags; uint8 gilding; uint16 health; uint8 sails; uint16 speed; uint8 tier; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; library Random { function inRange( uint256 min, uint256 max, uint256 seed ) internal view returns (uint256) { return (_generate(seed) % (max - min + 1)) + min; // [min..max] } function weighted( uint256 pool, uint256 count, uint256 seed ) internal view returns (uint256) { uint256 last = count - 1; uint256 r = _generate(seed) % 100_00; // [0..99_99] uint256 w; for (uint256 i; i < last; i++) { w += uint16(pool >> ((last - i) << 4)); if (r < w) { return i; } } return last; } function _generate(uint256 seed) private view returns (uint256) { unchecked { return uint256( keccak256( abi.encodePacked( block.basefee, seed, block.coinbase, uint256(blockhash(block.number - uint8(seed >> (seed & 0x7f)))), // solhint-disable-next-line not-rely-on-time block.timestamp ) ) ); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @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.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; 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. * * 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 initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) 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[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { 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.5.0) (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: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {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 a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try 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 { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @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 v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @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[46] 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: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; interface IBooty is IERC20Upgradeable { function burnFrom(address account, uint256 amount) external; function mint(address to, uint256 amount) external; }
// 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.5.0) (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 functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @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 v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface 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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArgumentMismatch","type":"error"},{"inputs":[],"name":"CallerNotEOA","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"IllegalUpgrade","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"MintingUnavailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"OutOfRange","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"TierUnavailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokenNotFound","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","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":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"uint176","name":"totalSupply","type":"uint176"},{"internalType":"uint64","name":"launchDelay","type":"uint64"}],"internalType":"struct Property.Tier[5]","name":"tiers","type":"tuple[5]"}],"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":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"setBooty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"timestamp","type":"uint64"}],"name":"setLaunchDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"}],"name":"setURIBuilder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"traitsOf","outputs":[{"components":[{"internalType":"enum Base","name":"base","type":"uint8"},{"internalType":"uint8","name":"flags","type":"uint8"},{"internalType":"uint8","name":"gilding","type":"uint8"},{"internalType":"uint16","name":"health","type":"uint16"},{"internalType":"uint8","name":"sails","type":"uint8"},{"internalType":"uint16","name":"speed","type":"uint16"},{"internalType":"uint8","name":"tier","type":"uint8"}],"internalType":"struct TraitSet","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"tiers","type":"uint256[]"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b50600054610100900460ff16620000335760005460ff16156200003d565b6200003d620000e2565b620000a55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff16158015620000c8576000805461ffff19166101011790555b8015620000db576000805461ff00191690555b506200010f565b6000620000fa306200010060201b620022ac1760201c565b15905090565b6001600160a01b03163b151590565b60805161478c6200014760003960008181610a3c01528181610a7c015281816114a6015281816114e60152611608015261478c6000f3fe6080604052600436106101ee5760003560e01c806352d1902d1161010d5780638da5cb5b116100a0578063b88d4fde1161006f578063b88d4fde14610562578063bd85b03914610582578063c87b56dd146105a2578063e985e9c5146105c2578063f2fde38b1461060b57600080fd5b80638da5cb5b146104ef57806393e817411461050d57806395d89b411461052d578063a22cb4651461054257600080fd5b80636a627842116100dc5780636a6278421461048557806370a08231146104a5578063715018a6146104c55780638456cb59146104da57600080fd5b806352d1902d1461040b5780635c975abb146104205780635efab6e4146104385780636352211e1461046557600080fd5b80632b5203ac1161018557806342842e0e1161015457806342842e0e1461039857806347d9e8f8146103b85780634f1ef286146103d85780634f6ccce7146103eb57600080fd5b80632b5203ac146103235780632f745c59146103435780633659cfe6146103635780633f4ba83a1461038357600080fd5b8063095ea7b3116101c1578063095ea7b3146102a45780630b2d72cb146102c457806318160ddd146102e457806323b872dd1461030357600080fd5b806301ffc9a7146101f357806306fdde031461022857806307ae666c1461024a578063081812fc1461026c575b600080fd5b3480156101ff57600080fd5b5061021361020e366004613ce7565b61062b565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d61063c565b60405161021f9190613d5c565b34801561025657600080fd5b5061026a610265366004613d86565b6106ce565b005b34801561027857600080fd5b5061028c610287366004613da1565b610724565b6040516001600160a01b03909116815260200161021f565b3480156102b057600080fd5b5061026a6102bf366004613dba565b6107b9565b3480156102d057600080fd5b5061026a6102df366004613df9565b6108cf565b3480156102f057600080fd5b506099545b60405190815260200161021f565b34801561030f57600080fd5b5061026a61031e366004613e16565b61091d565b34801561032f57600080fd5b5061026a61033e366004613d86565b61094e565b34801561034f57600080fd5b506102f561035e366004613dba565b61099b565b34801561036f57600080fd5b5061026a61037e366004613d86565b610a31565b34801561038f57600080fd5b5061026a610b11565b3480156103a457600080fd5b5061026a6103b3366004613e16565b610b45565b3480156103c457600080fd5b5061026a6103d3366004613e52565b610b60565b61026a6103e6366004613f40565b61149b565b3480156103f757600080fd5b506102f5610406366004613da1565b611568565b34801561041757600080fd5b506102f56115fb565b34801561042c57600080fd5b5060c95460ff16610213565b34801561044457600080fd5b50610458610453366004613da1565b6116ae565b60405161021f9190613fc5565b34801561047157600080fd5b5061028c610480366004613da1565b6117c1565b34801561049157600080fd5b5061026a6104a0366004613d86565b611838565b3480156104b157600080fd5b506102f56104c0366004613d86565b611b01565b3480156104d157600080fd5b5061026a611b88565b3480156104e657600080fd5b5061026a611bbc565b3480156104fb57600080fd5b5060fb546001600160a01b031661028c565b34801561051957600080fd5b5061026a61052836600461407b565b611bee565b34801561053957600080fd5b5061023d6120c2565b34801561054e57600080fd5b5061026a61055d3660046140e6565b6120d1565b34801561056e57600080fd5b5061026a61057d366004614122565b6120dc565b34801561058e57600080fd5b506102f561059d366004613da1565b612114565b3480156105ae57600080fd5b5061023d6105bd366004613da1565b612173565b3480156105ce57600080fd5b506102136105dd366004614189565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561061757600080fd5b5061026a610626366004613d86565b612214565b6000610636826122bb565b92915050565b60606065805461064b906141bc565b80601f0160208091040260200160405190810160405280929190818152602001828054610677906141bc565b80156106c45780601f10610699576101008083540402835291602001916106c4565b820191906000526020600020905b8154815290600101906020018083116106a757829003601f168201915b5050505050905090565b60fb546001600160a01b031633146107015760405162461bcd60e51b81526004016106f8906141f7565b60405180910390fd5b61019480546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152606760205260408120546001600160a01b031661079d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f8565b506000908152606960205260409020546001600160a01b031690565b60006107c4826117c1565b9050806001600160a01b0316836001600160a01b031614156108325760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106f8565b336001600160a01b038216148061084e575061084e81336105dd565b6108c05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106f8565b6108ca83836122e0565b505050565b60fb546001600160a01b031633146108f95760405162461bcd60e51b81526004016106f8906141f7565b610191805467ffffffffffffffff19166001600160401b0392909216919091179055565b610927338261234e565b6109435760405162461bcd60e51b81526004016106f89061422c565b6108ca838383612445565b60fb546001600160a01b031633146109785760405162461bcd60e51b81526004016106f8906141f7565b6101b880546001600160a01b0319166001600160a01b0392909216919091179055565b60006109a683611b01565b8210610a085760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106f8565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610a7a5760405162461bcd60e51b81526004016106f89061427d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ac3600080516020614710833981519152546001600160a01b031690565b6001600160a01b031614610ae95760405162461bcd60e51b81526004016106f8906142c9565b610af2816125ec565b60408051600080825260208201909252610b0e91839190612616565b50565b60fb546001600160a01b03163314610b3b5760405162461bcd60e51b81526004016106f8906141f7565b610b43612790565b565b6108ca838383604051806020016040528060008152506120dc565b600054610100900460ff16610b7b5760005460ff1615610b7f565b303b155b610be25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f8565b600054610100900460ff16158015610c04576000805461ffff19166101011790555b610c47604051806040016040528060048152602001630536869760e41b815250604051806040016040528060048152602001630534849560e41b81525084612823565b60405180610100016040528060046001600160801b03168152602001600060ff168152602001600a60ff168152602001600260ff168152602001600560ff168152602001600260ff16815260200160006001600160f81b03168152602001600060ff168152506101b660006001815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff16021790555090505060405180610100016040528060046001600160801b03168152602001600060ff168152602001601460ff168152602001600a60ff168152602001600a60ff168152602001600560ff16815260200160046001600160f81b03168152602001600560ff168152506101b660006002815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff16021790555090505060405180610100016040528060046001600160801b03168152602001600060ff168152602001604660ff168152602001601e60ff168152602001601460ff168152602001600a60ff16815260200160086001600160f81b03168152602001600760ff168152506101b660006003815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff16021790555090505060405180610100016040528060046001600160801b03168152602001600460ff16815260200160a060ff168152602001605060ff168152602001602860ff168152602001601460ff16815260200160086001600160f81b03168152602001600860ff168152506101b660006004815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff1602179055509050506040518061010001604052806f054605460546054605460546054602266001600160801b03168152602001600460ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff16815260200179044c044c044c044c044c044c044c044c044c044c044c044c00e66001600160f81b03168152602001600b60ff168152506101b660006005815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff1602179055509050508015611497576000805461ff00191690555b5050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156114e45760405162461bcd60e51b81526004016106f89061427d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661152d600080516020614710833981519152546001600160a01b031690565b6001600160a01b0316146115535760405162461bcd60e51b81526004016106f8906142c9565b61155c826125ec565b61149782826001612616565b600061157360995490565b82106115d65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106f8565b609982815481106115e9576115e9614315565b90600052602060002001549050919050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461169b5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016106f8565b5060008051602061471083398151915290565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915260fb546001600160a01b031633146117115760405162461bcd60e51b81526004016106f8906141f7565b61171a8261287d565b60008281526101b7602052604090819020815160e081019092528054829060ff16600781111561174c5761174c613f8d565b600781111561175d5761175d613f8d565b8152905460ff6101008204811660208401526201000082048116604084015261ffff630100000083048116606085015265010000000000830482166080850152600160301b83041660a0840152600160401b9091041660c09091015290505b919050565b6000818152606760205260408120546001600160a01b0316806106365760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106f8565b60c95460ff161561185b5760405162461bcd60e51b81526004016106f89061432b565b333b15158061186a5750333214155b156118875760405162be758160e31b815260040160405180910390fd5b60016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d2475546101915442916118d7916001600160401b03600160c01b9092048216911661436b565b6001600160401b0316106118fe57604051630abdb6c560e41b815260040160405180910390fd5b60016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d247454610194546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561196f57600080fd5b505afa158015611983573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a79190614396565b10156119c65760405163356680b760e01b815260040160405180910390fd5b6101945460016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d24745460405163079cc67960e41b815233600482015260248101919091526001600160a01b03909116906379cc679090604401600060405180830381600087803b158015611a4157600080fd5b505af1158015611a55573d6000803e3d6000fd5b50505050611a6861019580546001019055565b6000611a746101955490565b60016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d24758054919250620100009091046001600160b01b0316906002611ac1836143af565b91906101000a8154816001600160b01b0302191690836001600160b01b0316021790555050611aef816128b5565b611af98282612b4f565b611497612b69565b60006001600160a01b038216611b6c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106f8565b506001600160a01b031660009081526068602052604090205490565b60fb546001600160a01b03163314611bb25760405162461bcd60e51b81526004016106f8906141f7565b610b436000612bb5565b60fb546001600160a01b03163314611be65760405162461bcd60e51b81526004016106f8906141f7565b610b43612c07565b611bfa84848484612c5f565b6101925460005b848110156120b2576000848483818110611c1d57611c1d614315565b9050602002013590506000878784818110611c3a57611c3a614315565b6020908102929092013560008181526101b790935260409092205491925050600160401b900460ff168211611c8c57604051630a6c9dd160e11b815260048101829052602481018390526044016106f8565b60008281526101b6602090815260409182902082516101008101845281546001600160801b038116825260ff600160801b8204811694830194909452600160881b8104841694820194909452600160901b840483166060820152600160981b840483166080820152600160a01b909304821660a0840152600101546001600160f81b03811660c0840152600160f81b90041660e0820152611d646040805160e08101909152806000815260006020820181905260408201819052606082018190526080820181905260a0820181905260c09091015290565b60ff841660c08201526005841015611e88578151611d99906000906001600160801b031688611d92816143d6565b995061305b565b6007811115611daa57611daa613f8d565b81906007811115611dbd57611dbd613f8d565b90816007811115611dd057611dd0613f8d565b81525050611df260018360c001516001600160f81b03168880611d92906143d6565b60ff908116604080840191909152606084015190840151611e1c92918216911688611d92816143d6565b611e279060326143f1565b61ffff16606082015260e0820151611e499060019060ff1688611d92816143d6565b60ff90811660808084019190915260a084015190840151611e7392918216911688611d92816143d6565b611e7e9060056143f1565b61ffff1660a08201525b8360041415611eb657611ea96001836020015160ff168880611d92906143d6565b60ff166020820152611fb9565b8360051415611fb9578151611ee1906001600160801b0316600888611eda816143d6565b995061309a565b6007811115611ef257611ef2613f8d565b81906007811115611f0557611f05613f8d565b90816007811115611f1857611f18613f8d565b905250613a98606082015261019060a0820152600781516007811115611f4057611f40613f8d565b14611fb957611f638260c001516001600160f81b0316600d8880611eda906143d6565b611f6e906001614410565b60ff90811660408301526020830151611f8f916001911688611d92816143d6565b60ff908116602083015260e0830151611fb0916001911688611d92816143d6565b60ff1660808201525b60008381526101b7602052604090208151815483929190829060ff19166001836007811115611fea57611fea613f8d565b02179055506020820151815460408401516060850151608086015160a087015160c09097015162ffff001990941661010060ff9687160262ff000019161762010000938616939093029290921765ffffff0000001916630100000061ffff9283160265ff000000000019161765010000000000928516929092029190911768ffffff0000000000001916600160301b919095160260ff60401b191693909317600160401b9190931602919091179055508392506120aa91508290506143d6565b915050611c01565b506120bb612b69565b5050505050565b60606066805461064b906141bc565b611497338383613123565b6120e6338361234e565b6121025760405162461bcd60e51b81526004016106f89061422c565b61210e848484846131f2565b50505050565b600060018210806121255750600582115b1561214d5760405163abe5c32f60e01b815260016004820152600560248201526044016106f8565b50600090815261019360205260409020600101546201000090046001600160b01b031690565b606061217e8261287d565b6101b85460008381526101b760205260409081902090516379fc1e2160e11b81526001600160a01b039092169163f3f83c42916121c091869190600401614428565b60006040518083038186803b1580156121d857600080fd5b505afa1580156121ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106369190810190614495565b60fb546001600160a01b0316331461223e5760405162461bcd60e51b81526004016106f8906141f7565b6001600160a01b0381166122a35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f8565b610b0e81612bb5565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b1480610636575061063682613225565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612315826117c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b03166123c75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f8565b60006123d2836117c1565b9050806001600160a01b0316846001600160a01b0316148061240d5750836001600160a01b031661240284610724565b6001600160a01b0316145b8061243d57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612458826117c1565b6001600160a01b0316146124bc5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106f8565b6001600160a01b03821661251e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106f8565b612529838383613275565b6125346000826122e0565b6001600160a01b038316600090815260686020526040812080546001929061255d908490614502565b90915550506001600160a01b038216600090815260686020526040812080546001929061258b908490614410565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60fb546001600160a01b03163314610b0e5760405162461bcd60e51b81526004016106f8906141f7565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612649576108ca836132a3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561268257600080fd5b505afa9250505080156126b2575060408051601f3d908101601f191682019092526126af91810190614396565b60015b6127155760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016106f8565b60008051602061471083398151915281146127845760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016106f8565b506108ca83838361333f565b60c95460ff166127d95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106f8565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff1661284a5760405162461bcd60e51b81526004016106f890614519565b6128548383613364565b61285c613395565b6128646133bc565b61286c6133eb565b612874613395565b6108ca8161341a565b6000818152606760205260409020546001600160a01b0316610b0e576040516306caeb1360e41b8152600481018290526024016106f8565b600160009081526101b6602090815260408051610100810182527f5724c694f1d534ffec1333eb9bb83f0fc3234d7f4d8a544a412f6d0b1cd56748546001600160801b03808216835260ff600160801b8304811695840195909552600160881b8204851683850152600160901b820485166060840152600160981b820485166080840152600160a01b909104841660a08301527f5724c694f1d534ffec1333eb9bb83f0fc3234d7f4d8a544a412f6d0b1cd56749546001600160f81b03811660c0840152600160f81b900490931660e080830191909152610192548351918201909352815191949293909283926129b89216856129b1816143d6565b965061305b565b60078111156129c9576129c9613f8d565b60078111156129da576129da613f8d565b8152602001600060ff168152602001600060ff168152602001612a11846060015160ff16856040015160ff1685806129b1906143d6565b612a1c9060326143f1565b61ffff168152602001600060ff168152602001612a4d8460a0015160ff16856080015160ff1685806129b1906143d6565b612a589060056143f1565b61ffff1681526001602091820181905260008681526101b790925260409091208251815491929091839160ff1990911690836007811115612a9b57612a9b613f8d565b02179055506020820151815460408401516060850151608086015160a087015160c09097015162ffff001990941661010060ff9687160262ff000019161762010000938616939093029290921765ffffff0000001916630100000061ffff9283160265ff000000000019161765010000000000928516929092029190911768ffffff0000000000001916600160301b919095160260ff60401b191693909317600160401b9190931602919091179055505050565b6114978282604051806020016040528060008152506134e4565b61019254604080514260208201526001600160601b03193360601b1691810191909152605481019190915260740160408051601f19818403018152919052805160209091012061019255565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c95460ff1615612c2a5760405162461bcd60e51b81526004016106f89061432b565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128063390565b60c95460ff1615612c825760405162461bcd60e51b81526004016106f89061432b565b333b151580612c915750333214155b15612cae5760405162be758160e31b815260040160405180910390fd5b828114612cce5760405163fb0cc75360e01b815260040160405180910390fd5b6000805b84811015612f53576000848483818110612cee57612cee614315565b9050602002013590506000878784818110612d0b57612d0b614315565b600085815261019360209081526040909120600101546101915491909202939093013593504292612d5092506001600160401b03600160c01b9092048216911661436b565b6001600160401b03161115612d7b57604051630be18a7560e31b8152600481018390526024016106f8565b612d84816117c1565b6001600160a01b0316336001600160a01b031614612db4576040516282b42960e81b815260040160405180910390fd5b6002821080612dc35750600582115b15612deb5760405163abe5c32f60e01b815260026004820152600560248201526044016106f8565b60038210158015612e2257506000828152610193602052604090206001015461ffff8116620100009091046001600160b01b031610155b15612e40576040516352df9fe560e01b815260040160405180910390fd5b60008181526101b76020526040812054600160401b900460ff1690612e66826001614410565b90505b838111612e9e5760008181526101936020526040902054612e8a9087614410565b955080612e96816143d6565b915050612e69565b5060008181526101936020526040902060010180546201000090046001600160b01b0316906002612ece83614564565b82546101009290920a6001600160b01b03818102199093169183160217909155600085815261019360205260409020600101805462010000900490911691506002612f18836143af565b91906101000a8154816001600160b01b0302191690836001600160b01b03160217905550505050508080612f4b906143d6565b915050612cd2565b50610194546040516370a0823160e01b815233600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015612f9857600080fd5b505afa158015612fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd09190614396565b1015612fef5760405163356680b760e01b815260040160405180910390fd5b6101945460405163079cc67960e41b8152336004820152602481018390526001600160a01b03909116906379cc679090604401600060405180830381600087803b15801561303c57600080fd5b505af1158015613050573d6000803e3d6000fd5b505050505050505050565b6000836130688185614502565b613073906001614410565b61307c84613517565b6130869190614587565b6130909190614410565b90505b9392505050565b6000806130a8600185614502565b905060006127106130b885613517565b6130c29190614587565b90506000805b838110156131175760046130dc8286614502565b901b88901c61ffff16826130f09190614410565b91508183101561310557935061309392505050565b8061310f816143d6565b9150506130c8565b50919695505050505050565b816001600160a01b0316836001600160a01b031614156131855760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106f8565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6131fd848484612445565b61320984848484613577565b61210e5760405162461bcd60e51b81526004016106f8906145a9565b60006001600160e01b031982166380ac58cd60e01b148061325657506001600160e01b03198216635b5e139f60e01b145b8061063657506301ffc9a760e01b6001600160e01b0319831614610636565b60c95460ff16156132985760405162461bcd60e51b81526004016106f89061432b565b6108ca838383613684565b6001600160a01b0381163b6133105760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f8565b60008051602061471083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6133488361373c565b6000825111806133555750805b156108ca5761210e838361377c565b600054610100900460ff1661338b5760405162461bcd60e51b81526004016106f890614519565b6114978282613870565b600054610100900460ff16610b435760405162461bcd60e51b81526004016106f890614519565b600054610100900460ff166133e35760405162461bcd60e51b81526004016106f890614519565b610b436138be565b600054610100900460ff166134125760405162461bcd60e51b81526004016106f890614519565b610b436138f1565b600054610100900460ff166134415760405162461bcd60e51b81526004016106f890614519565b60005b60058110156134a25781816005811061345f5761345f614315565b608002016101936000613473846001614410565b8152602001908152602001600020818161348d91906145fb565b5081905061349a816143d6565b915050613444565b50604080514260208201526001600160601b03193360601b169181019190915260540160408051601f1981840301815291905280516020909101206101925550565b6134ee8383613921565b6134fb6000848484613577565b6108ca5760405162461bcd60e51b81526004016106f8906145a9565b6040805148602082015290810182905241606090811b6001600160601b0319169082015260ff607f831683901c16430340607482015242609482015260009060b40160408051601f19818403018152919052805160209091012092915050565b60006001600160a01b0384163b1561367957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906135bb903390899088908890600401614683565b602060405180830381600087803b1580156135d557600080fd5b505af1925050508015613605575060408051601f3d908101601f19168201909252613602918101906146c0565b60015b61365f573d808015613633576040519150601f19603f3d011682016040523d82523d6000602084013e613638565b606091505b5080516136575760405162461bcd60e51b81526004016106f8906145a9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061243d565b506001949350505050565b6001600160a01b0383166136df576136da81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b613702565b816001600160a01b0316836001600160a01b031614613702576137028382613a6f565b6001600160a01b038216613719576108ca81613b0c565b826001600160a01b0316826001600160a01b0316146108ca576108ca8282613bbb565b613745816132a3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6137e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f8565b600080846001600160a01b0316846040516137ff91906146dd565b600060405180830381855af49150503d806000811461383a576040519150601f19603f3d011682016040523d82523d6000602084013e61383f565b606091505b5091509150613867828260405180606001604052806027815260200161473060279139613bff565b95945050505050565b600054610100900460ff166138975760405162461bcd60e51b81526004016106f890614519565b81516138aa906065906020850190613c38565b5080516108ca906066906020840190613c38565b600054610100900460ff166138e55760405162461bcd60e51b81526004016106f890614519565b60c9805460ff19169055565b600054610100900460ff166139185760405162461bcd60e51b81526004016106f890614519565b610b4333612bb5565b6001600160a01b0382166139775760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106f8565b6000818152606760205260409020546001600160a01b0316156139dc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106f8565b6139e860008383613275565b6001600160a01b0382166000908152606860205260408120805460019290613a11908490614410565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001613a7c84611b01565b613a869190614502565b600083815260986020526040902054909150808214613ad9576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090613b1e90600190614502565b6000838152609a602052604081205460998054939450909284908110613b4657613b46614315565b906000526020600020015490508060998381548110613b6757613b67614315565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480613b9f57613b9f6146f9565b6001900381819060005260206000200160009055905550505050565b6000613bc683611b01565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b60608315613c0e575081613093565b825115613c1e5782518084602001fd5b8160405162461bcd60e51b81526004016106f89190613d5c565b828054613c44906141bc565b90600052602060002090601f016020900481019282613c665760008555613cac565b82601f10613c7f57805160ff1916838001178555613cac565b82800160010185558215613cac579182015b82811115613cac578251825591602001919060010190613c91565b50613cb8929150613cbc565b5090565b5b80821115613cb85760008155600101613cbd565b6001600160e01b031981168114610b0e57600080fd5b600060208284031215613cf957600080fd5b813561309381613cd1565b60005b83811015613d1f578181015183820152602001613d07565b8381111561210e5750506000910152565b60008151808452613d48816020860160208601613d04565b601f01601f19169290920160200192915050565b6020815260006130936020830184613d30565b80356001600160a01b03811681146117bc57600080fd5b600060208284031215613d9857600080fd5b61309382613d6f565b600060208284031215613db357600080fd5b5035919050565b60008060408385031215613dcd57600080fd5b613dd683613d6f565b946020939093013593505050565b6001600160401b0381168114610b0e57600080fd5b600060208284031215613e0b57600080fd5b813561309381613de4565b600080600060608486031215613e2b57600080fd5b613e3484613d6f565b9250613e4260208501613d6f565b9150604084013590509250925092565b6000610280808385031215613e6657600080fd5b838184011115613e7557600080fd5b509092915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613ebb57613ebb613e7d565b604052919050565b60006001600160401b03821115613edc57613edc613e7d565b50601f01601f191660200190565b600082601f830112613efb57600080fd5b8135613f0e613f0982613ec3565b613e93565b818152846020838601011115613f2357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f5357600080fd5b613f5c83613d6f565b915060208301356001600160401b03811115613f7757600080fd5b613f8385828601613eea565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60088110613fc157634e487b7160e01b600052602160045260246000fd5b9052565b600060e082019050613fd8828451613fa3565b60ff602084015116602083015260ff6040840151166040830152606083015161ffff808216606085015260ff60808601511660808501528060a08601511660a0850152505060ff60c08401511660c083015292915050565b60008083601f84011261404257600080fd5b5081356001600160401b0381111561405957600080fd5b6020830191508360208260051b850101111561407457600080fd5b9250929050565b6000806000806040858703121561409157600080fd5b84356001600160401b03808211156140a857600080fd5b6140b488838901614030565b909650945060208701359150808211156140cd57600080fd5b506140da87828801614030565b95989497509550505050565b600080604083850312156140f957600080fd5b61410283613d6f565b91506020830135801515811461411757600080fd5b809150509250929050565b6000806000806080858703121561413857600080fd5b61414185613d6f565b935061414f60208601613d6f565b92506040850135915060608501356001600160401b0381111561417157600080fd5b61417d87828801613eea565b91505092959194509250565b6000806040838503121561419c57600080fd5b6141a583613d6f565b91506141b360208401613d6f565b90509250929050565b600181811c908216806141d057607f821691505b602082108114156141f157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681851680830382111561438d5761438d614355565b01949350505050565b6000602082840312156143a857600080fd5b5051919050565b60006001600160b01b03828116808214156143cc576143cc614355565b6001019392505050565b60006000198214156143ea576143ea614355565b5060010190565b600081600019048311821515161561440b5761440b614355565b500290565b6000821982111561442357614423614355565b500190565b82815281546101008201906144436020840160ff8316613fa3565b60ff8160081c16604084015260ff8160101c16606084015261ffff808260181c16608085015260ff8260281c1660a0850152808260301c1660c08501525060ff8160401c1660e0840152509392505050565b6000602082840312156144a757600080fd5b81516001600160401b038111156144bd57600080fd5b8201601f810184136144ce57600080fd5b80516144dc613f0982613ec3565b8181528560208385010111156144f157600080fd5b613867826020830160208601613d04565b60008282101561451457614514614355565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001600160b01b0382168061457d5761457d614355565b6000190192915050565b6000826145a457634e487b7160e01b600052601260045260246000fd5b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b8135815560018101602083013561ffff811680821461461957600080fd5b825461ffff19811682178455915060408501356001600160b01b038116811461464157600080fd5b62010000600160c01b0360109190911b166001600160c01b031992831682178117845560608601359261467384613de4565b911760c09290921b161790555050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906146b690830184613d30565b9695505050505050565b6000602082840312156146d257600080fd5b815161309381613cd1565b600082516146ef818460208701613d04565b9190910192915050565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220168f628585df86610fd1b51dd2f6dca6ebf4ec5d5aee514fc837dafda39c07be64736f6c63430008090033
Deployed Bytecode
0x6080604052600436106101ee5760003560e01c806352d1902d1161010d5780638da5cb5b116100a0578063b88d4fde1161006f578063b88d4fde14610562578063bd85b03914610582578063c87b56dd146105a2578063e985e9c5146105c2578063f2fde38b1461060b57600080fd5b80638da5cb5b146104ef57806393e817411461050d57806395d89b411461052d578063a22cb4651461054257600080fd5b80636a627842116100dc5780636a6278421461048557806370a08231146104a5578063715018a6146104c55780638456cb59146104da57600080fd5b806352d1902d1461040b5780635c975abb146104205780635efab6e4146104385780636352211e1461046557600080fd5b80632b5203ac1161018557806342842e0e1161015457806342842e0e1461039857806347d9e8f8146103b85780634f1ef286146103d85780634f6ccce7146103eb57600080fd5b80632b5203ac146103235780632f745c59146103435780633659cfe6146103635780633f4ba83a1461038357600080fd5b8063095ea7b3116101c1578063095ea7b3146102a45780630b2d72cb146102c457806318160ddd146102e457806323b872dd1461030357600080fd5b806301ffc9a7146101f357806306fdde031461022857806307ae666c1461024a578063081812fc1461026c575b600080fd5b3480156101ff57600080fd5b5061021361020e366004613ce7565b61062b565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d61063c565b60405161021f9190613d5c565b34801561025657600080fd5b5061026a610265366004613d86565b6106ce565b005b34801561027857600080fd5b5061028c610287366004613da1565b610724565b6040516001600160a01b03909116815260200161021f565b3480156102b057600080fd5b5061026a6102bf366004613dba565b6107b9565b3480156102d057600080fd5b5061026a6102df366004613df9565b6108cf565b3480156102f057600080fd5b506099545b60405190815260200161021f565b34801561030f57600080fd5b5061026a61031e366004613e16565b61091d565b34801561032f57600080fd5b5061026a61033e366004613d86565b61094e565b34801561034f57600080fd5b506102f561035e366004613dba565b61099b565b34801561036f57600080fd5b5061026a61037e366004613d86565b610a31565b34801561038f57600080fd5b5061026a610b11565b3480156103a457600080fd5b5061026a6103b3366004613e16565b610b45565b3480156103c457600080fd5b5061026a6103d3366004613e52565b610b60565b61026a6103e6366004613f40565b61149b565b3480156103f757600080fd5b506102f5610406366004613da1565b611568565b34801561041757600080fd5b506102f56115fb565b34801561042c57600080fd5b5060c95460ff16610213565b34801561044457600080fd5b50610458610453366004613da1565b6116ae565b60405161021f9190613fc5565b34801561047157600080fd5b5061028c610480366004613da1565b6117c1565b34801561049157600080fd5b5061026a6104a0366004613d86565b611838565b3480156104b157600080fd5b506102f56104c0366004613d86565b611b01565b3480156104d157600080fd5b5061026a611b88565b3480156104e657600080fd5b5061026a611bbc565b3480156104fb57600080fd5b5060fb546001600160a01b031661028c565b34801561051957600080fd5b5061026a61052836600461407b565b611bee565b34801561053957600080fd5b5061023d6120c2565b34801561054e57600080fd5b5061026a61055d3660046140e6565b6120d1565b34801561056e57600080fd5b5061026a61057d366004614122565b6120dc565b34801561058e57600080fd5b506102f561059d366004613da1565b612114565b3480156105ae57600080fd5b5061023d6105bd366004613da1565b612173565b3480156105ce57600080fd5b506102136105dd366004614189565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561061757600080fd5b5061026a610626366004613d86565b612214565b6000610636826122bb565b92915050565b60606065805461064b906141bc565b80601f0160208091040260200160405190810160405280929190818152602001828054610677906141bc565b80156106c45780601f10610699576101008083540402835291602001916106c4565b820191906000526020600020905b8154815290600101906020018083116106a757829003601f168201915b5050505050905090565b60fb546001600160a01b031633146107015760405162461bcd60e51b81526004016106f8906141f7565b60405180910390fd5b61019480546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152606760205260408120546001600160a01b031661079d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f8565b506000908152606960205260409020546001600160a01b031690565b60006107c4826117c1565b9050806001600160a01b0316836001600160a01b031614156108325760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106f8565b336001600160a01b038216148061084e575061084e81336105dd565b6108c05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106f8565b6108ca83836122e0565b505050565b60fb546001600160a01b031633146108f95760405162461bcd60e51b81526004016106f8906141f7565b610191805467ffffffffffffffff19166001600160401b0392909216919091179055565b610927338261234e565b6109435760405162461bcd60e51b81526004016106f89061422c565b6108ca838383612445565b60fb546001600160a01b031633146109785760405162461bcd60e51b81526004016106f8906141f7565b6101b880546001600160a01b0319166001600160a01b0392909216919091179055565b60006109a683611b01565b8210610a085760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106f8565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b306001600160a01b037f000000000000000000000000ea474715dc16afed1848437624a088e25525405c161415610a7a5760405162461bcd60e51b81526004016106f89061427d565b7f000000000000000000000000ea474715dc16afed1848437624a088e25525405c6001600160a01b0316610ac3600080516020614710833981519152546001600160a01b031690565b6001600160a01b031614610ae95760405162461bcd60e51b81526004016106f8906142c9565b610af2816125ec565b60408051600080825260208201909252610b0e91839190612616565b50565b60fb546001600160a01b03163314610b3b5760405162461bcd60e51b81526004016106f8906141f7565b610b43612790565b565b6108ca838383604051806020016040528060008152506120dc565b600054610100900460ff16610b7b5760005460ff1615610b7f565b303b155b610be25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f8565b600054610100900460ff16158015610c04576000805461ffff19166101011790555b610c47604051806040016040528060048152602001630536869760e41b815250604051806040016040528060048152602001630534849560e41b81525084612823565b60405180610100016040528060046001600160801b03168152602001600060ff168152602001600a60ff168152602001600260ff168152602001600560ff168152602001600260ff16815260200160006001600160f81b03168152602001600060ff168152506101b660006001815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff16021790555090505060405180610100016040528060046001600160801b03168152602001600060ff168152602001601460ff168152602001600a60ff168152602001600a60ff168152602001600560ff16815260200160046001600160f81b03168152602001600560ff168152506101b660006002815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff16021790555090505060405180610100016040528060046001600160801b03168152602001600060ff168152602001604660ff168152602001601e60ff168152602001601460ff168152602001600a60ff16815260200160086001600160f81b03168152602001600760ff168152506101b660006003815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff16021790555090505060405180610100016040528060046001600160801b03168152602001600460ff16815260200160a060ff168152602001605060ff168152602001602860ff168152602001601460ff16815260200160086001600160f81b03168152602001600860ff168152506101b660006004815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff1602179055509050506040518061010001604052806f054605460546054605460546054602266001600160801b03168152602001600460ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff16815260200179044c044c044c044c044c044c044c044c044c044c044c044c00e66001600160f81b03168152602001600b60ff168152506101b660006005815260200190815260200160002060008201518160000160006101000a8154816001600160801b0302191690836001600160801b0316021790555060208201518160000160106101000a81548160ff021916908360ff16021790555060408201518160000160116101000a81548160ff021916908360ff16021790555060608201518160000160126101000a81548160ff021916908360ff16021790555060808201518160000160136101000a81548160ff021916908360ff16021790555060a08201518160000160146101000a81548160ff021916908360ff16021790555060c08201518160010160006101000a8154816001600160f81b0302191690836001600160f81b0316021790555060e082015181600101601f6101000a81548160ff021916908360ff1602179055509050508015611497576000805461ff00191690555b5050565b306001600160a01b037f000000000000000000000000ea474715dc16afed1848437624a088e25525405c1614156114e45760405162461bcd60e51b81526004016106f89061427d565b7f000000000000000000000000ea474715dc16afed1848437624a088e25525405c6001600160a01b031661152d600080516020614710833981519152546001600160a01b031690565b6001600160a01b0316146115535760405162461bcd60e51b81526004016106f8906142c9565b61155c826125ec565b61149782826001612616565b600061157360995490565b82106115d65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106f8565b609982815481106115e9576115e9614315565b90600052602060002001549050919050565b6000306001600160a01b037f000000000000000000000000ea474715dc16afed1848437624a088e25525405c161461169b5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016106f8565b5060008051602061471083398151915290565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915260fb546001600160a01b031633146117115760405162461bcd60e51b81526004016106f8906141f7565b61171a8261287d565b60008281526101b7602052604090819020815160e081019092528054829060ff16600781111561174c5761174c613f8d565b600781111561175d5761175d613f8d565b8152905460ff6101008204811660208401526201000082048116604084015261ffff630100000083048116606085015265010000000000830482166080850152600160301b83041660a0840152600160401b9091041660c09091015290505b919050565b6000818152606760205260408120546001600160a01b0316806106365760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016106f8565b60c95460ff161561185b5760405162461bcd60e51b81526004016106f89061432b565b333b15158061186a5750333214155b156118875760405162be758160e31b815260040160405180910390fd5b60016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d2475546101915442916118d7916001600160401b03600160c01b9092048216911661436b565b6001600160401b0316106118fe57604051630abdb6c560e41b815260040160405180910390fd5b60016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d247454610194546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561196f57600080fd5b505afa158015611983573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a79190614396565b10156119c65760405163356680b760e01b815260040160405180910390fd5b6101945460016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d24745460405163079cc67960e41b815233600482015260248101919091526001600160a01b03909116906379cc679090604401600060405180830381600087803b158015611a4157600080fd5b505af1158015611a55573d6000803e3d6000fd5b50505050611a6861019580546001019055565b6000611a746101955490565b60016000526101936020527f486ff8510ed3a8bd8fa99e6b19b446e53008986cfe7e8b76d7459f84f14d24758054919250620100009091046001600160b01b0316906002611ac1836143af565b91906101000a8154816001600160b01b0302191690836001600160b01b0316021790555050611aef816128b5565b611af98282612b4f565b611497612b69565b60006001600160a01b038216611b6c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016106f8565b506001600160a01b031660009081526068602052604090205490565b60fb546001600160a01b03163314611bb25760405162461bcd60e51b81526004016106f8906141f7565b610b436000612bb5565b60fb546001600160a01b03163314611be65760405162461bcd60e51b81526004016106f8906141f7565b610b43612c07565b611bfa84848484612c5f565b6101925460005b848110156120b2576000848483818110611c1d57611c1d614315565b9050602002013590506000878784818110611c3a57611c3a614315565b6020908102929092013560008181526101b790935260409092205491925050600160401b900460ff168211611c8c57604051630a6c9dd160e11b815260048101829052602481018390526044016106f8565b60008281526101b6602090815260409182902082516101008101845281546001600160801b038116825260ff600160801b8204811694830194909452600160881b8104841694820194909452600160901b840483166060820152600160981b840483166080820152600160a01b909304821660a0840152600101546001600160f81b03811660c0840152600160f81b90041660e0820152611d646040805160e08101909152806000815260006020820181905260408201819052606082018190526080820181905260a0820181905260c09091015290565b60ff841660c08201526005841015611e88578151611d99906000906001600160801b031688611d92816143d6565b995061305b565b6007811115611daa57611daa613f8d565b81906007811115611dbd57611dbd613f8d565b90816007811115611dd057611dd0613f8d565b81525050611df260018360c001516001600160f81b03168880611d92906143d6565b60ff908116604080840191909152606084015190840151611e1c92918216911688611d92816143d6565b611e279060326143f1565b61ffff16606082015260e0820151611e499060019060ff1688611d92816143d6565b60ff90811660808084019190915260a084015190840151611e7392918216911688611d92816143d6565b611e7e9060056143f1565b61ffff1660a08201525b8360041415611eb657611ea96001836020015160ff168880611d92906143d6565b60ff166020820152611fb9565b8360051415611fb9578151611ee1906001600160801b0316600888611eda816143d6565b995061309a565b6007811115611ef257611ef2613f8d565b81906007811115611f0557611f05613f8d565b90816007811115611f1857611f18613f8d565b905250613a98606082015261019060a0820152600781516007811115611f4057611f40613f8d565b14611fb957611f638260c001516001600160f81b0316600d8880611eda906143d6565b611f6e906001614410565b60ff90811660408301526020830151611f8f916001911688611d92816143d6565b60ff908116602083015260e0830151611fb0916001911688611d92816143d6565b60ff1660808201525b60008381526101b7602052604090208151815483929190829060ff19166001836007811115611fea57611fea613f8d565b02179055506020820151815460408401516060850151608086015160a087015160c09097015162ffff001990941661010060ff9687160262ff000019161762010000938616939093029290921765ffffff0000001916630100000061ffff9283160265ff000000000019161765010000000000928516929092029190911768ffffff0000000000001916600160301b919095160260ff60401b191693909317600160401b9190931602919091179055508392506120aa91508290506143d6565b915050611c01565b506120bb612b69565b5050505050565b60606066805461064b906141bc565b611497338383613123565b6120e6338361234e565b6121025760405162461bcd60e51b81526004016106f89061422c565b61210e848484846131f2565b50505050565b600060018210806121255750600582115b1561214d5760405163abe5c32f60e01b815260016004820152600560248201526044016106f8565b50600090815261019360205260409020600101546201000090046001600160b01b031690565b606061217e8261287d565b6101b85460008381526101b760205260409081902090516379fc1e2160e11b81526001600160a01b039092169163f3f83c42916121c091869190600401614428565b60006040518083038186803b1580156121d857600080fd5b505afa1580156121ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106369190810190614495565b60fb546001600160a01b0316331461223e5760405162461bcd60e51b81526004016106f8906141f7565b6001600160a01b0381166122a35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f8565b610b0e81612bb5565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b1480610636575061063682613225565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612315826117c1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b03166123c75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f8565b60006123d2836117c1565b9050806001600160a01b0316846001600160a01b0316148061240d5750836001600160a01b031661240284610724565b6001600160a01b0316145b8061243d57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612458826117c1565b6001600160a01b0316146124bc5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016106f8565b6001600160a01b03821661251e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106f8565b612529838383613275565b6125346000826122e0565b6001600160a01b038316600090815260686020526040812080546001929061255d908490614502565b90915550506001600160a01b038216600090815260686020526040812080546001929061258b908490614410565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60fb546001600160a01b03163314610b0e5760405162461bcd60e51b81526004016106f8906141f7565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612649576108ca836132a3565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561268257600080fd5b505afa9250505080156126b2575060408051601f3d908101601f191682019092526126af91810190614396565b60015b6127155760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016106f8565b60008051602061471083398151915281146127845760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016106f8565b506108ca83838361333f565b60c95460ff166127d95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106f8565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff1661284a5760405162461bcd60e51b81526004016106f890614519565b6128548383613364565b61285c613395565b6128646133bc565b61286c6133eb565b612874613395565b6108ca8161341a565b6000818152606760205260409020546001600160a01b0316610b0e576040516306caeb1360e41b8152600481018290526024016106f8565b600160009081526101b6602090815260408051610100810182527f5724c694f1d534ffec1333eb9bb83f0fc3234d7f4d8a544a412f6d0b1cd56748546001600160801b03808216835260ff600160801b8304811695840195909552600160881b8204851683850152600160901b820485166060840152600160981b820485166080840152600160a01b909104841660a08301527f5724c694f1d534ffec1333eb9bb83f0fc3234d7f4d8a544a412f6d0b1cd56749546001600160f81b03811660c0840152600160f81b900490931660e080830191909152610192548351918201909352815191949293909283926129b89216856129b1816143d6565b965061305b565b60078111156129c9576129c9613f8d565b60078111156129da576129da613f8d565b8152602001600060ff168152602001600060ff168152602001612a11846060015160ff16856040015160ff1685806129b1906143d6565b612a1c9060326143f1565b61ffff168152602001600060ff168152602001612a4d8460a0015160ff16856080015160ff1685806129b1906143d6565b612a589060056143f1565b61ffff1681526001602091820181905260008681526101b790925260409091208251815491929091839160ff1990911690836007811115612a9b57612a9b613f8d565b02179055506020820151815460408401516060850151608086015160a087015160c09097015162ffff001990941661010060ff9687160262ff000019161762010000938616939093029290921765ffffff0000001916630100000061ffff9283160265ff000000000019161765010000000000928516929092029190911768ffffff0000000000001916600160301b919095160260ff60401b191693909317600160401b9190931602919091179055505050565b6114978282604051806020016040528060008152506134e4565b61019254604080514260208201526001600160601b03193360601b1691810191909152605481019190915260740160408051601f19818403018152919052805160209091012061019255565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c95460ff1615612c2a5760405162461bcd60e51b81526004016106f89061432b565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128063390565b60c95460ff1615612c825760405162461bcd60e51b81526004016106f89061432b565b333b151580612c915750333214155b15612cae5760405162be758160e31b815260040160405180910390fd5b828114612cce5760405163fb0cc75360e01b815260040160405180910390fd5b6000805b84811015612f53576000848483818110612cee57612cee614315565b9050602002013590506000878784818110612d0b57612d0b614315565b600085815261019360209081526040909120600101546101915491909202939093013593504292612d5092506001600160401b03600160c01b9092048216911661436b565b6001600160401b03161115612d7b57604051630be18a7560e31b8152600481018390526024016106f8565b612d84816117c1565b6001600160a01b0316336001600160a01b031614612db4576040516282b42960e81b815260040160405180910390fd5b6002821080612dc35750600582115b15612deb5760405163abe5c32f60e01b815260026004820152600560248201526044016106f8565b60038210158015612e2257506000828152610193602052604090206001015461ffff8116620100009091046001600160b01b031610155b15612e40576040516352df9fe560e01b815260040160405180910390fd5b60008181526101b76020526040812054600160401b900460ff1690612e66826001614410565b90505b838111612e9e5760008181526101936020526040902054612e8a9087614410565b955080612e96816143d6565b915050612e69565b5060008181526101936020526040902060010180546201000090046001600160b01b0316906002612ece83614564565b82546101009290920a6001600160b01b03818102199093169183160217909155600085815261019360205260409020600101805462010000900490911691506002612f18836143af565b91906101000a8154816001600160b01b0302191690836001600160b01b03160217905550505050508080612f4b906143d6565b915050612cd2565b50610194546040516370a0823160e01b815233600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015612f9857600080fd5b505afa158015612fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd09190614396565b1015612fef5760405163356680b760e01b815260040160405180910390fd5b6101945460405163079cc67960e41b8152336004820152602481018390526001600160a01b03909116906379cc679090604401600060405180830381600087803b15801561303c57600080fd5b505af1158015613050573d6000803e3d6000fd5b505050505050505050565b6000836130688185614502565b613073906001614410565b61307c84613517565b6130869190614587565b6130909190614410565b90505b9392505050565b6000806130a8600185614502565b905060006127106130b885613517565b6130c29190614587565b90506000805b838110156131175760046130dc8286614502565b901b88901c61ffff16826130f09190614410565b91508183101561310557935061309392505050565b8061310f816143d6565b9150506130c8565b50919695505050505050565b816001600160a01b0316836001600160a01b031614156131855760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106f8565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6131fd848484612445565b61320984848484613577565b61210e5760405162461bcd60e51b81526004016106f8906145a9565b60006001600160e01b031982166380ac58cd60e01b148061325657506001600160e01b03198216635b5e139f60e01b145b8061063657506301ffc9a760e01b6001600160e01b0319831614610636565b60c95460ff16156132985760405162461bcd60e51b81526004016106f89061432b565b6108ca838383613684565b6001600160a01b0381163b6133105760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106f8565b60008051602061471083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6133488361373c565b6000825111806133555750805b156108ca5761210e838361377c565b600054610100900460ff1661338b5760405162461bcd60e51b81526004016106f890614519565b6114978282613870565b600054610100900460ff16610b435760405162461bcd60e51b81526004016106f890614519565b600054610100900460ff166133e35760405162461bcd60e51b81526004016106f890614519565b610b436138be565b600054610100900460ff166134125760405162461bcd60e51b81526004016106f890614519565b610b436138f1565b600054610100900460ff166134415760405162461bcd60e51b81526004016106f890614519565b60005b60058110156134a25781816005811061345f5761345f614315565b608002016101936000613473846001614410565b8152602001908152602001600020818161348d91906145fb565b5081905061349a816143d6565b915050613444565b50604080514260208201526001600160601b03193360601b169181019190915260540160408051601f1981840301815291905280516020909101206101925550565b6134ee8383613921565b6134fb6000848484613577565b6108ca5760405162461bcd60e51b81526004016106f8906145a9565b6040805148602082015290810182905241606090811b6001600160601b0319169082015260ff607f831683901c16430340607482015242609482015260009060b40160408051601f19818403018152919052805160209091012092915050565b60006001600160a01b0384163b1561367957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906135bb903390899088908890600401614683565b602060405180830381600087803b1580156135d557600080fd5b505af1925050508015613605575060408051601f3d908101601f19168201909252613602918101906146c0565b60015b61365f573d808015613633576040519150601f19603f3d011682016040523d82523d6000602084013e613638565b606091505b5080516136575760405162461bcd60e51b81526004016106f8906145a9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061243d565b506001949350505050565b6001600160a01b0383166136df576136da81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b613702565b816001600160a01b0316836001600160a01b031614613702576137028382613a6f565b6001600160a01b038216613719576108ca81613b0c565b826001600160a01b0316826001600160a01b0316146108ca576108ca8282613bbb565b613745816132a3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6137e45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106f8565b600080846001600160a01b0316846040516137ff91906146dd565b600060405180830381855af49150503d806000811461383a576040519150601f19603f3d011682016040523d82523d6000602084013e61383f565b606091505b5091509150613867828260405180606001604052806027815260200161473060279139613bff565b95945050505050565b600054610100900460ff166138975760405162461bcd60e51b81526004016106f890614519565b81516138aa906065906020850190613c38565b5080516108ca906066906020840190613c38565b600054610100900460ff166138e55760405162461bcd60e51b81526004016106f890614519565b60c9805460ff19169055565b600054610100900460ff166139185760405162461bcd60e51b81526004016106f890614519565b610b4333612bb5565b6001600160a01b0382166139775760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106f8565b6000818152606760205260409020546001600160a01b0316156139dc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106f8565b6139e860008383613275565b6001600160a01b0382166000908152606860205260408120805460019290613a11908490614410565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001613a7c84611b01565b613a869190614502565b600083815260986020526040902054909150808214613ad9576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b609954600090613b1e90600190614502565b6000838152609a602052604081205460998054939450909284908110613b4657613b46614315565b906000526020600020015490508060998381548110613b6757613b67614315565b6000918252602080832090910192909255828152609a90915260408082208490558582528120556099805480613b9f57613b9f6146f9565b6001900381819060005260206000200160009055905550505050565b6000613bc683611b01565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b60608315613c0e575081613093565b825115613c1e5782518084602001fd5b8160405162461bcd60e51b81526004016106f89190613d5c565b828054613c44906141bc565b90600052602060002090601f016020900481019282613c665760008555613cac565b82601f10613c7f57805160ff1916838001178555613cac565b82800160010185558215613cac579182015b82811115613cac578251825591602001919060010190613c91565b50613cb8929150613cbc565b5090565b5b80821115613cb85760008155600101613cbd565b6001600160e01b031981168114610b0e57600080fd5b600060208284031215613cf957600080fd5b813561309381613cd1565b60005b83811015613d1f578181015183820152602001613d07565b8381111561210e5750506000910152565b60008151808452613d48816020860160208601613d04565b601f01601f19169290920160200192915050565b6020815260006130936020830184613d30565b80356001600160a01b03811681146117bc57600080fd5b600060208284031215613d9857600080fd5b61309382613d6f565b600060208284031215613db357600080fd5b5035919050565b60008060408385031215613dcd57600080fd5b613dd683613d6f565b946020939093013593505050565b6001600160401b0381168114610b0e57600080fd5b600060208284031215613e0b57600080fd5b813561309381613de4565b600080600060608486031215613e2b57600080fd5b613e3484613d6f565b9250613e4260208501613d6f565b9150604084013590509250925092565b6000610280808385031215613e6657600080fd5b838184011115613e7557600080fd5b509092915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613ebb57613ebb613e7d565b604052919050565b60006001600160401b03821115613edc57613edc613e7d565b50601f01601f191660200190565b600082601f830112613efb57600080fd5b8135613f0e613f0982613ec3565b613e93565b818152846020838601011115613f2357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215613f5357600080fd5b613f5c83613d6f565b915060208301356001600160401b03811115613f7757600080fd5b613f8385828601613eea565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60088110613fc157634e487b7160e01b600052602160045260246000fd5b9052565b600060e082019050613fd8828451613fa3565b60ff602084015116602083015260ff6040840151166040830152606083015161ffff808216606085015260ff60808601511660808501528060a08601511660a0850152505060ff60c08401511660c083015292915050565b60008083601f84011261404257600080fd5b5081356001600160401b0381111561405957600080fd5b6020830191508360208260051b850101111561407457600080fd5b9250929050565b6000806000806040858703121561409157600080fd5b84356001600160401b03808211156140a857600080fd5b6140b488838901614030565b909650945060208701359150808211156140cd57600080fd5b506140da87828801614030565b95989497509550505050565b600080604083850312156140f957600080fd5b61410283613d6f565b91506020830135801515811461411757600080fd5b809150509250929050565b6000806000806080858703121561413857600080fd5b61414185613d6f565b935061414f60208601613d6f565b92506040850135915060608501356001600160401b0381111561417157600080fd5b61417d87828801613eea565b91505092959194509250565b6000806040838503121561419c57600080fd5b6141a583613d6f565b91506141b360208401613d6f565b90509250929050565b600181811c908216806141d057607f821691505b602082108114156141f157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681851680830382111561438d5761438d614355565b01949350505050565b6000602082840312156143a857600080fd5b5051919050565b60006001600160b01b03828116808214156143cc576143cc614355565b6001019392505050565b60006000198214156143ea576143ea614355565b5060010190565b600081600019048311821515161561440b5761440b614355565b500290565b6000821982111561442357614423614355565b500190565b82815281546101008201906144436020840160ff8316613fa3565b60ff8160081c16604084015260ff8160101c16606084015261ffff808260181c16608085015260ff8260281c1660a0850152808260301c1660c08501525060ff8160401c1660e0840152509392505050565b6000602082840312156144a757600080fd5b81516001600160401b038111156144bd57600080fd5b8201601f810184136144ce57600080fd5b80516144dc613f0982613ec3565b8181528560208385010111156144f157600080fd5b613867826020830160208601613d04565b60008282101561451457614514614355565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006001600160b01b0382168061457d5761457d614355565b6000190192915050565b6000826145a457634e487b7160e01b600052601260045260246000fd5b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b8135815560018101602083013561ffff811680821461461957600080fd5b825461ffff19811682178455915060408501356001600160b01b038116811461464157600080fd5b62010000600160c01b0360109190911b166001600160c01b031992831682178117845560608601359261467384613de4565b911760c09290921b161790555050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906146b690830184613d30565b9695505050505050565b6000602082840312156146d257600080fd5b815161309381613cd1565b600082516146ef818460208701613d04565b9190910192915050565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220168f628585df86610fd1b51dd2f6dca6ebf4ec5d5aee514fc837dafda39c07be64736f6c63430008090033
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.