Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x656a6D3081692a7dA5d8cFF1F8951bD078EC82D5
Balance 0 ETH
Nonce 1
Code Size 19218 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

19218 bytes
0x60806040526004361061021a5760003560e01c80636f8b44b0116101235780639e34070f116100ab578063d4938db31161006f578063d4938db3146107d4578063d5abeb01146107ff578063d897833e1461082a578063e985e9c514610853578063f2fde38b146108905761021a565b80639e34070f146106ec578063a0712d6814610729578063a22cb46514610745578063b88d4fde1461076e578063c87b56dd146107975761021a565b80637c3d3e01116100f25780637c3d3e01146106055780638462151c146106305780638da5cb5b1461066d57806395d89b411461069857806396ea3a47146106c35761021a565b80636f8b44b01461055d57806370a0823114610586578063715018a6146105c35780637501f741146105da5761021a565b80632f745c59116101a657806344a0d68a1161017557806344a0d68a146104665780634f6ccce71461048f57806355f804b3146104cc5780636352211e146104f55780636c0360eb146105325761021a565b80632f745c59146103c05780633b67cf1a146103fd5780633ccfd60b1461042657806342842e0e1461043d5761021a565b8063095ea7b3116101ed578063095ea7b3146102ed57806313faede61461031657806318160ddd14610341578063200d2ed21461036c57806323b872dd146103975761021a565b806301ffc9a71461021f57806306fdde031461025c578063081812fc14610287578063088a4ed0146102c4575b600080fd5b34801561022b57600080fd5b5061024660048036038101906102419190612e9c565b6108b9565b6040516102539190612ee4565b60405180910390f35b34801561026857600080fd5b50610271610933565b60405161027e9190612f98565b60405180910390f35b34801561029357600080fd5b506102ae60048036038101906102a99190612ff0565b6109c5565b6040516102bb919061305e565b60405180910390f35b3480156102d057600080fd5b506102eb60048036038101906102e69190612ff0565b610a4a565b005b3480156102f957600080fd5b50610314600480360381019061030f91906130a5565b610ad0565b005b34801561032257600080fd5b5061032b610be8565b60405161033891906130f4565b60405180910390f35b34801561034d57600080fd5b50610356610bee565b60405161036391906130f4565b60405180910390f35b34801561037857600080fd5b50610381610bfb565b60405161038e9190612ee4565b60405180910390f35b3480156103a357600080fd5b506103be60048036038101906103b9919061310f565b610c0e565b005b3480156103cc57600080fd5b506103e760048036038101906103e291906130a5565b610c6e565b6040516103f491906130f4565b60405180910390f35b34801561040957600080fd5b50610424600480360381019061041f91906132aa565b610db7565b005b34801561043257600080fd5b5061043b611125565b005b34801561044957600080fd5b50610464600480360381019061045f919061310f565b6111f0565b005b34801561047257600080fd5b5061048d60048036038101906104889190612ff0565b611210565b005b34801561049b57600080fd5b506104b660048036038101906104b19190612ff0565b611296565b6040516104c391906130f4565b60405180910390f35b3480156104d857600080fd5b506104f360048036038101906104ee91906133a8565b6112e9565b005b34801561050157600080fd5b5061051c60048036038101906105179190612ff0565b61137f565b604051610529919061305e565b60405180910390f35b34801561053e57600080fd5b5061054761143c565b6040516105549190612f98565b60405180910390f35b34801561056957600080fd5b50610584600480360381019061057f9190612ff0565b6114ca565b005b34801561059257600080fd5b506105ad60048036038101906105a891906133f1565b611550565b6040516105ba91906130f4565b60405180910390f35b3480156105cf57600080fd5b506105d8611676565b005b3480156105e657600080fd5b506105ef6116fe565b6040516105fc91906130f4565b60405180910390f35b34801561061157600080fd5b5061061a611704565b60405161062791906130f4565b60405180910390f35b34801561063c57600080fd5b50610657600480360381019061065291906133f1565b61170a565b60405161066491906134dc565b60405180910390f35b34801561067957600080fd5b50610682611803565b60405161068f919061305e565b60405180910390f35b3480156106a457600080fd5b506106ad61182d565b6040516106ba9190612f98565b60405180910390f35b3480156106cf57600080fd5b506106ea60048036038101906106e591906135af565b6118bf565b005b3480156106f857600080fd5b50610713600480360381019061070e9190612ff0565b611ada565b6040516107209190612ee4565b60405180910390f35b610743600480360381019061073e9190612ff0565b611b04565b005b34801561075157600080fd5b5061076c6004803603810190610767919061365c565b611cf0565b005b34801561077a57600080fd5b506107956004803603810190610790919061373d565b611e71565b005b3480156107a357600080fd5b506107be60048036038101906107b99190612ff0565b611ed3565b6040516107cb9190612f98565b60405180910390f35b3480156107e057600080fd5b506107e9611f7a565b6040516107f691906130f4565b60405180910390f35b34801561080b57600080fd5b50610814611f80565b60405161082191906130f4565b60405180910390f35b34801561083657600080fd5b50610851600480360381019061084c91906137c0565b611f86565b005b34801561085f57600080fd5b5061087a600480360381019061087591906137ed565b61201f565b6040516108879190612ee4565b60405180910390f35b34801561089c57600080fd5b506108b760048036038101906108b291906133f1565b6120b3565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061092c575061092b826121ab565b5b9050919050565b6060600080546109429061385c565b80601f016020809104026020016040519081016040528092919081815260200182805461096e9061385c565b80156109bb5780601f10610990576101008083540402835291602001916109bb565b820191906000526020600020905b81548152906001019060200180831161099e57829003601f168201915b5050505050905090565b60006109d08261228d565b610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0690613900565b60405180910390fd5b6003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610a52612315565b73ffffffffffffffffffffffffffffffffffffffff16610a70611803565b73ffffffffffffffffffffffffffffffffffffffff1614610ac6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abd9061396c565b60405180910390fd5b80600b8190555050565b6000610adb8261137f565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b43906139fe565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b6b612315565b73ffffffffffffffffffffffffffffffffffffffff161480610b9a5750610b9981610b94612315565b61201f565b5b610bd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bd090613a90565b60405180910390fd5b610be3838361231d565b505050565b60085481565b6000600280549050905090565b600d60009054906101000a900460ff1681565b610c1f610c19612315565b826123d6565b610c5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5590613b22565b60405180910390fd5b610c698383836124b4565b505050565b6000610c7983611550565b8210610cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb190613b8e565b60405180910390fd5b6000805b600280549050811015610d6d5760028181548110610cdf57610cde613bae565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610d5c5783821415610d4f578092505050610db1565b81610d5990613c0c565b91505b80610d6690613c0c565b9050610cbe565b506000610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da690613b8e565b60405180910390fd5b505b92915050565b600d60009054906101000a900460ff16610e06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfd90613cc7565b60405180910390fd5b6000600c548251610e179190613d16565b14610e57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4e90613db9565b60405180910390fd5b60005b8151811015611004576000600d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e848481518110610eb657610eb5613bae565b5b60200260200101516040518263ffffffff1660e01b8152600401610eda91906130f4565b6020604051808303816000875af1158015610ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1d9190613dee565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490613e8d565b60405180910390fd5b610fb0838381518110610fa357610fa2613bae565b5b6020026020010151611ada565b15610ff0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe790613f1f565b60405180910390fd5b508080610ffc90613c0c565b915050610e5a565b5060005b8151811015611121576110223361101d610bee565b61266d565b6001600e600084848151811061103b5761103a613bae565b5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600e60008460018561107c9190613f3f565b8151811061108d5761108c613bae565b5b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600e6000846002856110ce9190613f3f565b815181106110df576110de613bae565b5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550600c548161111a9190613f3f565b9050611008565b5050565b61112d612315565b73ffffffffffffffffffffffffffffffffffffffff1661114b611803565b73ffffffffffffffffffffffffffffffffffffffff16146111a1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111989061396c565b60405180910390fd5b60004790503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156111ec573d6000803e3d6000fd5b5050565b61120b83838360405180602001604052806000815250611e71565b505050565b611218612315565b73ffffffffffffffffffffffffffffffffffffffff16611236611803565b73ffffffffffffffffffffffffffffffffffffffff161461128c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112839061396c565b60405180910390fd5b8060088190555050565b60006112a0610bee565b82106112e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d890613fe1565b60405180910390fd5b819050919050565b6112f1612315565b73ffffffffffffffffffffffffffffffffffffffff1661130f611803565b73ffffffffffffffffffffffffffffffffffffffff1614611365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135c9061396c565b60405180910390fd5b806007908051906020019061137b929190612d8d565b5050565b6000806002838154811061139657611395613bae565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142a90614073565b60405180910390fd5b80915050919050565b600780546114499061385c565b80601f01602080910402602001604051908101604052809291908181526020018280546114759061385c565b80156114c25780601f10611497576101008083540402835291602001916114c2565b820191906000526020600020905b8154815290600101906020018083116114a557829003601f168201915b505050505081565b6114d2612315565b73ffffffffffffffffffffffffffffffffffffffff166114f0611803565b73ffffffffffffffffffffffffffffffffffffffff1614611546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153d9061396c565b60405180910390fd5b8060098190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156115c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b890614105565b60405180910390fd5b600080600280549050905060005b8181101561166757600281815481106115eb576115ea613bae565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611656578261165390613c0c565b92505b8061166090613c0c565b90506115cf565b50600090508192505050919050565b61167e612315565b73ffffffffffffffffffffffffffffffffffffffff1661169c611803565b73ffffffffffffffffffffffffffffffffffffffff16146116f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e99061396c565b60405180910390fd5b6116fc600061268b565b565b600b5481565b600c5481565b606061171582611550565b600010611757576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174e90613b8e565b60405180910390fd5b600061176283611550565b905060008167ffffffffffffffff8111156117805761177f613167565b5b6040519080825280602002602001820160405280156117ae5781602001602082028036833780820191505090505b50905060005b828110156117f8576117c68582610c6e565b8282815181106117d9576117d8613bae565b5b60200260200101818152505080806117f090613c0c565b9150506117b4565b508092505050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461183c9061385c565b80601f01602080910402602001604051908101604052809291908181526020018280546118689061385c565b80156118b55780601f1061188a576101008083540402835291602001916118b5565b820191906000526020600020905b81548152906001019060200180831161189857829003601f168201915b5050505050905090565b6118c7612315565b73ffffffffffffffffffffffffffffffffffffffff166118e5611803565b73ffffffffffffffffffffffffffffffffffffffff161461193b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119329061396c565b60405180910390fd5b818190508484905014611983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197a90614197565b60405180910390fd5b60008061198e610bee565b905060005b868690508110156119d6578686828181106119b1576119b0613bae565b5b90506020020135836119c39190613f3f565b9250806119cf90613c0c565b9050611993565b5060095482826119e69190613f3f565b1115611a27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1e90614203565b60405180910390fd5b6000915060005b84849050811015611acd5760005b878783818110611a4f57611a4e613bae565b5b90506020020135811015611abb57611aaa868684818110611a7357611a72613bae565b5b9050602002016020810190611a8891906133f1565b8480611a9390613c0c565b955060405180602001604052806000815250612751565b80611ab490613c0c565b9050611a3c565b5080611ac690613c0c565b9050611a2e565b5060009050505050505050565b6000600e600083815260200190815260200160002060009054906101000a900460ff169050919050565b60026006541415611b4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b419061426f565b60405180910390fd5b60026006819055506000611b5c610bee565b9050600d60009054906101000a900460ff16611bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba4906142db565b60405180910390fd5b60008211611bf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be790614347565b60405180910390fd5b600b54821115611c35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2c90614203565b60405180910390fd5b6009548282611c449190613f3f565b10611c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7b906143b3565b60405180910390fd5b81600854611c9291906143d3565b341015611c9e57600080fd5b60005b82811015611cdf57611cce338284611cb99190613f3f565b60405180602001604052806000815250612751565b80611cd890613c0c565b9050611ca1565b506000905050600160068190555050565b611cf8612315565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5d90614479565b60405180910390fd5b8060046000611d73612315565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611e20612315565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611e659190612ee4565b60405180910390a35050565b611e82611e7c612315565b836123d6565b611ec1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb890613b22565b60405180910390fd5b611ecd848484846127ac565b50505050565b6060611ede8261228d565b611f1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f149061450b565b60405180910390fd5b6000611f27612808565b90506000815111611f475760405180602001604052806000815250611f72565b80611f518461289a565b604051602001611f629291906145b3565b6040516020818303038152906040525b915050919050565b600a5481565b60095481565b611f8e612315565b73ffffffffffffffffffffffffffffffffffffffff16611fac611803565b73ffffffffffffffffffffffffffffffffffffffff1614612002576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff99061396c565b60405180910390fd5b80600d60006101000a81548160ff02191690831515021790555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6120bb612315565b73ffffffffffffffffffffffffffffffffffffffff166120d9611803565b73ffffffffffffffffffffffffffffffffffffffff161461212f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121269061396c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561219f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219690614654565b60405180910390fd5b6121a88161268b565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061227657507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806122865750612285826129fb565b5b9050919050565b60006002805490508210801561230e5750600073ffffffffffffffffffffffffffffffffffffffff16600283815481106122ca576122c9613bae565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b600033905090565b816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166123908361137f565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006123e18261228d565b612420576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612417906146e6565b60405180910390fd5b600061242b8361137f565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061249a57508373ffffffffffffffffffffffffffffffffffffffff16612482846109c5565b73ffffffffffffffffffffffffffffffffffffffff16145b806124ab57506124aa818561201f565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166124d48261137f565b73ffffffffffffffffffffffffffffffffffffffff161461252a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252190614778565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561259a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125919061480a565b60405180910390fd5b6125a5838383612a65565b6125b060008261231d565b81600282815481106125c5576125c4613bae565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b612687828260405180602001604052806000815250612751565b5050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61275b8383612a6a565b6127686000848484612bf2565b6127a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279e9061489c565b60405180910390fd5b505050565b6127b78484846124b4565b6127c384848484612bf2565b612802576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f99061489c565b60405180910390fd5b50505050565b6060600780546128179061385c565b80601f01602080910402602001604051908101604052809291908181526020018280546128439061385c565b80156128905780601f1061286557610100808354040283529160200191612890565b820191906000526020600020905b81548152906001019060200180831161287357829003601f168201915b5050505050905090565b606060008214156128e2576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506129f6565b600082905060005b600082146129145780806128fd90613c0c565b915050600a8261290d91906148bc565b91506128ea565b60008167ffffffffffffffff8111156129305761292f613167565b5b6040519080825280601f01601f1916602001820160405280156129625781602001600182028036833780820191505090505b5090505b600085146129ef5760018261297b91906148ed565b9150600a8561298a9190613d16565b60306129969190613f3f565b60f81b8183815181106129ac576129ab613bae565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856129e891906148bc565b9450612966565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612ada576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad19061496d565b60405180910390fd5b612ae38161228d565b15612b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b1a906149d9565b60405180910390fd5b612b2f60008383612a65565b6002829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000612c138473ffffffffffffffffffffffffffffffffffffffff16612d7a565b15612d6d578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612c3c612315565b8786866040518563ffffffff1660e01b8152600401612c5e9493929190614a4e565b6020604051808303816000875af1925050508015612c9a57506040513d601f19601f82011682018060405250810190612c979190614aaf565b60015b612d1d573d8060008114612cca576040519150601f19603f3d011682016040523d82523d6000602084013e612ccf565b606091505b50600081511415612d15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d0c9061489c565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612d72565b600190505b949350505050565b600080823b905060008111915050919050565b828054612d999061385c565b90600052602060002090601f016020900481019282612dbb5760008555612e02565b82601f10612dd457805160ff1916838001178555612e02565b82800160010185558215612e02579182015b82811115612e01578251825591602001919060010190612de6565b5b509050612e0f9190612e13565b5090565b5b80821115612e2c576000816000905550600101612e14565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612e7981612e44565b8114612e8457600080fd5b50565b600081359050612e9681612e70565b92915050565b600060208284031215612eb257612eb1612e3a565b5b6000612ec084828501612e87565b91505092915050565b60008115159050919050565b612ede81612ec9565b82525050565b6000602082019050612ef96000830184612ed5565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612f39578082015181840152602081019050612f1e565b83811115612f48576000848401525b50505050565b6000601f19601f8301169050919050565b6000612f6a82612eff565b612f748185612f0a565b9350612f84818560208601612f1b565b612f8d81612f4e565b840191505092915050565b60006020820190508181036000830152612fb28184612f5f565b905092915050565b6000819050919050565b612fcd81612fba565b8114612fd857600080fd5b50565b600081359050612fea81612fc4565b92915050565b60006020828403121561300657613005612e3a565b5b600061301484828501612fdb565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006130488261301d565b9050919050565b6130588161303d565b82525050565b6000602082019050613073600083018461304f565b92915050565b6130828161303d565b811461308d57600080fd5b50565b60008135905061309f81613079565b92915050565b600080604083850312156130bc576130bb612e3a565b5b60006130ca85828601613090565b92505060206130db85828601612fdb565b9150509250929050565b6130ee81612fba565b82525050565b600060208201905061310960008301846130e5565b92915050565b60008060006060848603121561312857613127612e3a565b5b600061313686828701613090565b935050602061314786828701613090565b925050604061315886828701612fdb565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61319f82612f4e565b810181811067ffffffffffffffff821117156131be576131bd613167565b5b80604052505050565b60006131d1612e30565b90506131dd8282613196565b919050565b600067ffffffffffffffff8211156131fd576131fc613167565b5b602082029050602081019050919050565b600080fd5b6000613226613221846131e2565b6131c7565b905080838252602082019050602084028301858111156132495761324861320e565b5b835b81811015613272578061325e8882612fdb565b84526020840193505060208101905061324b565b5050509392505050565b600082601f83011261329157613290613162565b5b81356132a1848260208601613213565b91505092915050565b6000602082840312156132c0576132bf612e3a565b5b600082013567ffffffffffffffff8111156132de576132dd612e3f565b5b6132ea8482850161327c565b91505092915050565b600080fd5b600067ffffffffffffffff82111561331357613312613167565b5b61331c82612f4e565b9050602081019050919050565b82818337600083830152505050565b600061334b613346846132f8565b6131c7565b905082815260208101848484011115613367576133666132f3565b5b613372848285613329565b509392505050565b600082601f83011261338f5761338e613162565b5b813561339f848260208601613338565b91505092915050565b6000602082840312156133be576133bd612e3a565b5b600082013567ffffffffffffffff8111156133dc576133db612e3f565b5b6133e88482850161337a565b91505092915050565b60006020828403121561340757613406612e3a565b5b600061341584828501613090565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61345381612fba565b82525050565b6000613465838361344a565b60208301905092915050565b6000602082019050919050565b60006134898261341e565b6134938185613429565b935061349e8361343a565b8060005b838110156134cf5781516134b68882613459565b97506134c183613471565b9250506001810190506134a2565b5085935050505092915050565b600060208201905081810360008301526134f6818461347e565b905092915050565b600080fd5b60008083601f84011261351957613518613162565b5b8235905067ffffffffffffffff811115613536576135356134fe565b5b6020830191508360208202830111156135525761355161320e565b5b9250929050565b60008083601f84011261356f5761356e613162565b5b8235905067ffffffffffffffff81111561358c5761358b6134fe565b5b6020830191508360208202830111156135a8576135a761320e565b5b9250929050565b600080600080604085870312156135c9576135c8612e3a565b5b600085013567ffffffffffffffff8111156135e7576135e6612e3f565b5b6135f387828801613503565b9450945050602085013567ffffffffffffffff81111561361657613615612e3f565b5b61362287828801613559565b925092505092959194509250565b61363981612ec9565b811461364457600080fd5b50565b60008135905061365681613630565b92915050565b6000806040838503121561367357613672612e3a565b5b600061368185828601613090565b925050602061369285828601613647565b9150509250929050565b600067ffffffffffffffff8211156136b7576136b6613167565b5b6136c082612f4e565b9050602081019050919050565b60006136e06136db8461369c565b6131c7565b9050828152602081018484840111156136fc576136fb6132f3565b5b613707848285613329565b509392505050565b600082601f83011261372457613723613162565b5b81356137348482602086016136cd565b91505092915050565b6000806000806080858703121561375757613756612e3a565b5b600061376587828801613090565b945050602061377687828801613090565b935050604061378787828801612fdb565b925050606085013567ffffffffffffffff8111156137a8576137a7612e3f565b5b6137b48782880161370f565b91505092959194509250565b6000602082840312156137d6576137d5612e3a565b5b60006137e484828501613647565b91505092915050565b6000806040838503121561380457613803612e3a565b5b600061381285828601613090565b925050602061382385828601613090565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061387457607f821691505b602082108114156138885761388761382d565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006138ea602c83612f0a565b91506138f58261388e565b604082019050919050565b60006020820190508181036000830152613919816138dd565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613956602083612f0a565b915061396182613920565b602082019050919050565b6000602082019050818103600083015261398581613949565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006139e8602183612f0a565b91506139f38261398c565b604082019050919050565b60006020820190508181036000830152613a17816139db565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000613a7a603883612f0a565b9150613a8582613a1e565b604082019050919050565b60006020820190508181036000830152613aa981613a6d565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000613b0c603183612f0a565b9150613b1782613ab0565b604082019050919050565b60006020820190508181036000830152613b3b81613aff565b9050919050565b7f455243373231456e756d3a206f776e657220696f6f6200000000000000000000600082015250565b6000613b78601683612f0a565b9150613b8382613b42565b602082019050919050565b60006020820190508181036000830152613ba781613b6b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613c1782612fba565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c4a57613c49613bdd565b5b600182019050919050565b7f436c61696d696e67206973206e6f742061637469766520617420746865206d6f60008201527f6d656e7400000000000000000000000000000000000000000000000000000000602082015250565b6000613cb1602483612f0a565b9150613cbc82613c55565b604082019050919050565b60006020820190508181036000830152613ce081613ca4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613d2182612fba565b9150613d2c83612fba565b925082613d3c57613d3b613ce7565b5b828206905092915050565b7f596f752072657175697265203320746f6b656e7320696e206f7264657220746f60008201527f20636c61696d2061204d756d6d79000000000000000000000000000000000000602082015250565b6000613da3602e83612f0a565b9150613dae82613d47565b604082019050919050565b60006020820190508181036000830152613dd281613d96565b9050919050565b600081519050613de881613079565b92915050565b600060208284031215613e0457613e03612e3a565b5b6000613e1284828501613dd9565b91505092915050565b7f596f7520646f206e6f74206f776e2074686520746f6b656e207769746820746860008201527f652070726f766964656420696400000000000000000000000000000000000000602082015250565b6000613e77602d83612f0a565b9150613e8282613e1b565b604082019050919050565b60006020820190508181036000830152613ea681613e6a565b9050919050565b7f54686520746f6b656e20686173206265656e20616c726561647920636c61696d60008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b6000613f09602283612f0a565b9150613f1482613ead565b604082019050919050565b60006020820190508181036000830152613f3881613efc565b9050919050565b6000613f4a82612fba565b9150613f5583612fba565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f8a57613f89613bdd565b5b828201905092915050565b7f455243373231456e756d3a20676c6f62616c20696f6f62000000000000000000600082015250565b6000613fcb601783612f0a565b9150613fd682613f95565b602082019050919050565b60006020820190508181036000830152613ffa81613fbe565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b600061405d602983612f0a565b915061406882614001565b604082019050919050565b6000602082019050818103600083015261408c81614050565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b60006140ef602a83612f0a565b91506140fa82614093565b604082019050919050565b6000602082019050818103600083015261411e816140e2565b9050919050565b7f50726f76696465207175616e74697469657320616e6420726563697069656e7460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614181602183612f0a565b915061418c82614125565b604082019050919050565b600060208201905081810360008301526141b081614174565b9050919050565b7f546f6f206d616e79000000000000000000000000000000000000000000000000600082015250565b60006141ed600883612f0a565b91506141f8826141b7565b602082019050919050565b6000602082019050818103600083015261421c816141e0565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614259601f83612f0a565b915061426482614223565b602082019050919050565b600060208201905081810360008301526142888161424c565b9050919050565b7f4f66660000000000000000000000000000000000000000000000000000000000600082015250565b60006142c5600383612f0a565b91506142d08261428f565b602082019050919050565b600060208201905081810360008301526142f4816142b8565b9050919050565b7f4475680000000000000000000000000000000000000000000000000000000000600082015250565b6000614331600383612f0a565b915061433c826142fb565b602082019050919050565b6000602082019050818103600083015261436081614324565b9050919050565b7f536f727279000000000000000000000000000000000000000000000000000000600082015250565b600061439d600583612f0a565b91506143a882614367565b602082019050919050565b600060208201905081810360008301526143cc81614390565b9050919050565b60006143de82612fba565b91506143e983612fba565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561442257614421613bdd565b5b828202905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000614463601983612f0a565b915061446e8261442d565b602082019050919050565b6000602082019050818103600083015261449281614456565b9050919050565b7f4552433732314d657461646174613a204e6f6e6578697374656e7420746f6b6560008201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b60006144f5602183612f0a565b915061450082614499565b604082019050919050565b60006020820190508181036000830152614524816144e8565b9050919050565b600081905092915050565b600061454182612eff565b61454b818561452b565b935061455b818560208601612f1b565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b600061459d60058361452b565b91506145a882614567565b600582019050919050565b60006145bf8285614536565b91506145cb8284614536565b91506145d682614590565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061463e602683612f0a565b9150614649826145e2565b604082019050919050565b6000602082019050818103600083015261466d81614631565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006146d0602c83612f0a565b91506146db82614674565b604082019050919050565b600060208201905081810360008301526146ff816146c3565b9050919050565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b6000614762602983612f0a565b915061476d82614706565b604082019050919050565b6000602082019050818103600083015261479181614755565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006147f4602483612f0a565b91506147ff82614798565b604082019050919050565b60006020820190508181036000830152614823816147e7565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614886603283612f0a565b91506148918261482a565b604082019050919050565b600060208201905081810360008301526148b581614879565b9050919050565b60006148c782612fba565b91506148d283612fba565b9250826148e2576148e1613ce7565b5b828204905092915050565b60006148f882612fba565b915061490383612fba565b92508282101561491657614915613bdd565b5b828203905092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614957602083612f0a565b915061496282614921565b602082019050919050565b600060208201905081810360008301526149868161494a565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006149c3601c83612f0a565b91506149ce8261498d565b602082019050919050565b600060208201905081810360008301526149f2816149b6565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614a20826149f9565b614a2a8185614a04565b9350614a3a818560208601612f1b565b614a4381612f4e565b840191505092915050565b6000608082019050614a63600083018761304f565b614a70602083018661304f565b614a7d60408301856130e5565b8181036060830152614a8f8184614a15565b905095945050505050565b600081519050614aa981612e70565b92915050565b600060208284031215614ac557614ac4612e3a565b5b6000614ad384828501614a9a565b9150509291505056fea2646970667358221220d4e587733735a713859dc87876282ecfe261becbf9a8d8b4539980909ca414dc64736f6c634300080a0033

