Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x77654e7E579b3C817a3672C1c66c050058b92B85
Balance 0 ETH
Nonce 1
Code Size 17587 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

17587 bytes
0x6080604052600436106101ee5760003560e01c8063715018a61161010d578063b88d4fde116100a0578063d547cfb71161006f578063d547cfb714610704578063e985e9c51461072f578063ee8ff70c1461076c578063f2fde38b14610797578063fe7f9aa4146107c0576101ee565b8063b88d4fde1461064a578063c87b56dd14610673578063cd7c0326146106b0578063d0dff02d146106db576101ee565b806391d67782116100dc57806391d67782146105a257806395d89b41146105cd57806397107d6d146105f8578063a22cb46514610621576101ee565b8063715018a61461050e578063755edd171461052557806387f350b81461054e5780638da5cb5b14610577576101ee565b80631ac3f25a116101855780633408e470116101545780633408e4701461044057806342842e0e1461046b5780636352211e1461049457806370a08231146104d1576101ee565b80631ac3f25a1461038457806320379ee5146103af57806323b872dd146103da5780632d0335ab14610403576101ee565b8063095ea7b3116101c1578063095ea7b3146102d55780630c53c51c146102fe5780630f7e59701461032e57806318160ddd14610359576101ee565b80630108eaef146101f357806301ffc9a71461023057806306fdde031461026d578063081812fc14610298575b600080fd5b3480156101ff57600080fd5b5061021a60048036038101906102159190612d21565b6107fd565b6040516102279190612dd3565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612e46565b6109e3565b6040516102649190612dd3565b60405180910390f35b34801561027957600080fd5b50610282610ac5565b60405161028f9190612efb565b60405180910390f35b3480156102a457600080fd5b506102bf60048036038101906102ba9190612f53565b610b57565b6040516102cc9190612fc1565b60405180910390f35b3480156102e157600080fd5b506102fc60048036038101906102f79190613008565b610bdc565b005b610318600480360381019061031391906130e9565b610cf4565b60405161032591906131d5565b60405180910390f35b34801561033a57600080fd5b50610343610f66565b6040516103509190612efb565b60405180910390f35b34801561036557600080fd5b5061036e610f9f565b60405161037b9190613206565b60405180910390f35b34801561039057600080fd5b50610399610fbc565b6040516103a69190612efb565b60405180910390f35b3480156103bb57600080fd5b506103c461104a565b6040516103d19190613230565b60405180910390f35b3480156103e657600080fd5b5061040160048036038101906103fc919061324b565b611054565b005b34801561040f57600080fd5b5061042a6004803603810190610425919061329e565b6110b4565b6040516104379190613206565b60405180910390f35b34801561044c57600080fd5b506104556110fd565b6040516104629190613206565b60405180910390f35b34801561047757600080fd5b50610492600480360381019061048d919061324b565b61110a565b005b3480156104a057600080fd5b506104bb60048036038101906104b69190612f53565b61112a565b6040516104c89190612fc1565b60405180910390f35b3480156104dd57600080fd5b506104f860048036038101906104f3919061329e565b6111dc565b6040516105059190613206565b60405180910390f35b34801561051a57600080fd5b50610523611294565b005b34801561053157600080fd5b5061054c6004803603810190610547919061329e565b61131c565b005b34801561055a57600080fd5b50610575600480360381019061057091906132cb565b6113be565b005b34801561058357600080fd5b5061058c611454565b6040516105999190612fc1565b60405180910390f35b3480156105ae57600080fd5b506105b761147e565b6040516105c49190612fc1565b60405180910390f35b3480156105d957600080fd5b506105e26114a4565b6040516105ef9190612efb565b60405180910390f35b34801561060457600080fd5b5061061f600480360381019061061a919061329e565b611536565b005b34801561062d57600080fd5b5061064860048036038101906106439190613340565b6115f6565b005b34801561065657600080fd5b50610671600480360381019061066c9190613380565b61160c565b005b34801561067f57600080fd5b5061069a60048036038101906106959190612f53565b61166e565b6040516106a79190612efb565b60405180910390f35b3480156106bc57600080fd5b506106c56116a8565b6040516106d29190612fc1565b60405180910390f35b3480156106e757600080fd5b5061070260048036038101906106fd919061329e565b6116ce565b005b34801561071057600080fd5b5061071961178e565b6040516107269190612efb565b60405180910390f35b34801561073b57600080fd5b5061075660048036038101906107519190613403565b611820565b6040516107639190612dd3565b60405180910390f35b34801561077857600080fd5b50610781611913565b60405161078e9190613230565b60405180910390f35b3480156107a357600080fd5b506107be60048036038101906107b9919061329e565b611919565b005b3480156107cc57600080fd5b506107e760048036038101906107e291906132cb565b611a11565b6040516107f49190612dd3565b60405180910390f35b6000806040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250905082604051602001610849919061347f565b60405160208183030381529060405280519060200120600e8190555086600e54146108785760009150506109da565b6000818860405160200161088d9291906134f3565b6040516020818303038152906040528051906020012090506000600182898989604051600081526020016040526040516108ca949392919061352a565b6020604051602081039080840390855afa1580156108ec573d6000803e3d6000fd5b50505060206040510351905060011515600d8660405161090c919061347f565b908152602001604051809103902060009054906101000a900460ff161515146109d257600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156109d15761098e33611b0e565b6001600d866040516109a0919061347f565b908152602001604051809103902060006101000a81548160ff021916908315150217905550600193505050506109da565b5b600093505050505b95945050505050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610aae57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610abe5750610abd82611b78565b5b9050919050565b606060008054610ad49061359e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b009061359e565b8015610b4d5780601f10610b2257610100808354040283529160200191610b4d565b820191906000526020600020905b815481529060010190602001808311610b3057829003601f168201915b5050505050905090565b6000610b6282611be2565b610ba1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9890613642565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610be78261112a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4f906136d4565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610c77611c4e565b73ffffffffffffffffffffffffffffffffffffffff161480610ca65750610ca581610ca0611c4e565b611820565b5b610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc90613766565b60405180910390fd5b610cef8383611c5d565b505050565b606060006040518060600160405280600860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481526020018873ffffffffffffffffffffffffffffffffffffffff168152602001878152509050610d778782878787611d16565b610db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dad906137f8565b60405180910390fd5b610e096001600860008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e1f90919063ffffffff16565b600860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b873388604051610e7f93929190613839565b60405180910390a16000803073ffffffffffffffffffffffffffffffffffffffff16888a604051602001610eb49291906138bf565b604051602081830303815290604052604051610ed091906138e7565b6000604051808303816000865af19150503d8060008114610f0d576040519150601f19603f3d011682016040523d82523d6000602084013e610f12565b606091505b509150915081610f57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9061394a565b60405180910390fd5b80935050505095945050505050565b6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60006001610fad600a611e35565b610fb79190613999565b905090565b600f8054610fc99061359e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ff59061359e565b80156110425780601f1061101757610100808354040283529160200191611042565b820191906000526020600020905b81548152906001019060200180831161102557829003601f168201915b505050505081565b6000600754905090565b61106561105f611c4e565b82611e43565b6110a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109b90613a3f565b60405180910390fd5b6110af838383611f21565b505050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000804690508091505090565b6111258383836040518060200160405280600081525061160c565b505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ca90613ad1565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561124d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124490613b63565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61129c611c4e565b73ffffffffffffffffffffffffffffffffffffffff166112ba611454565b73ffffffffffffffffffffffffffffffffffffffff1614611310576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130790613bcf565b60405180910390fd5b61131a6000612188565b565b611324611c4e565b73ffffffffffffffffffffffffffffffffffffffff16611342611454565b73ffffffffffffffffffffffffffffffffffffffff1614611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f90613bcf565b60405180910390fd5b60006113a4600a611e35565b90506113b0600a611a47565b6113ba828261224e565b5050565b6113c6611c4e565b73ffffffffffffffffffffffffffffffffffffffff166113e4611454565b73ffffffffffffffffffffffffffffffffffffffff161461143a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143190613bcf565b60405180910390fd5b8060109080519060200190611450929190612ab5565b5050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600180546114b39061359e565b80601f01602080910402602001604051908101604052809291908181526020018280546114df9061359e565b801561152c5780601f106115015761010080835404028352916020019161152c565b820191906000526020600020905b81548152906001019060200180831161150f57829003601f168201915b5050505050905090565b61153e611c4e565b73ffffffffffffffffffffffffffffffffffffffff1661155c611454565b73ffffffffffffffffffffffffffffffffffffffff16146115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a990613bcf565b60405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611608611601611c4e565b838361226c565b5050565b61161d611617611c4e565b83611e43565b61165c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165390613a3f565b60405180910390fd5b611668848484846123d9565b50505050565b606061167861178e565b61168183612435565b604051602001611692929190613c3b565b6040516020818303038152906040529050919050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6116d6611c4e565b73ffffffffffffffffffffffffffffffffffffffff166116f4611454565b73ffffffffffffffffffffffffffffffffffffffff161461174a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174190613bcf565b60405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606010805461179d9061359e565b80601f01602080910402602001604051908101604052809291908181526020018280546117c99061359e565b80156118165780601f106117eb57610100808354040283529160200191611816565b820191906000526020600020905b8154815290600101906020018083116117f957829003601f168201915b5050505050905090565b600080600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663c4552791866040518263ffffffff1660e01b81526004016118989190612fc1565b602060405180830381865afa1580156118b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d99190613ca8565b73ffffffffffffffffffffffffffffffffffffffff1614156118ff57600191505061190d565b6119098484612596565b9150505b92915050565b600e5481565b611921611c4e565b73ffffffffffffffffffffffffffffffffffffffff1661193f611454565b73ffffffffffffffffffffffffffffffffffffffff1614611995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198c90613bcf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fc90613d47565b60405180910390fd5b611a0e81612188565b50565b600d818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6001816000016000828254019250508190555050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611b0757600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff818301511692505050611b0b565b3390505b90565b6000611b1a600a611e35565b9050611b26600a611a47565b611b30828261224e565b808273ffffffffffffffffffffffffffffffffffffffff167f0a46f5d69b8116650ea98cca37177c3b556c96e940432e70a62d54c56ddaf3dd60405160405180910390a35050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6000611c58611a5d565b905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611cd08361112a565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611d87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7e90613dd9565b60405180910390fd5b6001611d9a611d958761262a565b612692565b83868660405160008152602001604052604051611dba949392919061352a565b6020604051602081039080840390855afa158015611ddc573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614905095945050505050565b60008183611e2d9190613df9565b905092915050565b600081600001549050919050565b6000611e4e82611be2565b611e8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8490613ec1565b60405180910390fd5b6000611e988361112a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611f0757508373ffffffffffffffffffffffffffffffffffffffff16611eef84610b57565b73ffffffffffffffffffffffffffffffffffffffff16145b80611f185750611f178185611820565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611f418261112a565b73ffffffffffffffffffffffffffffffffffffffff1614611f97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8e90613f53565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612007576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ffe90613fe5565b60405180910390fd5b6120128383836126cb565b61201d600082611c5d565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461206d9190613999565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120c49190613df9565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46121838383836126d0565b505050565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6122688282604051806020016040528060008152506126d5565b5050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156122db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122d290614051565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123cc9190612dd3565b60405180910390a3505050565b6123e4848484611f21565b6123f084848484612730565b61242f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612426906140e3565b60405180910390fd5b50505050565b6060600082141561247d576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612591565b600082905060005b600082146124af57808061249890614103565b915050600a826124a8919061417b565b9150612485565b60008167ffffffffffffffff8111156124cb576124ca612bf6565b5b6040519080825280601f01601f1916602001820160405280156124fd5781602001600182028036833780820191505090505b5090505b6000851461258a576001826125169190613999565b9150600a8561252591906141ac565b60306125319190613df9565b60f81b818381518110612547576125466141dd565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612583919061417b565b9450612501565b8093505050505b919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600060405180608001604052806043815260200161443b604391398051906020012082600001518360200151846040015180519060200120604051602001612675949392919061420c565b604051602081830303815290604052805190602001209050919050565b600061269c61104a565b826040516020016126ae92919061429d565b604051602081830303815290604052805190602001209050919050565b505050565b505050565b6126df83836128b8565b6126ec6000848484612730565b61272b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612722906140e3565b60405180910390fd5b505050565b60006127518473ffffffffffffffffffffffffffffffffffffffff16612a92565b156128ab578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261277a611c4e565b8786866040518563ffffffff1660e01b815260040161279c94939291906142d4565b6020604051808303816000875af19250505080156127d857506040513d601f19601f820116820180604052508101906127d59190614335565b60015b61285b573d8060008114612808576040519150601f19603f3d011682016040523d82523d6000602084013e61280d565b606091505b50600081511415612853576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284a906140e3565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506128b0565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612928576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291f906143ae565b60405180910390fd5b61293181611be2565b15612971576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129689061441a565b60405180910390fd5b61297d600083836126cb565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129cd9190613df9565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a8e600083836126d0565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054612ac19061359e565b90600052602060002090601f016020900481019282612ae35760008555612b2a565b82601f10612afc57805160ff1916838001178555612b2a565b82800160010185558215612b2a579182015b82811115612b29578251825591602001919060010190612b0e565b5b509050612b379190612b3b565b5090565b5b80821115612b54576000816000905550600101612b3c565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b612b7f81612b6c565b8114612b8a57600080fd5b50565b600081359050612b9c81612b76565b92915050565b600060ff82169050919050565b612bb881612ba2565b8114612bc357600080fd5b50565b600081359050612bd581612baf565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612c2e82612be5565b810181811067ffffffffffffffff82111715612c4d57612c4c612bf6565b5b80604052505050565b6000612c60612b58565b9050612c6c8282612c25565b919050565b600067ffffffffffffffff821115612c8c57612c8b612bf6565b5b612c9582612be5565b9050602081019050919050565b82818337600083830152505050565b6000612cc4612cbf84612c71565b612c56565b905082815260208101848484011115612ce057612cdf612be0565b5b612ceb848285612ca2565b509392505050565b600082601f830112612d0857612d07612bdb565b5b8135612d18848260208601612cb1565b91505092915050565b600080600080600060a08688031215612d3d57612d3c612b62565b5b6000612d4b88828901612b8d565b9550506020612d5c88828901612bc6565b9450506040612d6d88828901612b8d565b9350506060612d7e88828901612b8d565b925050608086013567ffffffffffffffff811115612d9f57612d9e612b67565b5b612dab88828901612cf3565b9150509295509295909350565b60008115159050919050565b612dcd81612db8565b82525050565b6000602082019050612de86000830184612dc4565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612e2381612dee565b8114612e2e57600080fd5b50565b600081359050612e4081612e1a565b92915050565b600060208284031215612e5c57612e5b612b62565b5b6000612e6a84828501612e31565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612ead578082015181840152602081019050612e92565b83811115612ebc576000848401525b50505050565b6000612ecd82612e73565b612ed78185612e7e565b9350612ee7818560208601612e8f565b612ef081612be5565b840191505092915050565b60006020820190508181036000830152612f158184612ec2565b905092915050565b6000819050919050565b612f3081612f1d565b8114612f3b57600080fd5b50565b600081359050612f4d81612f27565b92915050565b600060208284031215612f6957612f68612b62565b5b6000612f7784828501612f3e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612fab82612f80565b9050919050565b612fbb81612fa0565b82525050565b6000602082019050612fd66000830184612fb2565b92915050565b612fe581612fa0565b8114612ff057600080fd5b50565b60008135905061300281612fdc565b92915050565b6000806040838503121561301f5761301e612b62565b5b600061302d85828601612ff3565b925050602061303e85828601612f3e565b9150509250929050565b600067ffffffffffffffff82111561306357613062612bf6565b5b61306c82612be5565b9050602081019050919050565b600061308c61308784613048565b612c56565b9050828152602081018484840111156130a8576130a7612be0565b5b6130b3848285612ca2565b509392505050565b600082601f8301126130d0576130cf612bdb565b5b81356130e0848260208601613079565b91505092915050565b600080600080600060a0868803121561310557613104612b62565b5b600061311388828901612ff3565b955050602086013567ffffffffffffffff81111561313457613133612b67565b5b613140888289016130bb565b945050604061315188828901612b8d565b935050606061316288828901612b8d565b925050608061317388828901612bc6565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60006131a782613180565b6131b1818561318b565b93506131c1818560208601612e8f565b6131ca81612be5565b840191505092915050565b600060208201905081810360008301526131ef818461319c565b905092915050565b61320081612f1d565b82525050565b600060208201905061321b60008301846131f7565b92915050565b61322a81612b6c565b82525050565b60006020820190506132456000830184613221565b92915050565b60008060006060848603121561326457613263612b62565b5b600061327286828701612ff3565b935050602061328386828701612ff3565b925050604061329486828701612f3e565b9150509250925092565b6000602082840312156132b4576132b3612b62565b5b60006132c284828501612ff3565b91505092915050565b6000602082840312156132e1576132e0612b62565b5b600082013567ffffffffffffffff8111156132ff576132fe612b67565b5b61330b84828501612cf3565b91505092915050565b61331d81612db8565b811461332857600080fd5b50565b60008135905061333a81613314565b92915050565b6000806040838503121561335757613356612b62565b5b600061336585828601612ff3565b92505060206133768582860161332b565b9150509250929050565b6000806000806080858703121561339a57613399612b62565b5b60006133a887828801612ff3565b94505060206133b987828801612ff3565b93505060406133ca87828801612f3e565b925050606085013567ffffffffffffffff8111156133eb576133ea612b67565b5b6133f7878288016130bb565b91505092959194509250565b6000806040838503121561341a57613419612b62565b5b600061342885828601612ff3565b925050602061343985828601612ff3565b9150509250929050565b600081905092915050565b600061345982612e73565b6134638185613443565b9350613473818560208601612e8f565b80840191505092915050565b600061348b828461344e565b915081905092915050565b600081905092915050565b60006134ac82613180565b6134b68185613496565b93506134c6818560208601612e8f565b80840191505092915050565b6000819050919050565b6134ed6134e882612b6c565b6134d2565b82525050565b60006134ff82856134a1565b915061350b82846134dc565b6020820191508190509392505050565b61352481612ba2565b82525050565b600060808201905061353f6000830187613221565b61354c602083018661351b565b6135596040830185613221565b6135666060830184613221565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806135b657607f821691505b602082108114156135ca576135c961356f565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b600061362c602c83612e7e565b9150613637826135d0565b604082019050919050565b6000602082019050818103600083015261365b8161361f565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006136be602183612e7e565b91506136c982613662565b604082019050919050565b600060208201905081810360008301526136ed816136b1565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000613750603883612e7e565b915061375b826136f4565b604082019050919050565b6000602082019050818103600083015261377f81613743565b9050919050565b7f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360008201527f6800000000000000000000000000000000000000000000000000000000000000602082015250565b60006137e2602183612e7e565b91506137ed82613786565b604082019050919050565b60006020820190508181036000830152613811816137d5565b9050919050565b600061382382612f80565b9050919050565b61383381613818565b82525050565b600060608201905061384e6000830186612fb2565b61385b602083018561382a565b818103604083015261386d818461319c565b9050949350505050565b60008160601b9050919050565b600061388f82613877565b9050919050565b60006138a182613884565b9050919050565b6138b96138b482612fa0565b613896565b82525050565b60006138cb82856134a1565b91506138d782846138a8565b6014820191508190509392505050565b60006138f382846134a1565b915081905092915050565b7f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000600082015250565b6000613934601c83612e7e565b915061393f826138fe565b602082019050919050565b6000602082019050818103600083015261396381613927565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006139a482612f1d565b91506139af83612f1d565b9250828210156139c2576139c161396a565b5b828203905092915050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000613a29603183612e7e565b9150613a34826139cd565b604082019050919050565b60006020820190508181036000830152613a5881613a1c565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000613abb602983612e7e565b9150613ac682613a5f565b604082019050919050565b60006020820190508181036000830152613aea81613aae565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000613b4d602a83612e7e565b9150613b5882613af1565b604082019050919050565b60006020820190508181036000830152613b7c81613b40565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613bb9602083612e7e565b9150613bc482613b83565b602082019050919050565b60006020820190508181036000830152613be881613bac565b9050919050565b7f2f00000000000000000000000000000000000000000000000000000000000000600082015250565b6000613c25600183613443565b9150613c3082613bef565b600182019050919050565b6000613c47828561344e565b9150613c53828461344e565b9150613c5e82613c18565b91508190509392505050565b6000613c7582612fa0565b9050919050565b613c8581613c6a565b8114613c9057600080fd5b50565b600081519050613ca281613c7c565b92915050565b600060208284031215613cbe57613cbd612b62565b5b6000613ccc84828501613c93565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613d31602683612e7e565b9150613d3c82613cd5565b604082019050919050565b60006020820190508181036000830152613d6081613d24565b9050919050565b7f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360008201527f49474e4552000000000000000000000000000000000000000000000000000000602082015250565b6000613dc3602583612e7e565b9150613dce82613d67565b604082019050919050565b60006020820190508181036000830152613df281613db6565b9050919050565b6000613e0482612f1d565b9150613e0f83612f1d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613e4457613e4361396a565b5b828201905092915050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613eab602c83612e7e565b9150613eb682613e4f565b604082019050919050565b60006020820190508181036000830152613eda81613e9e565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000613f3d602583612e7e565b9150613f4882613ee1565b604082019050919050565b60006020820190508181036000830152613f6c81613f30565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613fcf602483612e7e565b9150613fda82613f73565b604082019050919050565b60006020820190508181036000830152613ffe81613fc2565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b600061403b601983612e7e565b915061404682614005565b602082019050919050565b6000602082019050818103600083015261406a8161402e565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b60006140cd603283612e7e565b91506140d882614071565b604082019050919050565b600060208201905081810360008301526140fc816140c0565b9050919050565b600061410e82612f1d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156141415761414061396a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061418682612f1d565b915061419183612f1d565b9250826141a1576141a061414c565b5b828204905092915050565b60006141b782612f1d565b91506141c283612f1d565b9250826141d2576141d161414c565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006080820190506142216000830187613221565b61422e60208301866131f7565b61423b6040830185612fb2565b6142486060830184613221565b95945050505050565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b6000614287600283613443565b915061429282614251565b600282019050919050565b60006142a88261427a565b91506142b482856134dc565b6020820191506142c482846134dc565b6020820191508190509392505050565b60006080820190506142e96000830187612fb2565b6142f66020830186612fb2565b61430360408301856131f7565b8181036060830152614315818461319c565b905095945050505050565b60008151905061432f81612e1a565b92915050565b60006020828403121561434b5761434a612b62565b5b600061435984828501614320565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614398602083612e7e565b91506143a382614362565b602082019050919050565b600060208201905081810360008301526143c78161438b565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000614404601c83612e7e565b915061440f826143ce565b602082019050919050565b60006020820190508181036000830152614433816143f7565b905091905056fe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220878938e3547a3be2eab2c732711298bdaff6ad8ce47861ff1c63ea4a1caa038b64736f6c634300080b0033

