147 txs
289 calls
constructor
constructor(address _tokiemonNFT, address _items)
functions
getPaintableItems
viewfunction getPaintableItems() view returns (uint256[])
getPaintingInfo
viewfunction getPaintingInfo(uint256 paintingId) view returns (tuple)
isPaintable
viewfunction isPaintable(uint256) view returns (bool)
items
viewfunction items() view returns (address)
maxArtSelection
viewfunction maxArtSelection() view returns (uint8)
owner
viewfunction owner() view returns (address)
paintings
viewfunction paintings(uint256) view returns (uint256 tokenId, uint256 itemId, uint8 artSelection, uint256 timestamp, uint8 status, address painter)
paintingStates
viewfunction paintingStates(uint256) view returns (bool isPending, uint256 itemId, uint256 paintingId)
tokiemonNFT
viewfunction tokiemonNFT() view returns (address)
completePainting
nonpayablefunction completePainting(uint256 tokenId, uint8 artSelection)
renounceOwnership
nonpayablefunction renounceOwnership()
resetPaintingState
nonpayablefunction resetPaintingState(uint256 tokenId)
setBulkPaintableItems
nonpayablefunction setBulkPaintableItems(uint256[] itemIds, bool[] paintableStates)
setMaxArtSelection
nonpayablefunction setMaxArtSelection(uint8 _maxArtSelection)
setPaintableItem
nonpayablefunction setPaintableItem(uint256 itemId, bool _isPaintable)
startPainting
nonpayablefunction startPainting(uint256 tokenId, uint256 itemId)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
events
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
PaintableItemSet
event PaintableItemSet(uint256 indexed itemId, bool isPaintable)
PaintingCompleted
event PaintingCompleted(address indexed painter, uint256 indexed tokenId, uint256 itemId, uint8 artSelection, uint256 paintingId)
PaintingStarted
event PaintingStarted(address indexed painter, uint256 indexed tokenId, uint256 itemId, uint256 paintingId)
errors
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
creation bytecode
0x60c06040526000805460ff60a01b1916600360a01b179055600180553480156200002857600080fd5b50604051620016a9380380620016a98339810160408190526200004b9162000103565b33806200007257604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200007d8162000096565b506001600160a01b039182166080521660a0526200013b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000fe57600080fd5b919050565b600080604083850312156200011757600080fd5b6200012283620000e6565b91506200013260208401620000e6565b90509250929050565b60805160a05161152c6200017d6000396000818161026c01528181610668015261079501526000818161016b0152818161052e0152610ce7015261152c6000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063c37a518c11610071578063c37a518c1461028e578063c7ca6daa146102b4578063e166ce421461031b578063edd532071461032e578063f2fde38b1461034e57600080fd5b80638da5cb5b1461021057806393d106cf14610221578063a2f0e4b614610234578063c06fad061461026757600080fd5b80634bc75085116100de5780634bc75085146101cd5780635771bfb7146101e057806364eeb7db146101f5578063715018a61461020857600080fd5b806308b51f0714610110578063334a104c1461016657806334ac20bc146101a55780633e328f5c146101ba575b600080fd5b61014461011e366004611161565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b6040805193151584526020840192909252908201526060015b60405180910390f35b61018d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161015d565b6101b86101b336600461118f565b610361565b005b6101b86101c8366004611161565b6104ed565b6101b86101db3660046111bb565b610518565b6101e8610951565b60405161015d91906111dd565b6101b861020336600461126d565b6109a9565b6101b8610cbd565b6000546001600160a01b031661018d565b6101b861022f3660046112ea565b610cd1565b610257610242366004611161565b60036020526000908152604090205460ff1681565b604051901515815260200161015d565b61018d7f000000000000000000000000000000000000000000000000000000000000000081565b6000546102a290600160a01b900460ff1681565b60405160ff909116815260200161015d565b6103096102c2366004611161565b6004602081905260009182526040909120805460018201546002830154600384015493909401549193909260ff91821692909181169061010090046001600160a01b031686565b60405161015d96959493929190611345565b6101b861032936600461138c565b610f48565b61034161033c366004611161565b610f70565b60405161015d91906113ae565b6101b861035c36600461141a565b61105c565b61036961109a565b808015610385575060008281526003602052604090205460ff16155b156103c457600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001829055610496565b801580156103e0575060008281526003602052604090205460ff165b156104965760005b60055481101561049457826005828154811061040657610406611437565b90600052602060002001540361048c576005805461042690600190611463565b8154811061043657610436611437565b90600052602060002001546005828154811061045457610454611437565b600091825260209091200155600580548061047157610471611476565b60019003818190600052602060002001600090559055610494565b6001016103e8565b505b600082815260036020908152604091829020805460ff1916841515908117909155915191825283917f2fd15053627b58e93cf723fd469afb069f1e09b4536c59bc76d99f5eb1f5d18f910160405180910390a25050565b6104f561109a565b60009081526002602081905260408220805460ff19168155600181018390550155565b6040516331a9108f60e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa15801561057d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a1919061148c565b6001600160a01b0316336001600160a01b0316146105f85760405162461bcd60e51b815260206004820152600f60248201526e2737ba103a37b5b2b71037bbb732b960891b60448201526064015b60405180910390fd5b60008281526002602052604090205460ff161561064a5760405162461bcd60e51b815260206004820152601060248201526f416c7265616479207061696e74696e6760801b60448201526064016105ef565b604051627eeac760e11b8152336004820152602481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169062fdd58e90604401602060405180830381865afa1580156106b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106da91906114a9565b1161071f5760405162461bcd60e51b81526020600482015260156024820152744d697373696e67207265717569726564206974656d60581b60448201526064016105ef565b60008181526003602052604090205460ff166107725760405162461bcd60e51b81526020600482015260126024820152714974656d206e6f74207061696e7461626c6560701b60448201526064016105ef565b60405163325e7d4f60e01b815233600482015260248101829052600160448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063325e7d4f90606401600060405180830381600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b5050600180546000935091508261080b836114c2565b9091555060408051606080820183526001808352602080840188815284860187815260008b815260028085528882209751885490151560ff19918216178955935188870155915196820196909655865160c0810188528b81528084018b815281890188815242978301978852608083018981523360a08501528b8a52600496879052999098208251815590518187015596519187018054841660ff909316929092179091559351600386015594519084018054969750929593949093169083818111156108da576108da61130d565b021790555060a09190910151600490910180546001600160a01b0390921661010002610100600160a81b03199092169190911790556040805183815260208101839052849133917f969533222bc2382bda35f7f569b96f1072469cd6de5a7c4dbe30e1039d225c58910160405180910390a3505050565b6060600580548060200260200160405190810160405280929190818152602001828054801561099f57602002820191906000526020600020905b81548152602001906001019080831161098b575b5050505050905090565b6109b161109a565b8281146109f25760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b60448201526064016105ef565b60005b83811015610cb657828282818110610a0f57610a0f611437565b9050602002016020810190610a2491906114db565b8015610a60575060036000868684818110610a4157610a41611437565b602090810292909201358352508101919091526040016000205460ff16155b15610aa0576005858583818110610a7957610a79611437565b83546001810185556000948552602094859020919094029290920135919092015550610bd1565b828282818110610ab257610ab2611437565b9050602002016020810190610ac791906114db565b158015610b03575060036000868684818110610ae557610ae5611437565b602090810292909201358352508101919091526040016000205460ff165b15610bd15760005b600554811015610bcf57858583818110610b2757610b27611437565b9050602002013560058281548110610b4157610b41611437565b906000526020600020015403610bc75760058054610b6190600190611463565b81548110610b7157610b71611437565b906000526020600020015460058281548110610b8f57610b8f611437565b6000918252602090912001556005805480610bac57610bac611476565b60019003818190600052602060002001600090559055610bcf565b600101610b0b565b505b828282818110610be357610be3611437565b9050602002016020810190610bf891906114db565b60036000878785818110610c0e57610c0e611437565b90506020020135815260200190815260200160002060006101000a81548160ff021916908315150217905550848482818110610c4c57610c4c611437565b905060200201357f2fd15053627b58e93cf723fd469afb069f1e09b4536c59bc76d99f5eb1f5d18f848484818110610c8657610c86611437565b9050602002016020810190610c9b91906114db565b604051901515815260200160405180910390a26001016109f5565b5050505050565b610cc561109a565b610ccf60006110c7565b565b6040516331a9108f60e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5a919061148c565b6001600160a01b0316336001600160a01b031614610dac5760405162461bcd60e51b815260206004820152600f60248201526e2737ba103a37b5b2b71037bbb732b960891b60448201526064016105ef565b60005460ff600160a01b90910481169082161115610e045760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b21030b93a1039b2b632b1ba34b7b760591b60448201526064016105ef565b60008281526002602052604090205460ff16610e515760405162461bcd60e51b815260206004820152600c60248201526b4e6f74207061696e74696e6760a01b60448201526064016105ef565b60008281526002602081815260408084206001810180549482018054835460ff19169093559086905585905580855260049092528320600381015492939192909103610ed45760405162461bcd60e51b815260206004820152601260248201527114185a5b9d1a5b99c81b9bdd08199bdd5b9960721b60448201526064016105ef565b60028101805460ff861660ff199182168117909255426003840155600483018054909116600117905560408051858152602081019290925281810184905251869133917fa2557fbda34668d300f47c673cca63b8ba56bc6e2dc612e0349f84351df9364f9181900360600190a35050505050565b610f5061109a565b6000805460ff909216600160a01b0260ff60a01b19909216919091179055565b610f78611117565b6000828152600460208181526040808420815160c0810183528154815260018083015494820194909452600282015460ff908116938201939093526003820154606082015293810154909260808501929190911690811115610fdc57610fdc61130d565b6001811115610fed57610fed61130d565b81526004919091015461010090046001600160a01b031660209091015260608101519091506000036110565760405162461bcd60e51b815260206004820152601260248201527114185a5b9d1a5b99c81b9bdd08199bdd5b9960721b60448201526064016105ef565b92915050565b61106461109a565b6001600160a01b03811661108e57604051631e4fbdf760e01b8152600060048201526024016105ef565b611097816110c7565b50565b6000546001600160a01b03163314610ccf5760405163118cdaa760e01b81523360048201526024016105ef565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040518060c001604052806000815260200160008152602001600060ff16815260200160008152602001600060018111156111545761115461130d565b8152600060209091015290565b60006020828403121561117357600080fd5b5035919050565b8035801515811461118a57600080fd5b919050565b600080604083850312156111a257600080fd5b823591506111b26020840161117a565b90509250929050565b600080604083850312156111ce57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015611215578351835292840192918401916001016111f9565b50909695505050505050565b60008083601f84011261123357600080fd5b50813567ffffffffffffffff81111561124b57600080fd5b6020830191508360208260051b850101111561126657600080fd5b9250929050565b6000806000806040858703121561128357600080fd5b843567ffffffffffffffff8082111561129b57600080fd5b6112a788838901611221565b909650945060208701359150808211156112c057600080fd5b506112cd87828801611221565b95989497509550505050565b803560ff8116811461118a57600080fd5b600080604083850312156112fd57600080fd5b823591506111b2602084016112d9565b634e487b7160e01b600052602160045260246000fd5b6002811061134157634e487b7160e01b600052602160045260246000fd5b9052565b8681526020810186905260ff851660408201526060810184905260c081016113706080830185611323565b6001600160a01b039290921660a0919091015295945050505050565b60006020828403121561139e57600080fd5b6113a7826112d9565b9392505050565b600060c082019050825182526020830151602083015260ff60408401511660408301526060830151606083015260808301516113ed6080840182611323565b5060a0928301516001600160a01b0316919092015290565b6001600160a01b038116811461109757600080fd5b60006020828403121561142c57600080fd5b81356113a781611405565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156110565761105661144d565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561149e57600080fd5b81516113a781611405565b6000602082840312156114bb57600080fd5b5051919050565b6000600182016114d4576114d461144d565b5060010190565b6000602082840312156114ed57600080fd5b6113a78261117a56fea26469706673582212205bae50e801d7accfbc50b78ed07518399c0edfd7acebf697d9da332c76babb5d64736f6c63430008180033000000000000000000000000802187c392b15cdc8df8aa05bfef314df1f65c62000000000000000000000000ad574f7f4eb563b0ccdcca0d7d7628aeaf071d65