Overview ERC1155
Total Supply:
0

Holders:
2
Profile Summary
Blockchain:
Holesky (17000)

Contract Source Code Verified (Partial Match)
Contract Name:
TestERC1155

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Created At:
Wed, 17 Apr 2024 07:35:48 GMT
TestERC1155.sol
src
test
TestERC1155.sol


Contract ABI
[
  {
    "inputs": [
      {
        "internalType": "string",
        "name": "uri",
        "type": "string"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "operator",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "bool",
        "name": "approved",
        "type": "bool"
      }
    ],
    "name": "ApprovalForAll",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "operator",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256[]",
        "name": "ids",
        "type": "uint256[]"
      },
      {
        "indexed": false,
        "internalType": "uint256[]",
        "name": "values",
        "type": "uint256[]"
      }
    ],
    "name": "TransferBatch",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "operator",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "TransferSingle",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "string",
        "name": "value",
        "type": "string"
      },
      {
        "indexed": true,
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "URI",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address[]",
        "name": "accounts",
        "type": "address[]"
      },
      {
        "internalType": "uint256[]",
        "name": "ids",
        "type": "uint256[]"
      }
    ],
    "name": "balanceOfBatch",
    "outputs": [
      {
        "internalType": "uint256[]",
        "name": "",
        "type": "uint256[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "operator",
        "type": "address"
      }
    ],
    "name": "isApprovedForAll",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "bytes",
        "name": "data",
        "type": "bytes"
      }
    ],
    "name": "mint",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint256[]",
        "name": "ids",
        "type": "uint256[]"
      },
      {
        "internalType": "uint256[]",
        "name": "amounts",
        "type": "uint256[]"
      },
      {
        "internalType": "bytes",
        "name": "data",
        "type": "bytes"
      }
    ],
    "name": "safeBatchTransferFrom",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "id",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      },
      {
        "internalType": "bytes",
        "name": "data",
        "type": "bytes"
      }
    ],
    "name": "safeTransferFrom",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "operator",
        "type": "address"
      },
      {
        "internalType": "bool",
        "name": "approved",
        "type": "bool"
      }
    ],
    "name": "setApprovalForAll",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes4",
        "name": "interfaceId",
        "type": "bytes4"
      }
    ],
    "name": "supportsInterface",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "uri",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]


