Address Contract Verified
Address
0x895554bc4F48fe1c2bf5C198bFA3513Da538f86b
Balance
0 ETH
Nonce
1
Code Size
21366 bytes
Creator
0x623FC4F5...F98c at tx 0xa971e73d...f44e33
Indexed Transactions
0 (1 on-chain, 1.4% indexed)
Contract Bytecode
21366 bytes
0x6080604052600436106102035760003560e01c80637a2edf4711610118578063d156af8d116100a0578063eb685c471161006f578063eb685c47146107b4578063f242432a146107dd578063f2fde38b14610806578063f5298aca1461082f578063fee191281461085857610203565b8063d156af8d146106d4578063d480924d14610711578063d4ddce8a1461073a578063e985e9c51461077757610203565b80638e0b2634116100e75780638e0b2634146105df5780639e11584814610608578063a22cb46514610645578063b6ea46711461066e578063c189754c1461069757610203565b80637a2edf47146105325780637ca767711461055b5780638830434d146105985780638da5cb5b146105b457610203565b80632eb2c2d61161019b5780635ed6b5ba1161016a5780635ed6b5ba1461044f5780636b20c4541461048c5780636c8b703f146104b55780636e416b88146104f2578063715018a61461051b57610203565b80632eb2c2d614610381578063404f0e2c146103aa57806341f43434146103e75780634e1273f41461041257610203565b806315c94ef2116101d757806315c94ef2146102e85780631b2ef1ca146103255780631eab19421461034157806324600fc31461036a57610203565b8062fdd58e1461020857806301ffc9a7146102455780630e89341c146102825780631453671d146102bf575b600080fd5b34801561021457600080fd5b5061022f600480360381019061022a9190613490565b610881565b60405161023c91906134df565b60405180910390f35b34801561025157600080fd5b5061026c60048036038101906102679190613552565b610949565b604051610279919061359a565b60405180910390f35b34801561028e57600080fd5b506102a960048036038101906102a491906135b5565b610a2b565b6040516102b69190613672565b60405180910390f35b3480156102cb57600080fd5b506102e660048036038101906102e19190613694565b610ad0565b005b3480156102f457600080fd5b5061030f600480360381019061030a91906135b5565b610b1c565b60405161031c91906134df565b60405180910390f35b61033f600480360381019061033a91906136c1565b610b34565b005b34801561034d57600080fd5b5061036860048036038101906103639190613694565b610e81565b005b34801561037657600080fd5b5061037f610f30565b005b34801561038d57600080fd5b506103a860048036038101906103a391906138fe565b611064565b005b3480156103b657600080fd5b506103d160048036038101906103cc91906135b5565b6111ba565b6040516103de91906134df565b60405180910390f35b3480156103f357600080fd5b506103fc6111d2565b6040516104099190613a2c565b60405180910390f35b34801561041e57600080fd5b5061043960048036038101906104349190613b0a565b6111e4565b6040516104469190613c40565b60405180910390f35b34801561045b57600080fd5b50610476600480360381019061047191906135b5565b6112fd565b60405161048391906134df565b60405180910390f35b34801561049857600080fd5b506104b360048036038101906104ae9190613c62565b611315565b005b3480156104c157600080fd5b506104dc60048036038101906104d791906135b5565b6113b2565b6040516104e99190613672565b60405180910390f35b3480156104fe57600080fd5b50610519600480360381019061051491906135b5565b611452565b005b34801561052757600080fd5b506105306114a9565b005b34801561053e57600080fd5b50610559600480360381019061055491906136c1565b6114bd565b005b34801561056757600080fd5b50610582600480360381019061057d91906135b5565b6114e1565b60405161058f919061359a565b60405180910390f35b6105b260048036038101906105ad9190613ced565b611501565b005b3480156105c057600080fd5b506105c96116cf565b6040516105d69190613d4f565b60405180910390f35b3480156105eb57600080fd5b5061060660048036038101906106019190613e1b565b6116f9565b005b34801561061457600080fd5b5061062f600480360381019061062a9190613694565b6118db565b60405161063c919061359a565b60405180910390f35b34801561065157600080fd5b5061066c60048036038101906106679190613efb565b6118fb565b005b34801561067a57600080fd5b50610695600480360381019061069091906136c1565b611a05565b005b3480156106a357600080fd5b506106be60048036038101906106b99190613694565b611a29565b6040516106cb919061359a565b60405180910390f35b3480156106e057600080fd5b506106fb60048036038101906106f69190613f3b565b611a49565b60405161070891906134df565b60405180910390f35b34801561071d57600080fd5b5061073860048036038101906107339190613fd1565b611a6e565b005b34801561074657600080fd5b50610761600480360381019061075c91906135b5565b611a9e565b60405161076e91906134df565b60405180910390f35b34801561078357600080fd5b5061079e60048036038101906107999190614031565b611ab6565b6040516107ab919061359a565b60405180910390f35b3480156107c057600080fd5b506107db60048036038101906107d691906136c1565b611b4a565b005b3480156107e957600080fd5b5061080460048036038101906107ff9190614071565b611b6e565b005b34801561081257600080fd5b5061082d60048036038101906108289190613694565b611cc4565b005b34801561083b57600080fd5b5061085660048036038101906108519190613ced565b611d47565b005b34801561086457600080fd5b5061087f600480360381019061087a9190613694565b611de4565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e89061417a565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a1457507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610a245750610a2382611e93565b5b9050919050565b6060600660008381526020019081526020016000208054610a4b906141c9565b80601f0160208091040260200160405190810160405280929190818152602001828054610a77906141c9565b8015610ac45780601f10610a9957610100808354040283529160200191610ac4565b820191906000526020600020905b815481529060010190602001808311610aa757829003601f168201915b50505050509050919050565b610ad8611efd565b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60096020528060005260406000206000915090505481565b6008600083815260200190815260200160002060009054906101000a900460ff1615610b95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8c90614246565b60405180910390fd5b6000600660008481526020019081526020016000208054610bb5906141c9565b905011610bf7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bee906142b2565b60405180910390fd5b806007600084815260200190815260200160002054610c169190614301565b3414610c57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4e9061438f565b60405180910390fd5b600960008381526020019081526020016000205481600b600085815260200190815260200160002054610c8a91906143af565b1115610ccb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc29061442f565b60405180910390fd5b600a60008381526020019081526020016000205481600c600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d3b91906143af565b1115610d7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d739061449b565b60405180910390fd5b80600c600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610dd891906143af565b600c600084815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600b600084815260200190815260200160002054610e4b91906143af565b600b600084815260200190815260200160002081905550610e7d33838360405180602001604052806000815250611f7b565b5050565b610e89611efd565b600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610f386116cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610fba5750600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610ff9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff09061452d565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611061573d6000803e3d6000fd5b50565b8460006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156111a4573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110d8576110d3868686868661212b565b6111b2565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b815260040161112192919061454d565b602060405180830381865afa15801561113e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611162919061458b565b6111a357336040517fede71dcc00000000000000000000000000000000000000000000000000000000815260040161119a9190613d4f565b60405180910390fd5b5b6111b1868686868661212b565b5b505050505050565b600a6020528060005260406000206000915090505481565b6daaeb6d7670e522a718067333cd4e81565b6060815183511461122a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112219061462a565b60405180910390fd5b6000835167ffffffffffffffff81111561124757611246613706565b5b6040519080825280602002602001820160405280156112755781602001602082028036833780820191505090505b50905060005b84518110156112f2576112c285828151811061129a5761129961464a565b5b60200260200101518583815181106112b5576112b461464a565b5b6020026020010151610881565b8282815181106112d5576112d461464a565b5b602002602001018181525050806112eb90614679565b905061127b565b508091505092915050565b600b6020528060005260406000206000915090505481565b61131d6121cc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061136357506113628361135d6121cc565b611ab6565b5b6113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139990614733565b60405180910390fd5b6113ad8383836121d4565b505050565b600660205280600052604060002060009150905080546113d1906141c9565b80601f01602080910402602001604051908101604052809291908181526020018280546113fd906141c9565b801561144a5780601f1061141f5761010080835404028352916020019161144a565b820191906000526020600020905b81548152906001019060200180831161142d57829003601f168201915b505050505081565b61145a611efd565b6008600082815260200190815260200160002060009054906101000a900460ff16156008600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6114b1611efd565b6114bb60006124a2565b565b6114c5611efd565b81600a6000838152602001908152602001600020819055505050565b60086020528060005260406000206000915054906101000a900460ff1681565b6008600083815260200190815260200160002060009054906101000a900460ff16611561576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115589061479f565b60405180910390fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166115ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e49061480b565b60405180910390fd5b80600760008481526020019081526020016000205461160c9190614301565b341461164d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116449061438f565b60405180910390fd5b600060066000848152602001908152602001600020805461166d906141c9565b9050116116af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a6906142b2565b60405180910390fd5b6116ca83838360405180602001604052806000815250611f7b565b505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6117016116cf565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806117835750600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6117c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117b99061452d565b60405180910390fd5b60005b868690508110156118d2576000600660008989858181106117e9576117e861464a565b5b9050602002013581526020019081526020016000208054611809906141c9565b90501161184b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611842906142b2565b60405180910390fd5b6118bf8383838181106118615761186061464a565b5b90506020020160208101906118769190613694565b8888848181106118895761188861464a565b5b905060200201358787858181106118a3576118a261464a565b5b9050602002013560405180602001604052806000815250611f7b565b80806118ca90614679565b9150506117c5565b50505050505050565b60056020528060005260406000206000915054906101000a900460ff1681565b8160006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156119f6576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b815260040161197392919061454d565b602060405180830381865afa158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b4919061458b565b6119f557806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016119ec9190613d4f565b60405180910390fd5b5b611a008383612568565b505050565b611a0d611efd565b8160096000838152602001908152602001600020819055505050565b60046020528060005260406000206000915054906101000a900460ff1681565b600c602052816000526040600020602052806000526040600020600091509150505481565b611a76611efd565b8282600660008481526020019081526020016000209182611a989291906149d8565b50505050565b60076020528060005260406000206000915090505481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611b52611efd565b8160076000838152602001908152602001600020819055505050565b8460006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115611cae573373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611be257611bdd868686868661257e565b611cbc565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430336040518363ffffffff1660e01b8152600401611c2b92919061454d565b602060405180830381865afa158015611c48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6c919061458b565b611cad57336040517fede71dcc000000000000000000000000000000000000000000000000000000008152600401611ca49190613d4f565b60405180910390fd5b5b611cbb868686868661257e565b5b505050505050565b611ccc611efd565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3290614b1a565b60405180910390fd5b611d44816124a2565b50565b611d4f6121cc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611d955750611d9483611d8f6121cc565b611ab6565b5b611dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dcb90614733565b60405180910390fd5b611ddf83838361261f565b505050565b611dec611efd565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611f056121cc565b73ffffffffffffffffffffffffffffffffffffffff16611f236116cf565b73ffffffffffffffffffffffffffffffffffffffff1614611f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f7090614b86565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611fea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe190614c18565b60405180910390fd5b6000611ff46121cc565b9050600061200185612865565b9050600061200e85612865565b905061201f836000898585896128df565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461207e91906143af565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516120fc929190614c38565b60405180910390a4612113836000898585896128e7565b612122836000898989896128ef565b50505050505050565b6121336121cc565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806121795750612178856121736121cc565b611ab6565b5b6121b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121af90614733565b60405180910390fd5b6121c58585858585612ac6565b5050505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223a90614cd3565b60405180910390fd5b8051825114612287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227e90614d65565b60405180910390fd5b60006122916121cc565b90506122b1818560008686604051806020016040528060008152506128df565b60005b83518110156123fe5760008482815181106122d2576122d161464a565b5b6020026020010151905060008483815181106122f1576122f061464a565b5b60200260200101519050600080600084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238990614df7565b60405180910390fd5b81810360008085815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505080806123f690614679565b9150506122b4565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612476929190614e17565b60405180910390a461249c818560008686604051806020016040528060008152506128e7565b50505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61257a6125736121cc565b8383612de7565b5050565b6125866121cc565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614806125cc57506125cb856125c66121cc565b611ab6565b5b61260b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260290614733565b60405180910390fd5b6126188585858585612f53565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361268e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268590614cd3565b60405180910390fd5b60006126986121cc565b905060006126a584612865565b905060006126b284612865565b90506126d2838760008585604051806020016040528060008152506128df565b600080600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905084811015612769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161276090614df7565b60405180910390fd5b84810360008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051612836929190614c38565b60405180910390a461285c848860008686604051806020016040528060008152506128e7565b50505050505050565b60606000600167ffffffffffffffff81111561288457612883613706565b5b6040519080825280602002602001820160405280156128b25781602001602082028036833780820191505090505b50905082816000815181106128ca576128c961464a565b5b60200260200101818152505080915050919050565b505050505050565b505050505050565b61290e8473ffffffffffffffffffffffffffffffffffffffff166131ee565b15612abe578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401612954959493929190614ea3565b6020604051808303816000875af192505050801561299057506040513d601f19601f8201168201806040525081019061298d9190614f12565b60015b612a355761299c614f4c565b806308c379a0036129f857506129b0614f6e565b806129bb57506129fa565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129ef9190613672565b60405180910390fd5b505b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2c90615070565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612abc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ab390615102565b60405180910390fd5b505b505050505050565b8151835114612b0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b0190614d65565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7090615194565b60405180910390fd5b6000612b836121cc565b9050612b938187878787876128df565b60005b8451811015612d44576000858281518110612bb457612bb361464a565b5b602002602001015190506000858381518110612bd357612bd261464a565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c6b90615226565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612d2991906143af565b9250508190555050505080612d3d90614679565b9050612b96565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612dbb929190614e17565b60405180910390a4612dd18187878787876128e7565b612ddf818787878787613211565b505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612e55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e4c906152b8565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612f46919061359a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fb990615194565b60405180910390fd5b6000612fcc6121cc565b90506000612fd985612865565b90506000612fe685612865565b9050612ff68389898585896128df565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508581101561308d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161308490615226565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461314291906143af565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516131bf929190614c38565b60405180910390a46131d5848a8a86868a6128e7565b6131e3848a8a8a8a8a6128ef565b505050505050505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6132308473ffffffffffffffffffffffffffffffffffffffff166131ee565b156133e0578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016132769594939291906152d8565b6020604051808303816000875af19250505080156132b257506040513d601f19601f820116820180604052508101906132af9190614f12565b60015b613357576132be614f4c565b806308c379a00361331a57506132d2614f6e565b806132dd575061331c565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133119190613672565b60405180910390fd5b505b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161334e90615070565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146133de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133d590615102565b60405180910390fd5b505b505050505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613427826133fc565b9050919050565b6134378161341c565b811461344257600080fd5b50565b6000813590506134548161342e565b92915050565b6000819050919050565b61346d8161345a565b811461347857600080fd5b50565b60008135905061348a81613464565b92915050565b600080604083850312156134a7576134a66133f2565b5b60006134b585828601613445565b92505060206134c68582860161347b565b9150509250929050565b6134d98161345a565b82525050565b60006020820190506134f460008301846134d0565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61352f816134fa565b811461353a57600080fd5b50565b60008135905061354c81613526565b92915050565b600060208284031215613568576135676133f2565b5b60006135768482850161353d565b91505092915050565b60008115159050919050565b6135948161357f565b82525050565b60006020820190506135af600083018461358b565b92915050565b6000602082840312156135cb576135ca6133f2565b5b60006135d98482850161347b565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561361c578082015181840152602081019050613601565b60008484015250505050565b6000601f19601f8301169050919050565b6000613644826135e2565b61364e81856135ed565b935061365e8185602086016135fe565b61366781613628565b840191505092915050565b6000602082019050818103600083015261368c8184613639565b905092915050565b6000602082840312156136aa576136a96133f2565b5b60006136b884828501613445565b91505092915050565b600080604083850312156136d8576136d76133f2565b5b60006136e68582860161347b565b92505060206136f78582860161347b565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61373e82613628565b810181811067ffffffffffffffff8211171561375d5761375c613706565b5b80604052505050565b60006137706133e8565b905061377c8282613735565b919050565b600067ffffffffffffffff82111561379c5761379b613706565b5b602082029050602081019050919050565b600080fd5b60006137c56137c084613781565b613766565b905080838252602082019050602084028301858111156137e8576137e76137ad565b5b835b8181101561381157806137fd888261347b565b8452602084019350506020810190506137ea565b5050509392505050565b600082601f8301126138305761382f613701565b5b81356138408482602086016137b2565b91505092915050565b600080fd5b600067ffffffffffffffff82111561386957613868613706565b5b61387282613628565b9050602081019050919050565b82818337600083830152505050565b60006138a161389c8461384e565b613766565b9050828152602081018484840111156138bd576138bc613849565b5b6138c884828561387f565b509392505050565b600082601f8301126138e5576138e4613701565b5b81356138f584826020860161388e565b91505092915050565b600080600080600060a0868803121561391a576139196133f2565b5b600061392888828901613445565b955050602061393988828901613445565b945050604086013567ffffffffffffffff81111561395a576139596133f7565b5b6139668882890161381b565b935050606086013567ffffffffffffffff811115613987576139866133f7565b5b6139938882890161381b565b925050608086013567ffffffffffffffff8111156139b4576139b36133f7565b5b6139c0888289016138d0565b9150509295509295909350565b6000819050919050565b60006139f26139ed6139e8846133fc565b6139cd565b6133fc565b9050919050565b6000613a04826139d7565b9050919050565b6000613a16826139f9565b9050919050565b613a2681613a0b565b82525050565b6000602082019050613a416000830184613a1d565b92915050565b600067ffffffffffffffff821115613a6257613a61613706565b5b602082029050602081019050919050565b6000613a86613a8184613a47565b613766565b90508083825260208201905060208402830185811115613aa957613aa86137ad565b5b835b81811015613ad25780613abe8882613445565b845260208401935050602081019050613aab565b5050509392505050565b600082601f830112613af157613af0613701565b5b8135613b01848260208601613a73565b91505092915050565b60008060408385031215613b2157613b206133f2565b5b600083013567ffffffffffffffff811115613b3f57613b3e6133f7565b5b613b4b85828601613adc565b925050602083013567ffffffffffffffff811115613b6c57613b6b6133f7565b5b613b788582860161381b565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613bb78161345a565b82525050565b6000613bc98383613bae565b60208301905092915050565b6000602082019050919050565b6000613bed82613b82565b613bf78185613b8d565b9350613c0283613b9e565b8060005b83811015613c33578151613c1a8882613bbd565b9750613c2583613bd5565b925050600181019050613c06565b5085935050505092915050565b60006020820190508181036000830152613c5a8184613be2565b905092915050565b600080600060608486031215613c7b57613c7a6133f2565b5b6000613c8986828701613445565b935050602084013567ffffffffffffffff811115613caa57613ca96133f7565b5b613cb68682870161381b565b925050604084013567ffffffffffffffff811115613cd757613cd66133f7565b5b613ce38682870161381b565b9150509250925092565b600080600060608486031215613d0657613d056133f2565b5b6000613d1486828701613445565b9350506020613d258682870161347b565b9250506040613d368682870161347b565b9150509250925092565b613d498161341c565b82525050565b6000602082019050613d646000830184613d40565b92915050565b600080fd5b60008083601f840112613d8557613d84613701565b5b8235905067ffffffffffffffff811115613da257613da1613d6a565b5b602083019150836020820283011115613dbe57613dbd6137ad565b5b9250929050565b60008083601f840112613ddb57613dda613701565b5b8235905067ffffffffffffffff811115613df857613df7613d6a565b5b602083019150836020820283011115613e1457613e136137ad565b5b9250929050565b60008060008060008060608789031215613e3857613e376133f2565b5b600087013567ffffffffffffffff811115613e5657613e556133f7565b5b613e6289828a01613d6f565b9650965050602087013567ffffffffffffffff811115613e8557613e846133f7565b5b613e9189828a01613d6f565b9450945050604087013567ffffffffffffffff811115613eb457613eb36133f7565b5b613ec089828a01613dc5565b92509250509295509295509295565b613ed88161357f565b8114613ee357600080fd5b50565b600081359050613ef581613ecf565b92915050565b60008060408385031215613f1257613f116133f2565b5b6000613f2085828601613445565b9250506020613f3185828601613ee6565b9150509250929050565b60008060408385031215613f5257613f516133f2565b5b6000613f608582860161347b565b9250506020613f7185828601613445565b9150509250929050565b60008083601f840112613f9157613f90613701565b5b8235905067ffffffffffffffff811115613fae57613fad613d6a565b5b602083019150836001820283011115613fca57613fc96137ad565b5b9250929050565b600080600060408486031215613fea57613fe96133f2565b5b600084013567ffffffffffffffff811115614008576140076133f7565b5b61401486828701613f7b565b935093505060206140278682870161347b565b9150509250925092565b60008060408385031215614048576140476133f2565b5b600061405685828601613445565b925050602061406785828601613445565b9150509250929050565b600080600080600060a0868803121561408d5761408c6133f2565b5b600061409b88828901613445565b95505060206140ac88828901613445565b94505060406140bd8882890161347b565b93505060606140ce8882890161347b565b925050608086013567ffffffffffffffff8111156140ef576140ee6133f7565b5b6140fb888289016138d0565b9150509295509295909350565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000614164602a836135ed565b915061416f82614108565b604082019050919050565b6000602082019050818103600083015261419381614157565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806141e157607f821691505b6020821081036141f4576141f361419a565b5b50919050565b7f52657175697265206275726e696e670000000000000000000000000000000000600082015250565b6000614230600f836135ed565b915061423b826141fa565b602082019050919050565b6000602082019050818103600083015261425f81614223565b9050919050565b7f4e6f7420617574686f72697a6564202d20555249206e6f7420646566696e6564600082015250565b600061429c6020836135ed565b91506142a782614266565b602082019050919050565b600060208201905081810360008301526142cb8161428f565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061430c8261345a565b91506143178361345a565b92508282026143258161345a565b9150828204841483151761433c5761433b6142d2565b5b5092915050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b6000614379600e836135ed565b915061438482614343565b602082019050919050565b600060208201905081810360008301526143a88161436c565b9050919050565b60006143ba8261345a565b91506143c58361345a565b92508282019050808211156143dd576143dc6142d2565b5b92915050565b7f4d617820737570706c7920726561636865640000000000000000000000000000600082015250565b60006144196012836135ed565b9150614424826143e3565b602082019050919050565b600060208201905081810360008301526144488161440c565b9050919050565b7f496e646976696475616c20737570706c79207265616368656400000000000000600082015250565b60006144856019836135ed565b91506144908261444f565b602082019050919050565b600060208201905081810360008301526144b481614478565b9050919050565b7f596f7520617265206e6f7420617574686f72697a656420746f20706572666f7260008201527f6d207468697320616374696f6e00000000000000000000000000000000000000602082015250565b6000614517602d836135ed565b9150614522826144bb565b604082019050919050565b600060208201905081810360008301526145468161450a565b9050919050565b60006040820190506145626000830185613d40565b61456f6020830184613d40565b9392505050565b60008151905061458581613ecf565b92915050565b6000602082840312156145a1576145a06133f2565b5b60006145af84828501614576565b91505092915050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006146146029836135ed565b915061461f826145b8565b604082019050919050565b6000602082019050818103600083015261464381614607565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006146848261345a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036146b6576146b56142d2565b5b600182019050919050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b600061471d602e836135ed565b9150614728826146c1565b604082019050919050565b6000602082019050818103600083015261474c81614710565b9050919050565b7f446f6e27742072657175697265206275726e696e670000000000000000000000600082015250565b60006147896015836135ed565b915061479482614753565b602082019050919050565b600060208201905081810360008301526147b88161477c565b9050919050565b7f4e6f7420617574686f72697a6564000000000000000000000000000000000000600082015250565b60006147f5600e836135ed565b9150614800826147bf565b602082019050919050565b60006020820190508181036000830152614824816147e8565b9050919050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148987fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261485b565b6148a2868361485b565b95508019841693508086168417925050509392505050565b60006148d56148d06148cb8461345a565b6139cd565b61345a565b9050919050565b6000819050919050565b6148ef836148ba565b6149036148fb826148dc565b848454614868565b825550505050565b600090565b61491861490b565b6149238184846148e6565b505050565b5b818110156149475761493c600082614910565b600181019050614929565b5050565b601f82111561498c5761495d81614836565b6149668461484b565b81016020851015614975578190505b6149896149818561484b565b830182614928565b50505b505050565b600082821c905092915050565b60006149af60001984600802614991565b1980831691505092915050565b60006149c8838361499e565b9150826002028217905092915050565b6149e2838361482b565b67ffffffffffffffff8111156149fb576149fa613706565b5b614a0582546141c9565b614a1082828561494b565b6000601f831160018114614a3f5760008415614a2d578287013590505b614a3785826149bc565b865550614a9f565b601f198416614a4d86614836565b60005b82811015614a7557848901358255600182019150602085019450602081019050614a50565b86831015614a925784890135614a8e601f89168261499e565b8355505b6001600288020188555050505b50505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614b046026836135ed565b9150614b0f82614aa8565b604082019050919050565b60006020820190508181036000830152614b3381614af7565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614b706020836135ed565b9150614b7b82614b3a565b602082019050919050565b60006020820190508181036000830152614b9f81614b63565b9050919050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614c026021836135ed565b9150614c0d82614ba6565b604082019050919050565b60006020820190508181036000830152614c3181614bf5565b9050919050565b6000604082019050614c4d60008301856134d0565b614c5a60208301846134d0565b9392505050565b7f455243313135353a206275726e2066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000614cbd6023836135ed565b9150614cc882614c61565b604082019050919050565b60006020820190508181036000830152614cec81614cb0565b9050919050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000614d4f6028836135ed565b9150614d5a82614cf3565b604082019050919050565b60006020820190508181036000830152614d7e81614d42565b9050919050565b7f455243313135353a206275726e20616d6f756e7420657863656564732062616c60008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000614de16024836135ed565b9150614dec82614d85565b604082019050919050565b60006020820190508181036000830152614e1081614dd4565b9050919050565b60006040820190508181036000830152614e318185613be2565b90508181036020830152614e458184613be2565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000614e7582614e4e565b614e7f8185614e59565b9350614e8f8185602086016135fe565b614e9881613628565b840191505092915050565b600060a082019050614eb86000830188613d40565b614ec56020830187613d40565b614ed260408301866134d0565b614edf60608301856134d0565b8181036080830152614ef18184614e6a565b90509695505050505050565b600081519050614f0c81613526565b92915050565b600060208284031215614f2857614f276133f2565b5b6000614f3684828501614efd565b91505092915050565b60008160e01c9050919050565b600060033d1115614f6b5760046000803e614f68600051614f3f565b90505b90565b600060443d10614ffb57614f806133e8565b60043d036004823e80513d602482011167ffffffffffffffff82111715614fa8575050614ffb565b808201805167ffffffffffffffff811115614fc65750505050614ffb565b80602083010160043d038501811115614fe3575050505050614ffb565b614ff282602001850186613735565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b600061505a6034836135ed565b915061506582614ffe565b604082019050919050565b600060208201905081810360008301526150898161504d565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006150ec6028836135ed565b91506150f782615090565b604082019050919050565b6000602082019050818103600083015261511b816150df565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061517e6025836135ed565b915061518982615122565b604082019050919050565b600060208201905081810360008301526151ad81615171565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000615210602a836135ed565b915061521b826151b4565b604082019050919050565b6000602082019050818103600083015261523f81615203565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b60006152a26029836135ed565b91506152ad82615246565b604082019050919050565b600060208201905081810360008301526152d181615295565b9050919050565b600060a0820190506152ed6000830188613d40565b6152fa6020830187613d40565b818103604083015261530c8186613be2565b905081810360608301526153208185613be2565b905081810360808301526153348184614e6a565b9050969550505050505056fea2646970667358221220e25a245654dfea7d2705138e012262a23ec2c5d0d552cfdb807e5f2264541fae64736f6c63430008110033
Verified Source Code Full Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: No
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @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;
}
}
IERC1155Receiver.sol 58 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev _Available since v3.1._
*/
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);
}
IERC1155.sol 125 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*
* _Available since v3.1._
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` tokens of token 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 amount 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 `amount` tokens of token type `id` from `from` to `to`.
*
* 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 `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 amount,
bytes calldata data
) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `amounts` 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 amounts,
bytes calldata data
) external;
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @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);
}
ERC1155Burnable.sol 40 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/extensions/ERC1155Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC1155.sol";
/**
* @dev Extension of {ERC1155} that allows token holders to destroy both their
* own tokens and those that they have been approved to use.
*
* _Available since v3.1._
*/
abstract contract ERC1155Burnable is ERC1155 {
function burn(
address account,
uint256 id,
uint256 value
) public virtual {
require(
account == _msgSender() || isApprovedForAll(account, _msgSender()),
"ERC1155: caller is not token owner or approved"
);
_burn(account, id, value);
}
function burnBatch(
address account,
uint256[] memory ids,
uint256[] memory values
) public virtual {
require(
account == _msgSender() || isApprovedForAll(account, _msgSender()),
"ERC1155: caller is not token owner or approved"
);
_burnBatch(account, ids, values);
}
}
ERC165.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./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);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
Address.sol 244 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
IOperatorFilterRegistry.sol 29 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
function register(address registrant) external;
function registerAndSubscribe(address registrant, address subscription) external;
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
function unregister(address addr) external;
function updateOperator(address registrant, address operator, bool filtered) external;
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
function subscribe(address registrant, address registrantToSubscribe) external;
function unsubscribe(address registrant, bool copyExistingEntries) external;
function subscriptionOf(address addr) external returns (address registrant);
function subscribers(address registrant) external returns (address[] memory);
function subscriberAt(address registrant, uint256 index) external returns (address);
function copyEntriesOf(address registrant, address registrantToCopy) external;
function isOperatorFiltered(address registrant, address operator) external returns (bool);
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
function filteredOperators(address addr) external returns (address[] memory);
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
function isRegistered(address addr) external returns (bool);
function codeHashOf(address addr) external returns (bytes32);
}
podburn.sol 160 lines
// SPDX-License-Identifier: MIT
//
// .@@@
// ,@@@@@@@&, #@@%
// @@@@@@@@@@@@@@. @@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.
// @@@@@@@ &@@@@@@@@@@@@@@@@@
// @@@/ &@@@@@@@@@@@@@,
// @ @@@@@@@@@@@
// /@@@@@@@#
// @@@@@
// *@&
// RTFKT Studios (https://twitter.com/RTFKT)
// Pods Contract (made by @CardilloSamuel, co-paired with @Maximonee_)
/**
RTFKT Legal Overview [https://rtfkt.com/legaloverview]
1. RTFKT Platform Terms of Services [Document #1, https://rtfkt.com/tos]
2. End Use License Terms
A. Digital Collectible Terms (RTFKT-Owned Content) [Document #2-A, https://rtfkt.com/legal-2A]
B. Digital Collectible Terms (Third Party Content) [Document #2-B, https://rtfkt.com/legal-2B]
C. Digital Collectible Limited Commercial Use License Terms (RTFKT-Owned Content) [Document #2-C, https://rtfkt.com/legal-2C]
D. Digital Collectible Terms [Document #2-D, https://rtfkt.com/legal-2D]
3. Policies or other documentation
A. RTFKT Privacy Policy [Document #3-A, https://rtfkt.com/privacy]
B. NFT Issuance and Marketing Policy [Document #3-B, https://rtfkt.com/legal-3B]
C. Transfer Fees [Document #3C, https://rtfkt.com/legal-3C]
C. 1. Commercialization Registration [https://rtfkt.typeform.com/to/u671kiRl]
4. General notices
A. Murakami Short Verbiage – User Experience Notice [Document #X-1, https://rtfkt.com/legal-X1]
**/
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "https://github.com/ProjectOpenSea/operator-filter-registry/blob/529cceeda9f5f8e28812c20042cc57626f784718/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
contract Pods is DefaultOperatorFilterer, ERC1155, Ownable, ERC1155Burnable {
constructor() ERC1155("") {
requireBurning[1] = true;
requireBurning[2] = true;
ownerApproved[0x1ae6A4d3078b951438d1aa64DE6C1E4e033913D6] = true;
}
modifier isOwnerApproved() {
require(msg.sender == owner() || ownerApproved[msg.sender], "You are not authorized to perform this action");
_;
}
mapping (address => bool) public authorizedContract;
mapping (address => bool) public ownerApproved;
mapping (uint256 => string) public tokenURIs;
mapping (uint256 => uint256) public tokenPrice;
mapping (uint256 => bool) public requireBurning;
mapping (uint256 => uint256) public maxSupplyLimits;
mapping (uint256 => uint256) public individualSupplyLimits;
mapping (uint256 => uint256) public mintedByTokenId;
mapping (uint256 => mapping (address => uint256)) public mintedByWalletByTokenId;
address withdrawAddress;
function mintThroughBurn(address newOwner, uint256 tokenId, uint256 amount) payable public {
require(requireBurning[tokenId], "Don't require burning");
require(authorizedContract[msg.sender], "Not authorized");
require(msg.value == tokenPrice[tokenId] * amount, "Not enough ETH");
require(bytes(tokenURIs[tokenId]).length > 0, "Not authorized - URI not defined");
_mint(newOwner, tokenId, amount, "");
}
function mint(uint256 tokenId, uint256 amount) payable public {
require(!requireBurning[tokenId], "Require burning");
require(bytes(tokenURIs[tokenId]).length > 0, "Not authorized - URI not defined");
require(msg.value == tokenPrice[tokenId] * amount, "Not enough ETH");
require(mintedByTokenId[tokenId] + amount <= maxSupplyLimits[tokenId], "Max supply reached");
require(mintedByWalletByTokenId[tokenId][msg.sender] + amount <= individualSupplyLimits[tokenId], "Individual supply reached");
mintedByWalletByTokenId[tokenId][msg.sender] = mintedByWalletByTokenId[tokenId][msg.sender] + amount;
mintedByTokenId[tokenId] = mintedByTokenId[tokenId] + amount;
_mint(msg.sender, tokenId, amount, "");
}
function airdropToken(uint256[] calldata tokenIds, uint256[] calldata amounts, address[] calldata receivers) public isOwnerApproved {
for(uint256 i = 0; i < tokenIds.length; i++) {
require(bytes(tokenURIs[tokenIds[i]]).length > 0, "Not authorized - URI not defined");
_mint(receivers[i], tokenIds[i], amounts[i], "");
}
}
function uri(uint256 tokenId) public view virtual override returns (string memory) {
return tokenURIs[tokenId];
}
/////////////////////////////
// CONTRACT MANAGEMENT
/////////////////////////////
function toggleRequireBurning(uint256 tokenId) public onlyOwner {
requireBurning[tokenId] = !requireBurning[tokenId];
}
function setTokenPrice(uint256 newPrice, uint256 tokenId) public onlyOwner {
tokenPrice[tokenId] = newPrice;
}
function setTokenUri(string calldata newUri, uint256 tokenId) public onlyOwner {
tokenURIs[tokenId] = newUri;
}
function toggleContractApproval(address contractToApprove) public onlyOwner {
authorizedContract[contractToApprove] = !authorizedContract[contractToApprove];
}
function changeWithdrawAddress(address newAddress) public onlyOwner {
withdrawAddress = newAddress;
}
function toggleApprovedOwner(address addressToToggle) public onlyOwner {
ownerApproved[addressToToggle] = !ownerApproved[addressToToggle];
}
function setTokenMaxSupply(uint256 supply, uint256 tokenId) public onlyOwner {
maxSupplyLimits[tokenId] = supply;
}
function setTokenIndividualSupply(uint256 supply, uint256 tokenId) public onlyOwner {
individualSupplyLimits[tokenId] = supply;
}
function withdrawFunds() public isOwnerApproved {
payable(withdrawAddress).transfer(address(this).balance);
}
/////////////////////////////////
// OPENSEA ROYALTIES MANAGEMENT
/////////////////////////////////
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
super.setApprovalForAll(operator, approved);
}
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes memory data) public override onlyAllowedOperator(from) {
super.safeTransferFrom(from, to, tokenId, amount, data);
}
function safeBatchTransferFrom(address from,address to,uint256[] memory ids,uint256[] memory amounts,bytes memory data) public virtual override onlyAllowedOperator(from) {
super.safeBatchTransferFrom(from, to, ids, amounts, data);
}
}
OperatorFilterer.sol 63 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
/**
* @title OperatorFilterer
* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
* registrant's entries in the OperatorFilterRegistry.
* @dev This smart contract is meant to be inherited by token contracts so they can use the following:
* - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
* - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
*/
abstract contract OperatorFilterer {
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
// If an inheriting token contract is deployed to a network without the registry deployed, the modifier
// will not revert, but the contract will need to be registered with the registry once it is deployed in
// order for the modifier to filter addresses.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
if (subscribe) {
OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
OPERATOR_FILTER_REGISTRY.register(address(this));
}
}
}
}
modifier onlyAllowedOperator(address from) virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
// Allow spending tokens from addresses with balance
// Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
// from an EOA.
if (from == msg.sender) {
_;
return;
}
if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), msg.sender)) {
revert OperatorNotAllowed(msg.sender);
}
}
_;
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
_;
}
}
IERC1155MetadataURI.sol 22 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.0;
import "../IERC1155.sol";
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
*
* _Available since v3.1._
*/
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);
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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.
*
* By default, the owner account will be the one that deploys the contract. 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;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @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 {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing 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 {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_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);
}
}
ERC1155.sol 517 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.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
*
* _Available since v3.1._
*/
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address => 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) public view virtual override returns (string memory) {
return _uri;
}
/**
* @dev See {IERC1155-balanceOf}.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
require(account != address(0), "ERC1155: address zero is not a valid owner");
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
override
returns (uint256[] memory)
{
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts[i], ids[i]);
}
return batchBalances;
}
/**
* @dev See {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
return _operatorApprovals[account][operator];
}
/**
* @dev See {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not token owner or approved"
);
_safeTransferFrom(from, to, id, amount, data);
}
/**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not token owner or approved"
);
_safeBatchTransferFrom(from, to, ids, amounts, data);
}
/**
* @dev Transfers `amount` 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 `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 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
emit TransferSingle(operator, from, to, id, amount);
_afterTokenTransfer(operator, from, to, ids, amounts, data);
_doSafeTransferAcceptanceCheck(operator, from, to, id, amount, 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.
*/
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
}
emit TransferBatch(operator, from, to, ids, amounts);
_afterTokenTransfer(operator, from, to, ids, amounts, data);
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, 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 amounts 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 `amount` tokens of token 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 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
_balances[id][to] += amount;
emit TransferSingle(operator, address(0), to, id, amount);
_afterTokenTransfer(operator, address(0), to, ids, amounts, data);
_doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - 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 amounts,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; i++) {
_balances[ids[i]][to] += amounts[i];
}
emit TransferBatch(operator, address(0), to, ids, amounts);
_afterTokenTransfer(operator, address(0), to, ids, amounts, data);
_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
}
/**
* @dev Destroys `amount` tokens of token type `id` from `from`
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `amount` tokens of token type `id`.
*/
function _burn(
address from,
uint256 id,
uint256 amount
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
emit TransferSingle(operator, from, address(0), id, amount);
_afterTokenTransfer(operator, from, address(0), ids, amounts, "");
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
*/
function _burnBatch(
address from,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
for (uint256 i = 0; i < ids.length; i++) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
}
emit TransferBatch(operator, from, address(0), ids, amounts);
_afterTokenTransfer(operator, from, address(0), ids, amounts, "");
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC1155: setting approval status for self");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the `ids` and `amounts` arrays will be 1.
*
* Calling conditions (for each `id` and `amount` pair):
*
* - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* of token type `id` will be transferred to `to`.
* - When `from` is zero, `amount` tokens of token type `id` will be minted
* for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
* will be burned.
* - `from` and `to` are never both zero.
* - `ids` and `amounts` have the same, non-zero length.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
/**
* @dev Hook that is called after any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the `id` and `amount` arrays will be 1.
*
* Calling conditions (for each `id` and `amount` pair):
*
* - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* of token type `id` will be transferred to `to`.
* - When `from` is zero, `amount` tokens of token type `id` will be minted
* for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
* will be burned.
* - `from` and `to` are never both zero.
* - `ids` and `amounts` have the same, non-zero length.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non-ERC1155Receiver implementer");
}
}
}
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non-ERC1155Receiver implementer");
}
}
}
function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
uint256[] memory array = new uint256[](1);
array[0] = element;
return array;
}
}
DefaultOperatorFilterer.sol 14 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {OperatorFilterer} from "./OperatorFilterer.sol";
/**
* @title DefaultOperatorFilterer
* @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
*/
abstract contract DefaultOperatorFilterer is OperatorFilterer {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}
Read Contract
OPERATOR_FILTER_REGISTRY 0x41f43434 → address
authorizedContract 0xc189754c → bool
balanceOf 0x00fdd58e → uint256
balanceOfBatch 0x4e1273f4 → uint256[]
individualSupplyLimits 0x404f0e2c → uint256
isApprovedForAll 0xe985e9c5 → bool
maxSupplyLimits 0x15c94ef2 → uint256
mintedByTokenId 0x5ed6b5ba → uint256
mintedByWalletByTokenId 0xd156af8d → uint256
owner 0x8da5cb5b → address
ownerApproved 0x9e115848 → bool
requireBurning 0x7ca76771 → bool
supportsInterface 0x01ffc9a7 → bool
tokenPrice 0xd4ddce8a → uint256
tokenURIs 0x6c8b703f → string
uri 0x0e89341c → string
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
airdropToken 0x8e0b2634
uint256[] tokenIds
uint256[] amounts
address[] receivers
burn 0xf5298aca
address account
uint256 id
uint256 value
burnBatch 0x6b20c454
address account
uint256[] ids
uint256[] values
changeWithdrawAddress 0x1453671d
address newAddress
mint 0x1b2ef1ca
uint256 tokenId
uint256 amount
mintThroughBurn 0x8830434d
address newOwner
uint256 tokenId
uint256 amount
renounceOwnership 0x715018a6
No parameters
safeBatchTransferFrom 0x2eb2c2d6
address from
address to
uint256[] ids
uint256[] amounts
bytes data
safeTransferFrom 0xf242432a
address from
address to
uint256 tokenId
uint256 amount
bytes data
setApprovalForAll 0xa22cb465
address operator
bool approved
setTokenIndividualSupply 0x7a2edf47
uint256 supply
uint256 tokenId
setTokenMaxSupply 0xb6ea4671
uint256 supply
uint256 tokenId
setTokenPrice 0xeb685c47
uint256 newPrice
uint256 tokenId
setTokenUri 0xd480924d
string newUri
uint256 tokenId
toggleApprovedOwner 0xfee19128
address addressToToggle
toggleContractApproval 0x1eab1942
address contractToApprove
toggleRequireBurning 0x6e416b88
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdrawFunds 0x24600fc3
No parameters
Recent Transactions
This address has 1 on-chain transactions, but only 1.4% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →