Forkchoice Ethereum Mainnet

Address Contract Partially Verified

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

Contract Bytecode

21295 bytes
0x60806040526004361061023b5760003560e01c80636352211e1161012e57806398d5fdca116100ab578063c87b56dd1161006f578063c87b56dd1461082b578063cc47a40b14610868578063d47abe7914610891578063e985e9c5146108ba578063f2fde38b146108f75761023b565b806398d5fdca1461075c5780639b642de114610787578063a22cb465146107b0578063b31d61b0146107d9578063b88d4fde146108025761023b565b80638da5cb5b116100f25780638da5cb5b146106895780638e86874c146106b45780638f5ba1e8146106dd57806391b7f5ed1461070857806395d89b41146107315761023b565b80636352211e146105d757806370a0823114610614578063715018a6146106515780638456cb5914610668578063853828b61461067f5761023b565b806338eada1c116101bc578063438b630011610180578063438b6300146104de5780634ba79dfe1461051b5780634e16fc8b146105445780634f6ccce71461056f5780635c975abb146105ac5761023b565b806338eada1c1461040f5780633af32abf146104385780633f4ba83a1461047557806342842e0e1461048c57806342966c68146104b55761023b565b806318160ddd1161020357806318160ddd14610339578063226c264d1461036457806323b872dd146103805780632f745c59146103a9578063361fab25146103e65761023b565b806301ffc9a71461024057806306f2057a1461027d57806306fdde03146102a8578063081812fc146102d3578063095ea7b314610310575b600080fd5b34801561024c57600080fd5b5061026760048036038101906102629190613d4b565b610920565b6040516102749190614a53565b60405180910390f35b34801561028957600080fd5b50610292610932565b60405161029f9190614a53565b60405180910390f35b3480156102b457600080fd5b506102bd610949565b6040516102ca9190614a6e565b60405180910390f35b3480156102df57600080fd5b506102fa60048036038101906102f59190613dde565b6109db565b60405161030791906149ca565b60405180910390f35b34801561031c57600080fd5b5061033760048036038101906103329190613ca5565b610a60565b005b34801561034557600080fd5b5061034e610b78565b60405161035b9190614df0565b60405180910390f35b61037e60048036038101906103799190613dde565b610b85565b005b34801561038c57600080fd5b506103a760048036038101906103a29190613b9f565b610d72565b005b3480156103b557600080fd5b506103d060048036038101906103cb9190613ca5565b610dd2565b6040516103dd9190614df0565b60405180910390f35b3480156103f257600080fd5b5061040d60048036038101906104089190613dde565b610e77565b005b34801561041b57600080fd5b5061043660048036038101906104319190613b3a565b610efd565b005b34801561044457600080fd5b5061045f600480360381019061045a9190613b3a565b61102c565b60405161046c9190614a53565b60405180910390f35b34801561048157600080fd5b5061048a611082565b005b34801561049857600080fd5b506104b360048036038101906104ae9190613b9f565b611108565b005b3480156104c157600080fd5b506104dc60048036038101906104d79190613dde565b611128565b005b3480156104ea57600080fd5b5061050560048036038101906105009190613b3a565b611184565b6040516105129190614a31565b60405180910390f35b34801561052757600080fd5b50610542600480360381019061053d9190613b3a565b61127e565b005b34801561055057600080fd5b506105596113ac565b6040516105669190614a6e565b60405180910390f35b34801561057b57600080fd5b5061059660048036038101906105919190613dde565b61143e565b6040516105a39190614df0565b60405180910390f35b3480156105b857600080fd5b506105c16114d5565b6040516105ce9190614a53565b60405180910390f35b3480156105e357600080fd5b506105fe60048036038101906105f99190613dde565b6114ec565b60405161060b91906149ca565b60405180910390f35b34801561062057600080fd5b5061063b60048036038101906106369190613b3a565b61159e565b6040516106489190614df0565b60405180910390f35b34801561065d57600080fd5b50610666611656565b005b34801561067457600080fd5b5061067d6116de565b005b610687611764565b005b34801561069557600080fd5b5061069e611854565b6040516106ab91906149ca565b60405180910390f35b3480156106c057600080fd5b506106db60048036038101906106d69190613d22565b61187e565b005b3480156106e957600080fd5b506106f2611917565b6040516106ff9190614df0565b60405180910390f35b34801561071457600080fd5b5061072f600480360381019061072a9190613dde565b611921565b005b34801561073d57600080fd5b506107466119a7565b6040516107539190614a6e565b60405180910390f35b34801561076857600080fd5b50610771611a39565b60405161077e9190614df0565b60405180910390f35b34801561079357600080fd5b506107ae60048036038101906107a99190613d9d565b611a43565b005b3480156107bc57600080fd5b506107d760048036038101906107d29190613c69565b611ad9565b005b3480156107e557600080fd5b5061080060048036038101906107fb9190613ce1565b611c5a565b005b34801561080e57600080fd5b5061082960048036038101906108249190613bee565b611d91565b005b34801561083757600080fd5b50610852600480360381019061084d9190613dde565b611df3565b60405161085f9190614a6e565b60405180910390f35b34801561087457600080fd5b5061088f600480360381019061088a9190613ca5565b611e05565b005b34801561089d57600080fd5b506108b860048036038101906108b39190613e07565b611f63565b005b3480156108c657600080fd5b506108e160048036038101906108dc9190613b63565b611fed565b6040516108ee9190614a53565b60405180910390f35b34801561090357600080fd5b5061091e60048036038101906109199190613b3a565b612081565b005b600061092b82612179565b9050919050565b6000601260009054906101000a900460ff16905090565b60606000805461095890615124565b80601f016020809104026020016040519081016040528092919081815260200182805461098490615124565b80156109d15780601f106109a6576101008083540402835291602001916109d1565b820191906000526020600020905b8154815290600101906020018083116109b457829003601f168201915b5050505050905090565b60006109e6826121f3565b610a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1c90614c90565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610a6b826114ec565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad390614d30565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610afb61225f565b73ffffffffffffffffffffffffffffffffffffffff161480610b2a5750610b2981610b2461225f565b611fed565b5b610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090614bd0565b60405180910390fd5b610b738383612267565b505050565b6000600880549050905090565b6000610b8f610b78565b9050600f54821115610bd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcd90614d10565b60405180910390fd5b600e546115b3610be6919061503a565b8282610bf29190614f59565b10610c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2990614d70565b60405180910390fd5b81600c54610c409190614fe0565b341015610c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7990614d50565b60405180910390fd5b60011515601260009054906101000a900460ff1615151415610ce757610ca73361102c565b610ce6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdd90614a90565b60405180910390fd5b5b60005b82811015610d6d5760006010610d0a8385610d059190614f59565b612320565b6011604051602001610d1e93929190614999565b6040516020818303038152906040529050610d44338385610d3f9190614f59565b6124cd565b610d598284610d539190614f59565b826124eb565b508080610d6590615156565b915050610cea565b505050565b610d83610d7d61225f565b8261255f565b610dc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db990614d90565b60405180910390fd5b610dcd83838361263d565b505050565b6000610ddd8361159e565b8210610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1590614ad0565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610e7f61225f565b73ffffffffffffffffffffffffffffffffffffffff16610e9d611854565b73ffffffffffffffffffffffffffffffffffffffff1614610ef3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eea90614cb0565b60405180910390fd5b80600f8190555050565b610f0561225f565b73ffffffffffffffffffffffffffffffffffffffff16610f23611854565b73ffffffffffffffffffffffffffffffffffffffff1614610f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7090614cb0565b60405180910390fd5b601360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610fd057611029565b6001601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b50565b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b61108a61225f565b73ffffffffffffffffffffffffffffffffffffffff166110a8611854565b73ffffffffffffffffffffffffffffffffffffffff16146110fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f590614cb0565b60405180910390fd5b611106612899565b565b61112383838360405180602001604052806000815250611d91565b505050565b61113961113361225f565b8261255f565b611178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116f90614dd0565b60405180910390fd5b6111818161293b565b50565b606060006111918361159e565b905060008167ffffffffffffffff8111156111d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156112035781602001602082028036833780820191505090505b50905060005b828110156112735761121b8582610dd2565b828281518110611254577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001018181525050808061126b90615156565b915050611209565b508092505050919050565b61128661225f565b73ffffffffffffffffffffffffffffffffffffffff166112a4611854565b73ffffffffffffffffffffffffffffffffffffffff16146112fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f190614cb0565b60405180910390fd5b601360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611350576113a9565b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b50565b6060601080546113bb90615124565b80601f01602080910402602001604051908101604052809291908181526020018280546113e790615124565b80156114345780601f1061140957610100808354040283529160200191611434565b820191906000526020600020905b81548152906001019060200180831161141757829003601f168201915b5050505050905090565b6000611448610b78565b8210611489576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148090614db0565b60405180910390fd5b600882815481106114c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001549050919050565b6000600b60149054906101000a900460ff16905090565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611595576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158c90614c10565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561160f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160690614bf0565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61165e61225f565b73ffffffffffffffffffffffffffffffffffffffff1661167c611854565b73ffffffffffffffffffffffffffffffffffffffff16146116d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c990614cb0565b60405180910390fd5b6116dc6000612947565b565b6116e661225f565b73ffffffffffffffffffffffffffffffffffffffff16611704611854565b73ffffffffffffffffffffffffffffffffffffffff161461175a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175190614cb0565b60405180910390fd5b611762612a0d565b565b61176c61225f565b73ffffffffffffffffffffffffffffffffffffffff1661178a611854565b73ffffffffffffffffffffffffffffffffffffffff16146117e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d790614cb0565b60405180910390fd5b60006001476117ef9190614faf565b9050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061185157600080fd5b50565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61188661225f565b73ffffffffffffffffffffffffffffffffffffffff166118a4611854565b73ffffffffffffffffffffffffffffffffffffffff16146118fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f190614cb0565b60405180910390fd5b80601260006101000a81548160ff02191690831515021790555050565b6000600f54905090565b61192961225f565b73ffffffffffffffffffffffffffffffffffffffff16611947611854565b73ffffffffffffffffffffffffffffffffffffffff161461199d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161199490614cb0565b60405180910390fd5b80600c8190555050565b6060600180546119b690615124565b80601f01602080910402602001604051908101604052809291908181526020018280546119e290615124565b8015611a2f5780601f10611a0457610100808354040283529160200191611a2f565b820191906000526020600020905b815481529060010190602001808311611a1257829003601f168201915b5050505050905090565b6000600c54905090565b611a4b61225f565b73ffffffffffffffffffffffffffffffffffffffff16611a69611854565b73ffffffffffffffffffffffffffffffffffffffff1614611abf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab690614cb0565b60405180910390fd5b8060109080519060200190611ad5929190613888565b5050565b611ae161225f565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4690614b70565b60405180910390fd5b8060056000611b5c61225f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611c0961225f565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611c4e9190614a53565b60405180910390a35050565b611c6261225f565b73ffffffffffffffffffffffffffffffffffffffff16611c80611854565b73ffffffffffffffffffffffffffffffffffffffff1614611cd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ccd90614cb0565b60405180910390fd5b60005b8151811015611d8d57600160136000848481518110611d21577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611d8590615156565b915050611cd9565b5050565b611da2611d9c61225f565b8361255f565b611de1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd890614d90565b60405180910390fd5b611ded84848484612ab0565b50505050565b6060611dfe82612b0c565b9050919050565b611e0d61225f565b73ffffffffffffffffffffffffffffffffffffffff16611e2b611854565b73ffffffffffffffffffffffffffffffffffffffff1614611e81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7890614cb0565b60405180910390fd5b6000611e8b610b78565b9050600060c8905080831115611ed6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ecd90614d10565b60405180910390fd5b60005b83811015611f5c5760006010611ef98386611ef49190614f59565b612320565b6011604051602001611f0d93929190614999565b6040516020818303038152906040529050611f33868386611f2e9190614f59565b6124cd565b611f488285611f429190614f59565b826124eb565b508080611f5490615156565b915050611ed9565b5050505050565b611f6b61225f565b73ffffffffffffffffffffffffffffffffffffffff16611f89611854565b73ffffffffffffffffffffffffffffffffffffffff1614611fdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd690614cb0565b60405180910390fd5b611fe982826124eb565b5050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61208961225f565b73ffffffffffffffffffffffffffffffffffffffff166120a7611854565b73ffffffffffffffffffffffffffffffffffffffff16146120fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f490614cb0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561216d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216490614b10565b60405180910390fd5b61217681612947565b50565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806121ec57506121eb82612c5e565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166122da836114ec565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60606000821415612368576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506124c8565b600082905060005b6000821461239a57808061238390615156565b915050600a826123939190614faf565b9150612370565b60008167ffffffffffffffff8111156123dc577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561240e5781602001600182028036833780820191505090505b5090505b600085146124c157600182612427919061503a565b9150600a85612436919061519f565b60306124429190614f59565b60f81b81838151811061247e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856124ba9190614faf565b9450612412565b8093505050505b919050565b6124e7828260405180602001604052806000815250612d40565b5050565b6124f4826121f3565b612533576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252a90614c30565b60405180910390fd5b80600a6000848152602001908152602001600020908051906020019061255a929190613888565b505050565b600061256a826121f3565b6125a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a090614b90565b60405180910390fd5b60006125b4836114ec565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061262357508373ffffffffffffffffffffffffffffffffffffffff1661260b846109db565b73ffffffffffffffffffffffffffffffffffffffff16145b8061263457506126338185611fed565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661265d826114ec565b73ffffffffffffffffffffffffffffffffffffffff16146126b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126aa90614cd0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271a90614b50565b60405180910390fd5b61272e838383612d9b565b612739600082612267565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612789919061503a565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546127e09190614f59565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6128a16114d5565b6128e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128d790614ab0565b60405180910390fd5b6000600b60146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61292461225f565b60405161293191906149ca565b60405180910390a1565b61294481612df3565b50565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612a156114d5565b15612a55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4c90614bb0565b60405180910390fd5b6001600b60146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a9961225f565b604051612aa691906149ca565b60405180910390a1565b612abb84848461263d565b612ac784848484612e46565b612b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612afd90614af0565b60405180910390fd5b50505050565b6060612b17826121f3565b612b56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b4d90614c70565b60405180910390fd5b6000600a60008481526020019081526020016000208054612b7690615124565b80601f0160208091040260200160405190810160405280929190818152602001828054612ba290615124565b8015612bef5780601f10612bc457610100808354040283529160200191612bef565b820191906000526020600020905b815481529060010190602001808311612bd257829003601f168201915b505050505090506000612c00612fdd565b9050600081511415612c16578192505050612c59565b600082511115612c4b578082604051602001612c33929190614975565b60405160208183030381529060405292505050612c59565b612c5484612ff4565b925050505b919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612d2957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612d395750612d388261309b565b5b9050919050565b612d4a8383613105565b612d576000848484612e46565b612d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8d90614af0565b60405180910390fd5b505050565b612da36114d5565b15612de3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dda90614bb0565b60405180910390fd5b612dee8383836132d3565b505050565b612dfc816133e7565b6000600a60008381526020019081526020016000208054612e1c90615124565b905014612e4357600a60008281526020019081526020016000206000612e42919061390e565b5b50565b6000612e678473ffffffffffffffffffffffffffffffffffffffff166134f8565b15612fd0578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612e9061225f565b8786866040518563ffffffff1660e01b8152600401612eb294939291906149e5565b602060405180830381600087803b158015612ecc57600080fd5b505af1925050508015612efd57506040513d601f19601f82011682018060405250810190612efa9190613d74565b60015b612f80573d8060008114612f2d576040519150601f19603f3d011682016040523d82523d6000602084013e612f32565b606091505b50600081511415612f78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f6f90614af0565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612fd5565b600190505b949350505050565b606060405180602001604052806000815250905090565b6060612fff826121f3565b61303e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161303590614cf0565b60405180910390fd5b6000613048612fdd565b905060008151116130685760405180602001604052806000815250613093565b8061307284612320565b604051602001613083929190614975565b6040516020818303038152906040525b915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161316c90614c50565b60405180910390fd5b61317e816121f3565b156131be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131b590614b30565b60405180910390fd5b6131ca60008383612d9b565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461321a9190614f59565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6132de83838361350b565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156133215761331c81613510565b613360565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461335f5761335e8382613559565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156133a35761339e816136c6565b6133e2565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146133e1576133e08282613809565b5b5b505050565b60006133f2826114ec565b905061340081600084612d9b565b61340b600083612267565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461345b919061503a565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016135668461159e565b613570919061503a565b9050600060076000848152602001908152602001600020549050818114613655576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506136da919061503a565b9050600060096000848152602001908152602001600020549050600060088381548110613730577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015490508060088381548110613778577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806137ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006138148361159e565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b82805461389490615124565b90600052602060002090601f0160209004810192826138b657600085556138fd565b82601f106138cf57805160ff19168380011785556138fd565b828001600101855582156138fd579182015b828111156138fc5782518255916020019190600101906138e1565b5b50905061390a919061394e565b5090565b50805461391a90615124565b6000825580601f1061392c575061394b565b601f01602090049060005260206000209081019061394a919061394e565b5b50565b5b8082111561396757600081600090555060010161394f565b5090565b600061397e61397984614e3c565b614e0b565b9050808382526020820190508285602086028201111561399d57600080fd5b60005b858110156139cd57816139b38882613a53565b8452602084019350602083019250506001810190506139a0565b5050509392505050565b60006139ea6139e584614e68565b614e0b565b905082815260208101848484011115613a0257600080fd5b613a0d8482856150e2565b509392505050565b6000613a28613a2384614e98565b614e0b565b905082815260208101848484011115613a4057600080fd5b613a4b8482856150e2565b509392505050565b600081359050613a628161529d565b92915050565b600082601f830112613a7957600080fd5b8135613a8984826020860161396b565b91505092915050565b600081359050613aa1816152b4565b92915050565b600081359050613ab6816152cb565b92915050565b600081519050613acb816152cb565b92915050565b600082601f830112613ae257600080fd5b8135613af28482602086016139d7565b91505092915050565b600082601f830112613b0c57600080fd5b8135613b1c848260208601613a15565b91505092915050565b600081359050613b34816152e2565b92915050565b600060208284031215613b4c57600080fd5b6000613b5a84828501613a53565b91505092915050565b60008060408385031215613b7657600080fd5b6000613b8485828601613a53565b9250506020613b9585828601613a53565b9150509250929050565b600080600060608486031215613bb457600080fd5b6000613bc286828701613a53565b9350506020613bd386828701613a53565b9250506040613be486828701613b25565b9150509250925092565b60008060008060808587031215613c0457600080fd5b6000613c1287828801613a53565b9450506020613c2387828801613a53565b9350506040613c3487828801613b25565b925050606085013567ffffffffffffffff811115613c5157600080fd5b613c5d87828801613ad1565b91505092959194509250565b60008060408385031215613c7c57600080fd5b6000613c8a85828601613a53565b9250506020613c9b85828601613a92565b9150509250929050565b60008060408385031215613cb857600080fd5b6000613cc685828601613a53565b9250506020613cd785828601613b25565b9150509250929050565b600060208284031215613cf357600080fd5b600082013567ffffffffffffffff811115613d0d57600080fd5b613d1984828501613a68565b91505092915050565b600060208284031215613d3457600080fd5b6000613d4284828501613a92565b91505092915050565b600060208284031215613d5d57600080fd5b6000613d6b84828501613aa7565b91505092915050565b600060208284031215613d8657600080fd5b6000613d9484828501613abc565b91505092915050565b600060208284031215613daf57600080fd5b600082013567ffffffffffffffff811115613dc957600080fd5b613dd584828501613afb565b91505092915050565b600060208284031215613df057600080fd5b6000613dfe84828501613b25565b91505092915050565b60008060408385031215613e1a57600080fd5b6000613e2885828601613b25565b925050602083013567ffffffffffffffff811115613e4557600080fd5b613e5185828601613afb565b9150509250929050565b6000613e678383614957565b60208301905092915050565b613e7c8161506e565b82525050565b6000613e8d82614eed565b613e978185614f1b565b9350613ea283614ec8565b8060005b83811015613ed3578151613eba8882613e5b565b9750613ec583614f0e565b925050600181019050613ea6565b5085935050505092915050565b613ee981615080565b82525050565b6000613efa82614ef8565b613f048185614f2c565b9350613f148185602086016150f1565b613f1d8161528c565b840191505092915050565b6000613f3382614f03565b613f3d8185614f3d565b9350613f4d8185602086016150f1565b613f568161528c565b840191505092915050565b6000613f6c82614f03565b613f768185614f4e565b9350613f868185602086016150f1565b80840191505092915050565b60008154613f9f81615124565b613fa98186614f4e565b94506001821660008114613fc45760018114613fd557614008565b60ff19831686528186019350614008565b613fde85614ed8565b60005b8381101561400057815481890152600182019150602081019050613fe1565b838801955050505b50505092915050565b600061401e601083614f3d565b91507f4e6f74206f6e2077686974656c697374000000000000000000000000000000006000830152602082019050919050565b600061405e601483614f3d565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b600061409e602b83614f3d565b91507f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008301527f74206f6620626f756e64730000000000000000000000000000000000000000006020830152604082019050919050565b6000614104603283614f3d565b91507f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008301527f63656976657220696d706c656d656e74657200000000000000000000000000006020830152604082019050919050565b600061416a602683614f3d565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006141d0601c83614f3d565b91507f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006000830152602082019050919050565b6000614210602483614f3d565b91507f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614276601983614f3d565b91507f4552433732313a20617070726f766520746f2063616c6c6572000000000000006000830152602082019050919050565b60006142b6602c83614f3d565b91507f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b600061431c601083614f3d565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b600061435c603883614f3d565b91507f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008301527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006020830152604082019050919050565b60006143c2602a83614f3d565b91507f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008301527f726f2061646472657373000000000000000000000000000000000000000000006020830152604082019050919050565b6000614428602983614f3d565b91507f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008301527f656e7420746f6b656e00000000000000000000000000000000000000000000006020830152604082019050919050565b600061448e602e83614f3d565b91507f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60008301527f6578697374656e7420746f6b656e0000000000000000000000000000000000006020830152604082019050919050565b60006144f4602083614f3d565b91507f4552433732313a206d696e7420746f20746865207a65726f20616464726573736000830152602082019050919050565b6000614534603183614f3d565b91507f45524337323155524953746f726167653a2055524920717565727920666f722060008301527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006020830152604082019050919050565b600061459a602c83614f3d565b91507f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b6000614600602083614f3d565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000614640602983614f3d565b91507f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008301527f73206e6f74206f776e00000000000000000000000000000000000000000000006020830152604082019050919050565b60006146a6602f83614f3d565b91507f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008301527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006020830152604082019050919050565b600061470c601e83614f3d565b91507f596f752068617665206578636565646564206d6178696d756d206d696e7400006000830152602082019050919050565b600061474c602183614f3d565b91507f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006147b2601983614f3d565b91507f45746865722073656e74206973206e6f7420636f7272656374000000000000006000830152602082019050919050565b60006147f2601783614f3d565b91507f45786365656473206d6178696d756d2020737570706c790000000000000000006000830152602082019050919050565b6000614832603183614f3d565b91507f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008301527f776e6572206e6f7220617070726f7665640000000000000000000000000000006020830152604082019050919050565b6000614898602c83614f3d565b91507f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008301527f7574206f6620626f756e647300000000000000000000000000000000000000006020830152604082019050919050565b60006148fe603083614f3d565b91507f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008301527f6e6572206e6f7220617070726f766564000000000000000000000000000000006020830152604082019050919050565b614960816150d8565b82525050565b61496f816150d8565b82525050565b60006149818285613f61565b915061498d8284613f61565b91508190509392505050565b60006149a58286613f92565b91506149b18285613f61565b91506149bd8284613f92565b9150819050949350505050565b60006020820190506149df6000830184613e73565b92915050565b60006080820190506149fa6000830187613e73565b614a076020830186613e73565b614a146040830185614966565b8181036060830152614a268184613eef565b905095945050505050565b60006020820190508181036000830152614a4b8184613e82565b905092915050565b6000602082019050614a686000830184613ee0565b92915050565b60006020820190508181036000830152614a888184613f28565b905092915050565b60006020820190508181036000830152614aa981614011565b9050919050565b60006020820190508181036000830152614ac981614051565b9050919050565b60006020820190508181036000830152614ae981614091565b9050919050565b60006020820190508181036000830152614b09816140f7565b9050919050565b60006020820190508181036000830152614b298161415d565b9050919050565b60006020820190508181036000830152614b49816141c3565b9050919050565b60006020820190508181036000830152614b6981614203565b9050919050565b60006020820190508181036000830152614b8981614269565b9050919050565b60006020820190508181036000830152614ba9816142a9565b9050919050565b60006020820190508181036000830152614bc98161430f565b9050919050565b60006020820190508181036000830152614be98161434f565b9050919050565b60006020820190508181036000830152614c09816143b5565b9050919050565b60006020820190508181036000830152614c298161441b565b9050919050565b60006020820190508181036000830152614c4981614481565b9050919050565b60006020820190508181036000830152614c69816144e7565b9050919050565b60006020820190508181036000830152614c8981614527565b9050919050565b60006020820190508181036000830152614ca98161458d565b9050919050565b60006020820190508181036000830152614cc9816145f3565b9050919050565b60006020820190508181036000830152614ce981614633565b9050919050565b60006020820190508181036000830152614d0981614699565b9050919050565b60006020820190508181036000830152614d29816146ff565b9050919050565b60006020820190508181036000830152614d498161473f565b9050919050565b60006020820190508181036000830152614d69816147a5565b9050919050565b60006020820190508181036000830152614d89816147e5565b9050919050565b60006020820190508181036000830152614da981614825565b9050919050565b60006020820190508181036000830152614dc98161488b565b9050919050565b60006020820190508181036000830152614de9816148f1565b9050919050565b6000602082019050614e056000830184614966565b92915050565b6000604051905081810181811067ffffffffffffffff82111715614e3257614e3161525d565b5b8060405250919050565b600067ffffffffffffffff821115614e5757614e5661525d565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614e8357614e8261525d565b5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115614eb357614eb261525d565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614f64826150d8565b9150614f6f836150d8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614fa457614fa36151d0565b5b828201905092915050565b6000614fba826150d8565b9150614fc5836150d8565b925082614fd557614fd46151ff565b5b828204905092915050565b6000614feb826150d8565b9150614ff6836150d8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561502f5761502e6151d0565b5b828202905092915050565b6000615045826150d8565b9150615050836150d8565b925082821015615063576150626151d0565b5b828203905092915050565b6000615079826150b8565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b8381101561510f5780820151818401526020810190506150f4565b8381111561511e576000848401525b50505050565b6000600282049050600182168061513c57607f821691505b602082108114156151505761514f61522e565b5b50919050565b6000615161826150d8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615194576151936151d0565b5b600182019050919050565b60006151aa826150d8565b91506151b5836150d8565b9250826151c5576151c46151ff565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6152a68161506e565b81146152b157600080fd5b50565b6152bd81615080565b81146152c857600080fd5b50565b6152d48161508c565b81146152df57600080fd5b50565b6152eb816150d8565b81146152f657600080fd5b5056fea2646970667358221220b80d1d08af6e5f98c401f3081fd3b6ac0da8c5e87ac4c1bc1735547407fc783564736f6c63430008000033

Verified Source Code Partial Match

Compiler: v0.8.0+commit.c7dfd78e EVM: istanbul Optimization: No
Sst.sol 1433 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @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
    ) external;

    /**
     * @dev Transfers `tokenId` token 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;

    /**
     * @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;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

    /**
     * @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 calldata data
    ) external;
}

interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

interface IERC721Metadata is IERC721 {
    /**
     * @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);
}

library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @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, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @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 (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

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

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}


abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

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

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

contract Sst is ERC721,ERC721Enumerable,ERC721URIStorage, Ownable, Pausable, ERC721Burnable {
    using Address for address;
    uint256 private _price = 0.075 ether;
    address a1 = 0x4d6a6E6cF080Fb3E7f611aC22B601D8EdfcF1bCB;
                 

    uint256 private _reserved = 100;
    uint256 private _supplylimit = 10;
    string private _base_url = 'https://koingames.s3.amazonaws.com/UBIW1OT08AE/NFT_META/';
    string private _ext = '.json';
    bool private _change = false;
     
    mapping (address => bool) private whitelist;
      
      
    

    constructor() ERC721("Video Game Dev Squad", "VGDS") {}
  

   
    function isWhitelisted(address _address) public view returns (bool) {
        return whitelist[_address];
    }
    
    
    function switchWhiteListOn(bool change) public onlyOwner
    {
        _change = change;
    }
    
    
     function addAddress(address _address) public onlyOwner
    {
        if (whitelist[_address]) 
            return;

        whitelist[_address] = true;
       
    }
    
    
     function whitelistAddress (address[] memory users) public onlyOwner {
        for (uint i = 0; i < users.length; i++) {
            whitelist[users[i]] = true;
        }
    }


    function setPrice(uint256 _newPrice) public onlyOwner() {
        _price = _newPrice;
    }
    
    function setSupplyLimit(uint256 _newLimit) public onlyOwner() {
        _supplylimit = _newLimit;
    }
    
     function setUri(string memory _newUri) public onlyOwner() {
        _base_url = _newUri;
    }
    
      function setMUri(uint256 _id,string memory _newUri) public onlyOwner() {
       
        
        _setTokenURI(_id, _newUri);
    }
    
       function makeNFT(uint256 num) public payable  {
         
       uint256 supply = totalSupply();
        
        require( num <= _supplylimit, "You have exceeded maximum mint" );
        require( supply + num < 5555 - _reserved,  "Exceeds maximum  supply" );
        require( msg.value >= _price * num,  "Ether sent is not correct" );
        if(_change == true)
        {
        require(isWhitelisted(msg.sender), "Not on whitelist");
        }

        for(uint256 i; i < num; i++){
           
        string memory base = string(abi.encodePacked(_base_url, Strings.toString(supply  + i),_ext));
    
        _safeMint( msg.sender, supply + i );
        _setTokenURI(supply + i, base);
           
      }
    }
 
      function pause() public onlyOwner {
        _pause();
      }

    function unpause() public onlyOwner {
        _unpause();
      }
 
     function getPrice() public view returns (uint256){
        return _price;
     }
    
    function getSupplyLimit() public view returns (uint256){
        return _supplylimit;
    }
    
     function getUri() public view returns (string memory){
        return _base_url;
    }
    
    function checkWhitelist() public view returns (bool){
        return _change;
    }
    
    
    
    function withdrawAll() public payable onlyOwner {
        uint256 _each = address(this).balance / 1;
        require(payable(a1).send(_each));
         
       
    }
    
    
    function _beforeTokenTransfer(address from, address to, uint256 tokenId)
        internal
        whenNotPaused
        override(ERC721, ERC721Enumerable)
    {
        super._beforeTokenTransfer(from, to, tokenId);
    }
    
    function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }
    
    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721, ERC721URIStorage)
        returns (string memory)
    {
        return super.tokenURI(tokenId);
    }
    
    function removeAddress(address _address) public onlyOwner {
        if (!whitelist[_address]) 
            return;

        whitelist[_address] = false;
    }

function walletOfOwner(address _owner) external view returns (uint256[] memory) {
        uint256 tokenCount = balanceOf(_owner);

        uint256[] memory tokensId = new uint256[](tokenCount);
        for (uint256 i = 0; i < tokenCount; i++) {
            tokensId[i] = tokenOfOwnerByIndex(_owner, i);
        }

        return tokensId;
    }
    
    
     function reserve(address _to, uint256 num) external onlyOwner() {
        uint256 supply = totalSupply();
        uint256 _lim = 200;
        require( num <= _lim, "You have exceeded maximum mint" );
       
        for(uint256 i; i < num; i++){
           
        string memory base = string(abi.encodePacked(_base_url, Strings.toString(supply  + i),_ext));
    
         _safeMint( _to, supply + i );
         _setTokenURI(supply + i, base);
      
       }
      
      }
    
   
    
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

Read Contract

balanceOf 0x70a08231 → uint256
checkWhitelist 0x06f2057a → bool
getApproved 0x081812fc → address
getPrice 0x98d5fdca → uint256
getSupplyLimit 0x8f5ba1e8 → uint256
getUri 0x4e16fc8b → string
isApprovedForAll 0xe985e9c5 → bool
isWhitelisted 0x3af32abf → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]

Write Contract 21 functions

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

addAddress 0x38eada1c
address _address
approve 0x095ea7b3
address to
uint256 tokenId
burn 0x42966c68
uint256 tokenId
makeNFT 0x226c264d
uint256 num
pause 0x8456cb59
No parameters
removeAddress 0x4ba79dfe
address _address
renounceOwnership 0x715018a6
No parameters
reserve 0xcc47a40b
address _to
uint256 num
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setMUri 0xd47abe79
uint256 _id
string _newUri
setPrice 0x91b7f5ed
uint256 _newPrice
setSupplyLimit 0x361fab25
uint256 _newLimit
setUri 0x9b642de1
string _newUri
switchWhiteListOn 0x8e86874c
bool change
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
whitelistAddress 0xb31d61b0
address[] users
withdrawAll 0x853828b6
No parameters

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 →