Address Contract Partially Verified
Address
0xDF74f8983bF07197fE05f98dBF4a094Fc99F1EAF
Balance
0.000100000 ETH ($0.21)
Nonce
1
Code Size
17345 bytes
Creator
0x68e5EB65...2b01 at tx 0x161395ce...9460cf
Indexed Transactions
0 (1 on-chain, 0.8% indexed)
Contract Bytecode
17345 bytes
0x6080604052600436106101e1575f3560e01c806351858e2711610101578063b4b5b48f11610094578063db006a7511610063578063db006a75146106eb578063e985e9c514610713578063f242432a1461074f578063f8f1147d14610777576101e1565b8063b4b5b48f1461062f578063cb3c3c0314610671578063d539139314610699578063d547741f146106c3576101e1565b806391d14854116100d057806391d1485414610579578063a217fddf146105b5578063a22cb465146105df578063ada8f91914610607576101e1565b806351858e27146104af5780635ddb0845146104c55780636af7109c146105015780638ad913451461053d576101e1565b8063248a9ca31161017957806336568abe1161014857806336568abe1461040d57806337da577c146104355780634a4e3bd51461045d5780634e1273f414610473576101e1565b8063248a9ca31461035757806327c830a9146103935780632eb2c2d6146103bd5780632f2ff15d146103e5576101e1565b80630e89341c116101b55780630e89341c146102ad5780631071a88d146102e9578063162094c4146103135780631b2ef1ca1461033b576101e1565b8062fdd58e146101e557806301ffc9a714610221578063026d39421461025d5780630442bfa814610285575b5f80fd5b3480156101f0575f80fd5b5061020b60048036038101906102069190612997565b6107b3565b60405161021891906129e4565b60405180910390f35b34801561022c575f80fd5b5061024760048036038101906102429190612a52565b610808565b6040516102549190612a97565b60405180910390f35b348015610268575f80fd5b50610283600480360381019061027e9190612ab0565b610819565b005b348015610290575f80fd5b506102ab60048036038101906102a69190612b00565b610937565b005b3480156102b8575f80fd5b506102d360048036038101906102ce9190612b3e565b6109b6565b6040516102e09190612bf3565b60405180910390f35b3480156102f4575f80fd5b506102fd610a5a565b60405161030a9190612bf3565b60405180910390f35b34801561031e575f80fd5b5061033960048036038101906103349190612d3f565b610ae6565b005b61035560048036038101906103509190612b00565b610ba6565b005b348015610362575f80fd5b5061037d60048036038101906103789190612dcc565b610f1a565b60405161038a9190612e06565b60405180910390f35b34801561039e575f80fd5b506103a7610f37565b6040516103b49190612a97565b60405180910390f35b3480156103c8575f80fd5b506103e360048036038101906103de9190612f81565b610f49565b005b3480156103f0575f80fd5b5061040b6004803603810190610406919061304c565b610f84565b005b348015610418575f80fd5b50610433600480360381019061042e919061304c565b610fa6565b005b348015610440575f80fd5b5061045b60048036038101906104569190612b00565b611021565b005b348015610468575f80fd5b5061047161113b565b005b34801561047e575f80fd5b506104996004803603810190610494919061314a565b61118f565b6040516104a69190613277565b60405180910390f35b3480156104ba575f80fd5b506104c361129c565b005b3480156104d0575f80fd5b506104eb60048036038101906104e69190613297565b6112f1565b6040516104f89190612a97565b60405180910390f35b34801561050c575f80fd5b50610527600480360381019061052291906132d5565b61131b565b60405161053491906129e4565b60405180910390f35b348015610548575f80fd5b50610563600480360381019061055e9190612b3e565b6114c5565b6040516105709190612bf3565b60405180910390f35b348015610584575f80fd5b5061059f600480360381019061059a919061304c565b611569565b6040516105ac9190612a97565b60405180910390f35b3480156105c0575f80fd5b506105c96115cd565b6040516105d69190612e06565b60405180910390f35b3480156105ea575f80fd5b5061060560048036038101906106009190613392565b6115d3565b005b348015610612575f80fd5b5061062d600480360381019061062891906133d0565b6115e9565b005b34801561063a575f80fd5b5061065560048036038101906106509190612b3e565b611611565b60405161066897969594939291906133fb565b60405180910390f35b34801561067c575f80fd5b506106976004803603810190610692919061346f565b6116e1565b005b3480156106a4575f80fd5b506106ad611772565b6040516106ba9190612e06565b60405180910390f35b3480156106ce575f80fd5b506106e960048036038101906106e4919061304c565b611796565b005b3480156106f6575f80fd5b50610711600480360381019061070c9190612b3e565b6117b8565b005b34801561071e575f80fd5b50610739600480360381019061073491906134ad565b611996565b6040516107469190612a97565b60405180910390f35b34801561075a575f80fd5b50610775600480360381019061077091906134eb565b611a24565b005b348015610782575f80fd5b5061079d60048036038101906107989190612997565b611a5f565b6040516107aa9190612a97565b60405180910390f35b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f61081282611a89565b9050919050565b5f801b61082581611b02565b5f60075f8681526020019081526020015f205f01541161087a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610871906135c8565b60405180910390fd5b818311156108bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b490613656565b60405180910390fd5b4282116108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f6906136e4565b60405180910390fd5b8260075f8681526020019081526020015f20600201819055508160075f8681526020019081526020015f206003018190555050505050565b5f801b61094381611b02565b5f60075f8581526020019081526020015f205f015411610998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098f906135c8565b60405180910390fd5b8160075f8581526020019081526020015f2060040181905550505050565b606060075f8381526020019081526020015f2060060180546109d79061372f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a039061372f565b8015610a4e5780601f10610a2557610100808354040283529160200191610a4e565b820191905f5260205f20905b815481529060010190602001808311610a3157829003601f168201915b50505050509050919050565b60068054610a679061372f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a939061372f565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b505050505081565b5f801b610af281611b02565b5f60075f8581526020019081526020015f205f015411610b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3e906137cf565b60405180910390fd5b8160075f8581526020019081526020015f206006019081610b68919061398a565b50827f931f495b9a8e5d8e61946ea5d61e021f636cfe213a801f97589c18c152e408bd83604051610b999190612bf3565b60405180910390a2505050565b610bae611b16565b600a5f9054906101000a900460ff1615610bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf490613aa3565b60405180910390fd5b5f60075f8481526020019081526020015f2090505f815f015411610c56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4d906135c8565b60405180910390fd5b806005015f9054906101000a900460ff1615610ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9e90613b0b565b60405180910390fd5b8060020154421015610cee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce590613b73565b60405180910390fd5b8060030154421115610d35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2c90613bdb565b60405180910390fd5b805f0154828260010154610d499190613c26565b1115610d8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8190613ca3565b60405180910390fd5b60085f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8481526020019081526020015f205f9054906101000a900460ff1615610e23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1a90613d31565b60405180910390fd5b818160040154610e339190613d4f565b341015610e75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6c90613dda565b60405180910390fd5b81816001015f828254610e889190613c26565b92505081905550600160085f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f6101000a81548160ff021916908315150217905550610f0d33848460405180602001604052805f815250611b65565b50610f16611bfa565b5050565b5f60035f8381526020019081526020015f20600101549050919050565b600a5f9054906101000a900460ff1681565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7b90613e68565b60405180910390fd5b610f8d82610f1a565b610f9681611b02565b610fa08383611c04565b50505050565b610fae611cee565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611012576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61101c8282611cf5565b505050565b5f801b61102d81611b02565b5f60075f8581526020019081526020015f205f015411611082576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611079906135c8565b60405180910390fd5b60075f8481526020019081526020015f20600101548210156110d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d090613ef6565b60405180910390fd5b61271082111561111e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111590613f5e565b60405180910390fd5b8160075f8581526020019081526020015f205f0181905550505050565b5f801b61114781611b02565b5f600a5f6101000a81548160ff0219169083151502179055507f15de7ad89d29fd1c6d2e6b1e878453569b4080edf34e0105faaa3bd52f01853060405160405180910390a150565b606081518351146111db57815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016111d2929190613f7c565b60405180910390fd5b5f835167ffffffffffffffff8111156111f7576111f6612c1b565b5b6040519080825280602002602001820160405280156112255781602001602082028036833780820191505090505b5090505f5b8451811015611291576112616112498287611ddf90919063ffffffff16565b61125c8387611df290919063ffffffff16565b6107b3565b82828151811061127457611273613fa3565b5b6020026020010181815250508061128a90613fd0565b905061122a565b508091505092915050565b5f801b6112a881611b02565b6001600a5f6101000a81548160ff0219169083151502179055507f4cb3183d0bf66f9634b15cfc3539fdddc96c2c9324848af89b56586a6739fec460405160405180910390a150565b6009602052815f5260405f20602052805f5260405f205f915091509054906101000a900460ff1681565b5f805f1b61132881611b02565b61271087111561136d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136490613f5e565b60405180910390fd5b848611156113b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a790613656565b60405180910390fd5b4285116113f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e9906136e4565b60405180910390fd5b5f6113fd6005611e05565b90506114096005611e11565b6040518060e001604052808981526020015f81526020018881526020018781526020018681526020015f151581526020018581525060075f8381526020019081526020015f205f820151815f01556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015f6101000a81548160ff02191690831515021790555060c08201518160060190816114b3919061398a565b50905050809250505095945050505050565b606060075f8381526020019081526020015f2060060180546114e69061372f565b80601f01602080910402602001604051908101604052809291908181526020018280546115129061372f565b801561155d5780601f106115345761010080835404028352916020019161155d565b820191905f5260205f20905b81548152906001019060200180831161154057829003601f168201915b50505050509050919050565b5f60035f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f801b81565b6115e56115de611cee565b8383611e25565b5050565b5f801b6115f581611b02565b6116015f801b83610f84565b61160d5f801b33610fa6565b5050565b6007602052805f5260405f205f91509050805f015490806001015490806002015490806003015490806004015490806005015f9054906101000a900460ff16908060060180546116609061372f565b80601f016020809104026020016040519081016040528092919081815260200182805461168c9061372f565b80156116d75780601f106116ae576101008083540402835291602001916116d7565b820191905f5260205f20905b8154815290600101906020018083116116ba57829003601f168201915b5050505050905087565b5f801b6116ed81611b02565b5f60075f8581526020019081526020015f205f015411611742576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611739906135c8565b60405180910390fd5b8160075f8581526020019081526020015f206005015f6101000a81548160ff021916908315150217905550505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61179f82610f1a565b6117a881611b02565b6117b28383611cf5565b50505050565b600a5f9054906101000a900460ff1615611807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fe90613aa3565b60405180910390fd5b5f61181233836107b3565b11611852576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184990614061565b60405180910390fd5b60095f8281526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16156118eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e2906140ef565b60405180910390fd5b600160095f8381526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550803373ffffffffffffffffffffffffffffffffffffffff167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b936960405160405180910390a350565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5690613e68565b60405180910390fd5b6008602052815f5260405f20602052805f5260405f205f915091509054906101000a900460ff1681565b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611afb5750611afa82611f8e565b5b9050919050565b611b1381611b0e611cee565b61206f565b50565b600260045403611b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5290614157565b60405180910390fd5b6002600481905550565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611bd5575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611bcc9190614184565b60405180910390fd5b5f80611be185856120c0565b91509150611bf25f878484876120f0565b505050505050565b6001600481905550565b5f611c0f8383611569565b611ce457600160035f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550611c81611cee565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050611ce8565b5f90505b92915050565b5f33905090565b5f611d008383611569565b15611dd5575f60035f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550611d72611cee565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050611dd9565b5f90505b92915050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b5f815f01549050919050565b6001815f015f828254019250508190555050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611e95575f6040517fced3e100000000000000000000000000000000000000000000000000000000008152600401611e8c9190614184565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611f819190612a97565b60405180910390a3505050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061205857507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061206857506120678261219c565b5b9050919050565b6120798282611569565b6120bc5780826040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526004016120b392919061419d565b60405180910390fd5b5050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b6120fc85858585612205565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614612195575f612138611cee565b90506001845103612184575f6121575f86611df290919063ffffffff16565b90505f61216d5f86611df290919063ffffffff16565b905061217d83898985858961259b565b5050612193565b61219281878787878761274a565b5b505b5050505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b805182511461224f57815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401612246929190613f7c565b60405180910390fd5b5f612258611cee565b90505f5b835181101561245a575f6122798286611df290919063ffffffff16565b90505f61228f8386611df290919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146123b2575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561235e57888183856040517f03dee4c500000000000000000000000000000000000000000000000000000000815260040161235594939291906141c4565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461244757805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461243f9190613c26565b925050819055505b50508061245390613fd0565b905061225c565b506001835103612515575f6124785f85611df290919063ffffffff16565b90505f61248e5f85611df290919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051612506929190613f7c565b60405180910390a45050612594565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161258b929190614207565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115612742578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016125fb95949392919061428e565b6020604051808303815f875af192505050801561263657506040513d601f19601f8201168201806040525081019061263391906142fa565b60015b6126b7573d805f8114612664576040519150601f19603f3d011682016040523d82523d5f602084013e612669565b606091505b505f8151036126af57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016126a69190614184565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461274057846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016127379190614184565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b11156128f1578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016127aa959493929190614325565b6020604051808303815f875af19250505080156127e557506040513d601f19601f820116820180604052508101906127e291906142fa565b60015b612866573d805f8114612813576040519150601f19603f3d011682016040523d82523d5f602084013e612818565b606091505b505f81510361285e57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016128559190614184565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146128ef57846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016128e69190614184565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6129338261290a565b9050919050565b61294381612929565b811461294d575f80fd5b50565b5f8135905061295e8161293a565b92915050565b5f819050919050565b61297681612964565b8114612980575f80fd5b50565b5f813590506129918161296d565b92915050565b5f80604083850312156129ad576129ac612902565b5b5f6129ba85828601612950565b92505060206129cb85828601612983565b9150509250929050565b6129de81612964565b82525050565b5f6020820190506129f75f8301846129d5565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612a31816129fd565b8114612a3b575f80fd5b50565b5f81359050612a4c81612a28565b92915050565b5f60208284031215612a6757612a66612902565b5b5f612a7484828501612a3e565b91505092915050565b5f8115159050919050565b612a9181612a7d565b82525050565b5f602082019050612aaa5f830184612a88565b92915050565b5f805f60608486031215612ac757612ac6612902565b5b5f612ad486828701612983565b9350506020612ae586828701612983565b9250506040612af686828701612983565b9150509250925092565b5f8060408385031215612b1657612b15612902565b5b5f612b2385828601612983565b9250506020612b3485828601612983565b9150509250929050565b5f60208284031215612b5357612b52612902565b5b5f612b6084828501612983565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612ba0578082015181840152602081019050612b85565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612bc582612b69565b612bcf8185612b73565b9350612bdf818560208601612b83565b612be881612bab565b840191505092915050565b5f6020820190508181035f830152612c0b8184612bbb565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612c5182612bab565b810181811067ffffffffffffffff82111715612c7057612c6f612c1b565b5b80604052505050565b5f612c826128f9565b9050612c8e8282612c48565b919050565b5f67ffffffffffffffff821115612cad57612cac612c1b565b5b612cb682612bab565b9050602081019050919050565b828183375f83830152505050565b5f612ce3612cde84612c93565b612c79565b905082815260208101848484011115612cff57612cfe612c17565b5b612d0a848285612cc3565b509392505050565b5f82601f830112612d2657612d25612c13565b5b8135612d36848260208601612cd1565b91505092915050565b5f8060408385031215612d5557612d54612902565b5b5f612d6285828601612983565b925050602083013567ffffffffffffffff811115612d8357612d82612906565b5b612d8f85828601612d12565b9150509250929050565b5f819050919050565b612dab81612d99565b8114612db5575f80fd5b50565b5f81359050612dc681612da2565b92915050565b5f60208284031215612de157612de0612902565b5b5f612dee84828501612db8565b91505092915050565b612e0081612d99565b82525050565b5f602082019050612e195f830184612df7565b92915050565b5f67ffffffffffffffff821115612e3957612e38612c1b565b5b602082029050602081019050919050565b5f80fd5b5f612e60612e5b84612e1f565b612c79565b90508083825260208201905060208402830185811115612e8357612e82612e4a565b5b835b81811015612eac5780612e988882612983565b845260208401935050602081019050612e85565b5050509392505050565b5f82601f830112612eca57612ec9612c13565b5b8135612eda848260208601612e4e565b91505092915050565b5f67ffffffffffffffff821115612efd57612efc612c1b565b5b612f0682612bab565b9050602081019050919050565b5f612f25612f2084612ee3565b612c79565b905082815260208101848484011115612f4157612f40612c17565b5b612f4c848285612cc3565b509392505050565b5f82601f830112612f6857612f67612c13565b5b8135612f78848260208601612f13565b91505092915050565b5f805f805f60a08688031215612f9a57612f99612902565b5b5f612fa788828901612950565b9550506020612fb888828901612950565b945050604086013567ffffffffffffffff811115612fd957612fd8612906565b5b612fe588828901612eb6565b935050606086013567ffffffffffffffff81111561300657613005612906565b5b61301288828901612eb6565b925050608086013567ffffffffffffffff81111561303357613032612906565b5b61303f88828901612f54565b9150509295509295909350565b5f806040838503121561306257613061612902565b5b5f61306f85828601612db8565b925050602061308085828601612950565b9150509250929050565b5f67ffffffffffffffff8211156130a4576130a3612c1b565b5b602082029050602081019050919050565b5f6130c76130c28461308a565b612c79565b905080838252602082019050602084028301858111156130ea576130e9612e4a565b5b835b8181101561311357806130ff8882612950565b8452602084019350506020810190506130ec565b5050509392505050565b5f82601f83011261313157613130612c13565b5b81356131418482602086016130b5565b91505092915050565b5f80604083850312156131605761315f612902565b5b5f83013567ffffffffffffffff81111561317d5761317c612906565b5b6131898582860161311d565b925050602083013567ffffffffffffffff8111156131aa576131a9612906565b5b6131b685828601612eb6565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6131f281612964565b82525050565b5f61320383836131e9565b60208301905092915050565b5f602082019050919050565b5f613225826131c0565b61322f81856131ca565b935061323a836131da565b805f5b8381101561326a57815161325188826131f8565b975061325c8361320f565b92505060018101905061323d565b5085935050505092915050565b5f6020820190508181035f83015261328f818461321b565b905092915050565b5f80604083850312156132ad576132ac612902565b5b5f6132ba85828601612983565b92505060206132cb85828601612950565b9150509250929050565b5f805f805f60a086880312156132ee576132ed612902565b5b5f6132fb88828901612983565b955050602061330c88828901612983565b945050604061331d88828901612983565b935050606061332e88828901612983565b925050608086013567ffffffffffffffff81111561334f5761334e612906565b5b61335b88828901612d12565b9150509295509295909350565b61337181612a7d565b811461337b575f80fd5b50565b5f8135905061338c81613368565b92915050565b5f80604083850312156133a8576133a7612902565b5b5f6133b585828601612950565b92505060206133c68582860161337e565b9150509250929050565b5f602082840312156133e5576133e4612902565b5b5f6133f284828501612950565b91505092915050565b5f60e08201905061340e5f83018a6129d5565b61341b60208301896129d5565b61342860408301886129d5565b61343560608301876129d5565b61344260808301866129d5565b61344f60a0830185612a88565b81810360c08301526134618184612bbb565b905098975050505050505050565b5f806040838503121561348557613484612902565b5b5f61349285828601612983565b92505060206134a38582860161337e565b9150509250929050565b5f80604083850312156134c3576134c2612902565b5b5f6134d085828601612950565b92505060206134e185828601612950565b9150509250929050565b5f805f805f60a0868803121561350457613503612902565b5b5f61351188828901612950565b955050602061352288828901612950565b945050604061353388828901612983565b935050606061354488828901612983565b925050608086013567ffffffffffffffff81111561356557613564612906565b5b61357188828901612f54565b9150509295509295909350565b7f546f6b656e20494420646f6573206e6f742065786973740000000000000000005f82015250565b5f6135b2601783612b73565b91506135bd8261357e565b602082019050919050565b5f6020820190508181035f8301526135df816135a6565b9050919050565b7f53746172742074696d657374616d70206d757374206265206265666f726520655f8201527f6e642074696d657374616d700000000000000000000000000000000000000000602082015250565b5f613640602c83612b73565b915061364b826135e6565b604082019050919050565b5f6020820190508181035f83015261366d81613634565b9050919050565b7f456e642074696d657374616d70206d75737420626520696e20746865206675745f8201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b5f6136ce602383612b73565b91506136d982613674565b604082019050919050565b5f6020820190508181035f8301526136fb816136c2565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061374657607f821691505b60208210810361375957613758613702565b5b50919050565b7f455243313135353a205552492073657420666f72206e6f6e6578697374656e745f8201527f20746f6b656e0000000000000000000000000000000000000000000000000000602082015250565b5f6137b9602683612b73565b91506137c48261375f565b604082019050919050565b5f6020820190508181035f8301526137e6816137ad565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026138497fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261380e565b613853868361380e565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61388e61388961388484612964565b61386b565b612964565b9050919050565b5f819050919050565b6138a783613874565b6138bb6138b382613895565b84845461381a565b825550505050565b5f90565b6138cf6138c3565b6138da81848461389e565b505050565b5b818110156138fd576138f25f826138c7565b6001810190506138e0565b5050565b601f82111561394257613913816137ed565b61391c846137ff565b8101602085101561392b578190505b61393f613937856137ff565b8301826138df565b50505b505050565b5f82821c905092915050565b5f6139625f1984600802613947565b1980831691505092915050565b5f61397a8383613953565b9150826002028217905092915050565b61399382612b69565b67ffffffffffffffff8111156139ac576139ab612c1b565b5b6139b6825461372f565b6139c1828285613901565b5f60209050601f8311600181146139f2575f84156139e0578287015190505b6139ea858261396f565b865550613a51565b601f198416613a00866137ed565b5f5b82811015613a2757848901518255600182019150602085019450602081019050613a02565b86831015613a445784890151613a40601f891682613953565b8355505b6001600288020188555050505b505050505050565b7f436f6e747261637420697320656d657267656e637920706175736564000000005f82015250565b5f613a8d601c83612b73565b9150613a9882613a59565b602082019050919050565b5f6020820190508181035f830152613aba81613a81565b9050919050565b7f4d696e74696e672069732070617573656420666f72207468697320746f6b656e5f82015250565b5f613af5602083612b73565b9150613b0082613ac1565b602082019050919050565b5f6020820190508181035f830152613b2281613ae9565b9050919050565b7f4d696e74696e6720686173206e6f7420796574207374617274656400000000005f82015250565b5f613b5d601b83612b73565b9150613b6882613b29565b602082019050919050565b5f6020820190508181035f830152613b8a81613b51565b9050919050565b7f4d696e74696e672068617320656e6465640000000000000000000000000000005f82015250565b5f613bc5601183612b73565b9150613bd082613b91565b602082019050919050565b5f6020820190508181035f830152613bf281613bb9565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f613c3082612964565b9150613c3b83612964565b9250828201905080821115613c5357613c52613bf9565b5b92915050565b7f4d617820737570706c79207265616368656400000000000000000000000000005f82015250565b5f613c8d601283612b73565b9150613c9882613c59565b602082019050919050565b5f6020820190508181035f830152613cba81613c81565b9050919050565b7f57616c6c65742068617320616c7265616479206d696e746564207468697320745f8201527f6f6b656e20494400000000000000000000000000000000000000000000000000602082015250565b5f613d1b602783612b73565b9150613d2682613cc1565b604082019050919050565b5f6020820190508181035f830152613d4881613d0f565b9050919050565b5f613d5982612964565b9150613d6483612964565b9250828202613d7281612964565b91508282048414831517613d8957613d88613bf9565b5b5092915050565b7f496e73756666696369656e74207061796d656e740000000000000000000000005f82015250565b5f613dc4601483612b73565b9150613dcf82613d90565b602082019050919050565b5f6020820190508181035f830152613df181613db8565b9050919050565b7f536f756c626f756e643a205472616e7366657273206172652064697361626c655f8201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b5f613e52602183612b73565b9150613e5d82613df8565b604082019050919050565b5f6020820190508181035f830152613e7f81613e46565b9050919050565b7f43616e6e6f742073657420737570706c792062656c6f77206d696e74656420615f8201527f6d6f756e74000000000000000000000000000000000000000000000000000000602082015250565b5f613ee0602583612b73565b9150613eeb82613e86565b604082019050919050565b5f6020820190508181035f830152613f0d81613ed4565b9050919050565b7f4d617820737570706c7920746f6f2068696768000000000000000000000000005f82015250565b5f613f48601383612b73565b9150613f5382613f14565b602082019050919050565b5f6020820190508181035f830152613f7581613f3c565b9050919050565b5f604082019050613f8f5f8301856129d5565b613f9c60208301846129d5565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f613fda82612964565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361400c5761400b613bf9565b5b600182019050919050565b7f43616c6c657220646f6573206e6f74206f776e207468697320746f6b656e00005f82015250565b5f61404b601e83612b73565b915061405682614017565b602082019050919050565b5f6020820190508181035f8301526140788161403f565b9050919050565b7f546f6b656e20616c72656164792072656465656d6564206279207468697320755f8201527f7365720000000000000000000000000000000000000000000000000000000000602082015250565b5f6140d9602383612b73565b91506140e48261407f565b604082019050919050565b5f6020820190508181035f830152614106816140cd565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f614141601f83612b73565b915061414c8261410d565b602082019050919050565b5f6020820190508181035f83015261416e81614135565b9050919050565b61417e81612929565b82525050565b5f6020820190506141975f830184614175565b92915050565b5f6040820190506141b05f830185614175565b6141bd6020830184612df7565b9392505050565b5f6080820190506141d75f830187614175565b6141e460208301866129d5565b6141f160408301856129d5565b6141fe60608301846129d5565b95945050505050565b5f6040820190508181035f83015261421f818561321b565b90508181036020830152614233818461321b565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f6142608261423c565b61426a8185614246565b935061427a818560208601612b83565b61428381612bab565b840191505092915050565b5f60a0820190506142a15f830188614175565b6142ae6020830187614175565b6142bb60408301866129d5565b6142c860608301856129d5565b81810360808301526142da8184614256565b90509695505050505050565b5f815190506142f481612a28565b92915050565b5f6020828403121561430f5761430e612902565b5b5f61431c848285016142e6565b91505092915050565b5f60a0820190506143385f830188614175565b6143456020830187614175565b8181036040830152614357818661321b565b9050818103606083015261436b818561321b565b9050818103608083015261437f8184614256565b9050969550505050505056fea2646970667358221220f33bcf090b6706727377506c78e7a12aa9ed7b7e874d82f2d0ae77a2c9ac681564736f6c63430008140033
Verified Source Code Partial Match
Compiler: v0.8.20+commit.a1b79de6
EVM: shanghai
Optimization: No
ChainHorizonWeb3Store.sol 4339 lines
// SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC 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);
}
// File: @openzeppelin/contracts/token/ERC1155/IERC1155.sol
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.20;
/**
* @dev Required interface of an ERC-1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[ERC].
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` amount of tokens of 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 value of tokens of token type `id` owned by `account`.
*/
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 zero address.
*/
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 a `value` amount of tokens of type `id` from `from` to `to`.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {IERC1155Receiver-onERC1155Received} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* 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 `value` 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 value, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {IERC1155Receiver-onERC1155BatchReceived} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
*
* Requirements:
*
* - `ids` and `values` 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 values,
bytes calldata data
) external;
}
// File: @openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[ERC].
*/
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);
}
// File: @openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface that must be implemented by smart contracts in order to receive
* ERC-1155 token transfers.
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC-1155 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 ERC-1155 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);
}
// File: @openzeppelin/contracts/interfaces/draft-IERC6093.sol
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
// File: @openzeppelin/contracts/token/ERC1155/utils/ERC1155Utils.sol
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC1155/utils/ERC1155Utils.sol)
pragma solidity ^0.8.20;
/**
* @dev Library that provide common ERC-1155 utility functions.
*
* See https://eips.ethereum.org/EIPS/eip-1155[ERC-1155].
*
* _Available since v5.1._
*/
library ERC1155Utils {
/**
* @dev Performs an acceptance check for the provided `operator` by calling {IERC1155Receiver-onERC1155Received}
* on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`).
*
* The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA).
* Otherwise, the recipient must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value to accept
* the transfer.
*/
function checkOnERC1155Received(
address operator,
address from,
address to,
uint256 id,
uint256 value,
bytes memory data
) internal {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
// Tokens rejected
revert IERC1155Errors.ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-IERC1155Receiver implementer
revert IERC1155Errors.ERC1155InvalidReceiver(to);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Performs a batch acceptance check for the provided `operator` by calling {IERC1155Receiver-onERC1155BatchReceived}
* on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`).
*
* The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA).
* Otherwise, the recipient must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value to accept
* the transfer.
*/
function checkOnERC1155BatchReceived(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
// Tokens rejected
revert IERC1155Errors.ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-IERC1155Receiver implementer
revert IERC1155Errors.ERC1155InvalidReceiver(to);
} else {
assembly ("memory-safe") {
revert(add(32, reason), mload(reason))
}
}
}
}
}
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 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);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// File: @openzeppelin/contracts/utils/Comparators.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Comparators.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides a set of functions to compare values.
*
* _Available since v5.1._
*/
library Comparators {
function lt(uint256 a, uint256 b) internal pure returns (bool) {
return a < b;
}
function gt(uint256 a, uint256 b) internal pure returns (bool) {
return a > b;
}
}
// File: @openzeppelin/contracts/utils/SlotDerivation.sol
// OpenZeppelin Contracts (last updated v5.3.0) (utils/SlotDerivation.sol)
// This file was procedurally generated from scripts/generate/templates/SlotDerivation.js.
pragma solidity ^0.8.20;
/**
* @dev Library for computing storage (and transient storage) locations from namespaces and deriving slots
* corresponding to standard patterns. The derivation method for array and mapping matches the storage layout used by
* the solidity language / compiler.
*
* See https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays[Solidity docs for mappings and dynamic arrays.].
*
* Example usage:
* ```solidity
* contract Example {
* // Add the library methods
* using StorageSlot for bytes32;
* using SlotDerivation for bytes32;
*
* // Declare a namespace
* string private constant _NAMESPACE = "<namespace>"; // eg. OpenZeppelin.Slot
*
* function setValueInNamespace(uint256 key, address newValue) internal {
* _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value = newValue;
* }
*
* function getValueInNamespace(uint256 key) internal view returns (address) {
* return _NAMESPACE.erc7201Slot().deriveMapping(key).getAddressSlot().value;
* }
* }
* ```
*
* TIP: Consider using this library along with {StorageSlot}.
*
* NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
* upgrade safety will ignore the slots accessed through this library.
*
* _Available since v5.1._
*/
library SlotDerivation {
/**
* @dev Derive an ERC-7201 slot from a string (namespace).
*/
function erc7201Slot(string memory namespace) internal pure returns (bytes32 slot) {
assembly ("memory-safe") {
mstore(0x00, sub(keccak256(add(namespace, 0x20), mload(namespace)), 1))
slot := and(keccak256(0x00, 0x20), not(0xff))
}
}
/**
* @dev Add an offset to a slot to get the n-th element of a structure or an array.
*/
function offset(bytes32 slot, uint256 pos) internal pure returns (bytes32 result) {
unchecked {
return bytes32(uint256(slot) + pos);
}
}
/**
* @dev Derive the location of the first element in an array from the slot where the length is stored.
*/
function deriveArray(bytes32 slot) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
mstore(0x00, slot)
result := keccak256(0x00, 0x20)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, address key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
mstore(0x00, and(key, shr(96, not(0))))
mstore(0x20, slot)
result := keccak256(0x00, 0x40)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, bool key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
mstore(0x00, iszero(iszero(key)))
mstore(0x20, slot)
result := keccak256(0x00, 0x40)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, bytes32 key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
mstore(0x00, key)
mstore(0x20, slot)
result := keccak256(0x00, 0x40)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, uint256 key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
mstore(0x00, key)
mstore(0x20, slot)
result := keccak256(0x00, 0x40)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, int256 key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
mstore(0x00, key)
mstore(0x20, slot)
result := keccak256(0x00, 0x40)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, string memory key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
let length := mload(key)
let begin := add(key, 0x20)
let end := add(begin, length)
let cache := mload(end)
mstore(end, slot)
result := keccak256(begin, add(length, 0x20))
mstore(end, cache)
}
}
/**
* @dev Derive the location of a mapping element from the key.
*/
function deriveMapping(bytes32 slot, bytes memory key) internal pure returns (bytes32 result) {
assembly ("memory-safe") {
let length := mload(key)
let begin := add(key, 0x20)
let end := add(begin, length)
let cache := mload(end)
mstore(end, slot)
result := keccak256(begin, add(length, 0x20))
mstore(end, cache)
}
}
}
// File: @openzeppelin/contracts/utils/StorageSlot.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC-1967 implementation slot:
* ```solidity
* contract ERC1967 {
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct Int256Slot {
int256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
*/
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
/**
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
}
// File: @openzeppelin/contracts/utils/Panic.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)
pragma solidity ^0.8.20;
/**
* @dev Helper library for emitting standardized panic codes.
*
* ```solidity
* contract Example {
* using Panic for uint256;
*
* // Use any of the declared internal constants
* function foo() { Panic.GENERIC.panic(); }
*
* // Alternatively
* function foo() { Panic.panic(Panic.GENERIC); }
* }
* ```
*
* Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
*
* _Available since v5.1._
*/
// slither-disable-next-line unused-state
library Panic {
/// @dev generic / unspecified error
uint256 internal constant GENERIC = 0x00;
/// @dev used by the assert() builtin
uint256 internal constant ASSERT = 0x01;
/// @dev arithmetic underflow or overflow
uint256 internal constant UNDER_OVERFLOW = 0x11;
/// @dev division or modulo by zero
uint256 internal constant DIVISION_BY_ZERO = 0x12;
/// @dev enum conversion error
uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;
/// @dev invalid encoding in storage
uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;
/// @dev empty array pop
uint256 internal constant EMPTY_ARRAY_POP = 0x31;
/// @dev array out of bounds access
uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
/// @dev resource error (too large allocation or too large array)
uint256 internal constant RESOURCE_ERROR = 0x41;
/// @dev calling invalid internal function
uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;
/// @dev Reverts with a panic code. Recommended to use with
/// the internal constants with predefined codes.
function panic(uint256 code) internal pure {
assembly ("memory-safe") {
mstore(0x00, 0x4e487b71)
mstore(0x20, code)
revert(0x1c, 0x24)
}
}
}
// File: @openzeppelin/contracts/utils/math/SafeCast.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.
pragma solidity ^0.8.20;
/**
* @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` restores this intuition by
* reverting the transaction when such an operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeCast {
/**
* @dev Value doesn't fit in an uint of `bits` size.
*/
error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);
/**
* @dev An int value doesn't fit in an uint of `bits` size.
*/
error SafeCastOverflowedIntToUint(int256 value);
/**
* @dev Value doesn't fit in an int of `bits` size.
*/
error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);
/**
* @dev An uint value doesn't fit in an int of `bits` size.
*/
error SafeCastOverflowedUintToInt(uint256 value);
/**
* @dev Returns the downcasted uint248 from uint256, reverting on
* overflow (when the input is greater than largest uint248).
*
* Counterpart to Solidity's `uint248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*/
function toUint248(uint256 value) internal pure returns (uint248) {
if (value > type(uint248).max) {
revert SafeCastOverflowedUintDowncast(248, value);
}
return uint248(value);
}
/**
* @dev Returns the downcasted uint240 from uint256, reverting on
* overflow (when the input is greater than largest uint240).
*
* Counterpart to Solidity's `uint240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*/
function toUint240(uint256 value) internal pure returns (uint240) {
if (value > type(uint240).max) {
revert SafeCastOverflowedUintDowncast(240, value);
}
return uint240(value);
}
/**
* @dev Returns the downcasted uint232 from uint256, reverting on
* overflow (when the input is greater than largest uint232).
*
* Counterpart to Solidity's `uint232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*/
function toUint232(uint256 value) internal pure returns (uint232) {
if (value > type(uint232).max) {
revert SafeCastOverflowedUintDowncast(232, value);
}
return uint232(value);
}
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
function toUint224(uint256 value) internal pure returns (uint224) {
if (value > type(uint224).max) {
revert SafeCastOverflowedUintDowncast(224, value);
}
return uint224(value);
}
/**
* @dev Returns the downcasted uint216 from uint256, reverting on
* overflow (when the input is greater than largest uint216).
*
* Counterpart to Solidity's `uint216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*/
function toUint216(uint256 value) internal pure returns (uint216) {
if (value > type(uint216).max) {
revert SafeCastOverflowedUintDowncast(216, value);
}
return uint216(value);
}
/**
* @dev Returns the downcasted uint208 from uint256, reverting on
* overflow (when the input is greater than largest uint208).
*
* Counterpart to Solidity's `uint208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*/
function toUint208(uint256 value) internal pure returns (uint208) {
if (value > type(uint208).max) {
revert SafeCastOverflowedUintDowncast(208, value);
}
return uint208(value);
}
/**
* @dev Returns the downcasted uint200 from uint256, reverting on
* overflow (when the input is greater than largest uint200).
*
* Counterpart to Solidity's `uint200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*/
function toUint200(uint256 value) internal pure returns (uint200) {
if (value > type(uint200).max) {
revert SafeCastOverflowedUintDowncast(200, value);
}
return uint200(value);
}
/**
* @dev Returns the downcasted uint192 from uint256, reverting on
* overflow (when the input is greater than largest uint192).
*
* Counterpart to Solidity's `uint192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*/
function toUint192(uint256 value) internal pure returns (uint192) {
if (value > type(uint192).max) {
revert SafeCastOverflowedUintDowncast(192, value);
}
return uint192(value);
}
/**
* @dev Returns the downcasted uint184 from uint256, reverting on
* overflow (when the input is greater than largest uint184).
*
* Counterpart to Solidity's `uint184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*/
function toUint184(uint256 value) internal pure returns (uint184) {
if (value > type(uint184).max) {
revert SafeCastOverflowedUintDowncast(184, value);
}
return uint184(value);
}
/**
* @dev Returns the downcasted uint176 from uint256, reverting on
* overflow (when the input is greater than largest uint176).
*
* Counterpart to Solidity's `uint176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*/
function toUint176(uint256 value) internal pure returns (uint176) {
if (value > type(uint176).max) {
revert SafeCastOverflowedUintDowncast(176, value);
}
return uint176(value);
}
/**
* @dev Returns the downcasted uint168 from uint256, reverting on
* overflow (when the input is greater than largest uint168).
*
* Counterpart to Solidity's `uint168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*/
function toUint168(uint256 value) internal pure returns (uint168) {
if (value > type(uint168).max) {
revert SafeCastOverflowedUintDowncast(168, value);
}
return uint168(value);
}
/**
* @dev Returns the downcasted uint160 from uint256, reverting on
* overflow (when the input is greater than largest uint160).
*
* Counterpart to Solidity's `uint160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*/
function toUint160(uint256 value) internal pure returns (uint160) {
if (value > type(uint160).max) {
revert SafeCastOverflowedUintDowncast(160, value);
}
return uint160(value);
}
/**
* @dev Returns the downcasted uint152 from uint256, reverting on
* overflow (when the input is greater than largest uint152).
*
* Counterpart to Solidity's `uint152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*/
function toUint152(uint256 value) internal pure returns (uint152) {
if (value > type(uint152).max) {
revert SafeCastOverflowedUintDowncast(152, value);
}
return uint152(value);
}
/**
* @dev Returns the downcasted uint144 from uint256, reverting on
* overflow (when the input is greater than largest uint144).
*
* Counterpart to Solidity's `uint144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*/
function toUint144(uint256 value) internal pure returns (uint144) {
if (value > type(uint144).max) {
revert SafeCastOverflowedUintDowncast(144, value);
}
return uint144(value);
}
/**
* @dev Returns the downcasted uint136 from uint256, reverting on
* overflow (when the input is greater than largest uint136).
*
* Counterpart to Solidity's `uint136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*/
function toUint136(uint256 value) internal pure returns (uint136) {
if (value > type(uint136).max) {
revert SafeCastOverflowedUintDowncast(136, value);
}
return uint136(value);
}
/**
* @dev Returns the downcasted uint128 from uint256, reverting on
* overflow (when the input is greater than largest uint128).
*
* Counterpart to Solidity's `uint128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*/
function toUint128(uint256 value) internal pure returns (uint128) {
if (value > type(uint128).max) {
revert SafeCastOverflowedUintDowncast(128, value);
}
return uint128(value);
}
/**
* @dev Returns the downcasted uint120 from uint256, reverting on
* overflow (when the input is greater than largest uint120).
*
* Counterpart to Solidity's `uint120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*/
function toUint120(uint256 value) internal pure returns (uint120) {
if (value > type(uint120).max) {
revert SafeCastOverflowedUintDowncast(120, value);
}
return uint120(value);
}
/**
* @dev Returns the downcasted uint112 from uint256, reverting on
* overflow (when the input is greater than largest uint112).
*
* Counterpart to Solidity's `uint112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*/
function toUint112(uint256 value) internal pure returns (uint112) {
if (value > type(uint112).max) {
revert SafeCastOverflowedUintDowncast(112, value);
}
return uint112(value);
}
/**
* @dev Returns the downcasted uint104 from uint256, reverting on
* overflow (when the input is greater than largest uint104).
*
* Counterpart to Solidity's `uint104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*/
function toUint104(uint256 value) internal pure returns (uint104) {
if (value > type(uint104).max) {
revert SafeCastOverflowedUintDowncast(104, value);
}
return uint104(value);
}
/**
* @dev Returns the downcasted uint96 from uint256, reverting on
* overflow (when the input is greater than largest uint96).
*
* Counterpart to Solidity's `uint96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*/
function toUint96(uint256 value) internal pure returns (uint96) {
if (value > type(uint96).max) {
revert SafeCastOverflowedUintDowncast(96, value);
}
return uint96(value);
}
/**
* @dev Returns the downcasted uint88 from uint256, reverting on
* overflow (when the input is greater than largest uint88).
*
* Counterpart to Solidity's `uint88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*/
function toUint88(uint256 value) internal pure returns (uint88) {
if (value > type(uint88).max) {
revert SafeCastOverflowedUintDowncast(88, value);
}
return uint88(value);
}
/**
* @dev Returns the downcasted uint80 from uint256, reverting on
* overflow (when the input is greater than largest uint80).
*
* Counterpart to Solidity's `uint80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*/
function toUint80(uint256 value) internal pure returns (uint80) {
if (value > type(uint80).max) {
revert SafeCastOverflowedUintDowncast(80, value);
}
return uint80(value);
}
/**
* @dev Returns the downcasted uint72 from uint256, reverting on
* overflow (when the input is greater than largest uint72).
*
* Counterpart to Solidity's `uint72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*/
function toUint72(uint256 value) internal pure returns (uint72) {
if (value > type(uint72).max) {
revert SafeCastOverflowedUintDowncast(72, value);
}
return uint72(value);
}
/**
* @dev Returns the downcasted uint64 from uint256, reverting on
* overflow (when the input is greater than largest uint64).
*
* Counterpart to Solidity's `uint64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*/
function toUint64(uint256 value) internal pure returns (uint64) {
if (value > type(uint64).max) {
revert SafeCastOverflowedUintDowncast(64, value);
}
return uint64(value);
}
/**
* @dev Returns the downcasted uint56 from uint256, reverting on
* overflow (when the input is greater than largest uint56).
*
* Counterpart to Solidity's `uint56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*/
function toUint56(uint256 value) internal pure returns (uint56) {
if (value > type(uint56).max) {
revert SafeCastOverflowedUintDowncast(56, value);
}
return uint56(value);
}
/**
* @dev Returns the downcasted uint48 from uint256, reverting on
* overflow (when the input is greater than largest uint48).
*
* Counterpart to Solidity's `uint48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*/
function toUint48(uint256 value) internal pure returns (uint48) {
if (value > type(uint48).max) {
revert SafeCastOverflowedUintDowncast(48, value);
}
return uint48(value);
}
/**
* @dev Returns the downcasted uint40 from uint256, reverting on
* overflow (when the input is greater than largest uint40).
*
* Counterpart to Solidity's `uint40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*/
function toUint40(uint256 value) internal pure returns (uint40) {
if (value > type(uint40).max) {
revert SafeCastOverflowedUintDowncast(40, value);
}
return uint40(value);
}
/**
* @dev Returns the downcasted uint32 from uint256, reverting on
* overflow (when the input is greater than largest uint32).
*
* Counterpart to Solidity's `uint32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*/
function toUint32(uint256 value) internal pure returns (uint32) {
if (value > type(uint32).max) {
revert SafeCastOverflowedUintDowncast(32, value);
}
return uint32(value);
}
/**
* @dev Returns the downcasted uint24 from uint256, reverting on
* overflow (when the input is greater than largest uint...
// [truncated — 158085 bytes total]
Read Contract
DEFAULT_ADMIN_ROLE 0xa217fddf → bytes32
MINTER_ROLE 0xd5391393 → bytes32
balanceOf 0x00fdd58e → uint256
balanceOfBatch 0x4e1273f4 → uint256[]
chainHorizon 0x1071a88d → string
emergencyPaused 0x27c830a9 → bool
getRoleAdmin 0x248a9ca3 → bytes32
getTokenUri 0x8ad91345 → string
hasMinted 0xf8f1147d → bool
hasRole 0x91d14854 → bool
isApprovedForAll 0xe985e9c5 → bool
redeemed 0x5ddb0845 → bool
supportsInterface 0x01ffc9a7 → bool
tokenData 0xb4b5b48f → uint256, uint256, uint256, uint256, uint256, bool, string
uri 0x0e89341c → string
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
createEdition 0x6af7109c
uint256 maxSupply
uint256 startTimestamp
uint256 endTimestamp
uint256 mintPrice
string _tokenUri
returns: uint256
emergencyPause 0x51858e27
No parameters
emergencyUnpause 0x4a4e3bd5
No parameters
grantRole 0x2f2ff15d
bytes32 role
address account
mint 0x1b2ef1ca
uint256 tokenId
uint256 amount
pauseMinting 0xcb3c3c03
uint256 tokenId
bool _paused
redeem 0xdb006a75
uint256 tokenId
renounceRole 0x36568abe
bytes32 role
address callerConfirmation
revokeRole 0xd547741f
bytes32 role
address account
safeBatchTransferFrom 0x2eb2c2d6
address
address
uint256[]
uint256[]
bytes
safeTransferFrom 0xf242432a
address
address
uint256
uint256
bytes
setApprovalForAll 0xa22cb465
address operator
bool approved
setMaxSupply 0x37da577c
uint256 tokenId
uint256 _maxSupply
setMintPrice 0x0442bfa8
uint256 tokenId
uint256 _mintPrice
setMintingPeriod 0x026d3942
uint256 tokenId
uint256 _startTimestamp
uint256 _endTimestamp
setTokenURI 0x162094c4
uint256 tokenId
string _uri
transferAdminRole 0xada8f919
address newAdmin
Recent Transactions
This address has 1 on-chain transactions, but only 0.8% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →