Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0x1279924acdF20777bfBC0dBDCF3baEfBAa2B171F
Balance 0 ETH
Nonce 1
Code Size 15605 bytes
Indexed Transactions 0 (1 on-chain, 0.7% indexed)
External Etherscan · Sourcify

Contract Bytecode

15605 bytes
0x6080604052600436106101f95760003560e01c8063765b18451161010d578063c3427844116100a0578063e985e9c51161006f578063e985e9c5146106ce578063f2fde38b1461070b578063f37ab49514610734578063f47c84c514610750578063f7ca11521461077b576101f9565b8063c342784414610614578063c538668b1461063f578063c87b56dd14610668578063cc0b8d15146106a5576101f9565b8063a22cb465116100dc578063a22cb4651461057d578063a854ffba146105a6578063aefbbc9d146105cf578063b88d4fde146105f8576101f9565b8063765b1845146104d35780638da5cb5b146104fc57806395d89b41146105275780639c70b51214610552576101f9565b80633c5e310b116101905780636352211e1161015f5780636352211e146103ee57806366e7ca181461042b5780636c0360eb1461045457806370a082311461047f578063715018a6146104bc576101f9565b80633c5e310b1461034d5780633c9527641461038057806342842e0e146103a957806355f804b3146103c5576101f9565b806318160ddd116101cc57806318160ddd146102bf5780631c8b232d146102ea57806323b872dd146103155780632e1a7d4d14610331576101f9565b806301ffc9a7146101fe57806306fdde031461023b578063081812fc14610266578063095ea7b3146102a3575b600080fd5b34801561020a57600080fd5b50610225600480360381019061022091906127b0565b6107b9565b60405161023291906127f8565b60405180910390f35b34801561024757600080fd5b5061025061084b565b60405161025d91906128ac565b60405180910390f35b34801561027257600080fd5b5061028d60048036038101906102889190612904565b6108dd565b60405161029a9190612972565b60405180910390f35b6102bd60048036038101906102b891906129b9565b61095c565b005b3480156102cb57600080fd5b506102d4610aa0565b6040516102e19190612a08565b60405180910390f35b3480156102f657600080fd5b506102ff610ab7565b60405161030c91906127f8565b60405180910390f35b61032f600480360381019061032a9190612a23565b610aca565b005b61034b60048036038101906103469190612904565b610def565b005b34801561035957600080fd5b50610362610e38565b60405161037799989796959493929190612a76565b60405180910390f35b34801561038c57600080fd5b506103a760048036038101906103a29190612b36565b610f28565b005b6103c360048036038101906103be9190612a23565b610f4d565b005b3480156103d157600080fd5b506103ec60048036038101906103e79190612c98565b610f6d565b005b3480156103fa57600080fd5b5061041560048036038101906104109190612904565b610f8f565b6040516104229190612972565b60405180910390f35b34801561043757600080fd5b50610452600480360381019061044d9190612d17565b610fa1565b005b34801561046057600080fd5b50610469610fb3565b60405161047691906128ac565b60405180910390f35b34801561048b57600080fd5b506104a660048036038101906104a19190612d44565b611041565b6040516104b39190612a08565b60405180910390f35b3480156104c857600080fd5b506104d16110fa565b005b3480156104df57600080fd5b506104fa60048036038101906104f59190612e39565b61110e565b005b34801561050857600080fd5b50610511611372565b60405161051e9190612972565b60405180910390f35b34801561053357600080fd5b5061053c61139c565b60405161054991906128ac565b60405180910390f35b34801561055e57600080fd5b5061056761142e565b60405161057491906127f8565b60405180910390f35b34801561058957600080fd5b506105a4600480360381019061059f9190612e95565b611441565b005b3480156105b257600080fd5b506105cd60048036038101906105c89190612b36565b61154c565b005b3480156105db57600080fd5b506105f660048036038101906105f19190612ed5565b611571565b005b610612600480360381019061060d9190613048565b611669565b005b34801561062057600080fd5b506106296116dc565b6040516106369190612a08565b60405180910390f35b34801561064b57600080fd5b5061066660048036038101906106619190612d17565b6116e2565b005b34801561067457600080fd5b5061068f600480360381019061068a9190612904565b6116f4565b60405161069c91906128ac565b60405180910390f35b3480156106b157600080fd5b506106cc60048036038101906106c791906130cb565b611793565b005b3480156106da57600080fd5b506106f560048036038101906106f0919061310b565b611800565b60405161070291906127f8565b60405180910390f35b34801561071757600080fd5b50610732600480360381019061072d9190612d44565b611894565b005b61074e6004803603810190610749919061318b565b611918565b005b34801561075c57600080fd5b50610765611d62565b6040516107729190612a08565b60405180910390f35b34801561078757600080fd5b506107a2600480360381019061079d9190612d44565b611d68565b6040516107b09291906131e7565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061081457506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108445750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461085a9061323f565b80601f01602080910402602001604051908101604052809291908181526020018280546108869061323f565b80156108d35780601f106108a8576101008083540402835291602001916108d3565b820191906000526020600020905b8154815290600101906020018083116108b657829003601f168201915b5050505050905090565b60006108e882611dca565b61091e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061096782610f8f565b90508073ffffffffffffffffffffffffffffffffffffffff16610988611e29565b73ffffffffffffffffffffffffffffffffffffffff16146109eb576109b4816109af611e29565b611800565b6109ea576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610aaa611e31565b6001546000540303905090565b601160009054906101000a900460ff1681565b6000610ad582611e3a565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b3c576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610b4884611f08565b91509150610b5e8187610b59611e29565b611f2f565b610baa57610b7386610b6e611e29565b611800565b610ba9576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610c11576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1e8686866001611f73565b8015610c2957600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610cf785610cd3888887611f79565b7c020000000000000000000000000000000000000000000000000000000017611fa1565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610d7f576000600185019050600060046000838152602001908152602001600020541415610d7d576000548114610d7c578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610de78686866001611fcc565b505050505050565b610df7611fd2565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050610e3557600080fd5b50565b6060600080600080600080600080600a600b54600c54600954600d54600e54610e5f610aa0565b601160009054906101000a900460ff16601160019054906101000a900460ff16888054610e8b9061323f565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb79061323f565b8015610f045780601f10610ed957610100808354040283529160200191610f04565b820191906000526020600020905b815481529060010190602001808311610ee757829003601f168201915b50505050509850985098509850985098509850985098509850909192939495969798565b610f30611fd2565b80601160016101000a81548160ff02191690831515021790555050565b610f6883838360405180602001604052806000815250611669565b505050565b610f75611fd2565b8060129080519060200190610f8b9291906126a1565b5050565b6000610f9a82611e3a565b9050919050565b610fa9611fd2565b80600f8190555050565b60128054610fc09061323f565b80601f0160208091040260200160405190810160405280929190818152602001828054610fec9061323f565b80156110395780601f1061100e57610100808354040283529160200191611039565b820191906000526020600020905b81548152906001019060200180831161101c57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110a9576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611102611fd2565b61110c6000612050565b565b601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561119b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611192906132bd565b60405180910390fd5b600b548211156111e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d790613329565b60405180910390fd5b60008211611223576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121a90613395565b60405180910390fd5b60011515601160009054906101000a900460ff16151514611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127090613401565b60405180910390fd5b6000338360405160200161128e9291906134e1565b6040516020818303038152906040528051906020012090506112b38183601054612116565b6112f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e990613564565b60405180910390fd5b6001601360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555082600b600082825461135c91906135b3565b9250508190555061136d33846121cc565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546113ab9061323f565b80601f01602080910402602001604051908101604052809291908181526020018280546113d79061323f565b80156114245780601f106113f957610100808354040283529160200191611424565b820191906000526020600020905b81548152906001019060200180831161140757829003601f168201915b5050505050905090565b601160019054906101000a900460ff1681565b806007600061144e611e29565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166114fb611e29565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161154091906127f8565b60405180910390a35050565b611554611fd2565b80601160006101000a81548160ff02191690831515021790555050565b611579611fd2565b600088141561159a5761158a610aa0565b6110ad61159791906135b3565b97505b6115a2610aa0565b6110ad6115af91906135b3565b8811156115f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e890613633565b60405180910390fd5b87600b819055508660098190555085600a90805190602001906116159291906126a1565b5084600d8190555083600e8190555082600c8190555080601160006101000a81548160ff02191690831515021790555081601160016101000a81548160ff0219169083151502179055505050505050505050565b611674848484610aca565b60008373ffffffffffffffffffffffffffffffffffffffff163b146116d65761169f848484846121ea565b6116d5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60095481565b6116ea611fd2565b8060108190555050565b60606116ff82611dca565b611735576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061173f61233b565b9050600081511415611760576040518060200160405280600081525061178b565b8061176a846123cd565b60405160200161177b929190613684565b6040516020818303038152906040525b915050919050565b61179b611fd2565b6110ad826117a7610aa0565b6117b191906136a8565b11156117f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e990613633565b60405180910390fd5b6117fc81836121cc565b5050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61189c611fd2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561190c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190390613770565b60405180910390fd5b61191581612050565b50565b8167ffffffffffffffff166009546119309190613790565b341015611972576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196990613836565b60405180910390fd5b60011515601160009054906101000a900460ff161515146119c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119bf90613401565b60405180910390fd5b60008267ffffffffffffffff1611611a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0c90613395565b60405180910390fd5b600d548267ffffffffffffffff161115611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5b906138c8565b60405180910390fd5b600b548267ffffffffffffffff161115611ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aaa90613329565b60405180910390fd5b600e54601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900467ffffffffffffffff1683611b1591906138e8565b67ffffffffffffffff161115611b60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5790613972565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611bce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bc590613a04565b60405180910390fd5b60011515601160019054906101000a900460ff1615151415611c6357600033604051602001611bfd9190613a24565b604051602081830303815290604052805190602001209050611c228183600f54612116565b611c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5890613a8b565b60405180910390fd5b505b81601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900467ffffffffffffffff16611cc291906138e8565b601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508167ffffffffffffffff16600b6000828254611d4391906135b3565b92505081905550611d5e338367ffffffffffffffff166121cc565b5050565b6110ad81565b600080601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611dc184611041565b91509150915091565b600081611dd5611e31565b11158015611de4575060005482105b8015611e22575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b60008082905080611e49611e31565b11611ed157600054811015611ed05760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415611ece575b6000811415611ec4576004600083600190039350838152602001908152602001600020549050611e99565b8092505050611f03565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8611f90868684612426565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b611fda61242f565b73ffffffffffffffffffffffffffffffffffffffff16611ff8611372565b73ffffffffffffffffffffffffffffffffffffffff161461204e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204590613af7565b60405180910390fd5b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008084905060005b84518110156121be57600085828151811061213d5761213c613b17565b5b6020026020010151905080831161217e578281604051602001612161929190613b67565b6040516020818303038152906040528051906020012092506121aa565b8083604051602001612191929190613b67565b6040516020818303038152906040528051906020012092505b5080806121b690613b93565b91505061211f565b508281149150509392505050565b6121e6828260405180602001604052806000815250612437565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612210611e29565b8786866040518563ffffffff1660e01b81526004016122329493929190613c31565b6020604051808303816000875af192505050801561226e57506040513d601f19601f8201168201806040525081019061226b9190613c92565b60015b6122e8573d806000811461229e576040519150601f19603f3d011682016040523d82523d6000602084013e6122a3565b606091505b506000815114156122e0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606012805461234a9061323f565b80601f01602080910402602001604051908101604052809291908181526020018280546123769061323f565b80156123c35780601f10612398576101008083540402835291602001916123c3565b820191906000526020600020905b8154815290600101906020018083116123a657829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b60011561241157600184039350600a81066030018453600a810490508061240c57612411565b6123e6565b50828103602084039350808452505050919050565b60009392505050565b600033905090565b61244183836124d4565b60008373ffffffffffffffffffffffffffffffffffffffff163b146124cf57600080549050600083820390505b61248160008683806001019450866121ea565b6124b7576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061246e5781600054146124cc57600080fd5b50505b505050565b6000805490506000821415612515576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6125226000848385611f73565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506125998361258a6000866000611f79565b61259385612691565b17611fa1565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461263a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506125ff565b506000821415612676576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081905550505061268c6000848385611fcc565b505050565b60006001821460e11b9050919050565b8280546126ad9061323f565b90600052602060002090601f0160209004810192826126cf5760008555612716565b82601f106126e857805160ff1916838001178555612716565b82800160010185558215612716579182015b828111156127155782518255916020019190600101906126fa565b5b5090506127239190612727565b5090565b5b80821115612740576000816000905550600101612728565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61278d81612758565b811461279857600080fd5b50565b6000813590506127aa81612784565b92915050565b6000602082840312156127c6576127c561274e565b5b60006127d48482850161279b565b91505092915050565b60008115159050919050565b6127f2816127dd565b82525050565b600060208201905061280d60008301846127e9565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561284d578082015181840152602081019050612832565b8381111561285c576000848401525b50505050565b6000601f19601f8301169050919050565b600061287e82612813565b612888818561281e565b935061289881856020860161282f565b6128a181612862565b840191505092915050565b600060208201905081810360008301526128c68184612873565b905092915050565b6000819050919050565b6128e1816128ce565b81146128ec57600080fd5b50565b6000813590506128fe816128d8565b92915050565b60006020828403121561291a5761291961274e565b5b6000612928848285016128ef565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061295c82612931565b9050919050565b61296c81612951565b82525050565b60006020820190506129876000830184612963565b92915050565b61299681612951565b81146129a157600080fd5b50565b6000813590506129b38161298d565b92915050565b600080604083850312156129d0576129cf61274e565b5b60006129de858286016129a4565b92505060206129ef858286016128ef565b9150509250929050565b612a02816128ce565b82525050565b6000602082019050612a1d60008301846129f9565b92915050565b600080600060608486031215612a3c57612a3b61274e565b5b6000612a4a868287016129a4565b9350506020612a5b868287016129a4565b9250506040612a6c868287016128ef565b9150509250925092565b6000610120820190508181036000830152612a91818c612873565b9050612aa0602083018b6129f9565b612aad604083018a6129f9565b612aba60608301896129f9565b612ac760808301886129f9565b612ad460a08301876129f9565b612ae160c08301866129f9565b612aee60e08301856127e9565b612afc6101008301846127e9565b9a9950505050505050505050565b612b13816127dd565b8114612b1e57600080fd5b50565b600081359050612b3081612b0a565b92915050565b600060208284031215612b4c57612b4b61274e565b5b6000612b5a84828501612b21565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612ba582612862565b810181811067ffffffffffffffff82111715612bc457612bc3612b6d565b5b80604052505050565b6000612bd7612744565b9050612be38282612b9c565b919050565b600067ffffffffffffffff821115612c0357612c02612b6d565b5b612c0c82612862565b9050602081019050919050565b82818337600083830152505050565b6000612c3b612c3684612be8565b612bcd565b905082815260208101848484011115612c5757612c56612b68565b5b612c62848285612c19565b509392505050565b600082601f830112612c7f57612c7e612b63565b5b8135612c8f848260208601612c28565b91505092915050565b600060208284031215612cae57612cad61274e565b5b600082013567ffffffffffffffff811115612ccc57612ccb612753565b5b612cd884828501612c6a565b91505092915050565b6000819050919050565b612cf481612ce1565b8114612cff57600080fd5b50565b600081359050612d1181612ceb565b92915050565b600060208284031215612d2d57612d2c61274e565b5b6000612d3b84828501612d02565b91505092915050565b600060208284031215612d5a57612d5961274e565b5b6000612d68848285016129a4565b91505092915050565b600067ffffffffffffffff821115612d8c57612d8b612b6d565b5b602082029050602081019050919050565b600080fd5b6000612db5612db084612d71565b612bcd565b90508083825260208201905060208402830185811115612dd857612dd7612d9d565b5b835b81811015612e015780612ded8882612d02565b845260208401935050602081019050612dda565b5050509392505050565b600082601f830112612e2057612e1f612b63565b5b8135612e30848260208601612da2565b91505092915050565b60008060408385031215612e5057612e4f61274e565b5b6000612e5e858286016128ef565b925050602083013567ffffffffffffffff811115612e7f57612e7e612753565b5b612e8b85828601612e0b565b9150509250929050565b60008060408385031215612eac57612eab61274e565b5b6000612eba858286016129a4565b9250506020612ecb85828601612b21565b9150509250929050565b600080600080600080600080610100898b031215612ef657612ef561274e565b5b6000612f048b828c016128ef565b9850506020612f158b828c016128ef565b975050604089013567ffffffffffffffff811115612f3657612f35612753565b5b612f428b828c01612c6a565b9650506060612f538b828c016128ef565b9550506080612f648b828c016128ef565b94505060a0612f758b828c016128ef565b93505060c0612f868b828c01612b21565b92505060e0612f978b828c01612b21565b9150509295985092959890939650565b600067ffffffffffffffff821115612fc257612fc1612b6d565b5b612fcb82612862565b9050602081019050919050565b6000612feb612fe684612fa7565b612bcd565b90508281526020810184848401111561300757613006612b68565b5b613012848285612c19565b509392505050565b600082601f83011261302f5761302e612b63565b5b813561303f848260208601612fd8565b91505092915050565b600080600080608085870312156130625761306161274e565b5b6000613070878288016129a4565b9450506020613081878288016129a4565b9350506040613092878288016128ef565b925050606085013567ffffffffffffffff8111156130b3576130b2612753565b5b6130bf8782880161301a565b91505092959194509250565b600080604083850312156130e2576130e161274e565b5b60006130f0858286016128ef565b9250506020613101858286016129a4565b9150509250929050565b600080604083850312156131225761312161274e565b5b6000613130858286016129a4565b9250506020613141858286016129a4565b9150509250929050565b600067ffffffffffffffff82169050919050565b6131688161314b565b811461317357600080fd5b50565b6000813590506131858161315f565b92915050565b600080604083850312156131a2576131a161274e565b5b60006131b085828601613176565b925050602083013567ffffffffffffffff8111156131d1576131d0612753565b5b6131dd85828601612e0b565b9150509250929050565b60006040820190506131fc60008301856127e9565b61320960208301846129f9565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061325757607f821691505b6020821081141561326b5761326a613210565b5b50919050565b7f557365722068617320616c726561647920636c61696d65640000000000000000600082015250565b60006132a760188361281e565b91506132b282613271565b602082019050919050565b600060208201905081810360008301526132d68161329a565b9050919050565b7f5765277265206174206d617820737570706c7921000000000000000000000000600082015250565b600061331360148361281e565b915061331e826132dd565b602082019050919050565b6000602082019050818103600083015261334281613306565b9050919050565b7f4e65656420746f206d696e74206174206c656173742031204e46540000000000600082015250565b600061337f601b8361281e565b915061338a82613349565b602082019050919050565b600060208201905081810360008301526133ae81613372565b9050919050565b7f53616c65206861736e2774207374617274656400000000000000000000000000600082015250565b60006133eb60138361281e565b91506133f6826133b5565b602082019050919050565b6000602082019050818103600083015261341a816133de565b9050919050565b60008160601b9050919050565b600061343982613421565b9050919050565b600061344b8261342e565b9050919050565b61346361345e82612951565b613440565b82525050565b600081905092915050565b7f7e00000000000000000000000000000000000000000000000000000000000000600082015250565b60006134aa600183613469565b91506134b582613474565b600182019050919050565b6000819050919050565b6134db6134d6826128ce565b6134c0565b82525050565b60006134ed8285613452565b6014820191506134fc8261349d565b915061350882846134ca565b6020820191508190509392505050565b7f55736572206973206e6f7420696e2074686520736e617073686f740000000000600082015250565b600061354e601b8361281e565b915061355982613518565b602082019050919050565b6000602082019050818103600083015261357d81613541565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006135be826128ce565b91506135c9836128ce565b9250828210156135dc576135db613584565b5b828203905092915050565b7f457863656564656420737570706c790000000000000000000000000000000000600082015250565b600061361d600f8361281e565b9150613628826135e7565b602082019050919050565b6000602082019050818103600083015261364c81613610565b9050919050565b600061365e82612813565b6136688185613469565b935061367881856020860161282f565b80840191505092915050565b60006136908285613653565b915061369c8284613653565b91508190509392505050565b60006136b3826128ce565b91506136be836128ce565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136f3576136f2613584565b5b828201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061375a60268361281e565b9150613765826136fe565b604082019050919050565b600060208201905081810360008301526137898161374d565b9050919050565b600061379b826128ce565b91506137a6836128ce565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156137df576137de613584565b5b828202905092915050565b7f496e73756666696369656e742066756e64730000000000000000000000000000600082015250565b600061382060128361281e565b915061382b826137ea565b602082019050919050565b6000602082019050818103600083015261384f81613813565b9050919050565b7f4d6178206d696e7420616d6f756e7420706572207472616e73616374696f6e2060008201527f6578636565646564000000000000000000000000000000000000000000000000602082015250565b60006138b260288361281e565b91506138bd82613856565b604082019050919050565b600060208201905081810360008301526138e1816138a5565b9050919050565b60006138f38261314b565b91506138fe8361314b565b92508267ffffffffffffffff0382111561391b5761391a613584565b5b828201905092915050565b7f4d6178204e465420706572206164647265737320657863656564656400000000600082015250565b600061395c601c8361281e565b915061396782613926565b602082019050919050565b6000602082019050818103600083015261398b8161394f565b9050919050565b7f436f6e747261637420746f20636f6e7472616374206d696e7473206e6f74206160008201527f6c6c6f7765640000000000000000000000000000000000000000000000000000602082015250565b60006139ee60268361281e565b91506139f982613992565b604082019050919050565b60006020820190508181036000830152613a1d816139e1565b9050919050565b6000613a308284613452565b60148201915081905092915050565b7f55736572206973206e6f742077686974656c6973746564000000000000000000600082015250565b6000613a7560178361281e565b9150613a8082613a3f565b602082019050919050565b60006020820190508181036000830152613aa481613a68565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613ae160208361281e565b9150613aec82613aab565b602082019050919050565b60006020820190508181036000830152613b1081613ad4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b613b61613b5c82612ce1565b613b46565b82525050565b6000613b738285613b50565b602082019150613b838284613b50565b6020820191508190509392505050565b6000613b9e826128ce565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613bd157613bd0613584565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000613c0382613bdc565b613c0d8185613be7565b9350613c1d81856020860161282f565b613c2681612862565b840191505092915050565b6000608082019050613c466000830187612963565b613c536020830186612963565b613c6060408301856129f9565b8181036060830152613c728184613bf8565b905095945050505050565b600081519050613c8c81612784565b92915050565b600060208284031215613ca857613ca761274e565b5b6000613cb684828501613c7d565b9150509291505056fea26469706673582212209d73ec488fa0da7a82741187423b9d25b524f4e8d4be10fd732b806b3405867e64736f6c634300080c0033

