Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
40
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
EnvironmentNFT
Compiler Version
v0.8.12+commit.f00d7308
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.12; import "../utils/ERC1155Tradable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; //import "hardhat/console.sol"; /* * TODO: * [] Use ERC1155 https://docs.openzeppelin.com/contracts/3.x/erc1155 * [] * */ contract EnvironmentNFT is ERC1155Tradable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; uint256 public newItemId; constructor(address admin, address operator) ERC1155Tradable( "Rove Environments", "REs", "", admin, operator ) public { // console.log("Deploy ObjectNFT"); } function createNFT(address recipient, uint256 initialSupply, string memory tokenURI, uint256 price, uint256 max) external returns (uint256) { _tokenIds.increment(); newItemId = _tokenIds.current(); create(recipient, newItemId, initialSupply, tokenURI, "0x", price, max); /*console.log( "mintNFT erc-1155 %s, owner %s, total %s", address(this), recipient, initialSupply ); console.log("tokenid: ", newItemId);*/ return newItemId; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; import "./IERC1155Tradable.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC1155Tradable * ERC1155Tradable - ERC1155 contract that whitelists an operator address, has create and mint functionality, and supports useful standards from OpenZeppelin, like _exists(), name(), symbol(), and totalSupply() */ contract ERC1155Tradable is ContextMixin, ERC1155PresetMinterPauser, NativeMetaTransaction, ReentrancyGuard, IERC1155Tradable { event OperatorChanged (address previous, address new_); event AdminChanged (address previous, address new_); event ProxyRegistryAddressChanged (address previous, address new_); event CreateEvent (address _initialOwner, uint256 _id, uint256 _initialSupply, string _uri, address _operator); event MintEvent (address _to, uint256 _id, uint256 _quantity); event PriceChanged (uint256 _id, uint256 previous, uint256 new_); using Strings for string; using SafeMath for uint256; // super admin address public admin;// multi sig address // operator address public operator; address public proxyRegistryAddress; mapping(uint256 => address) public creators; mapping(uint256 => uint256) public tokenSupply; mapping(uint256 => string) customUri; // Contract name string public name; // Contract symbol string public symbol; mapping(uint256 => uint256) public price_tokens; mapping(uint256 => uint256) public max_supply_tokens; /** * @dev Require _msgSender() to be the creator of the token id */ modifier creatorOnly(uint256 _id) { require(creators[_id] == _msgSender(), "ONLY_CREATOR"); _; } /** * @dev Require _msgSender() to own more than 0 of the token id */ modifier ownersOnly(uint256 _id) { require(balanceOf(_msgSender(), _id) > 0, "ONLY_OWNERS"); _; } modifier operatorOnly() { require(_msgSender() == operator, "ONLY_OPERATOR"); require(hasRole(OPERATOR_ROLE, _msgSender()), "ONLY_OPERATOR"); _; } modifier adminOnly() { require(_msgSender() == admin, "ONLY_ADMIN"); require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "ONLY_ADMIN"); _; } bytes32 public constant CREATOR_ROLE = keccak256("CREATOR_ROLE"); bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); constructor( string memory _name, string memory _symbol, string memory _uri, address _admin, address _operator ) ERC1155PresetMinterPauser(_uri) { name = _name; symbol = _symbol; proxyRegistryAddress = address(0); _initializeEIP712(name); admin = _admin; // set role for admin address grantRole(DEFAULT_ADMIN_ROLE, admin); operator = _operator; // set role for operator address grantRole(OPERATOR_ROLE, operator); grantRole(CREATOR_ROLE, operator); grantRole(MINTER_ROLE, operator); grantRole(PAUSER_ROLE, operator); if (admin != _msgSender()) { // revoke role for sender revokeRole(MINTER_ROLE, _msgSender()); revokeRole(PAUSER_ROLE, _msgSender()); revokeRole(DEFAULT_ADMIN_ROLE, _msgSender()); } } function changePriceToken(uint256 _id, uint256 _price) public operatorOnly { uint256 prev = price_tokens[_id]; price_tokens[_id] = _price; emit PriceChanged(_id, prev, _price); } function getPriceToken(uint256 _id) public view returns (uint256) { return price_tokens[_id]; } function getMaxSupplyToken(uint256 _id) public view returns (uint256) { return max_supply_tokens[_id]; } // changeOperator: update operator by admin function changeOperator(address _newOperator) public adminOnly { require(_msgSender() == admin, "NOT_ADMIN"); require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "NOT_ADMIN"); address _previousOperator = operator; operator = _newOperator; grantRole(OPERATOR_ROLE, operator); grantRole(CREATOR_ROLE, operator); grantRole(MINTER_ROLE, operator); grantRole(PAUSER_ROLE, operator); revokeRole(OPERATOR_ROLE, _previousOperator); revokeRole(CREATOR_ROLE, _previousOperator); revokeRole(MINTER_ROLE, _previousOperator); revokeRole(PAUSER_ROLE, _previousOperator); emit OperatorChanged(_previousOperator, operator); } // changeOperator: update admin by old admin function changeAdmin(address _newAdmin) public adminOnly { require(_msgSender() == admin, "NOT_ADMIN"); require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "NOT_ADMIN"); address _previousAdmin = admin; admin = _newAdmin; grantRole(DEFAULT_ADMIN_ROLE, admin); // grantRole(CREATOR_ROLE, admin); // grantRole(MINTER_ROLE, admin); // grantRole(PAUSER_ROLE, admin); // revokeRole(CREATOR_ROLE, admin); // revokeRole(MINTER_ROLE, admin); // revokeRole(PAUSER_ROLE, admin); revokeRole(DEFAULT_ADMIN_ROLE, _previousAdmin); emit AdminChanged(_previousAdmin, admin); } function uri( uint256 _id ) override public view returns (string memory) { require(_exists(_id), "NONEXISTENT_TOKEN"); // We have to convert string to bytes to check for existence bytes memory customUriBytes = bytes(customUri[_id]); if (customUriBytes.length > 0) { return customUri[_id]; } else { return super.uri(_id); } } /** * @dev Returns the total quantity for a token ID * @param _id uint256 ID of the token to query * @return amount of token in existence */ function totalSupply( uint256 _id ) public view returns (uint256) { return tokenSupply[_id]; } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * @param _newURI New URI for all tokens */ function setURI( string memory _newURI ) public operatorOnly { require(hasRole(CREATOR_ROLE, _msgSender()), "ONLY_CREATOR"); _setURI(_newURI); } /** * @dev Will update the base URI for the token * @param _tokenId The token to update. _msgSender() must be its creator. * @param _newURI New URI for the token. */ function setCustomURI( uint256 _tokenId, string memory _newURI ) public creatorOnly(_tokenId) { require(hasRole(CREATOR_ROLE, _msgSender()), "ONLY_CREATOR"); customUri[_tokenId] = _newURI; emit URI(_newURI, _tokenId); } /** * @dev Creates a new token type and assigns _initialSupply to an address * NOTE: The token id must be passed. This allows lazy creation of tokens or * creating NFTs by setting the id's high bits with the method * described in ERC1155 or to use ids representing values other than * successive small integers. If you wish to create ids as successive * small integers you can either subclass this class to count onchain * or maintain the offchain cache of identifiers recommended in * ERC1155 and calculate successive ids from that. * @param _initialOwner address of the first owner of the token * @param _id The id of the token to create (must not currenty exist). * @param _initialSupply amount to supply the first owner * @param _uri Optional URI for this token type * @param _data Data to pass if receiver is contract * @return The newly created token ID */ function create( address _initialOwner, uint256 _id, uint256 _initialSupply, string memory _uri, bytes memory _data, uint256 _price, uint256 _max ) virtual public operatorOnly returns (uint256) { require(hasRole(CREATOR_ROLE, _msgSender()), "NOT_CREATOR"); require(!_exists(_id), "ALREADY_EXIST"); if (_max > 0) { require(_initialSupply <= _max, "REACH_MAX"); } creators[_id] = _msgSender(); if (bytes(_uri).length > 0) { customUri[_id] = _uri; emit URI(_uri, _id); } _mint(_initialOwner, _id, _initialSupply, _data); tokenSupply[_id] = _initialSupply; price_tokens[_id] = _price; max_supply_tokens[_id] = _max; emit CreateEvent(_initialOwner, _id, _initialSupply, _uri, operator); return _id; } /** * @dev Mints some amount of tokens to an address * @param _to Address of the future owner of the token * @param _id Token ID to mint * @param _quantity Amount of tokens to mint * @param _data Data to pass if receiver is contract */ function mint( address _to, uint256 _id, uint256 _quantity, bytes memory _data ) virtual public override creatorOnly(_id) { require(_exists(_id), "NONEXIST_TOKEN"); require(hasRole(MINTER_ROLE, _msgSender()), "NOT_MINTER"); if (max_supply_tokens[_id] != 0) { require(tokenSupply[_id].add(_quantity) <= max_supply_tokens[_id], "REACH_MAX"); } _mint(_to, _id, _quantity, _data); tokenSupply[_id] = tokenSupply[_id].add(_quantity); emit MintEvent(_to, _id, _quantity); } /** * @dev Mints some amount of tokens to an address * @param _to Address of the future owner of the token * @param _id Token ID to mint * @param _quantity Amount of tokens to mint * @param _data Data to pass if receiver is contract */ function userMint(address _to, uint256 _id, uint256 _quantity, bytes memory _data ) virtual public payable { require(_exists(_id), "NONEXIST_TOKEN"); if (price_tokens[_id] > 0) { require(msg.value >= price_tokens[_id] * _quantity, "MISS_PRICE"); } else { require(_quantity <= 1, "MAX_QUANTITY"); } if (max_supply_tokens[_id] != 0) { require(tokenSupply[_id].add(_quantity) <= max_supply_tokens[_id], "REACH_MAX"); } _mint(_to, _id, _quantity, _data); tokenSupply[_id] = tokenSupply[_id].add(_quantity); emit MintEvent(_to, _id, _quantity); } /** * @dev Mint tokens for each id in _ids * @param _to The address to mint tokens to * @param _ids Array of ids to mint * @param _quantities Array of amounts of tokens to mint per id * @param _data Data to pass if receiver is contract */ function batchMint( address _to, uint256[] memory _ids, uint256[] memory _quantities, bytes memory _data ) public operatorOnly { require(hasRole(MINTER_ROLE, _msgSender()), "NOT_MINTER"); for (uint256 i = 0; i < _ids.length; i++) { uint256 _id = _ids[i]; require(creators[_id] == _msgSender(), "ONLY_CREATOR"); uint256 quantity = _quantities[i]; tokenSupply[_id] = tokenSupply[_id].add(quantity); } _mintBatch(_to, _ids, _quantities, _data); } /** * @dev Change the creator address for given tokens * @param _to Address of the new creator * @param _ids Array of Token IDs to change creator */ function setCreator( address _to, uint256[] memory _ids ) public operatorOnly { require(_to != address(0), "INVALID_ADDRESS."); _grantRole(CREATOR_ROLE, _to); _grantRole(MINTER_ROLE, _to); for (uint256 i = 0; i < _ids.length; i++) { uint256 id = _ids[i]; _setCreator(_to, id); } } function setProxyRegistryAddress(address _proxyRegistryAddress) public operatorOnly { require(_proxyRegistryAddress != proxyRegistryAddress, "PROXY_INVALID"); address previous = proxyRegistryAddress; proxyRegistryAddress = _proxyRegistryAddress; emit ProxyRegistryAddressChanged(previous, proxyRegistryAddress); } /** * Override isApprovedForAll to whitelist user's [OpenSea] proxy accounts to enable gas-free listings. */ function isApprovedForAll( address _owner, address _operator ) override(ERC1155, IERC1155) public view returns (bool isOperator) { if (proxyRegistryAddress != address(0)) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(_owner)) == _operator) { return true; } } return ERC1155.isApprovedForAll(_owner, _operator); } /** * @dev Change the creator address for given token * @param _to Address of the new creator * @param _id Token IDs to change creator of */ function _setCreator(address _to, uint256 _id) internal creatorOnly(_id) { creators[_id] = _to; } /** * @dev Returns whether the specified token exists by checking to see if it has a creator * @param _id uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists( uint256 _id ) internal view returns (bool) { return creators[_id] != address(0); } function exists( uint256 _id ) external view returns (bool) { return _exists(_id); } function getCreator(uint256 id) public view returns (address sender) { return creators[id]; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155PresetMinterPauser, IERC165) returns (bool) { return interfaceId == type(IERC1155Tradable).interfaceId || super.supportsInterface(interfaceId); } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal override view returns (address sender) { return ContextMixin.msgSender(); } /** @dev EIP2981 royalties implementation. */ struct RoyaltyInfo { address recipient; uint24 amount; bool isValue; } mapping(uint256 => RoyaltyInfo) public royalties; function setTokenRoyalty( uint256 _tokenId, address _recipient, uint256 _value ) public operatorOnly { require(hasRole(CREATOR_ROLE, _msgSender()), "NOT_CREATOR"); require(_value <= 10000, 'TOO_HIGH'); royalties[_tokenId] = RoyaltyInfo(_recipient, uint24(_value), true); } // EIP2981 standard royalties return. function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalty = royalties[_tokenId]; if (royalty.isValue) { receiver = royalty.recipient; royaltyAmount = (_salePrice * royalty.amount) / 10000; } else { receiver = creators[_tokenId]; royaltyAmount = (_salePrice * 500) / 10000; } } // Withdraw function withdraw(address _to) external nonReentrant adminOnly { require(address(this).balance > 0, "NOT_ENOUGH"); (bool success,) = _to.call{value : address(this).balance}(""); require(success, "FAIL"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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, _msgSender()); _; } /** * @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 `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(uint160(account), 20), " 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. */ 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. */ 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`. */ 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. * * [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. */ 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. */ 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 (last updated v4.5.0) (token/ERC1155/presets/ERC1155PresetMinterPauser.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; import "../extensions/ERC1155Burnable.sol"; import "../extensions/ERC1155Pausable.sol"; import "../../../access/AccessControlEnumerable.sol"; import "../../../utils/Context.sol"; /** * @dev {ERC1155} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * * This contract uses {AccessControl} to lock permissioned functions using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. * * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ */ contract ERC1155PresetMinterPauser is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); /** * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that * deploys the contract. */ constructor(string memory uri) ERC1155(uri) { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(MINTER_ROLE, _msgSender()); _setupRole(PAUSER_ROLE, _msgSender()); } /** * @dev Creates `amount` new tokens for `to`, of token type `id`. * * See {ERC1155-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint( address to, uint256 id, uint256 amount, bytes memory data ) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); _mint(to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. */ function mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); _mintBatch(to, ids, amounts, data); } /** * @dev Pauses all token transfers. * * See {ERC1155Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause"); _pause(); } /** * @dev Unpauses all token transfers. * * See {ERC1155Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause"); _unpause(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC1155) returns (bool) { return super.supportsInterface(interfaceId); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { bytes32 private constant M_TX_HASH = keccak256( bytes( "MetaTransaction(nonce,from,signature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress] + 1; emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "fail"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( M_TX_HASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "IN_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; interface IERC1155Tradable is IERC1155, IERC2981 { function getCreator(uint256 id) external view virtual returns (address sender); }
// 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 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 v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `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 memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - 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[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * 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 _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC1155 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * _Available since v3.1._ */ abstract contract ERC1155Pausable is ERC1155, Pausable { /** * @dev See {ERC1155-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); require(!paused(), "ERC1155Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 be 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.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string constant public ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712( string memory name ) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
{ "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":"address","name":"admin","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previous","type":"address"},{"indexed":false,"internalType":"address","name":"new_","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_initialOwner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_initialSupply","type":"uint256"},{"indexed":false,"internalType":"string","name":"_uri","type":"string"},{"indexed":false,"internalType":"address","name":"_operator","type":"address"}],"name":"CreateEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"MintEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previous","type":"address"},{"indexed":false,"internalType":"address","name":"new_","type":"address"}],"name":"OperatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"previous","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"new_","type":"uint256"}],"name":"PriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previous","type":"address"},{"indexed":false,"internalType":"address","name":"new_","type":"address"}],"name":"ProxyRegistryAddressChanged","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":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"CREATOR_ROLE","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":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOperator","type":"address"}],"name":"changeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"changePriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_initialSupply","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"create","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"createNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getCreator","outputs":[{"internalType":"address","name":"sender","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getMaxSupplyToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"max_supply_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newItemId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"price_tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","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"}],"name":"royalties","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint24","name":"amount","type":"uint24"},{"internalType":"bool","name":"isValue","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"setCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_newURI","type":"string"}],"name":"setCustomURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"name":"setProxyRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"userMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526005805461ff00191690553480156200001c57600080fd5b5060405162006185380380620061858339810160408190526200003f9162000bdd565b60405180604001604052806011815260200170526f766520456e7669726f6e6d656e747360781b8152506040518060400160405280600381526020016252457360e81b8152506040518060200160405280600081525084848280620000aa816200036860201b60201c565b506005805460ff19169055620000cb6000620000c562000381565b6200039d565b620000e960008051602062006165833981519152620000c562000381565b6200010760008051602062006145833981519152620000c562000381565b50600160085584516200012290600f90602088019062000b1a565b5083516200013890601090602087019062000b1a565b50600b80546001600160a01b0319169055600f8054620001e991906200015e9062000c15565b80601f01602080910402602001604051908101604052809291908181526020018280546200018c9062000c15565b8015620001dd5780601f10620001b157610100808354040283529160200191620001dd565b820191906000526020600020905b815481529060010190602001808311620001bf57829003601f168201915b5050620003a992505050565b600980546001600160a01b0319166001600160a01b038416908117909155620002159060009062000415565b600a80546001600160a01b0319166001600160a01b03831690811790915562000260907f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9299062000415565b600a5462000299907f828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f906001600160a01b031662000415565b600a54620002c19060008051602062006165833981519152906001600160a01b031662000415565b600a54620002e99060008051602062006145833981519152906001600160a01b031662000415565b620002f362000381565b6009546001600160a01b039081169116146200035b576200032d600080516020620061658339815191526200032762000381565b6200044d565b6200034b600080516020620061458339815191526200032762000381565b6200035b60006200032762000381565b5050505050505062000dfc565b80516200037d90600490602084019062000b1a565b5050565b6000620003986200047a60201b62002c0a1760201c565b905090565b6200037d8282620004d9565b600554610100900460ff1615620003f85760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b60448201526064015b60405180910390fd5b620004038162000517565b506005805461ff001916610100179055565b6000828152602081905260409020600101546200043c816200043662000381565b620005b9565b620004488383620004d9565b505050565b6000828152602081905260409020600101546200046e816200043662000381565b62000448838362000654565b600033301415620004d357600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620004d69050565b50335b90565b620004f082826200069260201b62002c671760201c565b60008281526001602090815260409091206200044891839062002cec62000734821b17901c565b6040518060800160405280604f8152602001620060f6604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600655565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200037d5762000603816001600160a01b031660146200075460201b62002d011760201c565b6200061983602062002d0162000754821b17811c565b6040516020016200062c92919062000c85565b60408051601f198184030181529082905262461bcd60e51b8252620003ef9160040162000cfe565b6200066b82826200090d60201b62002e9c1760201c565b60008281526001602090815260409091206200044891839062002f1f620009ad821b17901c565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200037d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620006f062000381565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200074b836001600160a01b038416620009c4565b90505b92915050565b606060006200076583600262000d49565b6200077290600262000d6b565b6001600160401b038111156200078c576200078c62000d86565b6040519080825280601f01601f191660200182016040528015620007b7576020820181803683370190505b509050600360fc1b81600081518110620007d557620007d562000d9c565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000807576200080762000d9c565b60200101906001600160f81b031916908160001a90535060006200082d84600262000d49565b6200083a90600162000d6b565b90505b6001811115620008bc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000872576200087262000d9c565b1a60f81b8282815181106200088b576200088b62000d9c565b60200101906001600160f81b031916908160001a90535060049490941c93620008b48162000db2565b90506200083d565b5083156200074b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620003ef565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156200037d576000828152602081815260408083206001600160a01b03851684529091529020805460ff191690556200096962000381565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006200074b836001600160a01b03841662000a16565b600081815260018301602052604081205462000a0d575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200074e565b5060006200074e565b6000818152600183016020526040812054801562000b0f57600062000a3d60018362000dcc565b855490915060009062000a539060019062000dcc565b905081811462000abf57600086600001828154811062000a775762000a7762000d9c565b906000526020600020015490508087600001848154811062000a9d5762000a9d62000d9c565b6000918252602080832090910192909255918252600188019052604090208390555b855486908062000ad35762000ad362000de6565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506200074e565b60009150506200074e565b82805462000b289062000c15565b90600052602060002090601f01602090048101928262000b4c576000855562000b97565b82601f1062000b6757805160ff191683800117855562000b97565b8280016001018555821562000b97579182015b8281111562000b9757825182559160200191906001019062000b7a565b5062000ba592915062000ba9565b5090565b5b8082111562000ba5576000815560010162000baa565b80516001600160a01b038116811462000bd857600080fd5b919050565b6000806040838503121562000bf157600080fd5b62000bfc8362000bc0565b915062000c0c6020840162000bc0565b90509250929050565b600181811c9082168062000c2a57607f821691505b6020821081141562000c4c57634e487b7160e01b600052602260045260246000fd5b50919050565b60005b8381101562000c6f57818101518382015260200162000c55565b8381111562000c7f576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000cbf81601785016020880162000c52565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162000cf281602884016020880162000c52565b01602801949350505050565b602081526000825180602084015262000d1f81604085016020870162000c52565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161562000d665762000d6662000d33565b500290565b6000821982111562000d815762000d8162000d33565b500190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008162000dc45762000dc462000d33565b506000190190565b60008282101562000de15762000de162000d33565b500390565b634e487b7160e01b600052603160045260246000fd5b6152ea8062000e0c6000396000f3fe6080604052600436106103aa5760003560e01c8063731133e9116101e7578063bd85b0391161010d578063d547741f116100a0578063f242432a1161006f578063f242432a14610c04578063f5298aca14610c24578063f5b541a614610c44578063f851a44014610c6657600080fd5b8063d547741f14610b82578063e031742114610ba2578063e63ab1e914610bc2578063e985e9c514610be457600080fd5b8063d26ea6c0116100dc578063d26ea6c014610aea578063d2a6b51a14610b0a578063d48e638a14610b2a578063d539139314610b6057600080fd5b8063bd85b03914610a47578063ca15c87314610a74578063cd53d08e14610a94578063cd7c032614610aca57600080fd5b806395d89b4111610185578063a22cb46511610154578063a22cb465146109c7578063b085451c146109e7578063b48ab8b614610a14578063b6ccd0e014610a3457600080fd5b806395d89b41146109505780639713c8071461096557806399213a2814610985578063a217fddf146109b257600080fd5b80638aeda25a116101c15780638aeda25a146108ce5780638f283970146108f05780639010d07c1461091057806391d148541461093057600080fd5b8063731133e91461081f5780637f77f5741461083f5780638456cb59146108b957600080fd5b80632693ebf2116102d75780633f4ba83a1161026a578063570ca73511610239578063570ca735146107825780635c975abb146107ba5780636b20c454146107d25780636cb07567146107f257600080fd5b80633f4ba83a146107005780634e1273f4146107155780634f558e791461074257806351cff8d91461076257600080fd5b80632f2ff15d116102a65780632f2ff15d1461068d5780633408e470146106ad57806336568abe146106c05780633adf80b4146106e057600080fd5b80632693ebf2146105cb5780632a55205a146105f85780632d0335ab146106375780632eb2c2d61461066d57600080fd5b80630c53c51c1161034f5780631df284e91161031e5780631df284e9146105465780631f7fdffa1461056657806320379ee514610586578063248a9ca31461059b57600080fd5b80630c53c51c146104ac5780630e89341c146104cc5780630f7e5970146104ec578063177ed0f31461051957600080fd5b806301ffc9a71161038b57806301ffc9a71461041857806302fe53051461044857806306394c9b1461046a57806306fdde031461048a57600080fd5b80620ed58f146103af5780621f17bb146103d8578062fdd58e146103f8575b600080fd5b3480156103bb57600080fd5b506103c560155481565b6040519081526020015b60405180910390f35b3480156103e457600080fd5b506103c56103f33660046142b7565b610c86565b34801561040457600080fd5b506103c5610413366004614321565b610cd8565b34801561042457600080fd5b50610438610433366004614363565b610d74565b60405190151581526020016103cf565b34801561045457600080fd5b50610468610463366004614380565b610d99565b005b34801561047657600080fd5b506104686104853660046143bc565b610e4b565b34801561049657600080fd5b5061049f611066565b6040516103cf9190614431565b3480156104b857600080fd5b5061049f6104c7366004614444565b6110f4565b3480156104d857600080fd5b5061049f6104e73660046144c1565b6112c7565b3480156104f857600080fd5b5061049f604051806040016040528060018152602001603160f81b81525081565b34801561052557600080fd5b506103c56105343660046144c1565b60009081526011602052604090205490565b34801561055257600080fd5b506103c56105613660046144da565b61147a565b34801561057257600080fd5b5061046861058136600461460a565b6116de565b34801561059257600080fd5b506006546103c5565b3480156105a757600080fd5b506103c56105b63660046144c1565b60009081526020819052604090206001015490565b3480156105d757600080fd5b506103c56105e63660046144c1565b600d6020526000908152604090205481565b34801561060457600080fd5b506106186106133660046146a4565b61177c565b604080516001600160a01b0390931683526020830191909152016103cf565b34801561064357600080fd5b506103c56106523660046143bc565b6001600160a01b031660009081526007602052604090205490565b34801561067957600080fd5b506104686106883660046146c6565b61183e565b34801561069957600080fd5b506104686106a8366004614773565b6118e7565b3480156106b957600080fd5b50466103c5565b3480156106cc57600080fd5b506104686106db366004614773565b611919565b3480156106ec57600080fd5b506104686106fb3660046147a3565b6119a7565b34801561070c57600080fd5b50610468611a7c565b34801561072157600080fd5b506107356107303660046147df565b611b12565b6040516103cf91906148dc565b34801561074e57600080fd5b5061043861075d3660046144c1565b611c3b565b34801561076e57600080fd5b5061046861077d3660046143bc565b611c5a565b34801561078e57600080fd5b50600a546107a2906001600160a01b031681565b6040516001600160a01b0390911681526020016103cf565b3480156107c657600080fd5b5060055460ff16610438565b3480156107de57600080fd5b506104686107ed3660046148ef565b611de7565b3480156107fe57600080fd5b506103c561080d3660046144c1565b60116020526000908152604090205481565b34801561082b57600080fd5b5061046861083a366004614964565b611e3c565b34801561084b57600080fd5b5061088e61085a3660046144c1565b6013602052600090815260409020546001600160a01b03811690600160a01b810462ffffff1690600160b81b900460ff1683565b604080516001600160a01b03909416845262ffffff90921660208401521515908201526060016103cf565b3480156108c557600080fd5b50610468612005565b3480156108da57600080fd5b506103c560008051602061523583398151915281565b3480156108fc57600080fd5b5061046861090b3660046143bc565b612099565b34801561091c57600080fd5b506107a261092b3660046146a4565b6121db565b34801561093c57600080fd5b5061043861094b366004614773565b6121f3565b34801561095c57600080fd5b5061049f61221c565b34801561097157600080fd5b506104686109803660046149ba565b612229565b34801561099157600080fd5b506103c56109a03660046144c1565b60126020526000908152604090205481565b3480156109be57600080fd5b506103c5600081565b3480156109d357600080fd5b506104686109e23660046149f2565b6123a3565b3480156109f357600080fd5b506103c5610a023660046144c1565b60009081526012602052604090205490565b348015610a2057600080fd5b50610468610a2f36600461460a565b6123b5565b610468610a42366004614964565b61255a565b348015610a5357600080fd5b506103c5610a623660046144c1565b6000908152600d602052604090205490565b348015610a8057600080fd5b506103c5610a8f3660046144c1565b61273c565b348015610aa057600080fd5b506107a2610aaf3660046144c1565b600c602052600090815260409020546001600160a01b031681565b348015610ad657600080fd5b50600b546107a2906001600160a01b031681565b348015610af657600080fd5b50610468610b053660046143bc565b612753565b348015610b1657600080fd5b50610468610b25366004614a25565b61286b565b348015610b3657600080fd5b506107a2610b453660046144c1565b6000908152600c60205260409020546001600160a01b031690565b348015610b6c57600080fd5b506103c560008051602061529583398151915281565b348015610b8e57600080fd5b50610468610b9d366004614773565b61299b565b348015610bae57600080fd5b50610468610bbd3660046146a4565b6129c3565b348015610bce57600080fd5b506103c560008051602061527583398151915281565b348015610bf057600080fd5b50610438610bff366004614a6a565b612a8e565b348015610c1057600080fd5b50610468610c1f366004614a98565b612b5e565b348015610c3057600080fd5b50610468610c3f366004614b00565b612bb5565b348015610c5057600080fd5b506103c560008051602061525583398151915281565b348015610c7257600080fd5b506009546107a2906001600160a01b031681565b6000610c96601480546001019055565b601454601581905550610cca86601554878760405180604001604052806002815260200161060f60f31b815250888861147a565b505060155495945050505050565b60006001600160a01b038316610d495760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636a4731c560e11b1480610d6e5750610d6e82612f34565b600a546001600160a01b0316610dad612f3f565b6001600160a01b031614610dd35760405162461bcd60e51b8152600401610d4090614b35565b610ded60008051602061525583398151915261094b612f3f565b610e095760405162461bcd60e51b8152600401610d4090614b35565b610e2360008051602061523583398151915261094b612f3f565b610e3f5760405162461bcd60e51b8152600401610d4090614b5c565b610e4881612f4e565b50565b6009546001600160a01b0316610e5f612f3f565b6001600160a01b031614610e855760405162461bcd60e51b8152600401610d4090614b82565b610e92600061094b612f3f565b610eae5760405162461bcd60e51b8152600401610d4090614b82565b6009546001600160a01b0316610ec2612f3f565b6001600160a01b031614610ee85760405162461bcd60e51b8152600401610d4090614ba6565b610ef5600061094b612f3f565b610f115760405162461bcd60e51b8152600401610d4090614ba6565b600a80546001600160a01b038381166001600160a01b0319831681179093551690610f4b90600080516020615255833981519152906118e7565b600a54610f7090600080516020615235833981519152906001600160a01b03166118e7565b600a54610f9590600080516020615295833981519152906001600160a01b03166118e7565b600a54610fba90600080516020615275833981519152906001600160a01b03166118e7565b610fd26000805160206152558339815191528261299b565b610fea6000805160206152358339815191528261299b565b6110026000805160206152958339815191528261299b565b61101a6000805160206152758339815191528261299b565b600a54604080516001600160a01b03808516825290921660208301527fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c91015b60405180910390a15050565b600f805461107390614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461109f90614bc9565b80156110ec5780601f106110c1576101008083540402835291602001916110ec565b820191906000526020600020905b8154815290600101906020018083116110cf57829003601f168201915b505050505081565b60408051606081810183526001600160a01b038816600081815260076020908152908590205484528301529181018690526111328782878787612f61565b6111885760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610d40565b6001600160a01b0387166000908152600760205260409020546111ac906001614c14565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b906111fc90899033908a90614c2c565b60405180910390a1600080306001600160a01b0316888a604051602001611224929190614c61565b60408051601f198184030181529082905261123e91614c98565b6000604051808303816000865af19150503d806000811461127b576040519150601f19603f3d011682016040523d82523d6000602084013e611280565b606091505b5091509150816112bb5760405162461bcd60e51b8152600401610d409060208082526004908201526319985a5b60e21b604082015260600190565b98975050505050505050565b6000818152600c60205260409020546060906001600160a01b03166113225760405162461bcd60e51b81526020600482015260116024820152702727a722ac24a9aa22a72a2faa27a5a2a760791b6044820152606401610d40565b6000828152600e60205260408120805461133b90614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461136790614bc9565b80156113b45780601f10611389576101008083540402835291602001916113b4565b820191906000526020600020905b81548152906001019060200180831161139757829003601f168201915b50505050509050600081511115611464576000838152600e6020526040902080546113de90614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461140a90614bc9565b80156114575780601f1061142c57610100808354040283529160200191611457565b820191906000526020600020905b81548152906001019060200180831161143a57829003601f168201915b5050505050915050919050565b61146d8361302f565b9392505050565b50919050565b600a546000906001600160a01b0316611491612f3f565b6001600160a01b0316146114b75760405162461bcd60e51b8152600401610d4090614b35565b6114d160008051602061525583398151915261094b612f3f565b6114ed5760405162461bcd60e51b8152600401610d4090614b35565b61150760008051602061523583398151915261094b612f3f565b6115415760405162461bcd60e51b815260206004820152600b60248201526a2727aa2fa1a922a0aa27a960a91b6044820152606401610d40565b6000878152600c60205260409020546001600160a01b0316156115965760405162461bcd60e51b815260206004820152600d60248201526c1053149150511657d1561254d5609a1b6044820152606401610d40565b81156115bc57818611156115bc5760405162461bcd60e51b8152600401610d4090614cb4565b6115c4612f3f565b6000888152600c6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055845115611650576000878152600e60209081526040909120865161161692880190614154565b50867f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b866040516116479190614431565b60405180910390a25b61165c888888876130c3565b6000878152600d6020908152604080832089905560118252808320869055601290915290819020839055600a5490517fdfd613b842aef92c704876cb5eb94df518752614cc459d562f47af89b9be9126916116ca918b918b918b918b916001600160a01b0390911690614cd7565b60405180910390a150949695505050505050565b6116f860008051602061529583398151915261094b612f3f565b61176a5760405162461bcd60e51b815260206004820152603860248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f68617665206d696e74657220726f6c6520746f206d696e7400000000000000006064820152608401610d40565b611776848484846131a6565b50505050565b6000828152601360209081526040808320815160608101835290546001600160a01b0381168252600160a01b810462ffffff1693820193909352600160b81b90920460ff16158015918301919091528291906118005780516020820151909350612710906117ef9062ffffff1686614d1a565b6117f99190614d39565b9150611836565b6000858152600c60205260409020546001600160a01b03169250612710611829856101f4614d1a565b6118339190614d39565b91505b509250929050565b611846612f3f565b6001600160a01b0316856001600160a01b0316148061186c575061186c85610bff612f3f565b6118d35760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610d40565b6118e0858585858561330c565b5050505050565b60008281526020819052604090206001015461190a81611905612f3f565b6134c4565b6119148383613528565b505050565b611921612f3f565b6001600160a01b0316816001600160a01b0316146119995760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d40565b6119a3828261354a565b5050565b816119b0612f3f565b6000828152600c60205260409020546001600160a01b039081169116146119e95760405162461bcd60e51b8152600401610d4090614b5c565b611a0360008051602061523583398151915261094b612f3f565b611a1f5760405162461bcd60e51b8152600401610d4090614b5c565b6000838152600e602090815260409091208351611a3e92850190614154565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b83604051611a6f9190614431565b60405180910390a2505050565b611a9660008051602061527583398151915261094b612f3f565b611b085760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610d40565b611b1061356c565b565b60608151835114611b775760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610d40565b600083516001600160401b03811115611b9257611b92614202565b604051908082528060200260200182016040528015611bbb578160200160208202803683370190505b50905060005b8451811015611c3357611c06858281518110611bdf57611bdf614d5b565b6020026020010151858381518110611bf957611bf9614d5b565b6020026020010151610cd8565b828281518110611c1857611c18614d5b565b6020908102919091010152611c2c81614d71565b9050611bc1565b509392505050565b6000818152600c60205260408120546001600160a01b03161515610d6e565b60026008541415611cad5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d40565b60026008556009546001600160a01b0316611cc6612f3f565b6001600160a01b031614611cec5760405162461bcd60e51b8152600401610d4090614b82565b611cf9600061094b612f3f565b611d155760405162461bcd60e51b8152600401610d4090614b82565b60004711611d525760405162461bcd60e51b815260206004820152600a60248201526909c9ea8be8a9c9eaa8e960b31b6044820152606401610d40565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114611d9f576040519150601f19603f3d011682016040523d82523d6000602084013e611da4565b606091505b5050905080611dde5760405162461bcd60e51b8152600401610d40906020808252600490820152631190525360e21b604082015260600190565b50506001600855565b611def612f3f565b6001600160a01b0316836001600160a01b03161480611e155750611e1583610bff612f3f565b611e315760405162461bcd60e51b8152600401610d4090614d8c565b611914838383613605565b82611e45612f3f565b6000828152600c60205260409020546001600160a01b03908116911614611e7e5760405162461bcd60e51b8152600401610d4090614b5c565b6000848152600c60205260409020546001600160a01b0316611ed35760405162461bcd60e51b815260206004820152600e60248201526d2727a722ac24a9aa2faa27a5a2a760911b6044820152606401610d40565b611eed60008051602061529583398151915261094b612f3f565b611f265760405162461bcd60e51b815260206004820152600a6024820152692727aa2fa6a4a72a22a960b11b6044820152606401610d40565b60008481526012602052604090205415611f7d57600084815260126020908152604080832054600d90925290912054611f5f908561379d565b1115611f7d5760405162461bcd60e51b8152600401610d4090614cb4565b611f89858585856130c3565b6000848152600d6020526040902054611fa2908461379d565b6000858152600d60209081526040918290209290925580516001600160a01b038816815291820186905281018490527f8069ef4945469d029cc32e222031bccdc99b2eaaf4ee374cd268012f7ddee9079060600160405180910390a15050505050565b61201f60008051602061527583398151915261094b612f3f565b6120915760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610d40565b611b106137a9565b6009546001600160a01b03166120ad612f3f565b6001600160a01b0316146120d35760405162461bcd60e51b8152600401610d4090614b82565b6120e0600061094b612f3f565b6120fc5760405162461bcd60e51b8152600401610d4090614b82565b6009546001600160a01b0316612110612f3f565b6001600160a01b0316146121365760405162461bcd60e51b8152600401610d4090614ba6565b612143600061094b612f3f565b61215f5760405162461bcd60e51b8152600401610d4090614ba6565b600980546001600160a01b038381166001600160a01b031983168117909355169061218c906000906118e7565b61219760008261299b565b600954604080516001600160a01b03808516825290921660208301527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910161105a565b600082815260016020526040812061146d9083613825565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6010805461107390614bc9565b600a546001600160a01b031661223d612f3f565b6001600160a01b0316146122635760405162461bcd60e51b8152600401610d4090614b35565b61227d60008051602061525583398151915261094b612f3f565b6122995760405162461bcd60e51b8152600401610d4090614b35565b6122b360008051602061523583398151915261094b612f3f565b6122ed5760405162461bcd60e51b815260206004820152600b60248201526a2727aa2fa1a922a0aa27a960a91b6044820152606401610d40565b61271081111561232a5760405162461bcd60e51b81526020600482015260086024820152670a89e9ebe90928e960c31b6044820152606401610d40565b604080516060810182526001600160a01b03938416815262ffffff928316602080830191825260018385019081526000978852601390915292909520905181549551925194166001600160b81b031990951694909417600160a01b91909216021760ff60b81b1916600160b81b91151591909102179055565b6119a36123ae612f3f565b8383613831565b600a546001600160a01b03166123c9612f3f565b6001600160a01b0316146123ef5760405162461bcd60e51b8152600401610d4090614b35565b61240960008051602061525583398151915261094b612f3f565b6124255760405162461bcd60e51b8152600401610d4090614b35565b61243f60008051602061529583398151915261094b612f3f565b6124785760405162461bcd60e51b815260206004820152600a6024820152692727aa2fa6a4a72a22a960b11b6044820152606401610d40565b60005b835181101561254d57600084828151811061249857612498614d5b565b602002602001015190506124aa612f3f565b6000828152600c60205260409020546001600160a01b039081169116146124e35760405162461bcd60e51b8152600401610d4090614b5c565b60008483815181106124f7576124f7614d5b565b6020026020010151905061252781600d60008581526020019081526020016000205461379d90919063ffffffff16565b6000928352600d602052604090922091909155508061254581614d71565b91505061247b565b50611776848484846131a6565b6000838152600c60205260409020546001600160a01b03166125af5760405162461bcd60e51b815260206004820152600e60248201526d2727a722ac24a9aa2faa27a5a2a760911b6044820152606401610d40565b6000838152601160205260409020541561261e576000838152601160205260409020546125dd908390614d1a565b3410156126195760405162461bcd60e51b815260206004820152600a6024820152694d4953535f505249434560b01b6044820152606401610d40565b61265e565b600182111561265e5760405162461bcd60e51b815260206004820152600c60248201526b4d41585f5155414e5449545960a01b6044820152606401610d40565b600083815260126020526040902054156126b557600083815260126020908152604080832054600d90925290912054612697908461379d565b11156126b55760405162461bcd60e51b8152600401610d4090614cb4565b6126c1848484846130c3565b6000838152600d60205260409020546126da908361379d565b6000848152600d60209081526040918290209290925580516001600160a01b038716815291820185905281018390527f8069ef4945469d029cc32e222031bccdc99b2eaaf4ee374cd268012f7ddee9079060600160405180910390a150505050565b6000818152600160205260408120610d6e90613912565b600a546001600160a01b0316612767612f3f565b6001600160a01b03161461278d5760405162461bcd60e51b8152600401610d4090614b35565b6127a760008051602061525583398151915261094b612f3f565b6127c35760405162461bcd60e51b8152600401610d4090614b35565b600b546001600160a01b03828116911614156128115760405162461bcd60e51b815260206004820152600d60248201526c141493d61657d2539590531251609a1b6044820152606401610d40565b600b80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527ffc15895015d07bcb2ae0459d79c7bfb40d36feedb31f55cc34e3ef404c86c577910161105a565b600a546001600160a01b031661287f612f3f565b6001600160a01b0316146128a55760405162461bcd60e51b8152600401610d4090614b35565b6128bf60008051602061525583398151915261094b612f3f565b6128db5760405162461bcd60e51b8152600401610d4090614b35565b6001600160a01b0382166129245760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa0a2222922a9a99760811b6044820152606401610d40565b61293c60008051602061523583398151915283613528565b61295460008051602061529583398151915283613528565b60005b815181101561191457600082828151811061297457612974614d5b565b60200260200101519050612988848261391c565b508061299381614d71565b915050612957565b6000828152602081905260409020600101546129b981611905612f3f565b611914838361354a565b600a546001600160a01b03166129d7612f3f565b6001600160a01b0316146129fd5760405162461bcd60e51b8152600401610d4090614b35565b612a1760008051602061525583398151915261094b612f3f565b612a335760405162461bcd60e51b8152600401610d4090614b35565b60008281526011602090815260409182902080549084905582518581529182018190529181018390527f2bce37c591c5b0d254c3056688b080a088f160fff82b6e79f456c8a20d5570f69060600160405180910390a1505050565b600b546000906001600160a01b031615612b3057600b5460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c455279190602401602060405180830381865afa158015612af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b159190614dd5565b6001600160a01b03161415612b2e576001915050610d6e565b505b6001600160a01b0380841660009081526003602090815260408083209386168352929052205460ff1661146d565b612b66612f3f565b6001600160a01b0316856001600160a01b03161480612b8c5750612b8c85610bff612f3f565b612ba85760405162461bcd60e51b8152600401610d4090614d8c565b6118e0858585858561398d565b612bbd612f3f565b6001600160a01b0316836001600160a01b03161480612be35750612be383610bff612f3f565b612bff5760405162461bcd60e51b8152600401610d4090614d8c565b611914838383613ab9565b600033301415612c6157600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150612c649050565b50335b90565b612c7182826121f3565b6119a3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612ca8612f3f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061146d836001600160a01b038416613bc9565b60606000612d10836002614d1a565b612d1b906002614c14565b6001600160401b03811115612d3257612d32614202565b6040519080825280601f01601f191660200182016040528015612d5c576020820181803683370190505b509050600360fc1b81600081518110612d7757612d77614d5b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612da657612da6614d5b565b60200101906001600160f81b031916908160001a9053506000612dca846002614d1a565b612dd5906001614c14565b90505b6001811115612e4d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612e0957612e09614d5b565b1a60f81b828281518110612e1f57612e1f614d5b565b60200101906001600160f81b031916908160001a90535060049490941c93612e4681614df2565b9050612dd8565b50831561146d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d40565b612ea682826121f3565b156119a3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055612edb612f3f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061146d836001600160a01b038416613c18565b6000610d6e82613d0b565b6000612f49612c0a565b905090565b80516119a3906004906020840190614154565b60006001600160a01b038616612fa55760405162461bcd60e51b815260206004820152600960248201526824a72fa9a4a3a722a960b91b6044820152606401610d40565b6001612fb8612fb387613d4b565b613dc8565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015613006573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60606004805461303e90614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461306a90614bc9565b80156130b75780601f1061308c576101008083540402835291602001916130b7565b820191906000526020600020905b81548152906001019060200180831161309a57829003601f168201915b50505050509050919050565b6001600160a01b0384166130e95760405162461bcd60e51b8152600401610d4090614e09565b60006130f3612f3f565b90506131148160008761310588613df8565b61310e88613df8565b87613e43565b60008481526002602090815260408083206001600160a01b038916845290915281208054859290613146908490614c14565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46118e081600087878787613e51565b6001600160a01b0384166131cc5760405162461bcd60e51b8152600401610d4090614e09565b81518351146131ed5760405162461bcd60e51b8152600401610d4090614e4a565b60006131f7612f3f565b905061320881600087878787613e43565b60005b84518110156132a45783818151811061322657613226614d5b565b60200260200101516002600087848151811061324457613244614d5b565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461328c9190614c14565b9091555081905061329c81614d71565b91505061320b565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516132f5929190614e92565b60405180910390a46118e081600087878787613fad565b815183511461332d5760405162461bcd60e51b8152600401610d4090614e4a565b6001600160a01b0384166133535760405162461bcd60e51b8152600401610d4090614eb7565b600061335d612f3f565b905061336d818787878787613e43565b60005b845181101561345657600085828151811061338d5761338d614d5b565b6020026020010151905060008583815181106133ab576133ab614d5b565b60209081029190910181015160008481526002835260408082206001600160a01b038e1683529093529190912054909150818110156133fc5760405162461bcd60e51b8152600401610d4090614efc565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061343b908490614c14565b925050819055505050508061344f90614d71565b9050613370565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516134a6929190614e92565b60405180910390a46134bc818787878787613fad565b505050505050565b6134ce82826121f3565b6119a3576134e6816001600160a01b03166014612d01565b6134f1836020612d01565b604051602001613502929190614f46565b60408051601f198184030181529082905262461bcd60e51b8252610d4091600401614431565b6135328282612c67565b60008281526001602052604090206119149082612cec565b6135548282612e9c565b60008281526001602052604090206119149082612f1f565b60055460ff166135b55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d40565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6135e8612f3f565b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b03831661362b5760405162461bcd60e51b8152600401610d4090614fbb565b805182511461364c5760405162461bcd60e51b8152600401610d4090614e4a565b6000613656612f3f565b905061367681856000868660405180602001604052806000815250613e43565b60005b835181101561373e57600084828151811061369657613696614d5b565b6020026020010151905060008483815181106136b4576136b4614d5b565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156137055760405162461bcd60e51b8152600401610d4090614ffe565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061373681614d71565b915050613679565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161378f929190614e92565b60405180910390a450505050565b600061146d8284614c14565b60055460ff16156137ef5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d40565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586135e8612f3f565b600061146d8383614068565b816001600160a01b0316836001600160a01b031614156138a55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610d40565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610d6e825490565b80613925612f3f565b6000828152600c60205260409020546001600160a01b0390811691161461395e5760405162461bcd60e51b8152600401610d4090614b5c565b506000908152600c6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0384166139b35760405162461bcd60e51b8152600401610d4090614eb7565b60006139bd612f3f565b90506139ce81878761310588613df8565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015613a115760405162461bcd60e51b8152600401610d4090614efc565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613a50908490614c14565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613ab0828888888888613e51565b50505050505050565b6001600160a01b038316613adf5760405162461bcd60e51b8152600401610d4090614fbb565b6000613ae9612f3f565b9050613b1981856000613afb87613df8565b613b0487613df8565b60405180602001604052806000815250613e43565b60008381526002602090815260408083206001600160a01b038816845290915290205482811015613b5c5760405162461bcd60e51b8152600401610d4090614ffe565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6000818152600183016020526040812054613c1057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d6e565b506000610d6e565b60008181526001830160205260408120548015613d01576000613c3c600183615042565b8554909150600090613c5090600190615042565b9050818114613cb5576000866000018281548110613c7057613c70614d5b565b9060005260206000200154905080876000018481548110613c9357613c93614d5b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613cc657613cc6615059565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d6e565b6000915050610d6e565b60006001600160e01b03198216636cdb3d1360e11b1480613d3c57506001600160e01b031982166303a24d0760e21b145b80610d6e5750610d6e82614092565b60006040518060600160405280602581526020016152106025913980516020918201208351848301516040808701518051908601209051613dab950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000613dd360065490565b60405161190160f01b6020820152602281019190915260428101839052606201613dab565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613e3257613e32614d5b565b602090810291909101015292915050565b6134bc8686868686866140b7565b6001600160a01b0384163b156134bc5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613e95908990899088908890889060040161506f565b6020604051808303816000875af1925050508015613ed0575060408051601f3d908101601f19168201909252613ecd918101906150b4565b60015b613f7d57613edc6150d1565b806308c379a01415613f165750613ef16150ec565b80613efc5750613f18565b8060405162461bcd60e51b8152600401610d409190614431565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610d40565b6001600160e01b0319811663f23a6e6160e01b14613ab05760405162461bcd60e51b8152600401610d4090615175565b6001600160a01b0384163b156134bc5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613ff190899089908890889088906004016151bd565b6020604051808303816000875af192505050801561402c575060408051601f3d908101601f19168201909252614029918101906150b4565b60015b61403857613edc6150d1565b6001600160e01b0319811663bc197c8160e01b14613ab05760405162461bcd60e51b8152600401610d4090615175565b600082600001828154811061407f5761407f614d5b565b9060005260206000200154905092915050565b60006001600160e01b03198216635a05180f60e01b1480610d6e5750610d6e8261411f565b60055460ff16156134bc5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610d40565b60006001600160e01b03198216637965db0b60e01b1480610d6e57506301ffc9a760e01b6001600160e01b0319831614610d6e565b82805461416090614bc9565b90600052602060002090601f01602090048101928261418257600085556141c8565b82601f1061419b57805160ff19168380011785556141c8565b828001600101855582156141c8579182015b828111156141c85782518255916020019190600101906141ad565b506141d49291506141d8565b5090565b5b808211156141d457600081556001016141d9565b6001600160a01b0381168114610e4857600080fd5b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561423d5761423d614202565b6040525050565b600082601f83011261425557600080fd5b81356001600160401b0381111561426e5761426e614202565b604051614285601f8301601f191660200182614218565b81815284602083860101111561429a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156142cf57600080fd5b85356142da816141ed565b94506020860135935060408601356001600160401b038111156142fc57600080fd5b61430888828901614244565b9598949750949560608101359550608001359392505050565b6000806040838503121561433457600080fd5b823561433f816141ed565b946020939093013593505050565b6001600160e01b031981168114610e4857600080fd5b60006020828403121561437557600080fd5b813561146d8161434d565b60006020828403121561439257600080fd5b81356001600160401b038111156143a857600080fd5b6143b484828501614244565b949350505050565b6000602082840312156143ce57600080fd5b813561146d816141ed565b60005b838110156143f45781810151838201526020016143dc565b838111156117765750506000910152565b6000815180845261441d8160208601602086016143d9565b601f01601f19169290920160200192915050565b60208152600061146d6020830184614405565b600080600080600060a0868803121561445c57600080fd5b8535614467816141ed565b945060208601356001600160401b0381111561448257600080fd5b61448e88828901614244565b9450506040860135925060608601359150608086013560ff811681146144b357600080fd5b809150509295509295909350565b6000602082840312156144d357600080fd5b5035919050565b600080600080600080600060e0888a0312156144f557600080fd5b8735614500816141ed565b9650602088013595506040880135945060608801356001600160401b038082111561452a57600080fd5b6145368b838c01614244565b955060808a013591508082111561454c57600080fd5b506145598a828b01614244565b93505060a0880135915060c0880135905092959891949750929550565b60006001600160401b0382111561458f5761458f614202565b5060051b60200190565b600082601f8301126145aa57600080fd5b813560206145b782614576565b6040516145c48282614218565b83815260059390931b85018201928281019150868411156145e457600080fd5b8286015b848110156145ff57803583529183019183016145e8565b509695505050505050565b6000806000806080858703121561462057600080fd5b843561462b816141ed565b935060208501356001600160401b038082111561464757600080fd5b61465388838901614599565b9450604087013591508082111561466957600080fd5b61467588838901614599565b9350606087013591508082111561468b57600080fd5b5061469887828801614244565b91505092959194509250565b600080604083850312156146b757600080fd5b50508035926020909101359150565b600080600080600060a086880312156146de57600080fd5b85356146e9816141ed565b945060208601356146f9816141ed565b935060408601356001600160401b038082111561471557600080fd5b61472189838a01614599565b9450606088013591508082111561473757600080fd5b61474389838a01614599565b9350608088013591508082111561475957600080fd5b5061476688828901614244565b9150509295509295909350565b6000806040838503121561478657600080fd5b823591506020830135614798816141ed565b809150509250929050565b600080604083850312156147b657600080fd5b8235915060208301356001600160401b038111156147d357600080fd5b61183385828601614244565b600080604083850312156147f257600080fd5b82356001600160401b038082111561480957600080fd5b818501915085601f83011261481d57600080fd5b8135602061482a82614576565b6040516148378282614218565b83815260059390931b850182019282810191508984111561485757600080fd5b948201945b8386101561487e57853561486f816141ed565b8252948201949082019061485c565b9650508601359250508082111561489457600080fd5b5061183385828601614599565b600081518084526020808501945080840160005b838110156148d1578151875295820195908201906001016148b5565b509495945050505050565b60208152600061146d60208301846148a1565b60008060006060848603121561490457600080fd5b833561490f816141ed565b925060208401356001600160401b038082111561492b57600080fd5b61493787838801614599565b9350604086013591508082111561494d57600080fd5b5061495a86828701614599565b9150509250925092565b6000806000806080858703121561497a57600080fd5b8435614985816141ed565b9350602085013592506040850135915060608501356001600160401b038111156149ae57600080fd5b61469887828801614244565b6000806000606084860312156149cf57600080fd5b8335925060208401356149e1816141ed565b929592945050506040919091013590565b60008060408385031215614a0557600080fd5b8235614a10816141ed565b91506020830135801515811461479857600080fd5b60008060408385031215614a3857600080fd5b8235614a43816141ed565b915060208301356001600160401b03811115614a5e57600080fd5b61183385828601614599565b60008060408385031215614a7d57600080fd5b8235614a88816141ed565b91506020830135614798816141ed565b600080600080600060a08688031215614ab057600080fd5b8535614abb816141ed565b94506020860135614acb816141ed565b9350604086013592506060860135915060808601356001600160401b03811115614af457600080fd5b61476688828901614244565b600080600060608486031215614b1557600080fd5b8335614b20816141ed565b95602085013595506040909401359392505050565b6020808252600d908201526c27a7262cafa7a822a920aa27a960991b604082015260600190565b6020808252600c908201526b27a7262cafa1a922a0aa27a960a11b604082015260600190565b6020808252600a908201526927a7262cafa0a226a4a760b11b604082015260600190565b6020808252600990820152682727aa2fa0a226a4a760b91b604082015260600190565b600181811c90821680614bdd57607f821691505b6020821081141561147457634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115614c2757614c27614bfe565b500190565b6001600160a01b03848116825283166020820152606060408201819052600090614c5890830184614405565b95945050505050565b60008351614c738184602088016143d9565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008251614caa8184602087016143d9565b9190910192915050565b6020808252600990820152680a48a828690be9a82b60bb1b604082015260600190565b600060018060a01b03808816835286602084015285604084015260a06060840152614d0560a0840186614405565b91508084166080840152509695505050505050565b6000816000190483118215151615614d3457614d34614bfe565b500290565b600082614d5657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614d8557614d85614bfe565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b600060208284031215614de757600080fd5b815161146d816141ed565b600081614e0157614e01614bfe565b506000190190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b604081526000614ea560408301856148a1565b8281036020840152614c5881856148a1565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f7e8160178501602088016143d9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614faf8160288401602088016143d9565b01602801949350505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60008282101561505457615054614bfe565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906150a990830184614405565b979650505050505050565b6000602082840312156150c657600080fd5b815161146d8161434d565b600060033d1115612c645760046000803e5060005160e01c90565b600060443d10156150fa5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561512957505050505090565b82850191508151818111156151415750505050505090565b843d870101602082850101111561515b5750505050505090565b61516a60208286010187614218565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906151e9908301866148a1565b82810360608401526151fb81866148a1565b905082810360808401526112bb818561440556fe4d6574615472616e73616374696f6e286e6f6e63652c66726f6d2c7369676e617475726529828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212206bd099056b0f7e218def26a15818eab16963e3eb5c88bb5b83782bd0c3947ee064736f6c634300080c0033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a600000000000000000000000025ba272695b064f33b843c32834f847255ff25dc000000000000000000000000f287d98a7b0823a49cfd20e250a251b97561c6ad
Deployed Bytecode
0x6080604052600436106103aa5760003560e01c8063731133e9116101e7578063bd85b0391161010d578063d547741f116100a0578063f242432a1161006f578063f242432a14610c04578063f5298aca14610c24578063f5b541a614610c44578063f851a44014610c6657600080fd5b8063d547741f14610b82578063e031742114610ba2578063e63ab1e914610bc2578063e985e9c514610be457600080fd5b8063d26ea6c0116100dc578063d26ea6c014610aea578063d2a6b51a14610b0a578063d48e638a14610b2a578063d539139314610b6057600080fd5b8063bd85b03914610a47578063ca15c87314610a74578063cd53d08e14610a94578063cd7c032614610aca57600080fd5b806395d89b4111610185578063a22cb46511610154578063a22cb465146109c7578063b085451c146109e7578063b48ab8b614610a14578063b6ccd0e014610a3457600080fd5b806395d89b41146109505780639713c8071461096557806399213a2814610985578063a217fddf146109b257600080fd5b80638aeda25a116101c15780638aeda25a146108ce5780638f283970146108f05780639010d07c1461091057806391d148541461093057600080fd5b8063731133e91461081f5780637f77f5741461083f5780638456cb59146108b957600080fd5b80632693ebf2116102d75780633f4ba83a1161026a578063570ca73511610239578063570ca735146107825780635c975abb146107ba5780636b20c454146107d25780636cb07567146107f257600080fd5b80633f4ba83a146107005780634e1273f4146107155780634f558e791461074257806351cff8d91461076257600080fd5b80632f2ff15d116102a65780632f2ff15d1461068d5780633408e470146106ad57806336568abe146106c05780633adf80b4146106e057600080fd5b80632693ebf2146105cb5780632a55205a146105f85780632d0335ab146106375780632eb2c2d61461066d57600080fd5b80630c53c51c1161034f5780631df284e91161031e5780631df284e9146105465780631f7fdffa1461056657806320379ee514610586578063248a9ca31461059b57600080fd5b80630c53c51c146104ac5780630e89341c146104cc5780630f7e5970146104ec578063177ed0f31461051957600080fd5b806301ffc9a71161038b57806301ffc9a71461041857806302fe53051461044857806306394c9b1461046a57806306fdde031461048a57600080fd5b80620ed58f146103af5780621f17bb146103d8578062fdd58e146103f8575b600080fd5b3480156103bb57600080fd5b506103c560155481565b6040519081526020015b60405180910390f35b3480156103e457600080fd5b506103c56103f33660046142b7565b610c86565b34801561040457600080fd5b506103c5610413366004614321565b610cd8565b34801561042457600080fd5b50610438610433366004614363565b610d74565b60405190151581526020016103cf565b34801561045457600080fd5b50610468610463366004614380565b610d99565b005b34801561047657600080fd5b506104686104853660046143bc565b610e4b565b34801561049657600080fd5b5061049f611066565b6040516103cf9190614431565b3480156104b857600080fd5b5061049f6104c7366004614444565b6110f4565b3480156104d857600080fd5b5061049f6104e73660046144c1565b6112c7565b3480156104f857600080fd5b5061049f604051806040016040528060018152602001603160f81b81525081565b34801561052557600080fd5b506103c56105343660046144c1565b60009081526011602052604090205490565b34801561055257600080fd5b506103c56105613660046144da565b61147a565b34801561057257600080fd5b5061046861058136600461460a565b6116de565b34801561059257600080fd5b506006546103c5565b3480156105a757600080fd5b506103c56105b63660046144c1565b60009081526020819052604090206001015490565b3480156105d757600080fd5b506103c56105e63660046144c1565b600d6020526000908152604090205481565b34801561060457600080fd5b506106186106133660046146a4565b61177c565b604080516001600160a01b0390931683526020830191909152016103cf565b34801561064357600080fd5b506103c56106523660046143bc565b6001600160a01b031660009081526007602052604090205490565b34801561067957600080fd5b506104686106883660046146c6565b61183e565b34801561069957600080fd5b506104686106a8366004614773565b6118e7565b3480156106b957600080fd5b50466103c5565b3480156106cc57600080fd5b506104686106db366004614773565b611919565b3480156106ec57600080fd5b506104686106fb3660046147a3565b6119a7565b34801561070c57600080fd5b50610468611a7c565b34801561072157600080fd5b506107356107303660046147df565b611b12565b6040516103cf91906148dc565b34801561074e57600080fd5b5061043861075d3660046144c1565b611c3b565b34801561076e57600080fd5b5061046861077d3660046143bc565b611c5a565b34801561078e57600080fd5b50600a546107a2906001600160a01b031681565b6040516001600160a01b0390911681526020016103cf565b3480156107c657600080fd5b5060055460ff16610438565b3480156107de57600080fd5b506104686107ed3660046148ef565b611de7565b3480156107fe57600080fd5b506103c561080d3660046144c1565b60116020526000908152604090205481565b34801561082b57600080fd5b5061046861083a366004614964565b611e3c565b34801561084b57600080fd5b5061088e61085a3660046144c1565b6013602052600090815260409020546001600160a01b03811690600160a01b810462ffffff1690600160b81b900460ff1683565b604080516001600160a01b03909416845262ffffff90921660208401521515908201526060016103cf565b3480156108c557600080fd5b50610468612005565b3480156108da57600080fd5b506103c560008051602061523583398151915281565b3480156108fc57600080fd5b5061046861090b3660046143bc565b612099565b34801561091c57600080fd5b506107a261092b3660046146a4565b6121db565b34801561093c57600080fd5b5061043861094b366004614773565b6121f3565b34801561095c57600080fd5b5061049f61221c565b34801561097157600080fd5b506104686109803660046149ba565b612229565b34801561099157600080fd5b506103c56109a03660046144c1565b60126020526000908152604090205481565b3480156109be57600080fd5b506103c5600081565b3480156109d357600080fd5b506104686109e23660046149f2565b6123a3565b3480156109f357600080fd5b506103c5610a023660046144c1565b60009081526012602052604090205490565b348015610a2057600080fd5b50610468610a2f36600461460a565b6123b5565b610468610a42366004614964565b61255a565b348015610a5357600080fd5b506103c5610a623660046144c1565b6000908152600d602052604090205490565b348015610a8057600080fd5b506103c5610a8f3660046144c1565b61273c565b348015610aa057600080fd5b506107a2610aaf3660046144c1565b600c602052600090815260409020546001600160a01b031681565b348015610ad657600080fd5b50600b546107a2906001600160a01b031681565b348015610af657600080fd5b50610468610b053660046143bc565b612753565b348015610b1657600080fd5b50610468610b25366004614a25565b61286b565b348015610b3657600080fd5b506107a2610b453660046144c1565b6000908152600c60205260409020546001600160a01b031690565b348015610b6c57600080fd5b506103c560008051602061529583398151915281565b348015610b8e57600080fd5b50610468610b9d366004614773565b61299b565b348015610bae57600080fd5b50610468610bbd3660046146a4565b6129c3565b348015610bce57600080fd5b506103c560008051602061527583398151915281565b348015610bf057600080fd5b50610438610bff366004614a6a565b612a8e565b348015610c1057600080fd5b50610468610c1f366004614a98565b612b5e565b348015610c3057600080fd5b50610468610c3f366004614b00565b612bb5565b348015610c5057600080fd5b506103c560008051602061525583398151915281565b348015610c7257600080fd5b506009546107a2906001600160a01b031681565b6000610c96601480546001019055565b601454601581905550610cca86601554878760405180604001604052806002815260200161060f60f31b815250888861147a565b505060155495945050505050565b60006001600160a01b038316610d495760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636a4731c560e11b1480610d6e5750610d6e82612f34565b600a546001600160a01b0316610dad612f3f565b6001600160a01b031614610dd35760405162461bcd60e51b8152600401610d4090614b35565b610ded60008051602061525583398151915261094b612f3f565b610e095760405162461bcd60e51b8152600401610d4090614b35565b610e2360008051602061523583398151915261094b612f3f565b610e3f5760405162461bcd60e51b8152600401610d4090614b5c565b610e4881612f4e565b50565b6009546001600160a01b0316610e5f612f3f565b6001600160a01b031614610e855760405162461bcd60e51b8152600401610d4090614b82565b610e92600061094b612f3f565b610eae5760405162461bcd60e51b8152600401610d4090614b82565b6009546001600160a01b0316610ec2612f3f565b6001600160a01b031614610ee85760405162461bcd60e51b8152600401610d4090614ba6565b610ef5600061094b612f3f565b610f115760405162461bcd60e51b8152600401610d4090614ba6565b600a80546001600160a01b038381166001600160a01b0319831681179093551690610f4b90600080516020615255833981519152906118e7565b600a54610f7090600080516020615235833981519152906001600160a01b03166118e7565b600a54610f9590600080516020615295833981519152906001600160a01b03166118e7565b600a54610fba90600080516020615275833981519152906001600160a01b03166118e7565b610fd26000805160206152558339815191528261299b565b610fea6000805160206152358339815191528261299b565b6110026000805160206152958339815191528261299b565b61101a6000805160206152758339815191528261299b565b600a54604080516001600160a01b03808516825290921660208301527fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c91015b60405180910390a15050565b600f805461107390614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461109f90614bc9565b80156110ec5780601f106110c1576101008083540402835291602001916110ec565b820191906000526020600020905b8154815290600101906020018083116110cf57829003601f168201915b505050505081565b60408051606081810183526001600160a01b038816600081815260076020908152908590205484528301529181018690526111328782878787612f61565b6111885760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610d40565b6001600160a01b0387166000908152600760205260409020546111ac906001614c14565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b906111fc90899033908a90614c2c565b60405180910390a1600080306001600160a01b0316888a604051602001611224929190614c61565b60408051601f198184030181529082905261123e91614c98565b6000604051808303816000865af19150503d806000811461127b576040519150601f19603f3d011682016040523d82523d6000602084013e611280565b606091505b5091509150816112bb5760405162461bcd60e51b8152600401610d409060208082526004908201526319985a5b60e21b604082015260600190565b98975050505050505050565b6000818152600c60205260409020546060906001600160a01b03166113225760405162461bcd60e51b81526020600482015260116024820152702727a722ac24a9aa22a72a2faa27a5a2a760791b6044820152606401610d40565b6000828152600e60205260408120805461133b90614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461136790614bc9565b80156113b45780601f10611389576101008083540402835291602001916113b4565b820191906000526020600020905b81548152906001019060200180831161139757829003601f168201915b50505050509050600081511115611464576000838152600e6020526040902080546113de90614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461140a90614bc9565b80156114575780601f1061142c57610100808354040283529160200191611457565b820191906000526020600020905b81548152906001019060200180831161143a57829003601f168201915b5050505050915050919050565b61146d8361302f565b9392505050565b50919050565b600a546000906001600160a01b0316611491612f3f565b6001600160a01b0316146114b75760405162461bcd60e51b8152600401610d4090614b35565b6114d160008051602061525583398151915261094b612f3f565b6114ed5760405162461bcd60e51b8152600401610d4090614b35565b61150760008051602061523583398151915261094b612f3f565b6115415760405162461bcd60e51b815260206004820152600b60248201526a2727aa2fa1a922a0aa27a960a91b6044820152606401610d40565b6000878152600c60205260409020546001600160a01b0316156115965760405162461bcd60e51b815260206004820152600d60248201526c1053149150511657d1561254d5609a1b6044820152606401610d40565b81156115bc57818611156115bc5760405162461bcd60e51b8152600401610d4090614cb4565b6115c4612f3f565b6000888152600c6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055845115611650576000878152600e60209081526040909120865161161692880190614154565b50867f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b866040516116479190614431565b60405180910390a25b61165c888888876130c3565b6000878152600d6020908152604080832089905560118252808320869055601290915290819020839055600a5490517fdfd613b842aef92c704876cb5eb94df518752614cc459d562f47af89b9be9126916116ca918b918b918b918b916001600160a01b0390911690614cd7565b60405180910390a150949695505050505050565b6116f860008051602061529583398151915261094b612f3f565b61176a5760405162461bcd60e51b815260206004820152603860248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f68617665206d696e74657220726f6c6520746f206d696e7400000000000000006064820152608401610d40565b611776848484846131a6565b50505050565b6000828152601360209081526040808320815160608101835290546001600160a01b0381168252600160a01b810462ffffff1693820193909352600160b81b90920460ff16158015918301919091528291906118005780516020820151909350612710906117ef9062ffffff1686614d1a565b6117f99190614d39565b9150611836565b6000858152600c60205260409020546001600160a01b03169250612710611829856101f4614d1a565b6118339190614d39565b91505b509250929050565b611846612f3f565b6001600160a01b0316856001600160a01b0316148061186c575061186c85610bff612f3f565b6118d35760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610d40565b6118e0858585858561330c565b5050505050565b60008281526020819052604090206001015461190a81611905612f3f565b6134c4565b6119148383613528565b505050565b611921612f3f565b6001600160a01b0316816001600160a01b0316146119995760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610d40565b6119a3828261354a565b5050565b816119b0612f3f565b6000828152600c60205260409020546001600160a01b039081169116146119e95760405162461bcd60e51b8152600401610d4090614b5c565b611a0360008051602061523583398151915261094b612f3f565b611a1f5760405162461bcd60e51b8152600401610d4090614b5c565b6000838152600e602090815260409091208351611a3e92850190614154565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b83604051611a6f9190614431565b60405180910390a2505050565b611a9660008051602061527583398151915261094b612f3f565b611b085760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610d40565b611b1061356c565b565b60608151835114611b775760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610d40565b600083516001600160401b03811115611b9257611b92614202565b604051908082528060200260200182016040528015611bbb578160200160208202803683370190505b50905060005b8451811015611c3357611c06858281518110611bdf57611bdf614d5b565b6020026020010151858381518110611bf957611bf9614d5b565b6020026020010151610cd8565b828281518110611c1857611c18614d5b565b6020908102919091010152611c2c81614d71565b9050611bc1565b509392505050565b6000818152600c60205260408120546001600160a01b03161515610d6e565b60026008541415611cad5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d40565b60026008556009546001600160a01b0316611cc6612f3f565b6001600160a01b031614611cec5760405162461bcd60e51b8152600401610d4090614b82565b611cf9600061094b612f3f565b611d155760405162461bcd60e51b8152600401610d4090614b82565b60004711611d525760405162461bcd60e51b815260206004820152600a60248201526909c9ea8be8a9c9eaa8e960b31b6044820152606401610d40565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114611d9f576040519150601f19603f3d011682016040523d82523d6000602084013e611da4565b606091505b5050905080611dde5760405162461bcd60e51b8152600401610d40906020808252600490820152631190525360e21b604082015260600190565b50506001600855565b611def612f3f565b6001600160a01b0316836001600160a01b03161480611e155750611e1583610bff612f3f565b611e315760405162461bcd60e51b8152600401610d4090614d8c565b611914838383613605565b82611e45612f3f565b6000828152600c60205260409020546001600160a01b03908116911614611e7e5760405162461bcd60e51b8152600401610d4090614b5c565b6000848152600c60205260409020546001600160a01b0316611ed35760405162461bcd60e51b815260206004820152600e60248201526d2727a722ac24a9aa2faa27a5a2a760911b6044820152606401610d40565b611eed60008051602061529583398151915261094b612f3f565b611f265760405162461bcd60e51b815260206004820152600a6024820152692727aa2fa6a4a72a22a960b11b6044820152606401610d40565b60008481526012602052604090205415611f7d57600084815260126020908152604080832054600d90925290912054611f5f908561379d565b1115611f7d5760405162461bcd60e51b8152600401610d4090614cb4565b611f89858585856130c3565b6000848152600d6020526040902054611fa2908461379d565b6000858152600d60209081526040918290209290925580516001600160a01b038816815291820186905281018490527f8069ef4945469d029cc32e222031bccdc99b2eaaf4ee374cd268012f7ddee9079060600160405180910390a15050505050565b61201f60008051602061527583398151915261094b612f3f565b6120915760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610d40565b611b106137a9565b6009546001600160a01b03166120ad612f3f565b6001600160a01b0316146120d35760405162461bcd60e51b8152600401610d4090614b82565b6120e0600061094b612f3f565b6120fc5760405162461bcd60e51b8152600401610d4090614b82565b6009546001600160a01b0316612110612f3f565b6001600160a01b0316146121365760405162461bcd60e51b8152600401610d4090614ba6565b612143600061094b612f3f565b61215f5760405162461bcd60e51b8152600401610d4090614ba6565b600980546001600160a01b038381166001600160a01b031983168117909355169061218c906000906118e7565b61219760008261299b565b600954604080516001600160a01b03808516825290921660208301527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910161105a565b600082815260016020526040812061146d9083613825565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6010805461107390614bc9565b600a546001600160a01b031661223d612f3f565b6001600160a01b0316146122635760405162461bcd60e51b8152600401610d4090614b35565b61227d60008051602061525583398151915261094b612f3f565b6122995760405162461bcd60e51b8152600401610d4090614b35565b6122b360008051602061523583398151915261094b612f3f565b6122ed5760405162461bcd60e51b815260206004820152600b60248201526a2727aa2fa1a922a0aa27a960a91b6044820152606401610d40565b61271081111561232a5760405162461bcd60e51b81526020600482015260086024820152670a89e9ebe90928e960c31b6044820152606401610d40565b604080516060810182526001600160a01b03938416815262ffffff928316602080830191825260018385019081526000978852601390915292909520905181549551925194166001600160b81b031990951694909417600160a01b91909216021760ff60b81b1916600160b81b91151591909102179055565b6119a36123ae612f3f565b8383613831565b600a546001600160a01b03166123c9612f3f565b6001600160a01b0316146123ef5760405162461bcd60e51b8152600401610d4090614b35565b61240960008051602061525583398151915261094b612f3f565b6124255760405162461bcd60e51b8152600401610d4090614b35565b61243f60008051602061529583398151915261094b612f3f565b6124785760405162461bcd60e51b815260206004820152600a6024820152692727aa2fa6a4a72a22a960b11b6044820152606401610d40565b60005b835181101561254d57600084828151811061249857612498614d5b565b602002602001015190506124aa612f3f565b6000828152600c60205260409020546001600160a01b039081169116146124e35760405162461bcd60e51b8152600401610d4090614b5c565b60008483815181106124f7576124f7614d5b565b6020026020010151905061252781600d60008581526020019081526020016000205461379d90919063ffffffff16565b6000928352600d602052604090922091909155508061254581614d71565b91505061247b565b50611776848484846131a6565b6000838152600c60205260409020546001600160a01b03166125af5760405162461bcd60e51b815260206004820152600e60248201526d2727a722ac24a9aa2faa27a5a2a760911b6044820152606401610d40565b6000838152601160205260409020541561261e576000838152601160205260409020546125dd908390614d1a565b3410156126195760405162461bcd60e51b815260206004820152600a6024820152694d4953535f505249434560b01b6044820152606401610d40565b61265e565b600182111561265e5760405162461bcd60e51b815260206004820152600c60248201526b4d41585f5155414e5449545960a01b6044820152606401610d40565b600083815260126020526040902054156126b557600083815260126020908152604080832054600d90925290912054612697908461379d565b11156126b55760405162461bcd60e51b8152600401610d4090614cb4565b6126c1848484846130c3565b6000838152600d60205260409020546126da908361379d565b6000848152600d60209081526040918290209290925580516001600160a01b038716815291820185905281018390527f8069ef4945469d029cc32e222031bccdc99b2eaaf4ee374cd268012f7ddee9079060600160405180910390a150505050565b6000818152600160205260408120610d6e90613912565b600a546001600160a01b0316612767612f3f565b6001600160a01b03161461278d5760405162461bcd60e51b8152600401610d4090614b35565b6127a760008051602061525583398151915261094b612f3f565b6127c35760405162461bcd60e51b8152600401610d4090614b35565b600b546001600160a01b03828116911614156128115760405162461bcd60e51b815260206004820152600d60248201526c141493d61657d2539590531251609a1b6044820152606401610d40565b600b80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527ffc15895015d07bcb2ae0459d79c7bfb40d36feedb31f55cc34e3ef404c86c577910161105a565b600a546001600160a01b031661287f612f3f565b6001600160a01b0316146128a55760405162461bcd60e51b8152600401610d4090614b35565b6128bf60008051602061525583398151915261094b612f3f565b6128db5760405162461bcd60e51b8152600401610d4090614b35565b6001600160a01b0382166129245760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa0a2222922a9a99760811b6044820152606401610d40565b61293c60008051602061523583398151915283613528565b61295460008051602061529583398151915283613528565b60005b815181101561191457600082828151811061297457612974614d5b565b60200260200101519050612988848261391c565b508061299381614d71565b915050612957565b6000828152602081905260409020600101546129b981611905612f3f565b611914838361354a565b600a546001600160a01b03166129d7612f3f565b6001600160a01b0316146129fd5760405162461bcd60e51b8152600401610d4090614b35565b612a1760008051602061525583398151915261094b612f3f565b612a335760405162461bcd60e51b8152600401610d4090614b35565b60008281526011602090815260409182902080549084905582518581529182018190529181018390527f2bce37c591c5b0d254c3056688b080a088f160fff82b6e79f456c8a20d5570f69060600160405180910390a1505050565b600b546000906001600160a01b031615612b3057600b5460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c455279190602401602060405180830381865afa158015612af1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b159190614dd5565b6001600160a01b03161415612b2e576001915050610d6e565b505b6001600160a01b0380841660009081526003602090815260408083209386168352929052205460ff1661146d565b612b66612f3f565b6001600160a01b0316856001600160a01b03161480612b8c5750612b8c85610bff612f3f565b612ba85760405162461bcd60e51b8152600401610d4090614d8c565b6118e0858585858561398d565b612bbd612f3f565b6001600160a01b0316836001600160a01b03161480612be35750612be383610bff612f3f565b612bff5760405162461bcd60e51b8152600401610d4090614d8c565b611914838383613ab9565b600033301415612c6157600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150612c649050565b50335b90565b612c7182826121f3565b6119a3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612ca8612f3f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061146d836001600160a01b038416613bc9565b60606000612d10836002614d1a565b612d1b906002614c14565b6001600160401b03811115612d3257612d32614202565b6040519080825280601f01601f191660200182016040528015612d5c576020820181803683370190505b509050600360fc1b81600081518110612d7757612d77614d5b565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612da657612da6614d5b565b60200101906001600160f81b031916908160001a9053506000612dca846002614d1a565b612dd5906001614c14565b90505b6001811115612e4d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612e0957612e09614d5b565b1a60f81b828281518110612e1f57612e1f614d5b565b60200101906001600160f81b031916908160001a90535060049490941c93612e4681614df2565b9050612dd8565b50831561146d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d40565b612ea682826121f3565b156119a3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055612edb612f3f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061146d836001600160a01b038416613c18565b6000610d6e82613d0b565b6000612f49612c0a565b905090565b80516119a3906004906020840190614154565b60006001600160a01b038616612fa55760405162461bcd60e51b815260206004820152600960248201526824a72fa9a4a3a722a960b91b6044820152606401610d40565b6001612fb8612fb387613d4b565b613dc8565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015613006573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60606004805461303e90614bc9565b80601f016020809104026020016040519081016040528092919081815260200182805461306a90614bc9565b80156130b75780601f1061308c576101008083540402835291602001916130b7565b820191906000526020600020905b81548152906001019060200180831161309a57829003601f168201915b50505050509050919050565b6001600160a01b0384166130e95760405162461bcd60e51b8152600401610d4090614e09565b60006130f3612f3f565b90506131148160008761310588613df8565b61310e88613df8565b87613e43565b60008481526002602090815260408083206001600160a01b038916845290915281208054859290613146908490614c14565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46118e081600087878787613e51565b6001600160a01b0384166131cc5760405162461bcd60e51b8152600401610d4090614e09565b81518351146131ed5760405162461bcd60e51b8152600401610d4090614e4a565b60006131f7612f3f565b905061320881600087878787613e43565b60005b84518110156132a45783818151811061322657613226614d5b565b60200260200101516002600087848151811061324457613244614d5b565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461328c9190614c14565b9091555081905061329c81614d71565b91505061320b565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516132f5929190614e92565b60405180910390a46118e081600087878787613fad565b815183511461332d5760405162461bcd60e51b8152600401610d4090614e4a565b6001600160a01b0384166133535760405162461bcd60e51b8152600401610d4090614eb7565b600061335d612f3f565b905061336d818787878787613e43565b60005b845181101561345657600085828151811061338d5761338d614d5b565b6020026020010151905060008583815181106133ab576133ab614d5b565b60209081029190910181015160008481526002835260408082206001600160a01b038e1683529093529190912054909150818110156133fc5760405162461bcd60e51b8152600401610d4090614efc565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061343b908490614c14565b925050819055505050508061344f90614d71565b9050613370565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516134a6929190614e92565b60405180910390a46134bc818787878787613fad565b505050505050565b6134ce82826121f3565b6119a3576134e6816001600160a01b03166014612d01565b6134f1836020612d01565b604051602001613502929190614f46565b60408051601f198184030181529082905262461bcd60e51b8252610d4091600401614431565b6135328282612c67565b60008281526001602052604090206119149082612cec565b6135548282612e9c565b60008281526001602052604090206119149082612f1f565b60055460ff166135b55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610d40565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6135e8612f3f565b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b03831661362b5760405162461bcd60e51b8152600401610d4090614fbb565b805182511461364c5760405162461bcd60e51b8152600401610d4090614e4a565b6000613656612f3f565b905061367681856000868660405180602001604052806000815250613e43565b60005b835181101561373e57600084828151811061369657613696614d5b565b6020026020010151905060008483815181106136b4576136b4614d5b565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156137055760405162461bcd60e51b8152600401610d4090614ffe565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061373681614d71565b915050613679565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161378f929190614e92565b60405180910390a450505050565b600061146d8284614c14565b60055460ff16156137ef5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d40565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586135e8612f3f565b600061146d8383614068565b816001600160a01b0316836001600160a01b031614156138a55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610d40565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000610d6e825490565b80613925612f3f565b6000828152600c60205260409020546001600160a01b0390811691161461395e5760405162461bcd60e51b8152600401610d4090614b5c565b506000908152600c6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0384166139b35760405162461bcd60e51b8152600401610d4090614eb7565b60006139bd612f3f565b90506139ce81878761310588613df8565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015613a115760405162461bcd60e51b8152600401610d4090614efc565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613a50908490614c14565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613ab0828888888888613e51565b50505050505050565b6001600160a01b038316613adf5760405162461bcd60e51b8152600401610d4090614fbb565b6000613ae9612f3f565b9050613b1981856000613afb87613df8565b613b0487613df8565b60405180602001604052806000815250613e43565b60008381526002602090815260408083206001600160a01b038816845290915290205482811015613b5c5760405162461bcd60e51b8152600401610d4090614ffe565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6000818152600183016020526040812054613c1057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d6e565b506000610d6e565b60008181526001830160205260408120548015613d01576000613c3c600183615042565b8554909150600090613c5090600190615042565b9050818114613cb5576000866000018281548110613c7057613c70614d5b565b9060005260206000200154905080876000018481548110613c9357613c93614d5b565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613cc657613cc6615059565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d6e565b6000915050610d6e565b60006001600160e01b03198216636cdb3d1360e11b1480613d3c57506001600160e01b031982166303a24d0760e21b145b80610d6e5750610d6e82614092565b60006040518060600160405280602581526020016152106025913980516020918201208351848301516040808701518051908601209051613dab950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000613dd360065490565b60405161190160f01b6020820152602281019190915260428101839052606201613dab565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613e3257613e32614d5b565b602090810291909101015292915050565b6134bc8686868686866140b7565b6001600160a01b0384163b156134bc5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613e95908990899088908890889060040161506f565b6020604051808303816000875af1925050508015613ed0575060408051601f3d908101601f19168201909252613ecd918101906150b4565b60015b613f7d57613edc6150d1565b806308c379a01415613f165750613ef16150ec565b80613efc5750613f18565b8060405162461bcd60e51b8152600401610d409190614431565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610d40565b6001600160e01b0319811663f23a6e6160e01b14613ab05760405162461bcd60e51b8152600401610d4090615175565b6001600160a01b0384163b156134bc5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613ff190899089908890889088906004016151bd565b6020604051808303816000875af192505050801561402c575060408051601f3d908101601f19168201909252614029918101906150b4565b60015b61403857613edc6150d1565b6001600160e01b0319811663bc197c8160e01b14613ab05760405162461bcd60e51b8152600401610d4090615175565b600082600001828154811061407f5761407f614d5b565b9060005260206000200154905092915050565b60006001600160e01b03198216635a05180f60e01b1480610d6e5750610d6e8261411f565b60055460ff16156134bc5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b6064820152608401610d40565b60006001600160e01b03198216637965db0b60e01b1480610d6e57506301ffc9a760e01b6001600160e01b0319831614610d6e565b82805461416090614bc9565b90600052602060002090601f01602090048101928261418257600085556141c8565b82601f1061419b57805160ff19168380011785556141c8565b828001600101855582156141c8579182015b828111156141c85782518255916020019190600101906141ad565b506141d49291506141d8565b5090565b5b808211156141d457600081556001016141d9565b6001600160a01b0381168114610e4857600080fd5b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561423d5761423d614202565b6040525050565b600082601f83011261425557600080fd5b81356001600160401b0381111561426e5761426e614202565b604051614285601f8301601f191660200182614218565b81815284602083860101111561429a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156142cf57600080fd5b85356142da816141ed565b94506020860135935060408601356001600160401b038111156142fc57600080fd5b61430888828901614244565b9598949750949560608101359550608001359392505050565b6000806040838503121561433457600080fd5b823561433f816141ed565b946020939093013593505050565b6001600160e01b031981168114610e4857600080fd5b60006020828403121561437557600080fd5b813561146d8161434d565b60006020828403121561439257600080fd5b81356001600160401b038111156143a857600080fd5b6143b484828501614244565b949350505050565b6000602082840312156143ce57600080fd5b813561146d816141ed565b60005b838110156143f45781810151838201526020016143dc565b838111156117765750506000910152565b6000815180845261441d8160208601602086016143d9565b601f01601f19169290920160200192915050565b60208152600061146d6020830184614405565b600080600080600060a0868803121561445c57600080fd5b8535614467816141ed565b945060208601356001600160401b0381111561448257600080fd5b61448e88828901614244565b9450506040860135925060608601359150608086013560ff811681146144b357600080fd5b809150509295509295909350565b6000602082840312156144d357600080fd5b5035919050565b600080600080600080600060e0888a0312156144f557600080fd5b8735614500816141ed565b9650602088013595506040880135945060608801356001600160401b038082111561452a57600080fd5b6145368b838c01614244565b955060808a013591508082111561454c57600080fd5b506145598a828b01614244565b93505060a0880135915060c0880135905092959891949750929550565b60006001600160401b0382111561458f5761458f614202565b5060051b60200190565b600082601f8301126145aa57600080fd5b813560206145b782614576565b6040516145c48282614218565b83815260059390931b85018201928281019150868411156145e457600080fd5b8286015b848110156145ff57803583529183019183016145e8565b509695505050505050565b6000806000806080858703121561462057600080fd5b843561462b816141ed565b935060208501356001600160401b038082111561464757600080fd5b61465388838901614599565b9450604087013591508082111561466957600080fd5b61467588838901614599565b9350606087013591508082111561468b57600080fd5b5061469887828801614244565b91505092959194509250565b600080604083850312156146b757600080fd5b50508035926020909101359150565b600080600080600060a086880312156146de57600080fd5b85356146e9816141ed565b945060208601356146f9816141ed565b935060408601356001600160401b038082111561471557600080fd5b61472189838a01614599565b9450606088013591508082111561473757600080fd5b61474389838a01614599565b9350608088013591508082111561475957600080fd5b5061476688828901614244565b9150509295509295909350565b6000806040838503121561478657600080fd5b823591506020830135614798816141ed565b809150509250929050565b600080604083850312156147b657600080fd5b8235915060208301356001600160401b038111156147d357600080fd5b61183385828601614244565b600080604083850312156147f257600080fd5b82356001600160401b038082111561480957600080fd5b818501915085601f83011261481d57600080fd5b8135602061482a82614576565b6040516148378282614218565b83815260059390931b850182019282810191508984111561485757600080fd5b948201945b8386101561487e57853561486f816141ed565b8252948201949082019061485c565b9650508601359250508082111561489457600080fd5b5061183385828601614599565b600081518084526020808501945080840160005b838110156148d1578151875295820195908201906001016148b5565b509495945050505050565b60208152600061146d60208301846148a1565b60008060006060848603121561490457600080fd5b833561490f816141ed565b925060208401356001600160401b038082111561492b57600080fd5b61493787838801614599565b9350604086013591508082111561494d57600080fd5b5061495a86828701614599565b9150509250925092565b6000806000806080858703121561497a57600080fd5b8435614985816141ed565b9350602085013592506040850135915060608501356001600160401b038111156149ae57600080fd5b61469887828801614244565b6000806000606084860312156149cf57600080fd5b8335925060208401356149e1816141ed565b929592945050506040919091013590565b60008060408385031215614a0557600080fd5b8235614a10816141ed565b91506020830135801515811461479857600080fd5b60008060408385031215614a3857600080fd5b8235614a43816141ed565b915060208301356001600160401b03811115614a5e57600080fd5b61183385828601614599565b60008060408385031215614a7d57600080fd5b8235614a88816141ed565b91506020830135614798816141ed565b600080600080600060a08688031215614ab057600080fd5b8535614abb816141ed565b94506020860135614acb816141ed565b9350604086013592506060860135915060808601356001600160401b03811115614af457600080fd5b61476688828901614244565b600080600060608486031215614b1557600080fd5b8335614b20816141ed565b95602085013595506040909401359392505050565b6020808252600d908201526c27a7262cafa7a822a920aa27a960991b604082015260600190565b6020808252600c908201526b27a7262cafa1a922a0aa27a960a11b604082015260600190565b6020808252600a908201526927a7262cafa0a226a4a760b11b604082015260600190565b6020808252600990820152682727aa2fa0a226a4a760b91b604082015260600190565b600181811c90821680614bdd57607f821691505b6020821081141561147457634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115614c2757614c27614bfe565b500190565b6001600160a01b03848116825283166020820152606060408201819052600090614c5890830184614405565b95945050505050565b60008351614c738184602088016143d9565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008251614caa8184602087016143d9565b9190910192915050565b6020808252600990820152680a48a828690be9a82b60bb1b604082015260600190565b600060018060a01b03808816835286602084015285604084015260a06060840152614d0560a0840186614405565b91508084166080840152509695505050505050565b6000816000190483118215151615614d3457614d34614bfe565b500290565b600082614d5657634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600019821415614d8557614d85614bfe565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b600060208284031215614de757600080fd5b815161146d816141ed565b600081614e0157614e01614bfe565b506000190190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b604081526000614ea560408301856148a1565b8281036020840152614c5881856148a1565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614f7e8160178501602088016143d9565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614faf8160288401602088016143d9565b01602801949350505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60008282101561505457615054614bfe565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906150a990830184614405565b979650505050505050565b6000602082840312156150c657600080fd5b815161146d8161434d565b600060033d1115612c645760046000803e5060005160e01c90565b600060443d10156150fa5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561512957505050505090565b82850191508151818111156151415750505050505090565b843d870101602082850101111561515b5750505050505090565b61516a60208286010187614218565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906151e9908301866148a1565b82810360608401526151fb81866148a1565b905082810360808401526112bb818561440556fe4d6574615472616e73616374696f6e286e6f6e63652c66726f6d2c7369676e617475726529828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92965d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212206bd099056b0f7e218def26a15818eab16963e3eb5c88bb5b83782bd0c3947ee064736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000025ba272695b064f33b843c32834f847255ff25dc000000000000000000000000f287d98a7b0823a49cfd20e250a251b97561c6ad
-----Decoded View---------------
Arg [0] : admin (address): 0x25BA272695b064f33b843C32834f847255ff25DC
Arg [1] : operator (address): 0xf287d98a7B0823a49Cfd20e250a251B97561c6Ad
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000025ba272695b064f33b843c32834f847255ff25dc
Arg [1] : 000000000000000000000000f287d98a7b0823a49cfd20e250a251b97561c6ad
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.