Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 306 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21511283 | 15 days ago | IN | 0 ETH | 0.00027009 | ||||
Set Approval For... | 21455600 | 22 days ago | IN | 0 ETH | 0.0003117 | ||||
Set Approval For... | 21453990 | 23 days ago | IN | 0 ETH | 0.00036587 | ||||
Safe Transfer Fr... | 21350950 | 37 days ago | IN | 0 ETH | 0.0010532 | ||||
Set Approval For... | 21342897 | 38 days ago | IN | 0 ETH | 0.00083133 | ||||
Set Approval For... | 21255215 | 50 days ago | IN | 0 ETH | 0.0005859 | ||||
Set Approval For... | 21174770 | 62 days ago | IN | 0 ETH | 0.00146439 | ||||
Safe Transfer Fr... | 20947562 | 93 days ago | IN | 0 ETH | 0.00058769 | ||||
Set Approval For... | 20880627 | 103 days ago | IN | 0 ETH | 0.00045804 | ||||
Set Approval For... | 20855839 | 106 days ago | IN | 0 ETH | 0.00041857 | ||||
Set Approval For... | 20853761 | 106 days ago | IN | 0 ETH | 0.00032823 | ||||
Set Approval For... | 20792847 | 115 days ago | IN | 0 ETH | 0.00114202 | ||||
Set Approval For... | 20528335 | 152 days ago | IN | 0 ETH | 0.00031451 | ||||
Set Approval For... | 20520238 | 153 days ago | IN | 0 ETH | 0.00022232 | ||||
Set Approval For... | 20479900 | 159 days ago | IN | 0 ETH | 0.00013186 | ||||
Set Approval For... | 20340423 | 178 days ago | IN | 0 ETH | 0.00035141 | ||||
Set Approval For... | 20239517 | 192 days ago | IN | 0 ETH | 0.00052274 | ||||
Set Approval For... | 20198002 | 198 days ago | IN | 0 ETH | 0.00024708 | ||||
Set Approval For... | 20182198 | 200 days ago | IN | 0 ETH | 0.00023862 | ||||
Set Approval For... | 20165938 | 202 days ago | IN | 0 ETH | 0.00029725 | ||||
Set Approval For... | 20133958 | 207 days ago | IN | 0 ETH | 0.00072718 | ||||
Set Approval For... | 20040216 | 220 days ago | IN | 0 ETH | 0.0009246 | ||||
Safe Transfer Fr... | 20034564 | 221 days ago | IN | 0 ETH | 0.00182233 | ||||
Set Approval For... | 19917445 | 237 days ago | IN | 0 ETH | 0.00047046 | ||||
Set Approval For... | 19904558 | 239 days ago | IN | 0 ETH | 0.00023031 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TheWeb3Game
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @author wizrd0x import {ERC721APassiveStaking} from "../presets/ERC721APassiveStaking.sol"; import {Treasury, Administration} from "../utils/Treasury.sol"; ///////////////////////////////////////////////////////////////////////////////////////////// // _______ _ __ __ _ ____ _____ // // |__ __|| | \ \ / / | | |___ \ / ____| // // | | | |__ ___ \ \ /\ / /___ | |__ __) | | | __ __ _ _ __ ___ ___ // // | | | '_ \ / _ \ \ \/ \/ // _ \| '_ \ |__ < | | |_ | / _` || '_ ` _ \ / _ \ // // | | | | | || __/ \ /\ /| __/| |_) |___) | | |__| || (_| || | | | | || __/ // // |_| |_| |_| \___| \/ \/ \___||_.__/|____/ \_____| \__,_||_| |_| |_| \___| // // // ///////////////////////////////////////////////////////////////////////////////////////////// contract TheWeb3Game is ERC721APassiveStaking { constructor( string memory _name, string memory _symbol, address _recipient, uint256 _royalty, address _owner ) ERC721APassiveStaking(_name, _symbol, _recipient, _royalty, _owner) {} bool public isAirdropActive = true; function refreshMetadata() public { emit BatchMetadataUpdate(_startTokenId(), _totalMinted()); } function reveal(string memory baseURI) public isAdmin { _setRevealed(); _setBaseURI(baseURI); } function airdrop(address[] memory accounts, uint256[] memory amounts) public isAdmin { require(isAirdropActive, "Web3GamePass: Airdrop is over"); require(accounts.length == amounts.length, "TheWeb3Game: accounts and amounts length mismatch"); for (uint256 i = 0; i < accounts.length; i++) { _safeMint(accounts[i], amounts[i]); } } function disableAirdrop() public isAdmin { isAirdropActive = false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Pausable is Context { /** * @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. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {IERC721A} from "erc721a/contracts/IERC721A.sol"; /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC721A { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {ERC721A} from "erc721a/contracts/ERC721A.sol"; /// @author wizrd0x abstract contract PassiveStaking is ERC721A { event Spent(address indexed account, uint256 indexed tokenId, uint256 amount); uint256 public constant EARN_RATE = 11574074074075; uint256 public startTime; // mapping of token to spent points mapping(uint256 => uint256) internal _spent; // A token's issued points. Used by extensions to "lock" tiers on transfer mapping(uint256 => uint256) internal _issued; function _setStartTime(uint256 _startTime) internal virtual { if (startTime > 0) revert AlreadyInitialized(); startTime = _startTime; } function total(uint256 tokenId) public view virtual returns (uint256) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); unchecked { return earned(tokenId) + spent(tokenId); } } function spent(uint256 tokenId) public view virtual returns (uint256) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return _spent[tokenId]; } function earned(uint256 tokenId) public view virtual returns (uint256) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); if (startTime == 0 || _blockTime() <= startTime) return 0; uint256 ownershipStartTimestamp = _ownershipOf(tokenId).startTimestamp; if (ownershipStartTimestamp <= startTime) ownershipStartTimestamp = startTime; unchecked { uint256 base = (_blockTime() - ownershipStartTimestamp) * EARN_RATE; return base + _issued[tokenId] - _spent[tokenId]; } } function spendFrom(address from, uint256 tokenId, uint256 amount) public virtual returns (bool) { TokenOwnership memory owner = _ownershipOf(tokenId); if (msg.sender == owner.addr) revert OwnerShouldNotSpendPoints(); bool isApprovedOrOwner = (isApprovedForAll(from, msg.sender) || getApproved(tokenId) == msg.sender); uint256 earned_ = earned(tokenId); if (owner.addr != from) revert SpendFromIncorrectOwner(); if (!isApprovedOrOwner) revert SpendCallerNotApproved(); if (amount > earned_) revert NotEnoughPoints(); unchecked { _spent[tokenId] = _spent[tokenId] + (amount); } emit Spent(from, tokenId, amount); return true; } function _issue(uint256 tokenId, uint256 points) internal { _issued[tokenId] = points; } function _blockTime() internal view returns (uint256) { return block.timestamp; } function _beforeTokenTransfers(address from, address, uint256 startTokenId, uint256) internal virtual override { // if minting - no need to reset spent if (from == address(0)) return; _spent[startTokenId] = 0; } } error OwnerShouldNotSpendPoints(); error SpendCallerNotApproved(); error SpendFromIncorrectOwner(); error NotEnoughPoints(); error AlreadyInitialized();
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @author wizrd0x import {PassiveStaking} from "./PassiveStaking.sol"; import {IERC4906} from "../extensions/IERC4906.sol"; import {IERC721A} from "erc721a/contracts/IERC721A.sol"; abstract contract TieredMetadata is IERC721A, IERC4906, PassiveStaking { // Tier configuration struct Tier { uint256 points; string overrideBaseUri; } // Tier metadata and configuration Tier[] private _tiers; bool public isRevealed = false; uint256 private _maxTier; string private _defaultBaseURI; string private _unrevealedBaseURI; function tierRequirement(uint256 tierIndex) public view returns (uint256) { return _tiers[tierIndex].points; } function maxTiers() public view returns (uint256) { return _maxTier; } function tier(uint256 tokenId) public view virtual returns (uint256) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); uint256 points = earned(tokenId); uint256 index = _maxTier; do { if (points >= _tiers[index].points) return index; unchecked { index == index--; } } while (index > 0); return 0; } function _baseURI(uint256 tokenId) internal view virtual returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); if (isRevealed == false) return _unrevealedBaseURI; uint256 tokenTier = tier(tokenId); if (bytes(_tiers[tokenTier].overrideBaseUri).length > 0) { return _tiers[tokenTier].overrideBaseUri; } return string(abi.encodePacked(_defaultBaseURI, _toString(tokenTier), "/")); } function _tokenURI(uint256 tokenId) internal view virtual returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(tokenId); if (isRevealed == false) return baseURI; return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ""; } // ADMIN FUNCTIONS function _setRevealed() internal { isRevealed = true; } function _setUnrevealedBaseURI(string memory baseUri_) internal { _unrevealedBaseURI = baseUri_; emit BatchMetadataUpdate(_startTokenId(), _totalMinted()); } function _setBaseURI(string memory baseUri_) internal { _defaultBaseURI = baseUri_; emit BatchMetadataUpdate(_startTokenId(), _totalMinted()); } function _setTierBaseURI(uint256 tier_, string memory baseUri_) internal { _tiers[tier_].overrideBaseUri = baseUri_; emit BatchMetadataUpdate(_startTokenId(), _totalMinted()); } function _addTier(Tier memory tier_) internal { _tiers.push(tier_); _maxTier = _tiers.length - 1; } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { if (from == address(0)) return; if (_tiers.length > 0) { // If token id has reached any tier, issue the tier's base points uint256 currTier = tier(startTokenId); _issue(startTokenId, _tiers[currTier].points); } PassiveStaking._beforeTokenTransfers(from, to, startTokenId, quantity); } } error URIQueryForNonexistentToken();
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @author wizrd0x import {TieredMetadata} from "../extensions/TieredMetadata.sol"; import {PassiveStaking} from "../extensions/PassiveStaking.sol"; import {DefaultOperatorFilterer} from "../utils/opensea/DefaultOperatorFilterer.sol"; import {ERC2981Base, ERC2981ContractWideRoyalties} from "../utils/royalties/ERC2981ContractWideRoyalties.sol"; import {Administration} from "../utils/Administration.sol"; import {Treasury} from "../utils/Treasury.sol"; import {ERC721A} from "erc721a/contracts/ERC721A.sol"; import {IERC721A} from "erc721a/contracts/IERC721A.sol"; contract ERC721APassiveStaking is ERC721A, PassiveStaking, TieredMetadata, Administration, Treasury, ERC2981ContractWideRoyalties, DefaultOperatorFilterer { constructor( string memory _name, string memory _symbol, address _recipient, uint256 _royalty, address owner ) ERC721A(_name, _symbol) Administration(owner) { _setRoyalties(_recipient, _royalty); } function tokenURI(uint256 tokenId) public view virtual override(IERC721A, ERC721A) returns (string memory) { return _tokenURI(tokenId); } function reveal() public isAdmin { _setRevealed(); } function setUnrevealedBaseURI(string memory baseUri) public isAdmin { _setUnrevealedBaseURI(baseUri); } function setBaseURI(string memory baseUri) public isAdmin { _setBaseURI(baseUri); } function setTierBaseURI(uint256 tier_, string memory baseUri) public isAdmin { _setTierBaseURI(tier_, baseUri); } function addTier(Tier memory tier_) public isAdmin { _addTier(tier_); } function setStakingStartTime(uint256 startTime) public isAdmin { _setStartTime(startTime); } function setRoyalties(address recipient, uint256 value) public isAdmin { _setRoyalties(recipient, value); } // OVERRIDES FOR OPERATOR FILTERER // function setApprovalForAll( address operator, bool approved ) public override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public payable override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } // END OVERRIDES FOR OPERATOR FILTERER // function _startTokenId() internal view override returns (uint256) { return 1; } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override(ERC721A, PassiveStaking, TieredMetadata) { TieredMetadata._beforeTokenTransfers(from, to, startTokenId, quantity); } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, IERC721A, ERC2981Base, Administration) returns (bool) { return interfaceId == bytes4(0x49064906) || interfaceId == type(ERC2981Base).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @author wizrd0x import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; error InsufficientAccess(); error InvalidOwner(); abstract contract Administration is AccessControl, Pausable { address private _owner; bytes32 public constant ADMIN = keccak256("ADMIN"); bytes32 public constant MINTER = keccak256("MINTER"); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier isAdmin() { if (!hasRole(ADMIN, _msgSender())) { revert InsufficientAccess(); } _; } modifier isMinter() { if (!hasRole(MINTER, _msgSender())) { revert InsufficientAccess(); } _; } modifier isGlobalAdmin() { if (!hasRole(DEFAULT_ADMIN_ROLE, _msgSender())) { revert InsufficientAccess(); } _; } constructor(address globalAdmin) { _setupRole(MINTER, _msgSender()); _setupRole(ADMIN, _msgSender()); _setupRole(DEFAULT_ADMIN_ROLE, globalAdmin); _setupRole(ADMIN, globalAdmin); _setOwner(globalAdmin); } function pause() public isAdmin { _pause(); } function unpause() public isAdmin { _unpause(); } function owner() public view returns (address) { return _owner; } function transferOwnership(address newOwner) public virtual isAdmin { if (newOwner == address(0)) revert InvalidOwner(); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl) returns (bool) { return interfaceId == type(AccessControl).interfaceId || interfaceId == type(Pausable).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator( address registrant, address operator, bool filtered ) external; function updateOperators( address registrant, address[] calldata operators, bool filtered ) external; function updateCodeHash( address registrant, bytes32 codehash, bool filtered ) external; function updateCodeHashes( address registrant, bytes32[] calldata codeHashes, bool filtered ) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), msg.sender)) { revert OperatorNotAllowed(msg.sender); } } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {IERC2981Royalties} from "./IERC2981Royalties.sol"; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 abstract contract ERC2981Base is ERC165, IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC2981Royalties).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import {ERC2981Base, IERC2981Royalties} from "./ERC2981Base.sol"; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 /// @dev This implementation has the same royalties for each and every tokens abstract contract ERC2981ContractWideRoyalties is ERC2981Base { RoyaltyInfo internal _royalties; /// @dev Sets token royalties /// @param recipient recipient of the royalties /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0) function _setRoyalties(address recipient, uint256 value) internal { require(value <= 10000, "ERC2981Royalties: Too high"); _royalties = RoyaltyInfo(recipient, uint24(value)); } /// @inheritdoc IERC2981Royalties function royaltyInfo( uint256, uint256 value ) external view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title IERC2981Royalties /// @dev Interface for the ERC2981 - Token Royalty standard interface IERC2981Royalties { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _value - the sale price of the NFT asset specified by _tokenId /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for value sale price function royaltyInfo( uint256 _tokenId, uint256 _value ) external view returns (address _receiver, uint256 _royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @author wizrd0x import "./Administration.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; abstract contract Treasury is Administration { address internal _treasury; modifier isTreasuryOrGlobalAdmin() { if (!hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) && _msgSender() != _treasury) { revert InsufficientAccess(); } _; } function setTreasury(address treasury) external isGlobalAdmin { _treasury = treasury; } function getTreasuryAddress() public view returns (address) { return _treasury; } function withdraw() external isTreasuryOrGlobalAdmin { if (_treasury == address(0)) revert MustSetTreasury(); (bool success, ) = payable(_treasury).call{value: address(this).balance}(""); if (!success) revert WithdrawFailed(); } function withdrawToken(address token) external isTreasuryOrGlobalAdmin { if (_treasury == address(0)) revert MustSetTreasury(); IERC20 t = IERC20(token); t.transfer(_treasury, t.balanceOf(address(this))); } function withdraw1155(address token, uint256 tokenId) external isTreasuryOrGlobalAdmin { if (_treasury == address(0)) revert MustSetTreasury(); IERC1155 erc1155 = IERC1155(token); erc1155.safeTransferFrom(address(this), _treasury, tokenId, erc1155.balanceOf(address(this), tokenId), ""); } function withdraw721(address token, uint256 tokenId) external isTreasuryOrGlobalAdmin { if (_treasury == address(0)) revert MustSetTreasury(); IERC721 erc721 = IERC721(token); erc721.transferFrom(address(this), _treasury, tokenId); } ////////////// ERRORS ////////////// error WithdrawFailed(); error MustSetTreasury(); ///////////////////////////////////// }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_royalty","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InsufficientAccess","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MustSetTreasury","type":"error"},{"inputs":[],"name":"NotEnoughPoints","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnerShouldNotSpendPoints","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SpendCallerNotApproved","type":"error"},{"inputs":[],"name":"SpendFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Spent","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"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EARN_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"points","type":"uint256"},{"internalType":"string","name":"overrideBaseUri","type":"string"}],"internalType":"struct TieredMetadata.Tier","name":"tier_","type":"tuple"}],"name":"addTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"earned","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":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTreasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAirdropActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refreshMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"setStakingStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tier_","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"name":"setTierBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setUnrevealedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"spendFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"spent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierIndex","type":"uint256"}],"name":"tierRequirement","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"total","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdraw1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdraw721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600c805460ff199081169091556014805490911660011790553480156200002a57600080fd5b5060405162004004380380620040048339810160408190526200004d91620005ca565b8484848484733cc6cdda760b79bafa08df41ecfa224f810dceb660018287878160029080519060200190620000849291906200043a565b5080516200009a9060039060208401906200043a565b50600160005550506011805460ff19169055620000d87ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc9336200028b565b620000f360008051602062003fe4833981519152336200028b565b620001006000826200028b565b6200011b60008051602062003fe4833981519152826200028b565b62000126816200029b565b506daaeb6d7670e522a718067333cd4e3b156200026c578015620001ba57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200019b57600080fd5b505af1158015620001b0573d6000803e3d6000fd5b505050506200026c565b6001600160a01b038216156200020b5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000180565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200025257600080fd5b505af115801562000267573d6000803e3d6000fd5b505050505b506200027b90508383620002f5565b505050505050505050506200069f565b62000297828262000396565b5050565b601180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127108111156200034c5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f2068696768000000000000604482015260640160405180910390fd5b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260138054600160a01b9093026001600160b81b0319909316909117919091179055565b60008281526010602090815260408083206001600160a01b038516845290915290205460ff16620002975760008281526010602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003f63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620004489062000663565b90600052602060002090601f0160209004810192826200046c5760008555620004b7565b82601f106200048757805160ff1916838001178555620004b7565b82800160010185558215620004b7579182015b82811115620004b75782518255916020019190600101906200049a565b50620004c5929150620004c9565b5090565b5b80821115620004c55760008155600101620004ca565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200050857600080fd5b81516001600160401b0380821115620005255762000525620004e0565b604051601f8301601f19908116603f01168101908282118183101715620005505762000550620004e0565b816040528381526020925086838588010111156200056d57600080fd5b600091505b8382101562000591578582018301518183018401529082019062000572565b83821115620005a35760008385830101525b9695505050505050565b80516001600160a01b0381168114620005c557600080fd5b919050565b600080600080600060a08688031215620005e357600080fd5b85516001600160401b0380821115620005fb57600080fd5b6200060989838a01620004f6565b965060208801519150808211156200062057600080fd5b506200062f88828901620004f6565b9450506200064060408701620005ad565b9250606086015191506200065760808701620005ad565b90509295509295909350565b600181811c908216806200067857607f821691505b6020821081036200069957634e487b7160e01b600052602260045260246000fd5b50919050565b61393580620006af6000396000f3fe6080604052600436106103765760003560e01c806367243482116101d1578063a475b5dd11610102578063e0024604116100a0578063f07a380e1161006f578063f07a380e146109f5578063f0f4426014610a15578063f2fde38b14610a35578063fe6d812414610a5557600080fd5b8063e002460414610954578063e185a2cc14610972578063e20d810f14610992578063e985e9c5146109ac57600080fd5b8063b88d4fde116100dc578063b88d4fde146108e1578063c87b56dd146108f4578063d547741f14610914578063d5b5cc231461093457600080fd5b8063a475b5dd1461088c578063b119ebfe146108a1578063b34c5e1f146108c157600080fd5b80638c7ea24b1161016f57806392027aef1161014957806392027aef1461082257806395d89b4114610842578063a217fddf14610857578063a22cb4651461086c57600080fd5b80638c7ea24b146107bf5780638da5cb5b146107df57806391d148541461080257600080fd5b806378e97925116101ab57806378e979251461075f5780637d6bc260146107755780638456cb591461078a578063894760691461079f57600080fd5b806367243482146106ff5780636dda34db1461071f57806370a082311461073f57600080fd5b80633f4ba83a116102ab57806354214f69116102495780635c975abb116102235780635c975abb146106925780635d90bad9146106aa5780635f92d85e146106ca5780636352211e146106df57600080fd5b806354214f691461063e57806355f804b314610658578063567e0dd51461067857600080fd5b806342842e0e1161028557806342842e0e146105cb57806348dad81b146105de5780634c261247146105fe5780634d6ed8c41461061e57600080fd5b80633f4ba83a1461057f578063410066051461059457806341f43434146105a957600080fd5b8063248a9ca3116103185780632ae8f004116102f25780632ae8f0041461050a5780632f2ff15d1461052a57806336568abe1461054a5780633ccfd60b1461056a57600080fd5b8063248a9ca3146104795780632a0acc6a146104a95780632a55205a146104cb57600080fd5b8063095ea7b311610354578063095ea7b31461040a57806312db226e1461041f57806318160ddd1461043f57806323b872dd1461046657600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004613026565b610a89565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610acf565b6040516103a7919061309b565b3480156103de57600080fd5b506103f26103ed3660046130ae565b610b61565b6040516001600160a01b0390911681526020016103a7565b61041d6104183660046130e3565b610ba5565b005b34801561042b57600080fd5b5061041d61043a3660046131cc565b610c73565b34801561044b57600080fd5b5060015460005403600019015b6040519081526020016103a7565b61041d610474366004613259565b610cb4565b34801561048557600080fd5b506104586104943660046130ae565b60009081526010602052604090206001015490565b3480156104b557600080fd5b506104586000805160206138e083398151915281565b3480156104d757600080fd5b506104eb6104e6366004613295565b610d8d565b604080516001600160a01b0390931683526020830191909152016103a7565b34801561051657600080fd5b5061039b6105253660046132b7565b610de2565b34801561053657600080fd5b5061041d6105453660046132ea565b610f49565b34801561055657600080fd5b5061041d6105653660046132ea565b610f6e565b34801561057657600080fd5b5061041d610fec565b34801561058b57600080fd5b5061041d6110d3565b3480156105a057600080fd5b5061041d611112565b3480156105b557600080fd5b506103f26daaeb6d7670e522a718067333cd4e81565b61041d6105d9366004613259565b61115d565b3480156105ea57600080fd5b506104586105f93660046130ae565b61122b565b34801561060a57600080fd5b5061041d610619366004613316565b611259565b34801561062a57600080fd5b506104586106393660046130ae565b6112a9565b34801561064a57600080fd5b50600c5461039b9060ff1681565b34801561066457600080fd5b5061041d610673366004613316565b61134a565b34801561068457600080fd5b50610458650a86cc92e3db81565b34801561069e57600080fd5b5060115460ff1661039b565b3480156106b657600080fd5b5061041d6106c53660046130ae565b61137f565b3480156106d657600080fd5b5061041d6113bd565b3480156106eb57600080fd5b506103f26106fa3660046130ae565b6113fe565b34801561070b57600080fd5b5061041d61071a3660046133da565b611409565b34801561072b57600080fd5b5061045861073a3660046130ae565b611555565b34801561074b57600080fd5b5061045861075a366004613490565b6115d4565b34801561076b57600080fd5b5061045860085481565b34801561078157600080fd5b50600d54610458565b34801561079657600080fd5b5061041d611623565b3480156107ab57600080fd5b5061041d6107ba366004613490565b611660565b3480156107cb57600080fd5b5061041d6107da3660046130e3565b6117bd565b3480156107eb57600080fd5b5060115461010090046001600160a01b03166103f2565b34801561080e57600080fd5b5061039b61081d3660046132ea565b6117fc565b34801561082e57600080fd5b5061041d61083d3660046134ab565b611827565b34801561084e57600080fd5b506103c5611866565b34801561086357600080fd5b50610458600081565b34801561087857600080fd5b5061041d6108873660046134f6565b611875565b34801561089857600080fd5b5061041d611939565b3480156108ad57600080fd5b506104586108bc3660046130ae565b611980565b3480156108cd57600080fd5b5061041d6108dc3660046130e3565b6119c1565b61041d6108ef36600461352d565b611b39565b34801561090057600080fd5b506103c561090f3660046130ae565b611c15565b34801561092057600080fd5b5061041d61092f3660046132ea565b611c20565b34801561094057600080fd5b5061045861094f3660046130ae565b611c45565b34801561096057600080fd5b506012546001600160a01b03166103f2565b34801561097e57600080fd5b5061041d61098d366004613316565b611c80565b34801561099e57600080fd5b5060145461039b9060ff1681565b3480156109b857600080fd5b5061039b6109c73660046135a9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a0157600080fd5b5061041d610a103660046130e3565b611cbe565b348015610a2157600080fd5b5061041d610a30366004613490565b611d71565b348015610a4157600080fd5b5061041d610a50366004613490565b611dbb565b348015610a6157600080fd5b506104587ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b60006001600160e01b03198216632483248360e11b1480610aba57506001600160e01b031982166301ffc9a760e01b145b80610ac95750610ac982611e20565b92915050565b606060028054610ade906135d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0a906135d3565b8015610b575780601f10610b2c57610100808354040283529160200191610b57565b820191906000526020600020905b815481529060010190602001808311610b3a57829003601f168201915b5050505050905090565b6000610b6c82611e45565b610b89576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b15610c6457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c37919061360d565b610c6457604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b610c6e8383611e7a565b505050565b610c8b6000805160206138e0833981519152336117fc565b610ca857604051630318bf7160e11b815260040160405180910390fd5b610cb181611f1a565b50565b826daaeb6d7670e522a718067333cd4e3b15610d7c57336001600160a01b03821603610cea57610ce5848484611faa565b610d87565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5d919061360d565b610d7c57604051633b79c77360e21b8152336004820152602401610c5b565b610d87848484611faa565b50505050565b604080518082019091526013546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610dce9086613640565b610dd8919061365f565b9150509250929050565b600080610dee8461214f565b80519091506001600160a01b03163303610e1b5760405163371a130960e01b815260040160405180910390fd5b6001600160a01b038516600090815260076020908152604080832033845290915281205460ff1680610e5d575033610e5286610b61565b6001600160a01b0316145b90506000610e6a866112a9565b9050866001600160a01b031683600001516001600160a01b031614610ea25760405163799a465d60e01b815260040160405180910390fd5b81610ec057604051638463527960e01b815260040160405180910390fd5b80851115610ee15760405163cfd1c46b60e01b815260040160405180910390fd5b600086815260096020526040908190208054870190555186906001600160a01b038916907f535148561d77998b1c55b0df8e3a745c169a3c2d06073ca7cf45743224cef85d90610f349089815260200190565b60405180910390a35060019695505050505050565b600082815260106020526040902060010154610f64816121c7565b610c6e83836121d1565b6001600160a01b0381163314610fde5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c5b565b610fe88282612257565b5050565b610ff76000336117fc565b15801561101857506012546001600160a01b0316336001600160a01b031614155b1561103657604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b031661105f57604051630a8c7bad60e21b815260040160405180910390fd5b6012546040516000916001600160a01b03169047908381818185875af1925050503d80600081146110ac576040519150601f19603f3d011682016040523d82523d6000602084013e6110b1565b606091505b5050905080610cb157604051631d42c86760e21b815260040160405180910390fd5b6110eb6000805160206138e0833981519152336117fc565b61110857604051630318bf7160e11b815260040160405180910390fd5b6111106122be565b565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60016111426000546000190190565b604080519283526020830191909152015b60405180910390a1565b826daaeb6d7670e522a718067333cd4e3b1561122057336001600160a01b0382160361118e57610ce584848461230b565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611201919061360d565b61122057604051633b79c77360e21b8152336004820152602401610c5b565b610d8784848461230b565b6000600b828154811061124057611240613681565b9060005260206000209060020201600001549050919050565b6112716000805160206138e0833981519152336117fc565b61128e57604051630318bf7160e11b815260040160405180910390fd5b6112a0600c805460ff19166001179055565b610cb181612326565b60006112b482611e45565b6112d157604051630a14c4b560e41b815260040160405180910390fd5b60085415806112e257506008544211155b156112ef57506000919050565b60006112fa8361214f565b6020015167ffffffffffffffff169050600854811161131857506008545b600092835260096020908152604080852054600a909252909320544291909103650a86cc92e3db020191909103919050565b6113626000805160206138e0833981519152336117fc565b6112a057604051630318bf7160e11b815260040160405180910390fd5b6113976000805160206138e0833981519152336117fc565b6113b457604051630318bf7160e11b815260040160405180910390fd5b610cb181612385565b6113d56000805160206138e0833981519152336117fc565b6113f257604051630318bf7160e11b815260040160405180910390fd5b6014805460ff19169055565b6000610ac9826123aa565b6114216000805160206138e0833981519152336117fc565b61143e57604051630318bf7160e11b815260040160405180910390fd5b60145460ff166114905760405162461bcd60e51b815260206004820152601d60248201527f5765623347616d65506173733a2041697264726f70206973206f7665720000006044820152606401610c5b565b80518251146114fb5760405162461bcd60e51b815260206004820152603160248201527f5468655765623347616d653a206163636f756e747320616e6420616d6f756e746044820152700e640d8cadccee8d040dad2e6dac2e8c6d607b1b6064820152608401610c5b565b60005b8251811015610c6e5761154383828151811061151c5761151c613681565b602002602001015183838151811061153657611536613681565b6020026020010151612420565b8061154d81613697565b9150506114fe565b600061156082611e45565b61157d57604051630a14c4b560e41b815260040160405180910390fd5b6000611588836112a9565b600d549091505b600b81815481106115a2576115a2613681565b90600052602060002090600202016000015482106115c1579392505050565b600019018061158f575060009392505050565b60006001600160a01b0382166115fd576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61163b6000805160206138e0833981519152336117fc565b61165857604051630318bf7160e11b815260040160405180910390fd5b61111061243a565b61166b6000336117fc565b15801561168c57506012546001600160a01b0316336001600160a01b031614155b156116aa57604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b03166116d357604051630a8c7bad60e21b815260040160405180910390fd5b6012546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a0823190602401602060405180830381865afa15801561172a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174e91906136b0565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611799573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6e919061360d565b6117d56000805160206138e0833981519152336117fc565b6117f257604051630318bf7160e11b815260040160405180910390fd5b610fe88282612477565b60009182526010602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61183f6000805160206138e0833981519152336117fc565b61185c57604051630318bf7160e11b815260040160405180910390fd5b610fe88282612513565b606060038054610ade906135d3565b816daaeb6d7670e522a718067333cd4e3b1561192f57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611907919061360d565b61192f57604051633b79c77360e21b81526001600160a01b0382166004820152602401610c5b565b610c6e8383612598565b6119516000805160206138e0833981519152336117fc565b61196e57604051630318bf7160e11b815260040160405180910390fd5b611110600c805460ff19166001179055565b600061198b82611e45565b6119a857604051630a14c4b560e41b815260040160405180910390fd5b6119b182611c45565b6119ba836112a9565b0192915050565b6119cc6000336117fc565b1580156119ed57506012546001600160a01b0316336001600160a01b031614155b15611a0b57604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b0316611a3457604051630a8c7bad60e21b815260040160405180910390fd5b601254604051627eeac760e11b815230600482018190526024820184905284926001600160a01b038085169363f242432a939291909116908690859062fdd58e90604401602060405180830381865afa158015611a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab991906136b0565b6040516001600160e01b031960e087901b1681526001600160a01b0394851660048201529390921660248401526044830152606482015260a06084820152600060a482015260c4015b600060405180830381600087803b158015611b1c57600080fd5b505af1158015611b30573d6000803e3d6000fd5b50505050505050565b836daaeb6d7670e522a718067333cd4e3b15611c0257336001600160a01b03821603611b7057611b6b85858585612604565b611c0e565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be3919061360d565b611c0257604051633b79c77360e21b8152336004820152602401610c5b565b611c0e85858585612604565b5050505050565b6060610ac982612648565b600082815260106020526040902060010154611c3b816121c7565b610c6e8383612257565b6000611c5082611e45565b611c6d57604051630a14c4b560e41b815260040160405180910390fd5b5060009081526009602052604090205490565b611c986000805160206138e0833981519152336117fc565b611cb557604051630318bf7160e11b815260040160405180910390fd5b610cb1816126e2565b611cc96000336117fc565b158015611cea57506012546001600160a01b0316336001600160a01b031614155b15611d0857604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b0316611d3157604051630a8c7bad60e21b815260040160405180910390fd5b6012546040516323b872dd60e01b81523060048201526001600160a01b0391821660248201526044810183905283918216906323b872dd90606401611b02565b611d7c6000336117fc565b611d9957604051630318bf7160e11b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b611dd36000805160206138e0833981519152336117fc565b611df057604051630318bf7160e11b815260040160405180910390fd5b6001600160a01b038116611e17576040516349e27cff60e01b815260040160405180910390fd5b610cb1816126f5565b60006001600160e01b0319821663152a902d60e11b1480610ac95750610ac98261274f565b600081600111158015611e59575060005482105b8015610ac9575050600090815260046020526040902054600160e01b161590565b6000611e85826113fe565b9050336001600160a01b03821614611ebe57611ea181336109c7565b611ebe576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b8054600181018255600091909152815160029091027f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db981019182556020808401518051859493611f92937f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba909101920190612f77565b5050600b54611fa491506001906136c9565b600d5550565b6000611fb5826123aa565b9050836001600160a01b0316816001600160a01b031614611fe85760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176120355761201886336109c7565b61203557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661205c57604051633a954ecd60e21b815260040160405180910390fd5b612069868686600161278f565b801561207457600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003612106576001840160008181526004602052604081205490036121045760005481146121045760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b604080516080810182526000808252602082018190529181018290526060810191909152610ac961217f836123aa565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b610cb1813361279b565b6121db82826117fc565b610fe85760008281526010602090815260408083206001600160a01b03851684529091529020805460ff191660011790556122133390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61226182826117fc565b15610fe85760008281526010602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6122c66127f4565b6011805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001611153565b610c6e83838360405180602001604052806000815250611b39565b805161233990600e906020840190612f77565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600161236a6000546000190190565b6040805192835260208301919091520160405180910390a150565b600854156123a55760405162dc149f60e41b815260040160405180910390fd5b600855565b60008180600111612407576000548110156124075760008181526004602052604081205490600160e01b82169003612405575b806000036123fe5750600019016000818152600460205260409020546123dd565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b610fe882826040518060200160405280600081525061283d565b6124426128a3565b6011805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122f33390565b6127108111156124c95760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610c5b565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260138054600160a01b9093026001600160b81b0319909316909117919091179055565b80600b838154811061252757612527613681565b9060005260206000209060020201600101908051906020019061254b929190612f77565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600161257c6000546000190190565b6040805192835260208301919091520160405180910390a15050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61260f848484610cb4565b6001600160a01b0383163b15610d875761262b848484846128e9565b610d87576040516368d2bf6b60e11b815260040160405180910390fd5b606061265382611e45565b61267057604051630a14c4b560e41b815260040160405180910390fd5b600061267b836129d5565b600c5490915060ff1615156000036126935792915050565b80516000036126b157604051806020016040528060008152506123fe565b806126bb84612bb5565b6040516020016126cc9291906136fc565b6040516020818303038152906040529392505050565b805161233990600f906020840190612f77565b601180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160e01b0319821663da8def7360e01b148061278057506001600160e01b03198216635c975abb60e01b145b80610ac95750610ac982612bf9565b610d8784848484612c2e565b6127a582826117fc565b610fe8576127b281612c9b565b6127bd836020612cad565b6040516020016127ce92919061372b565b60408051601f198184030181529082905262461bcd60e51b8252610c5b9160040161309b565b60115460ff166111105760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c5b565b6128478383612e49565b6001600160a01b0383163b15610c6e576000548281035b61287160008683806001019450866128e9565b61288e576040516368d2bf6b60e11b815260040160405180910390fd5b81811061285e578160005414611c0e57600080fd5b60115460ff16156111105760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c5b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061291e9033908990889088906004016137a0565b6020604051808303816000875af1925050508015612959575060408051601f3d908101601f19168201909252612956918101906137dd565b60015b6129b7573d808015612987576040519150601f19603f3d011682016040523d82523d6000602084013e61298c565b606091505b5080516000036129af576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606129e082611e45565b6129fd57604051630a14c4b560e41b815260040160405180910390fd5b600c5460ff161515600003612a9e57600f8054612a19906135d3565b80601f0160208091040260200160405190810160405280929190818152602001828054612a45906135d3565b8015612a925780601f10612a6757610100808354040283529160200191612a92565b820191906000526020600020905b815481529060010190602001808311612a7557829003601f168201915b50505050509050919050565b6000612aa983611555565b90506000600b8281548110612ac057612ac0613681565b90600052602060002090600202016001018054612adc906135d3565b90501115612b9957600b8181548110612af757612af7613681565b90600052602060002090600202016001018054612b13906135d3565b80601f0160208091040260200160405190810160405280929190818152602001828054612b3f906135d3565b8015612b8c5780601f10612b6157610100808354040283529160200191612b8c565b820191906000526020600020905b815481529060010190602001808311612b6f57829003601f168201915b5050505050915050919050565b600e612ba482612bb5565b6040516020016126cc9291906137fa565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480612bcf5750819003601f19909101908152919050565b60006001600160e01b03198216637965db0b60e01b1480610ac957506301ffc9a760e01b6001600160e01b0319831614610ac9565b6001600160a01b03841615610d8757600b5415612c8f576000612c5083611555565b9050612c8d83600b8381548110612c6957612c69613681565b9060005260206000209060020201600001546000918252600a602052604090912055565b505b610d8784848484612f54565b6060610ac96001600160a01b03831660145b60606000612cbc836002613640565b612cc79060026138b0565b67ffffffffffffffff811115612cdf57612cdf61310d565b6040519080825280601f01601f191660200182016040528015612d09576020820181803683370190505b509050600360fc1b81600081518110612d2457612d24613681565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d5357612d53613681565b60200101906001600160f81b031916908160001a9053506000612d77846002613640565b612d829060016138b0565b90505b6001811115612dfa576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612db657612db6613681565b1a60f81b828281518110612dcc57612dcc613681565b60200101906001600160f81b031916908160001a90535060049490941c93612df3816138c8565b9050612d85565b5083156123fe5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5b565b6000805490829003612e6e5760405163b562e8dd60e01b815260040160405180910390fd5b612e7b600084838561278f565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612f2a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612ef2565b5081600003612f4b57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6001600160a01b03841615610d8757506000908152600960205260408120555050565b828054612f83906135d3565b90600052602060002090601f016020900481019282612fa55760008555612feb565b82601f10612fbe57805160ff1916838001178555612feb565b82800160010185558215612feb579182015b82811115612feb578251825591602001919060010190612fd0565b50612ff7929150612ffb565b5090565b5b80821115612ff75760008155600101612ffc565b6001600160e01b031981168114610cb157600080fd5b60006020828403121561303857600080fd5b81356123fe81613010565b60005b8381101561305e578181015183820152602001613046565b83811115610d875750506000910152565b60008151808452613087816020860160208601613043565b601f01601f19169290920160200192915050565b6020815260006123fe602083018461306f565b6000602082840312156130c057600080fd5b5035919050565b80356001600160a01b03811681146130de57600080fd5b919050565b600080604083850312156130f657600080fd5b6130ff836130c7565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561314c5761314c61310d565b604052919050565b600067ffffffffffffffff83111561316e5761316e61310d565b613181601f8401601f1916602001613123565b905082815283838301111561319557600080fd5b828260208301376000602084830101529392505050565b600082601f8301126131bd57600080fd5b6123fe83833560208501613154565b6000602082840312156131de57600080fd5b813567ffffffffffffffff808211156131f657600080fd5b908301906040828603121561320a57600080fd5b6040516040810181811083821117156132255761322561310d565b6040528235815260208301358281111561323e57600080fd5b61324a878286016131ac565b60208301525095945050505050565b60008060006060848603121561326e57600080fd5b613277846130c7565b9250613285602085016130c7565b9150604084013590509250925092565b600080604083850312156132a857600080fd5b50508035926020909101359150565b6000806000606084860312156132cc57600080fd5b6132d5846130c7565b95602085013595506040909401359392505050565b600080604083850312156132fd57600080fd5b8235915061330d602084016130c7565b90509250929050565b60006020828403121561332857600080fd5b813567ffffffffffffffff81111561333f57600080fd5b6129cd848285016131ac565b600067ffffffffffffffff8211156133655761336561310d565b5060051b60200190565b600082601f83011261338057600080fd5b813560206133956133908361334b565b613123565b82815260059290921b840181019181810190868411156133b457600080fd5b8286015b848110156133cf57803583529183019183016133b8565b509695505050505050565b600080604083850312156133ed57600080fd5b823567ffffffffffffffff8082111561340557600080fd5b818501915085601f83011261341957600080fd5b813560206134296133908361334b565b82815260059290921b8401810191818101908984111561344857600080fd5b948201945b8386101561346d5761345e866130c7565b8252948201949082019061344d565b9650508601359250508082111561348357600080fd5b50610dd88582860161336f565b6000602082840312156134a257600080fd5b6123fe826130c7565b600080604083850312156134be57600080fd5b82359150602083013567ffffffffffffffff8111156134dc57600080fd5b610dd8858286016131ac565b8015158114610cb157600080fd5b6000806040838503121561350957600080fd5b613512836130c7565b91506020830135613522816134e8565b809150509250929050565b6000806000806080858703121561354357600080fd5b61354c856130c7565b935061355a602086016130c7565b925060408501359150606085013567ffffffffffffffff81111561357d57600080fd5b8501601f8101871361358e57600080fd5b61359d87823560208401613154565b91505092959194509250565b600080604083850312156135bc57600080fd5b6135c5836130c7565b915061330d602084016130c7565b600181811c908216806135e757607f821691505b60208210810361360757634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561361f57600080fd5b81516123fe816134e8565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561365a5761365a61362a565b500290565b60008261367c57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016136a9576136a961362a565b5060010190565b6000602082840312156136c257600080fd5b5051919050565b6000828210156136db576136db61362a565b500390565b600081516136f2818560208601613043565b9290920192915050565b6000835161370e818460208801613043565b835190830190613722818360208801613043565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613763816017850160208801613043565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613794816028840160208801613043565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906137d39083018461306f565b9695505050505050565b6000602082840312156137ef57600080fd5b81516123fe81613010565b600080845481600182811c91508083168061381657607f831692505b6020808410820361383557634e487b7160e01b86526022600452602486fd5b818015613849576001811461385a57613887565b60ff19861689528489019650613887565b60008b81526020902060005b8681101561387f5781548b820152908501908301613866565b505084890196505b5050505050506138a761389a82866136e0565b602f60f81b815260010190565b95945050505050565b600082198211156138c3576138c361362a565b500190565b6000816138d7576138d761362a565b50600019019056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a26469706673582212203ab0db1651359d25fc8a11ffcdb07ceefad8a153375b23379fafc23afe6b576464736f6c634300080d0033df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000003e806df2a2f147bcf4d5e47b72d9ca8319cc3efd00000000000000000000000000000000000000000000000000000000000001f40000000000000000000000003e806df2a2f147bcf4d5e47b72d9ca8319cc3efd000000000000000000000000000000000000000000000000000000000000000d54686520576562332047616d650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054750415353000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103765760003560e01c806367243482116101d1578063a475b5dd11610102578063e0024604116100a0578063f07a380e1161006f578063f07a380e146109f5578063f0f4426014610a15578063f2fde38b14610a35578063fe6d812414610a5557600080fd5b8063e002460414610954578063e185a2cc14610972578063e20d810f14610992578063e985e9c5146109ac57600080fd5b8063b88d4fde116100dc578063b88d4fde146108e1578063c87b56dd146108f4578063d547741f14610914578063d5b5cc231461093457600080fd5b8063a475b5dd1461088c578063b119ebfe146108a1578063b34c5e1f146108c157600080fd5b80638c7ea24b1161016f57806392027aef1161014957806392027aef1461082257806395d89b4114610842578063a217fddf14610857578063a22cb4651461086c57600080fd5b80638c7ea24b146107bf5780638da5cb5b146107df57806391d148541461080257600080fd5b806378e97925116101ab57806378e979251461075f5780637d6bc260146107755780638456cb591461078a578063894760691461079f57600080fd5b806367243482146106ff5780636dda34db1461071f57806370a082311461073f57600080fd5b80633f4ba83a116102ab57806354214f69116102495780635c975abb116102235780635c975abb146106925780635d90bad9146106aa5780635f92d85e146106ca5780636352211e146106df57600080fd5b806354214f691461063e57806355f804b314610658578063567e0dd51461067857600080fd5b806342842e0e1161028557806342842e0e146105cb57806348dad81b146105de5780634c261247146105fe5780634d6ed8c41461061e57600080fd5b80633f4ba83a1461057f578063410066051461059457806341f43434146105a957600080fd5b8063248a9ca3116103185780632ae8f004116102f25780632ae8f0041461050a5780632f2ff15d1461052a57806336568abe1461054a5780633ccfd60b1461056a57600080fd5b8063248a9ca3146104795780632a0acc6a146104a95780632a55205a146104cb57600080fd5b8063095ea7b311610354578063095ea7b31461040a57806312db226e1461041f57806318160ddd1461043f57806323b872dd1461046657600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004613026565b610a89565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610acf565b6040516103a7919061309b565b3480156103de57600080fd5b506103f26103ed3660046130ae565b610b61565b6040516001600160a01b0390911681526020016103a7565b61041d6104183660046130e3565b610ba5565b005b34801561042b57600080fd5b5061041d61043a3660046131cc565b610c73565b34801561044b57600080fd5b5060015460005403600019015b6040519081526020016103a7565b61041d610474366004613259565b610cb4565b34801561048557600080fd5b506104586104943660046130ae565b60009081526010602052604090206001015490565b3480156104b557600080fd5b506104586000805160206138e083398151915281565b3480156104d757600080fd5b506104eb6104e6366004613295565b610d8d565b604080516001600160a01b0390931683526020830191909152016103a7565b34801561051657600080fd5b5061039b6105253660046132b7565b610de2565b34801561053657600080fd5b5061041d6105453660046132ea565b610f49565b34801561055657600080fd5b5061041d6105653660046132ea565b610f6e565b34801561057657600080fd5b5061041d610fec565b34801561058b57600080fd5b5061041d6110d3565b3480156105a057600080fd5b5061041d611112565b3480156105b557600080fd5b506103f26daaeb6d7670e522a718067333cd4e81565b61041d6105d9366004613259565b61115d565b3480156105ea57600080fd5b506104586105f93660046130ae565b61122b565b34801561060a57600080fd5b5061041d610619366004613316565b611259565b34801561062a57600080fd5b506104586106393660046130ae565b6112a9565b34801561064a57600080fd5b50600c5461039b9060ff1681565b34801561066457600080fd5b5061041d610673366004613316565b61134a565b34801561068457600080fd5b50610458650a86cc92e3db81565b34801561069e57600080fd5b5060115460ff1661039b565b3480156106b657600080fd5b5061041d6106c53660046130ae565b61137f565b3480156106d657600080fd5b5061041d6113bd565b3480156106eb57600080fd5b506103f26106fa3660046130ae565b6113fe565b34801561070b57600080fd5b5061041d61071a3660046133da565b611409565b34801561072b57600080fd5b5061045861073a3660046130ae565b611555565b34801561074b57600080fd5b5061045861075a366004613490565b6115d4565b34801561076b57600080fd5b5061045860085481565b34801561078157600080fd5b50600d54610458565b34801561079657600080fd5b5061041d611623565b3480156107ab57600080fd5b5061041d6107ba366004613490565b611660565b3480156107cb57600080fd5b5061041d6107da3660046130e3565b6117bd565b3480156107eb57600080fd5b5060115461010090046001600160a01b03166103f2565b34801561080e57600080fd5b5061039b61081d3660046132ea565b6117fc565b34801561082e57600080fd5b5061041d61083d3660046134ab565b611827565b34801561084e57600080fd5b506103c5611866565b34801561086357600080fd5b50610458600081565b34801561087857600080fd5b5061041d6108873660046134f6565b611875565b34801561089857600080fd5b5061041d611939565b3480156108ad57600080fd5b506104586108bc3660046130ae565b611980565b3480156108cd57600080fd5b5061041d6108dc3660046130e3565b6119c1565b61041d6108ef36600461352d565b611b39565b34801561090057600080fd5b506103c561090f3660046130ae565b611c15565b34801561092057600080fd5b5061041d61092f3660046132ea565b611c20565b34801561094057600080fd5b5061045861094f3660046130ae565b611c45565b34801561096057600080fd5b506012546001600160a01b03166103f2565b34801561097e57600080fd5b5061041d61098d366004613316565b611c80565b34801561099e57600080fd5b5060145461039b9060ff1681565b3480156109b857600080fd5b5061039b6109c73660046135a9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a0157600080fd5b5061041d610a103660046130e3565b611cbe565b348015610a2157600080fd5b5061041d610a30366004613490565b611d71565b348015610a4157600080fd5b5061041d610a50366004613490565b611dbb565b348015610a6157600080fd5b506104587ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b60006001600160e01b03198216632483248360e11b1480610aba57506001600160e01b031982166301ffc9a760e01b145b80610ac95750610ac982611e20565b92915050565b606060028054610ade906135d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0a906135d3565b8015610b575780601f10610b2c57610100808354040283529160200191610b57565b820191906000526020600020905b815481529060010190602001808311610b3a57829003601f168201915b5050505050905090565b6000610b6c82611e45565b610b89576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b15610c6457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c37919061360d565b610c6457604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b610c6e8383611e7a565b505050565b610c8b6000805160206138e0833981519152336117fc565b610ca857604051630318bf7160e11b815260040160405180910390fd5b610cb181611f1a565b50565b826daaeb6d7670e522a718067333cd4e3b15610d7c57336001600160a01b03821603610cea57610ce5848484611faa565b610d87565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5d919061360d565b610d7c57604051633b79c77360e21b8152336004820152602401610c5b565b610d87848484611faa565b50505050565b604080518082019091526013546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610dce9086613640565b610dd8919061365f565b9150509250929050565b600080610dee8461214f565b80519091506001600160a01b03163303610e1b5760405163371a130960e01b815260040160405180910390fd5b6001600160a01b038516600090815260076020908152604080832033845290915281205460ff1680610e5d575033610e5286610b61565b6001600160a01b0316145b90506000610e6a866112a9565b9050866001600160a01b031683600001516001600160a01b031614610ea25760405163799a465d60e01b815260040160405180910390fd5b81610ec057604051638463527960e01b815260040160405180910390fd5b80851115610ee15760405163cfd1c46b60e01b815260040160405180910390fd5b600086815260096020526040908190208054870190555186906001600160a01b038916907f535148561d77998b1c55b0df8e3a745c169a3c2d06073ca7cf45743224cef85d90610f349089815260200190565b60405180910390a35060019695505050505050565b600082815260106020526040902060010154610f64816121c7565b610c6e83836121d1565b6001600160a01b0381163314610fde5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c5b565b610fe88282612257565b5050565b610ff76000336117fc565b15801561101857506012546001600160a01b0316336001600160a01b031614155b1561103657604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b031661105f57604051630a8c7bad60e21b815260040160405180910390fd5b6012546040516000916001600160a01b03169047908381818185875af1925050503d80600081146110ac576040519150601f19603f3d011682016040523d82523d6000602084013e6110b1565b606091505b5050905080610cb157604051631d42c86760e21b815260040160405180910390fd5b6110eb6000805160206138e0833981519152336117fc565b61110857604051630318bf7160e11b815260040160405180910390fd5b6111106122be565b565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60016111426000546000190190565b604080519283526020830191909152015b60405180910390a1565b826daaeb6d7670e522a718067333cd4e3b1561122057336001600160a01b0382160361118e57610ce584848461230b565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611201919061360d565b61122057604051633b79c77360e21b8152336004820152602401610c5b565b610d8784848461230b565b6000600b828154811061124057611240613681565b9060005260206000209060020201600001549050919050565b6112716000805160206138e0833981519152336117fc565b61128e57604051630318bf7160e11b815260040160405180910390fd5b6112a0600c805460ff19166001179055565b610cb181612326565b60006112b482611e45565b6112d157604051630a14c4b560e41b815260040160405180910390fd5b60085415806112e257506008544211155b156112ef57506000919050565b60006112fa8361214f565b6020015167ffffffffffffffff169050600854811161131857506008545b600092835260096020908152604080852054600a909252909320544291909103650a86cc92e3db020191909103919050565b6113626000805160206138e0833981519152336117fc565b6112a057604051630318bf7160e11b815260040160405180910390fd5b6113976000805160206138e0833981519152336117fc565b6113b457604051630318bf7160e11b815260040160405180910390fd5b610cb181612385565b6113d56000805160206138e0833981519152336117fc565b6113f257604051630318bf7160e11b815260040160405180910390fd5b6014805460ff19169055565b6000610ac9826123aa565b6114216000805160206138e0833981519152336117fc565b61143e57604051630318bf7160e11b815260040160405180910390fd5b60145460ff166114905760405162461bcd60e51b815260206004820152601d60248201527f5765623347616d65506173733a2041697264726f70206973206f7665720000006044820152606401610c5b565b80518251146114fb5760405162461bcd60e51b815260206004820152603160248201527f5468655765623347616d653a206163636f756e747320616e6420616d6f756e746044820152700e640d8cadccee8d040dad2e6dac2e8c6d607b1b6064820152608401610c5b565b60005b8251811015610c6e5761154383828151811061151c5761151c613681565b602002602001015183838151811061153657611536613681565b6020026020010151612420565b8061154d81613697565b9150506114fe565b600061156082611e45565b61157d57604051630a14c4b560e41b815260040160405180910390fd5b6000611588836112a9565b600d549091505b600b81815481106115a2576115a2613681565b90600052602060002090600202016000015482106115c1579392505050565b600019018061158f575060009392505050565b60006001600160a01b0382166115fd576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61163b6000805160206138e0833981519152336117fc565b61165857604051630318bf7160e11b815260040160405180910390fd5b61111061243a565b61166b6000336117fc565b15801561168c57506012546001600160a01b0316336001600160a01b031614155b156116aa57604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b03166116d357604051630a8c7bad60e21b815260040160405180910390fd5b6012546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a0823190602401602060405180830381865afa15801561172a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174e91906136b0565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611799573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6e919061360d565b6117d56000805160206138e0833981519152336117fc565b6117f257604051630318bf7160e11b815260040160405180910390fd5b610fe88282612477565b60009182526010602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61183f6000805160206138e0833981519152336117fc565b61185c57604051630318bf7160e11b815260040160405180910390fd5b610fe88282612513565b606060038054610ade906135d3565b816daaeb6d7670e522a718067333cd4e3b1561192f57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156118e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611907919061360d565b61192f57604051633b79c77360e21b81526001600160a01b0382166004820152602401610c5b565b610c6e8383612598565b6119516000805160206138e0833981519152336117fc565b61196e57604051630318bf7160e11b815260040160405180910390fd5b611110600c805460ff19166001179055565b600061198b82611e45565b6119a857604051630a14c4b560e41b815260040160405180910390fd5b6119b182611c45565b6119ba836112a9565b0192915050565b6119cc6000336117fc565b1580156119ed57506012546001600160a01b0316336001600160a01b031614155b15611a0b57604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b0316611a3457604051630a8c7bad60e21b815260040160405180910390fd5b601254604051627eeac760e11b815230600482018190526024820184905284926001600160a01b038085169363f242432a939291909116908690859062fdd58e90604401602060405180830381865afa158015611a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab991906136b0565b6040516001600160e01b031960e087901b1681526001600160a01b0394851660048201529390921660248401526044830152606482015260a06084820152600060a482015260c4015b600060405180830381600087803b158015611b1c57600080fd5b505af1158015611b30573d6000803e3d6000fd5b50505050505050565b836daaeb6d7670e522a718067333cd4e3b15611c0257336001600160a01b03821603611b7057611b6b85858585612604565b611c0e565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be3919061360d565b611c0257604051633b79c77360e21b8152336004820152602401610c5b565b611c0e85858585612604565b5050505050565b6060610ac982612648565b600082815260106020526040902060010154611c3b816121c7565b610c6e8383612257565b6000611c5082611e45565b611c6d57604051630a14c4b560e41b815260040160405180910390fd5b5060009081526009602052604090205490565b611c986000805160206138e0833981519152336117fc565b611cb557604051630318bf7160e11b815260040160405180910390fd5b610cb1816126e2565b611cc96000336117fc565b158015611cea57506012546001600160a01b0316336001600160a01b031614155b15611d0857604051630318bf7160e11b815260040160405180910390fd5b6012546001600160a01b0316611d3157604051630a8c7bad60e21b815260040160405180910390fd5b6012546040516323b872dd60e01b81523060048201526001600160a01b0391821660248201526044810183905283918216906323b872dd90606401611b02565b611d7c6000336117fc565b611d9957604051630318bf7160e11b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b611dd36000805160206138e0833981519152336117fc565b611df057604051630318bf7160e11b815260040160405180910390fd5b6001600160a01b038116611e17576040516349e27cff60e01b815260040160405180910390fd5b610cb1816126f5565b60006001600160e01b0319821663152a902d60e11b1480610ac95750610ac98261274f565b600081600111158015611e59575060005482105b8015610ac9575050600090815260046020526040902054600160e01b161590565b6000611e85826113fe565b9050336001600160a01b03821614611ebe57611ea181336109c7565b611ebe576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b8054600181018255600091909152815160029091027f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db981019182556020808401518051859493611f92937f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba909101920190612f77565b5050600b54611fa491506001906136c9565b600d5550565b6000611fb5826123aa565b9050836001600160a01b0316816001600160a01b031614611fe85760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176120355761201886336109c7565b61203557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661205c57604051633a954ecd60e21b815260040160405180910390fd5b612069868686600161278f565b801561207457600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003612106576001840160008181526004602052604081205490036121045760005481146121045760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b604080516080810182526000808252602082018190529181018290526060810191909152610ac961217f836123aa565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b610cb1813361279b565b6121db82826117fc565b610fe85760008281526010602090815260408083206001600160a01b03851684529091529020805460ff191660011790556122133390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61226182826117fc565b15610fe85760008281526010602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6122c66127f4565b6011805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b039091168152602001611153565b610c6e83838360405180602001604052806000815250611b39565b805161233990600e906020840190612f77565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600161236a6000546000190190565b6040805192835260208301919091520160405180910390a150565b600854156123a55760405162dc149f60e41b815260040160405180910390fd5b600855565b60008180600111612407576000548110156124075760008181526004602052604081205490600160e01b82169003612405575b806000036123fe5750600019016000818152600460205260409020546123dd565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b610fe882826040518060200160405280600081525061283d565b6124426128a3565b6011805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122f33390565b6127108111156124c95760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610c5b565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260138054600160a01b9093026001600160b81b0319909316909117919091179055565b80600b838154811061252757612527613681565b9060005260206000209060020201600101908051906020019061254b929190612f77565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600161257c6000546000190190565b6040805192835260208301919091520160405180910390a15050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61260f848484610cb4565b6001600160a01b0383163b15610d875761262b848484846128e9565b610d87576040516368d2bf6b60e11b815260040160405180910390fd5b606061265382611e45565b61267057604051630a14c4b560e41b815260040160405180910390fd5b600061267b836129d5565b600c5490915060ff1615156000036126935792915050565b80516000036126b157604051806020016040528060008152506123fe565b806126bb84612bb5565b6040516020016126cc9291906136fc565b6040516020818303038152906040529392505050565b805161233990600f906020840190612f77565b601180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160e01b0319821663da8def7360e01b148061278057506001600160e01b03198216635c975abb60e01b145b80610ac95750610ac982612bf9565b610d8784848484612c2e565b6127a582826117fc565b610fe8576127b281612c9b565b6127bd836020612cad565b6040516020016127ce92919061372b565b60408051601f198184030181529082905262461bcd60e51b8252610c5b9160040161309b565b60115460ff166111105760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c5b565b6128478383612e49565b6001600160a01b0383163b15610c6e576000548281035b61287160008683806001019450866128e9565b61288e576040516368d2bf6b60e11b815260040160405180910390fd5b81811061285e578160005414611c0e57600080fd5b60115460ff16156111105760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c5b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061291e9033908990889088906004016137a0565b6020604051808303816000875af1925050508015612959575060408051601f3d908101601f19168201909252612956918101906137dd565b60015b6129b7573d808015612987576040519150601f19603f3d011682016040523d82523d6000602084013e61298c565b606091505b5080516000036129af576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606129e082611e45565b6129fd57604051630a14c4b560e41b815260040160405180910390fd5b600c5460ff161515600003612a9e57600f8054612a19906135d3565b80601f0160208091040260200160405190810160405280929190818152602001828054612a45906135d3565b8015612a925780601f10612a6757610100808354040283529160200191612a92565b820191906000526020600020905b815481529060010190602001808311612a7557829003601f168201915b50505050509050919050565b6000612aa983611555565b90506000600b8281548110612ac057612ac0613681565b90600052602060002090600202016001018054612adc906135d3565b90501115612b9957600b8181548110612af757612af7613681565b90600052602060002090600202016001018054612b13906135d3565b80601f0160208091040260200160405190810160405280929190818152602001828054612b3f906135d3565b8015612b8c5780601f10612b6157610100808354040283529160200191612b8c565b820191906000526020600020905b815481529060010190602001808311612b6f57829003601f168201915b5050505050915050919050565b600e612ba482612bb5565b6040516020016126cc9291906137fa565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480612bcf5750819003601f19909101908152919050565b60006001600160e01b03198216637965db0b60e01b1480610ac957506301ffc9a760e01b6001600160e01b0319831614610ac9565b6001600160a01b03841615610d8757600b5415612c8f576000612c5083611555565b9050612c8d83600b8381548110612c6957612c69613681565b9060005260206000209060020201600001546000918252600a602052604090912055565b505b610d8784848484612f54565b6060610ac96001600160a01b03831660145b60606000612cbc836002613640565b612cc79060026138b0565b67ffffffffffffffff811115612cdf57612cdf61310d565b6040519080825280601f01601f191660200182016040528015612d09576020820181803683370190505b509050600360fc1b81600081518110612d2457612d24613681565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d5357612d53613681565b60200101906001600160f81b031916908160001a9053506000612d77846002613640565b612d829060016138b0565b90505b6001811115612dfa576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612db657612db6613681565b1a60f81b828281518110612dcc57612dcc613681565b60200101906001600160f81b031916908160001a90535060049490941c93612df3816138c8565b9050612d85565b5083156123fe5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c5b565b6000805490829003612e6e5760405163b562e8dd60e01b815260040160405180910390fd5b612e7b600084838561278f565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612f2a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612ef2565b5081600003612f4b57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6001600160a01b03841615610d8757506000908152600960205260408120555050565b828054612f83906135d3565b90600052602060002090601f016020900481019282612fa55760008555612feb565b82601f10612fbe57805160ff1916838001178555612feb565b82800160010185558215612feb579182015b82811115612feb578251825591602001919060010190612fd0565b50612ff7929150612ffb565b5090565b5b80821115612ff75760008155600101612ffc565b6001600160e01b031981168114610cb157600080fd5b60006020828403121561303857600080fd5b81356123fe81613010565b60005b8381101561305e578181015183820152602001613046565b83811115610d875750506000910152565b60008151808452613087816020860160208601613043565b601f01601f19169290920160200192915050565b6020815260006123fe602083018461306f565b6000602082840312156130c057600080fd5b5035919050565b80356001600160a01b03811681146130de57600080fd5b919050565b600080604083850312156130f657600080fd5b6130ff836130c7565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561314c5761314c61310d565b604052919050565b600067ffffffffffffffff83111561316e5761316e61310d565b613181601f8401601f1916602001613123565b905082815283838301111561319557600080fd5b828260208301376000602084830101529392505050565b600082601f8301126131bd57600080fd5b6123fe83833560208501613154565b6000602082840312156131de57600080fd5b813567ffffffffffffffff808211156131f657600080fd5b908301906040828603121561320a57600080fd5b6040516040810181811083821117156132255761322561310d565b6040528235815260208301358281111561323e57600080fd5b61324a878286016131ac565b60208301525095945050505050565b60008060006060848603121561326e57600080fd5b613277846130c7565b9250613285602085016130c7565b9150604084013590509250925092565b600080604083850312156132a857600080fd5b50508035926020909101359150565b6000806000606084860312156132cc57600080fd5b6132d5846130c7565b95602085013595506040909401359392505050565b600080604083850312156132fd57600080fd5b8235915061330d602084016130c7565b90509250929050565b60006020828403121561332857600080fd5b813567ffffffffffffffff81111561333f57600080fd5b6129cd848285016131ac565b600067ffffffffffffffff8211156133655761336561310d565b5060051b60200190565b600082601f83011261338057600080fd5b813560206133956133908361334b565b613123565b82815260059290921b840181019181810190868411156133b457600080fd5b8286015b848110156133cf57803583529183019183016133b8565b509695505050505050565b600080604083850312156133ed57600080fd5b823567ffffffffffffffff8082111561340557600080fd5b818501915085601f83011261341957600080fd5b813560206134296133908361334b565b82815260059290921b8401810191818101908984111561344857600080fd5b948201945b8386101561346d5761345e866130c7565b8252948201949082019061344d565b9650508601359250508082111561348357600080fd5b50610dd88582860161336f565b6000602082840312156134a257600080fd5b6123fe826130c7565b600080604083850312156134be57600080fd5b82359150602083013567ffffffffffffffff8111156134dc57600080fd5b610dd8858286016131ac565b8015158114610cb157600080fd5b6000806040838503121561350957600080fd5b613512836130c7565b91506020830135613522816134e8565b809150509250929050565b6000806000806080858703121561354357600080fd5b61354c856130c7565b935061355a602086016130c7565b925060408501359150606085013567ffffffffffffffff81111561357d57600080fd5b8501601f8101871361358e57600080fd5b61359d87823560208401613154565b91505092959194509250565b600080604083850312156135bc57600080fd5b6135c5836130c7565b915061330d602084016130c7565b600181811c908216806135e757607f821691505b60208210810361360757634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561361f57600080fd5b81516123fe816134e8565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561365a5761365a61362a565b500290565b60008261367c57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016136a9576136a961362a565b5060010190565b6000602082840312156136c257600080fd5b5051919050565b6000828210156136db576136db61362a565b500390565b600081516136f2818560208601613043565b9290920192915050565b6000835161370e818460208801613043565b835190830190613722818360208801613043565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613763816017850160208801613043565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613794816028840160208801613043565b01602801949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906137d39083018461306f565b9695505050505050565b6000602082840312156137ef57600080fd5b81516123fe81613010565b600080845481600182811c91508083168061381657607f831692505b6020808410820361383557634e487b7160e01b86526022600452602486fd5b818015613849576001811461385a57613887565b60ff19861689528489019650613887565b60008b81526020902060005b8681101561387f5781548b820152908501908301613866565b505084890196505b5050505050506138a761389a82866136e0565b602f60f81b815260010190565b95945050505050565b600082198211156138c3576138c361362a565b500190565b6000816138d7576138d761362a565b50600019019056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a26469706673582212203ab0db1651359d25fc8a11ffcdb07ceefad8a153375b23379fafc23afe6b576464736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000003e806df2a2f147bcf4d5e47b72d9ca8319cc3efd00000000000000000000000000000000000000000000000000000000000001f40000000000000000000000003e806df2a2f147bcf4d5e47b72d9ca8319cc3efd000000000000000000000000000000000000000000000000000000000000000d54686520576562332047616d650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054750415353000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): The Web3 Game
Arg [1] : _symbol (string): GPASS
Arg [2] : _recipient (address): 0x3e806df2A2F147bCF4D5e47B72D9CA8319CC3EfD
Arg [3] : _royalty (uint256): 500
Arg [4] : _owner (address): 0x3e806df2A2F147bCF4D5e47B72D9CA8319CC3EfD
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000003e806df2a2f147bcf4d5e47b72d9ca8319cc3efd
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [4] : 0000000000000000000000003e806df2a2f147bcf4d5e47b72d9ca8319cc3efd
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [6] : 54686520576562332047616d6500000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 4750415353000000000000000000000000000000000000000000000000000000
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.