Verified Source Code Partial Match

Compiler: v0.8.12+commit.f00d7308 EVM: london Optimization: No
main.sol 1643 lines
// This contract is part of Zellic’s smart contract dataset, which is a collection of publicly available contract code gathered as of March 2023.

// File: erc721a/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: erc721a/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) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), 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 {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), 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, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * 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 _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(en...

// [truncated — 58681 bytes total]

Read Contract

CURR_MINT_COST 0xc3427844 → uint256
MAX_TOKENS 0xf47c84c5 → uint256
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
getAccountInformations 0xf7ca1152 → bool, uint256
getApproved 0x081812fc → address
getInformations 0x3c5e310b → string, uint256, uint256, uint256, uint256, uint256, uint256, bool, bool
hasSaleStarted 0x1c8b232d → bool
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
onlyWhitelisted 0x9c70b512 → bool
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256

Write Contract 17 functions

These functions modify contract state and require a wallet transaction to execute.

Giveaways 0xcc0b8d15
uint256 numTokens
address recipient
approve 0x095ea7b3
address to
uint256 tokenId
claimNFT 0x765b1845
uint256 _mintAmount
bytes32[] proof
mintNFT 0xf37ab495
uint64 _mintAmount
bytes32[] proof
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
setBaseURI 0x55f804b3
string _newBaseURI
setClaimHash 0xc538668b
bytes32 hash
setNewRound 0xaefbbc9d
uint256 _supply
uint256 cost
string name
uint256 perTransactionLimit
uint256 perAddressLimit
uint256 theTime
bool isOnlyWhitelisted
bool saleState
setOnlyWhitelisted 0x3c952764
bool _state
setSaleStarted 0xa854ffba
bool _state
setVerificationHash 0x66e7ca18
bytes32 hash
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x2e1a7d4d
uint256 amount

Recent Transactions

This address has 1 on-chain transactions, but only 0.7% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →