Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xb6dEEA49E390957DcA7A5ad281432EBa82B251b9
Balance 0 ETH
Nonce 1
Code Size 16844 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

16844 bytes
0x608060405234801561001057600080fd5b50600436106102f15760003560e01c8063715018a61161019d578063b7c0b8e8116100e9578063e88371e9116100a2578063e9bee0f51161007c578063e9bee0f5146106ff578063eed3c87614610708578063f2fde38b1461071b578063fb796e6c1461072e57600080fd5b8063e88371e9146105e3578063e8e3926e146106b0578063e985e9c5146106c357600080fd5b8063b7c0b8e81461063e578063b88d4fde14610651578063bf8030d014610664578063c87b56dd14610677578063cdd32ff91461068a578063d06098861461069d57600080fd5b80639ecc626a11610156578063a4eb718c11610130578063a4eb718c146105fe578063ad68753414610611578063b276aa5114610624578063b7b7c1281461063657600080fd5b80639ecc626a146105db578063a0625f0f146105e3578063a22cb465146105eb57600080fd5b8063715018a61461058157806385dc0721146105895780638824f5a71461059c5780638da5cb5b146105af57806395d89b41146105c057806398544710146105c857600080fd5b806323b872dd1161025c57806342842e0e11610215578063531721db116101ef578063531721db1461053557806355f804b3146105485780636352211e1461055b57806370a082311461056e57600080fd5b806342842e0e146104a65780634f6ccce7146104b957806352566e93146104cc57600080fd5b806323b872dd146104135780632a55205a146104265780632f745c591461045857806330c0c4231461046b5780633e2831fe1461047e57806341f434341461049157600080fd5b8063095ea7b3116102ae578063095ea7b31461039e57806313977ed7146103b1578063150b7a02146103b957806318160ddd146103e55780631fe543e3146103ed578063200b5e3a1461040057600080fd5b806301ffc9a7146102f657806302345d0c1461031e57806304634d8d1461033357806304ecbfc91461034857806306fdde031461035e578063081812fc14610373575b600080fd5b6103096103043660046136dd565b61073b565b60405190151581526020015b60405180910390f35b61032661074c565b60405161031591906136fa565b610346610341366004613753565b61075d565b005b610350600281565b604051908152602001610315565b610366610773565b60405161031591906137e8565b6103866103813660046137fb565b610805565b6040516001600160a01b039091168152602001610315565b6103466103ac366004613814565b61082c565b610350606481565b6103cc6103c73660046138dd565b61090a565b6040516001600160e01b03199091168152602001610315565b600854610350565b6103466103fb3660046139db565b610d6f565b61036661040e3660046137fb565b610df3565b610346610421366004613a21565b610e9c565b610439610434366004613a62565b610f85565b604080516001600160a01b039093168352602083019190915201610315565b610350610466366004613814565b611031565b6103506104793660046137fb565b6110c7565b61034661048c366004613a9b565b6110de565b6103866daaeb6d7670e522a718067333cd4e81565b6103466104b4366004613a21565b611109565b6103506104c73660046137fb565b6111e7565b602c54602d546104fe91906001600160401b03811690600160401b810463ffffffff1690600160601b900461ffff1684565b604080519485526001600160401b03909316602085015263ffffffff9091169183019190915261ffff166060820152608001610315565b610346610543366004613ac4565b61127a565b610346610556366004613b0b565b61190c565b6103866105693660046137fb565b611920565b61035061057c366004613b3f565b611980565b610346611a06565b610346610597366004613b82565b611a1a565b6103466105aa366004613bcf565b611a9f565b600b546001600160a01b0316610386565b610366611ac9565b6103466105d63660046137fb565b611ad8565b610350600081565b610350600a81565b6103466105f9366004613bea565b611ae5565b61034661060c366004613c18565b611bb9565b61034661061f366004613c33565b611bec565b600e5461030990610100900460ff1681565b610326611c40565b61034661064c366004613c67565b611c4c565b61034661065f3660046138dd565b611c67565b610346610672366004613c84565b611d53565b6103666106853660046137fb565b611d73565b610346610698366004613a62565b6123f1565b6103466106ab366004613c33565b6125b8565b6103096106be3660046137fb565b61260c565b6103096106d1366004613cc8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610350610d0581565b610346610716366004613c67565b61262c565b610346610729366004613b3f565b61264e565b600e546103099060ff1681565b6000610746826126c7565b92915050565b606061075860206126ec565b905090565b6107656126f9565b61076f8282612753565b5050565b60606000805461078290613cf6565b80601f01602080910402602001604051908101604052809291908181526020018280546107ae90613cf6565b80156107fb5780601f106107d0576101008083540402835291602001916107fb565b820191906000526020600020905b8154815290600101906020018083116107de57829003601f168201915b5050505050905090565b600061081082612850565b506000908152600460205260409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b1580159061084d5750600e5460ff165b156108fb57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156108aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ce9190613d30565b6108fb57604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b61090583836128af565b505050565b60006002600a540361095e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108f2565b6002600a556001600160a01b037f0000000000000000000000004af790223169a8621095871375f79425725d22c9163303610c4057600e54610100900460ff166109ba5760405162461bcd60e51b81526004016108f290613d4d565b6000838152600260205260409020546001600160a01b0316610c25576109e084846129bf565b60008381526011602052604090205460ff1615610b7557604051637a94c56560e11b81526001600160a01b03858116600483015260006024830152600160448301527f000000000000000000000000509a4d150036fe9b0cb83594d44bdd21ad8cfdf2169063f5298aca90606401600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b50505050610a948360206129c990919063ffffffff16565b15610abe57610aa7601d80546001019055565b601d54600084815260186020526040902055610d59565b610ac9601e846129c9565b15610b7a57600083815260136020526040902054602290600a8110610af057610af0613d84565b0154600103610b39576002610b04601c5490565b610b0f906001613db0565b11610b3957610b22601c80546001019055565b601c54600084815260176020526040902055610d59565b600a610b44601b5490565b610b4f906001613db0565b11610b7557610b62601b80546001019055565b601b546000848152601660205260409020555b610d59565b600083815260136020526040902054602290600a8110610b9c57610b9c613d84565b0154600103610be557600a610bb0601a5490565b610bbb906001613db0565b11610be557610bce601a80546001019055565b601a54600084815260156020526040902055610d59565b6064610bf060195490565b610bfb906001613db0565b11610b7557610c0e601980546001019055565b601954600084815260146020526040902055610d59565b610b75308585604051806020016040528060008152506129e1565b303303610cfb57600e54610100900460ff16610c6e5760405162461bcd60e51b81526004016108f290613d4d565b604051632142170760e11b81523060048201526001600160a01b038581166024830152604482018590527f0000000000000000000000004af790223169a8621095871375f79425725d22c916906342842e0e90606401600060405180830381600087803b158015610cde57600080fd5b505af1158015610cf2573d6000803e3d6000fd5b50505050610d59565b60405162461bcd60e51b815260206004820152602d60248201527f4f6e6c7920487970655361696e747320616e642048797065416c69656e73206160448201526c39329039bab83837b93a32b21760991b60648201526084016108f2565b50630a85bd0160e11b6001600a55949350505050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610de95760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044016108f2565b61076f8282612a14565b6060610dfd6126f9565b60008281526010602052604090208054610e1690613cf6565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4290613cf6565b8015610e8f5780601f10610e6457610100808354040283529160200191610e8f565b820191906000526020600020905b815481529060010190602001808311610e7257829003601f168201915b505050505090505b919050565b826daaeb6d7670e522a718067333cd4e3b15801590610ebd5750600e5460ff165b15610f7457336001600160a01b03821603610ee257610edd848484612b74565b610f7f565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610f31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f559190613d30565b610f7457604051633b79c77360e21b81523360048201526024016108f2565b610f7f848484612b74565b50505050565b6000828152600d602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610ffa575060408051808201909152600c546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611019906001600160601b031687613dc3565b6110239190613df0565b915196919550909350505050565b600061103c83611980565b821061109e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108f2565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b602281600a81106110d757600080fd5b0154905081565b6110e66126f9565b602d805467ffffffffffffffff19166001600160401b0392909216919091179055565b826daaeb6d7670e522a718067333cd4e3b1580159061112a5750600e5460ff165b156111dc57336001600160a01b0382160361114a57610edd848484612ba5565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611199573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111bd9190613d30565b6111dc57604051633b79c77360e21b81523360048201526024016108f2565b610f7f848484612ba5565b60006111f260085490565b82106112555760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108f2565b6008828154811061126857611268613d84565b90600052602060002001549050919050565b3233146112c95760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e7472616374000060448201526064016108f2565b600e54610100900460ff166112f05760405162461bcd60e51b81526004016108f290613d4d565b604051627eeac760e11b8152336004820152602481018290526000907f0000000000000000000000007851cf4f9808fd4389cc5c7c13f4ced86fb301a56001600160a01b03169062fdd58e90604401602060405180830381865afa15801561135c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113809190613e04565b116113cd5760405162461bcd60e51b815260206004820152601d60248201527f596f7520646f6e2774206861766520746869732048797065476561722e00000060448201526064016108f2565b6040516331a9108f60e11b8152600481018490527f0000000000000000000000004af790223169a8621095871375f79425725d22c96001600160a01b031690636352211e90602401602060405180830381865afa158015611432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114569190613e1d565b6001600160a01b0316336001600160a01b0316146114b65760405162461bcd60e51b815260206004820152601d60248201527f596f7520646f6e2774206f776e207468697320487970655361696e742e00000060448201526064016108f2565b8115611885576000838152600260205260409020546001600160a01b03161561155e5760405162461bcd60e51b815260206004820152604e60248201527f5468697320487970655361696e74206973206e6f74207468652066697273742060448201527f74696d6520746f207472616e73666f726d2c20736f20796f752063616e206e6f60648201526d3a103ab9b290243cb832a1b7b4b760911b608482015260a4016108f2565b604051627eeac760e11b8152336004820152600060248201819052907f000000000000000000000000509a4d150036fe9b0cb83594d44bdd21ad8cfdf26001600160a01b03169062fdd58e90604401602060405180830381865afa1580156115ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ee9190613e04565b116116475760405162461bcd60e51b815260206004820152602360248201527f54686973206164647265737320646f6573206e6f74206861766520487970654360448201526237b4b760e91b60648201526084016108f2565b6000838152601160209081526040909120805460ff1916600117905561166d90846129c9565b1580156116825750611680601e846129c9565b155b80156116965750606461169460195490565b105b156117aa5760408051608081018252602c54808252602d546001600160401b03811660208401819052600160401b820463ffffffff16848601819052600160601b90920461ffff166060850181905294516305d3b1d360e41b8152600481019390935260248301526044820193909352606481019290925260016084830152906000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a4015b6020604051808303816000875af115801561176d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117919190613e04565b6000908152601260205260409020859055506109059050565b6117b5601e846129c9565b80156117c95750600a6117c7601b5490565b105b156118855760408051608081018252602c54808252602d546001600160401b03811660208401819052600160401b820463ffffffff16848601819052600160601b90920461ffff166060850181905294516305d3b1d360e41b8152600481019390935260248301526044820193909352606481019290925260016084830152906000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a40161174e565b604051635c46a7ef60e11b81526001600160a01b037f0000000000000000000000004af790223169a8621095871375f79425725d22c9169063b88d4fde906118d590339030908890600401613e3a565b600060405180830381600087803b1580156118ef57600080fd5b505af1158015611903573d6000803e3d6000fd5b50505050505050565b6119146126f9565b600f61076f8282613eda565b6000818152600260205260408120546001600160a01b0316806107465760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108f2565b60006001600160a01b0382166119ea5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108f2565b506001600160a01b031660009081526003602052604090205490565b611a0e6126f9565b611a186000612bc0565b565b611a226126f9565b604080516080810182528481526001600160401b039095166020860181905263ffffffff90931690850181905261ffff9091166060909401849052602c92909255602d8054600160601b90940261ffff60601b19600160401b9094026bffffffffffffffffffffffff199095169092179390931791909116179055565b611aa76126f9565b602d805461ffff909216600160601b0261ffff60601b19909216919091179055565b60606001805461078290613cf6565b611ae06126f9565b602c55565b816daaeb6d7670e522a718067333cd4e3b15801590611b065750600e5460ff165b15611baf57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b879190613d30565b611baf57604051633b79c77360e21b81526001600160a01b03821660048201526024016108f2565b6109058383612c12565b611bc16126f9565b602d805463ffffffff909216600160401b026bffffffff000000000000000019909216919091179055565b611bf46126f9565b60005b815181101561076f57611c2d828281518110611c1557611c15613d84565b6020026020010151601e612c1d90919063ffffffff16565b5080611c3881613f99565b915050611bf7565b6060610758601e6126ec565b611c546126f9565b600e805460ff1916911515919091179055565b836daaeb6d7670e522a718067333cd4e3b15801590611c885750600e5460ff165b15611d4057336001600160a01b03821603611cae57611ca985858585612c29565b611d4c565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611cfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d219190613d30565b611d4057604051633b79c77360e21b81523360048201526024016108f2565b611d4c85858585612c29565b5050505050565b611d5b6126f9565b60008181526010602052604090206109058382613eda565b6000818152600260205260409020546060906001600160a01b0316611dd25760405162461bcd60e51b81526020600482015260156024820152742a37b5b2b7103237b2b9903737ba1032bc34b9ba1760591b60448201526064016108f2565b600080805260106020527f6e0956cda88cad152e89927e53611735b61a5c762d1428573c6931b0a5efcb018054611e0890613cf6565b80601f0160208091040260200160405190810160405280929190818152602001828054611e3490613cf6565b8015611e815780601f10611e5657610100808354040283529160200191611e81565b820191906000526020600020905b815481529060010190602001808311611e6457829003601f168201915b5050506000868152601860205260409020549293505090159050611fda57600160005260106020527f8c6065603763fec3f5742441d3833f3f43b982453612d76adb39a885e3006b5f8054611ed590613cf6565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0190613cf6565b8015611f4e5780601f10611f2357610100808354040283529160200191611f4e565b820191906000526020600020905b815481529060010190602001808311611f3157829003601f168201915b505050505090506000815111611f9857600f611f73611f6e600286613fb2565b612c5b565b604051602001611f84929190613fc6565b604051602081830303815290604052611fd3565b6000838152601860205260409020548190611fb290612c5b565b604051602001611fc392919061404d565b6040516020818303038152906040525b9392505050565b600083815260176020526040902054156120d757600260005260106020527f853b2fefe141400fef543280f93d98bd49996069f632d0d20236afeeed8e46a2805461202490613cf6565b80601f016020809104026020016040519081016040528092919081815260200182805461205090613cf6565b801561209d5780601f106120725761010080835404028352916020019161209d565b820191906000526020600020905b81548152906001019060200180831161208057829003601f168201915b5050505050905060008151116120bd57600f611f73611f6e600286613fb2565b6000838152601760205260409020548190611fb290612c5b565b600083815260166020526040902054156121d457600360005260106020527fb3edd0d534d647cffdae9f1294f11ad21f3fcf2814bea44c92bbb8d384a57d9e805461212190613cf6565b80601f016020809104026020016040519081016040528092919081815260200182805461214d90613cf6565b801561219a5780601f1061216f5761010080835404028352916020019161219a565b820191906000526020600020905b81548152906001019060200180831161217d57829003601f168201915b5050505050905060008151116121ba57600f611f73611f6e600286613fb2565b6000838152601660205260409020548190611fb290612c5b565b600083815260156020526040902054156122d157600460005260106020527f1588ac671d87f82adc0e6ae8ab009c0de98f92a20243897597e566bc59b9c126805461221e90613cf6565b80601f016020809104026020016040519081016040528092919081815260200182805461224a90613cf6565b80156122975780601f1061226c57610100808354040283529160200191612297565b820191906000526020600020905b81548152906001019060200180831161227a57829003601f168201915b5050505050905060008151116122b757600f611f73611f6e600286613fb2565b6000838152601560205260409020548190611fb290612c5b565b600083815260146020526040902054156123ce57600560005260106020527f61a7346ab5ebdac457db2a901eaf1b805239b6049a1b2f34bab85e2e274f39cb805461231b90613cf6565b80601f016020809104026020016040519081016040528092919081815260200182805461234790613cf6565b80156123945780601f1061236957610100808354040283529160200191612394565b820191906000526020600020905b81548152906001019060200180831161237757829003601f168201915b5050505050905060008151116123b457600f611f73611f6e600286613fb2565b6000838152601460205260409020548190611fb290612c5b565b60008151116123e757600f611f73611f6e600286613fb2565b80611fb284612c5b565b3233146124405760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e7472616374000060448201526064016108f2565b600e54610100900460ff166124675760405162461bcd60e51b81526004016108f290613d4d565b604051627eeac760e11b8152336004820152602481018290526000907f0000000000000000000000007851cf4f9808fd4389cc5c7c13f4ced86fb301a56001600160a01b03169062fdd58e90604401602060405180830381865afa1580156124d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f79190613e04565b116125445760405162461bcd60e51b815260206004820152601d60248201527f596f7520646f6e2774206861766520746869732048797065476561722e00000060448201526064016108f2565b61254d82611920565b6001600160a01b0316336001600160a01b0316146125ad5760405162461bcd60e51b815260206004820152601d60248201527f596f7520646f6e2774206f776e20746869732048797065416c69656e2e00000060448201526064016108f2565b61076f333084611109565b6125c06126f9565b60005b815181101561076f576125f98282815181106125e1576125e1613d84565b60200260200101516020612c1d90919063ffffffff16565b508061260481613f99565b9150506125c3565b60006126166126f9565b5060009081526011602052604090205460ff1690565b6126346126f9565b600e80549115156101000261ff0019909216919091179055565b6126566126f9565b6001600160a01b0381166126bb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108f2565b6126c481612bc0565b50565b60006001600160e01b0319821663152a902d60e11b1480610746575061074682612d63565b60606000611fd383612d88565b600b546001600160a01b03163314611a185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108f2565b6127106001600160601b03821611156127c15760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084016108f2565b6001600160a01b0382166128175760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108f2565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600c55565b6000818152600260205260409020546001600160a01b03166126c45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108f2565b60006128ba82611920565b9050806001600160a01b0316836001600160a01b0316036129275760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108f2565b336001600160a01b0382161480612943575061294381336106d1565b6129b55760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108f2565b6109058383612de3565b61076f8282612e51565b60008181526001830160205260408120541515611fd3565b6129ec848484612e6b565b6129f884848484613012565b610f7f5760405162461bcd60e51b81526004016108f290614073565b6000600a82600081518110612a2b57612a2b613d84565b6020026020010151612a3d9190613fb2565b6000848152601260209081526040808320548084526013909252808320849055516331a9108f60e11b815260048101829052929350917f0000000000000000000000004af790223169a8621095871375f79425725d22c96001600160a01b031690636352211e90602401602060405180830381865afa158015612ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae89190613e1d565b604051635c46a7ef60e11b81529091506001600160a01b037f0000000000000000000000004af790223169a8621095871375f79425725d22c9169063b88d4fde90612b3b90849030908790600401613e3a565b600060405180830381600087803b158015612b5557600080fd5b505af1158015612b69573d6000803e3d6000fd5b505050505050505050565b612b7e3382613113565b612b9a5760405162461bcd60e51b81526004016108f2906140c5565b610905838383612e6b565b61090583838360405180602001604052806000815250611c67565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61076f338383613191565b6000611fd3838361325f565b612c333383613113565b612c4f5760405162461bcd60e51b81526004016108f2906140c5565b610f7f848484846129e1565b606081600003612c825750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612cac5780612c9681613f99565b9150612ca59050600a83613df0565b9150612c86565b6000816001600160401b03811115612cc657612cc6613840565b6040519080825280601f01601f191660200182016040528015612cf0576020820181803683370190505b5090505b8415612d5b57612d05600183614113565b9150612d12600a86613fb2565b612d1d906030613db0565b60f81b818381518110612d3257612d32613d84565b60200101906001600160f81b031916908160001a905350612d54600a86613df0565b9450612cf4565b949350505050565b60006001600160e01b0319821663780e9d6360e01b14806107465750610746826132ae565b606081600001805480602002602001604051908101604052809291908181526020018280548015610e8f57602002820191906000526020600020905b815481526020019060010190808311612dc45750505050509050919050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612e1882611920565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61076f8282604051806020016040528060008152506132fe565b826001600160a01b0316612e7e82611920565b6001600160a01b031614612ee25760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108f2565b6001600160a01b038216612f445760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108f2565b612f4f838383613331565b612f5a600082612de3565b6001600160a01b0383166000908152600360205260408120805460019290612f83908490614113565b90915550506001600160a01b0382166000908152600360205260408120805460019290612fb1908490613db0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b1561310857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613056903390899088908890600401614126565b6020604051808303816000875af1925050508015613091575060408051601f3d908101601f1916820190925261308e91810190614163565b60015b6130ee573d8080156130bf576040519150601f19603f3d011682016040523d82523d6000602084013e6130c4565b606091505b5080516000036130e65760405162461bcd60e51b81526004016108f290614073565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612d5b565b506001949350505050565b60008061311f83611920565b9050806001600160a01b0316846001600160a01b0316148061316657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80612d5b5750836001600160a01b031661317f84610805565b6001600160a01b031614949350505050565b816001600160a01b0316836001600160a01b0316036131f25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108f2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008181526001830160205260408120546132a657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610746565b506000610746565b60006001600160e01b031982166380ac58cd60e01b14806132df57506001600160e01b03198216635b5e139f60e01b145b8061074657506301ffc9a760e01b6001600160e01b0319831614610746565b61330883836133e9565b6133156000848484613012565b6109055760405162461bcd60e51b81526004016108f290614073565b6001600160a01b03831661338c5761338781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6133af565b816001600160a01b0316836001600160a01b0316146133af576133af8382613537565b6001600160a01b0382166133c657610905816135d4565b826001600160a01b0316826001600160a01b031614610905576109058282613683565b6001600160a01b03821661343f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108f2565b6000818152600260205260409020546001600160a01b0316156134a45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108f2565b6134b060008383613331565b6001600160a01b03821660009081526003602052604081208054600192906134d9908490613db0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161354484611980565b61354e9190614113565b6000838152600760205260409020549091508082146135a1576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906135e690600190614113565b6000838152600960205260408120546008805493945090928490811061360e5761360e613d84565b90600052602060002001549050806008838154811061362f5761362f613d84565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061366757613667614180565b6001900381819060005260206000200160009055905550505050565b600061368e83611980565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b0319811681146126c457600080fd5b6000602082840312156136ef57600080fd5b8135611fd3816136c7565b6020808252825182820181905260009190848201906040850190845b8181101561373257835183529284019291840191600101613716565b50909695505050505050565b6001600160a01b03811681146126c457600080fd5b6000806040838503121561376657600080fd5b82356137718161373e565b915060208301356001600160601b038116811461378d57600080fd5b809150509250929050565b60005b838110156137b357818101518382015260200161379b565b50506000910152565b600081518084526137d4816020860160208601613798565b601f01601f19169290920160200192915050565b602081526000611fd360208301846137bc565b60006020828403121561380d57600080fd5b5035919050565b6000806040838503121561382757600080fd5b82356138328161373e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561387e5761387e613840565b604052919050565b60006001600160401b0383111561389f5761389f613840565b6138b2601f8401601f1916602001613856565b90508281528383830111156138c657600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156138f357600080fd5b84356138fe8161373e565b9350602085013561390e8161373e565b92506040850135915060608501356001600160401b0381111561393057600080fd5b8501601f8101871361394157600080fd5b61395087823560208401613886565b91505092959194509250565b600082601f83011261396d57600080fd5b813560206001600160401b0382111561398857613988613840565b8160051b613997828201613856565b92835284810182019282810190878511156139b157600080fd5b83870192505b848310156139d0578235825291830191908301906139b7565b979650505050505050565b600080604083850312156139ee57600080fd5b8235915060208301356001600160401b03811115613a0b57600080fd5b613a178582860161395c565b9150509250929050565b600080600060608486031215613a3657600080fd5b8335613a418161373e565b92506020840135613a518161373e565b929592945050506040919091013590565b60008060408385031215613a7557600080fd5b50508035926020909101359150565b80356001600160401b0381168114610e9757600080fd5b600060208284031215613aad57600080fd5b611fd382613a84565b80151581146126c457600080fd5b600080600060608486031215613ad957600080fd5b833592506020840135613a5181613ab6565b600082601f830112613afc57600080fd5b611fd383833560208501613886565b600060208284031215613b1d57600080fd5b81356001600160401b03811115613b3357600080fd5b612d5b84828501613aeb565b600060208284031215613b5157600080fd5b8135611fd38161373e565b803563ffffffff81168114610e9757600080fd5b803561ffff81168114610e9757600080fd5b60008060008060808587031215613b9857600080fd5b613ba185613a84565b935060208501359250613bb660408601613b5c565b9150613bc460608601613b70565b905092959194509250565b600060208284031215613be157600080fd5b611fd382613b70565b60008060408385031215613bfd57600080fd5b8235613c088161373e565b9150602083013561378d81613ab6565b600060208284031215613c2a57600080fd5b611fd382613b5c565b600060208284031215613c4557600080fd5b81356001600160401b03811115613c5b57600080fd5b612d5b8482850161395c565b600060208284031215613c7957600080fd5b8135611fd381613ab6565b60008060408385031215613c9757600080fd5b82356001600160401b03811115613cad57600080fd5b613cb985828601613aeb565b95602094909401359450505050565b60008060408385031215613cdb57600080fd5b8235613ce68161373e565b9150602083013561378d8161373e565b600181811c90821680613d0a57607f821691505b602082108103613d2a57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215613d4257600080fd5b8151611fd381613ab6565b60208082526018908201527f5472616e73666f726d20646f65736e27742073746172742e0000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561074657610746613d9a565b808202811582820484141761074657610746613d9a565b634e487b7160e01b600052601260045260246000fd5b600082613dff57613dff613dda565b500490565b600060208284031215613e1657600080fd5b5051919050565b600060208284031215613e2f57600080fd5b8151611fd38161373e565b6001600160a01b0393841681529190921660208201526040810191909152608060608201819052601690820152752a3930b739b337b936903a3790243cb832a0b634b2b760511b60a082015260c00190565b601f82111561090557600081815260208120601f850160051c81016020861015613eb35750805b601f850160051c820191505b81811015613ed257828155600101613ebf565b505050505050565b81516001600160401b03811115613ef357613ef3613840565b613f0781613f018454613cf6565b84613e8c565b602080601f831160018114613f3c5760008415613f245750858301515b600019600386901b1c1916600185901b178555613ed2565b600085815260208120601f198616915b82811015613f6b57888601518255948401946001909101908401613f4c565b5085821015613f895787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201613fab57613fab613d9a565b5060010190565b600082613fc157613fc1613dda565b500690565b6000808454613fd481613cf6565b60018281168015613fec576001811461400157614030565b60ff1984168752821515830287019450614030565b8860005260208060002060005b858110156140275781548a82015290840190820161400e565b50505082870194505b505050508351614044818360208801613798565b01949350505050565b6000835161405f818460208801613798565b835190830190614044818360208801613798565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b8181038181111561074657610746613d9a565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614159908301846137bc565b9695505050505050565b60006020828403121561417557600080fd5b8151611fd3816136c7565b634e487b7160e01b600052603160045260246000fdfea26469706673582212202e33978f90b9c0753973e42be17129f2a90318886dbca7928adae53d2974c45d64736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: Yes (200 runs)
HypeAliensGenesis.sol 3609 lines
// File: contracts/lib/Constants.sol


