ERC-1155
Overview
Max Total Supply
253
Holders
191
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Store
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 "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract Store is ERC1155Supply, AccessControl, ReentrancyGuard { event StartItemSale(Item); event StopItemSale(Item); event ItemCreated(Item); struct Item { uint256 id; uint256 maxSupply; uint256 unitPrice; uint256 maxPerWallet; bool active; bool transfersEnabled; } Item[] private items; bool public onChainChecks = true; uint256 private itemId = 0; uint256 constant MINIMUM_PVNK_BALANCE = 1; string public contractURI = "http://api.store.io/contract"; mapping(address => uint256) private nonces; address public beneficiary; address public operator = 0xa0274B3f6D61Ba4188Af7D938666Cf4b048ceFFA; address public defaultAdmin = 0xAE2573d714D4df7DB925776aCF90065BBc12531A; ERC20 private Ammolite = ERC20(0xBcB6112292a9EE9C9cA876E6EAB0FeE7622445F1); ERC721 private Skvllpvnkz = ERC721(0xB28a4FdE7B6c3Eb0C914d7b4d3ddb4544c3bcbd6); bytes32 public constant CREATOR_ROLE = keccak256("CREATOR_ROLE"); modifier verifyOrder(uint256 _itemId, bytes memory _signature) { require( operator == getSignerFromMessage( operator, msg.sender, _itemId, nonces[msg.sender], _signature ), "Invalid request" ); _; } constructor() ERC1155("http://api.store.io/getItem?id=") { beneficiary = address(this); _setupRole(DEFAULT_ADMIN_ROLE, defaultAdmin); _setupRole(CREATOR_ROLE, defaultAdmin); } function createItem( uint256 _maxSupply, uint256 _unitPrice, uint256 _maxPerWallet ) public onlyRole(CREATOR_ROLE) { items.push( Item(itemId, _maxSupply, _unitPrice, _maxPerWallet, false, false) ); emit ItemCreated(items[itemId]); itemId++; } function updatePrice(uint256 id, uint256 _unitPrice) external onlyRole(CREATOR_ROLE) { items[id].unitPrice = _unitPrice; } function updateMaxPerWallet(uint256 id, uint256 _maxPerWallet) external onlyRole(CREATOR_ROLE) { items[id].maxPerWallet = _maxPerWallet; } function updateMaxSupply(uint256 id, uint256 _maxSupply) external onlyRole(CREATOR_ROLE) { items[id].maxSupply = _maxSupply; } function toggleItemSale(uint256 id) external onlyRole(CREATOR_ROLE) { items[id].active = !items[id].active; if (items[id].active) emit StartItemSale(items[id]); else emit StopItemSale(items[id]); } function toggleTransfers(uint256 id) external onlyRole(CREATOR_ROLE) { items[id].transfersEnabled = !items[id].transfersEnabled; } function getItems() external view returns (Item[] memory) { Item[] memory storeItems = new Item[](items.length); for (uint256 i = 0; i < items.length; i++) { storeItems[i] = Item( i, items[i].maxSupply, items[i].unitPrice, items[i].maxPerWallet, items[i].active, items[i].transfersEnabled ); } return items; } function _beforeTokenTransfer( address optr, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(optr, from, to, ids, amounts, data); // Call parent hook for (uint256 id = 0; id < ids.length; id++) { if (from != address(0) && to != address(0)) require(items[id].transfersEnabled, "Transfers are disabled"); } } function buyItem(uint256 id, bytes memory _signature) external verifyOrder(id, _signature) nonReentrant { if (onChainChecks) { require(items[id].active, "Item is not on sale"); require( totalSupply(id) + 1 <= items[id].maxSupply, "Item has reached max supply" ); require( balanceOf(msg.sender, id) < items[id].maxPerWallet, "You already own enough" ); require( Ammolite.balanceOf(msg.sender) >= items[id].unitPrice, "Not enough Ammo" ); require( Skvllpvnkz.balanceOf(msg.sender) >= MINIMUM_PVNK_BALANCE, "You must be a Skvllpvnkz owner" ); } _buyItem(id); } function _buyItem(uint256 _id) internal { nonces[msg.sender]++; Ammolite.transferFrom(msg.sender, beneficiary, items[_id].unitPrice); _mint(msg.sender, _id, 1, ""); } function getNonce(address wallet) external view returns (uint256) { return nonces[wallet]; } function remainingSupply(uint256 id) external view returns (uint256) { return items[id].maxSupply - totalSupply(id); } function setAmmoliteContract(address _ammoContract) external onlyRole(DEFAULT_ADMIN_ROLE) { Ammolite = ERC20(_ammoContract); } function setSkvllpvnkzContract(address _skvllpvnkzContract) external onlyRole(DEFAULT_ADMIN_ROLE) { Skvllpvnkz = ERC721(_skvllpvnkzContract); } function setBeneficiary(address _beneficiary) external onlyRole(DEFAULT_ADMIN_ROLE) { beneficiary = _beneficiary; } function setOperator(address _operator) external onlyRole(DEFAULT_ADMIN_ROLE) { operator = _operator; } function toggleOnChainChecks() external onlyRole(DEFAULT_ADMIN_ROLE) { onChainChecks = !onChainChecks; } function setContractURI(string memory _contractURI) external onlyRole(DEFAULT_ADMIN_ROLE) { contractURI = _contractURI; } function setURI(string memory newUri) external { super._setURI(newUri); } function getSignerFromMessage( address _operator, address _user, uint256 _itemId, uint256 _nonce, bytes memory _signature ) public view returns (address) { bytes32 _ethMessageHash = getEthMessageHash( getMessageHash(_operator, _user, _itemId, _nonce) ); (bytes32 r, bytes32 s, uint8 v) = _split(_signature); return ecrecover(_ethMessageHash, v, r, s); } function uri(uint256 _id) public view override returns (string memory) { return string( abi.encodePacked( super.uri(_id), Strings.toString(items[_id].id) ) ); } function withdrawAmmolite() external onlyRole(DEFAULT_ADMIN_ROLE) { Ammolite.transfer(msg.sender, Ammolite.balanceOf(address(this))); } function getMessageHash( address _operator, address _user, uint256 _itemId, uint256 _nonce ) internal view returns (bytes32) { return keccak256( abi.encode(_operator, _user, address(this), _itemId, _nonce) ); } function getEthMessageHash(bytes32 _messageHash) internal pure returns (bytes32) { return keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", _messageHash ) ); } function _split(bytes memory _signature) internal pure returns ( bytes32 r, bytes32 s, uint8 v ) { assembly { r := mload(add(_signature, 0x20)) s := mload(add(_signature, 0x40)) v := byte(0, mload(add(_signature, 0x60))) } } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ 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); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// 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 v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// 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 (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/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 (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/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"unitPrice","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"transfersEnabled","type":"bool"}],"indexed":false,"internalType":"struct Store.Item","name":"","type":"tuple"}],"name":"ItemCreated","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":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"unitPrice","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"transfersEnabled","type":"bool"}],"indexed":false,"internalType":"struct Store.Item","name":"","type":"tuple"}],"name":"StartItemSale","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"unitPrice","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"transfersEnabled","type":"bool"}],"indexed":false,"internalType":"struct Store.Item","name":"","type":"tuple"}],"name":"StopItemSale","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"},{"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":[{"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":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"buyItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_unitPrice","type":"uint256"},{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"createItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getItems","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"unitPrice","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"transfersEnabled","type":"bool"}],"internalType":"struct Store.Item[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getNonce","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":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_itemId","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getSignerFromMessage","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onChainChecks","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"remainingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"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":"_ammoContract","type":"address"}],"name":"setAmmoliteContract","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":"_beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_skvllpvnkzContract","type":"address"}],"name":"setSkvllpvnkzContract","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":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"toggleItemSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleOnChainChecks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"toggleTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"updateMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"updateMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"_unitPrice","type":"uint256"}],"name":"updatePrice","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":[],"name":"withdrawAmmolite","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6007805460ff19166001179055600060085560c0604052601c60808190527f687474703a2f2f6170692e73746f72652e696f2f636f6e74726163740000000060a09081526200005291600991906200025b565b50600c80546001600160a01b031990811673a0274b3f6d61ba4188af7d938666cf4b048ceffa17909155600d8054821673ae2573d714d4df7db925776acf90065bbc12531a179055600e8054821673bcb6112292a9ee9c9ca876e6eab0fee7622445f1179055600f805490911673b28a4fde7b6c3eb0c914d7b4d3ddb4544c3bcbd6179055348015620000e457600080fd5b5060408051808201909152601f81527f687474703a2f2f6170692e73746f72652e696f2f6765744974656d3f69643d006020820152620001248162000195565b506001600555600b80546001600160a01b03191630179055600d5462000156906000906001600160a01b0316620001ae565b600d546200018f907f828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f906001600160a01b0316620001ae565b6200033e565b8051620001aa9060029060208401906200025b565b5050565b60008281526004602090815260408083206001600160a01b0385168452909152902054620001aa908390839060ff16620001aa5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002173390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620002699062000301565b90600052602060002090601f0160209004810192826200028d5760008555620002d8565b82601f10620002a857805160ff1916838001178555620002d8565b82800160010185558215620002d8579182015b82811115620002d8578251825591602001919060010190620002bb565b50620002e6929150620002ea565b5090565b5b80821115620002e65760008155600101620002eb565b600181811c908216806200031657607f821691505b602082108114156200033857634e487b7160e01b600052602260045260246000fd5b50919050565b613446806200034e6000396000f3fe608060405234801561001057600080fd5b50600436106102525760003560e01c8063813867d711610146578063a217fddf116100c3578063bd85b03911610087578063bd85b0391461055f578063d547741f1461057f578063db48123214610592578063e8a3d4851461059f578063e985e9c5146105a7578063f242432a146105e357600080fd5b8063a217fddf1461050b578063a22cb46514610513578063aa555aab14610526578063b3ab15fb14610539578063b3b656d11461054c57600080fd5b80638eb8a3db1161010a5780638eb8a3db146104ac57806391d14854146104bf578063938e3d7b146104d2578063997502bb146104e55780639a0c7dec146104f857600080fd5b8063813867d71461046157806382367b2d146104695780638460ba271461047c57806384ef8ffc146104845780638aeda25a1461049757600080fd5b80632f2ff15d116101d457806347fda41a1161019857806347fda41a146103e65780634e1273f4146103f95780634f558e791461041957806356ee94f71461043b578063570ca7351461044e57600080fd5b80632f2ff15d1461036d57806336568abe1461038057806338af3eed1461039357806339b7a950146103be578063410d59cc146103d157600080fd5b80631c31f7101161021b5780631c31f710146102e8578063238e875f146102fb578063248a9ca31461030e5780632d0335ab146103315780632eb2c2d61461035a57600080fd5b8062fdd58e1461025757806301ffc9a71461027d57806302fe5305146102a057806307ed2362146102b55780630e89341c146102c8575b600080fd5b61026a6102653660046128de565b6105f6565b6040519081526020015b60405180910390f35b61029061028b36600461291e565b61068d565b6040519015158152602001610274565b6102b36102ae3660046129da565b61069e565b005b6102b36102c3366004612a22565b6106aa565b6102db6102d6366004612a3d565b6106d9565b6040516102749190612ab2565b6102b36102f6366004612a22565b610738565b6102b3610309366004612ac5565b610767565b61026a61031c366004612a3d565b60009081526004602052604090206001015490565b61026a61033f366004612a22565b6001600160a01b03166000908152600a602052604090205490565b6102b3610368366004612b9b565b6107ae565b6102b361037b366004612c44565b610845565b6102b361038e366004612c44565b610870565b600b546103a6906001600160a01b031681565b6040516001600160a01b039091168152602001610274565b6102b36103cc366004612c70565b6108ee565b6103d9610ce6565b6040516102749190612cb6565b61026a6103f4366004612a3d565b610f53565b61040c610407366004612d32565b610f91565b6040516102749190612e2d565b610290610427366004612a3d565b600090815260036020526040902054151590565b6103a6610449366004612e40565b6110ba565b600c546103a6906001600160a01b031681565b6102b36111d5565b6102b3610477366004612ac5565b6112c6565b6102b361130d565b600d546103a6906001600160a01b031681565b61026a6000805160206133f183398151915281565b6102b36104ba366004612ac5565b61132e565b6102906104cd366004612c44565b611375565b6102b36104e03660046129da565b6113a0565b6102b36104f3366004612a3d565b6113bf565b6102b3610506366004612a22565b61144a565b61026a600081565b6102b3610521366004612eb2565b611479565b6102b3610534366004612a3d565b611484565b6102b3610547366004612a22565b6115c9565b6102b361055a366004612ee9565b6115f8565b61026a61056d366004612a3d565b60009081526003602052604090205490565b6102b361058d366004612c44565b6117b1565b6007546102909060ff1681565b6102db6117d7565b6102906105b5366004612f15565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102b36105f1366004612e40565b611865565b60006001600160a01b0383166106675760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b6000610698826118ec565b92915050565b6106a781611911565b50565b60006106b68133611924565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60606106e482611988565b610711600684815481106106fa576106fa612f3f565b906000526020600020906005020160000154611a1c565b604051602001610722929190612f55565b6040516020818303038152906040529050919050565b60006107448133611924565b50600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206133f18339815191526107808133611924565b816006848154811061079457610794612f3f565b906000526020600020906005020160010181905550505050565b6001600160a01b0385163314806107ca57506107ca85336105b5565b6108315760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161065e565b61083e8585858585611b21565b5050505050565b6000828152600460205260409020600101546108618133611924565b61086b8383611d0c565b505050565b6001600160a01b03811633146108e05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161065e565b6108ea8282611d92565b5050565b600c54336000818152600a60205260409020548492849261091d926001600160a01b03909216918590856110ba565b600c546001600160a01b0390811691161461096c5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081c995c5d595cdd608a1b604482015260640161065e565b600260055414156109bf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161065e565b600260055560075460ff1615610cd257600684815481106109e2576109e2612f3f565b600091825260209091206004600590920201015460ff16610a3b5760405162461bcd60e51b81526020600482015260136024820152724974656d206973206e6f74206f6e2073616c6560681b604482015260640161065e565b60068481548110610a4e57610a4e612f3f565b906000526020600020906005020160010154610a768560009081526003602052604090205490565b610a81906001612f9a565b1115610acf5760405162461bcd60e51b815260206004820152601b60248201527f4974656d206861732072656163686564206d617820737570706c790000000000604482015260640161065e565b60068481548110610ae257610ae2612f3f565b906000526020600020906005020160030154610afe33866105f6565b10610b445760405162461bcd60e51b81526020600482015260166024820152750b2deea40c2d8e4cac2c8f240deeedc40cadcdeeaced60531b604482015260640161065e565b60068481548110610b5757610b57612f3f565b6000918252602090912060059091020160020154600e546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610bb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd79190612fb2565b1015610c175760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f75676820416d6d6f60881b604482015260640161065e565b600f546040516370a0823160e01b81523360048201526001916001600160a01b0316906370a0823190602401602060405180830381865afa158015610c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c849190612fb2565b1015610cd25760405162461bcd60e51b815260206004820152601e60248201527f596f75206d757374206265206120536b766c6c70766e6b7a206f776e65720000604482015260640161065e565b610cdb84611df9565b505060016005555050565b6006546060906000906001600160401b03811115610d0657610d0661293b565b604051908082528060200260200182016040528015610d7457816020015b610d616040518060c00160405280600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b815260200190600190039081610d245790505b50905060005b600654811015610eb3576040518060c0016040528082815260200160068381548110610da857610da8612f3f565b906000526020600020906005020160010154815260200160068381548110610dd257610dd2612f3f565b906000526020600020906005020160020154815260200160068381548110610dfc57610dfc612f3f565b906000526020600020906005020160030154815260200160068381548110610e2657610e26612f3f565b906000526020600020906005020160040160009054906101000a900460ff161515815260200160068381548110610e5f57610e5f612f3f565b906000526020600020906005020160040160019054906101000a900460ff161515815250828281518110610e9557610e95612f3f565b60200260200101819052508080610eab90612fcb565b915050610d7a565b506006805480602002602001604051908101604052809291908181526020016000905b82821015610f495760008481526020908190206040805160c081018252600586029092018054835260018082015484860152600282015492840192909252600381015460608401526004015460ff8082161515608085015261010090910416151560a08301529083529092019101610ed6565b5050505091505090565b60008181526003602052604081205460068381548110610f7557610f75612f3f565b9060005260206000209060050201600101546106989190612fe6565b60608151835114610ff65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161065e565b600083516001600160401b038111156110115761101161293b565b60405190808252806020026020018201604052801561103a578160200160208202803683370190505b50905060005b84518110156110b25761108585828151811061105e5761105e612f3f565b602002602001015185838151811061107857611078612f3f565b60200260200101516105f6565b82828151811061109757611097612f3f565b60209081029190910101526110ab81612fcb565b9050611040565b509392505050565b604080516001600160a01b03878116602080840191909152908716828401523060608301526080820186905260a08083018690528351808403909101815260c0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060e084015260fc808401919091528351808403909101815261011c90920190925280519101206000908190602084810151604080870151606080890151835160008082528188018087528990529190911a8185018190529181018590526080810183905292519596509294909360019260a080820193601f1981019281900390910190855afa1580156111bc573d6000803e3d6000fd5b5050604051601f1901519b9a5050505050505050505050565b60006111e18133611924565b600e546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112579190612fb2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156112a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ea9190612ffd565b6000805160206133f18339815191526112df8133611924565b81600684815481106112f3576112f3612f3f565b906000526020600020906005020160020181905550505050565b60006113198133611924565b506007805460ff19811660ff90911615179055565b6000805160206133f18339815191526113478133611924565b816006848154811061135b5761135b612f3f565b906000526020600020906005020160030181905550505050565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006113ac8133611924565b815161086b906009906020850190612829565b6000805160206133f18339815191526113d88133611924565b600682815481106113eb576113eb612f3f565b906000526020600020906005020160040160019054906101000a900460ff16156006838154811061141e5761141e612f3f565b906000526020600020906005020160040160016101000a81548160ff0219169083151502179055505050565b60006114568133611924565b50600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6108ea338383611ef3565b6000805160206133f183398151915261149d8133611924565b600682815481106114b0576114b0612f3f565b906000526020600020906005020160040160009054906101000a900460ff1615600683815481106114e3576114e3612f3f565b906000526020600020906005020160040160006101000a81548160ff0219169083151502179055506006828154811061151e5761151e612f3f565b600091825260209091206004600590920201015460ff1615611595577fac3456dd8b34260b58d925b82b838b95e4fcf675b3736eec401c8fa22688ee126006838154811061156e5761156e612f3f565b9060005260206000209060050201604051611589919061301a565b60405180910390a15050565b7fb12e612f792494327d8ca728827cc233da0106785c90cd7e83de8b6e6f9419ea6006838154811061156e5761156e612f3f565b60006115d58133611924565b50600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206133f18339815191526116118133611924565b6040805160c081018252600880548252602082018781529282018681526060830186815260006080850181815260a086018281526006805460018101825593819052965160059093027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f81019390935596517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4083015592517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4182015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4282015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d439091018054945115156101000261ff00199215159290921661ffff199095169490941717909255905481547f6188e3c9dea4f960708c0f1cecd739c6ec570775411c0ba06de522c1e5f4a4a5929190811061177357611773612f3f565b906000526020600020906005020160405161178e919061301a565b60405180910390a1600880549060006117a683612fcb565b919050555050505050565b6000828152600460205260409020600101546117cd8133611924565b61086b8383611d92565b600980546117e490613062565b80601f016020809104026020016040519081016040528092919081815260200182805461181090613062565b801561185d5780601f106118325761010080835404028352916020019161185d565b820191906000526020600020905b81548152906001019060200180831161184057829003601f168201915b505050505081565b6001600160a01b038516331480611881575061188185336105b5565b6118df5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b606482015260840161065e565b61083e8585858585611fd4565b60006001600160e01b03198216637965db0b60e01b1480610698575061069882612100565b80516108ea906002906020840190612829565b61192e8282611375565b6108ea57611946816001600160a01b03166014612150565b611951836020612150565b60405160200161196292919061309d565b60408051601f198184030181529082905262461bcd60e51b825261065e91600401612ab2565b60606002805461199790613062565b80601f01602080910402602001604051908101604052809291908181526020018280546119c390613062565b8015611a105780601f106119e557610100808354040283529160200191611a10565b820191906000526020600020905b8154815290600101906020018083116119f357829003601f168201915b50505050509050919050565b606081611a405750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a6a5780611a5481612fcb565b9150611a639050600a83613128565b9150611a44565b6000816001600160401b03811115611a8457611a8461293b565b6040519080825280601f01601f191660200182016040528015611aae576020820181803683370190505b5090505b8415611b1957611ac3600183612fe6565b9150611ad0600a8661313c565b611adb906030612f9a565b60f81b818381518110611af057611af0612f3f565b60200101906001600160f81b031916908160001a905350611b12600a86613128565b9450611ab2565b949350505050565b8151835114611b835760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161065e565b6001600160a01b038416611ba95760405162461bcd60e51b815260040161065e90613150565b33611bb88187878787876122f2565b60005b8451811015611c9e576000858281518110611bd857611bd8612f3f565b602002602001015190506000858381518110611bf657611bf6612f3f565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611c465760405162461bcd60e51b815260040161065e90613195565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611c83908490612f9a565b9250508190555050505080611c9790612fcb565b9050611bbb565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611cee9291906131df565b60405180910390a4611d048187878787876123ba565b505050505050565b611d168282611375565b6108ea5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611d4e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611d9c8282611375565b156108ea5760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b336000908152600a60205260408120805491611e1483612fcb565b9091555050600e54600b54600680546001600160a01b03938416936323b872dd93339391169186908110611e4a57611e4a612f3f565b60009182526020909120600260059092020101546040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611eb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed69190612ffd565b506106a73382600160405180602001604052806000815250612516565b816001600160a01b0316836001600160a01b03161415611f675760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161065e565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416611ffa5760405162461bcd60e51b815260040161065e90613150565b3361201981878761200a88612617565b61201388612617565b876122f2565b6000848152602081815260408083206001600160a01b038a1684529091529020548381101561205a5760405162461bcd60e51b815260040161065e90613195565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612097908490612f9a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46120f7828888888888612662565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b148061213157506001600160e01b031982166303a24d0760e21b145b8061069857506301ffc9a760e01b6001600160e01b0319831614610698565b6060600061215f83600261320d565b61216a906002612f9a565b6001600160401b038111156121815761218161293b565b6040519080825280601f01601f1916602001820160405280156121ab576020820181803683370190505b509050600360fc1b816000815181106121c6576121c6612f3f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121f5576121f5612f3f565b60200101906001600160f81b031916908160001a905350600061221984600261320d565b612224906001612f9a565b90505b600181111561229c576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061225857612258612f3f565b1a60f81b82828151811061226e5761226e612f3f565b60200101906001600160f81b031916908160001a90535060049490941c936122958161322c565b9050612227565b5083156122eb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161065e565b9392505050565b61230086868686868661271d565b60005b83518110156120f7576001600160a01b0386161580159061232c57506001600160a01b03851615155b156123a8576006818154811061234457612344612f3f565b906000526020600020906005020160040160019054906101000a900460ff166123a85760405162461bcd60e51b8152602060048201526016602482015275151c985b9cd9995c9cc8185c9948191a5cd8589b195960521b604482015260640161065e565b806123b281612fcb565b915050612303565b6001600160a01b0384163b15611d045760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906123fe9089908990889088908890600401613243565b6020604051808303816000875af1925050508015612439575060408051601f3d908101601f19168201909252612436918101906132a1565b60015b6124e6576124456132be565b806308c379a0141561247f575061245a6132da565b806124655750612481565b8060405162461bcd60e51b815260040161065e9190612ab2565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161065e565b6001600160e01b0319811663bc197c8160e01b146120f75760405162461bcd60e51b815260040161065e90613363565b6001600160a01b0384166125765760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161065e565b336125878160008761200a88612617565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906125b7908490612f9a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461083e81600087878787612662565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061265157612651612f3f565b602090810291909101015292915050565b6001600160a01b0384163b15611d045760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126a690899089908890889088906004016133ab565b6020604051808303816000875af19250505080156126e1575060408051601f3d908101601f191682019092526126de918101906132a1565b60015b6126ed576124456132be565b6001600160e01b0319811663f23a6e6160e01b146120f75760405162461bcd60e51b815260040161065e90613363565b6001600160a01b0385166127a45760005b83518110156127a25782818151811061274957612749612f3f565b60200260200101516003600086848151811061276757612767612f3f565b60200260200101518152602001908152602001600020600082825461278c9190612f9a565b9091555061279b905081612fcb565b905061272e565b505b6001600160a01b038416611d045760005b83518110156120f7578281815181106127d0576127d0612f3f565b6020026020010151600360008684815181106127ee576127ee612f3f565b6020026020010151815260200190815260200160002060008282546128139190612fe6565b90915550612822905081612fcb565b90506127b5565b82805461283590613062565b90600052602060002090601f016020900481019282612857576000855561289d565b82601f1061287057805160ff191683800117855561289d565b8280016001018555821561289d579182015b8281111561289d578251825591602001919060010190612882565b506128a99291506128ad565b5090565b5b808211156128a957600081556001016128ae565b80356001600160a01b03811681146128d957600080fd5b919050565b600080604083850312156128f157600080fd5b6128fa836128c2565b946020939093013593505050565b6001600160e01b0319811681146106a757600080fd5b60006020828403121561293057600080fd5b81356122eb81612908565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156129765761297661293b565b6040525050565b60006001600160401b038311156129965761299661293b565b6040516129ad601f8501601f191660200182612951565b8091508381528484840111156129c257600080fd5b83836020830137600060208583010152509392505050565b6000602082840312156129ec57600080fd5b81356001600160401b03811115612a0257600080fd5b8201601f81018413612a1357600080fd5b611b198482356020840161297d565b600060208284031215612a3457600080fd5b6122eb826128c2565b600060208284031215612a4f57600080fd5b5035919050565b60005b83811015612a71578181015183820152602001612a59565b83811115612a80576000848401525b50505050565b60008151808452612a9e816020860160208601612a56565b601f01601f19169290920160200192915050565b6020815260006122eb6020830184612a86565b60008060408385031215612ad857600080fd5b50508035926020909101359150565b60006001600160401b03821115612b0057612b0061293b565b5060051b60200190565b600082601f830112612b1b57600080fd5b81356020612b2882612ae7565b604051612b358282612951565b83815260059390931b8501820192828101915086841115612b5557600080fd5b8286015b84811015612b705780358352918301918301612b59565b509695505050505050565b600082601f830112612b8c57600080fd5b6122eb8383356020850161297d565b600080600080600060a08688031215612bb357600080fd5b612bbc866128c2565b9450612bca602087016128c2565b935060408601356001600160401b0380821115612be657600080fd5b612bf289838a01612b0a565b94506060880135915080821115612c0857600080fd5b612c1489838a01612b0a565b93506080880135915080821115612c2a57600080fd5b50612c3788828901612b7b565b9150509295509295909350565b60008060408385031215612c5757600080fd5b82359150612c67602084016128c2565b90509250929050565b60008060408385031215612c8357600080fd5b8235915060208301356001600160401b03811115612ca057600080fd5b612cac85828601612b7b565b9150509250929050565b602080825282518282018190526000919060409081850190868401855b82811015612d2557815180518552868101518786015285810151868601526060808201519086015260808082015115159086015260a09081015115159085015260c09093019290850190600101612cd3565b5091979650505050505050565b60008060408385031215612d4557600080fd5b82356001600160401b0380821115612d5c57600080fd5b818501915085601f830112612d7057600080fd5b81356020612d7d82612ae7565b604051612d8a8282612951565b83815260059390931b8501820192828101915089841115612daa57600080fd5b948201945b83861015612dcf57612dc0866128c2565b82529482019490820190612daf565b96505086013592505080821115612de557600080fd5b50612cac85828601612b0a565b600081518084526020808501945080840160005b83811015612e2257815187529582019590820190600101612e06565b509495945050505050565b6020815260006122eb6020830184612df2565b600080600080600060a08688031215612e5857600080fd5b612e61866128c2565b9450612e6f602087016128c2565b9350604086013592506060860135915060808601356001600160401b03811115612e9857600080fd5b612c3788828901612b7b565b80151581146106a757600080fd5b60008060408385031215612ec557600080fd5b612ece836128c2565b91506020830135612ede81612ea4565b809150509250929050565b600080600060608486031215612efe57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612f2857600080fd5b612f31836128c2565b9150612c67602084016128c2565b634e487b7160e01b600052603260045260246000fd5b60008351612f67818460208801612a56565b835190830190612f7b818360208801612a56565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612fad57612fad612f84565b500190565b600060208284031215612fc457600080fd5b5051919050565b6000600019821415612fdf57612fdf612f84565b5060010190565b600082821015612ff857612ff8612f84565b500390565b60006020828403121561300f57600080fd5b81516122eb81612ea4565b8154815260018201546020820152600282015460408201526003820154606082015260049091015460ff8082161515608084015260089190911c16151560a082015260c00190565b600181811c9082168061307657607f821691505b6020821081141561309757634e487b7160e01b600052602260045260246000fd5b50919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516130d5816017850160208801612a56565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613106816028840160208801612a56565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261313757613137613112565b500490565b60008261314b5761314b613112565b500690565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006131f26040830185612df2565b82810360208401526132048185612df2565b95945050505050565b600081600019048311821515161561322757613227612f84565b500290565b60008161323b5761323b612f84565b506000190190565b6001600160a01b0386811682528516602082015260a06040820181905260009061326f90830186612df2565b82810360608401526132818186612df2565b905082810360808401526132958185612a86565b98975050505050505050565b6000602082840312156132b357600080fd5b81516122eb81612908565b600060033d11156132d75760046000803e5060005160e01c5b90565b600060443d10156132e85790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561331757505050505090565b828501915081518181111561332f5750505050505090565b843d87010160208285010111156133495750505050505090565b61335860208286010187612951565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906133e590830184612a86565b97965050505050505056fe828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882fa2646970667358221220a3198721e8bf099c09b9977ccf831a0229dec887e9473a970b5d388beae103cf64736f6c634300080c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102525760003560e01c8063813867d711610146578063a217fddf116100c3578063bd85b03911610087578063bd85b0391461055f578063d547741f1461057f578063db48123214610592578063e8a3d4851461059f578063e985e9c5146105a7578063f242432a146105e357600080fd5b8063a217fddf1461050b578063a22cb46514610513578063aa555aab14610526578063b3ab15fb14610539578063b3b656d11461054c57600080fd5b80638eb8a3db1161010a5780638eb8a3db146104ac57806391d14854146104bf578063938e3d7b146104d2578063997502bb146104e55780639a0c7dec146104f857600080fd5b8063813867d71461046157806382367b2d146104695780638460ba271461047c57806384ef8ffc146104845780638aeda25a1461049757600080fd5b80632f2ff15d116101d457806347fda41a1161019857806347fda41a146103e65780634e1273f4146103f95780634f558e791461041957806356ee94f71461043b578063570ca7351461044e57600080fd5b80632f2ff15d1461036d57806336568abe1461038057806338af3eed1461039357806339b7a950146103be578063410d59cc146103d157600080fd5b80631c31f7101161021b5780631c31f710146102e8578063238e875f146102fb578063248a9ca31461030e5780632d0335ab146103315780632eb2c2d61461035a57600080fd5b8062fdd58e1461025757806301ffc9a71461027d57806302fe5305146102a057806307ed2362146102b55780630e89341c146102c8575b600080fd5b61026a6102653660046128de565b6105f6565b6040519081526020015b60405180910390f35b61029061028b36600461291e565b61068d565b6040519015158152602001610274565b6102b36102ae3660046129da565b61069e565b005b6102b36102c3366004612a22565b6106aa565b6102db6102d6366004612a3d565b6106d9565b6040516102749190612ab2565b6102b36102f6366004612a22565b610738565b6102b3610309366004612ac5565b610767565b61026a61031c366004612a3d565b60009081526004602052604090206001015490565b61026a61033f366004612a22565b6001600160a01b03166000908152600a602052604090205490565b6102b3610368366004612b9b565b6107ae565b6102b361037b366004612c44565b610845565b6102b361038e366004612c44565b610870565b600b546103a6906001600160a01b031681565b6040516001600160a01b039091168152602001610274565b6102b36103cc366004612c70565b6108ee565b6103d9610ce6565b6040516102749190612cb6565b61026a6103f4366004612a3d565b610f53565b61040c610407366004612d32565b610f91565b6040516102749190612e2d565b610290610427366004612a3d565b600090815260036020526040902054151590565b6103a6610449366004612e40565b6110ba565b600c546103a6906001600160a01b031681565b6102b36111d5565b6102b3610477366004612ac5565b6112c6565b6102b361130d565b600d546103a6906001600160a01b031681565b61026a6000805160206133f183398151915281565b6102b36104ba366004612ac5565b61132e565b6102906104cd366004612c44565b611375565b6102b36104e03660046129da565b6113a0565b6102b36104f3366004612a3d565b6113bf565b6102b3610506366004612a22565b61144a565b61026a600081565b6102b3610521366004612eb2565b611479565b6102b3610534366004612a3d565b611484565b6102b3610547366004612a22565b6115c9565b6102b361055a366004612ee9565b6115f8565b61026a61056d366004612a3d565b60009081526003602052604090205490565b6102b361058d366004612c44565b6117b1565b6007546102909060ff1681565b6102db6117d7565b6102906105b5366004612f15565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102b36105f1366004612e40565b611865565b60006001600160a01b0383166106675760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b6000610698826118ec565b92915050565b6106a781611911565b50565b60006106b68133611924565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60606106e482611988565b610711600684815481106106fa576106fa612f3f565b906000526020600020906005020160000154611a1c565b604051602001610722929190612f55565b6040516020818303038152906040529050919050565b60006107448133611924565b50600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206133f18339815191526107808133611924565b816006848154811061079457610794612f3f565b906000526020600020906005020160010181905550505050565b6001600160a01b0385163314806107ca57506107ca85336105b5565b6108315760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161065e565b61083e8585858585611b21565b5050505050565b6000828152600460205260409020600101546108618133611924565b61086b8383611d0c565b505050565b6001600160a01b03811633146108e05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161065e565b6108ea8282611d92565b5050565b600c54336000818152600a60205260409020548492849261091d926001600160a01b03909216918590856110ba565b600c546001600160a01b0390811691161461096c5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081c995c5d595cdd608a1b604482015260640161065e565b600260055414156109bf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161065e565b600260055560075460ff1615610cd257600684815481106109e2576109e2612f3f565b600091825260209091206004600590920201015460ff16610a3b5760405162461bcd60e51b81526020600482015260136024820152724974656d206973206e6f74206f6e2073616c6560681b604482015260640161065e565b60068481548110610a4e57610a4e612f3f565b906000526020600020906005020160010154610a768560009081526003602052604090205490565b610a81906001612f9a565b1115610acf5760405162461bcd60e51b815260206004820152601b60248201527f4974656d206861732072656163686564206d617820737570706c790000000000604482015260640161065e565b60068481548110610ae257610ae2612f3f565b906000526020600020906005020160030154610afe33866105f6565b10610b445760405162461bcd60e51b81526020600482015260166024820152750b2deea40c2d8e4cac2c8f240deeedc40cadcdeeaced60531b604482015260640161065e565b60068481548110610b5757610b57612f3f565b6000918252602090912060059091020160020154600e546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610bb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd79190612fb2565b1015610c175760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f75676820416d6d6f60881b604482015260640161065e565b600f546040516370a0823160e01b81523360048201526001916001600160a01b0316906370a0823190602401602060405180830381865afa158015610c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c849190612fb2565b1015610cd25760405162461bcd60e51b815260206004820152601e60248201527f596f75206d757374206265206120536b766c6c70766e6b7a206f776e65720000604482015260640161065e565b610cdb84611df9565b505060016005555050565b6006546060906000906001600160401b03811115610d0657610d0661293b565b604051908082528060200260200182016040528015610d7457816020015b610d616040518060c00160405280600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b815260200190600190039081610d245790505b50905060005b600654811015610eb3576040518060c0016040528082815260200160068381548110610da857610da8612f3f565b906000526020600020906005020160010154815260200160068381548110610dd257610dd2612f3f565b906000526020600020906005020160020154815260200160068381548110610dfc57610dfc612f3f565b906000526020600020906005020160030154815260200160068381548110610e2657610e26612f3f565b906000526020600020906005020160040160009054906101000a900460ff161515815260200160068381548110610e5f57610e5f612f3f565b906000526020600020906005020160040160019054906101000a900460ff161515815250828281518110610e9557610e95612f3f565b60200260200101819052508080610eab90612fcb565b915050610d7a565b506006805480602002602001604051908101604052809291908181526020016000905b82821015610f495760008481526020908190206040805160c081018252600586029092018054835260018082015484860152600282015492840192909252600381015460608401526004015460ff8082161515608085015261010090910416151560a08301529083529092019101610ed6565b5050505091505090565b60008181526003602052604081205460068381548110610f7557610f75612f3f565b9060005260206000209060050201600101546106989190612fe6565b60608151835114610ff65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161065e565b600083516001600160401b038111156110115761101161293b565b60405190808252806020026020018201604052801561103a578160200160208202803683370190505b50905060005b84518110156110b25761108585828151811061105e5761105e612f3f565b602002602001015185838151811061107857611078612f3f565b60200260200101516105f6565b82828151811061109757611097612f3f565b60209081029190910101526110ab81612fcb565b9050611040565b509392505050565b604080516001600160a01b03878116602080840191909152908716828401523060608301526080820186905260a08083018690528351808403909101815260c0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060e084015260fc808401919091528351808403909101815261011c90920190925280519101206000908190602084810151604080870151606080890151835160008082528188018087528990529190911a8185018190529181018590526080810183905292519596509294909360019260a080820193601f1981019281900390910190855afa1580156111bc573d6000803e3d6000fd5b5050604051601f1901519b9a5050505050505050505050565b60006111e18133611924565b600e546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112579190612fb2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156112a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ea9190612ffd565b6000805160206133f18339815191526112df8133611924565b81600684815481106112f3576112f3612f3f565b906000526020600020906005020160020181905550505050565b60006113198133611924565b506007805460ff19811660ff90911615179055565b6000805160206133f18339815191526113478133611924565b816006848154811061135b5761135b612f3f565b906000526020600020906005020160030181905550505050565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006113ac8133611924565b815161086b906009906020850190612829565b6000805160206133f18339815191526113d88133611924565b600682815481106113eb576113eb612f3f565b906000526020600020906005020160040160019054906101000a900460ff16156006838154811061141e5761141e612f3f565b906000526020600020906005020160040160016101000a81548160ff0219169083151502179055505050565b60006114568133611924565b50600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6108ea338383611ef3565b6000805160206133f183398151915261149d8133611924565b600682815481106114b0576114b0612f3f565b906000526020600020906005020160040160009054906101000a900460ff1615600683815481106114e3576114e3612f3f565b906000526020600020906005020160040160006101000a81548160ff0219169083151502179055506006828154811061151e5761151e612f3f565b600091825260209091206004600590920201015460ff1615611595577fac3456dd8b34260b58d925b82b838b95e4fcf675b3736eec401c8fa22688ee126006838154811061156e5761156e612f3f565b9060005260206000209060050201604051611589919061301a565b60405180910390a15050565b7fb12e612f792494327d8ca728827cc233da0106785c90cd7e83de8b6e6f9419ea6006838154811061156e5761156e612f3f565b60006115d58133611924565b50600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000805160206133f18339815191526116118133611924565b6040805160c081018252600880548252602082018781529282018681526060830186815260006080850181815260a086018281526006805460018101825593819052965160059093027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f81019390935596517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4083015592517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4182015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4282015590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d439091018054945115156101000261ff00199215159290921661ffff199095169490941717909255905481547f6188e3c9dea4f960708c0f1cecd739c6ec570775411c0ba06de522c1e5f4a4a5929190811061177357611773612f3f565b906000526020600020906005020160405161178e919061301a565b60405180910390a1600880549060006117a683612fcb565b919050555050505050565b6000828152600460205260409020600101546117cd8133611924565b61086b8383611d92565b600980546117e490613062565b80601f016020809104026020016040519081016040528092919081815260200182805461181090613062565b801561185d5780601f106118325761010080835404028352916020019161185d565b820191906000526020600020905b81548152906001019060200180831161184057829003601f168201915b505050505081565b6001600160a01b038516331480611881575061188185336105b5565b6118df5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b606482015260840161065e565b61083e8585858585611fd4565b60006001600160e01b03198216637965db0b60e01b1480610698575061069882612100565b80516108ea906002906020840190612829565b61192e8282611375565b6108ea57611946816001600160a01b03166014612150565b611951836020612150565b60405160200161196292919061309d565b60408051601f198184030181529082905262461bcd60e51b825261065e91600401612ab2565b60606002805461199790613062565b80601f01602080910402602001604051908101604052809291908181526020018280546119c390613062565b8015611a105780601f106119e557610100808354040283529160200191611a10565b820191906000526020600020905b8154815290600101906020018083116119f357829003601f168201915b50505050509050919050565b606081611a405750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a6a5780611a5481612fcb565b9150611a639050600a83613128565b9150611a44565b6000816001600160401b03811115611a8457611a8461293b565b6040519080825280601f01601f191660200182016040528015611aae576020820181803683370190505b5090505b8415611b1957611ac3600183612fe6565b9150611ad0600a8661313c565b611adb906030612f9a565b60f81b818381518110611af057611af0612f3f565b60200101906001600160f81b031916908160001a905350611b12600a86613128565b9450611ab2565b949350505050565b8151835114611b835760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161065e565b6001600160a01b038416611ba95760405162461bcd60e51b815260040161065e90613150565b33611bb88187878787876122f2565b60005b8451811015611c9e576000858281518110611bd857611bd8612f3f565b602002602001015190506000858381518110611bf657611bf6612f3f565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611c465760405162461bcd60e51b815260040161065e90613195565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611c83908490612f9a565b9250508190555050505080611c9790612fcb565b9050611bbb565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611cee9291906131df565b60405180910390a4611d048187878787876123ba565b505050505050565b611d168282611375565b6108ea5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611d4e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611d9c8282611375565b156108ea5760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b336000908152600a60205260408120805491611e1483612fcb565b9091555050600e54600b54600680546001600160a01b03938416936323b872dd93339391169186908110611e4a57611e4a612f3f565b60009182526020909120600260059092020101546040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611eb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed69190612ffd565b506106a73382600160405180602001604052806000815250612516565b816001600160a01b0316836001600160a01b03161415611f675760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161065e565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416611ffa5760405162461bcd60e51b815260040161065e90613150565b3361201981878761200a88612617565b61201388612617565b876122f2565b6000848152602081815260408083206001600160a01b038a1684529091529020548381101561205a5760405162461bcd60e51b815260040161065e90613195565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612097908490612f9a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46120f7828888888888612662565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b148061213157506001600160e01b031982166303a24d0760e21b145b8061069857506301ffc9a760e01b6001600160e01b0319831614610698565b6060600061215f83600261320d565b61216a906002612f9a565b6001600160401b038111156121815761218161293b565b6040519080825280601f01601f1916602001820160405280156121ab576020820181803683370190505b509050600360fc1b816000815181106121c6576121c6612f3f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121f5576121f5612f3f565b60200101906001600160f81b031916908160001a905350600061221984600261320d565b612224906001612f9a565b90505b600181111561229c576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061225857612258612f3f565b1a60f81b82828151811061226e5761226e612f3f565b60200101906001600160f81b031916908160001a90535060049490941c936122958161322c565b9050612227565b5083156122eb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161065e565b9392505050565b61230086868686868661271d565b60005b83518110156120f7576001600160a01b0386161580159061232c57506001600160a01b03851615155b156123a8576006818154811061234457612344612f3f565b906000526020600020906005020160040160019054906101000a900460ff166123a85760405162461bcd60e51b8152602060048201526016602482015275151c985b9cd9995c9cc8185c9948191a5cd8589b195960521b604482015260640161065e565b806123b281612fcb565b915050612303565b6001600160a01b0384163b15611d045760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906123fe9089908990889088908890600401613243565b6020604051808303816000875af1925050508015612439575060408051601f3d908101601f19168201909252612436918101906132a1565b60015b6124e6576124456132be565b806308c379a0141561247f575061245a6132da565b806124655750612481565b8060405162461bcd60e51b815260040161065e9190612ab2565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161065e565b6001600160e01b0319811663bc197c8160e01b146120f75760405162461bcd60e51b815260040161065e90613363565b6001600160a01b0384166125765760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161065e565b336125878160008761200a88612617565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906125b7908490612f9a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461083e81600087878787612662565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061265157612651612f3f565b602090810291909101015292915050565b6001600160a01b0384163b15611d045760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126a690899089908890889088906004016133ab565b6020604051808303816000875af19250505080156126e1575060408051601f3d908101601f191682019092526126de918101906132a1565b60015b6126ed576124456132be565b6001600160e01b0319811663f23a6e6160e01b146120f75760405162461bcd60e51b815260040161065e90613363565b6001600160a01b0385166127a45760005b83518110156127a25782818151811061274957612749612f3f565b60200260200101516003600086848151811061276757612767612f3f565b60200260200101518152602001908152602001600020600082825461278c9190612f9a565b9091555061279b905081612fcb565b905061272e565b505b6001600160a01b038416611d045760005b83518110156120f7578281815181106127d0576127d0612f3f565b6020026020010151600360008684815181106127ee576127ee612f3f565b6020026020010151815260200190815260200160002060008282546128139190612fe6565b90915550612822905081612fcb565b90506127b5565b82805461283590613062565b90600052602060002090601f016020900481019282612857576000855561289d565b82601f1061287057805160ff191683800117855561289d565b8280016001018555821561289d579182015b8281111561289d578251825591602001919060010190612882565b506128a99291506128ad565b5090565b5b808211156128a957600081556001016128ae565b80356001600160a01b03811681146128d957600080fd5b919050565b600080604083850312156128f157600080fd5b6128fa836128c2565b946020939093013593505050565b6001600160e01b0319811681146106a757600080fd5b60006020828403121561293057600080fd5b81356122eb81612908565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156129765761297661293b565b6040525050565b60006001600160401b038311156129965761299661293b565b6040516129ad601f8501601f191660200182612951565b8091508381528484840111156129c257600080fd5b83836020830137600060208583010152509392505050565b6000602082840312156129ec57600080fd5b81356001600160401b03811115612a0257600080fd5b8201601f81018413612a1357600080fd5b611b198482356020840161297d565b600060208284031215612a3457600080fd5b6122eb826128c2565b600060208284031215612a4f57600080fd5b5035919050565b60005b83811015612a71578181015183820152602001612a59565b83811115612a80576000848401525b50505050565b60008151808452612a9e816020860160208601612a56565b601f01601f19169290920160200192915050565b6020815260006122eb6020830184612a86565b60008060408385031215612ad857600080fd5b50508035926020909101359150565b60006001600160401b03821115612b0057612b0061293b565b5060051b60200190565b600082601f830112612b1b57600080fd5b81356020612b2882612ae7565b604051612b358282612951565b83815260059390931b8501820192828101915086841115612b5557600080fd5b8286015b84811015612b705780358352918301918301612b59565b509695505050505050565b600082601f830112612b8c57600080fd5b6122eb8383356020850161297d565b600080600080600060a08688031215612bb357600080fd5b612bbc866128c2565b9450612bca602087016128c2565b935060408601356001600160401b0380821115612be657600080fd5b612bf289838a01612b0a565b94506060880135915080821115612c0857600080fd5b612c1489838a01612b0a565b93506080880135915080821115612c2a57600080fd5b50612c3788828901612b7b565b9150509295509295909350565b60008060408385031215612c5757600080fd5b82359150612c67602084016128c2565b90509250929050565b60008060408385031215612c8357600080fd5b8235915060208301356001600160401b03811115612ca057600080fd5b612cac85828601612b7b565b9150509250929050565b602080825282518282018190526000919060409081850190868401855b82811015612d2557815180518552868101518786015285810151868601526060808201519086015260808082015115159086015260a09081015115159085015260c09093019290850190600101612cd3565b5091979650505050505050565b60008060408385031215612d4557600080fd5b82356001600160401b0380821115612d5c57600080fd5b818501915085601f830112612d7057600080fd5b81356020612d7d82612ae7565b604051612d8a8282612951565b83815260059390931b8501820192828101915089841115612daa57600080fd5b948201945b83861015612dcf57612dc0866128c2565b82529482019490820190612daf565b96505086013592505080821115612de557600080fd5b50612cac85828601612b0a565b600081518084526020808501945080840160005b83811015612e2257815187529582019590820190600101612e06565b509495945050505050565b6020815260006122eb6020830184612df2565b600080600080600060a08688031215612e5857600080fd5b612e61866128c2565b9450612e6f602087016128c2565b9350604086013592506060860135915060808601356001600160401b03811115612e9857600080fd5b612c3788828901612b7b565b80151581146106a757600080fd5b60008060408385031215612ec557600080fd5b612ece836128c2565b91506020830135612ede81612ea4565b809150509250929050565b600080600060608486031215612efe57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215612f2857600080fd5b612f31836128c2565b9150612c67602084016128c2565b634e487b7160e01b600052603260045260246000fd5b60008351612f67818460208801612a56565b835190830190612f7b818360208801612a56565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612fad57612fad612f84565b500190565b600060208284031215612fc457600080fd5b5051919050565b6000600019821415612fdf57612fdf612f84565b5060010190565b600082821015612ff857612ff8612f84565b500390565b60006020828403121561300f57600080fd5b81516122eb81612ea4565b8154815260018201546020820152600282015460408201526003820154606082015260049091015460ff8082161515608084015260089190911c16151560a082015260c00190565b600181811c9082168061307657607f821691505b6020821081141561309757634e487b7160e01b600052602260045260246000fd5b50919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516130d5816017850160208801612a56565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613106816028840160208801612a56565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261313757613137613112565b500490565b60008261314b5761314b613112565b500690565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006131f26040830185612df2565b82810360208401526132048185612df2565b95945050505050565b600081600019048311821515161561322757613227612f84565b500290565b60008161323b5761323b612f84565b506000190190565b6001600160a01b0386811682528516602082015260a06040820181905260009061326f90830186612df2565b82810360608401526132818186612df2565b905082810360808401526132958185612a86565b98975050505050505050565b6000602082840312156132b357600080fd5b81516122eb81612908565b600060033d11156132d75760046000803e5060005160e01c5b90565b600060443d10156132e85790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561331757505050505090565b828501915081518181111561332f5750505050505090565b843d87010160208285010111156133495750505050505090565b61335860208286010187612951565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906133e590830184612a86565b97965050505050505056fe828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882fa2646970667358221220a3198721e8bf099c09b9977ccf831a0229dec887e9473a970b5d388beae103cf64736f6c634300080c0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.