More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 422,574 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 136108638 | 34 hrs ago | IN | 0 ETH | 0.000000031642 | ||||
Set Approval For... | 136108609 | 34 hrs ago | IN | 0 ETH | 0.000000032234 | ||||
Set Approval For... | 136108601 | 34 hrs ago | IN | 0 ETH | 0.000000032637 | ||||
Set Approval For... | 136108595 | 34 hrs ago | IN | 0 ETH | 0.000000032916 | ||||
Set Approval For... | 136108577 | 34 hrs ago | IN | 0 ETH | 0.000000032119 | ||||
Set Approval For... | 136080870 | 2 days ago | IN | 0 ETH | 0.000000042946 | ||||
Set Approval For... | 136064489 | 2 days ago | IN | 0 ETH | 0.000000030634 | ||||
Set Approval For... | 136064482 | 2 days ago | IN | 0 ETH | 0.000000031113 | ||||
Set Approval For... | 136064476 | 2 days ago | IN | 0 ETH | 0.00000003046 | ||||
Set Approval For... | 136064436 | 2 days ago | IN | 0 ETH | 0.000000031023 | ||||
Set Approval For... | 136064429 | 2 days ago | IN | 0 ETH | 0.000000029628 | ||||
Set Approval For... | 136064424 | 2 days ago | IN | 0 ETH | 0.00000002963 | ||||
Set Approval For... | 136064393 | 2 days ago | IN | 0 ETH | 0.000000030986 | ||||
Set Approval For... | 136064362 | 2 days ago | IN | 0 ETH | 0.000000031528 | ||||
Set Approval For... | 136064354 | 2 days ago | IN | 0 ETH | 0.000000031264 | ||||
Set Approval For... | 136064347 | 2 days ago | IN | 0 ETH | 0.000000033479 | ||||
Set Approval For... | 136017785 | 3 days ago | IN | 0 ETH | 0.000000025046 | ||||
Set Approval For... | 136017777 | 3 days ago | IN | 0 ETH | 0.000000025068 | ||||
Set Approval For... | 136017770 | 3 days ago | IN | 0 ETH | 0.000000025068 | ||||
Set Approval For... | 135999609 | 3 days ago | IN | 0 ETH | 0.000000031151 | ||||
Set Approval For... | 135999449 | 3 days ago | IN | 0 ETH | 0.00000003206 | ||||
Set Approval For... | 135999444 | 3 days ago | IN | 0 ETH | 0.000000032068 | ||||
Set Approval For... | 135999437 | 3 days ago | IN | 0 ETH | 0.000000031636 | ||||
Set Approval For... | 135999432 | 3 days ago | IN | 0 ETH | 0.000000031925 | ||||
Set Approval For... | 135999425 | 3 days ago | IN | 0 ETH | 0.000000032241 |
View more zero value Internal Transactions in Advanced View mode
Contract Source Code Verified (Exact Match)
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MemoryofEthereum is ERC1155, ERC1155Supply, AccessControl, Ownable { bytes32 public constant OPERATION_ROLE = keccak256("OPERATION_ROLE"); using Strings for uint256; string public baseURI; uint256 private _tokenIdCounter = 1; mapping(uint256 => string) private _tokenIdTypes; mapping(string => uint256) private _typeTokenIds; string[] private _types; mapping(uint256 => bool) _tokenIdMintAllowed; struct MemberTypeAmounts { string[] types; uint256[] amounts; } event TypeAdded(address operator, string newType); event TypeRemoved(address operator, string removedType); event BaseURIChanged( address operator, string fromBaseURI, string toBaseURI ); constructor( address initialOwner, string memory _baseURI ) ERC1155(_baseURI) Ownable(initialOwner) { baseURI = _baseURI; _grantRole(DEFAULT_ADMIN_ROLE, initialOwner); _grantRole(OPERATION_ROLE, initialOwner); } function updateBaseURI( string calldata _newBaseURI ) external onlyRole(DEFAULT_ADMIN_ROLE) { emit BaseURIChanged(msg.sender, baseURI, _newBaseURI); baseURI = _newBaseURI; } function addType(string memory nftType) public onlyRole(OPERATION_ROLE) { require(_typeTokenIds[nftType] == 0, "Type already exists"); uint256 tokenId = _tokenIdCounter; _tokenIdTypes[tokenId] = nftType; _typeTokenIds[nftType] = tokenId; _types.push(nftType); _tokenIdMintAllowed[tokenId] = false; _tokenIdCounter += 1; emit TypeAdded(msg.sender, nftType); } function removeType(string memory nftType) public onlyRole(OPERATION_ROLE) { uint256 tokenId = _typeTokenIds[nftType]; require(tokenId != 0, "Type does not exists"); require( totalSupply(tokenId) == 0, "The type is already in use by users." ); delete _tokenIdTypes[tokenId]; delete _typeTokenIds[nftType]; for (uint256 i = 0; i < _types.length; i++) { if ( keccak256(abi.encodePacked(_types[i])) == keccak256(abi.encodePacked(nftType)) ) { if (i == _types.length - 1) { _types.pop(); } else { _types[i] = _types[_types.length - 1]; _types.pop(); } break; } } emit TypeRemoved(msg.sender, nftType); } function getAllTypes() public view returns (string[] memory) { return _types; } function getTokenId(string calldata nftType) public view returns (uint256) { return _typeTokenIds[nftType]; } function controlMint( string memory nftType, bool allow ) public onlyRole(OPERATION_ROLE) { uint256 tokenId = _typeTokenIds[nftType]; require(tokenId != 0, "The type does not exist"); if (allow == true) { require( _tokenIdMintAllowed[tokenId] == false, "Minting of this NFT is allowed." ); } else { require( _tokenIdMintAllowed[tokenId] == true, "Minting of this NFT is not allowed." ); } _tokenIdMintAllowed[tokenId] = allow; } function mint(string calldata nftType) external { uint256 tokenId = _typeTokenIds[nftType]; require(tokenId != 0, "The type does not exist"); require( _tokenIdMintAllowed[tokenId] == true, "Minting of this NFT is not allowed." ); require( balanceOf(_msgSender(), tokenId) < 1, "You have owned the NFT." ); _mint(_msgSender(), tokenId, 1, ""); } function mintAndAirdrop( string calldata nftType, address[] calldata users, uint256[] calldata amounts ) external onlyRole(OPERATION_ROLE) { uint256 tokenId = _typeTokenIds[nftType]; require(tokenId != 0, "The type does not exist"); require( users.length == amounts.length, "Users and amounts length not equal" ); for (uint256 i = 0; i < users.length; i++) { _mint(users[i], tokenId, amounts[i], ""); } } function _update( address from, address to, uint256[] memory ids, uint256[] memory values ) internal override(ERC1155, ERC1155Supply) { super._update(from, to, ids, values); } function supportsInterface( bytes4 interfaceId ) public view override(ERC1155, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } function setApprovalForAll(address, bool) public virtual override(ERC1155) { revert("Cannot setApprovalForAll."); } function isApprovedForAll( address, address ) public view virtual override(ERC1155) returns (bool) { return false; } function safeTransferFrom( address, address, uint256, uint256, bytes memory ) public virtual override(ERC1155) { revert("Cannot safeTransferFrom."); } function safeBatchTransferFrom( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override(ERC1155) { revert("Cannot safeBatchTransferFrom."); } function uri( uint256 tokenId ) public view virtual override returns (string memory) { return string(abi.encodePacked(baseURI, _tokenIdTypes[tokenId])); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.20; import {ERC1155} from "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. * * NOTE: This contract implies a global limit of 2**256 - 1 to the number of tokens * that can be minted. * * CAUTION: This extension should not be added in an upgrade to an already deployed contract. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 id => uint256) private _totalSupply; uint256 private _totalSupplyAll; /** * @dev Total value of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Total value of tokens. */ function totalSupply() public view virtual returns (uint256) { return _totalSupplyAll; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return totalSupply(id) > 0; } /** * @dev See {ERC1155-_update}. */ function _update( address from, address to, uint256[] memory ids, uint256[] memory values ) internal virtual override { super._update(from, to, ids, values); if (from == address(0)) { uint256 totalMintValue = 0; for (uint256 i = 0; i < ids.length; ++i) { uint256 value = values[i]; // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply[ids[i]] += value; totalMintValue += value; } // Overflow check required: The rest of the code assumes that totalSupplyAll never overflows _totalSupplyAll += totalMintValue; } if (to == address(0)) { uint256 totalBurnValue = 0; for (uint256 i = 0; i < ids.length; ++i) { uint256 value = values[i]; unchecked { // Overflow not possible: values[i] <= balanceOf(from, ids[i]) <= totalSupply(ids[i]) _totalSupply[ids[i]] -= value; // Overflow not possible: sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll totalBurnValue += value; } } unchecked { // Overflow not possible: totalBurnValue = sum_i(values[i]) <= sum_i(totalSupply(ids[i])) <= totalSupplyAll _totalSupplyAll -= totalBurnValue; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; import {IERC1155} from "./IERC1155.sol"; import {IERC1155Receiver} from "./IERC1155Receiver.sol"; import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol"; import {Context} from "../../utils/Context.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {Arrays} from "../../utils/Arrays.sol"; import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 */ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors { using Arrays for uint256[]; using Arrays for address[]; mapping(uint256 id => mapping(address account => uint256)) private _balances; mapping(address account => mapping(address operator => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 /* id */) public view virtual returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. */ function balanceOf(address account, uint256 id) public view virtual returns (uint256) { 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 returns (uint256[] memory) { if (accounts.length != ids.length) { revert ERC1155InvalidArrayLength(ids.length, accounts.length); } uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeTransferFrom(from, to, id, value, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeBatchTransferFrom(from, to, ids, values, data); } /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` * (or `to`) is the zero address. * * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. * * Requirements: * * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. * - `ids` and `values` must have the same length. * * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. */ function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { if (ids.length != values.length) { revert ERC1155InvalidArrayLength(ids.length, values.length); } address operator = _msgSender(); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids.unsafeMemoryAccess(i); uint256 value = values.unsafeMemoryAccess(i); if (from != address(0)) { uint256 fromBalance = _balances[id][from]; if (fromBalance < value) { revert ERC1155InsufficientBalance(from, fromBalance, value, id); } unchecked { // Overflow not possible: value <= fromBalance _balances[id][from] = fromBalance - value; } } if (to != address(0)) { _balances[id][to] += value; } } if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); emit TransferSingle(operator, from, to, id, value); } else { emit TransferBatch(operator, from, to, ids, values); } } /** * @dev Version of {_update} that performs the token acceptance check by calling * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it * contains code (eg. is a smart contract at the moment of execution). * * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any * update to the contract state after this function would break the check-effect-interaction pattern. Consider * overriding {_update} instead. */ function _updateWithAcceptanceCheck( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { _update(from, to, ids, values); if (to != address(0)) { address operator = _msgSender(); if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data); } else { _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data); } } } /** * @dev Transfers a `value` 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 `value` 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 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, to, ids, values, 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. * - `ids` and `values` must have the same length. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, to, ids, values, 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 values 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 a `value` amount of tokens of 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 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `values` must have the same length. * - `to` cannot be the zero address. * - 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 values, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev Destroys a `value` amount of tokens of type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. */ function _burn(address from, uint256 id, uint256 value) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. * - `ids` and `values` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the zero address. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC1155InvalidOperator(address(0)); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address * if it contains code at the moment of execution. */ function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address * if it contains code at the moment of execution. */ function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Creates an array in memory with only one value for each of the elements provided. */ function _asSingletonArrays( uint256 element1, uint256 element2 ) private pure returns (uint256[] memory array1, uint256[] memory array2) { /// @solidity memory-safe-assembly assembly { // Load the free memory pointer array1 := mload(0x40) // Set array length to 1 mstore(array1, 1) // Store the single element at the next word after the length (where content starts) mstore(add(array1, 0x20), element1) // Repeat for next array locating it right after the first array array2 := add(array1, 0x40) mstore(array2, 1) mstore(add(array2, 0x20), element2) // Update the free memory pointer by pointing after the second array mstore(0x40, add(array2, 0x40)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; 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_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; import {Math} from "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { uint256 low = 0; uint256 high = array.length; if (high == 0) { return 0; } while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds towards zero (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ 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 (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of 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 value 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 a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * 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 `value` 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 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * * - `ids` and `values` 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 values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"string","name":"fromBaseURI","type":"string"},{"indexed":false,"internalType":"string","name":"toBaseURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"string","name":"newType","type":"string"}],"name":"TypeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"string","name":"removedType","type":"string"}],"name":"TypeRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nftType","type":"string"}],"name":"addType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nftType","type":"string"},{"internalType":"bool","name":"allow","type":"bool"}],"name":"controlMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTypes","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nftType","type":"string"}],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nftType","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"nftType","type":"string"},{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintAndAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nftType","type":"string"}],"name":"removeType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600160085534801562000015575f80fd5b5060405162002ab938038062002ab98339810160408190526200003891620001f8565b81816200004581620000d1565b506001600160a01b0381166200007457604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6200007f81620000e3565b5060076200008e828262000370565b506200009b5f8362000134565b50620000c87f20296b01d0b6bd176f0c1e29644934c0047abf080dae43609a1bbc09e39bafdb8362000134565b5050506200043c565b6002620000df828262000370565b5050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f8281526005602090815260408083206001600160a01b038516845290915281205460ff16620001db575f8381526005602090815260408083206001600160a01b03861684529091529020805460ff19166001179055620001923390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001de565b505f5b92915050565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156200020a575f80fd5b82516001600160a01b038116811462000221575f80fd5b602084810151919350906001600160401b038082111562000240575f80fd5b818601915086601f83011262000254575f80fd5b815181811115620002695762000269620001e4565b604051601f8201601f19908116603f01168101908382118183101715620002945762000294620001e4565b816040528281528986848701011115620002ac575f80fd5b5f93505b82841015620002cf5784840186015181850187015292850192620002b0565b5f8684830101528096505050505050509250929050565b600181811c90821680620002fb57607f821691505b6020821081036200031a57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200036b57805f5260205f20601f840160051c81016020851015620003475750805b601f840160051c820191505b8181101562000368575f815560010162000353565b50505b505050565b81516001600160401b038111156200038c576200038c620001e4565b620003a4816200039d8454620002e6565b8462000320565b602080601f831160018114620003da575f8415620003c25750858301515b5f19600386901b1c1916600185901b17855562000434565b5f85815260208120601f198616915b828110156200040a57888601518255948401946001909101908401620003e9565b50858210156200042857878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b61266f806200044a5f395ff3fe608060405234801561000f575f80fd5b50600436106101d0575f3560e01c8063715018a6116100fe578063bd85b0391161009e578063e7f08e691161006e578063e7f08e6914610408578063e985e9c51461041b578063f242432a14610430578063f2fde38b14610443575f80fd5b8063bd85b039146103b0578063d547741f146103cf578063d85d3d27146103e2578063e15e2fd4146103f5575f80fd5b806391d14854116100d957806391d1485414610370578063931688cb14610383578063a217fddf14610396578063a22cb4651461039d575f80fd5b8063715018a6146103395780638545d8df146103415780638da5cb5b14610355575f80fd5b80632eb2c2d6116101745780634f558e79116101445780634f558e79146102ea57806364e7edc91461030b57806368cd3daf1461031e5780636c0360eb14610331575f80fd5b80632eb2c2d61461028f5780632f2ff15d146102a457806336568abe146102b75780634e1273f4146102ca575f80fd5b80630e89341c116101af5780630e89341c1461023257806318160ddd146102525780631e7663bc1461025a578063248a9ca31461026d575f80fd5b8062fdd58e146101d457806301ffc9a7146101fa57806309dddcf01461021d575b5f80fd5b6101e76101e2366004611903565b610456565b6040519081526020015b60405180910390f35b61020d610208366004611940565b61047d565b60405190151581526020016101f1565b610225610487565b6040516101f191906119af565b610245610240366004611a11565b61055b565b6040516101f19190611a28565b6004546101e7565b6101e7610268366004611a7e565b610594565b6101e761027b366004611a11565b5f9081526005602052604090206001015490565b6102a261029d366004611bf9565b6105be565b005b6102a26102b2366004611c9b565b61060b565b6102a26102c5366004611c9b565b610635565b6102dd6102d8366004611cc5565b61066d565b6040516101f19190611db8565b61020d6102f8366004611a11565b5f90815260036020526040902054151590565b6102a2610319366004611e0a565b610737565b6102a261032c366004611eab565b610860565b610245610978565b6102a2610a04565b6101e75f8051602061261a83398151915281565b6006546040516001600160a01b0390911681526020016101f1565b61020d61037e366004611c9b565b610a17565b6102a2610391366004611a7e565b610a41565b6101e75f81565b6102a26103ab366004611eec565b610a96565b6101e76103be366004611a11565b5f9081526003602052604090205490565b6102a26103dd366004611c9b565b610ade565b6102a26103f0366004611a7e565b610b02565b6102a2610403366004611f14565b610beb565b6102a2610416366004611f14565b610e6f565b61020d610429366004611f4d565b5f92915050565b6102a261043e366004611f75565b610fc0565b6102a2610451366004611fd4565b611008565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f61047782611045565b6060600b805480602002602001604051908101604052809291908181526020015f905b82821015610552578382905f5260205f200180546104c790611fed565b80601f01602080910402602001604051908101604052809291908181526020018280546104f390611fed565b801561053e5780601f106105155761010080835404028352916020019161053e565b820191905f5260205f20905b81548152906001019060200180831161052157829003601f168201915b5050505050815260200190600101906104aa565b50505050905090565b5f81815260096020908152604091829020915160609261057e9260079201612094565b6040516020818303038152906040529050919050565b5f600a83836040516105a79291906120a8565b908152602001604051809103902054905092915050565b60405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207361666542617463685472616e7366657246726f6d2e00000060448201526064015b60405180910390fd5b5f8281526005602052604090206001015461062581611069565b61062f8383611073565b50505050565b6001600160a01b038116331461065e5760405163334bd91960e11b815260040160405180910390fd5b6106688282611104565b505050565b6060815183511461069e5781518351604051635b05999160e01b815260048101929092526024820152604401610602565b5f83516001600160401b038111156106b8576106b8611abc565b6040519080825280602002602001820160405280156106e1578160200160208202803683370190505b5090505f5b845181101561072f5760208082028601015161070a90602080840287010151610456565b82828151811061071c5761071c6120b7565b60209081029190910101526001016106e6565b509392505050565b5f8051602061261a83398151915261074e81611069565b5f600a88886040516107619291906120a8565b9081526020016040518091039020549050805f036107915760405162461bcd60e51b8152600401610602906120cb565b8483146107eb5760405162461bcd60e51b815260206004820152602260248201527f557365727320616e6420616d6f756e7473206c656e677468206e6f7420657175604482015261185b60f21b6064820152608401610602565b5f5b858110156108555761084d87878381811061080a5761080a6120b7565b905060200201602081019061081f9190611fd4565b83878785818110610832576108326120b7565b9050602002013560405180602001604052805f81525061116f565b6001016107ed565b505050505050505050565b5f8051602061261a83398151915261087781611069565b5f600a846040516108889190612102565b9081526020016040518091039020549050805f036108b85760405162461bcd60e51b8152600401610602906120cb565b821515600103610925575f818152600c602052604090205460ff16156109205760405162461bcd60e51b815260206004820152601f60248201527f4d696e74696e67206f662074686973204e465420697320616c6c6f7765642e006044820152606401610602565b610957565b5f818152600c602052604090205460ff1615156001146109575760405162461bcd60e51b81526004016106029061211d565b5f908152600c60205260409020805460ff1916921515929092179091555050565b6007805461098590611fed565b80601f01602080910402602001604051908101604052809291908181526020018280546109b190611fed565b80156109fc5780601f106109d3576101008083540402835291602001916109fc565b820191905f5260205f20905b8154815290600101906020018083116109df57829003601f168201915b505050505081565b610a0c6111d2565b610a155f6111ff565b565b5f9182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f610a4b81611069565b7f92bf6a7b8937c17e6781a68d61f9fe6a5ce08604b96ca2206f311049a3a295ea3360078585604051610a819493929190612188565b60405180910390a1600761062f83858361228f565b60405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420736574417070726f76616c466f72416c6c2e000000000000006044820152606401610602565b5f82815260056020526040902060010154610af881611069565b61062f8383611104565b5f600a8383604051610b159291906120a8565b9081526020016040518091039020549050805f03610b455760405162461bcd60e51b8152600401610602906120cb565b5f818152600c602052604090205460ff161515600114610b775760405162461bcd60e51b81526004016106029061211d565b6001610b833383610456565b10610bd05760405162461bcd60e51b815260206004820152601760248201527f596f752068617665206f776e656420746865204e46542e0000000000000000006044820152606401610602565b6106683382600160405180602001604052805f81525061116f565b5f8051602061261a833981519152610c0281611069565b5f600a83604051610c139190612102565b9081526020016040518091039020549050805f03610c6a5760405162461bcd60e51b81526020600482015260146024820152735479706520646f6573206e6f742065786973747360601b6044820152606401610602565b5f8181526003602052604090205415610cd15760405162461bcd60e51b8152602060048201526024808201527f546865207479706520697320616c726561647920696e2075736520627920757360448201526332b9399760e11b6064820152608401610602565b5f818152600960205260408120610ce79161189e565b600a83604051610cf79190612102565b90815260200160405180910390205f90555f5b600b54811015610e305783604051602001610d259190612102565b60405160208183030381529060405280519060200120600b8281548110610d4e57610d4e6120b7565b905f5260205f2001604051602001610d669190612343565b6040516020818303038152906040528051906020012003610e2857600b54610d9090600190612362565b8103610dc757600b805480610da757610da7612375565b600190038181905f5260205f20015f610dc0919061189e565b9055610e30565b600b8054610dd790600190612362565b81548110610de757610de76120b7565b905f5260205f2001600b8281548110610e0257610e026120b7565b905f5260205f20019081610e169190612389565b50600b805480610da757610da7612375565b600101610d0a565b507f08c30917c060f6d313699fca2192287a5aaca95a04887ebd32fdd1ba4fce3ea33384604051610e62929190612458565b60405180910390a1505050565b5f8051602061261a833981519152610e8681611069565b600a82604051610e969190612102565b9081526020016040518091039020545f14610ee95760405162461bcd60e51b81526020600482015260136024820152725479706520616c72656164792065786973747360681b6044820152606401610602565b6008545f818152600960205260409020610f03848261247b565b5080600a84604051610f159190612102565b90815260405190819003602001902055600b80546001810182555f919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db901610f60848261247b565b505f818152600c60205260408120805460ff191690556008805460019290610f89908490612529565b90915550506040517f0fa7c87eece2e23c6baf7456e558b83b11afc1f81d3136dc4a8e26b9c1327ebf90610e629033908690612458565b60405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736166655472616e7366657246726f6d2e00000000000000006044820152606401610602565b6110106111d2565b6001600160a01b03811661103957604051631e4fbdf760e01b81525f6004820152602401610602565b611042816111ff565b50565b5f6001600160e01b03198216637965db0b60e01b1480610477575061047782611250565b611042813361129f565b5f61107e8383610a17565b6110fd575f8381526005602090815260408083206001600160a01b03861684529091529020805460ff191660011790556110b53390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610477565b505f610477565b5f61110f8383610a17565b156110fd575f8381526005602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610477565b6001600160a01b03841661119857604051632bfa23e760e11b81525f6004820152602401610602565b604080516001808252602082018690528183019081526060820185905260808201909252906111ca5f878484876112dc565b505050505050565b6006546001600160a01b03163314610a155760405163118cdaa760e01b8152336004820152602401610602565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6001600160e01b03198216636cdb3d1360e11b148061128057506001600160e01b031982166303a24d0760e21b145b8061047757506301ffc9a760e01b6001600160e01b0319831614610477565b6112a98282610a17565b6112d85760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610602565b5050565b6112e885858585611336565b6001600160a01b0384161561132f5782513390600103611321576020848101519084015161131a838989858589611342565b50506111ca565b6111ca81878787878761146c565b5050505050565b61062f84848484611553565b6001600160a01b0384163b156111ca5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611386908990899088908890889060040161253c565b6020604051808303815f875af19250505080156113c0575060408051601f3d908101601f191682019092526113bd91810190612580565b60015b611427573d8080156113ed576040519150601f19603f3d011682016040523d82523d5f602084013e6113f2565b606091505b5080515f0361141f57604051632bfa23e760e11b81526001600160a01b0386166004820152602401610602565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461146357604051632bfa23e760e11b81526001600160a01b0386166004820152602401610602565b50505050505050565b6001600160a01b0384163b156111ca5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906114b0908990899088908890889060040161259b565b6020604051808303815f875af19250505080156114ea575060408051601f3d908101601f191682019092526114e791810190612580565b60015b611517573d8080156113ed576040519150601f19603f3d011682016040523d82523d5f602084013e6113f2565b6001600160e01b0319811663bc197c8160e01b1461146357604051632bfa23e760e11b81526001600160a01b0386166004820152602401610602565b61155f8484848461168f565b6001600160a01b038416611603575f805b83518110156115ea575f83828151811061158c5761158c6120b7565b602002602001015190508060035f8785815181106115ac576115ac6120b7565b602002602001015181526020019081526020015f205f8282546115cf9190612529565b909155506115df90508184612529565b925050600101611570565b508060045f8282546115fc9190612529565b9091555050505b6001600160a01b03831661062f575f805b835181101561167e575f838281518110611630576116306120b7565b602002602001015190508060035f878581518110611650576116506120b7565b60209081029190910181015182528101919091526040015f2080549190910390559190910190600101611614565b506004805491909103905550505050565b80518251146116be5781518151604051635b05999160e01b815260048101929092526024820152604401610602565b335f5b83518110156117c0576020818102858101820151908501909101516001600160a01b03881615611772575f828152602081815260408083206001600160a01b038c1684529091529020548181101561174c576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610602565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b038716156117b6575f828152602081815260408083206001600160a01b038b168452909152812080548392906117b0908490612529565b90915550505b50506001016116c1565b5082516001036118405760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611831929190918252602082015260400190565b60405180910390a4505061132f565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161188f9291906125ec565b60405180910390a45050505050565b5080546118aa90611fed565b5f825580601f106118b9575050565b601f0160209004905f5260205f209081019061104291905b808211156118e4575f81556001016118d1565b5090565b80356001600160a01b03811681146118fe575f80fd5b919050565b5f8060408385031215611914575f80fd5b61191d836118e8565b946020939093013593505050565b6001600160e01b031981168114611042575f80fd5b5f60208284031215611950575f80fd5b813561195b8161192b565b9392505050565b5f5b8381101561197c578181015183820152602001611964565b50505f910152565b5f815180845261199b816020860160208601611962565b601f01601f19169290920160200192915050565b5f60208083016020845280855180835260408601915060408160051b8701019250602087015f5b82811015611a0457603f198886030184526119f2858351611984565b945092850192908501906001016119d6565b5092979650505050505050565b5f60208284031215611a21575f80fd5b5035919050565b602081525f61195b6020830184611984565b5f8083601f840112611a4a575f80fd5b5081356001600160401b03811115611a60575f80fd5b602083019150836020828501011115611a77575f80fd5b9250929050565b5f8060208385031215611a8f575f80fd5b82356001600160401b03811115611aa4575f80fd5b611ab085828601611a3a565b90969095509350505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715611af857611af8611abc565b604052919050565b5f6001600160401b03821115611b1857611b18611abc565b5060051b60200190565b5f82601f830112611b31575f80fd5b81356020611b46611b4183611b00565b611ad0565b8083825260208201915060208460051b870101935086841115611b67575f80fd5b602086015b84811015611b835780358352918301918301611b6c565b509695505050505050565b5f82601f830112611b9d575f80fd5b81356001600160401b03811115611bb657611bb6611abc565b611bc9601f8201601f1916602001611ad0565b818152846020838601011115611bdd575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a08688031215611c0d575f80fd5b611c16866118e8565b9450611c24602087016118e8565b935060408601356001600160401b0380821115611c3f575f80fd5b611c4b89838a01611b22565b94506060880135915080821115611c60575f80fd5b611c6c89838a01611b22565b93506080880135915080821115611c81575f80fd5b50611c8e88828901611b8e565b9150509295509295909350565b5f8060408385031215611cac575f80fd5b82359150611cbc602084016118e8565b90509250929050565b5f8060408385031215611cd6575f80fd5b82356001600160401b0380821115611cec575f80fd5b818501915085601f830112611cff575f80fd5b81356020611d0f611b4183611b00565b82815260059290921b84018101918181019089841115611d2d575f80fd5b948201945b83861015611d5257611d43866118e8565b82529482019490820190611d32565b96505086013592505080821115611d67575f80fd5b50611d7485828601611b22565b9150509250929050565b5f815180845260208085019450602084015f5b83811015611dad57815187529582019590820190600101611d91565b509495945050505050565b602081525f61195b6020830184611d7e565b5f8083601f840112611dda575f80fd5b5081356001600160401b03811115611df0575f80fd5b6020830191508360208260051b8501011115611a77575f80fd5b5f805f805f8060608789031215611e1f575f80fd5b86356001600160401b0380821115611e35575f80fd5b611e418a838b01611a3a565b90985096506020890135915080821115611e59575f80fd5b611e658a838b01611dca565b90965094506040890135915080821115611e7d575f80fd5b50611e8a89828a01611dca565b979a9699509497509295939492505050565b803580151581146118fe575f80fd5b5f8060408385031215611ebc575f80fd5b82356001600160401b03811115611ed1575f80fd5b611edd85828601611b8e565b925050611cbc60208401611e9c565b5f8060408385031215611efd575f80fd5b611f06836118e8565b9150611cbc60208401611e9c565b5f60208284031215611f24575f80fd5b81356001600160401b03811115611f39575f80fd5b611f4584828501611b8e565b949350505050565b5f8060408385031215611f5e575f80fd5b611f67836118e8565b9150611cbc602084016118e8565b5f805f805f60a08688031215611f89575f80fd5b611f92866118e8565b9450611fa0602087016118e8565b9350604086013592506060860135915060808601356001600160401b03811115611fc8575f80fd5b611c8e88828901611b8e565b5f60208284031215611fe4575f80fd5b61195b826118e8565b600181811c9082168061200157607f821691505b60208210810361201f57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f815461203181611fed565b60018281168015612049576001811461205e5761208a565b60ff198416875282151583028701945061208a565b855f526020805f205f5b858110156120815781548a820152908401908201612068565b50505082870194505b5050505092915050565b5f611f456120a28386612025565b84612025565b818382375f9101908152919050565b634e487b7160e01b5f52603260045260245ffd5b60208082526017908201527f546865207479706520646f6573206e6f74206578697374000000000000000000604082015260600190565b5f8251612113818460208701611962565b9190910192915050565b60208082526023908201527f4d696e74696e67206f662074686973204e4654206973206e6f7420616c6c6f7760408201526232b21760e91b606082015260800190565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b03851681525f6020606060208401525f86546121a981611fed565b806060870152608060018084165f81146121ca57600181146121e657612213565b60ff19851660808a0152608084151560051b8a01019550612213565b8b5f5260205f205f5b8581101561220a5781548b82018601529083019088016121ef565b8a016080019650505b5050505050838103604085015261222b818688612160565b98975050505050505050565b601f82111561066857805f5260205f20601f840160051c8101602085101561225c5750805b601f840160051c820191505b8181101561132f575f8155600101612268565b5f19600383901b1c191660019190911b1790565b6001600160401b038311156122a6576122a6611abc565b6122ba836122b48354611fed565b83612237565b5f601f8411600181146122e6575f85156122d45750838201355b6122de868261227b565b84555061132f565b5f83815260208120601f198716915b8281101561231557868501358255602094850194600190920191016122f5565b5086821015612331575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f61195b8284612025565b634e487b7160e01b5f52601160045260245ffd5b818103818111156104775761047761234e565b634e487b7160e01b5f52603160045260245ffd5b818103612394575050565b61239e8254611fed565b6001600160401b038111156123b5576123b5611abc565b6123c9816123c38454611fed565b84612237565b5f601f8211600181146123f5575f83156123e35750848201545b6123ed848261227b565b85555061132f565b5f8581526020808220868352908220601f198616925b8381101561242b578286015482556001958601959091019060200161240b565b508583101561244857818501545f19600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03831681526040602082018190525f90611f4590830184611984565b81516001600160401b0381111561249457612494611abc565b6124a2816123c38454611fed565b602080601f8311600181146124d0575f84156124be5750858301515b6124c8858261227b565b8655506111ca565b5f85815260208120601f198616915b828110156124fe578886015182559484019460019091019084016124df565b50858210156124485793909601515f1960f8600387901b161c19169092555050600190811b01905550565b808201808211156104775761047761234e565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f9061257590830184611984565b979650505050505050565b5f60208284031215612590575f80fd5b815161195b8161192b565b6001600160a01b0386811682528516602082015260a0604082018190525f906125c690830186611d7e565b82810360608401526125d88186611d7e565b9050828103608084015261222b8185611984565b604081525f6125fe6040830185611d7e565b82810360208401526126108185611d7e565b9594505050505056fe20296b01d0b6bd176f0c1e29644934c0047abf080dae43609a1bbc09e39bafdba264697066735822122080a894f16b47925724b4080604ad03d2e98e35b445f4bca811869101c9ca9d5d64736f6c63430008180033000000000000000000000000ee972e35311f65e6fd8f6ea7228bf388b53e1d4a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656964347577686a73766565353276666a6532656c6e3732757577713279766e6e37776d78646e6e6b677172327263633766357571792f0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106101d0575f3560e01c8063715018a6116100fe578063bd85b0391161009e578063e7f08e691161006e578063e7f08e6914610408578063e985e9c51461041b578063f242432a14610430578063f2fde38b14610443575f80fd5b8063bd85b039146103b0578063d547741f146103cf578063d85d3d27146103e2578063e15e2fd4146103f5575f80fd5b806391d14854116100d957806391d1485414610370578063931688cb14610383578063a217fddf14610396578063a22cb4651461039d575f80fd5b8063715018a6146103395780638545d8df146103415780638da5cb5b14610355575f80fd5b80632eb2c2d6116101745780634f558e79116101445780634f558e79146102ea57806364e7edc91461030b57806368cd3daf1461031e5780636c0360eb14610331575f80fd5b80632eb2c2d61461028f5780632f2ff15d146102a457806336568abe146102b75780634e1273f4146102ca575f80fd5b80630e89341c116101af5780630e89341c1461023257806318160ddd146102525780631e7663bc1461025a578063248a9ca31461026d575f80fd5b8062fdd58e146101d457806301ffc9a7146101fa57806309dddcf01461021d575b5f80fd5b6101e76101e2366004611903565b610456565b6040519081526020015b60405180910390f35b61020d610208366004611940565b61047d565b60405190151581526020016101f1565b610225610487565b6040516101f191906119af565b610245610240366004611a11565b61055b565b6040516101f19190611a28565b6004546101e7565b6101e7610268366004611a7e565b610594565b6101e761027b366004611a11565b5f9081526005602052604090206001015490565b6102a261029d366004611bf9565b6105be565b005b6102a26102b2366004611c9b565b61060b565b6102a26102c5366004611c9b565b610635565b6102dd6102d8366004611cc5565b61066d565b6040516101f19190611db8565b61020d6102f8366004611a11565b5f90815260036020526040902054151590565b6102a2610319366004611e0a565b610737565b6102a261032c366004611eab565b610860565b610245610978565b6102a2610a04565b6101e75f8051602061261a83398151915281565b6006546040516001600160a01b0390911681526020016101f1565b61020d61037e366004611c9b565b610a17565b6102a2610391366004611a7e565b610a41565b6101e75f81565b6102a26103ab366004611eec565b610a96565b6101e76103be366004611a11565b5f9081526003602052604090205490565b6102a26103dd366004611c9b565b610ade565b6102a26103f0366004611a7e565b610b02565b6102a2610403366004611f14565b610beb565b6102a2610416366004611f14565b610e6f565b61020d610429366004611f4d565b5f92915050565b6102a261043e366004611f75565b610fc0565b6102a2610451366004611fd4565b611008565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f61047782611045565b6060600b805480602002602001604051908101604052809291908181526020015f905b82821015610552578382905f5260205f200180546104c790611fed565b80601f01602080910402602001604051908101604052809291908181526020018280546104f390611fed565b801561053e5780601f106105155761010080835404028352916020019161053e565b820191905f5260205f20905b81548152906001019060200180831161052157829003601f168201915b5050505050815260200190600101906104aa565b50505050905090565b5f81815260096020908152604091829020915160609261057e9260079201612094565b6040516020818303038152906040529050919050565b5f600a83836040516105a79291906120a8565b908152602001604051809103902054905092915050565b60405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207361666542617463685472616e7366657246726f6d2e00000060448201526064015b60405180910390fd5b5f8281526005602052604090206001015461062581611069565b61062f8383611073565b50505050565b6001600160a01b038116331461065e5760405163334bd91960e11b815260040160405180910390fd5b6106688282611104565b505050565b6060815183511461069e5781518351604051635b05999160e01b815260048101929092526024820152604401610602565b5f83516001600160401b038111156106b8576106b8611abc565b6040519080825280602002602001820160405280156106e1578160200160208202803683370190505b5090505f5b845181101561072f5760208082028601015161070a90602080840287010151610456565b82828151811061071c5761071c6120b7565b60209081029190910101526001016106e6565b509392505050565b5f8051602061261a83398151915261074e81611069565b5f600a88886040516107619291906120a8565b9081526020016040518091039020549050805f036107915760405162461bcd60e51b8152600401610602906120cb565b8483146107eb5760405162461bcd60e51b815260206004820152602260248201527f557365727320616e6420616d6f756e7473206c656e677468206e6f7420657175604482015261185b60f21b6064820152608401610602565b5f5b858110156108555761084d87878381811061080a5761080a6120b7565b905060200201602081019061081f9190611fd4565b83878785818110610832576108326120b7565b9050602002013560405180602001604052805f81525061116f565b6001016107ed565b505050505050505050565b5f8051602061261a83398151915261087781611069565b5f600a846040516108889190612102565b9081526020016040518091039020549050805f036108b85760405162461bcd60e51b8152600401610602906120cb565b821515600103610925575f818152600c602052604090205460ff16156109205760405162461bcd60e51b815260206004820152601f60248201527f4d696e74696e67206f662074686973204e465420697320616c6c6f7765642e006044820152606401610602565b610957565b5f818152600c602052604090205460ff1615156001146109575760405162461bcd60e51b81526004016106029061211d565b5f908152600c60205260409020805460ff1916921515929092179091555050565b6007805461098590611fed565b80601f01602080910402602001604051908101604052809291908181526020018280546109b190611fed565b80156109fc5780601f106109d3576101008083540402835291602001916109fc565b820191905f5260205f20905b8154815290600101906020018083116109df57829003601f168201915b505050505081565b610a0c6111d2565b610a155f6111ff565b565b5f9182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f610a4b81611069565b7f92bf6a7b8937c17e6781a68d61f9fe6a5ce08604b96ca2206f311049a3a295ea3360078585604051610a819493929190612188565b60405180910390a1600761062f83858361228f565b60405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420736574417070726f76616c466f72416c6c2e000000000000006044820152606401610602565b5f82815260056020526040902060010154610af881611069565b61062f8383611104565b5f600a8383604051610b159291906120a8565b9081526020016040518091039020549050805f03610b455760405162461bcd60e51b8152600401610602906120cb565b5f818152600c602052604090205460ff161515600114610b775760405162461bcd60e51b81526004016106029061211d565b6001610b833383610456565b10610bd05760405162461bcd60e51b815260206004820152601760248201527f596f752068617665206f776e656420746865204e46542e0000000000000000006044820152606401610602565b6106683382600160405180602001604052805f81525061116f565b5f8051602061261a833981519152610c0281611069565b5f600a83604051610c139190612102565b9081526020016040518091039020549050805f03610c6a5760405162461bcd60e51b81526020600482015260146024820152735479706520646f6573206e6f742065786973747360601b6044820152606401610602565b5f8181526003602052604090205415610cd15760405162461bcd60e51b8152602060048201526024808201527f546865207479706520697320616c726561647920696e2075736520627920757360448201526332b9399760e11b6064820152608401610602565b5f818152600960205260408120610ce79161189e565b600a83604051610cf79190612102565b90815260200160405180910390205f90555f5b600b54811015610e305783604051602001610d259190612102565b60405160208183030381529060405280519060200120600b8281548110610d4e57610d4e6120b7565b905f5260205f2001604051602001610d669190612343565b6040516020818303038152906040528051906020012003610e2857600b54610d9090600190612362565b8103610dc757600b805480610da757610da7612375565b600190038181905f5260205f20015f610dc0919061189e565b9055610e30565b600b8054610dd790600190612362565b81548110610de757610de76120b7565b905f5260205f2001600b8281548110610e0257610e026120b7565b905f5260205f20019081610e169190612389565b50600b805480610da757610da7612375565b600101610d0a565b507f08c30917c060f6d313699fca2192287a5aaca95a04887ebd32fdd1ba4fce3ea33384604051610e62929190612458565b60405180910390a1505050565b5f8051602061261a833981519152610e8681611069565b600a82604051610e969190612102565b9081526020016040518091039020545f14610ee95760405162461bcd60e51b81526020600482015260136024820152725479706520616c72656164792065786973747360681b6044820152606401610602565b6008545f818152600960205260409020610f03848261247b565b5080600a84604051610f159190612102565b90815260405190819003602001902055600b80546001810182555f919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db901610f60848261247b565b505f818152600c60205260408120805460ff191690556008805460019290610f89908490612529565b90915550506040517f0fa7c87eece2e23c6baf7456e558b83b11afc1f81d3136dc4a8e26b9c1327ebf90610e629033908690612458565b60405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736166655472616e7366657246726f6d2e00000000000000006044820152606401610602565b6110106111d2565b6001600160a01b03811661103957604051631e4fbdf760e01b81525f6004820152602401610602565b611042816111ff565b50565b5f6001600160e01b03198216637965db0b60e01b1480610477575061047782611250565b611042813361129f565b5f61107e8383610a17565b6110fd575f8381526005602090815260408083206001600160a01b03861684529091529020805460ff191660011790556110b53390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610477565b505f610477565b5f61110f8383610a17565b156110fd575f8381526005602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610477565b6001600160a01b03841661119857604051632bfa23e760e11b81525f6004820152602401610602565b604080516001808252602082018690528183019081526060820185905260808201909252906111ca5f878484876112dc565b505050505050565b6006546001600160a01b03163314610a155760405163118cdaa760e01b8152336004820152602401610602565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6001600160e01b03198216636cdb3d1360e11b148061128057506001600160e01b031982166303a24d0760e21b145b8061047757506301ffc9a760e01b6001600160e01b0319831614610477565b6112a98282610a17565b6112d85760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610602565b5050565b6112e885858585611336565b6001600160a01b0384161561132f5782513390600103611321576020848101519084015161131a838989858589611342565b50506111ca565b6111ca81878787878761146c565b5050505050565b61062f84848484611553565b6001600160a01b0384163b156111ca5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611386908990899088908890889060040161253c565b6020604051808303815f875af19250505080156113c0575060408051601f3d908101601f191682019092526113bd91810190612580565b60015b611427573d8080156113ed576040519150601f19603f3d011682016040523d82523d5f602084013e6113f2565b606091505b5080515f0361141f57604051632bfa23e760e11b81526001600160a01b0386166004820152602401610602565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461146357604051632bfa23e760e11b81526001600160a01b0386166004820152602401610602565b50505050505050565b6001600160a01b0384163b156111ca5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906114b0908990899088908890889060040161259b565b6020604051808303815f875af19250505080156114ea575060408051601f3d908101601f191682019092526114e791810190612580565b60015b611517573d8080156113ed576040519150601f19603f3d011682016040523d82523d5f602084013e6113f2565b6001600160e01b0319811663bc197c8160e01b1461146357604051632bfa23e760e11b81526001600160a01b0386166004820152602401610602565b61155f8484848461168f565b6001600160a01b038416611603575f805b83518110156115ea575f83828151811061158c5761158c6120b7565b602002602001015190508060035f8785815181106115ac576115ac6120b7565b602002602001015181526020019081526020015f205f8282546115cf9190612529565b909155506115df90508184612529565b925050600101611570565b508060045f8282546115fc9190612529565b9091555050505b6001600160a01b03831661062f575f805b835181101561167e575f838281518110611630576116306120b7565b602002602001015190508060035f878581518110611650576116506120b7565b60209081029190910181015182528101919091526040015f2080549190910390559190910190600101611614565b506004805491909103905550505050565b80518251146116be5781518151604051635b05999160e01b815260048101929092526024820152604401610602565b335f5b83518110156117c0576020818102858101820151908501909101516001600160a01b03881615611772575f828152602081815260408083206001600160a01b038c1684529091529020548181101561174c576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610602565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b038716156117b6575f828152602081815260408083206001600160a01b038b168452909152812080548392906117b0908490612529565b90915550505b50506001016116c1565b5082516001036118405760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611831929190918252602082015260400190565b60405180910390a4505061132f565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161188f9291906125ec565b60405180910390a45050505050565b5080546118aa90611fed565b5f825580601f106118b9575050565b601f0160209004905f5260205f209081019061104291905b808211156118e4575f81556001016118d1565b5090565b80356001600160a01b03811681146118fe575f80fd5b919050565b5f8060408385031215611914575f80fd5b61191d836118e8565b946020939093013593505050565b6001600160e01b031981168114611042575f80fd5b5f60208284031215611950575f80fd5b813561195b8161192b565b9392505050565b5f5b8381101561197c578181015183820152602001611964565b50505f910152565b5f815180845261199b816020860160208601611962565b601f01601f19169290920160200192915050565b5f60208083016020845280855180835260408601915060408160051b8701019250602087015f5b82811015611a0457603f198886030184526119f2858351611984565b945092850192908501906001016119d6565b5092979650505050505050565b5f60208284031215611a21575f80fd5b5035919050565b602081525f61195b6020830184611984565b5f8083601f840112611a4a575f80fd5b5081356001600160401b03811115611a60575f80fd5b602083019150836020828501011115611a77575f80fd5b9250929050565b5f8060208385031215611a8f575f80fd5b82356001600160401b03811115611aa4575f80fd5b611ab085828601611a3a565b90969095509350505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715611af857611af8611abc565b604052919050565b5f6001600160401b03821115611b1857611b18611abc565b5060051b60200190565b5f82601f830112611b31575f80fd5b81356020611b46611b4183611b00565b611ad0565b8083825260208201915060208460051b870101935086841115611b67575f80fd5b602086015b84811015611b835780358352918301918301611b6c565b509695505050505050565b5f82601f830112611b9d575f80fd5b81356001600160401b03811115611bb657611bb6611abc565b611bc9601f8201601f1916602001611ad0565b818152846020838601011115611bdd575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a08688031215611c0d575f80fd5b611c16866118e8565b9450611c24602087016118e8565b935060408601356001600160401b0380821115611c3f575f80fd5b611c4b89838a01611b22565b94506060880135915080821115611c60575f80fd5b611c6c89838a01611b22565b93506080880135915080821115611c81575f80fd5b50611c8e88828901611b8e565b9150509295509295909350565b5f8060408385031215611cac575f80fd5b82359150611cbc602084016118e8565b90509250929050565b5f8060408385031215611cd6575f80fd5b82356001600160401b0380821115611cec575f80fd5b818501915085601f830112611cff575f80fd5b81356020611d0f611b4183611b00565b82815260059290921b84018101918181019089841115611d2d575f80fd5b948201945b83861015611d5257611d43866118e8565b82529482019490820190611d32565b96505086013592505080821115611d67575f80fd5b50611d7485828601611b22565b9150509250929050565b5f815180845260208085019450602084015f5b83811015611dad57815187529582019590820190600101611d91565b509495945050505050565b602081525f61195b6020830184611d7e565b5f8083601f840112611dda575f80fd5b5081356001600160401b03811115611df0575f80fd5b6020830191508360208260051b8501011115611a77575f80fd5b5f805f805f8060608789031215611e1f575f80fd5b86356001600160401b0380821115611e35575f80fd5b611e418a838b01611a3a565b90985096506020890135915080821115611e59575f80fd5b611e658a838b01611dca565b90965094506040890135915080821115611e7d575f80fd5b50611e8a89828a01611dca565b979a9699509497509295939492505050565b803580151581146118fe575f80fd5b5f8060408385031215611ebc575f80fd5b82356001600160401b03811115611ed1575f80fd5b611edd85828601611b8e565b925050611cbc60208401611e9c565b5f8060408385031215611efd575f80fd5b611f06836118e8565b9150611cbc60208401611e9c565b5f60208284031215611f24575f80fd5b81356001600160401b03811115611f39575f80fd5b611f4584828501611b8e565b949350505050565b5f8060408385031215611f5e575f80fd5b611f67836118e8565b9150611cbc602084016118e8565b5f805f805f60a08688031215611f89575f80fd5b611f92866118e8565b9450611fa0602087016118e8565b9350604086013592506060860135915060808601356001600160401b03811115611fc8575f80fd5b611c8e88828901611b8e565b5f60208284031215611fe4575f80fd5b61195b826118e8565b600181811c9082168061200157607f821691505b60208210810361201f57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f815461203181611fed565b60018281168015612049576001811461205e5761208a565b60ff198416875282151583028701945061208a565b855f526020805f205f5b858110156120815781548a820152908401908201612068565b50505082870194505b5050505092915050565b5f611f456120a28386612025565b84612025565b818382375f9101908152919050565b634e487b7160e01b5f52603260045260245ffd5b60208082526017908201527f546865207479706520646f6573206e6f74206578697374000000000000000000604082015260600190565b5f8251612113818460208701611962565b9190910192915050565b60208082526023908201527f4d696e74696e67206f662074686973204e4654206973206e6f7420616c6c6f7760408201526232b21760e91b606082015260800190565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60018060a01b03851681525f6020606060208401525f86546121a981611fed565b806060870152608060018084165f81146121ca57600181146121e657612213565b60ff19851660808a0152608084151560051b8a01019550612213565b8b5f5260205f205f5b8581101561220a5781548b82018601529083019088016121ef565b8a016080019650505b5050505050838103604085015261222b818688612160565b98975050505050505050565b601f82111561066857805f5260205f20601f840160051c8101602085101561225c5750805b601f840160051c820191505b8181101561132f575f8155600101612268565b5f19600383901b1c191660019190911b1790565b6001600160401b038311156122a6576122a6611abc565b6122ba836122b48354611fed565b83612237565b5f601f8411600181146122e6575f85156122d45750838201355b6122de868261227b565b84555061132f565b5f83815260208120601f198716915b8281101561231557868501358255602094850194600190920191016122f5565b5086821015612331575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b5f61195b8284612025565b634e487b7160e01b5f52601160045260245ffd5b818103818111156104775761047761234e565b634e487b7160e01b5f52603160045260245ffd5b818103612394575050565b61239e8254611fed565b6001600160401b038111156123b5576123b5611abc565b6123c9816123c38454611fed565b84612237565b5f601f8211600181146123f5575f83156123e35750848201545b6123ed848261227b565b85555061132f565b5f8581526020808220868352908220601f198616925b8381101561242b578286015482556001958601959091019060200161240b565b508583101561244857818501545f19600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03831681526040602082018190525f90611f4590830184611984565b81516001600160401b0381111561249457612494611abc565b6124a2816123c38454611fed565b602080601f8311600181146124d0575f84156124be5750858301515b6124c8858261227b565b8655506111ca565b5f85815260208120601f198616915b828110156124fe578886015182559484019460019091019084016124df565b50858210156124485793909601515f1960f8600387901b161c19169092555050600190811b01905550565b808201808211156104775761047761234e565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f9061257590830184611984565b979650505050505050565b5f60208284031215612590575f80fd5b815161195b8161192b565b6001600160a01b0386811682528516602082015260a0604082018190525f906125c690830186611d7e565b82810360608401526125d88186611d7e565b9050828103608084015261222b8185611984565b604081525f6125fe6040830185611d7e565b82810360208401526126108185611d7e565b9594505050505056fe20296b01d0b6bd176f0c1e29644934c0047abf080dae43609a1bbc09e39bafdba264697066735822122080a894f16b47925724b4080604ad03d2e98e35b445f4bca811869101c9ca9d5d64736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ee972e35311f65e6fd8f6ea7228bf388b53e1d4a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656964347577686a73766565353276666a6532656c6e3732757577713279766e6e37776d78646e6e6b677172327263633766357571792f0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : initialOwner (address): 0xEe972E35311F65e6fD8F6ea7228Bf388B53e1D4a
Arg [1] : _baseURI (string): ipfs://bafybeid4uwhjsvee52vfje2eln72uuwq2yvnn7wmxdnnkgqr2rcc7f5uqy/
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000ee972e35311f65e6fd8f6ea7228bf388b53e1d4a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [3] : 697066733a2f2f6261667962656964347577686a73766565353276666a653265
Arg [4] : 6c6e3732757577713279766e6e37776d78646e6e6b6771723272636337663575
Arg [5] : 71792f0000000000000000000000000000000000000000000000000000000000
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.