Address Contract Partially Verified
Address
0x1BD5081038AAFedDc29C09c1ae7dF564Dd6846eA
Balance
0 ETH
Nonce
1
Code Size
22680 bytes
Creator
0x4158077D...47B0 at tx 0x2779e961...e45272
Indexed Transactions
0
Contract Bytecode
22680 bytes
0x6080604052600436106104265760003560e01c8063715018a611610227578063b88d4fde1161012d578063df238800116100b0578063e86cbff011610077578063e86cbff014610d34578063e985e9c514610d54578063f2fde38b14610d9d578063f869195f14610dbd578063fe0efa1614610de157005b8063df23880014610cb2578063df7787a414610cd2578063e0d92ee714610ce8578063e1ce4a6914610d09578063e33b7de314610d1f57005b8063ceb93182116100f4578063ceb9318214610c0e578063d0a6bd9514610c2e578063d354f24014610c4e578063d9ecad7b14610c6e578063dd4b182314610c8e57005b8063b88d4fde14610b51578063c79b1ae614610b71578063c87b56dd14610b91578063cbeb74c214610bb1578063ce7c2ac214610bd857005b806391b7f5ed116101b5578063a0712d681161017c578063a0712d6814610ac8578063a22cb46514610adb578063af2eb6ff14610afb578063b534a5c414610b11578063b68dc8f114610b3157005b806391b7f5ed14610a3457806395d89b4114610a54578063977f047714610a695780639852595c14610a7c5780639c8b5ba614610ab257005b806387a5b67c116101f957806387a5b67c146109935780638b83209b146109c05780638d859f3e146109e05780638da5cb5b146109f65780638fd9ba0814610a1457005b8063715018a61461090c578063767d4174146109215780637e91b36f14610941578063835f6e041461096157005b806332cb6b0c1161032c5780634f548490116102ba5780635e457c10116102815780635e457c101461087f57806360d938dc146108925780636352211e146108ac5780636790a9de146108cc57806370a08231146108ec57005b80634f548490146108045780634f6ccce71461081757806350c5a00c1461083757806352b93b721461084d5780635b92ac0d1461086057005b8063438b6300116102fe578063438b63001461076057806345a15d641461078d5780634a994eef146107ae5780634b7911c9146107ce5780634d44660c146107e457005b806332cb6b0c146106ff5780633948ed7c146107155780633a98ef391461072b57806342842e0e1461074057005b8063129640d3116103b45780631eb18a4a1161037b5780631eb18a4a146106595780632007ed0114610679578063223353951461068f57806323b872dd146106bf5780632f745c59146106df57005b8063129640d3146105ce57806317968649146105ee57806318160ddd1461060457806318f9b02314610619578063191655871461063957005b806307779627116103f85780630777962714610520578063081812fc14610540578063095ea7b3146105605780630b53af96146105805780631001d999146105a057005b806301ffc9a714610471578063030c5f87146104a657806304aa59ef146104c657806306fdde03146104fe57005b3661046f577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b005b34801561047d57600080fd5b5061049161048c3660046148cc565b610e01565b60405190151581526020015b60405180910390f35b3480156104b257600080fd5b5061046f6104c1366004614944565b610e53565b3480156104d257600080fd5b50601a546104e6906001600160a01b031681565b6040516001600160a01b03909116815260200161049d565b34801561050a57600080fd5b50610513610fb7565b60405161049d91906149ef565b34801561052c57600080fd5b5061049161053b366004614a17565b611049565b34801561054c57600080fd5b506104e661055b366004614a34565b611099565b34801561056c57600080fd5b5061046f61057b366004614a4d565b611121565b34801561058c57600080fd5b5061046f61059b366004614a79565b611237565b3480156105ac57600080fd5b506105c06105bb366004614ae4565b611339565b60405190815260200161049d565b3480156105da57600080fd5b5061046f6105e9366004614b25565b61138c565b3480156105fa57600080fd5b506105c0601b5481565b34801561061057600080fd5b506016546105c0565b34801561062557600080fd5b5061046f610634366004614a4d565b611527565b34801561064557600080fd5b5061046f610654366004614a17565b61155f565b34801561066557600080fd5b5061046f610674366004614bfc565b611730565b34801561068557600080fd5b506105c060135481565b34801561069b57600080fd5b506106af6106aa366004614a34565b6117b2565b60405161049d9493929190614c5f565b3480156106cb57600080fd5b5061046f6106da366004614caf565b6117ff565b3480156106eb57600080fd5b506105c06106fa366004614a4d565b611830565b34801561070b57600080fd5b506105c0600f5481565b34801561072157600080fd5b506105c060155481565b34801561073757600080fd5b506009546105c0565b34801561074c57600080fd5b5061046f61075b366004614caf565b6118fc565b34801561076c57600080fd5b5061078061077b366004614a17565b611917565b60405161049d9190614d2b565b34801561079957600080fd5b5060175461049190600160201b900460ff1681565b3480156107ba57600080fd5b5061046f6107c9366004614d3e565b6119ae565b3480156107da57600080fd5b506105c060145481565b3480156107f057600080fd5b506104916107ff366004614d73565b611a03565b61046f610812366004614a4d565b611a85565b34801561082357600080fd5b506105c0610832366004614a34565b611b61565b34801561084357600080fd5b506105c0600e5481565b61046f61085b366004614d73565b611bc9565b34801561086c57600080fd5b5060175461049190610100900460ff1681565b61046f61088d366004614dc7565b611df7565b34801561089e57600080fd5b506017546104919060ff1681565b3480156108b857600080fd5b506104e66108c7366004614a34565b612175565b3480156108d857600080fd5b5061046f6108e7366004614ea1565b6121fb565b3480156108f857600080fd5b506105c0610907366004614a17565b612243565b34801561091857600080fd5b5061046f6122ca565b34801561092d57600080fd5b506017546104919062010000900460ff1681565b34801561094d57600080fd5b5061046f61095c366004614a79565b612300565b34801561096d57600080fd5b5060125461097e9063ffffffff1681565b60405163ffffffff909116815260200161049d565b34801561099f57600080fd5b506105c06109ae366004614a17565b601d6020526000908152604090205481565b3480156109cc57600080fd5b506104e66109db366004614a34565b61240f565b3480156109ec57600080fd5b506105c060115481565b348015610a0257600080fd5b506007546001600160a01b03166104e6565b348015610a2057600080fd5b506105c0610a2f366004614a34565b61243f565b348015610a4057600080fd5b5061046f610a4f366004614a34565b612618565b348015610a6057600080fd5b5061051361266e565b61046f610a77366004614f00565b61267d565b348015610a8857600080fd5b506105c0610a97366004614a17565b6001600160a01b03166000908152600c602052604090205490565b348015610abe57600080fd5b506105c060195481565b61046f610ad6366004614a34565b6127ff565b348015610ae757600080fd5b5061046f610af6366004614d3e565b612a85565b348015610b0757600080fd5b506105c0601c5481565b348015610b1d57600080fd5b5061046f610b2c366004614f66565b612b4a565b348015610b3d57600080fd5b5061046f610b4c366004614fe8565b612bbf565b348015610b5d57600080fd5b5061046f610b6c366004615033565b612c23565b348015610b7d57600080fd5b5061046f610b8c366004615112565b612c55565b348015610b9d57600080fd5b50610513610bac366004614a34565b612d3f565b348015610bbd57600080fd5b506017546104e690600160281b90046001600160a01b031681565b348015610be457600080fd5b506105c0610bf3366004614a17565b6001600160a01b03166000908152600b602052604090205490565b348015610c1a57600080fd5b5061046f610c29366004614ae4565b612ddb565b348015610c3a57600080fd5b5061046f610c49366004614ae4565b6131dc565b348015610c5a57600080fd5b5061046f610c6936600461513e565b6134ac565b348015610c7a57600080fd5b5061046f610c89366004615168565b613552565b348015610c9a57600080fd5b5060125461097e90600160401b900463ffffffff1681565b348015610cbe57600080fd5b5061046f610ccd36600461518a565b613ab0565b348015610cde57600080fd5b506105c060105481565b348015610cf457600080fd5b50601754610491906301000000900460ff1681565b348015610d1557600080fd5b506105c060185481565b348015610d2b57600080fd5b50600a546105c0565b348015610d4057600080fd5b5061046f610d4f366004614fe8565b613ae5565b348015610d6057600080fd5b50610491610d6f3660046151b1565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610da957600080fd5b5061046f610db8366004614a17565b613b3d565b348015610dc957600080fd5b5060125461097e90600160201b900463ffffffff1681565b348015610ded57600080fd5b5061046f610dfc3660046151ea565b613b96565b60006001600160e01b031982166380ac58cd60e01b1480610e3257506001600160e01b03198216635b5e139f60e01b145b80610e4d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b601754600160201b900460ff16610e855760405162461bcd60e51b8152600401610e7c90615233565b60405180910390fd5b600042815b84811015610faf57610eb3868683818110610ea757610ea761526a565b90506020020135613c8d565b610ecf5760405162461bcd60e51b8152600401610e7c90615280565b6016868683818110610ee357610ee361526a565b9050602002013581548110610efa57610efa61526a565b600091825260209091200180549093506001600160a01b03163314610f715760405162461bcd60e51b815260206004820152602760248201527f54454e5345493a205374616b696e6720746f6b656e2074686174206973206e6f6044820152661d081bdddb995960ca1b6064820152608401610e7c565b83610f7d576001610f7f565b815b835463ffffffff91909116600160c81b0263ffffffff60c81b19909116178355610fa8816152d9565b9050610e8a565b505050505050565b606060008054610fc6906152f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610ff2906152f4565b801561103f5780601f106110145761010080835404028352916020019161103f565b820191906000526020600020905b81548152906001019060200180831161102257829003601f168201915b5050505050905090565b6007546000906001600160a01b031633146110765760405162461bcd60e51b8152600401610e7c9061532f565b506001600160a01b03811660009081526008602052604090205460ff165b919050565b60006110a482613c8d565b6111055760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610e7c565b506000908152600560205260409020546001600160a01b031690565b600061112c82613cd7565b9050806001600160a01b0316836001600160a01b0316141561119a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610e7c565b336001600160a01b03821614806111b657506111b68133610d6f565b6112285760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610e7c565b6112328383613d63565b505050565b3360009081526008602052604090205460ff166112665760405162461bcd60e51b8152600401610e7c90615364565b60005b8381101561133257611286858583818110610ea757610ea761526a565b6112a25760405162461bcd60e51b8152600401610e7c90615280565b8282828181106112b4576112b461526a565b90506020020160208101906112c9919061538e565b60168686848181106112dd576112dd61526a565b90506020020135815481106112f4576112f461526a565b6000918252602090912001805463ffffffff92909216600160a81b0263ffffffff60a81b1990921691909117905561132b816152d9565b9050611269565b5050505050565b60008060005b838110156113845761136885858381811061135c5761135c61526a565b9050602002013561243f565b61137290836153a9565b915061137d816152d9565b905061133f565b509392505050565b3360009081526008602052604090205460ff166113bb5760405162461bcd60e51b8152600401610e7c90615364565b6000805b8881101561151b576113dc8a8a83818110610ea757610ea761526a565b6113f85760405162461bcd60e51b8152600401610e7c90615280565b60168a8a8381811061140c5761140c61526a565b90506020020135815481106114235761142361526a565b9060005260206000200191508787828181106114415761144161526a565b905060200201602081019061145691906153c1565b8254839060ff60a01b1916600160a01b83600281111561147857611478614c49565b021790555085858281811061148f5761148f61526a565b90506020020160208101906114a4919061538e565b825463ffffffff91909116600160a81b0263ffffffff60a81b199091161782558383828181106114d6576114d661526a565b90506020020160208101906114eb919061538e565b825463ffffffff91909116600160c81b0263ffffffff60c81b19909116178255611514816152d9565b90506113bf565b50505050505050505050565b6007546001600160a01b031633146115515760405162461bcd60e51b8152600401610e7c9061532f565b61155b8282613dd1565b5050565b6001600160a01b0381166000908152600b60205260409020546115d35760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610e7c565b6000600a54476115e391906153a9565b6001600160a01b0383166000908152600c6020908152604080832054600954600b90935290832054939450919261161a90856153e2565b6116249190615417565b61162e919061542b565b9050806116915760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610e7c565b6001600160a01b0383166000908152600c60205260409020546116b59082906153a9565b6001600160a01b0384166000908152600c6020526040902055600a546116dc9082906153a9565b600a556116e98382613fb7565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b3360009081526008602052604090205460ff1661175f5760405162461bcd60e51b8152600401610e7c90615364565b60178054951515600160201b0264ff0000000019909616959095179094556012805463ffffffff909416600160401b026bffffffff00000000000000001990941693909317909255601355601455601555565b601681815481106117c257600080fd5b6000918252602090912001546001600160a01b038116915060ff600160a01b8204169063ffffffff600160a81b8204811691600160c81b90041684565b61180933826140d0565b6118255760405162461bcd60e51b8152600401610e7c90615442565b6112328383836141b6565b60008060005b60165481101561189f57601681815481106118535761185361526a565b6000918252602090912001546001600160a01b038681169116141561188f5783821415611883579150610e4d9050565b61188c826152d9565b91505b611898816152d9565b9050611836565b5060405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e7c565b61123283838360405180602001604052806000815250612c23565b6060600061192483612243565b90506000816001600160401b038111156119405761194061501d565b604051908082528060200260200182016040528015611969578160200160208202803683370190505b50905060005b82811015611384576119818582611830565b8282815181106119935761199361526a565b60209081029190910101526119a7816152d9565b905061196f565b6007546001600160a01b031633146119d85760405162461bcd60e51b8152600401610e7c9061532f565b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b6000805b82811015611a7857846001600160a01b03166016858584818110611a2d57611a2d61526a565b9050602002013581548110611a4457611a4461526a565b6000918252602090912001546001600160a01b031614611a68576000915050611a7e565b611a71816152d9565b9050611a07565b50600190505b9392505050565b3360009081526008602052604090205460ff16611ab45760405162461bcd60e51b8152600401610e7c90615364565b6000611abf60165490565b600f54909150611acf83836153a9565b1115611aed5760405162461bcd60e51b8152600401610e7c90615493565b60005b82811015611b5b57600082611b04816152d9565b93509050611b14858260026142cd565b60405181906001600160a01b038716907f1f4971ae1712e1c88418382994876f5d041e83f9197070e0b2edbfa29331e4f690600090a350611b54816152d9565b9050611af0565b50505050565b6000611b6c60165490565b8210611bc55760405162461bcd60e51b815260206004820152602260248201527f54454e5345493a20676c6f62616c20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610e7c565b5090565b3360009081526008602052604090205460ff16611bf85760405162461bcd60e51b8152600401610e7c90615364565b60005b81811015611b5b57611c18838383818110610ea757610ea761526a565b611c345760405162461bcd60e51b8152600401610e7c90615280565b836001600160a01b0316611c5f848484818110611c5357611c5361526a565b90506020020135612175565b6001600160a01b031614611cca5760405162461bcd60e51b815260206004820152602c60248201527f54454e5345493a2045766f6c7574696f6e206f6620746f6b656e20746861742060448201526b1a5cc81b9bdd081bdddb995960a21b6064820152608401610e7c565b60006016848484818110611ce057611ce061526a565b9050602002013581548110611cf757611cf761526a565b600091825260209091200154600160a01b900460ff166002811115611d1e57611d1e614c49565b14611d3b5760405162461bcd60e51b8152600401610e7c906154d4565b60016016848484818110611d5157611d5161526a565b9050602002013581548110611d6857611d6861526a565b6000918252602090912001805460ff60a01b1916600160a01b836002811115611d9357611d93614c49565b0217905550828282818110611daa57611daa61526a565b90506020020135846001600160a01b03167fc09feda7adb0a8bbe69c92dbe769d478537a966979f11dff2dda8bc034dba19d60405160405180910390a3611df0816152d9565b9050611bfb565b3360009081526008602052604090205460ff16611e265760405162461bcd60e51b8152600401610e7c90615364565b848314611e925760405162461bcd60e51b815260206004820152603460248201527f54454e5345493a204d7573742070726f7669646520657175616c207175616e74604482015273697469657320616e6420726563697069656e747360601b6064820152608401610e7c565b828114611ef95760405162461bcd60e51b815260206004820152602f60248201527f54454e5345493a204d7573742070726f7669646520657175616c20726563697060448201526e69656e747320616e6420747970657360881b6064820152608401610e7c565b600080611f0560165490565b905060005b87811015611f4857888882818110611f2457611f2461526a565b9050602002013583611f3691906153a9565b9250611f41816152d9565b9050611f0a565b50600f54611f5683836153a9565b10611f735760405162461bcd60e51b8152600401610e7c90615493565b60005b8581101561216a5760005b898983818110611f9357611f9361526a565b9050602002013581101561215957600083611fad816152d9565b94509050612008898985818110611fc657611fc661526a565b9050602002016020810190611fdb9190614a17565b82898987818110611fee57611fee61526a565b905060200201602081019061200391906153c1565b6142cd565b600187878581811061201c5761201c61526a565b905060200201602081019061203191906153c1565b600281111561204257612042614c49565b14156120aa578089898581811061205b5761205b61526a565b90506020020160208101906120709190614a17565b6001600160a01b03167fc09feda7adb0a8bbe69c92dbe769d478537a966979f11dff2dda8bc034dba19d60405160405180910390a3612148565b60028787858181106120be576120be61526a565b90506020020160208101906120d391906153c1565b60028111156120e4576120e4614c49565b141561214857808989858181106120fd576120fd61526a565b90506020020160208101906121129190614a17565b6001600160a01b03167f1f4971ae1712e1c88418382994876f5d041e83f9197070e0b2edbfa29331e4f660405160405180910390a35b50612152816152d9565b9050611f81565b50612163816152d9565b9050611f76565b505050505050505050565b6000806016838154811061218b5761218b61526a565b6000918252602090912001546001600160a01b0316905080610e4d5760405162461bcd60e51b815260206004820152602360248201527f54454e5345493a20717565727920666f72206e6f6e6578697374656e7420746f60448201526235b2b760e91b6064820152608401610e7c565b3360009081526008602052604090205460ff1661222a5760405162461bcd60e51b8152600401610e7c90615364565b612236601f8585614826565b5061133260208383614826565b60006001600160a01b0382166122ae5760405162461bcd60e51b815260206004820152602a60248201527f54454e5345493a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610e7c565b506001600160a01b03166000908152601e602052604090205490565b6007546001600160a01b031633146122f45760405162461bcd60e51b8152600401610e7c9061532f565b6122fe60006143fd565b565b3360009081526008602052604090205460ff1661232f5760405162461bcd60e51b8152600401610e7c90615364565b8281146123965760405162461bcd60e51b815260206004820152602f60248201527f54454e5345493a204d7573742070726f7669646520657175616c206163636f7560448201526e1b9d1cc8185b9908185b1b1bddd959608a1b6064820152608401610e7c565b60005b83811015611332578282828181106123b3576123b361526a565b90506020020135601d60008787858181106123d0576123d061526a565b90506020020160208101906123e59190614a17565b6001600160a01b03168152602081019190915260400160002055612408816152d9565b9050612399565b6000600d82815481106124245761242461526a565b6000918252602090912001546001600160a01b031692915050565b601754600090600160201b900460ff1661246b5760405162461bcd60e51b8152600401610e7c90615233565b61247482613c8d565b6124905760405162461bcd60e51b8152600401610e7c90615280565b6000601683815481106124a5576124a561526a565b60009182526020918290206040805160808101909152910180546001600160a01b03811683529192909190830190600160a01b900460ff1660028111156124ee576124ee614c49565b60028111156124ff576124ff614c49565b8152905463ffffffff600160a81b820481166020840152600160c81b909104811660409092019190915260608201519192506002911610156125445750600092915050565b601254606082015160009163ffffffff600160401b90910481169161256a91164261542b565b6125749190615417565b905080612585575060009392505050565b60008260200151600281111561259d5761259d614c49565b14156125b8576013546125b090826153e2565b949350505050565b6001826020015160028111156125d0576125d0614c49565b14156125e3576014546125b090826153e2565b6002826020015160028111156125fb576125fb614c49565b141561260e576015546125b090826153e2565b5060009392505050565b3360009081526008602052604090205460ff166126475760405162461bcd60e51b8152600401610e7c90615364565b8060115414156126695760405162461bcd60e51b8152600401610e7c9061551a565b601155565b606060018054610fc6906152f4565b3360009081526008602052604090205460ff166126ac5760405162461bcd60e51b8152600401610e7c90615364565b601754600160201b900460ff166126d55760405162461bcd60e51b8152600401610e7c90615233565b600042815b848110156127f6576126f7868683818110610ea757610ea761526a565b6127135760405162461bcd60e51b8152600401610e7c90615280565b60168686838181106127275761272761526a565b905060200201358154811061273e5761273e61526a565b600091825260209091200180549093506001600160a01b038881169116146127b85760405162461bcd60e51b815260206004820152602760248201527f54454e5345493a207374616b696e6720746f6b656e2074686174206973206e6f6044820152661d081bdddb995960ca1b6064820152608401610e7c565b836127c45760016127c6565b815b835463ffffffff91909116600160c81b0263ffffffff60c81b199091161783556127ef816152d9565b90506126da565b50505050505050565b601754610100900460ff161561281457612902565b60175460ff16156128ba57336000908152601d60205260409020548111156128905760405162461bcd60e51b815260206004820152602960248201527f54454e5345493a204163636f756e74206973206e6f74206f6e2074686520616360448201526818d95cdcc81b1a5cdd60ba1b6064820152608401610e7c565b336000908152601d6020526040812080548392906128af90849061542b565b909155506129029050565b60405162461bcd60e51b815260206004820152601a60248201527f54454e5345493a2053616c65206973206e6f74206163746976650000000000006044820152606401610e7c565b600e54811115612913600e5461444f565b6040516020016129239190615551565b604051602081830303815290604052906129505760405162461bcd60e51b8152600401610e7c91906149ef565b506010548161295e33612243565b61296891906153a9565b111561297560105461444f565b604051602001612985919061558e565b604051602081830303815290604052906129b25760405162461bcd60e51b8152600401610e7c91906149ef565b50806011546129c191906153e2565b341015612a1a5760405162461bcd60e51b815260206004820152602160248201527f54454e5345493a2045746865722073656e74206973206e6f7420636f727265636044820152601d60fa1b6064820152608401610e7c565b6000612a2560165490565b600f54909150612a3583836153a9565b1115612a535760405162461bcd60e51b8152600401610e7c90615493565b60005b8281101561123257612a753383612a6c816152d9565b945060006142cd565b612a7e816152d9565b9050612a56565b6001600160a01b038216331415612ade5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e7c565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005b838110156127f657612baf8787878785818110612b6c57612b6c61526a565b9050602002013586868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c2392505050565b612bb8816152d9565b9050612b4d565b3360009081526008602052604090205460ff16612bee5760405162461bcd60e51b8152600401610e7c90615364565b601780546001600160a01b03909416600160281b0265010000000000600160c81b031990941693909317909255601855601955565b612c2d33836140d0565b612c495760405162461bcd60e51b8152600401610e7c90615442565b611b5b8484848461454c565b3360009081526008602052604090205460ff16612c845760405162461bcd60e51b8152600401610e7c90615364565b82600e54141580612c97575081600f5414155b80612ca457508060105414155b612cc05760405162461bcd60e51b8152600401610e7c9061551a565b601654821015612d315760405162461bcd60e51b815260206004820152603660248201527f54454e5345493a2053706563696669656420737570706c79206973206c6f776560448201527572207468616e2063757272656e742062616c616e636560501b6064820152608401610e7c565b600e92909255600f55601055565b6060612d4a82613c8d565b612da65760405162461bcd60e51b815260206004820152602760248201527f54454e5345493a2055524920717565727920666f72206e6f6e6578697374656e6044820152663a103a37b5b2b760c91b6064820152608401610e7c565b601f612db18361444f565b6020604051602001612dc59392919061566d565b6040516020818303038152906040529050919050565b60175462010000900460ff16612e335760405162461bcd60e51b815260206004820152601f60248201527f54454e5345493a2045766f6c7574696f6e206973206e6f7420616374697665006044820152606401610e7c565b60195415612f9c57601754600160281b90046001600160a01b0316612e9a5760405162461bcd60e51b815260206004820152601c60248201527f54454e5345493a20466c61736b20636f6e747261637420756e736574000000006044820152606401610e7c565b6040805160018082528183019092526000916020808301908036833701905050905060185481600081518110612ed257612ed261526a565b602090810291909101015260408051600180825281830190925260009181602001602082028036833701905050601954909150612f0f90846153e2565b81600081518110612f2257612f2261526a565b602090810291909101015260175460405163666abf2360e01b8152600160281b9091046001600160a01b03169063666abf2390612f67903390869086906004016156a0565b600060405180830381600087803b158015612f8157600080fd5b505af1158015612f95573d6000803e3d6000fd5b5050505050505b601b541561305057601a546001600160a01b0316612fcc5760405162461bcd60e51b8152600401610e7c906156e0565b601a54601b546001600160a01b03909116906359dc2dd2903390612ff19085906153e2565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561303757600080fd5b505af115801561304b573d6000803e3d6000fd5b505050505b6000805b82811015611b5b57613071848483818110610ea757610ea761526a565b61308d5760405162461bcd60e51b8152600401610e7c90615280565b60168484838181106130a1576130a161526a565b90506020020135815481106130b8576130b861526a565b600091825260209091200180549092506001600160a01b031633146131305760405162461bcd60e51b815260206004820152602860248201527f54454e5345493a2045766f6c76696e6720746f6b656e2074686174206973206e6044820152671bdd081bdddb995960c21b6064820152608401610e7c565b60008254600160a01b900460ff16600281111561314f5761314f614c49565b1461316c5760405162461bcd60e51b8152600401610e7c906154d4565b815460ff60a01b1916600160a01b17825583838281811061318f5761318f61526a565b90506020020135336001600160a01b03167fc09feda7adb0a8bbe69c92dbe769d478537a966979f11dff2dda8bc034dba19d60405160405180910390a36131d5816152d9565b9050613054565b601754600160201b900460ff166132055760405162461bcd60e51b8152600401610e7c90615233565b601a546001600160a01b031661322d5760405162461bcd60e51b8152600401610e7c906156e0565b6000804281846001600160401b0381111561324a5761324a61501d565b604051908082528060200260200182016040528015613273578160200160208202803683370190505b5090506000856001600160401b038111156132905761329061501d565b6040519080825280602002602001820160405280156132b9578160200160208202803683370190505b50905060005b8681101561343e576132dc888883818110610ea757610ea761526a565b6132f85760405162461bcd60e51b8152600401610e7c90615280565b601688888381811061330c5761330c61526a565b90506020020135815481106133235761332361526a565b600091825260209091200180549095506001600160a01b0316331461339b5760405162461bcd60e51b815260206004820152602860248201527f54454e5345493a20436c61696d696e6720746f6b656e2074686174206973206e6044820152671bdd081bdddb995960c21b6064820152608401610e7c565b6133b088888381811061135c5761135c61526a565b9550851561342e57858382815181106133cb576133cb61526a565b6020908102919091010152845482516001600160a01b03909116908390839081106133f8576133f861526a565b6001600160a01b039290921660209283029190910190910152845463ffffffff60c81b1916600160c81b63ffffffff8616021785555b613437816152d9565b90506132bf565b50601a5460405163c630623360e01b81526001600160a01b039091169063c6306233906134719084908690600401615717565b600060405180830381600087803b15801561348b57600080fd5b505af115801561349f573d6000803e3d6000fd5b5050505050505050505050565b3360009081526008602052604090205460ff166134db5760405162461bcd60e51b8152600401610e7c90615364565b60125463ffffffff8381169116141580613507575060125463ffffffff828116600160201b9092041614155b6135235760405162461bcd60e51b8152600401610e7c9061551a565b6012805463ffffffff928316600160201b0267ffffffffffffffff199091169290931691909117919091179055565b6017546301000000900460ff166135ab5760405162461bcd60e51b815260206004820152601e60248201527f54454e5345493a204272656564696e67206973206e6f742061637469766500006044820152606401610e7c565b6135b482613c8d565b80156135c457506135c481613c8d565b61361f5760405162461bcd60e51b815260206004820152602660248201527f54454e5345493a20517565727920666f72206e6f6e6578697374656e7420746f6044820152656b656e28732960d01b6064820152608401610e7c565b60008080601685815481106136365761363661526a565b600091825260209091200154600160a01b900460ff16600281111561365d5761365d614c49565b1415613726576001601684815481106136785761367861526a565b600091825260209091200154600160a01b900460ff16600281111561369f5761369f614c49565b14156136e857601684815481106136b8576136b861526a565b906000526020600020019150601683815481106136d7576136d761526a565b906000526020600020019050613835565b60405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21031b7b6b134b730ba34b7b760691b6044820152606401610e7c565b60016016858154811061373b5761373b61526a565b600091825260209091200154600160a01b900460ff16600281111561376257613762614c49565b14156137ed5760006016848154811061377d5761377d61526a565b600091825260209091200154600160a01b900460ff1660028111156137a4576137a4614c49565b14156136e857601684815481106137bd576137bd61526a565b906000526020600020019050601683815481106137dc576137dc61526a565b906000526020600020019150613835565b60405162461bcd60e51b815260206004820152601b60248201527f54454e5345493a20696e76616c696420636f6d62696e6174696f6e00000000006044820152606401610e7c565b8154429063ffffffff808316600160a81b909204161080156138675750815463ffffffff808316600160a81b90920416105b6138b35760405162461bcd60e51b815260206004820181905260248201527f54454e5345493a206272656564696e6720636f6f6c646f776e206163746976656044820152606401610e7c565b82546001600160a01b0316331415806138d6575081546001600160a01b03163314155b6139365760405162461bcd60e51b815260206004820152602b60248201527f54454e5345493a206272656564696e67206f6620746f6b656e2074686174206960448201526a1cc81b9bdd081bdddb995960aa1b6064820152608401610e7c565b600061394160165490565b600f549091506139528260016153a9565b11156139705760405162461bcd60e51b8152600401610e7c90615493565b601b5415613a0957601a546001600160a01b03166139a05760405162461bcd60e51b8152600401610e7c906156e0565b601a54601b54604051632cee16e960e11b815233600482015260248101919091526001600160a01b03909116906359dc2dd290604401600060405180830381600087803b1580156139f057600080fd5b505af1158015613a04573d6000803e3d6000fd5b505050505b601254613a1c9063ffffffff168361576d565b845463ffffffff60a81b1916600160a81b63ffffffff92831602178555601254613a4f91600160201b909104168361576d565b845463ffffffff91909116600160a81b0263ffffffff60a81b19909116178455613a7b338260026142cd565b604051819033907f1f4971ae1712e1c88418382994876f5d041e83f9197070e0b2edbfa29331e4f690600090a3505050505050565b6007546001600160a01b03163314613ada5760405162461bcd60e51b8152600401610e7c9061532f565b61123283838361457f565b3360009081526008602052604090205460ff16613b145760405162461bcd60e51b8152600401610e7c90615364565b601a80546001600160a01b0319166001600160a01b039490941693909317909255601b55601c55565b6007546001600160a01b03163314613b675760405162461bcd60e51b8152600401610e7c9061532f565b6001600160a01b0381166000908152600860205260409020805460ff19166001179055613b9381614618565b50565b3360009081526008602052604090205460ff16613bc55760405162461bcd60e51b8152600401610e7c90615364565b60175460ff161515841515141580613bec575060175460ff61010090910416151583151514155b80613c07575060175460ff6201000090910416151582151514155b80613c23575060175460ff630100000090910416151581151514155b613c3f5760405162461bcd60e51b8152600401610e7c9061551a565b6017805461ffff191694151561ff00191694909417610100931515939093029290921763ffff00001916620100009115159190910263ff000000191617630100000091151591909102179055565b60165460009082108015610e4d575060006001600160a01b031660168381548110613cba57613cba61526a565b6000918252602090912001546001600160a01b0316141592915050565b60008060048381548110613ced57613ced61526a565b6000918252602090912001546001600160a01b0316905080610e4d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610e7c565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613d9882613cd7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b038216613e3c5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401610e7c565b60008111613e8c5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401610e7c565b6001600160a01b0382166000908152600b602052604090205415613f065760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401610e7c565b600d8054600181019091557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384169081179091556000908152600b60205260409020819055600954613f6e9082906153a9565b600955604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b804710156140075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e7c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614054576040519150601f19603f3d011682016040523d82523d6000602084013e614059565b606091505b50509050806112325760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e7c565b60006140db82613c8d565b61413c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610e7c565b600061414783613cd7565b9050806001600160a01b0316846001600160a01b031614806141825750836001600160a01b031661417784611099565b6001600160a01b0316145b806125b057506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff166125b0565b826001600160a01b0316601682815481106141d3576141d361526a565b6000918252602090912001546001600160a01b0316146142495760405162461bcd60e51b815260206004820152602b60248201527f54454e5345493a207472616e73666572206f6620746f6b656e2074686174206960448201526a1cc81b9bdd081bdddb995960aa1b6064820152608401610e7c565b614254600082613d63565b61425f8383836146b0565b81601682815481106142735761427361526a565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6142d9600084846146b0565b60166040518060800160405280856001600160a01b0316815260200183600281111561430757614307614c49565b815260006020808301829052604090920181905283546001810185559381528190208251930180546001600160a01b039094166001600160a01b031985168117825591830151929390929183916001600160a81b03191617600160a01b83600281111561437657614376614c49565b0217905550604082810151825460609094015167ffffffffffffffff60a81b19909416600160a81b63ffffffff9283160263ffffffff60c81b191617600160c81b91909416029290921790555182906001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4505050565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060816144735750506040805180820190915260018152600360fc1b602082015290565b8160005b811561449d5780614487816152d9565b91506144969050600a83615417565b9150614477565b6000816001600160401b038111156144b7576144b761501d565b6040519080825280601f01601f1916602001820160405280156144e1576020820181803683370190505b5090505b84156125b0576144f660018361542b565b9150614503600a86615795565b61450e9060306153a9565b60f81b8183815181106145235761452361526a565b60200101906001600160f81b031916908160001a905350614545600a86615417565b94506144e5565b6145578484846141b6565b61456384848484614728565b611b5b5760405162461bcd60e51b8152600401610e7c906157a9565b6001600160a01b0382166000908152600b602052604090205460095482916145a69161542b565b6145b091906153a9565b6009556001600160a01b0382166000908152600b60205260409020819055600d8054839190859081106145e5576145e561526a565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505050565b6007546001600160a01b031633146146425760405162461bcd60e51b8152600401610e7c9061532f565b6001600160a01b0381166146a75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e7c565b613b93816143fd565b6001600160a01b038316156146ea576001600160a01b0383166000908152601e6020526040812080549091906146e5906157fb565b909155505b6001600160a01b03821615611232576001600160a01b0382166000908152601e60205260408120805490919061471f906152d9565b90915550505050565b60006001600160a01b0384163b1561481b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061476c903390899088908890600401615812565b6020604051808303816000875af19250505080156147a7575060408051601f3d908101601f191682019092526147a491810190615845565b60015b614801573d8080156147d5576040519150601f19603f3d011682016040523d82523d6000602084013e6147da565b606091505b5080516147f95760405162461bcd60e51b8152600401610e7c906157a9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506125b0565b506001949350505050565b828054614832906152f4565b90600052602060002090601f016020900481019282614854576000855561489a565b82601f1061486d5782800160ff1982351617855561489a565b8280016001018555821561489a579182015b8281111561489a57823582559160200191906001019061487f565b50611bc59291505b80821115611bc557600081556001016148a2565b6001600160e01b031981168114613b9357600080fd5b6000602082840312156148de57600080fd5b8135611a7e816148b6565b60008083601f8401126148fb57600080fd5b5081356001600160401b0381111561491257600080fd5b6020830191508360208260051b850101111561492d57600080fd5b9250929050565b8035801515811461109457600080fd5b60008060006040848603121561495957600080fd5b83356001600160401b0381111561496f57600080fd5b61497b868287016148e9565b909450925061498e905060208501614934565b90509250925092565b60005b838110156149b257818101518382015260200161499a565b83811115611b5b5750506000910152565b600081518084526149db816020860160208601614997565b601f01601f19169290920160200192915050565b602081526000611a7e60208301846149c3565b6001600160a01b0381168114613b9357600080fd5b600060208284031215614a2957600080fd5b8135611a7e81614a02565b600060208284031215614a4657600080fd5b5035919050565b60008060408385031215614a6057600080fd5b8235614a6b81614a02565b946020939093013593505050565b60008060008060408587031215614a8f57600080fd5b84356001600160401b0380821115614aa657600080fd5b614ab2888389016148e9565b90965094506020870135915080821115614acb57600080fd5b50614ad8878288016148e9565b95989497509550505050565b60008060208385031215614af757600080fd5b82356001600160401b03811115614b0d57600080fd5b614b19858286016148e9565b90969095509350505050565b6000806000806000806000806080898b031215614b4157600080fd5b88356001600160401b0380821115614b5857600080fd5b614b648c838d016148e9565b909a50985060208b0135915080821115614b7d57600080fd5b614b898c838d016148e9565b909850965060408b0135915080821115614ba257600080fd5b614bae8c838d016148e9565b909650945060608b0135915080821115614bc757600080fd5b50614bd48b828c016148e9565b999c989b5096995094979396929594505050565b803563ffffffff8116811461109457600080fd5b600080600080600060a08688031215614c1457600080fd5b614c1d86614934565b9450614c2b60208701614be8565b94979496505050506040830135926060810135926080909101359150565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b03851681526080810160038510614c8d57634e487b7160e01b600052602160045260246000fd5b602082019490945263ffffffff92831660408201529116606090910152919050565b600080600060608486031215614cc457600080fd5b8335614ccf81614a02565b92506020840135614cdf81614a02565b929592945050506040919091013590565b600081518084526020808501945080840160005b83811015614d2057815187529582019590820190600101614d04565b509495945050505050565b602081526000611a7e6020830184614cf0565b60008060408385031215614d5157600080fd5b8235614d5c81614a02565b9150614d6a60208401614934565b90509250929050565b600080600060408486031215614d8857600080fd5b8335614d9381614a02565b925060208401356001600160401b03811115614dae57600080fd5b614dba868287016148e9565b9497909650939450505050565b60008060008060008060608789031215614de057600080fd5b86356001600160401b0380821115614df757600080fd5b614e038a838b016148e9565b90985096506020890135915080821115614e1c57600080fd5b614e288a838b016148e9565b90965094506040890135915080821115614e4157600080fd5b50614e4e89828a016148e9565b979a9699509497509295939492505050565b60008083601f840112614e7257600080fd5b5081356001600160401b03811115614e8957600080fd5b60208301915083602082850101111561492d57600080fd5b60008060008060408587031215614eb757600080fd5b84356001600160401b0380821115614ece57600080fd5b614eda88838901614e60565b90965094506020870135915080821115614ef357600080fd5b50614ad887828801614e60565b60008060008060608587031215614f1657600080fd5b8435614f2181614a02565b935060208501356001600160401b03811115614f3c57600080fd5b614f48878288016148e9565b9094509250614f5b905060408601614934565b905092959194509250565b60008060008060008060808789031215614f7f57600080fd5b8635614f8a81614a02565b95506020870135614f9a81614a02565b945060408701356001600160401b0380821115614fb657600080fd5b614fc28a838b016148e9565b90965094506060890135915080821115614fdb57600080fd5b50614e4e89828a01614e60565b600080600060608486031215614ffd57600080fd5b833561500881614a02565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561504957600080fd5b843561505481614a02565b9350602085013561506481614a02565b92506040850135915060608501356001600160401b038082111561508757600080fd5b818701915087601f83011261509b57600080fd5b8135818111156150ad576150ad61501d565b604051601f8201601f19908116603f011681019083821181831017156150d5576150d561501d565b816040528281528a60208487010111156150ee57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060006060848603121561512757600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561515157600080fd5b61515a83614be8565b9150614d6a60208401614be8565b6000806040838503121561517b57600080fd5b50508035926020909101359150565b60008060006060848603121561519f57600080fd5b833592506020840135614cdf81614a02565b600080604083850312156151c457600080fd5b82356151cf81614a02565b915060208301356151df81614a02565b809150509250929050565b6000806000806080858703121561520057600080fd5b61520985614934565b935061521760208601614934565b925061522560408601614934565b9150614f5b60608601614934565b6020808252601d908201527f54454e5345493a205374616b696e67206973206e6f7420616374697665000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526023908201527f54454e5345493a20517565727920666f72206e6f6e6578697374656e7420746f60408201526235b2b760e91b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156152ed576152ed6152c3565b5060010190565b600181811c9082168061530857607f821691505b6020821081141561532957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526010908201526f496e76616c69642064656c656761746560801b604082015260600190565b6000602082840312156153a057600080fd5b611a7e82614be8565b600082198211156153bc576153bc6152c3565b500190565b6000602082840312156153d357600080fd5b813560038110611a7e57600080fd5b60008160001904831182151516156153fc576153fc6152c3565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261542657615426615401565b500490565b60008282101561543d5761543d6152c3565b500390565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526021908201527f54454e5345493a204d696e742f6f72646572206578636565647320737570706c6040820152607960f81b606082015260800190565b60208082526026908201527f54454e5345493a204f6e6c792054656e73656920747572746c65732063616e2060408201526565766f6c766560d01b606082015260800190565b6020808252601d908201527f54454e5345493a204e65772076616c7565206d617463686573206f6c64000000604082015260600190565b7402a22a729a2a49d1026b0bc1037b93232b91034b99605d1b815260008251615581816015850160208701614997565b9190910160150192915050565b7f54454e5345493a204d6178207065722077616c6c6574206973200000000000008152600082516155c681601a850160208701614997565b91909101601a0192915050565b8054600090600181811c90808316806155ed57607f831692505b602080841082141561560f57634e487b7160e01b600052602260045260246000fd5b818015615623576001811461563457615661565b60ff19861689528489019650615661565b60008881526020902060005b868110156156595781548b820152908501908301615640565b505084890196505b50505050505092915050565b600061567982866155d3565b8451615689818360208901614997565b615695818301866155d3565b979650505050505050565b6001600160a01b03841681526060602082018190526000906156c490830185614cf0565b82810360408401526156d68185614cf0565b9695505050505050565b6020808252601b908201527f54454e5345493a204c65616620636f6e747261637420756e7365740000000000604082015260600190565b604080825283519082018190526000906020906060840190828701845b828110156157595781516001600160a01b031684529284019290840190600101615734565b505050838103828501526156d68186614cf0565b600063ffffffff80831681851680830382111561578c5761578c6152c3565b01949350505050565b6000826157a4576157a4615401565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008161580a5761580a6152c3565b506000190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906156d6908301846149c3565b60006020828403121561585757600080fd5b8151611a7e816148b656fea2646970667358221220894df3973c77cfb1181814fcedcdfd304bce2de233182956e0350e389985ef2f64736f6c634300080a0033
Verified Source Code Partial Match
Compiler: v0.8.10+commit.fc410830
EVM: london
Optimization: Yes (200 runs)
ERC721B.sol 249 lines
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;
/****************************************
* @author: squeebo_nft *
* @team: GoldenX *
****************************************
* Blimpie-ERC721 provides low-gas *
* mints + transfers *
****************************************/
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
abstract contract ERC721B is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
string private _name;
string private _symbol;
uint internal _burned;
uint internal _offset;
address[] internal _owners;
mapping(uint => address) internal _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_, uint offset) {
_name = name_;
_symbol = symbol_;
_offset = offset;
for(uint i; i < _offset; ++i ){
_owners.push(address(0));
}
}
//public
function balanceOf(address owner) public view virtual override returns (uint) {
require(owner != address(0), "ERC721: balance query for the zero address");
uint count;
for( uint i; i < _owners.length; ++i ){
if( owner == _owners[i] )
++count;
}
return count;
}
function name() external view virtual override returns (string memory) {
return _name;
}
function ownerOf(uint tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
function totalSupply() public view virtual returns (uint) {
return _owners.length - (_offset + _burned);
}
function approve(address to, uint tokenId) external virtual override {
address owner = ERC721B.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
function getApproved(uint tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function setApprovalForAll(address operator, bool approved) external virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
function transferFrom(
address from,
address to,
uint tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint tokenId
) external virtual override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
//internal
function _approve(address to, uint tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721B.ownerOf(tokenId), to, tokenId);
}
function _beforeTokenTransfer(
address from,
address to,
uint tokenId
) internal virtual {}
function _burn(uint tokenId) internal virtual {
address owner = ERC721B.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_owners[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
function _checkOnERC721Received(
address from,
address to,
uint tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _exists(uint tokenId) internal view virtual returns (bool) {
return tokenId < _owners.length && _owners[tokenId] != address(0);
}
function _isApprovedOrOwner(address spender, uint tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721B.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
function _mint(address to, uint tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_owners.push(to);
emit Transfer(address(0), to, tokenId);
}
function _next() internal view virtual returns( uint ){
return _owners.length;
}
function _safeMint(address to, uint tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
function _safeMint(
address to,
uint tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
function _safeTransfer(
address from,
address to,
uint tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
function _transfer(
address from,
address to,
uint tokenId
) internal virtual {
require(ERC721B.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
}
Delegated.sol 37 lines
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;
/***********************
* @author: squeebo_nft *
************************/
import "@openzeppelin/contracts/access/Ownable.sol";
contract Delegated is Ownable{
mapping(address => bool) internal _delegates;
constructor(){
_delegates[owner()] = true;
}
modifier onlyDelegates {
require(_delegates[msg.sender], "Invalid delegate" );
_;
}
//onlyOwner
function isDelegate( address addr ) external view onlyOwner returns ( bool ){
return _delegates[addr];
}
function setDelegate( address addr, bool isDelegate_ ) external onlyOwner{
_delegates[addr] = isDelegate_;
}
function transferOwnership(address newOwner) public virtual override onlyOwner {
_delegates[newOwner] = true;
super.transferOwnership( newOwner );
}
}
IERC721Batch.sol 9 lines
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;
interface IERC721Batch {
function isOwnerOf( address account, uint[] calldata tokenIds ) external view returns( bool );
function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external;
function walletOfOwner( address account ) external view returns( uint[] memory );
}
PaymentSplitterMod.sol 132 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
/**
* @title PaymentSplitter
* @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
* that the Ether will be split in this way, since it is handled transparently by the contract.
*
* The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
* account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
* an amount proportional to the percentage of total shares they were assigned.
*
* `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function.
*/
contract PaymentSplitterMod is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => uint256) private _shares;
mapping(address => uint256) private _released;
address[] private _payees;
/**
* @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
* the matching position in the `shares` array.
*
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`.
*/
constructor(address[] memory payees, uint256[] memory shares_) payable {
require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
require(payees.length > 0, "PaymentSplitter: no payees");
for (uint256 i = 0; i < payees.length; i++) {
_addPayee(payees[i], shares_[i]);
}
}
/**
* @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
* reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
* reliability of the events, and not the actual splitting of Ether.
*
* To learn more about this see the Solidity documentation for
* https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
* functions].
*/
receive() external payable {
emit PaymentReceived(_msgSender(), msg.value);
}
/**
* @dev Getter for the total shares held by payees.
*/
function totalShares() public view returns (uint256) {
return _totalShares;
}
/**
* @dev Getter for the total amount of Ether already released.
*/
function totalReleased() public view returns (uint256) {
return _totalReleased;
}
/**
* @dev Getter for the amount of shares held by an account.
*/
function shares(address account) public view returns (uint256) {
return _shares[account];
}
/**
* @dev Getter for the amount of Ether already released to a payee.
*/
function released(address account) public view returns (uint256) {
return _released[account];
}
/**
* @dev Getter for the address of the payee number `index`.
*/
function payee(uint256 index) public view returns (address) {
return _payees[index];
}
/**
* @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
* total shares and their previous withdrawals.
*/
function release(address payable account) public virtual {
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
uint256 totalReceived = address(this).balance + _totalReleased;
uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account];
require(payment != 0, "PaymentSplitter: account is not due payment");
_released[account] = _released[account] + payment;
_totalReleased = _totalReleased + payment;
Address.sendValue(account, payment);
emit PaymentReleased(account, payment);
}
function _addPayee(address account, uint256 shares_) internal {
require(account != address(0), "PaymentSplitter: account is the zero address");
require(shares_ > 0, "PaymentSplitter: shares are 0");
require(_shares[account] == 0, "PaymentSplitter: account already has shares");
_payees.push(account);
_shares[account] = shares_;
_totalShares = _totalShares + shares_;
emit PayeeAdded(account, shares_);
}
function _setPayee( uint index, address account, uint newShares ) internal {
_totalShares = _totalShares - _shares[ account ] + newShares;
_shares[ account ] = newShares;
_payees[ index ] = account;
}
}
Address.sol 216 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Strings.sol 66 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
TenseiTurtles.sol 532 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/****************************************
* @author: squeebo_nft *
* @team: GoldenX *
****************************************
* Blimpie-ERC721 provides low-gas *
* mints + transfers *
****************************************/
import '../Blimpie/Delegated.sol';
import '../Blimpie/ERC721EnumerableLite.sol';
import '../Blimpie/PaymentSplitterMod.sol';
import "@openzeppelin/contracts/utils/Strings.sol";
interface IERC20Proxy{
function burnFromAccount( address account, uint leaves ) external payable;
function mintToAccount( address[] calldata accounts, uint[] calldata leaves ) external payable;
}
interface IERC1155Proxy{
function burnFrom( address account, uint[] calldata ids, uint[] calldata quantities ) external payable;
}
contract TenseiTurtles is ERC721B, Delegated, IERC721Batch, IERC721Enumerable, PaymentSplitterMod {
using Strings for uint;
event Evolve(address indexed owner, uint256 indexed tokenId);
event Spawn(address indexed owner, uint256 indexed tokenId);
enum TurtleType{
Tensei,
Meta,
Hybrid
}
struct Turtle{
address owner;
TurtleType turtleType;
uint32 nextBreed;
uint32 lastStake;
}
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 1111;
uint public MAX_WALLET = 2;
uint public PRICE = 0.065 ether;
uint32 public COOLDOWN_TENSEI = 259200; // 3 days
uint32 public COOLDOWN_META = 259200;
uint32 public STAKE_PERIOD = 3600; // 1 hour
uint public STAKE_TENSEI = 83333000000000000; // 2000000000000000000 / 24
uint public STAKE_META = 208333000000000000; // 5000000000000000000 / 24
uint public STAKE_HYBRID = 208333000000000000; // 5000000000000000000 / 24
Turtle[] public turtles;
bool public isPresaleActive = false;
bool public isMintActive = false;
bool public isEvolveActive = false;
bool public isBreedActive = false;
bool public isStakeActive = false;
address public flaskAddress;
uint public flaskToken;
uint public flaskQuantity = 1;
address public leafAddress;
uint public leafEvolveQuantity = 0 ether;
uint public leafBreedQuantity = 210 ether;
mapping(address => uint) public accessList;
mapping(address => uint) private _balances;
string private _tokenURIPrefix = 'https://ipfs.tenseiturtles.io/metadata/';
string private _tokenURISuffix = '';
address[] private addressList = [
0x890903d07b5Db2FaDE12027E9B1AF16e5e6e0EA5,
0xB7edf3Cbb58ecb74BdE6298294c7AAb339F3cE4a
];
uint[] private shareList = [
88,
12
];
constructor()
ERC721B("Tensei Turtles", "TENSEI", 0)
PaymentSplitterMod( addressList, shareList ){
}
//external
fallback() external payable {}
function balanceOf(address account) public view override( IERC721, ERC721B ) returns (uint) {
require(account != address(0), "TENSEI: balance query for the zero address");
return _balances[account];
}
function checkLeaf( uint tokenId ) public view returns( uint leaves ){
require( isStakeActive, "TENSEI: Staking is not active" );
require(_exists(tokenId), "TENSEI: Query for nonexistent token");
Turtle memory turtle = turtles[ tokenId ];
if( turtle.lastStake < 2 )
return 0;
uint periods = (block.timestamp - turtle.lastStake)/STAKE_PERIOD;
if( periods == 0 )
return 0;
if( turtle.turtleType == TurtleType.Tensei )
return periods * STAKE_TENSEI;
else if( turtle.turtleType == TurtleType.Meta )
return periods * STAKE_META;
else if( turtle.turtleType == TurtleType.Hybrid )
return periods * STAKE_HYBRID;
else
return 0;
}
function checkLeaves( uint[] calldata tokenIds ) external view returns( uint totalLeaves_ ) {
uint totalLeaves;
for( uint i; i < tokenIds.length; ++i ){
totalLeaves += checkLeaf( tokenIds[i] );
}
return totalLeaves;
}
function isOwnerOf( address account, uint[] calldata tokenIds ) external view virtual override returns( bool ){
for(uint i; i < tokenIds.length; ++i ){
if( turtles[ tokenIds[i] ].owner != account )
return false;
}
return true;
}
function ownerOf( uint tokenId ) public override( IERC721, ERC721B ) view returns( address owner_ ){
address owner = turtles[tokenId].owner;
require(owner != address(0), "TENSEI: query for nonexistent token");
return owner;
}
function tokenByIndex(uint index) external view virtual override returns (uint) {
require(index < totalSupply(), "TENSEI: global index out of bounds");
return index;
}
function tokenOfOwnerByIndex(address owner, uint index) public view override returns (uint tokenId) {
uint count;
for( uint i; i < turtles.length; ++i ){
if( owner == turtles[i].owner ){
if( count == index )
return i;
else
++count;
}
}
revert("ERC721Enumerable: owner index out of bounds");
}
function tokenURI(uint tokenId) external view override returns (string memory) {
require(_exists(tokenId), "TENSEI: URI query for nonexistent token");
return string(abi.encodePacked(_tokenURIPrefix, tokenId.toString(), _tokenURISuffix));
}
function totalSupply() public override( IERC721Enumerable, ERC721B ) view returns( uint totalSupply_ ){
return turtles.length;
}
function walletOfOwner( address account ) external view virtual override returns( uint[] memory ){
uint quantity = balanceOf( account );
uint[] memory wallet = new uint[]( quantity );
for( uint i; i < quantity; ++i ){
wallet[i] = tokenOfOwnerByIndex( account, i );
}
return wallet;
}
//non-payable
function breed( uint turtleA, uint turtleB ) external {
require( isBreedActive, "TENSEI: Breeding is not active" );
require( _exists(turtleA) && _exists( turtleB ), "TENSEI: Query for nonexistent token(s)" );
Turtle storage tensei;
Turtle storage meta;
if( turtles[ turtleA ].turtleType == TurtleType.Tensei ){
if( turtles[ turtleB ].turtleType == TurtleType.Meta ){
tensei = turtles[ turtleA ];
meta = turtles[ turtleB ];
}
else
revert( "Invalid combination" );
}
else if( turtles[ turtleA ].turtleType == TurtleType.Meta ){
if( turtles[ turtleB ].turtleType == TurtleType.Tensei ){
meta = turtles[ turtleA ];
tensei = turtles[ turtleB ];
}
else
revert( "Invalid combination" );
}
else{
revert( "TENSEI: invalid combination" );
}
//verify cooldown
uint32 time = uint32(block.timestamp);
require( tensei.nextBreed < time && meta.nextBreed < time, "TENSEI: breeding cooldown active" );
require( tensei.owner != msg.sender || meta.owner != msg.sender, "TENSEI: breeding of token that is not owned" );
uint supply = totalSupply();
require( supply + 1 <= MAX_SUPPLY, "TENSEI: Mint/order exceeds supply" );
if( leafEvolveQuantity > 0 ){
require( leafAddress != address(0), "TENSEI: Leaf contract unset" );
IERC20Proxy( leafAddress ).burnFromAccount( msg.sender, leafEvolveQuantity );
}
tensei.nextBreed = time + COOLDOWN_TENSEI;
tensei.nextBreed = time + COOLDOWN_META;
_mint( msg.sender, supply, TurtleType.Hybrid );
emit Spawn( msg.sender, supply );
}
function claimLeaves( uint[] calldata tokenIds ) external {
require( isStakeActive, "TENSEI: Staking is not active" );
require( leafAddress != address(0), "TENSEI: Leaf contract unset" );
uint tokenLeaves;
Turtle storage turtle;
uint32 time = uint32(block.timestamp);
uint[] memory leaves = new uint[]( tokenIds.length );
address[] memory owners = new address[]( tokenIds.length );
for( uint i; i < tokenIds.length; ++i ){
require( _exists(tokenIds[i]), "TENSEI: Query for nonexistent token" );
turtle = turtles[ tokenIds[i] ];
require(turtle.owner == msg.sender, "TENSEI: Claiming token that is not owned");
tokenLeaves = checkLeaf( tokenIds[i] );
if( tokenLeaves > 0 ){
leaves[ i ] = tokenLeaves;
owners[ i ] = turtle.owner;
turtle.lastStake = time;
}
}
IERC20Proxy( leafAddress ).mintToAccount( owners, leaves );
}
function evolve( uint[] calldata tokenIds ) external {
require( isEvolveActive, "TENSEI: Evolution is not active" );
if( flaskQuantity > 0 ){
require( flaskAddress != address(0), "TENSEI: Flask contract unset" );
uint[] memory tokens = new uint[]( 1 );
tokens[0] = flaskToken;
uint[] memory quantities = new uint[]( 1 );
quantities[0] = tokenIds.length * flaskQuantity;
IERC1155Proxy( flaskAddress ).burnFrom( msg.sender, tokens, quantities );
}
if( leafEvolveQuantity > 0 ){
require( leafAddress != address(0), "TENSEI: Leaf contract unset" );
IERC20Proxy( leafAddress ).burnFromAccount( msg.sender, leafEvolveQuantity * tokenIds.length );
}
Turtle storage turtle;
for(uint i; i < tokenIds.length; ++i ){
require( _exists(tokenIds[i]), "TENSEI: Query for nonexistent token" );
turtle = turtles[tokenIds[i]];
require(turtle.owner == msg.sender, "TENSEI: Evolving token that is not owned");
require(turtle.turtleType == TurtleType.Tensei, "TENSEI: Only Tensei turtles can evolve" );
turtle.turtleType = TurtleType.Meta;
emit Evolve( msg.sender, tokenIds[i] );
}
}
function setStake( uint[] calldata tokenIds, bool isSet ) external {
require( isStakeActive, "TENSEI: Staking is not active" );
Turtle storage turtle;
uint32 time = uint32(block.timestamp);
for( uint i; i < tokenIds.length; ++i ){
require( _exists(tokenIds[i]), "TENSEI: Query for nonexistent token" );
turtle = turtles[ tokenIds[i] ];
require(turtle.owner == msg.sender, "TENSEI: Staking token that is not owned");
turtle.lastStake = isSet ? time : 1;
}
}
function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external override{
for(uint i; i < tokenIds.length; ++i ){
safeTransferFrom( from, to, tokenIds[i], data );
}
}
//payable
function mint( uint quantity ) external payable {
if( isMintActive ){
}
else if( isPresaleActive ){
require( accessList[ msg.sender ] >= quantity, "TENSEI: Account is not on the access list" );
accessList[ msg.sender ] -= quantity;
}
else{
revert( "TENSEI: Sale is not active" );
}
require( quantity <= MAX_ORDER, string(abi.encodePacked("TENSEI: Max order is ", MAX_ORDER.toString())) );
require( balanceOf(msg.sender) + quantity <= MAX_WALLET, string(abi.encodePacked("TENSEI: Max per wallet is ", MAX_WALLET.toString())) );
require( msg.value >= PRICE * quantity, "TENSEI: Ether sent is not correct" );
uint supply = totalSupply();
require( supply + quantity <= MAX_SUPPLY, "TENSEI: Mint/order exceeds supply" );
for(uint i; i < quantity; ++i){
_mint( msg.sender, supply++, TurtleType.Tensei );
}
}
//onlyDelegates
function mint_(uint[] calldata quantity, address[] calldata recipient, TurtleType[] calldata types_ ) external payable onlyDelegates{
require(quantity.length == recipient.length, "TENSEI: Must provide equal quantities and recipients" );
require(recipient.length == types_.length, "TENSEI: Must provide equal recipients and types" );
uint totalQuantity;
uint supply = totalSupply();
for(uint i; i < quantity.length; ++i){
totalQuantity += quantity[i];
}
require( supply + totalQuantity < MAX_SUPPLY, "TENSEI: Mint/order exceeds supply" );
for(uint i; i < recipient.length; ++i){
for(uint j; j < quantity[i]; ++j){
uint tokenId = supply++;
_mint( recipient[i], tokenId, types_[i] );
if( types_[i] == TurtleType.Meta ){
emit Evolve( recipient[i], tokenId );
}
else if( types_[i] == TurtleType.Hybrid ){
emit Spawn( recipient[i], tokenId );
}
}
}
}
function evolve_(address account, uint[] calldata tokenIds) external payable onlyDelegates{
for(uint i; i < tokenIds.length; ++i){
require( _exists( tokenIds[i] ), "TENSEI: Query for nonexistent token");
require( ownerOf( tokenIds[i] ) == account, "TENSEI: Evolution of token that is not owned" );
require( turtles[tokenIds[i]].turtleType == TurtleType.Tensei, "TENSEI: Only Tensei turtles can evolve" );
turtles[tokenIds[i]].turtleType = TurtleType.Meta;
emit Evolve( account, tokenIds[i] );
}
}
function breed_( address account, uint quantity ) external payable onlyDelegates{
uint supply = totalSupply();
require( supply + quantity <= MAX_SUPPLY, "TENSEI: Mint/order exceeds supply" );
for( uint i; i < quantity; ++i ){
uint tokenId = supply++;
_mint( account, tokenId, TurtleType.Hybrid );
emit Spawn( account, tokenId );
}
}
function stake_( address account, uint[] calldata tokenIds, bool isSet ) external payable onlyDelegates{
require( isStakeActive, "TENSEI: Staking is not active" );
Turtle storage turtle;
uint32 time = uint32(block.timestamp);
for( uint i; i < tokenIds.length; ++i ){
require( _exists(tokenIds[i]), "TENSEI: Query for nonexistent token" );
turtle = turtles[ tokenIds[i] ];
require(turtle.owner == account, "TENSEI: staking token that is not owned");
turtle.lastStake = isSet ? time : 1;
}
}
function setNextBreeds(uint[] calldata tokenIds, uint32[] calldata nextBreeds ) external onlyDelegates {
for(uint i; i < tokenIds.length; ++i ){
require(_exists(tokenIds[i]), "TENSEI: Query for nonexistent token");
turtles[tokenIds[i]].nextBreed = nextBreeds[i];
}
}
function setAccessList(address[] calldata accounts, uint[] calldata allowed) external onlyDelegates{
require( accounts.length == allowed.length, "TENSEI: Must provide equal accounts and allowed" );
for(uint i; i < accounts.length; ++i){
accessList[ accounts[i] ] = allowed[i];
}
}
function setActive(bool isPresaleActive_, bool isMintActive_, bool isEvolveActive_, bool isBreedActive_) external onlyDelegates{
require( isPresaleActive != isPresaleActive_ ||
isMintActive != isMintActive_ ||
isEvolveActive != isEvolveActive_ ||
isBreedActive != isBreedActive_, "TENSEI: New value matches old" );
isPresaleActive = isPresaleActive_;
isMintActive = isMintActive_;
isEvolveActive = isEvolveActive_;
isBreedActive = isBreedActive_;
}
function setBaseURI(string calldata prefix, string calldata suffix) external onlyDelegates{
_tokenURIPrefix = prefix;
_tokenURISuffix = suffix;
}
function setCooldown(uint32 tenseiCooldown, uint32 metaCooldown) external onlyDelegates{
require( COOLDOWN_TENSEI != tenseiCooldown || COOLDOWN_META != metaCooldown, "TENSEI: New value matches old" );
COOLDOWN_TENSEI = tenseiCooldown;
COOLDOWN_META = metaCooldown;
}
function setMaxOrder(uint maxOrder, uint maxSupply, uint maxWallet) external onlyDelegates{
require( MAX_ORDER != maxOrder || MAX_SUPPLY != maxSupply || MAX_WALLET != maxWallet, "TENSEI: New value matches old" );
require( maxSupply >= totalSupply(), "TENSEI: Specified supply is lower than current balance" );
MAX_ORDER = maxOrder;
MAX_SUPPLY = maxSupply;
MAX_WALLET = maxWallet;
}
function setFlask( address flaskAddress_, uint flaskToken_, uint flaskQuantity_ ) external onlyDelegates{
flaskAddress = flaskAddress_;
flaskToken = flaskToken_;
flaskQuantity = flaskQuantity_;
}
function setLeaf( address leafAddress_, uint leafEvolveQuantity_, uint leafBreedQuantity_ ) external onlyDelegates{
leafAddress = leafAddress_;
leafEvolveQuantity = leafEvolveQuantity_;
leafBreedQuantity = leafBreedQuantity_;
}
function setPrice(uint price) external onlyDelegates{
require( PRICE != price, "TENSEI: New value matches old" );
PRICE = price;
}
function setStakeOptions( bool isActive, uint32 period, uint tenseiLeaf, uint metaLeaf, uint hybridLeaf ) external onlyDelegates{
isStakeActive = isActive;
STAKE_PERIOD = period;
STAKE_TENSEI = tenseiLeaf;
STAKE_META = metaLeaf;
STAKE_HYBRID = hybridLeaf;
}
function setTurtle(uint[] calldata tokenIds, TurtleType[] calldata types,
uint32[] calldata nextBreeds, uint32[] calldata lastStakes ) external onlyDelegates {
Turtle storage turtle;
for(uint i; i < tokenIds.length; ++i ){
require(_exists(tokenIds[i]), "TENSEI: Query for nonexistent token");
turtle = turtles[tokenIds[i]];
turtle.turtleType = types[i];
turtle.nextBreed = nextBreeds[i];
turtle.lastStake = lastStakes[i];
}
}
//onlyOwner
function addPayee( address account, uint shares ) external onlyOwner {
_addPayee( account, shares );
}
function setPayee( uint index, address account, uint newShares ) external onlyOwner {
_setPayee( index, account, newShares );
}
//internal
function _beforeTokenTransfer(address from, address to, uint tokenId) internal override {
if( from != address(0) )
--_balances[ from ];
if( to != address(0) )
++_balances[ to ];
}
function _exists(uint tokenId) internal view override returns (bool) {
return tokenId < turtles.length && turtles[tokenId].owner != address(0);
}
function _mint(address to, uint tokenId, TurtleType type_ ) internal {
_beforeTokenTransfer(address(0), to, tokenId);
turtles.push(Turtle( to, type_, 0, 0 ));
emit Transfer(address(0), to, tokenId);
}
function _transfer(address from, address to, uint tokenId) internal override {
require(turtles[tokenId].owner == from, "TENSEI: transfer of token that is not owned");
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_beforeTokenTransfer(from, to, tokenId);
turtles[tokenId].owner = to;
emit Transfer(from, to, tokenId);
}
}
Ownable.sol 71 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
ERC721EnumerableLite.sol 69 lines
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;
/****************************************
* @author: squeebo_nft *
****************************************
* Blimpie-ERC721 provides low-gas *
* mints + transfers *
****************************************/
import "./ERC721B.sol";
import "./IERC721Batch.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
abstract contract ERC721EnumerableLite is ERC721B, IERC721Batch, IERC721Enumerable {
mapping(address => uint) internal _balances;
function isOwnerOf( address account, uint[] calldata tokenIds ) external view virtual override returns( bool ){
for(uint i; i < tokenIds.length; ++i ){
if( _owners[ tokenIds[i] ] != account )
return false;
}
return true;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721B) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
function tokenOfOwnerByIndex(address owner, uint index) public view override returns (uint tokenId) {
uint count;
for( uint i; i < _owners.length; ++i ){
if( owner == _owners[i] ){
if( count == index )
return i;
else
++count;
}
}
revert("ERC721Enumerable: owner index out of bounds");
}
function tokenByIndex(uint index) external view virtual override returns (uint) {
require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
return index;
}
function totalSupply() public view virtual override( ERC721B, IERC721Enumerable ) returns (uint) {
return _owners.length - (_offset + _burned);
}
function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external override{
for(uint i; i < tokenIds.length; ++i ){
safeTransferFrom( from, to, tokenIds[i], data );
}
}
function walletOfOwner( address account ) external view virtual override returns( uint[] memory ){
uint quantity = balanceOf( account );
uint[] memory wallet = new uint[]( quantity );
for( uint i; i < quantity; ++i ){
wallet[i] = tokenOfOwnerByIndex( account, i );
}
return wallet;
}
}
SafeMath.sol 226 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
IERC721.sol 142 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @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;
}
ERC165.sol 28 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @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;
}
}
IERC165.sol 24 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
IERC721Receiver.sol 26 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
IERC721Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @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);
}
IERC721Enumerable.sol 28 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
Read Contract
COOLDOWN_META 0xf869195f → uint32
COOLDOWN_TENSEI 0x835f6e04 → uint32
MAX_ORDER 0x50c5a00c → uint256
MAX_SUPPLY 0x32cb6b0c → uint256
MAX_WALLET 0xdf7787a4 → uint256
PRICE 0x8d859f3e → uint256
STAKE_HYBRID 0x3948ed7c → uint256
STAKE_META 0x4b7911c9 → uint256
STAKE_PERIOD 0xdd4b1823 → uint32
STAKE_TENSEI 0x2007ed01 → uint256
accessList 0x87a5b67c → uint256
balanceOf 0x70a08231 → uint256
checkLeaf 0x8fd9ba08 → uint256
checkLeaves 0x1001d999 → uint256
flaskAddress 0xcbeb74c2 → address
flaskQuantity 0x9c8b5ba6 → uint256
flaskToken 0xe1ce4a69 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isBreedActive 0xe0d92ee7 → bool
isDelegate 0x07779627 → bool
isEvolveActive 0x767d4174 → bool
isMintActive 0x5b92ac0d → bool
isOwnerOf 0x4d44660c → bool
isPresaleActive 0x60d938dc → bool
isStakeActive 0x45a15d64 → bool
leafAddress 0x04aa59ef → address
leafBreedQuantity 0xaf2eb6ff → uint256
leafEvolveQuantity 0x17968649 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
payee 0x8b83209b → address
released 0x9852595c → uint256
shares 0xce7c2ac2 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalReleased 0xe33b7de3 → uint256
totalShares 0x3a98ef39 → uint256
totalSupply 0x18160ddd → uint256
turtles 0x22335395 → address, uint8, uint32, uint32
walletOfOwner 0x438b6300 → uint256[]
Write Contract 32 functions
These functions modify contract state and require a wallet transaction to execute.
addPayee 0x18f9b023
address account
uint256 shares
approve 0x095ea7b3
address to
uint256 tokenId
breed 0xd9ecad7b
uint256 turtleA
uint256 turtleB
breed_ 0x4f548490
address account
uint256 quantity
claimLeaves 0xd0a6bd95
uint256[] tokenIds
evolve 0xceb93182
uint256[] tokenIds
evolve_ 0x52b93b72
address account
uint256[] tokenIds
mint 0xa0712d68
uint256 quantity
mint_ 0x5e457c10
uint256[] quantity
address[] recipient
uint8[] types_
release 0x19165587
address account
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setAccessList 0x7e91b36f
address[] accounts
uint256[] allowed
setActive 0xfe0efa16
bool isPresaleActive_
bool isMintActive_
bool isEvolveActive_
bool isBreedActive_
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x6790a9de
string prefix
string suffix
setCooldown 0xd354f240
uint32 tenseiCooldown
uint32 metaCooldown
setDelegate 0x4a994eef
address addr
bool isDelegate_
setFlask 0xb68dc8f1
address flaskAddress_
uint256 flaskToken_
uint256 flaskQuantity_
setLeaf 0xe86cbff0
address leafAddress_
uint256 leafEvolveQuantity_
uint256 leafBreedQuantity_
setMaxOrder 0xc79b1ae6
uint256 maxOrder
uint256 maxSupply
uint256 maxWallet
setNextBreeds 0x0b53af96
uint256[] tokenIds
uint32[] nextBreeds
setPayee 0xdf238800
uint256 index
address account
uint256 newShares
setPrice 0x91b7f5ed
uint256 price
setStake 0x030c5f87
uint256[] tokenIds
bool isSet
setStakeOptions 0x1eb18a4a
bool isActive
uint32 period
uint256 tenseiLeaf
uint256 metaLeaf
uint256 hybridLeaf
setTurtle 0x129640d3
uint256[] tokenIds
uint8[] types
uint32[] nextBreeds
uint32[] lastStakes
stake_ 0x977f0477
address account
uint256[] tokenIds
bool isSet
transferBatch 0xb534a5c4
address from
address to
uint256[] tokenIds
bytes data
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address