Address Contract Partially Verified
Address
0xC772fB742a39dFC935Ea51f217ef58282c634521
Balance
0 ETH
Nonce
1
Code Size
16485 bytes
Creator
0x017639Fb...9909 at tx 0xab42019e...f47534
Indexed Transactions
0
Contract Bytecode
16485 bytes
0x6080604052600436106101fd5760003560e01c80638462151c1161010d578063b88d4fde116100a0578063ca3f3e161161006f578063ca3f3e161461074b578063df8f519f14610774578063e6dbbac31461079d578063e985e9c5146107b9578063f2fde38b146107f657610204565b8063b88d4fde1461068c578063c23dc68f146106a8578063c7f01273146106e5578063c87b56dd1461070e57610204565b806399a2557a116100dc57806399a2557a146105c05780639ead7222146105fd578063a1ad4f401461063a578063a22cb4651461066357610204565b80638462151c146104f05780638da5cb5b1461052d578063913432121461055857806395d89b411461059557610204565b80633ccfd60b116101905780635c3d25ca1161015f5780635c3d25ca1461040d5780636352211e1461043657806370a0823114610473578063715018a6146104b05780637b46626c146104c757610204565b80633ccfd60b1461037457806342842e0e1461038b57806355d5204c146103a75780635bbb2177146103d057610204565b806318160ddd116101cc57806318160ddd146102c757806321ff9970146102f257806323b872dd1461031b5780633886070b1461033757610204565b806301ffc9a71461020657806306fdde0314610243578063081812fc1461026e578063095ea7b3146102ab57610204565b3661020457005b005b34801561021257600080fd5b5061022d6004803603810190610228919061288f565b61081f565b60405161023a91906128d7565b60405180910390f35b34801561024f57600080fd5b506102586108b1565b6040516102659190612982565b60405180910390f35b34801561027a57600080fd5b50610295600480360381019061029091906129da565b610943565b6040516102a29190612a48565b60405180910390f35b6102c560048036038101906102c09190612a8f565b6109c2565b005b3480156102d357600080fd5b506102dc610b06565b6040516102e99190612ade565b60405180910390f35b3480156102fe57600080fd5b5061031960048036038101906103149190612b2f565b610b1d565b005b61033560048036038101906103309190612b5c565b610b2f565b005b34801561034357600080fd5b5061035e600480360381019061035991906129da565b610e51565b60405161036b9190612ade565b60405180910390f35b34801561038057600080fd5b50610389610e69565b005b6103a560048036038101906103a09190612b5c565b610f59565b005b3480156103b357600080fd5b506103ce60048036038101906103c99190612ce4565b610f79565b005b3480156103dc57600080fd5b506103f760048036038101906103f29190612d8d565b610f94565b6040516104049190612f3d565b60405180910390f35b34801561041957600080fd5b50610434600480360381019061042f9190612f5f565b611057565b005b34801561044257600080fd5b5061045d600480360381019061045891906129da565b6110a3565b60405161046a9190612a48565b60405180910390f35b34801561047f57600080fd5b5061049a60048036038101906104959190612f5f565b6110b5565b6040516104a79190612ade565b60405180910390f35b3480156104bc57600080fd5b506104c561116d565b005b3480156104d357600080fd5b506104ee60048036038101906104e991906129da565b611181565b005b3480156104fc57600080fd5b5061051760048036038101906105129190612f5f565b611193565b604051610524919061304a565b60405180910390f35b34801561053957600080fd5b506105426112d6565b60405161054f9190612a48565b60405180910390f35b34801561056457600080fd5b5061057f600480360381019061057a919061312f565b611300565b60405161058c91906128d7565b60405180910390f35b3480156105a157600080fd5b506105aa611317565b6040516105b79190612982565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e2919061318b565b6113a9565b6040516105f4919061304a565b60405180910390f35b34801561060957600080fd5b50610624600480360381019061061f91906129da565b6115b5565b6040516106319190612982565b60405180910390f35b34801561064657600080fd5b50610661600480360381019061065c91906129da565b611655565b005b34801561066f57600080fd5b5061068a6004803603810190610685919061320a565b611667565b005b6106a660048036038101906106a191906132eb565b611772565b005b3480156106b457600080fd5b506106cf60048036038101906106ca91906129da565b6117e5565b6040516106dc91906133c3565b60405180910390f35b3480156106f157600080fd5b5061070c60048036038101906107079190612f5f565b61184f565b005b34801561071a57600080fd5b50610735600480360381019061073091906129da565b61189b565b6040516107429190612982565b60405180910390f35b34801561075757600080fd5b50610772600480360381019061076d9190612f5f565b6118d9565b005b34801561078057600080fd5b5061079b60048036038101906107969190612f5f565b611925565b005b6107b760048036038101906107b291906133de565b611971565b005b3480156107c557600080fd5b506107e060048036038101906107db9190613475565b611d32565b6040516107ed91906128d7565b60405180910390f35b34801561080257600080fd5b5061081d60048036038101906108189190612f5f565b611dc6565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061087a57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108aa5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6060600280546108c0906134e4565b80601f01602080910402602001604051908101604052809291908181526020018280546108ec906134e4565b80156109395780601f1061090e57610100808354040283529160200191610939565b820191906000526020600020905b81548152906001019060200180831161091c57829003601f168201915b5050505050905090565b600061094e82611e49565b610984576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109cd826110a3565b90508073ffffffffffffffffffffffffffffffffffffffff166109ee611ea8565b73ffffffffffffffffffffffffffffffffffffffff1614610a5157610a1a81610a15611ea8565b611d32565b610a50576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610b10611eb0565b6001546000540303905090565b610b25611eb5565b8060128190555050565b6000610b3a82611f33565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ba1576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610bad84611fff565b91509150610bc38187610bbe611ea8565b612026565b610c0f57610bd886610bd3611ea8565b611d32565b610c0e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610c75576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c82868686600161206a565b8015610c8d57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610d5b85610d37888887612070565b7c020000000000000000000000000000000000000000000000000000000017612098565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603610de15760006001850190506000600460008381526020019081526020016000205403610ddf576000548114610dde578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610e4986868660016120c3565b505050505050565b600b6020528060005260406000206000915090505481565b610e71611eb5565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1631604051610ed090613546565b60006040518083038185875af1925050503d8060008114610f0d576040519150601f19603f3d011682016040523d82523d6000602084013e610f12565b606091505b5050905080610f56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4d906135a7565b60405180910390fd5b50565b610f7483838360405180602001604052806000815250611772565b505050565b610f81611eb5565b8060099081610f909190613773565b5050565b6060600083839050905060008167ffffffffffffffff811115610fba57610fb9612bb9565b5b604051908082528060200260200182016040528015610ff357816020015b610fe06127d4565b815260200190600190039081610fd85790505b50905060005b82811461104b5761102286868381811061101657611015613845565b5b905060200201356117e5565b82828151811061103557611034613845565b5b6020026020010181905250806001019050610ff9565b50809250505092915050565b61105f611eb5565b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006110ae82611f33565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361111c576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611175611eb5565b61117f60006120c9565b565b611189611eb5565b8060118190555050565b606060008060006111a3856110b5565b905060008167ffffffffffffffff8111156111c1576111c0612bb9565b5b6040519080825280602002602001820160405280156111ef5781602001602082028036833780820191505090505b5090506111fa6127d4565b6000611204611eb0565b90505b8386146112c8576112178161218f565b915081604001516112bd57600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461126257816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036112bc57808387806001019850815181106112af576112ae613845565b5b6020026020010181815250505b5b806001019050611207565b508195505050505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061130f83601254846121ba565b905092915050565b606060038054611326906134e4565b80601f0160208091040260200160405190810160405280929190818152602001828054611352906134e4565b801561139f5780601f106113745761010080835404028352916020019161139f565b820191906000526020600020905b81548152906001019060200180831161138257829003601f168201915b5050505050905090565b60608183106113e4576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113ef6121d1565b90506113f9611eb0565b85101561140b57611408611eb0565b94505b80841115611417578093505b6000611422876110b5565b90508486101561144557600086860390508181101561143f578091505b5061144a565b600090505b60008167ffffffffffffffff81111561146657611465612bb9565b5b6040519080825280602002602001820160405280156114945781602001602082028036833780820191505090505b509050600082036114ab57809450505050506115ae565b60006114b6886117e5565b9050600081604001516114cb57816000015190505b60008990505b8881141580156114e15750848714155b156115a0576114ef8161218f565b9250826040015161159557600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff161461153a57826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611594578084888060010199508151811061158757611586613845565b5b6020026020010181815250505b5b8060010190506114d1565b508583528296505050505050505b9392505050565b600a60205280600052604060002060009150905080546115d4906134e4565b80601f0160208091040260200160405190810160405280929190818152602001828054611600906134e4565b801561164d5780601f106116225761010080835404028352916020019161164d565b820191906000526020600020905b81548152906001019060200180831161163057829003601f168201915b505050505081565b61165d611eb5565b8060108190555050565b8060076000611674611ea8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611721611ea8565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161176691906128d7565b60405180910390a35050565b61177d848484610b2f565b60008373ffffffffffffffffffffffffffffffffffffffff163b146117df576117a8848484846121da565b6117de576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6117ed6127d4565b6117f56127d4565b6117fd611eb0565b831080611811575061180d6121d1565b8310155b1561181f578091505061184a565b6118288361218f565b905080604001511561183d578091505061184a565b6118468361232a565b9150505b919050565b611857611eb5565b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606009600a60008481526020019081526020016000206040516020016118c3929190613928565b6040516020818303038152906040529050919050565b6118e1611eb5565b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61192d611eb5565b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6001601154146119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad906139a7565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e866040518263ffffffff1660e01b8152600401611a289190612ade565b602060405180830381865afa158015611a45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6991906139dc565b73ffffffffffffffffffffffffffffffffffffffff1614611abf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab690613a7b565b60405180910390fd5b611ac98282611300565b611b08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aff90613ae7565b60405180910390fd5b82600b60008681526020019081526020016000205486611b289190613b36565b1115611b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6090613bdc565b60405180910390fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688601054611bd99190613bfc565b6040518463ffffffff1660e01b8152600401611bf793929190613c3e565b6020604051808303816000875af1158015611c16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c3a9190613c8a565b506000600b600086815260200190815260200160002054905060005b86811015611cf557600081611c696121d1565b611c739190613b36565b9050611c7e8761234a565b611c93600185611c8e9190613b36565b61234a565b604051602001611ca4929190613d0e565b604051602081830303815290604052600a60008381526020019081526020016000209081611cd29190613773565b508280611cde90613d41565b9350508180611cec90613d41565b92505050611c56565b86600b60008881526020019081526020016000206000828254611d189190613b36565b92505081905550611d2933886124aa565b50505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611dce611eb5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611e3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3490613dfb565b60405180910390fd5b611e46816120c9565b50565b600081611e54611eb0565b11158015611e63575060005482105b8015611ea1575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b600090565b611ebd612665565b73ffffffffffffffffffffffffffffffffffffffff16611edb6112d6565b73ffffffffffffffffffffffffffffffffffffffff1614611f31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2890613e67565b60405180910390fd5b565b60008082905080611f42611eb0565b11611fc857600054811015611fc75760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603611fc5575b60008103611fbb576004600083600190039350838152602001908152602001600020549050611f91565b8092505050611ffa565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e861208786868461266d565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6121976127d4565b6121b36004600084815260200190815260200160002054612676565b9050919050565b6000826121c7858461272c565b1490509392505050565b60008054905090565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612200611ea8565b8786866040518563ffffffff1660e01b81526004016122229493929190613edc565b6020604051808303816000875af192505050801561225e57506040513d601f19601f8201168201806040525081019061225b9190613f3d565b60015b6122d7573d806000811461228e576040519150601f19603f3d011682016040523d82523d6000602084013e612293565b606091505b5060008151036122cf576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6123326127d4565b61234361233e83611f33565b612676565b9050919050565b606060008203612391576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506124a5565b600082905060005b600082146123c35780806123ac90613d41565b915050600a826123bc9190613f99565b9150612399565b60008167ffffffffffffffff8111156123df576123de612bb9565b5b6040519080825280601f01601f1916602001820160405280156124115781602001600182028036833780820191505090505b5090505b6000851461249e5760018261242a9190613fca565b9150600a856124399190613ffe565b60306124459190613b36565b60f81b81838151811061245b5761245a613845565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856124979190613f99565b9450612415565b8093505050505b919050565b600080549050600082036124ea576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124f7600084838561206a565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061256e8361255f6000866000612070565b61256885612782565b17612098565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461260f57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506125d4565b506000820361264a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081905550505061266060008483856120c3565b505050565b600033905090565b60009392505050565b61267e6127d4565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008082905060005b8451811015612777576127628286838151811061275557612754613845565b5b6020026020010151612792565b9150808061276f90613d41565b915050612735565b508091505092915050565b60006001821460e11b9050919050565b60008183106127aa576127a582846127bd565b6127b5565b6127b483836127bd565b5b905092915050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61286c81612837565b811461287757600080fd5b50565b60008135905061288981612863565b92915050565b6000602082840312156128a5576128a461282d565b5b60006128b38482850161287a565b91505092915050565b60008115159050919050565b6128d1816128bc565b82525050565b60006020820190506128ec60008301846128c8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561292c578082015181840152602081019050612911565b60008484015250505050565b6000601f19601f8301169050919050565b6000612954826128f2565b61295e81856128fd565b935061296e81856020860161290e565b61297781612938565b840191505092915050565b6000602082019050818103600083015261299c8184612949565b905092915050565b6000819050919050565b6129b7816129a4565b81146129c257600080fd5b50565b6000813590506129d4816129ae565b92915050565b6000602082840312156129f0576129ef61282d565b5b60006129fe848285016129c5565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a3282612a07565b9050919050565b612a4281612a27565b82525050565b6000602082019050612a5d6000830184612a39565b92915050565b612a6c81612a27565b8114612a7757600080fd5b50565b600081359050612a8981612a63565b92915050565b60008060408385031215612aa657612aa561282d565b5b6000612ab485828601612a7a565b9250506020612ac5858286016129c5565b9150509250929050565b612ad8816129a4565b82525050565b6000602082019050612af36000830184612acf565b92915050565b6000819050919050565b612b0c81612af9565b8114612b1757600080fd5b50565b600081359050612b2981612b03565b92915050565b600060208284031215612b4557612b4461282d565b5b6000612b5384828501612b1a565b91505092915050565b600080600060608486031215612b7557612b7461282d565b5b6000612b8386828701612a7a565b9350506020612b9486828701612a7a565b9250506040612ba5868287016129c5565b9150509250925092565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612bf182612938565b810181811067ffffffffffffffff82111715612c1057612c0f612bb9565b5b80604052505050565b6000612c23612823565b9050612c2f8282612be8565b919050565b600067ffffffffffffffff821115612c4f57612c4e612bb9565b5b612c5882612938565b9050602081019050919050565b82818337600083830152505050565b6000612c87612c8284612c34565b612c19565b905082815260208101848484011115612ca357612ca2612bb4565b5b612cae848285612c65565b509392505050565b600082601f830112612ccb57612cca612baf565b5b8135612cdb848260208601612c74565b91505092915050565b600060208284031215612cfa57612cf961282d565b5b600082013567ffffffffffffffff811115612d1857612d17612832565b5b612d2484828501612cb6565b91505092915050565b600080fd5b600080fd5b60008083601f840112612d4d57612d4c612baf565b5b8235905067ffffffffffffffff811115612d6a57612d69612d2d565b5b602083019150836020820283011115612d8657612d85612d32565b5b9250929050565b60008060208385031215612da457612da361282d565b5b600083013567ffffffffffffffff811115612dc257612dc1612832565b5b612dce85828601612d37565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612e0f81612a27565b82525050565b600067ffffffffffffffff82169050919050565b612e3281612e15565b82525050565b612e41816128bc565b82525050565b600062ffffff82169050919050565b612e5f81612e47565b82525050565b608082016000820151612e7b6000850182612e06565b506020820151612e8e6020850182612e29565b506040820151612ea16040850182612e38565b506060820151612eb46060850182612e56565b50505050565b6000612ec68383612e65565b60808301905092915050565b6000602082019050919050565b6000612eea82612dda565b612ef48185612de5565b9350612eff83612df6565b8060005b83811015612f30578151612f178882612eba565b9750612f2283612ed2565b925050600181019050612f03565b5085935050505092915050565b60006020820190508181036000830152612f578184612edf565b905092915050565b600060208284031215612f7557612f7461282d565b5b6000612f8384828501612a7a565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612fc1816129a4565b82525050565b6000612fd38383612fb8565b60208301905092915050565b6000602082019050919050565b6000612ff782612f8c565b6130018185612f97565b935061300c83612fa8565b8060005b8381101561303d5781516130248882612fc7565b975061302f83612fdf565b925050600181019050613010565b5085935050505092915050565b600060208201905081810360008301526130648184612fec565b905092915050565b600067ffffffffffffffff82111561308757613086612bb9565b5b602082029050602081019050919050565b60006130ab6130a68461306c565b612c19565b905080838252602082019050602084028301858111156130ce576130cd612d32565b5b835b818110156130f757806130e38882612b1a565b8452602084019350506020810190506130d0565b5050509392505050565b600082601f83011261311657613115612baf565b5b8135613126848260208601613098565b91505092915050565b600080604083850312156131465761314561282d565b5b600083013567ffffffffffffffff81111561316457613163612832565b5b61317085828601613101565b925050602061318185828601612b1a565b9150509250929050565b6000806000606084860312156131a4576131a361282d565b5b60006131b286828701612a7a565b93505060206131c3868287016129c5565b92505060406131d4868287016129c5565b9150509250925092565b6131e7816128bc565b81146131f257600080fd5b50565b600081359050613204816131de565b92915050565b600080604083850312156132215761322061282d565b5b600061322f85828601612a7a565b9250506020613240858286016131f5565b9150509250929050565b600067ffffffffffffffff82111561326557613264612bb9565b5b61326e82612938565b9050602081019050919050565b600061328e6132898461324a565b612c19565b9050828152602081018484840111156132aa576132a9612bb4565b5b6132b5848285612c65565b509392505050565b600082601f8301126132d2576132d1612baf565b5b81356132e284826020860161327b565b91505092915050565b600080600080608085870312156133055761330461282d565b5b600061331387828801612a7a565b945050602061332487828801612a7a565b9350506040613335878288016129c5565b925050606085013567ffffffffffffffff81111561335657613355612832565b5b613362878288016132bd565b91505092959194509250565b6080820160008201516133846000850182612e06565b5060208201516133976020850182612e29565b5060408201516133aa6040850182612e38565b5060608201516133bd6060850182612e56565b50505050565b60006080820190506133d8600083018461336e565b92915050565b600080600080600060a086880312156133fa576133f961282d565b5b6000613408888289016129c5565b9550506020613419888289016129c5565b945050604061342a888289016129c5565b935050606086013567ffffffffffffffff81111561344b5761344a612832565b5b61345788828901613101565b925050608061346888828901612b1a565b9150509295509295909350565b6000806040838503121561348c5761348b61282d565b5b600061349a85828601612a7a565b92505060206134ab85828601612a7a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806134fc57607f821691505b60208210810361350f5761350e6134b5565b5b50919050565b600081905092915050565b50565b6000613530600083613515565b915061353b82613520565b600082019050919050565b600061355182613523565b9150819050919050565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b60006135916010836128fd565b915061359c8261355b565b602082019050919050565b600060208201905081810360008301526135c081613584565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026136297fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826135ec565b61363386836135ec565b95508019841693508086168417925050509392505050565b6000819050919050565b600061367061366b613666846129a4565b61364b565b6129a4565b9050919050565b6000819050919050565b61368a83613655565b61369e61369682613677565b8484546135f9565b825550505050565b600090565b6136b36136a6565b6136be818484613681565b505050565b5b818110156136e2576136d76000826136ab565b6001810190506136c4565b5050565b601f821115613727576136f8816135c7565b613701846135dc565b81016020851015613710578190505b61372461371c856135dc565b8301826136c3565b50505b505050565b600082821c905092915050565b600061374a6000198460080261372c565b1980831691505092915050565b60006137638383613739565b9150826002028217905092915050565b61377c826128f2565b67ffffffffffffffff81111561379557613794612bb9565b5b61379f82546134e4565b6137aa8282856136e6565b600060209050601f8311600181146137dd57600084156137cb578287015190505b6137d58582613757565b86555061383d565b601f1984166137eb866135c7565b60005b82811015613813578489015182556001820191506020850194506020810190506137ee565b86831015613830578489015161382c601f891682613739565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b6000815461388c816134e4565b6138968186613874565b945060018216600081146138b157600181146138c6576138f9565b60ff19831686528115158202860193506138f9565b6138cf856135c7565b60005b838110156138f1578154818901526001820191506020810190506138d2565b838801955050505b50505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815250565b6000613934828561387f565b9150613940828461387f565b915061394b82613902565b6005820191508190509392505050565b7f4d696e742064697361626c65642e000000000000000000000000000000000000600082015250565b6000613991600e836128fd565b915061399c8261395b565b602082019050919050565b600060208201905081810360008301526139c081613984565b9050919050565b6000815190506139d681612a63565b92915050565b6000602082840312156139f2576139f161282d565b5b6000613a00848285016139c7565b91505092915050565b7f596f752063616e206f6e6c792073706c6974206120706c616e657420796f752060008201527f6f776e2e00000000000000000000000000000000000000000000000000000000602082015250565b6000613a656024836128fd565b9150613a7082613a09565b604082019050919050565b60006020820190508181036000830152613a9481613a58565b9050919050565b7f50617263656c20636f756e7420646f6573206e6f74206d617463682100000000600082015250565b6000613ad1601c836128fd565b9150613adc82613a9b565b602082019050919050565b60006020820190508181036000830152613b0081613ac4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b41826129a4565b9150613b4c836129a4565b9250828201905080821115613b6457613b63613b07565b5b92915050565b7f4e6f7420656e6f7567682070617263656c7320746f2066696c6c2073706c697460008201527f206f726465722e00000000000000000000000000000000000000000000000000602082015250565b6000613bc66027836128fd565b9150613bd182613b6a565b604082019050919050565b60006020820190508181036000830152613bf581613bb9565b9050919050565b6000613c07826129a4565b9150613c12836129a4565b9250828202613c20816129a4565b91508282048414831517613c3757613c36613b07565b5b5092915050565b6000606082019050613c536000830186612a39565b613c606020830185612a39565b613c6d6040830184612acf565b949350505050565b600081519050613c84816131de565b92915050565b600060208284031215613ca057613c9f61282d565b5b6000613cae84828501613c75565b91505092915050565b6000613cc2826128f2565b613ccc8185613874565b9350613cdc81856020860161290e565b80840191505092915050565b7f2f00000000000000000000000000000000000000000000000000000000000000815250565b6000613d1a8285613cb7565b9150613d2582613ce8565b600182019150613d358284613cb7565b91508190509392505050565b6000613d4c826129a4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613d7e57613d7d613b07565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613de56026836128fd565b9150613df082613d89565b604082019050919050565b60006020820190508181036000830152613e1481613dd8565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613e516020836128fd565b9150613e5c82613e1b565b602082019050919050565b60006020820190508181036000830152613e8081613e44565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613eae82613e87565b613eb88185613e92565b9350613ec881856020860161290e565b613ed181612938565b840191505092915050565b6000608082019050613ef16000830187612a39565b613efe6020830186612a39565b613f0b6040830185612acf565b8181036060830152613f1d8184613ea3565b905095945050505050565b600081519050613f3781612863565b92915050565b600060208284031215613f5357613f5261282d565b5b6000613f6184828501613f28565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613fa4826129a4565b9150613faf836129a4565b925082613fbf57613fbe613f6a565b5b828204905092915050565b6000613fd5826129a4565b9150613fe0836129a4565b9250828203905081811115613ff857613ff7613b07565b5b92915050565b6000614009826129a4565b9150614014836129a4565b92508261402457614023613f6a565b5b82820690509291505056fea2646970667358221220066aaaaf2587b1dd2a0885053653ec957983c45f4cba787790a06471dbe1f8bc64736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: constantinople
Optimization: No
Frontiers.sol 2276 lines
// File: @openzeppelin/contracts/utils/cryptography/MerkleProof.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
* consuming from one or the other at each step according to the instructions given by
* `proofFlags`.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
// File: contracts/IERC721A.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables
* (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`,
* checking first that contract recipients are aware of the ERC721 protocol
* to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move
* this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external payable;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom}
* whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the
* zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external payable;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
// File: contracts/IERC721AQueryable.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721AQueryable.
*/
interface IERC721AQueryable is IERC721A {
/**
* Invalid query range (`start` >= `stop`).
*/
error InvalidQueryRange();
/**
* @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
*
* If the `tokenId` is out of bounds:
*
* - `addr = address(0)`
* - `startTimestamp = 0`
* - `burned = false`
* - `extraData = 0`
*
* If the `tokenId` is burned:
*
* - `addr = <Address of owner before token was burned>`
* - `startTimestamp = <Timestamp when token was burned>`
* - `burned = true`
* - `extraData = <Extra data when token was burned>`
*
* Otherwise:
*
* - `addr = <Address of owner>`
* - `startTimestamp = <Timestamp of start of ownership>`
* - `burned = false`
* - `extraData = <Extra data at start of ownership>`
*/
function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);
/**
* @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
* See {ERC721AQueryable-explicitOwnershipOf}
*/
function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`,
* in the range [`start`, `stop`)
* (i.e. `start <= tokenId < stop`).
*
* This function allows for tokens to be queried if the collection
* grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
*
* Requirements:
*
* - `start < stop`
*/
function tokensOfOwnerIn(
address owner,
uint256 start,
uint256 stop
) external view returns (uint256[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`.
*
* This function scans the ownership mapping and is O(`totalSupply`) in complexity.
* It is meant to be called off-chain.
*
* See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
* multiple smaller scans if the collection is large enough to cause
* an out-of-gas error (10K collections should be fine).
*/
function tokensOfOwner(address owner) external view returns (uint256[] memory);
}
// File: contracts/ERC721A.sol
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the
* zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) public payable virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
// =============================================================
// TRANSFER OPERATIONS
// =============================================================
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable virtual override {
safeTransferFrom(from, to, tokenId, '');
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token
* by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public payable virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @dev Hook that is called before a set of serially-ordered token IDs
* are about to be transferred. This includes minting.
* And also called before burning one token.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token IDs
* have been transferred. This includes minting.
* And also called after one token has been burned.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* `from` - Previous owner of the given token ID.
* `to` - Target address that will receive the token.
* `tokenId` - Token ID to be transferred.
* `_data` - Optional data to send along with the call.
*
* Returns whether the call correctly returned the expected magic value.
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)...
// [truncated — 82675 bytes total]
Read Contract
balanceOf 0x70a08231 → uint256
explicitOwnershipOf 0xc23dc68f → tuple
explicitOwnershipsOf 0x5bbb2177 → tuple[]
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
planetParcelCounts 0x3886070b → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenList 0x9ead7222 → string
tokenURI 0xc87b56dd → string
tokensOfOwner 0x8462151c → uint256[]
tokensOfOwnerIn 0x99a2557a → uint256[]
totalSupply 0x18160ddd → uint256
verifyParcelCount 0x91343212 → bool
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
mint 0xe6dbbac3
uint256 quantity
uint256 pt
uint256 pl
bytes32[] proof
bytes32 leaf
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateBigBangContract 0xc7f01273
address _contract
updateCurrentlyMinting 0x7b46626c
uint256 _status
updateMetadataPath 0x55d5204c
string _path
updateOptixContract 0xca3f3e16
address _contract
updateOptixMintPrice 0xa1ad4f40
uint256 _price
updateOptixReceiver 0xdf8f519f
address _address
updatePayoutWallet 0x5c3d25ca
address _payoutWallet
updateRoot 0x21ff9970
bytes32 _root
withdraw 0x3ccfd60b
No parameters
Recent Transactions
No transactions found for this address