Verified Source Code Partial Match

Compiler: v0.8.11+commit.d7f03943 EVM: london Optimization: No
TCGDragons.sol 1689 lines
// SPDX-License-Identifier: MIT

pragma solidity 0.8.11;



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


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

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



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


/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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);
            }
        }
    }
}



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


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



/**
 * @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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}



/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 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);
    }
}




abstract contract ContextMixin {
    function msgSender()
        internal
        view
        returns (address payable sender)
    {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }
}


// 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 generally not needed starting with Solidity 0.8, since 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;
        }
    }
}


contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}


contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        bytes32 salt;
    }

    string constant public ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
        bytes(
            "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
        )
    );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contracts that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(
        string memory name
    )
        internal
        initializer
    {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                bytes32(getChainId())
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public view returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}


contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
        bytes(
            "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
        )
    );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            payable(msg.sender),
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }
}


/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
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 overridden 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 {
        _setApprovalForAll(_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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}


contract OwnableDelegateProxy {}

/**
 * Used to delegate ownership of a contract to ...

// [truncated — 55254 bytes total]

Read Contract

ERC712_VERSION 0x0f7e5970 → string
abii 0x1ac3f25a → string
balanceOf 0x70a08231 → uint256
baseTokenURI 0xd547cfb7 → string
getApproved 0x081812fc → address
getChainId 0x3408e470 → uint256
getDomainSeperator 0x20379ee5 → bytes32
getNonce 0x2d0335ab → uint256
isApprovedForAll 0xe985e9c5 → bool
mintKeys 0xfe7f9aa4 → bool
name 0x06fdde03 → string
original_signer 0x91d67782 → address
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
proxyRegistryAddress 0xcd7c0326 → address
session_token 0xee8ff70c → bytes32
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256

Write Contract 13 functions

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

_setTokenURI 0x87f350b8
string tokenURI
approve 0x095ea7b3
address to
uint256 tokenId
claimDragon 0x0108eaef
bytes32 _hashedMessage
uint8 _v
bytes32 _r
bytes32 _s
string _mintKey
returns: bool
executeMetaTransaction 0x0c53c51c
address userAddress
bytes functionSignature
bytes32 sigR
bytes32 sigS
uint8 sigV
returns: bytes
mintTo 0x755edd17
address _to
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
setOriginalSigner 0xd0dff02d
address _original_signer
setProxy 0x97107d6d
address _proxyRegistryAddress
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address