Verified Source Code Full Match

Compiler: v0.8.10+commit.fc410830 EVM: london Optimization: No
Mummiez.sol 1266 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    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);
            }
        }
    }
}


pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}


pragma solidity ^0.8.0;

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

pragma solidity ^0.8.0;

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

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
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);
}

pragma solidity ^0.8.0;

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
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);
}

pragma solidity ^0.8.0;

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
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);
}

pragma solidity ^0.8.10;

abstract contract ERC721P is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    string private _name;
    string private _symbol;
    address[] internal _owners;
    mapping(uint256 => address) private _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
        interfaceId == type(IERC721).interfaceId ||
        interfaceId == type(IERC721Metadata).interfaceId ||
        super.supportsInterface(interfaceId);
    }
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        uint count = 0;
        uint length = _owners.length;
        for( uint i = 0; i < length; ++i ){
            if( owner == _owners[i] ){
                ++count;
            }
        }
        delete length;
        return count;
    }
    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;
    }
    function name() public view virtual override returns (string memory) {
        return _name;
    }
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721P.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);
    }
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }
    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);
    }
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }
    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);
    }
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }
    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);
    }
    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");
    }
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return tokenId < _owners.length && _owners[tokenId] != address(0);
    }
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721P.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }
    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"
        );
    }
    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);
        _owners.push(to);

        emit Transfer(address(0), to, tokenId);
    }
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721P.ownerOf(tokenId);

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

        // Clear approvals
        _approve(address(0), tokenId);
        _owners[tokenId] = address(0);

        emit Transfer(owner, address(0), tokenId);
    }
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721P.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);
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721P.ownerOf(tokenId), to, tokenId);
    }
    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;
        }
    }
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

