[ { "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" } ], "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": [], "name": "NotAuthorized", "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": 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": "string", "name": "castHash", "type": "string" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "castHashes", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "string", "name": "", "type": "string" } ], "name": "castTokenId", "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": [], "name": "latestTokenId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "string", "name": "castHash", "type": "string" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "mint", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "minter", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "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": "values", "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": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newMinter", "type": "address" } ], "name": "setMinter", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, { "internalType": "string", "name": "_uri", "type": "string" } ], "name": "setTokenUri", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "supply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "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": "tokenId", "type": "uint256" } ], "name": "uri", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "uris", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" } ]
608060405234801561001057600080fd5b50604080516020810190915260008152339061002b81610069565b506001600160a01b03811661005a57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61006381610079565b50610228565b6002610075828261016a565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806100f557607f821691505b60208210810361011557634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561016557806000526020600020601f840160051c810160208510156101425750805b601f840160051c820191505b81811015610162576000815560010161014e565b50505b505050565b81516001600160401b03811115610183576101836100cb565b6101978161019184546100e1565b8461011b565b6020601f8211600181146101cb57600083156101b35750848201515b600019600385901b1c1916600184901b178455610162565b600084815260208120601f198516915b828110156101fb57878501518255602094850194600190920191016101db565b50848210156102195786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6118d1806102376000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80637d4b4e1e116100b8578063ba7aef431161007c578063ba7aef43146102bd578063c45b71de146102d0578063e985e9c5146102e3578063f242432a146102f6578063f2fde38b14610309578063fca3b5aa1461031c57600080fd5b80637d4b4e1e146102525780638c0e83491461027d5780638da5cb5b14610286578063a1644da414610297578063a22cb465146102aa57600080fd5b80632eb2c2d6116100ff5780632eb2c2d6146101e257806335403023146101f75780634e1273f41461021757806357f7789e14610237578063715018a61461024a57600080fd5b8062fdd58e1461013b57806301ffc9a71461016157806307546172146101845780630e89341c146101af5780631253c546146101cf575b600080fd5b61014e610149366004611041565b61032f565b6040519081526020015b60405180910390f35b61017461016f366004611081565b610357565b6040519015158152602001610158565b600454610197906001600160a01b031681565b6040516001600160a01b039091168152602001610158565b6101c26101bd3660046110a5565b6103a7565b604051610158919061110e565b6101c26101dd3660046110a5565b610449565b6101f56101f036600461126d565b6104e3565b005b61014e6102053660046110a5565b60086020526000908152604090205481565b61022a610225366004611320565b61054f565b6040516101589190611423565b6101f5610245366004611436565b61061b565b6101f5610640565b61014e610260366004611472565b805160208183018101805160068252928201919093012091525481565b61014e60055481565b6003546001600160a01b0316610197565b6101c26102a53660046110a5565b610654565b6101f56102b83660046114ae565b61066d565b6101f56102cb3660046114ea565b61067c565b6101f56102de3660046114ea565b61076b565b6101746102f1366004611541565b6107ed565b6101f5610304366004611574565b61081b565b6101f56103173660046115cc565b61087a565b6101f561032a3660046115cc565b6108b8565b6000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061038857506001600160e01b031982166303a24d0760e21b145b8061035157506301ffc9a760e01b6001600160e01b0319831614610351565b60008181526009602052604090208054606091906103c4906115e7565b80601f01602080910402602001604051908101604052809291908181526020018280546103f0906115e7565b801561043d5780601f106104125761010080835404028352916020019161043d565b820191906000526020600020905b81548152906001019060200180831161042057829003601f168201915b50505050509050919050565b60096020526000908152604090208054610462906115e7565b80601f016020809104026020016040519081016040528092919081815260200182805461048e906115e7565b80156104db5780601f106104b0576101008083540402835291602001916104db565b820191906000526020600020905b8154815290600101906020018083116104be57829003601f168201915b505050505081565b336001600160a01b0386168114801590610504575061050286826107ed565b155b1561053a5760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044015b60405180910390fd5b61054786868686866108e2565b505050505050565b606081518351146105805781518351604051635b05999160e01b815260048101929092526024820152604401610531565b600083516001600160401b0381111561059b5761059b611121565b6040519080825280602002602001820160405280156105c4578160200160208202803683370190505b50905060005b8451811015610613576020808202860101516105ee9060208084028701015161032f565b82828151811061060057610600611621565b60209081029190910101526001016105ca565b509392505050565b610623610949565b600082815260096020526040902061063b828261167e565b505050565b610648610949565b6106526000610976565b565b60076020526000908152604090208054610462906115e7565b6106783383836109c8565b5050565b6004546001600160a01b031633146106a75760405163ea8e4eb560e01b815260040160405180910390fd5b60006006836040516106b9919061173c565b9081526020016040518091039020549050806000036106e9576005600081546106e19061176e565b918290555090505b806006846040516106fa919061173c565b9081526040805160209281900383019020929092556000838152600790915220610724848261167e565b5060008181526008602052604081208054849290610743908490611787565b9250508190555061076584828460405180602001604052806000815250610a5e565b50505050565b6004546001600160a01b031633146107965760405163ea8e4eb560e01b815260040160405180910390fd5b60006006836040516107a8919061173c565b9081526020016040518091039020549050816008600083815260200190815260200160002060008282546107dc919061179a565b909155506107659050848284610abb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b336001600160a01b038616811480159061083c575061083a86826107ed565b155b1561086d5760405163711bec9160e11b81526001600160a01b03808316600483015287166024820152604401610531565b6105478686868686610b23565b610882610949565b6001600160a01b0381166108ac57604051631e4fbdf760e01b815260006004820152602401610531565b6108b581610976565b50565b6108c0610949565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03841661090c57604051632bfa23e760e11b815260006004820152602401610531565b6001600160a01b03851661093557604051626a0d4560e21b815260006004820152602401610531565b6109428585858585610bb1565b5050505050565b6003546001600160a01b031633146106525760405163118cdaa760e01b8152336004820152602401610531565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166109f15760405162ced3e160e81b815260006004820152602401610531565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610a8857604051632bfa23e760e11b815260006004820152602401610531565b60408051600180825260208201869052818301908152606082018590526080820190925290610547600087848487610bb1565b6001600160a01b038316610ae457604051626a0d4560e21b815260006004820152602401610531565b604080516001808252602082018590528183019081526060820184905260a0820190925260006080820181815291929161094291879185908590610bb1565b6001600160a01b038416610b4d57604051632bfa23e760e11b815260006004820152602401610531565b6001600160a01b038516610b7657604051626a0d4560e21b815260006004820152602401610531565b60408051600180825260208201869052818301908152606082018590526080820190925290610ba88787848487610bb1565b50505050505050565b610bbd85858585610c04565b6001600160a01b038416156109425782513390600103610bf65760208481015190840151610bef838989858589610e18565b5050610547565b610547818787878787610f3c565b8051825114610c335781518151604051635b05999160e01b815260048101929092526024820152604401610531565b3360005b8351811015610d39576020818102858101820151908501909101516001600160a01b03881615610cea576000828152602081815260408083206001600160a01b038c16845290915290205481811015610cc3576040516303dee4c560e01b81526001600160a01b038a166004820152602481018290526044810183905260648101849052608401610531565b6000838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b03871615610d2f576000828152602081815260408083206001600160a01b038b16845290915281208054839290610d29908490611787565b90915550505b5050600101610c37565b508251600103610dba5760208301516000906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051610dab929190918252602082015260400190565b60405180910390a45050610942565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051610e099291906117ad565b60405180910390a45050505050565b6001600160a01b0384163b156105475760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190610e5c90899089908890889088906004016117db565b6020604051808303816000875af1925050508015610e97575060408051601f3d908101601f19168201909252610e9491810190611820565b60015b610f00573d808015610ec5576040519150601f19603f3d011682016040523d82523d6000602084013e610eca565b606091505b508051600003610ef857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610531565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b14610ba857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610531565b6001600160a01b0384163b156105475760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f80908990899088908890889060040161183d565b6020604051808303816000875af1925050508015610fbb575060408051601f3d908101601f19168201909252610fb891810190611820565b60015b610fe9573d808015610ec5576040519150601f19603f3d011682016040523d82523d6000602084013e610eca565b6001600160e01b0319811663bc197c8160e01b14610ba857604051632bfa23e760e11b81526001600160a01b0386166004820152602401610531565b80356001600160a01b038116811461103c57600080fd5b919050565b6000806040838503121561105457600080fd5b61105d83611025565b946020939093013593505050565b6001600160e01b0319811681146108b557600080fd5b60006020828403121561109357600080fd5b813561109e8161106b565b9392505050565b6000602082840312156110b757600080fd5b5035919050565b60005b838110156110d95781810151838201526020016110c1565b50506000910152565b600081518084526110fa8160208601602086016110be565b601f01601f19169290920160200192915050565b60208152600061109e60208301846110e2565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561115f5761115f611121565b604052919050565b60006001600160401b0382111561118057611180611121565b5060051b60200190565b600082601f83011261119b57600080fd5b81356111ae6111a982611167565b611137565b8082825260208201915060208360051b8601019250858311156111d057600080fd5b602085015b838110156111ed5780358352602092830192016111d5565b5095945050505050565b600082601f83011261120857600080fd5b8135602083016000806001600160401b0384111561122857611228611121565b50601f8301601f191660200161123d81611137565b91505082815285838301111561125257600080fd5b82826020830137600092810160200192909252509392505050565b600080600080600060a0868803121561128557600080fd5b61128e86611025565b945061129c60208701611025565b935060408601356001600160401b038111156112b757600080fd5b6112c38882890161118a565b93505060608601356001600160401b038111156112df57600080fd5b6112eb8882890161118a565b92505060808601356001600160401b0381111561130757600080fd5b611313888289016111f7565b9150509295509295909350565b6000806040838503121561133357600080fd5b82356001600160401b0381111561134957600080fd5b8301601f8101851361135a57600080fd5b80356113686111a982611167565b8082825260208201915060208360051b85010192508783111561138a57600080fd5b6020840193505b828410156113b3576113a284611025565b825260209384019390910190611391565b945050505060208301356001600160401b038111156113d157600080fd5b6113dd8582860161118a565b9150509250929050565b600081518084526020840193506020830160005b828110156114195781518652602095860195909101906001016113fb565b5093949350505050565b60208152600061109e60208301846113e7565b6000806040838503121561144957600080fd5b8235915060208301356001600160401b0381111561146657600080fd5b6113dd858286016111f7565b60006020828403121561148457600080fd5b81356001600160401b0381111561149a57600080fd5b6114a6848285016111f7565b949350505050565b600080604083850312156114c157600080fd5b6114ca83611025565b9150602083013580151581146114df57600080fd5b809150509250929050565b6000806000606084860312156114ff57600080fd5b61150884611025565b925060208401356001600160401b0381111561152357600080fd5b61152f868287016111f7565b93969395505050506040919091013590565b6000806040838503121561155457600080fd5b61155d83611025565b915061156b60208401611025565b90509250929050565b600080600080600060a0868803121561158c57600080fd5b61159586611025565b94506115a360208701611025565b9350604086013592506060860135915060808601356001600160401b0381111561130757600080fd5b6000602082840312156115de57600080fd5b61109e82611025565b600181811c908216806115fb57607f821691505b60208210810361161b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b601f82111561063b57806000526020600020601f840160051c8101602085101561165e5750805b601f840160051c820191505b81811015610942576000815560010161166a565b81516001600160401b0381111561169757611697611121565b6116ab816116a584546115e7565b84611637565b6020601f8211600181146116df57600083156116c75750848201515b600019600385901b1c1916600184901b178455610942565b600084815260208120601f198516915b8281101561170f57878501518255602094850194600190920191016116ef565b508482101561172d5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6000825161174e8184602087016110be565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b60006001820161178057611780611758565b5060010190565b8082018082111561035157610351611758565b8181038181111561035157610351611758565b6040815260006117c060408301856113e7565b82810360208401526117d281856113e7565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611815908301846110e2565b979650505050505050565b60006020828403121561183257600080fd5b815161109e8161106b565b6001600160a01b0386811682528516602082015260a060408201819052600090611869908301866113e7565b828103606084015261187b81866113e7565b9050828103608084015261188f81856110e2565b9897505050505050505056fea2646970667358221220ff7227cbc5548ed0f348b3a81f16e37851ad7ca06c60927a5f0714eaee8b9fde64736f6c634300081a0033