pragma solidity ^0.8.13;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// File: contracts/IOperatorFilterRegistry.sol


pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}
// File: contracts/OperatorFilterer.sol


pragma solidity ^0.8.13;


/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);
    bool public operatorFilteringEnabled = true;

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0 && operatorFilteringEnabled) {
            // Allow spending tokens from addresses with balance
            // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
            // from an EOA.
            if (from == msg.sender) {
                _;
                return;
            }
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), msg.sender)) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0 && operatorFilteringEnabled) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
        _;
    }
    
}
// File: contracts/DefaultOperatorFilterer.sol

pragma solidity ^0.8.13;



/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

// File: @chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol


pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

// File: @chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol


pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

// File: @chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol


pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

// File: @openzeppelin/contracts/utils/structs/EnumerableSet.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

// File: @openzeppelin/contracts/utils/Counters.sol


// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

// File: @openzeppelin/contracts/utils/math/SafeMath.sol


// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

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 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 subtraction 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;
        }
    }
}

// File: @openzeppelin/contracts/security/ReentrancyGuard.sol


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

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 making 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;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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 t...

// [truncated — 130598 bytes total]

Read Contract

COIN_ID 0x9ecc626a → uint256
DEFORMABLE_ALIEN 0xe9bee0f5 → uint256
GOLD2GALAXY 0x04ecbfc9 → uint256
GOLD_COIN 0xa0625f0f → uint256
NORMAL2GOLD 0xe88371e9 → uint256
NORMAL_COIN 0x13977ed7 → uint256
OPERATOR_FILTER_REGISTRY 0x41f43434 → address
RAMDOM 0x30c0c423 → uint256
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
getBaseURIMap 0x200b5e3a → string
getCoinMap 0xe8e3926e → bool
getGalaxyHS 0x02345d0c → uint256[]
getGoldHS 0xb7b7c128 → uint256[]
isApprovedForAll 0xe985e9c5 → bool
name 0x06fdde03 → string
operatorFilteringEnabled 0xfb796e6c → bool
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
requestConfig 0x52566e93 → bytes32, uint64, uint32, uint16
royaltyInfo 0x2a55205a → address, uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
transformActive 0xb276aa51 → bool

