Contract Overview
Balance:
0 MATIC
MATIC Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash |
Method
|
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x2b38dd42d217f478d987beae6fbd2731cebdc3353272c41dc811b0aedf25de74 | 0x60a06040 | 38224815 | 136 days 8 hrs ago | 0x361aad4b274ccb5bcc60316ff8db46c3cc753ccf | IN | Create: Item | 0 MATIC | 0.171442831407 |
[ Download CSV Export ]
Contract Name:
Item
Compiler Version
v0.8.10+commit.fc410830
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.10; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@opengsn/contracts/src/BaseRelayRecipient.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./utils/NFT1155.sol"; import "./utils/NFT1155URIStorage.sol"; /** * @title Hybrid Permission-based NFTs represent any creative works */ contract Item is NFT1155, NFT1155URIStorage, ReentrancyGuard, BaseRelayRecipient, Pausable { using Address for address; using SafeERC20 for IERC20; enum Role { UNAUTHORIZED, ADMIN } enum TokenType { ERC20, ETHER } // enum ContentType { // ART, // BOOK, // AUDIO, // VIDEO // } struct Price { TokenType tokenType; address asset; uint256 tokenIdOrAmount; } struct Token { Price price; // ContentType contentType; uint256 currentSupply; uint256 maxSupply; // can't be changed } // maps to the owner of each token ID mapping(uint256 => address) public tokenOwners; uint256 public tokenOwnerCount; // token data mapping(uint256 => Token) public tokens; // ACL mapping(address => Role) private permissions; // Dev address address public devAddress; // For the platform uint256 public platformFee; // maps to lock / unlock states mapping(uint256 => bool) public lockable; event Authorised(uint256 indexed tokenId, address owner); event Sold( uint256 tokenId, address tokenAddress, uint256 amount ); constructor(address _forwarder) { _setTrustedForwarder(_forwarder); devAddress = _msgSender(); // Set fees platformFee = 1000; // 10% } /// @notice check token price for the given token ID function tokenPrice( uint256 _tokenId ) external view returns (TokenType, address , uint256) { return ( tokens[_tokenId].price.tokenType, tokens[_tokenId].price.asset, tokens[_tokenId].price.tokenIdOrAmount); } /// @notice check token's current supply for the given token ID function tokenSupply(uint256 _tokenId) external view returns (uint256) { return ( tokens[_tokenId].currentSupply ); } /// @notice check token's max supply for the given token ID function tokenMaxSupply(uint256 _tokenId) external view returns (uint256) { return ( tokens[_tokenId].maxSupply ); } /// @notice check token's content type for the given ID // function tokenContenttype(uint256 _tokenId) external view returns (ContentType) { // return ( tokens[_tokenId].contentType ); // } /// @notice authorise to issue a token function authorise( string memory _tokenURI, uint256 _initialAmount, TokenType _priceTokenType, address _priceAsset, uint256 _priceTokenIdOrAmount, uint256 _maxSupply ) external nonReentrant whenNotPaused { require(_initialAmount > 0, "Initial Amount must be greater than zero"); require(_maxSupply >= _initialAmount,"Max Supply should be greater then Initial Amount"); tokenOwnerCount += 1; tokenOwners[tokenOwnerCount] = _msgSender(); // first mint _mint(_msgSender(), tokenOwnerCount, _initialAmount, ""); _setURI(tokenOwnerCount, _tokenURI); lockable[tokenOwnerCount] = true; // set the price tokens[tokenOwnerCount].price.asset = _priceAsset; tokens[tokenOwnerCount].price.tokenIdOrAmount = _priceTokenIdOrAmount; tokens[tokenOwnerCount].price.tokenType = _priceTokenType; // set other params tokens[tokenOwnerCount].maxSupply = _maxSupply; tokens[tokenOwnerCount].currentSupply = _initialAmount; emit Authorised(tokenOwnerCount, _msgSender()); } /// @notice set the token URI (only be called by the token owner) function setTokenURI(uint256 _tokenId, string memory _tokenURI) external nonReentrant whenNotPaused { require(tokenOwners[_tokenId] == _msgSender(), "Not authorised to set"); _setURI(_tokenId, _tokenURI); } /// @notice set the token price (only be called by the token owner) function setTokenPrice( uint256 _tokenId, TokenType _priceType, address _priceAsset, uint256 _priceTokenIdOrAmount ) external nonReentrant whenNotPaused { require(tokenOwners[_tokenId] == _msgSender(), "Not authorised to set"); tokens[_tokenId].price.tokenType = _priceType; tokens[_tokenId].price.asset = _priceAsset; tokens[_tokenId].price.tokenIdOrAmount = _priceTokenIdOrAmount; } /// @notice transfer token owner function transferTokenOwner( uint256 _tokenId, address _newOwnerAddress ) external nonReentrant whenNotPaused { require(tokenOwners[_tokenId] == _msgSender(), "Not authorised to transfer"); tokenOwners[_tokenId] = _newOwnerAddress; } /// @notice mint tokens /// @param _to recipient to be received /// @param _tokenId token ID /// @param _value amount of the token to be minted /// @param _data aux data function mint( address _to, uint256 _tokenId, uint256 _value, bytes memory _data ) external nonReentrant whenNotPaused { require(tokens[_tokenId].maxSupply >= (tokens[_tokenId].currentSupply + _value),"Max Supply Exceeded"); address tokenOwner = tokenOwners[_tokenId]; tokens[_tokenId].currentSupply += _value; if (tokenOwner == _msgSender()) { // free mint for the owner _mint(_to, _tokenId, _value, _data); } else { address priceAsset = tokens[_tokenId].price.asset; uint256 priceAmount = tokens[_tokenId].price.tokenIdOrAmount; require(tokens[_tokenId].price.tokenType == TokenType.ERC20, "Only ERC20 here"); require(_value == 1, "One token only"); // only one token is minted // taking platform fees if (platformFee != 0) { uint256 fee = (priceAmount * (platformFee)) / (10000); IERC20(priceAsset).safeTransferFrom( _msgSender(), devAddress, fee ); priceAmount -= fee; } // Locking in the contract until Admin releases it IERC20(priceAsset).safeTransferFrom( _msgSender(), tokenOwner, priceAmount ); _mint(_to, _tokenId, 1, _data); emit Sold(_tokenId, priceAsset, priceAmount); } } /// @notice mint tokens with ETH function mintWithEth( address _to, uint256 _tokenId, uint256 _value, bytes memory _data ) external payable nonReentrant whenNotPaused { require(tokenOwners[_tokenId] != _msgSender(), "Owner is not allowed"); require( tokens[_tokenId].price.tokenType == TokenType.ETHER, "PriceAsset must be ETH" ); require(_value == 1, "One token only"); require(tokens[_tokenId].maxSupply >= (tokens[_tokenId].currentSupply + _value),"Max Supply Exceeded"); // only one token is minted uint256 amount = msg.value; uint256 priceAmount = tokens[_tokenId].price.tokenIdOrAmount; tokens[_tokenId].currentSupply += _value; require( amount == priceAmount , "Invalid amount"); // taking platform fees if (platformFee != 0) { uint256 fee = (priceAmount * (platformFee)) / (10000); (bool successDev, ) = devAddress.call{value: fee}(""); require(successDev, "Failed to send Ether to dev"); priceAmount -= fee; } (bool success, ) = tokenOwners[_tokenId].call{value: priceAmount}(""); require(success, "Failed to send Ether to creator"); _mint(_to, _tokenId, 1, _data); emit Sold( _tokenId, 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE, priceAmount); } /// @notice burn tokens /// @param owner owner of the token /// @param id token ID /// @param value amount of the token to be burned function burn( address owner, uint256 id, uint256 value ) external nonReentrant { _burn(owner, id, value); } /// @notice return the token URI /// @param tokenId token ID function uri(uint256 tokenId) public view virtual override(NFT1155, NFT1155URIStorage) returns (string memory) { return NFT1155URIStorage.uri(tokenId); } /// @notice lock the token to not be transfered /// @param tokenId token ID function lock(uint256 tokenId) external onlyAdmin { lockable[tokenId] = true; } /// @notice unlock the token /// @param tokenId token ID function unlock(uint256 tokenId) external onlyAdmin { lockable[tokenId] = false; } // update dev address function setDevAddress(address _devAddress) external onlyAdmin { devAddress = _devAddress; } // give a specific permission to the given address function grant(address _address, Role _role) external onlyAdmin { require(_address != _msgSender(), "You cannot grant yourself"); permissions[_address] = _role; } // remove any permission binded to the given address function revoke(address _address) external onlyAdmin { require(_address != _msgSender(), "You cannot revoke yourself"); permissions[_address] = Role.UNAUTHORIZED; } function setPaused(bool _paused) external onlyAdmin { if (_paused) { _pause(); } else { _unpause(); } } // withdraw locked funds function withdrawErc20(address _tokenAddress, address _toAddress, uint256 _amount) external nonReentrant onlyAdmin { IERC20(_tokenAddress).safeTransfer(_toAddress, _amount); } // widthdraw ETH function withdraw(address _toAddress, uint256 _amount) external nonReentrant onlyAdmin { (bool sent, ) = _toAddress.call{value: _amount}(""); require(sent, "Failed to send Ether"); } // update fees function setFees(uint256 _platformFee) external onlyAdmin { platformFee = _platformFee; } function _msgData() internal view override(Context, BaseRelayRecipient) returns (bytes calldata) { return BaseRelayRecipient._msgData(); } modifier onlyAdmin() { require( permissions[_msgSender()] == Role.ADMIN, "Caller is not the admin" ); _; } function versionRecipient() public pure override returns (string memory) { return "2.2.5"; } function _msgSender() internal view override(Context, BaseRelayRecipient) returns (address sender) { sender = BaseRelayRecipient._msgSender(); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { if ( to != address(this) && from != address(0) && to != address(0) && permissions[to] != Role.ADMIN && permissions[from] != Role.ADMIN && permissions[operator] != Role.ADMIN ) { require( lockable[ids[i]] == false, "Not allow to be transfered" ); } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract NFT1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) internal _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 {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 pragma solidity 0.8.10; import "./NFT1155.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; abstract contract NFT1155URIStorage is NFT1155 { using Strings for uint256; // Optional base URI string private _baseURI = ""; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the concatenation of the `_baseURI` * and the token-specific uri if the latter is set * * This enables the following behaviors: * * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` * is empty per default); * * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` * which in most cases will contain `ERC1155._uri`; * * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a * uri value set, then the result is empty. */ function uri(uint256 tokenId) public view virtual override returns (string memory) { string memory tokenURI = _tokenURIs[tokenId]; // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); } /** * @dev Sets `tokenURI` as the tokenURI of `tokenId`. */ function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { _tokenURIs[tokenId] = tokenURI; emit URI(uri(tokenId), tokenId); } /** * @dev Sets `baseURI` as the `_baseURI` for all tokens */ function _setBaseURI(string memory baseURI) internal virtual { _baseURI = baseURI; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // solhint-disable no-inline-assembly pragma solidity >=0.6.9; import "./interfaces/IRelayRecipient.sol"; /** * A base contract to be inherited by any contract that want to receive relayed transactions * A subclass must use "_msgSender()" instead of "msg.sender" */ abstract contract BaseRelayRecipient is IRelayRecipient { /* * Forwarder singleton we accept calls from */ address private _trustedForwarder; function trustedForwarder() public virtual view returns (address){ return _trustedForwarder; } function _setTrustedForwarder(address _forwarder) internal { _trustedForwarder = _forwarder; } function isTrustedForwarder(address forwarder) public virtual override view returns(bool) { return forwarder == _trustedForwarder; } /** * return the sender of this call. * if the call came through our trusted forwarder, return the original sender. * otherwise, return `msg.sender`. * should be used in the contract anywhere instead of msg.sender */ function _msgSender() internal override virtual view returns (address ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { // At this point we know that the sender is a trusted forwarder, // so we trust that the last bytes of msg.data are the verified sender address. // extract sender address from the end of msg.data assembly { ret := shr(96,calldataload(sub(calldatasize(),20))) } } else { ret = msg.sender; } } /** * return the msg.data of this call. * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes * of the msg.data - so this method will strip those 20 bytes off. * otherwise (if the call was made directly and not through the forwarder), return `msg.data` * should be used in the contract instead of msg.data, where this difference matters. */ function _msgData() internal override virtual view returns (bytes calldata ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { return msg.data[0:msg.data.length-20]; } else { return msg.data; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @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/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.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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/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 pragma solidity >=0.6.0; /** * a contract must implement this interface in order to support relayed transaction. * It is better to inherit the BaseRelayRecipient as its implementation. */ abstract contract IRelayRecipient { /** * return if the forwarder is trusted to forward relayed transactions to us. * the forwarder is required to verify the sender's signature, and verify * the call is not a replay. */ function isTrustedForwarder(address forwarder) public virtual view returns(bool); /** * return the sender of this call. * if the call came through our trusted forwarder, then the real sender is appended as the last 20 bytes * of the msg.data. * otherwise, return `msg.sender` * should be used in the contract anywhere instead of msg.sender */ function _msgSender() internal virtual view returns (address); /** * return the msg.data of this call. * if the call came through our trusted forwarder, then the real sender was appended as the last 20 bytes * of the msg.data - so this method will strip those 20 bytes off. * otherwise (if the call was made directly and not through the forwarder), return `msg.data` * should be used in the contract instead of msg.data, where this difference matters. */ function _msgData() internal virtual view returns (bytes calldata); function versionRecipient() external virtual view returns (string memory); }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"Authorised","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Sold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"},{"internalType":"uint256","name":"_initialAmount","type":"uint256"},{"internalType":"enum Item.TokenType","name":"_priceTokenType","type":"uint8"},{"internalType":"address","name":"_priceAsset","type":"address"},{"internalType":"uint256","name":"_priceTokenIdOrAmount","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"authorise","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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"enum Item.Role","name":"_role","type":"uint8"}],"name":"grant","outputs":[],"stateMutability":"nonpayable","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":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"mintWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devAddress","type":"address"}],"name":"setDevAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_platformFee","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"enum Item.TokenType","name":"_priceType","type":"uint8"},{"internalType":"address","name":"_priceAsset","type":"address"},{"internalType":"uint256","name":"_priceTokenIdOrAmount","type":"uint256"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOwnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenPrice","outputs":[{"internalType":"enum Item.TokenType","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"components":[{"internalType":"enum Item.TokenType","name":"tokenType","type":"uint8"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"tokenIdOrAmount","type":"uint256"}],"internalType":"struct Item.Price","name":"price","type":"tuple"},{"internalType":"uint256","name":"currentSupply","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_newOwnerAddress","type":"address"}],"name":"transferTokenOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unlock","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":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040819052600060808190526200001b91600391620000f5565b503480156200002957600080fd5b5060405162003dca38038062003dca8339810160408190526200004c916200019b565b6001600555600680546001600160a81b0319166001600160a01b03831617905562000076620000a3565b600b80546001600160a01b0319166001600160a01b0392909216919091179055506103e8600c556200020a565b6000620000ba620000bf60201b62001cd51760201c565b905090565b600060143610801590620000dd57506006546001600160a01b031633145b15620000f0575060131936013560601c90565b503390565b8280546200010390620001cd565b90600052602060002090601f01602090048101928262000127576000855562000172565b82601f106200014257805160ff191683800117855562000172565b8280016001018555821562000172579182015b828111156200017257825182559160200191906001019062000155565b506200018092915062000184565b5090565b5b8082111562000180576000815560010162000185565b600060208284031215620001ae57600080fd5b81516001600160a01b0381168114620001c657600080fd5b9392505050565b600181811c90821680620001e257607f821691505b602082108114156200020457634e487b7160e01b600052602260045260246000fd5b50919050565b613bb0806200021a6000396000f3fe6080604052600436106102185760003560e01c80635c975abb11610123578063c1798e9b116100ab578063e985e9c51161006f578063e985e9c5146106e3578063f242432a1461072c578063f3fef3a31461074c578063f5298aca1461076c578063f8a14f461461078c57600080fd5b8063c1798e9b14610616578063d0d41fe114610636578063d4ddce8a14610656578063db0f3310146106ad578063dd467064146106c357600080fd5b806374a8f103116100f257806374a8f103146105755780637da0a877146105955780638003d716146105b3578063a22cb465146105c6578063ae233120146105e657600080fd5b80635c975abb146104f65780636198e339146105155780636b9b33c314610535578063731133e91461055557600080fd5b806326232a2e116101a65780633d18678e116101755780633d18678e1461041d578063486ff0cd1461043d5780634e1273f41461046b5780634f64b2be14610498578063572b6c05146104c757600080fd5b806326232a2e1461037f5780632693ebf2146103955780632eb2c2d6146103c55780633ad10ef6146103e557600080fd5b80631593dee1116101ed5780631593dee1146102dd578063162094c4146102ff57806316c38b3c1461031f5780631b52868d1461033f5780631e1ad2a41461035f57600080fd5b80624221f01461021d578062fdd58e1461026057806301ffc9a7146102805780630e89341c146102b0575b600080fd5b34801561022957600080fd5b5061024d610238366004612e8a565b60009081526009602052604090206003015490565b6040519081526020015b60405180910390f35b34801561026c57600080fd5b5061024d61027b366004612ebf565b6107c2565b34801561028c57600080fd5b506102a061029b366004612eff565b610858565b6040519015158152602001610257565b3480156102bc57600080fd5b506102d06102cb366004612e8a565b6108aa565b6040516102579190612f74565b3480156102e957600080fd5b506102fd6102f8366004612f87565b6108b5565b005b34801561030b57600080fd5b506102fd61031a36600461307a565b610954565b34801561032b57600080fd5b506102fd61033a3660046130cf565b610a00565b34801561034b57600080fd5b506102fd61035a3660046130f9565b610a72565b34801561036b57600080fd5b506102fd61037a366004613130565b610b71565b34801561038b57600080fd5b5061024d600c5481565b3480156103a157600080fd5b5061024d6103b0366004612e8a565b60009081526009602052604090206002015490565b3480156103d157600080fd5b506102fd6103e03660046131f1565b610c45565b3480156103f157600080fd5b50600b54610405906001600160a01b031681565b6040516001600160a01b039091168152602001610257565b34801561042957600080fd5b506102fd610438366004612e8a565b610ca3565b34801561044957600080fd5b50604080518082019091526005815264322e322e3560d81b60208201526102d0565b34801561047757600080fd5b5061048b61048636600461329b565b610d01565b6040516102579190613397565b3480156104a457600080fd5b506104b86104b3366004612e8a565b610e2b565b604051610257939291906133e2565b3480156104d357600080fd5b506102a06104e2366004613426565b6006546001600160a01b0391821691161490565b34801561050257600080fd5b50600654600160a01b900460ff166102a0565b34801561052157600080fd5b506102fd610530366004612e8a565b610ea6565b34801561054157600080fd5b506102fd610550366004613441565b610f17565b34801561056157600080fd5b506102fd6105703660046134bd565b611187565b34801561058157600080fd5b506102fd610590366004613426565b61142f565b3480156105a157600080fd5b506006546001600160a01b0316610405565b6102fd6105c13660046134bd565b611512565b3480156105d257600080fd5b506102fd6105e136600461351e565b611921565b3480156105f257600080fd5b506102a0610601366004612e8a565b600d6020526000908152604090205460ff1681565b34801561062257600080fd5b506102fd61063136600461354a565b611937565b34801561064257600080fd5b506102fd610651366004613426565b611a41565b34801561066257600080fd5b5061069e610671366004612e8a565b6000908152600960205260409020805460019091015460ff8216926101009092046001600160a01b031691565b60405161025793929190613590565b3480156106b957600080fd5b5061024d60085481565b3480156106cf57600080fd5b506102fd6106de366004612e8a565b611abc565b3480156106ef57600080fd5b506102a06106fe3660046135b8565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561073857600080fd5b506102fd6107473660046135e2565b611b30565b34801561075857600080fd5b506102fd610767366004612ebf565b611b87565b34801561077857600080fd5b506102fd610787366004613647565b611ca2565b34801561079857600080fd5b506104056107a7366004612e8a565b6007602052600090815260409020546001600160a01b031681565b60006001600160a01b0383166108325760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061088957506001600160e01b031982166303a24d0760e21b145b806108a457506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606108a482611d0a565b600260055414156108d85760405162461bcd60e51b81526004016108299061367a565b60026005556001600a60006108eb611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115610919576109196133aa565b146109365760405162461bcd60e51b8152600401610829906136b1565b61094a6001600160a01b0384168383611df9565b5050600160055550565b600260055414156109775760405162461bcd60e51b81526004016108299061367a565b6002600555610984611e61565b61098c611dea565b6000838152600760205260409020546001600160a01b039081169116146109ed5760405162461bcd60e51b8152602060048201526015602482015274139bdd08185d5d1a1bdc9a5cd959081d1bc81cd95d605a1b6044820152606401610829565b6109f78282611eb0565b50506001600555565b6001600a6000610a0e611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115610a3c57610a3c6133aa565b14610a595760405162461bcd60e51b8152600401610829906136b1565b8015610a6a57610a67611f14565b50565b610a67611f75565b6001600a6000610a80611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115610aae57610aae6133aa565b14610acb5760405162461bcd60e51b8152600401610829906136b1565b610ad3611dea565b6001600160a01b0316826001600160a01b03161415610b345760405162461bcd60e51b815260206004820152601960248201527f596f752063616e6e6f74206772616e7420796f757273656c66000000000000006044820152606401610829565b6001600160a01b0382166000908152600a60205260409020805482919060ff191660018381811115610b6857610b686133aa565b02179055505050565b60026005541415610b945760405162461bcd60e51b81526004016108299061367a565b6002600555610ba1611e61565b610ba9611dea565b6000838152600760205260409020546001600160a01b03908116911614610c125760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420617574686f726973656420746f207472616e736665720000000000006044820152606401610829565b60009182526007602052604090912080546001600160a01b0319166001600160a01b039092169190911790556001600555565b610c4d611dea565b6001600160a01b0316856001600160a01b03161480610c735750610c73856106fe611dea565b610c8f5760405162461bcd60e51b8152600401610829906136e8565b610c9c8585858585611fb3565b5050505050565b6001600a6000610cb1611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115610cdf57610cdf6133aa565b14610cfc5760405162461bcd60e51b8152600401610829906136b1565b600c55565b60608151835114610d665760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610829565b6000835167ffffffffffffffff811115610d8257610d82612fc3565b604051908082528060200260200182016040528015610dab578160200160208202803683370190505b50905060005b8451811015610e2357610df6858281518110610dcf57610dcf613736565b6020026020010151858381518110610de957610de9613736565b60200260200101516107c2565b828281518110610e0857610e08613736565b6020908102919091010152610e1c81613762565b9050610db1565b509392505050565b6009602052600090815260409081902081516060810190925280549091908290829060ff166001811115610e6157610e616133aa565b6001811115610e7257610e726133aa565b8152815461010090046001600160a01b03166020820152600190910154604090910152600282015460039092015490919083565b6001600a6000610eb4611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115610ee257610ee26133aa565b14610eff5760405162461bcd60e51b8152600401610829906136b1565b6000908152600d60205260409020805460ff19169055565b60026005541415610f3a5760405162461bcd60e51b81526004016108299061367a565b6002600555610f47611e61565b60008511610fa85760405162461bcd60e51b815260206004820152602860248201527f496e697469616c20416d6f756e74206d7573742062652067726561746572207460448201526768616e207a65726f60c01b6064820152608401610829565b848110156110115760405162461bcd60e51b815260206004820152603060248201527f4d617820537570706c792073686f756c6420626520677265617465722074686560448201526f1b88125b9a5d1a585b08105b5bdd5b9d60821b6064820152608401610829565b600160086000828254611024919061377d565b909155506110329050611dea565b600854600090815260076020526040902080546001600160a01b0319166001600160a01b039290921691909117905561108561106c611dea565b60085487604051806020016040528060008152506121a9565b61109160085487611eb0565b600880546000908152600d602090815260408083208054600160ff1991821681179092558554855260099093528184208054610100600160a81b0319166101006001600160a01b038b1602179055845484528184208101879055935483529091208054879391921690838181111561110b5761110b6133aa565b021790555060088054600090815260096020526040808220600301849055825482529020600201869055547f87c00c50e802917355d27a9b0cf9cc1236a7d91ee9a4ed5e3065fbb50b82cfd861115f611dea565b6040516001600160a01b03909116815260200160405180910390a25050600160055550505050565b600260055414156111aa5760405162461bcd60e51b81526004016108299061367a565b60026005556111b7611e61565b6000838152600960205260409020600201546111d490839061377d565b600084815260096020526040902060030154101561122a5760405162461bcd60e51b815260206004820152601360248201527213585e0814dd5c1c1b1e48115e18d959591959606a1b6044820152606401610829565b6000838152600760209081526040808320546009909252822060020180546001600160a01b0390921692859261126190849061377d565b9091555061126f9050611dea565b6001600160a01b0316816001600160a01b0316141561129957611294858585856121a9565b611423565b600084815260096020526040812080546001918201546001600160a01b03610100830416939092909160ff16908111156112d5576112d56133aa565b146113145760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c79204552433230206865726560881b6044820152606401610829565b846001146113555760405162461bcd60e51b815260206004820152600e60248201526d4f6e6520746f6b656e206f6e6c7960901b6044820152606401610829565b600c54156113ac576000612710600c54836113709190613795565b61137a91906137b4565b905061139e611387611dea565b600b546001600160a01b03868116929116846122d7565b6113a881836137d6565b9150505b6113c96113b7611dea565b6001600160a01b0384169085846122d7565b6113d687876001876121a9565b604080518781526001600160a01b03841660208201529081018290527f66f5cd880edf48cdde6c966e5da0784fcc4c5e85572b8b3b62c4357798d447d7906060015b60405180910390a150505b50506001600555505050565b6001600a600061143d611dea565b6001600160a01b0316815260208101919091526040016000205460ff16600181111561146b5761146b6133aa565b146114885760405162461bcd60e51b8152600401610829906136b1565b611490611dea565b6001600160a01b0316816001600160a01b031614156114f15760405162461bcd60e51b815260206004820152601a60248201527f596f752063616e6e6f74207265766f6b6520796f757273656c660000000000006044820152606401610829565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600260055414156115355760405162461bcd60e51b81526004016108299061367a565b6002600555611542611e61565b61154a611dea565b6000848152600760205260409020546001600160a01b03908116911614156115ab5760405162461bcd60e51b815260206004820152601460248201527313dddb995c881a5cc81b9bdd08185b1b1bddd95960621b6044820152606401610829565b600160008481526009602052604090205460ff1660018111156115d0576115d06133aa565b146116165760405162461bcd60e51b81526020600482015260166024820152750a0e4d2c6ca82e6e6cae840daeae6e840c4ca408aa8960531b6044820152606401610829565b816001146116575760405162461bcd60e51b815260206004820152600e60248201526d4f6e6520746f6b656e206f6e6c7960901b6044820152606401610829565b60008381526009602052604090206002015461167490839061377d565b60008481526009602052604090206003015410156116ca5760405162461bcd60e51b815260206004820152601360248201527213585e0814dd5c1c1b1e48115e18d959591959606a1b6044820152606401610829565b600083815260096020526040812060018101546002909101805434938692916116f490849061377d565b90915550508181146117395760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610829565b600c5415611815576000612710600c54836117549190613795565b61175e91906137b4565b600b546040519192506000916001600160a01b039091169083908381818185875af1925050503d80600081146117b0576040519150601f19603f3d011682016040523d82523d6000602084013e6117b5565b606091505b50509050806118065760405162461bcd60e51b815260206004820152601b60248201527f4661696c656420746f2073656e6420457468657220746f2064657600000000006044820152606401610829565b61181082846137d6565b925050505b6000858152600760205260408082205490516001600160a01b039091169083908381818185875af1925050503d806000811461186d576040519150601f19603f3d011682016040523d82523d6000602084013e611872565b606091505b50509050806118c35760405162461bcd60e51b815260206004820152601f60248201527f4661696c656420746f2073656e6420457468657220746f2063726561746f72006044820152606401610829565b6118d087876001876121a9565b6040805187815273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee60208201529081018390527f66f5cd880edf48cdde6c966e5da0784fcc4c5e85572b8b3b62c4357798d447d790606001611418565b61193361192c611dea565b8383612315565b5050565b6002600554141561195a5760405162461bcd60e51b81526004016108299061367a565b6002600555611967611e61565b61196f611dea565b6000858152600760205260409020546001600160a01b039081169116146119d05760405162461bcd60e51b8152602060048201526015602482015274139bdd08185d5d1a1bdc9a5cd959081d1bc81cd95d605a1b6044820152606401610829565b6000848152600960205260409020805484919060ff1916600183818111156119fa576119fa6133aa565b021790555060009384526009602052604090932080546001600160a01b0390921661010002610100600160a81b031990921691909117815560019081019290925550600555565b6001600a6000611a4f611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115611a7d57611a7d6133aa565b14611a9a5760405162461bcd60e51b8152600401610829906136b1565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600a6000611aca611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115611af857611af86133aa565b14611b155760405162461bcd60e51b8152600401610829906136b1565b6000908152600d60205260409020805460ff19166001179055565b611b38611dea565b6001600160a01b0316856001600160a01b03161480611b5e5750611b5e856106fe611dea565b611b7a5760405162461bcd60e51b8152600401610829906136e8565b610c9c85858585856123f6565b60026005541415611baa5760405162461bcd60e51b81526004016108299061367a565b60026005556001600a6000611bbd611dea565b6001600160a01b0316815260208101919091526040016000205460ff166001811115611beb57611beb6133aa565b14611c085760405162461bcd60e51b8152600401610829906136b1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611c55576040519150601f19603f3d011682016040523d82523d6000602084013e611c5a565b606091505b505090508061094a5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610829565b60026005541415611cc55760405162461bcd60e51b81526004016108299061367a565b600260055561094a838383612539565b600060143610801590611cf257506006546001600160a01b031633145b15611d04575060131936013560601c90565b50335b90565b600081815260046020526040812080546060929190611d28906137ed565b80601f0160208091040260200160405190810160405280929190818152602001828054611d54906137ed565b8015611da15780601f10611d7657610100808354040283529160200191611da1565b820191906000526020600020905b815481529060010190602001808311611d8457829003601f168201915b505050505090506000815111611dbf57611dba836126d4565b611de3565b600381604051602001611dd3929190613844565b6040516020818303038152906040525b9392505050565b6000611df4611cd5565b905090565b6040516001600160a01b038316602482015260448101829052611e5c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612768565b505050565b600654600160a01b900460ff1615611eae5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610829565b565b60008281526004602090815260409091208251611ecf92840190612df1565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b611efb846108aa565b604051611f089190612f74565b60405180910390a25050565b611f1c611e61565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f58611dea565b6040516001600160a01b03909116815260200160405180910390a1565b611f7d61283a565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611f58611dea565b81518351146120155760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610829565b6001600160a01b03841661203b5760405162461bcd60e51b8152600401610829906138eb565b6000612045611dea565b905061205581878787878761288a565b60005b845181101561213b57600085828151811061207557612075613736565b60200260200101519050600085838151811061209357612093613736565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156120e35760405162461bcd60e51b815260040161082990613930565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061212090849061377d565b925050819055505050508061213490613762565b9050612058565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161218b92919061397a565b60405180910390a46121a1818787878787612a0e565b505050505050565b6001600160a01b0384166122095760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610829565b6000612213611dea565b9050600061222085612b6a565b9050600061222d85612b6a565b905061223e8360008985858961288a565b6000868152602081815260408083206001600160a01b038b1684529091528120805487929061226e90849061377d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46122ce83600089898989612bb5565b50505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261230f9085906323b872dd60e01b90608401611e25565b50505050565b816001600160a01b0316836001600160a01b031614156123895760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610829565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661241c5760405162461bcd60e51b8152600401610829906138eb565b6000612426611dea565b9050600061243385612b6a565b9050600061244085612b6a565b905061245083898985858961288a565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156124915760405162461bcd60e51b815260040161082990613930565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906124ce90849061377d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461252e848a8a8a8a8a612bb5565b505050505050505050565b6001600160a01b03831661259b5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610829565b60006125a5611dea565b905060006125b284612b6a565b905060006125bf84612b6a565b90506125df8387600085856040518060200160405280600081525061288a565b6000858152602081815260408083206001600160a01b038a1684529091529020548481101561265c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610829565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526122ce565b6060600280546126e3906137ed565b80601f016020809104026020016040519081016040528092919081815260200182805461270f906137ed565b801561275c5780601f106127315761010080835404028352916020019161275c565b820191906000526020600020905b81548152906001019060200180831161273f57829003601f168201915b50505050509050919050565b60006127bd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612c709092919063ffffffff16565b805190915015611e5c57808060200190518101906127db919061399f565b611e5c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610829565b600654600160a01b900460ff16611eae5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610829565b60005b83518110156122ce576001600160a01b03851630148015906128b757506001600160a01b03861615155b80156128cb57506001600160a01b03851615155b8015612904575060016001600160a01b0386166000908152600a602052604090205460ff166001811115612901576129016133aa565b14155b801561293d575060016001600160a01b0387166000908152600a602052604090205460ff16600181111561293a5761293a6133aa565b14155b8015612976575060016001600160a01b0388166000908152600a602052604090205460ff166001811115612973576129736133aa565b14155b156129fc57600d600085838151811061299157612991613736565b60209081029190910181015182528101919091526040016000205460ff16156129fc5760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420616c6c6f7720746f206265207472616e7366657265640000000000006044820152606401610829565b80612a0681613762565b91505061288d565b6001600160a01b0384163b156121a15760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612a5290899089908890889088906004016139bc565b6020604051808303816000875af1925050508015612a8d575060408051601f3d908101601f19168201909252612a8a91810190613a1a565b60015b612b3a57612a99613a37565b806308c379a01415612ad35750612aae613a52565b80612ab95750612ad5565b8060405162461bcd60e51b81526004016108299190612f74565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610829565b6001600160e01b0319811663bc197c8160e01b146122ce5760405162461bcd60e51b815260040161082990613adc565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612ba457612ba4613736565b602090810291909101015292915050565b6001600160a01b0384163b156121a15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612bf99089908990889088908890600401613b24565b6020604051808303816000875af1925050508015612c34575060408051601f3d908101601f19168201909252612c3191810190613a1a565b60015b612c4057612a99613a37565b6001600160e01b0319811663f23a6e6160e01b146122ce5760405162461bcd60e51b815260040161082990613adc565b6060612c7f8484600085612c87565b949350505050565b606082471015612ce85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610829565b6001600160a01b0385163b612d3f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610829565b600080866001600160a01b03168587604051612d5b9190613b5e565b60006040518083038185875af1925050503d8060008114612d98576040519150601f19603f3d011682016040523d82523d6000602084013e612d9d565b606091505b5091509150612dad828286612db8565b979650505050505050565b60608315612dc7575081611de3565b825115612dd75782518084602001fd5b8160405162461bcd60e51b81526004016108299190612f74565b828054612dfd906137ed565b90600052602060002090601f016020900481019282612e1f5760008555612e65565b82601f10612e3857805160ff1916838001178555612e65565b82800160010185558215612e65579182015b82811115612e65578251825591602001919060010190612e4a565b50612e71929150612e75565b5090565b5b80821115612e715760008155600101612e76565b600060208284031215612e9c57600080fd5b5035919050565b80356001600160a01b0381168114612eba57600080fd5b919050565b60008060408385031215612ed257600080fd5b612edb83612ea3565b946020939093013593505050565b6001600160e01b031981168114610a6757600080fd5b600060208284031215612f1157600080fd5b8135611de381612ee9565b60005b83811015612f37578181015183820152602001612f1f565b8381111561230f5750506000910152565b60008151808452612f60816020860160208601612f1c565b601f01601f19169290920160200192915050565b602081526000611de36020830184612f48565b600080600060608486031215612f9c57600080fd5b612fa584612ea3565b9250612fb360208501612ea3565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715612fff57612fff612fc3565b6040525050565b600082601f83011261301757600080fd5b813567ffffffffffffffff81111561303157613031612fc3565b604051613048601f8301601f191660200182612fd9565b81815284602083860101111561305d57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561308d57600080fd5b82359150602083013567ffffffffffffffff8111156130ab57600080fd5b6130b785828601613006565b9150509250929050565b8015158114610a6757600080fd5b6000602082840312156130e157600080fd5b8135611de3816130c1565b60028110610a6757600080fd5b6000806040838503121561310c57600080fd5b61311583612ea3565b91506020830135613125816130ec565b809150509250929050565b6000806040838503121561314357600080fd5b8235915061315360208401612ea3565b90509250929050565b600067ffffffffffffffff82111561317657613176612fc3565b5060051b60200190565b600082601f83011261319157600080fd5b8135602061319e8261315c565b6040516131ab8282612fd9565b83815260059390931b85018201928281019150868411156131cb57600080fd5b8286015b848110156131e657803583529183019183016131cf565b509695505050505050565b600080600080600060a0868803121561320957600080fd5b61321286612ea3565b945061322060208701612ea3565b9350604086013567ffffffffffffffff8082111561323d57600080fd5b61324989838a01613180565b9450606088013591508082111561325f57600080fd5b61326b89838a01613180565b9350608088013591508082111561328157600080fd5b5061328e88828901613006565b9150509295509295909350565b600080604083850312156132ae57600080fd5b823567ffffffffffffffff808211156132c657600080fd5b818501915085601f8301126132da57600080fd5b813560206132e78261315c565b6040516132f48282612fd9565b83815260059390931b850182019282810191508984111561331457600080fd5b948201945b838610156133395761332a86612ea3565b82529482019490820190613319565b9650508601359250508082111561334f57600080fd5b506130b785828601613180565b600081518084526020808501945080840160005b8381101561338c57815187529582019590820190600101613370565b509495945050505050565b602081526000611de3602083018461335c565b634e487b7160e01b600052602160045260246000fd5b600281106133de57634e487b7160e01b600052602160045260246000fd5b9052565b600060a0820190506133f58286516133c0565b6020858101516001600160a01b03169083015260409485015194820194909452606081019290925260809091015290565b60006020828403121561343857600080fd5b611de382612ea3565b60008060008060008060c0878903121561345a57600080fd5b863567ffffffffffffffff81111561347157600080fd5b61347d89828a01613006565b965050602087013594506040870135613495816130ec565b93506134a360608801612ea3565b92506080870135915060a087013590509295509295509295565b600080600080608085870312156134d357600080fd5b6134dc85612ea3565b93506020850135925060408501359150606085013567ffffffffffffffff81111561350657600080fd5b61351287828801613006565b91505092959194509250565b6000806040838503121561353157600080fd5b61353a83612ea3565b91506020830135613125816130c1565b6000806000806080858703121561356057600080fd5b843593506020850135613572816130ec565b925061358060408601612ea3565b9396929550929360600135925050565b6060810161359e82866133c0565b6001600160a01b0393909316602082015260400152919050565b600080604083850312156135cb57600080fd5b6135d483612ea3565b915061315360208401612ea3565b600080600080600060a086880312156135fa57600080fd5b61360386612ea3565b945061361160208701612ea3565b93506040860135925060608601359150608086013567ffffffffffffffff81111561363b57600080fd5b61328e88828901613006565b60008060006060848603121561365c57600080fd5b61366584612ea3565b95602085013595506040909401359392505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526017908201527f43616c6c6572206973206e6f74207468652061646d696e000000000000000000604082015260600190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156137765761377661374c565b5060010190565b600082198211156137905761379061374c565b500190565b60008160001904831182151516156137af576137af61374c565b500290565b6000826137d157634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156137e8576137e861374c565b500390565b600181811c9082168061380157607f821691505b6020821081141561382257634e487b7160e01b600052602260045260246000fd5b50919050565b6000815161383a818560208601612f1c565b9290920192915050565b600080845481600182811c91508083168061386057607f831692505b602080841082141561388057634e487b7160e01b86526022600452602486fd5b81801561389457600181146138a5576138d2565b60ff198616895284890196506138d2565b60008b81526020902060005b868110156138ca5781548b8201529085019083016138b1565b505084890196505b5050505050506138e28185613828565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60408152600061398d604083018561335c565b82810360208401526138e2818561335c565b6000602082840312156139b157600080fd5b8151611de3816130c1565b6001600160a01b0386811682528516602082015260a0604082018190526000906139e89083018661335c565b82810360608401526139fa818661335c565b90508281036080840152613a0e8185612f48565b98975050505050505050565b600060208284031215613a2c57600080fd5b8151611de381612ee9565b600060033d1115611d075760046000803e5060005160e01c90565b600060443d1015613a605790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715613a9057505050505090565b8285019150815181811115613aa85750505050505090565b843d8701016020828501011115613ac25750505050505090565b613ad160208286010187612fd9565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612dad90830184612f48565b60008251613b70818460208701612f1c565b919091019291505056fea2646970667358221220d441830084a20df047d530a9f65bd23dfd317f22fd652e534f20f172ab4f09a464736f6c634300080a0033000000000000000000000000da78a11fd57af7be2edd804840ea7f4c2a38801d
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000da78a11fd57af7be2edd804840ea7f4c2a38801d
-----Decoded View---------------
Arg [0] : _forwarder (address): 0xda78a11fd57af7be2edd804840ea7f4c2a38801d
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000da78a11fd57af7be2edd804840ea7f4c2a38801d
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.