UNPKG

@settlemint/solidity-token-erc1155

Version:
1,022 lines 29.3 kB
{ "compiler": { "version": "0.8.27+commit.40a35a09" }, "language": "Solidity", "output": { "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "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" } ], "type": "error", "name": "ERC1155InsufficientBalance" }, { "inputs": [ { "internalType": "address", "name": "approver", "type": "address" } ], "type": "error", "name": "ERC1155InvalidApprover" }, { "inputs": [ { "internalType": "uint256", "name": "idsLength", "type": "uint256" }, { "internalType": "uint256", "name": "valuesLength", "type": "uint256" } ], "type": "error", "name": "ERC1155InvalidArrayLength" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" } ], "type": "error", "name": "ERC1155InvalidOperator" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" } ], "type": "error", "name": "ERC1155InvalidReceiver" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" } ], "type": "error", "name": "ERC1155InvalidSender" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" } ], "type": "error", "name": "ERC1155MissingApprovalForAll" }, { "inputs": [], "type": "error", "name": "EnforcedPause" }, { "inputs": [], "type": "error", "name": "ExpectedPause" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "type": "error", "name": "OwnableInvalidOwner" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "type": "error", "name": "OwnableUnauthorizedAccount" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address", "indexed": true }, { "internalType": "address", "name": "operator", "type": "address", "indexed": true }, { "internalType": "bool", "name": "approved", "type": "bool", "indexed": false } ], "type": "event", "name": "ApprovalForAll", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "previousOwner", "type": "address", "indexed": true }, { "internalType": "address", "name": "newOwner", "type": "address", "indexed": true } ], "type": "event", "name": "OwnershipTransferred", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address", "indexed": false } ], "type": "event", "name": "Paused", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address", "indexed": true }, { "internalType": "address", "name": "from", "type": "address", "indexed": true }, { "internalType": "address", "name": "to", "type": "address", "indexed": true }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]", "indexed": false }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]", "indexed": false } ], "type": "event", "name": "TransferBatch", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address", "indexed": true }, { "internalType": "address", "name": "from", "type": "address", "indexed": true }, { "internalType": "address", "name": "to", "type": "address", "indexed": true }, { "internalType": "uint256", "name": "id", "type": "uint256", "indexed": false }, { "internalType": "uint256", "name": "value", "type": "uint256", "indexed": false } ], "type": "event", "name": "TransferSingle", "anonymous": false }, { "inputs": [ { "internalType": "string", "name": "value", "type": "string", "indexed": false }, { "internalType": "uint256", "name": "id", "type": "uint256", "indexed": true } ], "type": "event", "name": "URI", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address", "indexed": false } ], "type": "event", "name": "Unpaused", "anonymous": false }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" } ], "stateMutability": "view", "type": "function", "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "address[]", "name": "accounts", "type": "address[]" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" } ], "stateMutability": "view", "type": "function", "name": "balanceOfBatch", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ] }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "burn" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]" } ], "stateMutability": "nonpayable", "type": "function", "name": "burnBatch" }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "stateMutability": "view", "type": "function", "name": "exists", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "stateMutability": "view", "type": "function", "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function", "name": "mint" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "amounts", "type": "uint256[]" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function", "name": "mintBatch" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ] }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "pause" }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "renounceOwnership" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "values", "type": "uint256[]" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function", "name": "safeBatchTransferFrom" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "id", "type": "uint256" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function", "name": "safeTransferFrom" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function", "name": "setApprovalForAll" }, { "inputs": [ { "internalType": "string", "name": "newuri", "type": "string" } ], "stateMutability": "nonpayable", "type": "function", "name": "setURI" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "stateMutability": "view", "type": "function", "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ] }, { "inputs": [], "stateMutability": "view", "type": "function", "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "uint256", "name": "id", "type": "uint256" } ], "stateMutability": "view", "type": "function", "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "stateMutability": "nonpayable", "type": "function", "name": "transferOwnership" }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "unpause" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function", "name": "uri", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ] } ], "devdoc": { "kind": "dev", "methods": { "balanceOf(address,uint256)": { "details": "See {IERC1155-balanceOf}." }, "balanceOfBatch(address[],uint256[])": { "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." }, "constructor": { "details": "Constructor that initializes the contract with an empty URI and sets the deployer as the owner." }, "exists(uint256)": { "details": "Indicates whether any token exist with a given id, or not." }, "isApprovedForAll(address,address)": { "details": "See {IERC1155-isApprovedForAll}." }, "mint(address,uint256,uint256,bytes)": { "details": "Mints a specified amount of tokens.", "params": { "account": "The address that will receive the minted tokens.", "amount": "The amount of tokens to mint.", "data": "Additional data with no specified format.", "id": "The token id to mint." } }, "mintBatch(address,uint256[],uint256[],bytes)": { "details": "Mints multiple token types in a batch.", "params": { "amounts": "An array of the amounts of tokens to mint.", "data": "Additional data with no specified format.", "ids": "An array of token ids to mint.", "to": "The address that will receive the minted tokens." } }, "owner()": { "details": "Returns the address of the current owner." }, "pause()": { "details": "Pauses all token transfers." }, "paused()": { "details": "Returns true if the contract is paused, and false otherwise." }, "renounceOwnership()": { "details": "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." }, "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { "details": "See {IERC1155-safeBatchTransferFrom}." }, "safeTransferFrom(address,address,uint256,uint256,bytes)": { "details": "See {IERC1155-safeTransferFrom}." }, "setApprovalForAll(address,bool)": { "details": "See {IERC1155-setApprovalForAll}." }, "setURI(string)": { "details": "Sets a new URI for all token types.", "params": { "newuri": "The new URI to set." } }, "supportsInterface(bytes4)": { "details": "See {IERC165-supportsInterface}." }, "totalSupply()": { "details": "Total value of tokens." }, "totalSupply(uint256)": { "details": "Total value of tokens in with a given id." }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, "unpause()": { "details": "Unpauses all token transfers." }, "uri(uint256)": { "details": "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 ERC]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "mint(address,uint256,uint256,bytes)": { "notice": "Can only be called by the contract owner." }, "mintBatch(address,uint256[],uint256[],bytes)": { "notice": "Can only be called by the contract owner." }, "pause()": { "notice": "Can only be called by the contract owner." }, "unpause()": { "notice": "Can only be called by the contract owner." } }, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/=node_modules/@openzeppelin/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "bytecodeHash": "ipfs" }, "compilationTarget": { "contracts/GenericERC1155.sol": "GenericERC1155" }, "evmVersion": "cancun", "libraries": {}, "viaIR": true }, "sources": { "contracts/GenericERC1155.sol": { "keccak256": "0x4a99e55c624f7dbde90c1e4c5ee49208de3151d6f63691567e816aed828adcea", "urls": [ "bzz-raw://84cccf0540172ba6500959102ee2a23bccd549c0ff2925ec4e3151fdca8236a4", "dweb:/ipfs/QmSp74W5HwET78vt1g57o6z3qfQYrqtBHQEGiCnQNMRJd7" ], "license": "FSL-1.1-MIT" }, "node_modules/@openzeppelin/contracts/access/Ownable.sol": { "keccak256": "0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb", "urls": [ "bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6", "dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { "keccak256": "0x880da465c203cec76b10d72dbd87c80f387df4102274f23eea1f9c9b0918792b", "urls": [ "bzz-raw://399594cd8bb0143bc9e55e0f1d071d0d8c850a394fb7a319d50edd55d9ed822b", "dweb:/ipfs/QmbPZzgtT6LEm9CMqWfagQFwETbV1ztpECBB1DtQHrKiRz" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { "keccak256": "0x22933f0f4897ff70a991c3baebfbc2574fd052dc4bae7fcafec45b07c1f23dd3", "urls": [ "bzz-raw://13674cffad18cec55f013056496d7d2e3a34bd7bdbe23d1ef0c7588088c73367", "dweb:/ipfs/QmcBkrwxNvCApG48Gyby2L6qCNtuhaFncGpbJt3zuukTmu" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { "keccak256": "0x68d6fdbeb467192c3627a46aa7bf5cbb73267363b740abc511f521a5a41a446e", "urls": [ "bzz-raw://7ce608c19d5e917c60f9c8aa3e5f0eb05b326280ac0a235e8bb9a848a3a64a91", "dweb:/ipfs/QmdLPsWQJj7JvRae8MM13GEo4PBXaEFmD4b4heqcyMJNPG" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { "keccak256": "0x61a23d601c2ab69dd726ac55058604cbda98e1d728ba31a51c379a3f9eeea715", "urls": [ "bzz-raw://d8cbb06152d82ebdd5ba1d33454e5759492040f309a82637c7e99c948a04fa20", "dweb:/ipfs/QmQQuLr6WSfLu97pMEh6XLefk99TSj9k5Qu1zXGPepwGiK" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol": { "keccak256": "0xdfab949ba677f4b122d0c14225e6db7ca8a65524e2f00049e57b04f68eceeb87", "urls": [ "bzz-raw://25d240211d484954a409a8870c3a971af9e2eb6b6d0ab46b50c193c4a1576006", "dweb:/ipfs/QmdzSJoJ6iqoWrGKNeDjV4KVfCqna7Vc7AMoQxpxTdTMpF" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol": { "keccak256": "0x8caf50b64528a487bc45c6cf89b514adbbdaae20aaf6e98a834c5e74c914c660", "urls": [ "bzz-raw://6408411bf7a72026f5fee578ff58f4fb0f6951e6ee7092776b81f563931dd704", "dweb:/ipfs/QmeFjtJxSKFRD5LjREUds1bptQzqHs7gwPtrHBdDfzumJC" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol": { "keccak256": "0xf1ad6c52c43d20b37c6324a7b7543a408d5cb3e609fa8ea164d29209ac3ca0ab", "urls": [ "bzz-raw://997802f43f4b5c13814b9f858ff1d97135973119a020f12364502ae712a2aaba", "dweb:/ipfs/QmdhpM7YW5sZkiPxxahPbCP3AbUeqvPp4N8xNPFPBW5BnG" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol": { "keccak256": "0x35d120c427299af1525aaf07955314d9e36a62f14408eb93dec71a2e001f74d3", "urls": [ "bzz-raw://743e38acf441eece428c008be399c40a3ca5b2d595d58faf656cbdbac1a45374", "dweb:/ipfs/QmcWDuWkndox3dxa5P7ZgpKy3iuQKkxBq1cR9hPV1ZzAfa" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/token/ERC1155/utils/ERC1155Utils.sol": { "keccak256": "0x30afe9013aaeb3ba735284a9310792776f57a3b2db6fc1d99628f2c47287f5cf", "urls": [ "bzz-raw://1c675b740746031092efcedb2e18179f05fce8ba482de64e982715e4aa16bc90", "dweb:/ipfs/QmVdUD89qYudLc88k5AsuQ6VWyz9SE1c6UXrVK32Yqh1YS" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Arrays.sol": { "keccak256": "0xaf9586854de33dc9d3a7160cad8170fdfb4119d02a44bad90ba16d71d701cc92", "urls": [ "bzz-raw://c15a02762b0a51d66e36be135c27de656093fc09292fa743df8484b87d4486ea", "dweb:/ipfs/QmbEozFrt5XwC9nzDFuXvN1RF3hQVwKYNi8c2R4bFvYJ2X" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Comparators.sol": { "keccak256": "0x302eecd8cf323b4690e3494a7d960b3cbce077032ab8ef655b323cdd136cec58", "urls": [ "bzz-raw://49ba706f1bc476d68fe6c1fad75517acea4e9e275be0989b548e292eb3a3eacd", "dweb:/ipfs/QmeBpvcdGWzWMKTQESUCEhHgnEQYYATVwPxLMxa6vMT7jC" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Context.sol": { "keccak256": "0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2", "urls": [ "bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12", "dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Panic.sol": { "keccak256": "0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a", "urls": [ "bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a", "dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/Pausable.sol": { "keccak256": "0xb2e5f50762c27fb4b123e3619c3c02bdcba5e515309382e5bfb6f7d6486510bd", "urls": [ "bzz-raw://1a4b83328c98d518a2699c2cbe9e9b055e78aa57fa8639f1b88deb8b3750b5dc", "dweb:/ipfs/QmXdcYj5v7zQxXFPULShHkR5p4Wa2zYuupbHnFdV3cHYtc" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/SlotDerivation.sol": { "keccak256": "0x8447b57b63810fe2e367c09496a966f143ec0e825d71ddb9fce2506cff84b618", "urls": [ "bzz-raw://996cb48f793bf151555045b37138e36b3cdb31d6bc6552d3149285260be00cfb", "dweb:/ipfs/QmcLaTTMNVbkMx58xhkp6GeFt4V3GtSyupZuaKG3vYW2Zc" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/StorageSlot.sol": { "keccak256": "0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97", "urls": [ "bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b", "dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol": { "keccak256": "0xddce8e17e3d3f9ed818b4f4c4478a8262aab8b11ed322f1bf5ed705bb4bd97fa", "urls": [ "bzz-raw://8084aa71a4cc7d2980972412a88fe4f114869faea3fefa5436431644eb5c0287", "dweb:/ipfs/Qmbqfs5dRdPvHVKY8kTaeyc65NdqXRQwRK7h9s5UJEhD1p" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol": { "keccak256": "0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8", "urls": [ "bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621", "dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/math/Math.sol": { "keccak256": "0xa00be322d7db5786750ce0ac7e2f5b633ac30a5ed5fa1ced1e74acfc19acecea", "urls": [ "bzz-raw://6c84e822f87cbdc4082533b626667b6928715bb2b1e8e7eb96954cebb9e38c8d", "dweb:/ipfs/QmZmy9dgxLTerBAQDuuHqbL6EpgRxddqgv5KmwpXYVbKz1" ], "license": "MIT" }, "node_modules/@openzeppelin/contracts/utils/math/SafeCast.sol": { "keccak256": "0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54", "urls": [ "bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8", "dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy" ], "license": "MIT" } }, "version": 1 }