Write Contract 23 functions

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

approve 0x095ea7b3
address operator
uint256 tokenId
onERC721Received 0x150b7a02
address
address from
uint256 tokenId
bytes data
returns: bytes4
rawFulfillRandomWords 0x1fe543e3
uint256 requestId
uint256[] randomWords
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 _baseUri
setBaseURIMap 0xbf8030d0
string uri
uint256 id
setCallbackGasLimit 0xa4eb718c
uint32 _callbackGasLimit
setChainLinkConfig 0x85dc0721
uint64 _subId
bytes32 _keyHash
uint32 _callbackGasLimit
uint16 _requestConfirmations
setDefaultRoyalty 0x04634d8d
address _receiver
uint96 _feeNumerator
setGalaxyHS 0xd0609886
uint256[] _galaxyHS
setGoldHS 0xad687534
uint256[] _goldHS
setKeyHash 0x98544710
bytes32 _keyHash
setOperatorFilteringEnabled 0xb7c0b8e8
bool value
setRequestConfirmations 0x8824f5a7
uint16 _requestConfirmations
setSubId 0x3e2831fe
uint64 _subId
setTransformActive 0xeed3c876
bool _transformActive
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
transformAlien 0x531721db
uint256 hypeSaintId
bool useCoin
uint256 gearId
transformSaints 0xcdd32ff9
uint256 _alienId
uint256 gearId

Recent Transactions

No transactions found for this address