Token
Linea Voyage (VOYAGE)
ERC-1155
Overview
Max Total Supply
0 VOYAGE
Holders
469,371
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
LineaVoyage
Compiler Version
v0.8.16+commit.07a7930e
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.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import { OperatorFilterer } from "../third-party/vectorized-closedsea/OperatorFilterer.sol"; import "../platform/nft/common/Helper.sol"; import "../mint-voucher/MintVoucher.sol"; /** * @title Linea Voyage NFT */ contract LineaVoyage is ERC1155, ERC2981, CommonAccess, MintVoucherContract, OperatorFilterer { using SafeERC20 for IERC20; // errors error NotAuthotized(); // events event ContractURIUpdated(string prevURI, string newURI); event PermanentURI(string _value, uint256 indexed _id); event MaxSupplyUpdated(uint128 oldMaxSupply, uint128 newMaxSupply); event TokenMaxSupplyUpdated(uint256 indexed tokenId, uint128 oldMaxSupply, uint128 newMaxSupply); // constants & immutables bool public constant operatorFilteringEnabled = true; uint256 public constant maxSupply = 5; string public constant name = "Linea Voyage"; string public constant symbol = "VOYAGE"; bool public immutable isOriginChain; string public contractURI; uint128 public currentSupply; // bridge configuration -- disabled by default struct BridgeConfig { address bridgeAddress; bool mintEnabled; bool burnEnabled; } BridgeConfig public bridgeConfig; // per-token details struct TokenDetails { uint128 tokenMaxSupply; uint128 tokenCurrentSupply; string uri; } mapping(uint256 => TokenDetails) public tokenDetails; modifier onlyOriginChain() { if (!isOriginChain) { revert NotAuthotized(); } _; } constructor( address signer, address owner_, string memory baseContractURI_, uint256 originChainId_ ) MintVoucherContract(signer) ERC1155("") CommonAccess(owner_) { contractURI = CommonFunction._defaultContractURI(baseContractURI_); _registerForOperatorFiltering(); isOriginChain = block.chainid == originChainId_; } /********************************************************************************************************** EXTERNAL **********************************************************************************************************/ /** * @dev Create an ERC1155 token with a max supply * @dev The contract owner can mint tokens on demand up to the max supply */ function createForAdminMint( uint256 tokenId_, uint256 tokenInitialSupply_, uint256 tokenMaxSupply_, string memory uri_ ) external adminOrOwnerOnly { if (currentSupply + 1 > maxSupply) { revert CommonError.ValueExceedsMaxSupply(); } if (tokenMaxSupply_ == 0) { revert CommonError.ValueCannotBeZero(); } if (isCreated(tokenId_)) { revert CommonError.TokenAlreadyExists(); } if (tokenInitialSupply_ > tokenMaxSupply_) { revert CommonError.ValueExceedsMaxSupply(); } tokenDetails[tokenId_].uri = uri_; emit PermanentURI(uri_, tokenId_); currentSupply++; tokenDetails[tokenId_].tokenMaxSupply = uint128(tokenMaxSupply_); if (tokenInitialSupply_ > 0) { tokenDetails[tokenId_].tokenCurrentSupply += uint128(tokenInitialSupply_); _mint(msg.sender, tokenId_, tokenInitialSupply_, hex""); } } /** * @dev Mint an NFT with a valid MintVoucher and signature * @param voucher The MintVoucher that contains the specific mint details * @param signature The signature that must originate from an authorized signer */ function mintWithVoucher(MintVoucher calldata voucher, bytes calldata signature) external payable onlyOriginChain { if ( tokenDetails[voucher.tokenId].tokenCurrentSupply + voucher.quantity > tokenDetails[voucher.tokenId].tokenMaxSupply ) { revert CommonError.ValueExceedsMaxSupply(); } tokenDetails[voucher.tokenId].tokenCurrentSupply += uint128(voucher.quantity); _mintWithVoucher(voucher, signature); } /** * @dev Mint an NFT with amount by an admin or contract owner * @param to The address to send the NFT tokens to * @param tokenId The ID of the NFT token * @param amount The amount of NFT tokens to mint */ function adminMint(address to, uint256 tokenId, uint256 amount) external adminOrOwnerOnly onlyOriginChain { if (tokenDetails[tokenId].tokenCurrentSupply + amount > tokenDetails[tokenId].tokenMaxSupply) { revert CommonError.ValueExceedsMaxSupply(); } tokenDetails[tokenId].tokenCurrentSupply += uint128(amount); _mint(to, tokenId, amount, hex""); } function setDefaultRoyalty(address receiver, uint96 feeNumerator) external adminOrOwnerOnly { _setDefaultRoyalty(receiver, feeNumerator); } function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) external adminOrOwnerOnly { _setTokenRoyalty(tokenId, receiver, feeNumerator); } function resetTokenRoyalty(uint256 tokenId) external adminOrOwnerOnly { _resetTokenRoyalty(tokenId); } function setContractURI(string memory contractURI_) external adminOrOwnerOnly { emit ContractURIUpdated(contractURI, contractURI_); contractURI = contractURI_; } function setBridgeAddress(address bridgeAddress) external adminOrOwnerOnly { bridgeConfig.bridgeAddress = bridgeAddress; } function setBridgeFlags(bool mintEnabled, bool burnEnabled) external adminOrOwnerOnly { bridgeConfig.mintEnabled = mintEnabled; bridgeConfig.burnEnabled = burnEnabled; } /********************************************************************************************************** PUBLIC **********************************************************************************************************/ /** * @dev Burn an amount of NFTs by the owner or an address approved by the owner * @param account The address of the account owner to burn tokens from * @param tokenId The ID of the NFT token to burn * @param amount The amount of NFT tokens to burn */ function burn(address account, uint256 tokenId, uint128 amount) public { if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { revert CommonError.NotApprovedNorOwner(); } tokenDetails[tokenId].tokenCurrentSupply -= amount; _burn(account, tokenId, amount); } /** * @dev Set max supply for a token ID * @param tokenId the ID of the NFT token * @param tokenMaxSupply_ The max supply of the NFT token */ function setMaxSupplyPerToken(uint256 tokenId, uint128 tokenMaxSupply_) public adminOrOwnerOnly { if (!isCreated(tokenId)) { revert CommonError.TokenNonExistent(); } if (tokenMaxSupply_ > tokenDetails[tokenId].tokenMaxSupply) { revert CommonError.CannotIncreaseMaxSupply(); } if (tokenMaxSupply_ == tokenDetails[tokenId].tokenMaxSupply) { return; } if (tokenMaxSupply_ < tokenDetails[tokenId].tokenCurrentSupply) { revert CommonError.ValueBelowCurrentSupply(); } emit TokenMaxSupplyUpdated(tokenId, tokenDetails[tokenId].tokenMaxSupply, tokenMaxSupply_); tokenDetails[tokenId].tokenMaxSupply = tokenMaxSupply_; } function uri(uint256 tokenId) public view override returns (string memory) { if (!isCreated(tokenId)) { revert CommonError.TokenNonExistent(); } return tokenDetails[tokenId].uri; } function isCreated(uint256 tokenId) public view returns (bool) { return tokenDetails[tokenId].tokenMaxSupply != 0; } function supportsInterface( bytes4 interfaceId ) public view override(AccessControl, ERC1155, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, amount, data); } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public override onlyAllowedOperator(from) { super.safeBatchTransferFrom(from, to, ids, amounts, data); } modifier onlyBridgeContract() { if (bridgeConfig.bridgeAddress != _msgSender()) { revert NotAuthotized(); } _; } function zkBridgeMint( address to, uint256 tokenId, uint256 amount, string calldata _uri ) external onlyBridgeContract { if (!bridgeConfig.mintEnabled) { revert NotAuthotized(); } if (tokenDetails[tokenId].tokenCurrentSupply + amount > tokenDetails[tokenId].tokenMaxSupply) { revert CommonError.ValueExceedsMaxSupply(); } tokenDetails[tokenId].tokenCurrentSupply += uint128(amount); _mint(to, tokenId, amount, hex""); } function zkBridgeBurn(address account, uint256 tokenId, uint256 amount) external onlyBridgeContract { if (!bridgeConfig.burnEnabled) { revert NotAuthotized(); } burn(account, tokenId, uint128(amount)); } /********************************************************************************************************** INTERNAL **********************************************************************************************************/ /** * @dev Caller inside _mintWithVoucher function * @param to The address to send the NFT token to * @param voucher The MintVoucher that contains the specific mint details */ function _handleMint(address to, MintVoucher calldata voucher) internal override { _mint(to, voucher.tokenId, voucher.quantity, hex""); } function _isPriorityOperator(address operator) internal pure override returns (bool) { return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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: address zero is not a valid owner"); 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 token owner or 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: caller is not token owner or 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(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, 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); _afterTokenTransfer(operator, from, to, ids, amounts, data); _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); _afterTokenTransfer(operator, from, to, ids, amounts, data); _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(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * 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 _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); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * 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(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); 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); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * 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); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "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 `ids` and `amounts` 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 {} /** * @dev Hook that is called after 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 _afterTokenTransfer( 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 (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; /** * @notice Optimized and flexible operator filterer to abide to OpenSea's * mandatory on-chain royalty enforcement in order for new collections to * receive royalties. * For more information, see: * See: https://github.com/ProjectOpenSea/operator-filter-registry * Author: https://github.com/Vectorized/closedsea/blob/main/src/OperatorFilterer.sol * * Add `onlyAllowedOperator` modifier to the transferFrom() and both safeTransferFrom() * Add `onlyAllowedOperatorApproval` modifier to approve() and setApprovalForAll() */ abstract contract OperatorFilterer { /// @dev The default OpenSea operator blocklist subscription. address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; /// @dev The OpenSea operator filter registry. address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E; /// @dev Registers the current contract to OpenSea's operator filter, /// and subscribe to the default OpenSea operator blocklist. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering() internal virtual { _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true); } /// @dev Registers the current contract to OpenSea's operator filter. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe) internal virtual { /// @solidity memory-safe-assembly assembly { let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`. // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty. subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy)) for {} iszero(subscribe) {} { if iszero(subscriptionOrRegistrantToCopy) { functionSelector := 0x4420e486 // `register(address)`. break } functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`. break } // Store the function selector. mstore(0x00, shl(224, functionSelector)) // Store the `address(this)`. mstore(0x04, address()) // Store the `subscriptionOrRegistrantToCopy`. mstore(0x24, subscriptionOrRegistrantToCopy) // Register into the registry. if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) { // If the function selector has not been overwritten, // it is an out-of-gas error. if eq(shr(224, mload(0x00)), functionSelector) { // To prevent gas under-estimation. revert(0, 0) } } // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, because of Solidity's memory size limits. mstore(0x24, 0) } } /// @dev Modifier to guard a function and revert if the caller is a blocked operator. modifier onlyAllowedOperator(address from) virtual { if (from != msg.sender) { if (!_isPriorityOperator(msg.sender)) { if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender); } } _; } /// @dev Modifier to guard a function from approving a blocked operator.. modifier onlyAllowedOperatorApproval(address operator) virtual { if (!_isPriorityOperator(operator)) { if (_operatorFilteringEnabled()) _revertIfBlocked(operator); } _; } /// @dev Helper function that reverts if the `operator` is blocked by the registry. function _revertIfBlocked(address operator) private view { /// @solidity memory-safe-assembly assembly { // Store the function selector of `isOperatorAllowed(address,address)`, // shifted left by 6 bytes, which is enough for 8tb of memory. // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL). mstore(0x00, 0xc6171134001122334455) // Store the `address(this)`. mstore(0x1a, address()) // Store the `operator`. mstore(0x3a, operator) // `isOperatorAllowed` always returns true if it does not revert. if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) { // Bubble up the revert if the staticcall reverts. returndatacopy(0x00, 0x00, returndatasize()) revert(0x00, returndatasize()) } // We'll skip checking if `from` is inside the blacklist. // Even though that can block transferring out of wrapper contracts, // we don't want tokens to be stuck. // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, if less than 8tb of memory is used. mstore(0x3a, 0) } } /// @dev For deriving contracts to override, so that operator filtering /// can be turned on / off. /// Returns true by default. function _operatorFilteringEnabled() internal view virtual returns (bool) { return true; } /// @dev For deriving contracts to override, so that preferred marketplaces can /// skip operator filtering, helping users save gas. /// Returns false for all inputs by default. function _isPriorityOperator(address) internal view virtual returns (bool) { return false; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable2Step.sol"; library CommonFunction { function _defaultContractURI(string memory baseContractURI_) internal view returns (string memory) { return bytes(baseContractURI_).length > 0 ? string(abi.encodePacked(baseContractURI_, Strings.toHexString(uint256(uint160(address(this))), 20))) : ""; } } library CommonError { error CannotBeZeroAddress(); error CannotIncreaseMaxSupply(); error CannotUpdatePermanentURI(); error NotApprovedNorOwner(); error ValueCannotBeZero(); error ValueExceedsMaxSupply(); error ValueBelowCurrentSupply(); error InsufficientPayment(); error InvalidPaymentAmount(); error InvalidVoucher(); error TokenAlreadyExists(); error TokenNonExistent(); error TransferNotAllowed(); } contract CommonAccess is AccessControl, Ownable2Step { constructor(address owner_) { _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); if (owner_ != address(0)) _transferOwnership(owner_); } /** * @dev adminOrOwnerOnly checks if msg.sender is either has an admin role or is owner the contract */ modifier adminOrOwnerOnly() { if (owner() != _msgSender()) { _checkRole(DEFAULT_ADMIN_ROLE); } _; } function grantAdminRole(address account) external onlyOwner { _grantRole(DEFAULT_ADMIN_ROLE, account); } function revokeAdminRole(address account) external onlyOwner { _revokeRole(DEFAULT_ADMIN_ROLE, account); } } contract CommonSoulBound { bool private immutable _SOULBOUND; event SoulBoundToken(); /** * @param soulBound_ Setting a collection as non-transferable (ie, Soul Bound Token) * @dev if setting to non-transferable, contract emits SoulBoundToken() event */ constructor(bool soulBound_) { _SOULBOUND = soulBound_; if (_SOULBOUND) emit SoulBoundToken(); } /** * @dev isTransferAllowed checks if SOULBOUND setting is enable, if yes, diable all transferability of tokens. */ modifier isTransferAllowed() { if (_SOULBOUND) revert CommonError.TransferNotAllowed(); _; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./MintVoucherVerification.sol"; abstract contract MintVoucherContract is MintVoucherVerification { using SafeERC20 for IERC20; /** * @param signer An address that will sign the vouchers. The signing address * will be recovered from the signature and verified to match * this signer. */ constructor(address signer) MintVoucherVerification(signer) {} /********************************************************************************************************** EXTERNAL **********************************************************************************************************/ /** * @dev Cancel a voucher by providing the voucher nonce * @dev This will make all vouchers with an equal or lower nonce invalid * @param voucherNonce The nonce of the voucher that should be canceled */ function cancelVoucher(uint256 voucherNonce) external { updateLastNonce(_msgSender(), voucherNonce); emit VoucherCancelled(_msgSender(), voucherNonce); } /********************************************************************************************************** INTERNAL **********************************************************************************************************/ /** * @dev Mint an NFT with a valid MintVoucher and signature * @param voucher The MintVoucher that contains the specific mint details * @param signature The signature that must originate from an authorized signer */ function _mintWithVoucher(MintVoucher calldata voucher, bytes calldata signature) internal virtual { // cannot use an expired voucher if (voucher.expiry < block.timestamp) { revert VoucherIsExpired(); } verifySignature( voucher.netRecipient, voucher.initialRecipient, voucher.initialRecipientAmount, voucher.quantity, voucher.nonce, voucher.expiry, voucher.price, // 721A token id=0, auto incremented by that smart contract voucher.tokenId, voucher.currency, signature ); // This is how we prevent replay by tracking the nonce updateLastNonce(_msgSender(), voucher.nonce); if (voucher.currency == address(0)) { _handleEthPayment(voucher); } else { _handleERC20Payment(voucher); } _handleMint(_msgSender(), voucher); emit VoucherRedeemed(signature); } /** * @dev Caller inside _mintWithVoucher function * @param to The address to send the NFT token to * @param voucher The MintVoucher that contains the specific mint details */ function _handleMint(address to, MintVoucher calldata voucher) internal virtual; /** * @dev Handle ETH payments * @param voucher The MintVoucher that contains the specific mint details */ function _handleEthPayment(MintVoucher calldata voucher) internal { if ((voucher.price * voucher.quantity) > msg.value) { revert CommonError.InsufficientPayment(); } if (msg.value > 0) { // transfer funds to mutliple recipients, as needed if (voucher.initialRecipientAmount > msg.value) { revert CommonError.InvalidPaymentAmount(); } if (voucher.initialRecipientAmount > 0) { if (voucher.initialRecipient == address(0)) { revert CommonError.CannotBeZeroAddress(); } Address.sendValue(payable(voucher.initialRecipient), voucher.initialRecipientAmount); } if (msg.value > voucher.initialRecipientAmount) { if (voucher.netRecipient == address(0)) { revert CommonError.CannotBeZeroAddress(); } Address.sendValue(payable(voucher.netRecipient), msg.value - voucher.initialRecipientAmount); } } } /** * @dev Handle an ERC20 payments * @param voucher The MintVoucher that contains the specific mint details */ function _handleERC20Payment(MintVoucher calldata voucher) internal { if ((voucher.price * voucher.quantity) < 0) { revert CommonError.InvalidVoucher(); } if (voucher.initialRecipientAmount > (voucher.price * voucher.quantity)) { revert CommonError.InvalidPaymentAmount(); } if (voucher.initialRecipientAmount > 0) { if (voucher.initialRecipient == address(0)) { revert CommonError.CannotBeZeroAddress(); } IERC20(voucher.currency).safeTransferFrom( _msgSender(), voucher.initialRecipient, voucher.initialRecipientAmount ); } if ((voucher.price * voucher.quantity) > voucher.initialRecipientAmount) { if (voucher.netRecipient == address(0)) { revert CommonError.CannotBeZeroAddress(); } IERC20(voucher.currency).safeTransferFrom( _msgSender(), voucher.netRecipient, (voucher.price * voucher.quantity) - voucher.initialRecipientAmount ); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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 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 (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() external { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./MintVoucherCapability.sol"; import "../platform/nft/common/Helper.sol"; import "./MintVoucherErrors.sol"; /** * @title MintVoucherVerification * @notice MintVoucherVerification is intended to be used to * restrict minting via an off chain mint limiting server that issues vouchers. * This contract handles the validation of the voucher and signature. * @dev Non-voucher related validation logic such as checking availably supply and funds should * be implemented in the caller functions. */ abstract contract MintVoucherVerification is AccessControl, MintVoucherErrors, MintVoucherCapability { // Save on gas by caching address(this) in an immutable variable address private immutable _CACHED_CONTRACT_ADDRESS; // The recovered signer must have this role bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); // Track nonce of each account to be able to mark vouchers as filled or canceled mapping(address => uint256) private lastNonce; /** * @dev The MintVoucher struct contains the specific mint details. This data * along with the contract address and the msg sender will be included in * the signed message. Some of these fields may not be used depending on * the situation. Currency should be zero address if payment is in native currency. * tokenId is necessary for ERC1155 implementations but for ERC721 it is up to * the implementation. */ struct MintVoucher { address netRecipient; address initialRecipient; uint256 initialRecipientAmount; uint256 quantity; uint256 nonce; uint256 expiry; uint256 price; uint256 tokenId; address currency; } /** * @param signer An address that will sign the vouchers. The signing address * will be recovered from the signature and verified to match * this signer. */ constructor(address signer) { _CACHED_CONTRACT_ADDRESS = address(this); _grantRole(SIGNER_ROLE, signer); } /** * @dev Recover signer from signature and mint voucher data. Validate the signer * has the required role. * @param netRecipient The address to transfer the net funds minus initial payout, if any * @param initialRecipient The address to transfer an initial payout * @param initialRecipientAmount The amount to send to initial recipient * @param quantity The quantity to mint * @param nonce The mint voucher nonce used for replay protection * @param expiry The mint voucher expiration * @param price The price per unit * @param tokenId The tokenId to mint * @param currency The currency for payment * @param signature The signature to validate */ function verifySignature( address netRecipient, address initialRecipient, uint256 initialRecipientAmount, uint256 quantity, uint256 nonce, uint256 expiry, uint256 price, uint256 tokenId, address currency, bytes calldata signature ) internal view { bytes32 digest = ECDSA.toEthSignedMessageHash( hash( netRecipient, initialRecipient, initialRecipientAmount, quantity, nonce, expiry, price, tokenId, currency ) ); address recoveredSigner = ECDSA.recover(digest, signature); if (!hasRole(SIGNER_ROLE, recoveredSigner)) { revert InvalidSignature(); } } /** * @dev Hash the mint voucher data, msg sender, and contract address. The lastNonce * needs to be updated with the voucher nonce prior to hashing. * @param netRecipient The address to transfer the net funds minus initial payout, if any * @param initialRecipient The address to transfer an initial payout * @param initialRecipientAmount The amount to send to initial recipient * @param quantity The quantity to mint * @param nonce The mint voucher nonce used for replay protection * @param expiry The mint voucher expiration * @param price The price per unit * @param tokenId The tokenId to mint * @param currency The currency for payment */ function hash( address netRecipient, address initialRecipient, uint256 initialRecipientAmount, uint256 quantity, uint256 nonce, uint256 expiry, uint256 price, uint256 tokenId, address currency ) internal view returns (bytes32) { return keccak256( abi.encode( netRecipient, initialRecipient, initialRecipientAmount, quantity, nonce, expiry, price, tokenId, currency, _msgSender(), _CACHED_CONTRACT_ADDRESS, block.chainid ) ); } /** * @dev Set the last nonce used for an account. Any oucher with a nonce below or * equal to this nonce is no invalid. * @param account The account to set the nonce for * @param nonce The new nonce */ function updateLastNonce(address account, uint256 nonce) internal { // Cannot decrease the last used nonce if (nonce <= getLastNonce(account)) { revert VoucherNonceTooLow(); } lastNonce[account] = nonce; } /** * @notice Get the last used nonce for an account. * @dev A valid voucher must have a nonce higher than this * @param account The account to get the nonce for */ function getLastNonce(address account) public view virtual returns (uint256) { return lastNonce[account]; } }
// 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 (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.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; /** * @dev This is the interface for the MintVoucherCapability */ interface MintVoucherCapability { event VoucherRedeemed(bytes signature); event VoucherCancelled(address minter, uint256 nonce); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.16; /** * @title MintVoucherErrors * @notice MintVoucherErrors contatins errors related to MintVoucher verification */ interface MintVoucherErrors { /** * @dev Revert with an error when attempting to mint with an invalid voucher. * This may be due to many reasons, including, but not limited to, an * attempting to mint a voucher signed by an unauthorized signer, * insufficient funds sent, attempting to mint more than allocated, and * attempting to mint a different buyer's voucher, */ error InvalidSignature(); /** * @dev Revert with an error when attempting to mint with an expired voucher. */ error VoucherIsExpired(); /** * @dev Revert with an error when attempting to mint a voucher that has * already been filled or canceled. */ error VoucherNonceTooLow(); }
{ "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "@float-capital/=node_modules/@float-capital/", "@gnosis.pm/=node_modules/@gnosis.pm/", "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc721a/=node_modules/erc721a/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/" ], "optimizer": { "enabled": true, "runs": 200, "details": { "constantOptimizer": true, "yul": true } }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"string","name":"baseContractURI_","type":"string"},{"internalType":"uint256","name":"originChainId_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CannotBeZeroAddress","type":"error"},{"inputs":[],"name":"CannotIncreaseMaxSupply","type":"error"},{"inputs":[],"name":"InsufficientPayment","type":"error"},{"inputs":[],"name":"InvalidPaymentAmount","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"InvalidVoucher","type":"error"},{"inputs":[],"name":"NotApprovedNorOwner","type":"error"},{"inputs":[],"name":"NotAuthotized","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TokenNonExistent","type":"error"},{"inputs":[],"name":"ValueBelowCurrentSupply","type":"error"},{"inputs":[],"name":"ValueCannotBeZero","type":"error"},{"inputs":[],"name":"ValueExceedsMaxSupply","type":"error"},{"inputs":[],"name":"VoucherIsExpired","type":"error"},{"inputs":[],"name":"VoucherNonceTooLow","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"prevURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"oldMaxSupply","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newMaxSupply","type":"uint128"}],"name":"MaxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"oldMaxSupply","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"newMaxSupply","type":"uint128"}],"name":"TokenMaxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"VoucherCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"}],"name":"VoucherRedeemed","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","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":"bridgeConfig","outputs":[{"internalType":"address","name":"bridgeAddress","type":"address"},{"internalType":"bool","name":"mintEnabled","type":"bool"},{"internalType":"bool","name":"burnEnabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"voucherNonce","type":"uint256"}],"name":"cancelVoucher","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"uint256","name":"tokenInitialSupply_","type":"uint256"},{"internalType":"uint256","name":"tokenMaxSupply_","type":"uint256"},{"internalType":"string","name":"uri_","type":"string"}],"name":"createForAdminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentSupply","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getLastNonce","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":"account","type":"address"}],"name":"grantAdminRole","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isCreated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOriginChain","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"netRecipient","type":"address"},{"internalType":"address","name":"initialRecipient","type":"address"},{"internalType":"uint256","name":"initialRecipientAmount","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct MintVoucherVerification.MintVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintWithVoucher","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeAddress","type":"address"}],"name":"setBridgeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"mintEnabled","type":"bool"},{"internalType":"bool","name":"burnEnabled","type":"bool"}],"name":"setBridgeFlags","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint128","name":"tokenMaxSupply_","type":"uint128"}],"name":"setMaxSupplyPerToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenDetails","outputs":[{"internalType":"uint128","name":"tokenMaxSupply","type":"uint128"},{"internalType":"uint128","name":"tokenCurrentSupply","type":"uint128"},{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"zkBridgeBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"zkBridgeMint","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b5060405162004e7438038062004e74833981016040819052620000349162000556565b838084604051806020016040528060008152506200005881620000fe60201b60201c565b50620000643362000110565b620000716000336200013a565b6001600160a01b038116156200008c576200008c8162000110565b5030608052620000bd7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f70826200013a565b5050620000d582620001de60201b62001ab71760201c565b600990620000e49082620006cb565b50620000ef6200024b565b461460a0525062000848915050565b60026200010c8282620006cb565b5050565b600780546001600160a01b031916905562000137816200026e602090811b62001b0917901c565b50565b60008281526005602090815260408083206001600160a01b038516845290915290205460ff166200010c5760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200019a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6060600082511162000200576040518060200160405280600081525062000245565b8162000222306001600160a01b03166014620002c060201b62001b5b1760201c565b6040516020016200023592919062000797565b6040516020818303038152906040525b92915050565b6200026c733cc6cdda760b79bafa08df41ecfa224f810dceb6600162000483565b565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000620002d1836002620007e0565b620002de90600262000802565b6001600160401b03811115620002f857620002f86200051a565b6040519080825280601f01601f19166020018201604052801562000323576020820181803683370190505b509050600360fc1b8160008151811062000341576200034162000818565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000373576200037362000818565b60200101906001600160f81b031916908160001a905350600062000399846002620007e0565b620003a690600162000802565b90505b600181111562000428576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110620003de57620003de62000818565b1a60f81b828281518110620003f757620003f762000818565b60200101906001600160f81b031916908160001a90535060049490941c9362000420816200082e565b9050620003a9565b5083156200047c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640160405180910390fd5b9392505050565b6001600160a01b0390911690637d3e3dbe81620004b35782620004ac5750634420e486620004b3565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af1620004f3578060005160e01c03620004f357600080fd5b5060006024525050565b80516001600160a01b03811681146200051557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200054d57818101518382015260200162000533565b50506000910152565b600080600080608085870312156200056d57600080fd5b6200057885620004fd565b93506200058860208601620004fd565b60408601519093506001600160401b0380821115620005a657600080fd5b818701915087601f830112620005bb57600080fd5b815181811115620005d057620005d06200051a565b604051601f8201601f19908116603f01168101908382118183101715620005fb57620005fb6200051a565b816040528281528a60208487010111156200061557600080fd5b6200062883602083016020880162000530565b60609990990151979a969950505050505050565b600181811c908216806200065157607f821691505b6020821081036200067257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006c657600081815260208120601f850160051c81016020861015620006a15750805b601f850160051c820191505b81811015620006c257828155600101620006ad565b5050505b505050565b81516001600160401b03811115620006e757620006e76200051a565b620006ff81620006f884546200063c565b8462000678565b602080601f8311600181146200073757600084156200071e5750858301515b600019600386901b1c1916600185901b178555620006c2565b600085815260208120601f198616915b82811015620007685788860151825594840194600190910190840162000747565b5085821015620007875787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008351620007ab81846020880162000530565b835190830190620007c181836020880162000530565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615620007fd57620007fd620007ca565b500290565b80820180821115620002455762000245620007ca565b634e487b7160e01b600052603260045260246000fd5b600081620008405762000840620007ca565b506000190190565b60805160a0516145f86200087c60003960008181610808015281816109f001526116f501526000612a0e01526145f86000f3fe6080604052600436106102915760003560e01c80638a616bc01161015a578063c634b78e116100c1578063e8a3d4851161007a578063e8a3d485146108f0578063e985e9c514610905578063f242432a1461094e578063f2fde38b1461096e578063fb796e6c1461098e578063fc314e31146109a357600080fd5b8063c634b78e1461084a578063d4dfd6bc1461086a578063d547741f1461087d578063d5abeb011461089d578063df6ca72b146108b2578063e30c3978146108d257600080fd5b8063a1ebf35d11610113578063a1ebf35d14610757578063a217fddf1461078b578063a22cb465146107a0578063b009fdd5146107c0578063b61e1014146107f6578063bed3ac501461082a57600080fd5b80638a616bc0146106735780638da5cb5b1461069357806391d14854146106c5578063938e3d7b146106e557806395d89b41146107055780639a19c7b01461073757600080fd5b80632a55205a116101fe5780635944c753116101b75780635944c753146105b1578063715018a6146105d1578063771282f6146105e657806377359c881461061e57806379ba50971461063e5780637f5a22f91461065357600080fd5b80632a55205a146104c55780632eb2c2d6146105045780632f2ff15d1461052457806336568abe146105445780634e1273f4146105645780635017bff71461059157600080fd5b80630c63bded116102505780630c63bded146103a05780630e89341c146103c05780631330191e146103e0578063235e519914610400578063248a9ca31461045d57806329a8791a1461048d57600080fd5b80624a84cb14610296578062fdd58e146102b857806301ffc9a7146102eb57806303a2f1e11461031b57806304634d8d1461033b57806306fdde031461035b575b600080fd5b3480156102a257600080fd5b506102b66102b136600461368d565b6109d2565b005b3480156102c457600080fd5b506102d86102d33660046136c0565b610aee565b6040519081526020015b60405180910390f35b3480156102f757600080fd5b5061030b610306366004613700565b610b87565b60405190151581526020016102e2565b34801561032757600080fd5b506102b661033636600461368d565b610b92565b34801561034757600080fd5b506102b6610356366004613734565b610bf2565b34801561036757600080fd5b506103936040518060400160405280600c81526020016b4c696e656120566f7961676560a01b81525081565b6040516102e291906137b7565b3480156103ac57600080fd5b506102b66103bb36600461387f565b610c1c565b3480156103cc57600080fd5b506103936103db3660046138d8565b610e1f565b3480156103ec57600080fd5b506102b66103fb366004613908565b610ef8565b34801561040c57600080fd5b50600b54610436906001600160a01b0381169060ff600160a01b8204811691600160a81b90041683565b604080516001600160a01b03909416845291151560208401521515908201526060016102e2565b34801561046957600080fd5b506102d86104783660046138d8565b60009081526005602052604090206001015490565b34801561049957600080fd5b5061030b6104a83660046138d8565b6000908152600c60205260409020546001600160801b0316151590565b3480156104d157600080fd5b506104e56104e036600461392b565b61106f565b604080516001600160a01b0390931683526020830191909152016102e2565b34801561051057600080fd5b506102b661051f3660046139e1565b61111d565b34801561053057600080fd5b506102b661053f366004613a8a565b611167565b34801561055057600080fd5b506102b661055f366004613a8a565b61118c565b34801561057057600080fd5b5061058461057f366004613aad565b611206565b6040516102e29190613bb2565b34801561059d57600080fd5b506102b66105ac366004613bd3565b61132f565b3480156105bd57600080fd5b506102b66105cc366004613c0c565b61137f565b3480156105dd57600080fd5b506102b66113a6565b3480156105f257600080fd5b50600a54610606906001600160801b031681565b6040516001600160801b0390911681526020016102e2565b34801561062a57600080fd5b506102b6610639366004613c89565b6113ba565b34801561064a57600080fd5b506102b66114d3565b34801561065f57600080fd5b506102b661066e366004613cf0565b61154d565b34801561067f57600080fd5b506102b661068e3660046138d8565b61158b565b34801561069f57600080fd5b506006546001600160a01b03165b6040516001600160a01b0390911681526020016102e2565b3480156106d157600080fd5b5061030b6106e0366004613a8a565b6115b8565b3480156106f157600080fd5b506102b6610700366004613d0b565b6115e3565b34801561071157600080fd5b5061039360405180604001604052806006815260200165564f5941474560d01b81525081565b34801561074357600080fd5b506102b6610752366004613cf0565b611645565b34801561076357600080fd5b506102d87fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561079757600080fd5b506102d8600081565b3480156107ac57600080fd5b506102b66107bb366004613d3f565b611658565b3480156107cc57600080fd5b506102d86107db366004613cf0565b6001600160a01b031660009081526008602052604090205490565b34801561080257600080fd5b5061030b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561083657600080fd5b506102b66108453660046138d8565b611690565b34801561085657600080fd5b506102b6610865366004613cf0565b6116e0565b6102b6610878366004613d5b565b6116f3565b34801561088957600080fd5b506102b6610898366004613a8a565b6117f0565b3480156108a957600080fd5b506102d8600581565b3480156108be57600080fd5b506102b66108cd366004613db7565b611815565b3480156108de57600080fd5b506007546001600160a01b03166106ad565b3480156108fc57600080fd5b506103936118bc565b34801561091157600080fd5b5061030b610920366004613dea565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561095a57600080fd5b506102b6610969366004613e14565b61194a565b34801561097a57600080fd5b506102b6610989366004613cf0565b61198c565b34801561099a57600080fd5b5061030b600181565b3480156109af57600080fd5b506109c36109be3660046138d8565b6119fd565b6040516102e293929190613e78565b6006546001600160a01b031633146109ee576109ee6000611cfd565b7f0000000000000000000000000000000000000000000000000000000000000000610a2c5760405163649726c360e01b815260040160405180910390fd5b6000828152600c60205260409020546001600160801b0380821691610a5a918491600160801b900416613ec3565b1115610a795760405163b4632d5160e01b815260040160405180910390fd5b6000828152600c602052604090208054829190601090610aaa908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610ae983838360405180602001604052806000815250611d07565b505050565b60006001600160a01b038316610b5e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610b8182611e1b565b600b546001600160a01b03163314610bbd5760405163649726c360e01b815260040160405180910390fd5b600b54600160a81b900460ff16610be75760405163649726c360e01b815260040160405180910390fd5b610ae9838383611815565b6006546001600160a01b03163314610c0e57610c0e6000611cfd565b610c188282611e40565b5050565b6006546001600160a01b03163314610c3857610c386000611cfd565b600a54600590610c52906001600160801b03166001613ed6565b6001600160801b03161115610c7a5760405163b4632d5160e01b815260040160405180910390fd5b81600003610c9b576040516363868c5560e11b815260040160405180910390fd5b6000848152600c60205260409020546001600160801b031615610cd15760405163c991cbb160e01b815260040160405180910390fd5b81831115610cf25760405163b4632d5160e01b815260040160405180910390fd5b6000848152600c60205260409020600101610d0d8282613f7d565b50837fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b5565720782604051610d3e91906137b7565b60405180910390a2600a80546001600160801b0316906000610d5f8361403c565b82546101009290920a6001600160801b038181021990931691831602179091556000868152600c6020526040902080546001600160801b031916918516919091179055508215610e19576000848152600c602052604090208054849190601090610dda908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610e1933858560405180602001604052806000815250611d07565b50505050565b6000818152600c60205260409020546060906001600160801b0316610e57576040516374fc75bf60e01b815260040160405180910390fd5b6000828152600c602052604090206001018054610e7390613efd565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9f90613efd565b8015610eec5780601f10610ec157610100808354040283529160200191610eec565b820191906000526020600020905b815481529060010190602001808311610ecf57829003601f168201915b50505050509050919050565b6006546001600160a01b03163314610f1457610f146000611cfd565b6000828152600c60205260409020546001600160801b0316610f49576040516374fc75bf60e01b815260040160405180910390fd5b6000828152600c60205260409020546001600160801b039081169082161115610f855760405163c4469e5b60e01b815260040160405180910390fd5b6000828152600c60205260409020546001600160801b03828116911614610c18576000828152600c60205260409020546001600160801b03600160801b90910481169082161015610fe95760405163e9519eaf60e01b815260040160405180910390fd5b6000828152600c60209081526040918290205482516001600160801b0391821681529084169181019190915283917f2e05c2de5e3dbef951011de2529a091be29cafaf255379a253721b4b637a28db910160405180910390a26000828152600c6020526040902080546001600160801b0383166001600160801b03199091161790555050565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916110e45750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611103906001600160601b031687614062565b61110d9190614081565b91519350909150505b9250929050565b846001600160a01b038116331461115257731e0049783f008a0085193e00003d00cd54003c7133146111525761115233611efa565b61115f8686868686611f3e565b505050505050565b60008281526005602052604090206001015461118281611cfd565b610ae98383611f83565b6001600160a01b03811633146111fc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b55565b610c188282612009565b6060815183511461126b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610b55565b600083516001600160401b03811115611286576112866137ca565b6040519080825280602002602001820160405280156112af578160200160208202803683370190505b50905060005b8451811015611327576112fa8582815181106112d3576112d36140a3565b60200260200101518583815181106112ed576112ed6140a3565b6020026020010151610aee565b82828151811061130c5761130c6140a3565b6020908102919091010152611320816140b9565b90506112b5565b509392505050565b6006546001600160a01b0316331461134b5761134b6000611cfd565b600b805461ffff60a01b1916600160a01b9315159390930260ff60a81b191692909217600160a81b91151591909102179055565b6006546001600160a01b0316331461139b5761139b6000611cfd565b610ae9838383612070565b6113ae61213b565b6113b86000612195565b565b600b546001600160a01b031633146113e55760405163649726c360e01b815260040160405180910390fd5b600b54600160a01b900460ff1661140f5760405163649726c360e01b815260040160405180910390fd5b6000848152600c60205260409020546001600160801b038082169161143d918691600160801b900416613ec3565b111561145c5760405163b4632d5160e01b815260040160405180910390fd5b6000848152600c60205260409020805484919060109061148d908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506114cc85858560405180602001604052806000815250611d07565b5050505050565b60075433906001600160a01b031681146115415760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610b55565b61154a81612195565b50565b6006546001600160a01b03163314611569576115696000611cfd565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031633146115a7576115a76000611cfd565b600090815260046020526040812055565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6006546001600160a01b031633146115ff576115ff6000611cfd565b7fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a166009826040516116319291906140d2565b60405180910390a16009610c188282613f7d565b61164d61213b565b61154a600082612009565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b038216146116865761168681611efa565b610ae983836121ae565b61169a33826121b9565b7f3df5d8f8ab64f627d3b9fb62a5f047e29b7f4c287c9ce1b095ab5465a28ab34c33604080516001600160a01b039092168252602082018490520160405180910390a150565b6116e861213b565b61154a600082611f83565b7f00000000000000000000000000000000000000000000000000000000000000006117315760405163649726c360e01b815260040160405180910390fd5b60e08301356000908152600c60205260409020546001600160801b038082169161176891606087013591600160801b900416613ec3565b11156117875760405163b4632d5160e01b815260040160405180910390fd5b60e08301356000908152600c602052604090208054606085013591906010906117c1908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610ae983838361220d565b60008281526005602052604090206001015461180b81611cfd565b610ae98383612009565b6001600160a01b038316331480159061183557506118338333610920565b155b15611853576040516378476ebb60e01b815260040160405180910390fd5b6000828152600c602052604090208054829190601090611884908490600160801b90046001600160801b0316614168565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610ae98383836001600160801b0316612318565b600980546118c990613efd565b80601f01602080910402602001604051908101604052809291908181526020018280546118f590613efd565b80156119425780601f1061191757610100808354040283529160200191611942565b820191906000526020600020905b81548152906001019060200180831161192557829003601f168201915b505050505081565b846001600160a01b038116331461197f57731e0049783f008a0085193e00003d00cd54003c71331461197f5761197f33611efa565b61115f8686868686612494565b61199461213b565b600780546001600160a01b0383166001600160a01b031990911681179091556119c56006546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600c60205260009081526040902080546001820180546001600160801b0380841694600160801b90940416929190611a3490613efd565b80601f0160208091040260200160405190810160405280929190818152602001828054611a6090613efd565b8015611aad5780601f10611a8257610100808354040283529160200191611aad565b820191906000526020600020905b815481529060010190602001808311611a9057829003601f168201915b5050505050905083565b60606000825111611ad75760405180602001604052806000815250610b81565b81611ae3306014611b5b565b604051602001611af4929190614188565b60405160208183030381529060405292915050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000611b6a836002614062565b611b75906002613ec3565b6001600160401b03811115611b8c57611b8c6137ca565b6040519080825280601f01601f191660200182016040528015611bb6576020820181803683370190505b509050600360fc1b81600081518110611bd157611bd16140a3565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c0057611c006140a3565b60200101906001600160f81b031916908160001a9053506000611c24846002614062565b611c2f906001613ec3565b90505b6001811115611ca7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611c6357611c636140a3565b1a60f81b828281518110611c7957611c796140a3565b60200101906001600160f81b031916908160001a90535060049490941c93611ca0816141b7565b9050611c32565b508315611cf65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b55565b9392505050565b61154a81336124d9565b6001600160a01b038416611d675760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b55565b336000611d7385612532565b90506000611d8085612532565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290611db2908490613ec3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e128360008989898961257d565b50505050505050565b60006001600160e01b03198216637965db0b60e01b1480610b815750610b81826126d8565b6127106001600160601b0382161115611e6b5760405162461bcd60e51b8152600401610b55906141ce565b6001600160a01b038216611ec15760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b55565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa611f36573d6000803e3d6000fd5b6000603a5250565b6001600160a01b038516331480611f5a5750611f5a8533610920565b611f765760405162461bcd60e51b8152600401610b5590614218565b6114cc85858585856126fd565b611f8d82826115b8565b610c185760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611fc53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61201382826115b8565b15610c185760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6127106001600160601b038216111561209b5760405162461bcd60e51b8152600401610b55906141ce565b6001600160a01b0382166120f15760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610b55565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6006546001600160a01b031633146113b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b55565b600780546001600160a01b031916905561154a81611b09565b610c183383836128d2565b6001600160a01b03821660009081526008602052604090205481116121f1576040516313b42f4d60e31b815260040160405180910390fd5b6001600160a01b03909116600090815260086020526040902055565b428360a0013510156122325760405163455c7d6b60e11b815260040160405180910390fd5b6122896122426020850185613cf0565b6122526040860160208701613cf0565b60408601356060870135608088013560a089013560c08a013560e08b01356122826101208d016101008e01613cf0565b8b8b6129b2565b6122973384608001356121b9565b60006122ab61012085016101008601613cf0565b6001600160a01b0316036122c7576122c283612b3b565b6122d0565b6122d083612c5d565b6122da3384612ddc565b7fd787a81976c7ae74647fc73d6574ab6333e0d888828e3b934b2570a70b78384e828260405161230b929190614266565b60405180910390a1505050565b6001600160a01b03831661237a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610b55565b33600061238684612532565b9050600061239384612532565b60408051602080820183526000918290528882528181528282206001600160a01b038b168352905220549091508481101561241c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610b55565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611e12565b6001600160a01b0385163314806124b057506124b08533610920565b6124cc5760405162461bcd60e51b8152600401610b5590614218565b6114cc8585858585612dff565b6124e382826115b8565b610c18576124f081612f29565b6124fb836020611b5b565b60405160200161250c929190614295565b60408051601f198184030181529082905262461bcd60e51b8252610b55916004016137b7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061256c5761256c6140a3565b602090810291909101015292915050565b6001600160a01b0384163b1561115f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906125c1908990899088908890889060040161430a565b6020604051808303816000875af19250505080156125fc575060408051601f3d908101601f191682019092526125f991810190614344565b60015b6126a857612608614361565b806308c379a003612641575061261c61437d565b806126275750612643565b8060405162461bcd60e51b8152600401610b5591906137b7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610b55565b6001600160e01b0319811663f23a6e6160e01b14611e125760405162461bcd60e51b8152600401610b5590614406565b60006001600160e01b0319821663152a902d60e11b1480610b815750610b8182612f3f565b815183511461275f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610b55565b6001600160a01b0384166127855760405162461bcd60e51b8152600401610b559061444e565b3360005b845181101561286c5760008582815181106127a6576127a66140a3565b6020026020010151905060008583815181106127c4576127c46140a3565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156128145760405162461bcd60e51b8152600401610b5590614493565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612851908490613ec3565b9250508190555050505080612865906140b9565b9050612789565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516128bc9291906144dd565b60405180910390a461115f818787878787612f8f565b816001600160a01b0316836001600160a01b0316036129455760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610b55565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b604080516001600160a01b038d81166020808401919091528d821683850152606083018d9052608083018c905260a083018b905260c083018a905260e083018990526101008301889052868216610120840152336101408401527f00000000000000000000000000000000000000000000000000000000000000009091166101608301524661018080840191909152835180840390910181526101a0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006101c08401526101dc80840191909152835180840390910181526101fc90920190925280519101206000612ae38285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061304a92505050565b9050612b0f7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f70826115b8565b612b2c57604051638baa579f60e01b815260040160405180910390fd5b50505050505050505050505050565b34612b4e606083013560c0840135614062565b1115612b6d5760405163cd1c886760e01b815260040160405180910390fd5b341561154a573481604001351115612b9857604051637e2897ef60e11b815260040160405180910390fd5b604081013515612bf8576000612bb46040830160208401613cf0565b6001600160a01b031603612bdb57604051631e7d738760e21b815260040160405180910390fd5b612bf8612bee6040830160208401613cf0565b8260400135613066565b806040013534111561154a576000612c136020830183613cf0565b6001600160a01b031603612c3a57604051631e7d738760e21b815260040160405180910390fd5b61154a612c4a6020830183613cf0565b612c58604084013534614502565b613066565b6000612c71606083013560c0840135614062565b1015612c90576040516336b3edeb60e11b815260040160405180910390fd5b612ca2606082013560c0830135614062565b81604001351115612cc657604051637e2897ef60e11b815260040160405180910390fd5b604081013515612d45576000612ce26040830160208401613cf0565b6001600160a01b031603612d0957604051631e7d738760e21b815260040160405180910390fd5b612d4533612d1d6040840160208501613cf0565b6040840135612d3461012086016101008701613cf0565b6001600160a01b031692919061317f565b6040810135612d5c606083013560c0840135614062565b111561154a576000612d716020830183613cf0565b6001600160a01b031603612d9857604051631e7d738760e21b815260040160405180910390fd5b61154a33612da96020840184613cf0565b6040840135612dc0606086013560c0870135614062565b612dca9190614502565b612d3461012086016101008701613cf0565b610c18828260e00135836060013560405180602001604052806000815250611d07565b6001600160a01b038416612e255760405162461bcd60e51b8152600401610b559061444e565b336000612e3185612532565b90506000612e3e85612532565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015612e815760405162461bcd60e51b8152600401610b5590614493565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612ebe908490613ec3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f1e848a8a8a8a8a61257d565b505050505050505050565b6060610b816001600160a01b0383166014611b5b565b60006001600160e01b03198216636cdb3d1360e11b1480612f7057506001600160e01b031982166303a24d0760e21b145b80610b8157506301ffc9a760e01b6001600160e01b0319831614610b81565b6001600160a01b0384163b1561115f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612fd39089908990889088908890600401614515565b6020604051808303816000875af192505050801561300e575060408051601f3d908101601f1916820190925261300b91810190614344565b60015b61301a57612608614361565b6001600160e01b0319811663bc197c8160e01b14611e125760405162461bcd60e51b8152600401610b5590614406565b600080600061305985856131d9565b915091506113278161321b565b804710156130b65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b55565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613103576040519150601f19603f3d011682016040523d82523d6000602084013e613108565b606091505b5050905080610ae95760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b55565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e19908590613365565b600080825160410361320f5760208301516040840151606085015160001a61320387828585613437565b94509450505050611116565b50600090506002611116565b600081600481111561322f5761322f614573565b036132375750565b600181600481111561324b5761324b614573565b036132985760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b55565b60028160048111156132ac576132ac614573565b036132f95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b55565b600381600481111561330d5761330d614573565b0361154a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b55565b60006133ba826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134fb9092919063ffffffff16565b805190915015610ae957808060200190518101906133d89190614589565b610ae95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b55565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561346e57506000905060036134f2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156134c2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166134eb576000600192509250506134f2565b9150600090505b94509492505050565b606061350a8484600085613512565b949350505050565b6060824710156135735760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b55565b600080866001600160a01b0316858760405161358f91906145a6565b60006040518083038185875af1925050503d80600081146135cc576040519150601f19603f3d011682016040523d82523d6000602084013e6135d1565b606091505b50915091506135e2878383876135ed565b979650505050505050565b6060831561365c578251600003613655576001600160a01b0385163b6136555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b55565b508161350a565b61350a83838151156126275781518083602001fd5b80356001600160a01b038116811461368857600080fd5b919050565b6000806000606084860312156136a257600080fd5b6136ab84613671565b95602085013595506040909401359392505050565b600080604083850312156136d357600080fd5b6136dc83613671565b946020939093013593505050565b6001600160e01b03198116811461154a57600080fd5b60006020828403121561371257600080fd5b8135611cf6816136ea565b80356001600160601b038116811461368857600080fd5b6000806040838503121561374757600080fd5b61375083613671565b915061375e6020840161371d565b90509250929050565b60005b8381101561378257818101518382015260200161376a565b50506000910152565b600081518084526137a3816020860160208601613767565b601f01601f19169290920160200192915050565b602081526000611cf6602083018461378b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613805576138056137ca565b6040525050565b600082601f83011261381d57600080fd5b81356001600160401b03811115613836576138366137ca565b60405161384d601f8301601f1916602001826137e0565b81815284602083860101111561386257600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561389557600080fd5b84359350602085013592506040850135915060608501356001600160401b038111156138c057600080fd5b6138cc8782880161380c565b91505092959194509250565b6000602082840312156138ea57600080fd5b5035919050565b80356001600160801b038116811461368857600080fd5b6000806040838503121561391b57600080fd5b8235915061375e602084016138f1565b6000806040838503121561393e57600080fd5b50508035926020909101359150565b60006001600160401b03821115613966576139666137ca565b5060051b60200190565b600082601f83011261398157600080fd5b8135602061398e8261394d565b60405161399b82826137e0565b83815260059390931b85018201928281019150868411156139bb57600080fd5b8286015b848110156139d657803583529183019183016139bf565b509695505050505050565b600080600080600060a086880312156139f957600080fd5b613a0286613671565b9450613a1060208701613671565b935060408601356001600160401b0380821115613a2c57600080fd5b613a3889838a01613970565b94506060880135915080821115613a4e57600080fd5b613a5a89838a01613970565b93506080880135915080821115613a7057600080fd5b50613a7d8882890161380c565b9150509295509295909350565b60008060408385031215613a9d57600080fd5b8235915061375e60208401613671565b60008060408385031215613ac057600080fd5b82356001600160401b0380821115613ad757600080fd5b818501915085601f830112613aeb57600080fd5b81356020613af88261394d565b604051613b0582826137e0565b83815260059390931b8501820192828101915089841115613b2557600080fd5b948201945b83861015613b4a57613b3b86613671565b82529482019490820190613b2a565b96505086013592505080821115613b6057600080fd5b50613b6d85828601613970565b9150509250929050565b600081518084526020808501945080840160005b83811015613ba757815187529582019590820190600101613b8b565b509495945050505050565b602081526000611cf66020830184613b77565b801515811461154a57600080fd5b60008060408385031215613be657600080fd5b8235613bf181613bc5565b91506020830135613c0181613bc5565b809150509250929050565b600080600060608486031215613c2157600080fd5b83359250613c3160208501613671565b9150613c3f6040850161371d565b90509250925092565b60008083601f840112613c5a57600080fd5b5081356001600160401b03811115613c7157600080fd5b60208301915083602082850101111561111657600080fd5b600080600080600060808688031215613ca157600080fd5b613caa86613671565b9450602086013593506040860135925060608601356001600160401b03811115613cd357600080fd5b613cdf88828901613c48565b969995985093965092949392505050565b600060208284031215613d0257600080fd5b611cf682613671565b600060208284031215613d1d57600080fd5b81356001600160401b03811115613d3357600080fd5b61350a8482850161380c565b60008060408385031215613d5257600080fd5b613bf183613671565b6000806000838503610140811215613d7257600080fd5b61012080821215613d8257600080fd5b85945084013590506001600160401b03811115613d9e57600080fd5b613daa86828701613c48565b9497909650939450505050565b600080600060608486031215613dcc57600080fd5b613dd584613671565b925060208401359150613c3f604085016138f1565b60008060408385031215613dfd57600080fd5b613e0683613671565b915061375e60208401613671565b600080600080600060a08688031215613e2c57600080fd5b613e3586613671565b9450613e4360208701613671565b9350604086013592506060860135915060808601356001600160401b03811115613e6c57600080fd5b613a7d8882890161380c565b60006001600160801b03808616835280851660208401525060606040830152613ea4606083018461378b565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b8157610b81613ead565b6001600160801b03818116838216019080821115613ef657613ef6613ead565b5092915050565b600181811c90821680613f1157607f821691505b602082108103613f3157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610ae957600081815260208120601f850160051c81016020861015613f5e5750805b601f850160051c820191505b8181101561115f57828155600101613f6a565b81516001600160401b03811115613f9657613f966137ca565b613faa81613fa48454613efd565b84613f37565b602080601f831160018114613fdf5760008415613fc75750858301515b600019600386901b1c1916600185901b17855561115f565b600085815260208120601f198616915b8281101561400e57888601518255948401946001909101908401613fef565b508582101561402c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160801b0380831681810361405857614058613ead565b6001019392505050565b600081600019048311821515161561407c5761407c613ead565b500290565b60008261409e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016140cb576140cb613ead565b5060010190565b6040815260008084546140e481613efd565b8060408601526060600180841660008114614106576001811461412057614151565b60ff1985168884015283151560051b880183019550614151565b8960005260208060002060005b868110156141485781548b820187015290840190820161412d565b8a018501975050505b50505050508281036020840152613ea4818561378b565b6001600160801b03828116828216039080821115613ef657613ef6613ead565b6000835161419a818460208801613767565b8351908301906141ae818360208801613767565b01949350505050565b6000816141c6576141c6613ead565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516142cd816017850160208801613767565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516142fe816028840160208801613767565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906135e29083018461378b565b60006020828403121561435657600080fd5b8151611cf6816136ea565b600060033d111561437a5760046000803e5060005160e01c5b90565b600060443d101561438b5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156143ba57505050505090565b82850191508151818111156143d25750505050505090565b843d87010160208285010111156143ec5750505050505090565b6143fb602082860101876137e0565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006144f06040830185613b77565b8281036020840152613ea48185613b77565b81810381811115610b8157610b81613ead565b6001600160a01b0386811682528516602082015260a06040820181905260009061454190830186613b77565b82810360608401526145538186613b77565b90508281036080840152614567818561378b565b98975050505050505050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561459b57600080fd5b8151611cf681613bc5565b600082516145b8818460208701613767565b919091019291505056fea26469706673582212204cf685cbcd4b99d231f894957a0de061e5e2bf92a764ce8d82ce27e82ddc3cd364736f6c63430008100033000000000000000000000000c75c8bf9f6551bf367ae645be8040c598c18da4f0000000000000000000000004b227e2eb3f39d4ee23938c430821d80dc15a2d50000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000e7080000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102915760003560e01c80638a616bc01161015a578063c634b78e116100c1578063e8a3d4851161007a578063e8a3d485146108f0578063e985e9c514610905578063f242432a1461094e578063f2fde38b1461096e578063fb796e6c1461098e578063fc314e31146109a357600080fd5b8063c634b78e1461084a578063d4dfd6bc1461086a578063d547741f1461087d578063d5abeb011461089d578063df6ca72b146108b2578063e30c3978146108d257600080fd5b8063a1ebf35d11610113578063a1ebf35d14610757578063a217fddf1461078b578063a22cb465146107a0578063b009fdd5146107c0578063b61e1014146107f6578063bed3ac501461082a57600080fd5b80638a616bc0146106735780638da5cb5b1461069357806391d14854146106c5578063938e3d7b146106e557806395d89b41146107055780639a19c7b01461073757600080fd5b80632a55205a116101fe5780635944c753116101b75780635944c753146105b1578063715018a6146105d1578063771282f6146105e657806377359c881461061e57806379ba50971461063e5780637f5a22f91461065357600080fd5b80632a55205a146104c55780632eb2c2d6146105045780632f2ff15d1461052457806336568abe146105445780634e1273f4146105645780635017bff71461059157600080fd5b80630c63bded116102505780630c63bded146103a05780630e89341c146103c05780631330191e146103e0578063235e519914610400578063248a9ca31461045d57806329a8791a1461048d57600080fd5b80624a84cb14610296578062fdd58e146102b857806301ffc9a7146102eb57806303a2f1e11461031b57806304634d8d1461033b57806306fdde031461035b575b600080fd5b3480156102a257600080fd5b506102b66102b136600461368d565b6109d2565b005b3480156102c457600080fd5b506102d86102d33660046136c0565b610aee565b6040519081526020015b60405180910390f35b3480156102f757600080fd5b5061030b610306366004613700565b610b87565b60405190151581526020016102e2565b34801561032757600080fd5b506102b661033636600461368d565b610b92565b34801561034757600080fd5b506102b6610356366004613734565b610bf2565b34801561036757600080fd5b506103936040518060400160405280600c81526020016b4c696e656120566f7961676560a01b81525081565b6040516102e291906137b7565b3480156103ac57600080fd5b506102b66103bb36600461387f565b610c1c565b3480156103cc57600080fd5b506103936103db3660046138d8565b610e1f565b3480156103ec57600080fd5b506102b66103fb366004613908565b610ef8565b34801561040c57600080fd5b50600b54610436906001600160a01b0381169060ff600160a01b8204811691600160a81b90041683565b604080516001600160a01b03909416845291151560208401521515908201526060016102e2565b34801561046957600080fd5b506102d86104783660046138d8565b60009081526005602052604090206001015490565b34801561049957600080fd5b5061030b6104a83660046138d8565b6000908152600c60205260409020546001600160801b0316151590565b3480156104d157600080fd5b506104e56104e036600461392b565b61106f565b604080516001600160a01b0390931683526020830191909152016102e2565b34801561051057600080fd5b506102b661051f3660046139e1565b61111d565b34801561053057600080fd5b506102b661053f366004613a8a565b611167565b34801561055057600080fd5b506102b661055f366004613a8a565b61118c565b34801561057057600080fd5b5061058461057f366004613aad565b611206565b6040516102e29190613bb2565b34801561059d57600080fd5b506102b66105ac366004613bd3565b61132f565b3480156105bd57600080fd5b506102b66105cc366004613c0c565b61137f565b3480156105dd57600080fd5b506102b66113a6565b3480156105f257600080fd5b50600a54610606906001600160801b031681565b6040516001600160801b0390911681526020016102e2565b34801561062a57600080fd5b506102b6610639366004613c89565b6113ba565b34801561064a57600080fd5b506102b66114d3565b34801561065f57600080fd5b506102b661066e366004613cf0565b61154d565b34801561067f57600080fd5b506102b661068e3660046138d8565b61158b565b34801561069f57600080fd5b506006546001600160a01b03165b6040516001600160a01b0390911681526020016102e2565b3480156106d157600080fd5b5061030b6106e0366004613a8a565b6115b8565b3480156106f157600080fd5b506102b6610700366004613d0b565b6115e3565b34801561071157600080fd5b5061039360405180604001604052806006815260200165564f5941474560d01b81525081565b34801561074357600080fd5b506102b6610752366004613cf0565b611645565b34801561076357600080fd5b506102d87fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b34801561079757600080fd5b506102d8600081565b3480156107ac57600080fd5b506102b66107bb366004613d3f565b611658565b3480156107cc57600080fd5b506102d86107db366004613cf0565b6001600160a01b031660009081526008602052604090205490565b34801561080257600080fd5b5061030b7f000000000000000000000000000000000000000000000000000000000000000181565b34801561083657600080fd5b506102b66108453660046138d8565b611690565b34801561085657600080fd5b506102b6610865366004613cf0565b6116e0565b6102b6610878366004613d5b565b6116f3565b34801561088957600080fd5b506102b6610898366004613a8a565b6117f0565b3480156108a957600080fd5b506102d8600581565b3480156108be57600080fd5b506102b66108cd366004613db7565b611815565b3480156108de57600080fd5b506007546001600160a01b03166106ad565b3480156108fc57600080fd5b506103936118bc565b34801561091157600080fd5b5061030b610920366004613dea565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561095a57600080fd5b506102b6610969366004613e14565b61194a565b34801561097a57600080fd5b506102b6610989366004613cf0565b61198c565b34801561099a57600080fd5b5061030b600181565b3480156109af57600080fd5b506109c36109be3660046138d8565b6119fd565b6040516102e293929190613e78565b6006546001600160a01b031633146109ee576109ee6000611cfd565b7f0000000000000000000000000000000000000000000000000000000000000001610a2c5760405163649726c360e01b815260040160405180910390fd5b6000828152600c60205260409020546001600160801b0380821691610a5a918491600160801b900416613ec3565b1115610a795760405163b4632d5160e01b815260040160405180910390fd5b6000828152600c602052604090208054829190601090610aaa908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610ae983838360405180602001604052806000815250611d07565b505050565b60006001600160a01b038316610b5e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610b8182611e1b565b600b546001600160a01b03163314610bbd5760405163649726c360e01b815260040160405180910390fd5b600b54600160a81b900460ff16610be75760405163649726c360e01b815260040160405180910390fd5b610ae9838383611815565b6006546001600160a01b03163314610c0e57610c0e6000611cfd565b610c188282611e40565b5050565b6006546001600160a01b03163314610c3857610c386000611cfd565b600a54600590610c52906001600160801b03166001613ed6565b6001600160801b03161115610c7a5760405163b4632d5160e01b815260040160405180910390fd5b81600003610c9b576040516363868c5560e11b815260040160405180910390fd5b6000848152600c60205260409020546001600160801b031615610cd15760405163c991cbb160e01b815260040160405180910390fd5b81831115610cf25760405163b4632d5160e01b815260040160405180910390fd5b6000848152600c60205260409020600101610d0d8282613f7d565b50837fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b5565720782604051610d3e91906137b7565b60405180910390a2600a80546001600160801b0316906000610d5f8361403c565b82546101009290920a6001600160801b038181021990931691831602179091556000868152600c6020526040902080546001600160801b031916918516919091179055508215610e19576000848152600c602052604090208054849190601090610dda908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610e1933858560405180602001604052806000815250611d07565b50505050565b6000818152600c60205260409020546060906001600160801b0316610e57576040516374fc75bf60e01b815260040160405180910390fd5b6000828152600c602052604090206001018054610e7390613efd565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9f90613efd565b8015610eec5780601f10610ec157610100808354040283529160200191610eec565b820191906000526020600020905b815481529060010190602001808311610ecf57829003601f168201915b50505050509050919050565b6006546001600160a01b03163314610f1457610f146000611cfd565b6000828152600c60205260409020546001600160801b0316610f49576040516374fc75bf60e01b815260040160405180910390fd5b6000828152600c60205260409020546001600160801b039081169082161115610f855760405163c4469e5b60e01b815260040160405180910390fd5b6000828152600c60205260409020546001600160801b03828116911614610c18576000828152600c60205260409020546001600160801b03600160801b90910481169082161015610fe95760405163e9519eaf60e01b815260040160405180910390fd5b6000828152600c60209081526040918290205482516001600160801b0391821681529084169181019190915283917f2e05c2de5e3dbef951011de2529a091be29cafaf255379a253721b4b637a28db910160405180910390a26000828152600c6020526040902080546001600160801b0383166001600160801b03199091161790555050565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916110e45750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611103906001600160601b031687614062565b61110d9190614081565b91519350909150505b9250929050565b846001600160a01b038116331461115257731e0049783f008a0085193e00003d00cd54003c7133146111525761115233611efa565b61115f8686868686611f3e565b505050505050565b60008281526005602052604090206001015461118281611cfd565b610ae98383611f83565b6001600160a01b03811633146111fc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610b55565b610c188282612009565b6060815183511461126b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610b55565b600083516001600160401b03811115611286576112866137ca565b6040519080825280602002602001820160405280156112af578160200160208202803683370190505b50905060005b8451811015611327576112fa8582815181106112d3576112d36140a3565b60200260200101518583815181106112ed576112ed6140a3565b6020026020010151610aee565b82828151811061130c5761130c6140a3565b6020908102919091010152611320816140b9565b90506112b5565b509392505050565b6006546001600160a01b0316331461134b5761134b6000611cfd565b600b805461ffff60a01b1916600160a01b9315159390930260ff60a81b191692909217600160a81b91151591909102179055565b6006546001600160a01b0316331461139b5761139b6000611cfd565b610ae9838383612070565b6113ae61213b565b6113b86000612195565b565b600b546001600160a01b031633146113e55760405163649726c360e01b815260040160405180910390fd5b600b54600160a01b900460ff1661140f5760405163649726c360e01b815260040160405180910390fd5b6000848152600c60205260409020546001600160801b038082169161143d918691600160801b900416613ec3565b111561145c5760405163b4632d5160e01b815260040160405180910390fd5b6000848152600c60205260409020805484919060109061148d908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b031602179055506114cc85858560405180602001604052806000815250611d07565b5050505050565b60075433906001600160a01b031681146115415760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610b55565b61154a81612195565b50565b6006546001600160a01b03163314611569576115696000611cfd565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b031633146115a7576115a76000611cfd565b600090815260046020526040812055565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6006546001600160a01b031633146115ff576115ff6000611cfd565b7fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a166009826040516116319291906140d2565b60405180910390a16009610c188282613f7d565b61164d61213b565b61154a600082612009565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b038216146116865761168681611efa565b610ae983836121ae565b61169a33826121b9565b7f3df5d8f8ab64f627d3b9fb62a5f047e29b7f4c287c9ce1b095ab5465a28ab34c33604080516001600160a01b039092168252602082018490520160405180910390a150565b6116e861213b565b61154a600082611f83565b7f00000000000000000000000000000000000000000000000000000000000000016117315760405163649726c360e01b815260040160405180910390fd5b60e08301356000908152600c60205260409020546001600160801b038082169161176891606087013591600160801b900416613ec3565b11156117875760405163b4632d5160e01b815260040160405180910390fd5b60e08301356000908152600c602052604090208054606085013591906010906117c1908490600160801b90046001600160801b0316613ed6565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610ae983838361220d565b60008281526005602052604090206001015461180b81611cfd565b610ae98383612009565b6001600160a01b038316331480159061183557506118338333610920565b155b15611853576040516378476ebb60e01b815260040160405180910390fd5b6000828152600c602052604090208054829190601090611884908490600160801b90046001600160801b0316614168565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610ae98383836001600160801b0316612318565b600980546118c990613efd565b80601f01602080910402602001604051908101604052809291908181526020018280546118f590613efd565b80156119425780601f1061191757610100808354040283529160200191611942565b820191906000526020600020905b81548152906001019060200180831161192557829003601f168201915b505050505081565b846001600160a01b038116331461197f57731e0049783f008a0085193e00003d00cd54003c71331461197f5761197f33611efa565b61115f8686868686612494565b61199461213b565b600780546001600160a01b0383166001600160a01b031990911681179091556119c56006546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600c60205260009081526040902080546001820180546001600160801b0380841694600160801b90940416929190611a3490613efd565b80601f0160208091040260200160405190810160405280929190818152602001828054611a6090613efd565b8015611aad5780601f10611a8257610100808354040283529160200191611aad565b820191906000526020600020905b815481529060010190602001808311611a9057829003601f168201915b5050505050905083565b60606000825111611ad75760405180602001604052806000815250610b81565b81611ae3306014611b5b565b604051602001611af4929190614188565b60405160208183030381529060405292915050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000611b6a836002614062565b611b75906002613ec3565b6001600160401b03811115611b8c57611b8c6137ca565b6040519080825280601f01601f191660200182016040528015611bb6576020820181803683370190505b509050600360fc1b81600081518110611bd157611bd16140a3565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611c0057611c006140a3565b60200101906001600160f81b031916908160001a9053506000611c24846002614062565b611c2f906001613ec3565b90505b6001811115611ca7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611c6357611c636140a3565b1a60f81b828281518110611c7957611c796140a3565b60200101906001600160f81b031916908160001a90535060049490941c93611ca0816141b7565b9050611c32565b508315611cf65760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b55565b9392505050565b61154a81336124d9565b6001600160a01b038416611d675760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b55565b336000611d7385612532565b90506000611d8085612532565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290611db2908490613ec3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611e128360008989898961257d565b50505050505050565b60006001600160e01b03198216637965db0b60e01b1480610b815750610b81826126d8565b6127106001600160601b0382161115611e6b5760405162461bcd60e51b8152600401610b55906141ce565b6001600160a01b038216611ec15760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b55565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa611f36573d6000803e3d6000fd5b6000603a5250565b6001600160a01b038516331480611f5a5750611f5a8533610920565b611f765760405162461bcd60e51b8152600401610b5590614218565b6114cc85858585856126fd565b611f8d82826115b8565b610c185760008281526005602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611fc53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61201382826115b8565b15610c185760008281526005602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6127106001600160601b038216111561209b5760405162461bcd60e51b8152600401610b55906141ce565b6001600160a01b0382166120f15760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610b55565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6006546001600160a01b031633146113b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b55565b600780546001600160a01b031916905561154a81611b09565b610c183383836128d2565b6001600160a01b03821660009081526008602052604090205481116121f1576040516313b42f4d60e31b815260040160405180910390fd5b6001600160a01b03909116600090815260086020526040902055565b428360a0013510156122325760405163455c7d6b60e11b815260040160405180910390fd5b6122896122426020850185613cf0565b6122526040860160208701613cf0565b60408601356060870135608088013560a089013560c08a013560e08b01356122826101208d016101008e01613cf0565b8b8b6129b2565b6122973384608001356121b9565b60006122ab61012085016101008601613cf0565b6001600160a01b0316036122c7576122c283612b3b565b6122d0565b6122d083612c5d565b6122da3384612ddc565b7fd787a81976c7ae74647fc73d6574ab6333e0d888828e3b934b2570a70b78384e828260405161230b929190614266565b60405180910390a1505050565b6001600160a01b03831661237a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610b55565b33600061238684612532565b9050600061239384612532565b60408051602080820183526000918290528882528181528282206001600160a01b038b168352905220549091508481101561241c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610b55565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611e12565b6001600160a01b0385163314806124b057506124b08533610920565b6124cc5760405162461bcd60e51b8152600401610b5590614218565b6114cc8585858585612dff565b6124e382826115b8565b610c18576124f081612f29565b6124fb836020611b5b565b60405160200161250c929190614295565b60408051601f198184030181529082905262461bcd60e51b8252610b55916004016137b7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061256c5761256c6140a3565b602090810291909101015292915050565b6001600160a01b0384163b1561115f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906125c1908990899088908890889060040161430a565b6020604051808303816000875af19250505080156125fc575060408051601f3d908101601f191682019092526125f991810190614344565b60015b6126a857612608614361565b806308c379a003612641575061261c61437d565b806126275750612643565b8060405162461bcd60e51b8152600401610b5591906137b7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610b55565b6001600160e01b0319811663f23a6e6160e01b14611e125760405162461bcd60e51b8152600401610b5590614406565b60006001600160e01b0319821663152a902d60e11b1480610b815750610b8182612f3f565b815183511461275f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610b55565b6001600160a01b0384166127855760405162461bcd60e51b8152600401610b559061444e565b3360005b845181101561286c5760008582815181106127a6576127a66140a3565b6020026020010151905060008583815181106127c4576127c46140a3565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156128145760405162461bcd60e51b8152600401610b5590614493565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612851908490613ec3565b9250508190555050505080612865906140b9565b9050612789565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516128bc9291906144dd565b60405180910390a461115f818787878787612f8f565b816001600160a01b0316836001600160a01b0316036129455760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610b55565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b604080516001600160a01b038d81166020808401919091528d821683850152606083018d9052608083018c905260a083018b905260c083018a905260e083018990526101008301889052868216610120840152336101408401527f0000000000000000000000000872ec4426103482a50f26ffc32acefcec61b3c99091166101608301524661018080840191909152835180840390910181526101a0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006101c08401526101dc80840191909152835180840390910181526101fc90920190925280519101206000612ae38285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061304a92505050565b9050612b0f7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f70826115b8565b612b2c57604051638baa579f60e01b815260040160405180910390fd5b50505050505050505050505050565b34612b4e606083013560c0840135614062565b1115612b6d5760405163cd1c886760e01b815260040160405180910390fd5b341561154a573481604001351115612b9857604051637e2897ef60e11b815260040160405180910390fd5b604081013515612bf8576000612bb46040830160208401613cf0565b6001600160a01b031603612bdb57604051631e7d738760e21b815260040160405180910390fd5b612bf8612bee6040830160208401613cf0565b8260400135613066565b806040013534111561154a576000612c136020830183613cf0565b6001600160a01b031603612c3a57604051631e7d738760e21b815260040160405180910390fd5b61154a612c4a6020830183613cf0565b612c58604084013534614502565b613066565b6000612c71606083013560c0840135614062565b1015612c90576040516336b3edeb60e11b815260040160405180910390fd5b612ca2606082013560c0830135614062565b81604001351115612cc657604051637e2897ef60e11b815260040160405180910390fd5b604081013515612d45576000612ce26040830160208401613cf0565b6001600160a01b031603612d0957604051631e7d738760e21b815260040160405180910390fd5b612d4533612d1d6040840160208501613cf0565b6040840135612d3461012086016101008701613cf0565b6001600160a01b031692919061317f565b6040810135612d5c606083013560c0840135614062565b111561154a576000612d716020830183613cf0565b6001600160a01b031603612d9857604051631e7d738760e21b815260040160405180910390fd5b61154a33612da96020840184613cf0565b6040840135612dc0606086013560c0870135614062565b612dca9190614502565b612d3461012086016101008701613cf0565b610c18828260e00135836060013560405180602001604052806000815250611d07565b6001600160a01b038416612e255760405162461bcd60e51b8152600401610b559061444e565b336000612e3185612532565b90506000612e3e85612532565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015612e815760405162461bcd60e51b8152600401610b5590614493565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612ebe908490613ec3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f1e848a8a8a8a8a61257d565b505050505050505050565b6060610b816001600160a01b0383166014611b5b565b60006001600160e01b03198216636cdb3d1360e11b1480612f7057506001600160e01b031982166303a24d0760e21b145b80610b8157506301ffc9a760e01b6001600160e01b0319831614610b81565b6001600160a01b0384163b1561115f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612fd39089908990889088908890600401614515565b6020604051808303816000875af192505050801561300e575060408051601f3d908101601f1916820190925261300b91810190614344565b60015b61301a57612608614361565b6001600160e01b0319811663bc197c8160e01b14611e125760405162461bcd60e51b8152600401610b5590614406565b600080600061305985856131d9565b915091506113278161321b565b804710156130b65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610b55565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613103576040519150601f19603f3d011682016040523d82523d6000602084013e613108565b606091505b5050905080610ae95760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610b55565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e19908590613365565b600080825160410361320f5760208301516040840151606085015160001a61320387828585613437565b94509450505050611116565b50600090506002611116565b600081600481111561322f5761322f614573565b036132375750565b600181600481111561324b5761324b614573565b036132985760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b55565b60028160048111156132ac576132ac614573565b036132f95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b55565b600381600481111561330d5761330d614573565b0361154a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b55565b60006133ba826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166134fb9092919063ffffffff16565b805190915015610ae957808060200190518101906133d89190614589565b610ae95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b55565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561346e57506000905060036134f2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156134c2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166134eb576000600192509250506134f2565b9150600090505b94509492505050565b606061350a8484600085613512565b949350505050565b6060824710156135735760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b55565b600080866001600160a01b0316858760405161358f91906145a6565b60006040518083038185875af1925050503d80600081146135cc576040519150601f19603f3d011682016040523d82523d6000602084013e6135d1565b606091505b50915091506135e2878383876135ed565b979650505050505050565b6060831561365c578251600003613655576001600160a01b0385163b6136555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b55565b508161350a565b61350a83838151156126275781518083602001fd5b80356001600160a01b038116811461368857600080fd5b919050565b6000806000606084860312156136a257600080fd5b6136ab84613671565b95602085013595506040909401359392505050565b600080604083850312156136d357600080fd5b6136dc83613671565b946020939093013593505050565b6001600160e01b03198116811461154a57600080fd5b60006020828403121561371257600080fd5b8135611cf6816136ea565b80356001600160601b038116811461368857600080fd5b6000806040838503121561374757600080fd5b61375083613671565b915061375e6020840161371d565b90509250929050565b60005b8381101561378257818101518382015260200161376a565b50506000910152565b600081518084526137a3816020860160208601613767565b601f01601f19169290920160200192915050565b602081526000611cf6602083018461378b565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613805576138056137ca565b6040525050565b600082601f83011261381d57600080fd5b81356001600160401b03811115613836576138366137ca565b60405161384d601f8301601f1916602001826137e0565b81815284602083860101111561386257600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561389557600080fd5b84359350602085013592506040850135915060608501356001600160401b038111156138c057600080fd5b6138cc8782880161380c565b91505092959194509250565b6000602082840312156138ea57600080fd5b5035919050565b80356001600160801b038116811461368857600080fd5b6000806040838503121561391b57600080fd5b8235915061375e602084016138f1565b6000806040838503121561393e57600080fd5b50508035926020909101359150565b60006001600160401b03821115613966576139666137ca565b5060051b60200190565b600082601f83011261398157600080fd5b8135602061398e8261394d565b60405161399b82826137e0565b83815260059390931b85018201928281019150868411156139bb57600080fd5b8286015b848110156139d657803583529183019183016139bf565b509695505050505050565b600080600080600060a086880312156139f957600080fd5b613a0286613671565b9450613a1060208701613671565b935060408601356001600160401b0380821115613a2c57600080fd5b613a3889838a01613970565b94506060880135915080821115613a4e57600080fd5b613a5a89838a01613970565b93506080880135915080821115613a7057600080fd5b50613a7d8882890161380c565b9150509295509295909350565b60008060408385031215613a9d57600080fd5b8235915061375e60208401613671565b60008060408385031215613ac057600080fd5b82356001600160401b0380821115613ad757600080fd5b818501915085601f830112613aeb57600080fd5b81356020613af88261394d565b604051613b0582826137e0565b83815260059390931b8501820192828101915089841115613b2557600080fd5b948201945b83861015613b4a57613b3b86613671565b82529482019490820190613b2a565b96505086013592505080821115613b6057600080fd5b50613b6d85828601613970565b9150509250929050565b600081518084526020808501945080840160005b83811015613ba757815187529582019590820190600101613b8b565b509495945050505050565b602081526000611cf66020830184613b77565b801515811461154a57600080fd5b60008060408385031215613be657600080fd5b8235613bf181613bc5565b91506020830135613c0181613bc5565b809150509250929050565b600080600060608486031215613c2157600080fd5b83359250613c3160208501613671565b9150613c3f6040850161371d565b90509250925092565b60008083601f840112613c5a57600080fd5b5081356001600160401b03811115613c7157600080fd5b60208301915083602082850101111561111657600080fd5b600080600080600060808688031215613ca157600080fd5b613caa86613671565b9450602086013593506040860135925060608601356001600160401b03811115613cd357600080fd5b613cdf88828901613c48565b969995985093965092949392505050565b600060208284031215613d0257600080fd5b611cf682613671565b600060208284031215613d1d57600080fd5b81356001600160401b03811115613d3357600080fd5b61350a8482850161380c565b60008060408385031215613d5257600080fd5b613bf183613671565b6000806000838503610140811215613d7257600080fd5b61012080821215613d8257600080fd5b85945084013590506001600160401b03811115613d9e57600080fd5b613daa86828701613c48565b9497909650939450505050565b600080600060608486031215613dcc57600080fd5b613dd584613671565b925060208401359150613c3f604085016138f1565b60008060408385031215613dfd57600080fd5b613e0683613671565b915061375e60208401613671565b600080600080600060a08688031215613e2c57600080fd5b613e3586613671565b9450613e4360208701613671565b9350604086013592506060860135915060808601356001600160401b03811115613e6c57600080fd5b613a7d8882890161380c565b60006001600160801b03808616835280851660208401525060606040830152613ea4606083018461378b565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b8157610b81613ead565b6001600160801b03818116838216019080821115613ef657613ef6613ead565b5092915050565b600181811c90821680613f1157607f821691505b602082108103613f3157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610ae957600081815260208120601f850160051c81016020861015613f5e5750805b601f850160051c820191505b8181101561115f57828155600101613f6a565b81516001600160401b03811115613f9657613f966137ca565b613faa81613fa48454613efd565b84613f37565b602080601f831160018114613fdf5760008415613fc75750858301515b600019600386901b1c1916600185901b17855561115f565b600085815260208120601f198616915b8281101561400e57888601518255948401946001909101908401613fef565b508582101561402c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160801b0380831681810361405857614058613ead565b6001019392505050565b600081600019048311821515161561407c5761407c613ead565b500290565b60008261409e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000600182016140cb576140cb613ead565b5060010190565b6040815260008084546140e481613efd565b8060408601526060600180841660008114614106576001811461412057614151565b60ff1985168884015283151560051b880183019550614151565b8960005260208060002060005b868110156141485781548b820187015290840190820161412d565b8a018501975050505b50505050508281036020840152613ea4818561378b565b6001600160801b03828116828216039080821115613ef657613ef6613ead565b6000835161419a818460208801613767565b8351908301906141ae818360208801613767565b01949350505050565b6000816141c6576141c6613ead565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516142cd816017850160208801613767565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516142fe816028840160208801613767565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906135e29083018461378b565b60006020828403121561435657600080fd5b8151611cf6816136ea565b600060033d111561437a5760046000803e5060005160e01c5b90565b600060443d101561438b5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156143ba57505050505090565b82850191508151818111156143d25750505050505090565b843d87010160208285010111156143ec5750505050505090565b6143fb602082860101876137e0565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006144f06040830185613b77565b8281036020840152613ea48185613b77565b81810381811115610b8157610b81613ead565b6001600160a01b0386811682528516602082015260a06040820181905260009061454190830186613b77565b82810360608401526145538186613b77565b90508281036080840152614567818561378b565b98975050505050505050565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561459b57600080fd5b8151611cf681613bc5565b600082516145b8818460208701613767565b919091019291505056fea26469706673582212204cf685cbcd4b99d231f894957a0de061e5e2bf92a764ce8d82ce27e82ddc3cd364736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c75c8bf9f6551bf367ae645be8040c598c18da4f0000000000000000000000004b227e2eb3f39d4ee23938c430821d80dc15a2d50000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000e7080000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : signer (address): 0xc75c8BF9F6551bf367ae645BE8040c598C18da4f
Arg [1] : owner_ (address): 0x4B227E2Eb3F39D4EE23938c430821D80dC15a2d5
Arg [2] : baseContractURI_ (string):
Arg [3] : originChainId_ (uint256): 59144
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c75c8bf9f6551bf367ae645be8040c598c18da4f
Arg [1] : 0000000000000000000000004b227e2eb3f39d4ee23938c430821d80dc15a2d5
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 000000000000000000000000000000000000000000000000000000000000e708
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
[ 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.