pragma solidity ^0.8.10;

abstract contract ERC721Enum is ERC721P, IERC721Enumerable {
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721P) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }
    function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256 tokenId) {
        require(index < ERC721P.balanceOf(owner), "ERC721Enum: owner ioob");
        uint count;
        for( uint i; i < _owners.length; ++i ){
            if( owner == _owners[i] ){
                if( count == index )
                    return i;
                else
                    ++count;
            }
        }
        require(false, "ERC721Enum: owner ioob");
    }
    function tokensOfOwner(address owner) public view returns (uint256[] memory) {
        require(0 < ERC721P.balanceOf(owner), "ERC721Enum: owner ioob");
        uint256 tokenCount = balanceOf(owner);
        uint256[] memory tokenIds = new uint256[](tokenCount);
        for (uint256 i = 0; i < tokenCount; i++) {
            tokenIds[i] = tokenOfOwnerByIndex(owner, i);
        }
        return tokenIds;
    }
    function totalSupply() public view virtual override returns (uint256) {
        return _owners.length;
    }
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enum.totalSupply(), "ERC721Enum: global ioob");
        return index;
    }
}

pragma solidity ^0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _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);
    }
}

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
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);
    }
}

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
        if (b > a) return (false, 0);
        return (true, a - b);
    }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    unchecked {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
    unchecked {
        require(b <= a, errorMessage);
        return a - b;
    }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
    unchecked {
        require(b > 0, errorMessage);
        return a / b;
    }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
    unchecked {
        require(b > 0, errorMessage);
        return a % b;
    }
    }
}


pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

pragma solidity ^0.8.10;

contract CrazyMummiez is ERC721Enum, Ownable, ReentrancyGuard {
    using Strings for uint256;
    string public baseURI;
    //sale settings
    uint256 public cost = 0.1 ether;
    uint256 public maxSupply = 3333;
    uint256 public maxClaim = 3333;
    uint256 public maxMint = 3;
    uint256 public requiredParentTokensForClaim = 3;
    bool public status = false;
    ParentContractInterface parentContractInterface;

    mapping(uint256 => bool) _claimedParents;

    //presale settings
    constructor(
        string memory _name,
        string memory _symbol,
        string memory _initBaseURI,
        address _parentContractAddress
    ) ERC721P(_name, _symbol) {
        parentContractInterface = ParentContractInterface(_parentContractAddress);
        setBaseURI(_initBaseURI);
    }
    // internal
    function _baseURI() internal view virtual returns (string memory) {
        return baseURI;
    }
    // public minting
    function mint(uint256 _mintAmount) public payable nonReentrant{
        uint256 s = totalSupply();
        require(status, "Off" );
        require(_mintAmount > 0, "Duh" );
        require(_mintAmount <= maxMint, "Too many" );
        require(s + _mintAmount < maxSupply, "Sorry" );
        require(msg.value >= cost * _mintAmount);
        for (uint256 i = 0; i < _mintAmount; ++i) {
            _safeMint(msg.sender, s + i, "");
        }
        delete s;
    }

    // admin minting
    function gift(uint[] calldata quantity, address[] calldata recipient) external onlyOwner{
        require(quantity.length == recipient.length, "Provide quantities and recipients" );
        uint totalQuantity = 0;
        uint256 s = totalSupply();
        for(uint i = 0; i < quantity.length; ++i){
            totalQuantity += quantity[i];
        }
        require( s + totalQuantity <= maxSupply, "Too many" );
        delete totalQuantity;
        for(uint i = 0; i < recipient.length; ++i){
            for(uint j = 0; j < quantity[i]; ++j){
                _safeMint( recipient[i], s++, "" );
            }
        }
        delete s;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: Nonexistent token");
        string memory currentBaseURI = _baseURI();
        return bytes(currentBaseURI).length > 0	? string(abi.encodePacked(currentBaseURI, tokenId.toString(), '.json')) : "";
    }
    function setCost(uint256 _newCost) public onlyOwner {
        cost = _newCost;
    }
    function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner {
        maxMint = _newMaxMintAmount;
    }
    function setMaxSupply(uint256 _newMaxSupply) public onlyOwner {
        maxSupply = _newMaxSupply;
    }
    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseURI = _newBaseURI;
    }
    function setSaleStatus(bool _status) public onlyOwner {
        status = _status;
    }
    function withdraw() public onlyOwner {
        uint balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    function isClaimed (uint256 id) public view returns (bool) {
        return _claimedParents[id];
    }

    function claimByIds(uint256[] memory ids) public {
        require(status, "Claiming is not active at the moment");
        require(ids.length % requiredParentTokensForClaim == 0, "You require 3 tokens in order to claim a Mummy");
        for (uint256  i = 0; i < ids.length; i++) {
            address owner = parentContractInterface.ownerOf(ids[i]);
            require(owner == msg.sender, "You do not own the token with the provided id");
            require(!isClaimed(ids[i]), "The token has been already claimed");
        }

        for (uint256  i = 0; i < ids.length; i = i + requiredParentTokensForClaim) {
            _safeMint(msg.sender, totalSupply());
            _claimedParents[ids[i]] = true;
            _claimedParents[ids[i + 1]] = true;
            _claimedParents[ids[i + 2]] = true;
        }
    }

}

contract ParentContractInterface {
    function balanceOf(address owner) public returns (uint256) {}
    function ownerOf(uint256 tokenId) public returns (address) {}
    function tokenOfOwnerByIndex(address owner, uint256 index) public returns(uint256) {}
}

Read Contract

balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isClaimed 0x9e34070f → bool
maxClaim 0xd4938db3 → uint256
maxMint 0x7501f741 → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
requiredParentTokensForClaim 0x7c3d3e01 → uint256
status 0x200d2ed2 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
tokensOfOwner 0x8462151c → uint256[]
totalSupply 0x18160ddd → uint256

Write Contract 16 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
claimByIds 0x3b67cf1a
uint256[] ids
gift 0x96ea3a47
uint256[] quantity
address[] recipient
mint 0xa0712d68
uint256 _mintAmount
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
setCost 0x44a0d68a
uint256 _newCost
setMaxMintAmount 0x088a4ed0
uint256 _newMaxMintAmount
setMaxSupply 0x6f8b44b0
uint256 _newMaxSupply
setSaleStatus 0xd897833e
bool _status
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address