Contract Creation Code
60806040523480156200001157600080fd5b50604051620019dd380380620019dd8339810160408190526200003491620000cb565b80620000403362000053565b6200004b81620000a3565b5050620002fb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6003620000b182826200022f565b5050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620000df57600080fd5b82516001600160401b0380821115620000f757600080fd5b818501915085601f8301126200010c57600080fd5b815181811115620001215762000121620000b5565b604051601f8201601f19908116603f011681019083821181831017156200014c576200014c620000b5565b8160405282815288868487010111156200016557600080fd5b600093505b828410156200018957848401860151818501870152928501926200016a565b600086848301015280965050505050505092915050565b600181811c90821680620001b557607f821691505b602082108103620001d657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200022a57600081815260208120601f850160051c81016020861015620002055750805b601f850160051c820191505b81811015620002265782815560010162000211565b5050505b505050565b81516001600160401b038111156200024b576200024b620000b5565b62000263816200025c8454620001a0565b84620001dc565b602080601f8311600181146200029b5760008415620002825750858301515b600019600386901b1c1916600185901b17855562000226565b600085815260208120601f198616915b82811015620002cc57888601518255948401946001909101908401620002ab565b5085821015620002eb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6116d2806200030b6000396000f3fe608060405234801561001057600080fd5b50600436106100b35760003560e01c8063731133e911610071578063731133e91461015e5780638da5cb5b14610171578063a22cb4651461018c578063e985e9c51461019f578063f242432a146101db578063f2fde38b146101ee57600080fd5b8062fdd58e146100b857806301ffc9a7146100de5780630e89341c146101015780632eb2c2d6146101215780634e1273f414610136578063715018a614610156575b600080fd5b6100cb6100c6366004610e1c565b610201565b6040519081526020015b60405180910390f35b6100f16100ec366004610e5c565b61029c565b60405190151581526020016100d5565b61011461010f366004610e80565b6102ec565b6040516100d59190610edf565b61013461012f36600461103e565b610380565b005b6101496101443660046110e8565b6103cc565b6040516100d591906111ee565b6101346104f6565b61013461016c366004611201565b61050a565b6000546040516001600160a01b0390911681526020016100d5565b61013461019a366004611262565b610524565b6100f16101ad36600461129e565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b6101346101e93660046112d1565b610533565b6101346101fc366004611336565b610578565b60006001600160a01b0383166102715760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b14806102cd57506001600160e01b031982166303a24d0760e21b145b8061029657506301ffc9a760e01b6001600160e01b0319831614610296565b6060600380546102fb90611351565b80601f016020809104026020016040519081016040528092919081815260200182805461032790611351565b80156103745780601f1061034957610100808354040283529160200191610374565b820191906000526020600020905b81548152906001019060200180831161035757829003601f168201915b50505050509050919050565b6001600160a01b03851633148061039c575061039c85336101ad565b6103b85760405162461bcd60e51b81526004016102689061138b565b6103c585858585856105f1565b5050505050565b606081518351146104315760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610268565b6000835167ffffffffffffffff81111561044d5761044d610ef2565b604051908082528060200260200182016040528015610476578160200160208202803683370190505b50905060005b84518110156104ee576104c185828151811061049a5761049a6113d9565b60200260200101518583815181106104b4576104b46113d9565b6020026020010151610201565b8282815181106104d3576104d36113d9565b60209081029190910101526104e781611405565b905061047c565b509392505050565b6104fe6107d1565b610508600061082b565b565b6105126107d1565b61051e8484848461087b565b50505050565b61052f338383610991565b5050565b6001600160a01b03851633148061054f575061054f85336101ad565b61056b5760405162461bcd60e51b81526004016102689061138b565b6103c58585858585610a71565b6105806107d1565b6001600160a01b0381166105e55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610268565b6105ee8161082b565b50565b81518351146106535760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610268565b6001600160a01b0384166106795760405162461bcd60e51b81526004016102689061141e565b3360005b845181101561076357600085828151811061069a5761069a6113d9565b6020026020010151905060008583815181106106b8576106b86113d9565b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156107095760405162461bcd60e51b815260040161026890611463565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906107489084906114ad565b925050819055505050508061075c90611405565b905061067d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516107b39291906114c0565b60405180910390a46107c9818787878787610b9f565b505050505050565b6000546001600160a01b031633146105085760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610268565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0384166108db5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610268565b3360006108e785610cfa565b905060006108f485610cfa565b905060008681526001602090815260408083206001600160a01b038b168452909152812080548792906109289084906114ad565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461098883600089898989610d45565b50505050505050565b816001600160a01b0316836001600160a01b031603610a045760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610268565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610a975760405162461bcd60e51b81526004016102689061141e565b336000610aa385610cfa565b90506000610ab085610cfa565b905060008681526001602090815260408083206001600160a01b038c16845290915290205485811015610af55760405162461bcd60e51b815260040161026890611463565b60008781526001602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610b349084906114ad565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610b94848a8a8a8a8a610d45565b505050505050505050565b6001600160a01b0384163b156107c95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610be390899089908890889088906004016114ee565b6020604051808303816000875af1925050508015610c1e575060408051601f3d908101601f19168201909252610c1b9181019061154c565b60015b610cca57610c2a611569565b806308c379a003610c635750610c3e611585565b80610c495750610c65565b8060405162461bcd60e51b81526004016102689190610edf565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610268565b6001600160e01b0319811663bc197c8160e01b146109885760405162461bcd60e51b81526004016102689061160f565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610d3457610d346113d9565b602090810291909101015292915050565b6001600160a01b0384163b156107c95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610d899089908990889088908890600401611657565b6020604051808303816000875af1925050508015610dc4575060408051601f3d908101601f19168201909252610dc19181019061154c565b60015b610dd057610c2a611569565b6001600160e01b0319811663f23a6e6160e01b146109885760405162461bcd60e51b81526004016102689061160f565b80356001600160a01b0381168114610e1757600080fd5b919050565b60008060408385031215610e2f57600080fd5b610e3883610e00565b946020939093013593505050565b6001600160e01b0319811681146105ee57600080fd5b600060208284031215610e6e57600080fd5b8135610e7981610e46565b9392505050565b600060208284031215610e9257600080fd5b5035919050565b6000815180845260005b81811015610ebf57602081850181015186830182015201610ea3565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610e796020830184610e99565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715610f2e57610f2e610ef2565b6040525050565b600067ffffffffffffffff821115610f4f57610f4f610ef2565b5060051b60200190565b600082601f830112610f6a57600080fd5b81356020610f7782610f35565b604051610f848282610f08565b83815260059390931b8501820192828101915086841115610fa457600080fd5b8286015b84811015610fbf5780358352918301918301610fa8565b509695505050505050565b600082601f830112610fdb57600080fd5b813567ffffffffffffffff811115610ff557610ff5610ef2565b60405161100c601f8301601f191660200182610f08565b81815284602083860101111561102157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561105657600080fd5b61105f86610e00565b945061106d60208701610e00565b9350604086013567ffffffffffffffff8082111561108a57600080fd5b61109689838a01610f59565b945060608801359150808211156110ac57600080fd5b6110b889838a01610f59565b935060808801359150808211156110ce57600080fd5b506110db88828901610fca565b9150509295509295909350565b600080604083850312156110fb57600080fd5b823567ffffffffffffffff8082111561111357600080fd5b818501915085601f83011261112757600080fd5b8135602061113482610f35565b6040516111418282610f08565b83815260059390931b850182019282810191508984111561116157600080fd5b948201945b838610156111865761117786610e00565b82529482019490820190611166565b9650508601359250508082111561119c57600080fd5b506111a985828601610f59565b9150509250929050565b600081518084526020808501945080840160005b838110156111e3578151875295820195908201906001016111c7565b509495945050505050565b602081526000610e7960208301846111b3565b6000806000806080858703121561121757600080fd5b61122085610e00565b93506020850135925060408501359150606085013567ffffffffffffffff81111561124a57600080fd5b61125687828801610fca565b91505092959194509250565b6000806040838503121561127557600080fd5b61127e83610e00565b91506020830135801515811461129357600080fd5b809150509250929050565b600080604083850312156112b157600080fd5b6112ba83610e00565b91506112c860208401610e00565b90509250929050565b600080600080600060a086880312156112e957600080fd5b6112f286610e00565b945061130060208701610e00565b93506040860135925060608601359150608086013567ffffffffffffffff81111561132a57600080fd5b6110db88828901610fca565b60006020828403121561134857600080fd5b610e7982610e00565b600181811c9082168061136557607f821691505b60208210810361138557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611417576114176113ef565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b80820180821115610296576102966113ef565b6040815260006114d360408301856111b3565b82810360208401526114e581856111b3565b95945050505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061151a908301866111b3565b828103606084015261152c81866111b3565b905082810360808401526115408185610e99565b98975050505050505050565b60006020828403121561155e57600080fd5b8151610e7981610e46565b600060033d11156115825760046000803e5060005160e01c5b90565b600060443d10156115935790565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156115c357505050505090565b82850191508151818111156115db5750505050505090565b843d87010160208285010111156115f55750505050505090565b61160460208286010187610f08565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061169190830184610e99565b97965050505050505056fea2646970667358221220da14e5acf60c463ef0420ebea5f37b75bccee5b1f38ff8e8e0ac9f5b6501472664736f6c634300081300330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003068747470733a2f2f6d6574612e636861696e6e6f76612e696f2f74656e616e742f312f636f6c6c656374696f6e2f343600000000000000000000000000000000