Address Contract Verified
Address
0x7ee680A47953Aff929ACD71C3ED16E9Daa9bd312
Balance
0 ETH
Nonce
1
Code Size
20534 bytes
Creator
0x121863dB...6C3c at tx 0xc2ae70a9...bb1c58
Indexed Transactions
0
Contract Bytecode
20534 bytes
0x608060405234801561001057600080fd5b506004361061038e5760003560e01c80639010d07c116101de578063be3e2f1a1161010f578063e0cf7285116100ad578063f11d65cd1161007c578063f11d65cd14610a71578063f2fde38b14610aa1578063f3290d7514610abd578063f7bdf3c014610ad95761038e565b8063e0cf728514610a0f578063eac99b6114610a2d578063ec87621c14610a49578063ecae0ab214610a675761038e565b8063ca9752cc116100e9578063ca9752cc1461099d578063d547741f146109b9578063d54ad2a1146109d5578063ddc63262146109f35761038e565b8063be3e2f1a1461090d578063c0d7a94f1461093d578063ca15c8731461096d5761038e565b8063ab5e3c6b1161017c578063aed29d0711610156578063aed29d0714610899578063b00f935a146108b7578063babd3d9a146108d3578063bb872b4a146108f15761038e565b8063ab5e3c6b1461082d578063ab961d521461084b578063adb618321461087b5761038e565b8063a217fddf116101b8578063a217fddf146107b9578063a694fc3a146107d7578063a85ddb27146107f3578063a9f8d1811461080f5761038e565b80639010d07c1461073d57806391d148541461076d5780639aee299b1461079d5761038e565b806349df8d33116102c357806375b238fc116102615780637e07e275116102305780637e07e275146106a1578063817b1cd2146106d15780638925f0ff146106ef5780638da5cb5b1461071f5761038e565b806375b238fc1461062b57806375b7dd89146106495780637b6a963f146106655780637c17357d146106835761038e565b806360ab19db1161029d57806360ab19db146105c95780636569d38f146105e7578063715018a6146106035780637298d36e1461060d5761038e565b806349df8d33146105715780635312ea8e1461058f57806357e871e7146105ab5761038e565b806331683faf1161033057806336568abe1161030a57806336568abe146104ed578063379607f5146105095780633832ad7d1461052557806341e8119f146105555761038e565b806331683faf146104975780633455f41e146104a157806335e82f3a146104d15761038e565b806329f32ed41161036c57806329f32ed4146104115780632e17de78146104415780632f2ff15d1461045d5780632fccfbd2146104795761038e565b806314397201146103935780631667eb17146103b1578063248a9ca3146103e1575b600080fd5b61039b610af7565b6040516103a89190614e23565b60405180910390f35b6103cb60048036036103c69190810190613d03565b610b06565b6040516103d89190614e23565b60405180910390f35b6103fb60048036036103f69190810190613d55565b610d7a565b6040516104089190614a2b565b60405180910390f35b61042b60048036036104269190810190613d03565b610d9a565b6040516104389190614e23565b60405180910390f35b61045b60048036036104569190810190613df6565b610de9565b005b61047760048036036104729190810190613d7e565b6110ae565b005b610481611122565b60405161048e9190614e23565b60405180910390f35b61049f611131565b005b6104bb60048036036104b69190810190613d03565b6111b8565b6040516104c89190614e23565b60405180910390f35b6104eb60048036036104e69190810190613d03565b611207565b005b61050760048036036105029190810190613d7e565b6112c4565b005b610523600480360361051e9190810190613df6565b611347565b005b61053f600480360361053a9190810190613d03565b61146b565b60405161054c9190614e23565b60405180910390f35b61056f600480360361056a9190810190613e48565b61162f565b005b6105796116eb565b6040516105869190614e23565b60405180910390f35b6105a960048036036105a49190810190613df6565b6116f8565b005b6105b36117a9565b6040516105c09190614e23565b60405180910390f35b6105d16117b1565b6040516105de9190614a46565b60405180910390f35b61060160048036036105fc9190810190613df6565b6117e1565b005b61060b61184a565b005b610615611985565b6040516106229190614a46565b60405180910390f35b6106336119b5565b6040516106409190614a2b565b60405180910390f35b610663600480360361065e9190810190613df6565b6119cc565b005b61066d611a35565b60405161067a9190614e23565b60405180910390f35b61068b611a42565b6040516106989190614e23565b60405180910390f35b6106bb60048036036106b69190810190613d03565b611a52565b6040516106c89190614e23565b60405180910390f35b6106d9611aa1565b6040516106e69190614e23565b60405180910390f35b61070960048036036107049190810190613d03565b611ab1565b60405161071691906149ee565b60405180910390f35b610727611bd4565b604051610734919061494a565b60405180910390f35b61075760048036036107529190810190613dba565b611bfd565b604051610764919061494a565b60405180910390f35b61078760048036036107829190810190613d7e565b611c2f565b6040516107949190614a10565b60405180910390f35b6107b760048036036107b29190810190613df6565b611c61565b005b6107c1611cdd565b6040516107ce9190614a2b565b60405180910390f35b6107f160048036036107ec9190810190613df6565b611ce4565b005b61080d60048036036108089190810190613df6565b611d9f565b005b610817611ebe565b6040516108249190614e23565b60405180910390f35b610835611ecb565b6040516108429190614a10565b60405180910390f35b61086560048036036108609190810190613d03565b611ee5565b6040516108729190614a10565b60405180910390f35b610883611f41565b6040516108909190614e23565b60405180910390f35b6108a1611f49565b6040516108ae9190614e23565b60405180910390f35b6108d160048036036108cc9190810190613df6565b611f59565b005b6108db611fe0565b6040516108e89190614a10565b60405180910390f35b61090b60048036036109069190810190613df6565b612009565b005b61092760048036036109229190810190613d03565b61207a565b60405161093491906149ee565b60405180910390f35b61095760048036036109529190810190613d03565b61219d565b6040516109649190614e23565b60405180910390f35b61098760048036036109829190810190613d55565b612254565b6040516109949190614e23565b60405180910390f35b6109b760048036036109b29190810190613d03565b61227b565b005b6109d360048036036109ce9190810190613d7e565b6122cd565b005b6109dd612341565b6040516109ea9190614e23565b60405180910390f35b610a0d6004803603610a089190810190613df6565b612351565b005b610a176124de565b604051610a249190614e23565b60405180910390f35b610a476004803603610a429190810190613e48565b6124ee565b005b610a5161256b565b604051610a5e9190614a2b565b60405180910390f35b610a6f612582565b005b610a8b6004803603610a869190810190613d03565b6125d2565b604051610a989190614e23565b60405180910390f35b610abb6004803603610ab69190810190613d03565b6126b8565b005b610ad76004803603610ad29190810190613d03565b612862565b005b610ae161291f565b604051610aee9190614e23565b60405180910390f35b6000610b0161292c565b905090565b60008060008090505b600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020180549050811015610d56576000600260080160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018281548110610bb157fe5b90600052602060002090600202016001015490506000600260080160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018381548110610c1757fe5b90600052602060002090600202016000015490506000610c496201518063ffffffff168361293590919063ffffffff16565b90506000610c706201518063ffffffff16610c62611f41565b61293590919063ffffffff16565b90506000610c7c61298b565b90506000610c88611122565b9050808463ffffffff16018363ffffffff1610610cb957610cb2868961299490919063ffffffff16565b9750610d43565b8363ffffffff168363ffffffff1611610cd757600088019750610d42565b600084840390506000838463ffffffff168363ffffffff1681610cf657fe5b040290506000610d2784610d198463ffffffff168c6129e990919063ffffffff16565b61293590919063ffffffff16565b9050610d3c818c61299490919063ffffffff16565b9a505050505b5b5050505050508080600101915050610b0f565b50610d72610d6384611a52565b82612a5990919063ffffffff16565b915050919050565b600060016000838152602001908152602001600020600201549050919050565b6000600260080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b60008111610e2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2390614c83565b60405180910390fd5b6000610e37336111b8565b90506000610e443361146b565b905082811015610e89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8090614dc3565b60405180910390fd5b610e91612aa9565b6000610ec083610eb286610ea43361219d565b6129e990919063ffffffff16565b61293590919063ffffffff16565b90506000610ef184610ee387610ed533610d9a565b6129e990919063ffffffff16565b61293590919063ffffffff16565b9050610efd3383612b35565b610f3c826040518060400160405280601d81526020017f696e73756666696369656e742072657761726465642062616c616e6365000000815250612c0c565b610f7c33866040518060400160405280601b81526020017f696e73756666696369656e74207374616b65642062616c616e63650000000000815250612c39565b610fbc33826040518060400160405280601c81526020017f696e73756666696369656e74207068616e746f6d2062616c616e636500000000815250612e8e565b610fc46117b1565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33876040518363ffffffff1660e01b8152600401610ffe929190614965565b602060405180830381600087803b15801561101857600080fd5b505af115801561102c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110509190810190613d2c565b50611059612f5f565b3373ffffffffffffffffffffffffffffffffffffffff167f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd8660405161109f9190614e23565b60405180910390a25050505050565b6110d560016000848152602001908152602001600020600201546110d061306c565b611c2f565b611114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110b90614aa3565b60405180910390fd5b61111e8282613074565b5050565b600061112c613108565b905090565b61114e60405161114090614920565b604051809103902033611c2f565b61118d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118490614b83565b60405180910390fd5b6001600260090160006101000a81548160ff02191690831515021790555060006002600a0181905550565b6000600260080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b61122460405161121690614920565b604051809103902033611c2f565b611263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125a90614b83565b60405180910390fd5b6000600260080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff02191690831515021790555050565b6112cc61306c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611339576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133090614e03565b60405180910390fd5b6113438282613111565b5050565b6113503361227b565b60008111611393576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138a90614d03565b60405180910390fd5b8061139d33610b06565b10156113de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d590614b63565b60405180910390fd5b61141033826113eb6117b1565b73ffffffffffffffffffffffffffffffffffffffff166131a59092919063ffffffff16565b61141a338261322b565b3373ffffffffffffffffffffffffffffffffffffffff167f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4826040516114609190614e23565b60405180910390a250565b60008060008090505b600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030180549050811015611625576000600260080160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301828154811061151657fe5b90600052602060002090600202016001015490506000600260080160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301838154811061157c57fe5b906000526020600020906002020160000154905060006201518063ffffffff1682816115a457fe5b04905060006201518063ffffffff166115bb611f41565b816115c257fe5b0490506115cd610af7565b8263ffffffff16018163ffffffff161015806115ee57506115ed88611ee5565b5b1561160d57611606848761299490919063ffffffff16565b9550611614565b6000860195505b505050508080600101915050611474565b5080915050919050565b611637612582565b6116408161227b565b61164982611c61565b61165382826124ee565b61165d82826132f7565b61169133308461166b6117b1565b73ffffffffffffffffffffffffffffffffffffffff166133f6909392919063ffffffff16565b611699612f5f565b8073ffffffffffffffffffffffffffffffffffffffff167f7a4aa9c244a4a2cb13ec95884df309bd3bad7d21fa46582c23e7295c243d2ec5836040516116df9190614e23565b60405180910390a25050565b60006002600a0154905090565b61170061306c565b73ffffffffffffffffffffffffffffffffffffffff1661171e611bd4565b73ffffffffffffffffffffffffffffffffffffffff1614611774576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176b90614ce3565b60405180910390fd5b6117a633826117816117b1565b73ffffffffffffffffffffffffffffffffffffffff166131a59092919063ffffffff16565b50565b600043905090565b6000600260050160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6117fe6040516117f090614920565b604051809103902033611c2f565b61183d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183490614b83565b60405180910390fd5b806002600c018190555050565b61185261306c565b73ffffffffffffffffffffffffffffffffffffffff16611870611bd4565b73ffffffffffffffffffffffffffffffffffffffff16146118c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bd90614ce3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600260050160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6040516119c190614935565b604051809103902081565b6119e96040516119db90614920565b604051809103902033611c2f565b611a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1f90614b83565b60405180910390fd5b806002600b018190555050565b60006002600c0154905090565b6000600260000160030154905090565b6000600260080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401549050919050565b6000600260000160000154905090565b60606000600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301805490509050606081604051908082528060200260200182016040528015611b315781602001602082028038833980820191505090505b50905060008090505b82811015611bc957600260080160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018181548110611b9257fe5b906000526020600020906002020160000154828281518110611bb057fe5b6020026020010181815250508080600101915050611b3a565b508092505050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611c27826001600086815260200190815260200160002060000161347f90919063ffffffff16565b905092915050565b6000611c59826001600086815260200190815260200160002060000161349990919063ffffffff16565b905092915050565b6001151560006002600b01541480611c9857506002600b0154611c958360026000016000015461299490919063ffffffff16565b11155b151514611cda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd190614ac3565b60405180910390fd5b50565b6000801b81565b611cec612582565b611cf53361227b565b611cfe81611c61565b611d0881336124ee565b611d1281336132f7565b611d46333083611d206117b1565b73ffffffffffffffffffffffffffffffffffffffff166133f6909392919063ffffffff16565b611d4e612f5f565b3373ffffffffffffffffffffffffffffffffffffffff167febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a82604051611d949190614e23565b60405180910390a250565b60008111611de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd990614ae3565b60405180910390fd5b80611dec33610b06565b1015611e2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2490614c03565b60405180910390fd5b611e35612582565b611e3e3361227b565b611e4781611c61565b611e5181336124ee565b611e5b338261322b565b611e6581336132f7565b611e6d612f5f565b3373ffffffffffffffffffffffffffffffffffffffff167f7a4aa9c244a4a2cb13ec95884df309bd3bad7d21fa46582c23e7295c243d2ec582604051611eb39190614e23565b60405180910390a250565b6000600260070154905090565b6000600260090160009054906101000a900460ff16905090565b6000600260080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160009054906101000a900460ff169050919050565b600042905090565b6000600260000160010154905090565b611f76604051611f6890614920565b604051809103902033611c2f565b611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fac90614b83565b60405180910390fd5b6000600260090160006101000a81548160ff021916908315150217905550806002600a018190555050565b6000806002600b01541415801561200457506002600b015460026000016000015410155b905090565b61202660405161201890614920565b604051809103902033611c2f565b612065576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205c90614b83565b60405180910390fd5b61206d612aa9565b806002600a018190555050565b60606000600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018054905090506060816040519080825280602002602001820160405280156120fa5781602001602082028038833980820191505090505b50905060008090505b8281101561219257600260080160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301818154811061215b57fe5b90600052602060002090600202016001015482828151811061217957fe5b6020026020010181815250508080600101915050612103565b508092505050919050565b6000806121a8611aa1565b905060008114156121bd57600091505061224f565b60006121e06121ca6124de565b6121d2611f49565b61299490919063ffffffff16565b90506000612211836122036121f4886111b8565b856129e990919063ffffffff16565b61293590919063ffffffff16565b9050600061221e86610d9a565b9050808211156122465761223b8183612a5990919063ffffffff16565b94505050505061224f565b60009450505050505b919050565b6000612274600160008481526020019081526020016000206000016134c9565b9050919050565b6000151561228882611ee5565b1515146122ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c190614b23565b60405180910390fd5b50565b6122f460016000848152602001908152602001600020600201546122ef61306c565b611c2f565b612333576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232a90614c23565b60405180910390fd5b61233d8282613111565b5050565b6000600260000160020154905090565b61235a3361227b565b6000811161239d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239490614d83565b60405180910390fd5b60006123a7611f49565b116123e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123de90614c63565b60405180910390fd5b806123f13361219d565b1015612432576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242990614d23565b60405180910390fd5b61243c3382612b35565b61247b816040518060400160405280601d81526020017f696e73756666696369656e742072657761726465642062616c616e6365000000815250612c0c565b61248533826134de565b61248d612f5f565b3373ffffffffffffffffffffffffffffffffffffffff167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba826040516124d39190614e23565b60405180910390a250565b6000600260000160040154905090565b6001151560006002600c0154148061252557506002600c015461252284612514856111b8565b61299490919063ffffffff16565b11155b151514612567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255e90614da3565b60405180910390fd5b5050565b60405161257790614920565b604051809103902081565b6000151561258e611ecb565b1515146125d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125c790614cc3565b60405180910390fd5b565b60008060008090505b600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201805490508110156126ae5761269f600260080160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201828154811061267e57fe5b9060005260206000209060020201600101548361299490919063ffffffff16565b915080806001019150506125db565b5080915050919050565b6126c061306c565b73ffffffffffffffffffffffffffffffffffffffff166126de611bd4565b73ffffffffffffffffffffffffffffffffffffffff1614612734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161272b90614ce3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279b90614b03565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61287f60405161287190614920565b604051809103902033611c2f565b6128be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128b590614b83565b60405180910390fd5b6001600260080160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff02191690831515021790555050565b60006002600b0154905090565b6000601e905090565b6000808211612979576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161297090614be3565b60405180910390fd5b81838161298257fe5b04905092915050565b60006002905090565b6000808284019050838110156129df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129d690614b43565b60405180910390fd5b8091505092915050565b6000808314156129fc5760009050612a53565b6000828402905082848281612a0d57fe5b0414612a4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a4590614ca3565b60405180910390fd5b809150505b92915050565b600082821115612a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9590614ba3565b60405180910390fd5b818303905092915050565b6000612ab3611ebe565b90506000612abf6117a9565b905081811115612b29576000612ad3611aa1565b14612b1f5760008190506000612af28483612a5990919063ffffffff16565b90506000612b10612b016116eb565b836129e990919063ffffffff16565b9050612b1b816135aa565b5050505b612b28816135d4565b5b612b31612f5f565b5050565b612b3d613c80565b6040518060400160405280612b50611f41565b8152602001838152509050600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000155602082015181600101555050612bfb8260026000016003015461299490919063ffffffff16565b600260000160030181905550505050565b612c2982826002600001600101546135e19092919063ffffffff16565b6002600001600101819055505050565b612c938282600260080160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546135e19092919063ffffffff16565b600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550612cf982826002600001600001546135e19092919063ffffffff16565b600260000160000181905550600082905060008090505b600260080160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030180549050811015612e87576000821415612d6e57612e87565b6000600260080160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018281548110612dc057fe5b90600052602060002090600202016001015490506000838211612de35781612de5565b835b9050612dfc8186846135e19092919063ffffffff16565b600260080160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018481548110612e4c57fe5b906000526020600020906002020160010181905550612e768186866135e19092919063ffffffff16565b935050508080600101915050612d10565b5050505050565b612ee88282600260080160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546135e19092919063ffffffff16565b600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550612f4e82826002600001600401546135e19092919063ffffffff16565b600260000160040181905550505050565b612f99612f6a612341565b612f8b612f75611f49565b612f7d611a42565b61299490919063ffffffff16565b612a5990919063ffffffff16565b612fa16117b1565b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401612fd9919061494a565b60206040518083038186803b158015612ff157600080fd5b505afa158015613005573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506130299190810190613e1f565b101561306a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161306190614c43565b60405180910390fd5b565b600033905090565b61309c816001600085815260200190815260200160002060000161363690919063ffffffff16565b15613104576130a961306c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000600e905090565b613139816001600085815260200190815260200160002060000161366690919063ffffffff16565b156131a15761314661306c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6132268363a9059cbb60e01b84846040516024016131c49291906149c5565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613696565b505050565b61328381600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004015461299490919063ffffffff16565b600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401819055506132e78160026000016002015461299490919063ffffffff16565b6002600001600201819055505050565b6000821161333a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161333190614d63565b60405180910390fd5b613342612aa9565b600061336561334f6124de565b613357611f49565b61299490919063ffffffff16565b9050600080613372611aa1565b146133a8576133a3613382611aa1565b61339586856129e990919063ffffffff16565b61293590919063ffffffff16565b6133da565b60006133b2611f49565b146133be5760006133d9565b6133d8846133ca61375d565b6129e990919063ffffffff16565b5b5b90506133e68385613768565b6133f083826134de565b50505050565b613479846323b872dd60e01b8585856040516024016134179392919061498e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613696565b50505050565b600061348e83600001836138e0565b60001c905092915050565b60006134c1836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61394d565b905092915050565b60006134d782600001613970565b9050919050565b61353681600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015461299490919063ffffffff16565b600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555061359a8160026000016004015461299490919063ffffffff16565b6002600001600401819055505050565b6135c58160026000016001015461299490919063ffffffff16565b60026000016001018190555050565b8060026007018190555050565b6000838311158290613629576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136209190614a61565b60405180910390fd5b5082840390509392505050565b600061365e836000018373ffffffffffffffffffffffffffffffffffffffff1660001b613981565b905092915050565b600061368e836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6139f1565b905092915050565b60606136f8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613ad99092919063ffffffff16565b905060008151111561375857808060200190516137189190810190613d2c565b613757576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161374e90614de3565b60405180910390fd5b5b505050565b6000620f4240905090565b6137c081600260080160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015461299490919063ffffffff16565b600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055506138248160026000016000015461299490919063ffffffff16565b600260000160000181905550613838613c80565b604051806040016040528061384b611f41565b8152602001838152509050600260080160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000155602082015181600101555050505050565b60008183600001805490501161392b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161392290614a83565b60405180910390fd5b82600001828154811061393a57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b600061398d838361394d565b6139e65782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506139eb565b600090505b92915050565b60008083600101600084815260200190815260200160002054905060008114613acd5760006001820390506000600186600001805490500390506000866000018281548110613a3c57fe5b9060005260206000200154905080876000018481548110613a5957fe5b9060005260206000200181905550600183018760010160008381526020019081526020016000208190555086600001805480613a9157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050613ad3565b60009150505b92915050565b6060613ae88484600085613af1565b90509392505050565b606082471015613b36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b2d90614bc3565b60405180910390fd5b613b3f85613c06565b613b7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b7590614d43565b60405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051613ba89190614909565b60006040518083038185875af1925050503d8060008114613be5576040519150601f19603f3d011682016040523d82523d6000602084013e613bea565b606091505b5091509150613bfa828286613c19565b92505050949350505050565b600080823b905060008111915050919050565b60608315613c2957829050613c79565b600083511115613c3c5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613c709190614a61565b60405180910390fd5b9392505050565b604051806040016040528060008152602001600081525090565b600081359050613ca981614fa4565b92915050565b600081519050613cbe81614fbb565b92915050565b600081359050613cd381614fd2565b92915050565b600081359050613ce881614fe9565b92915050565b600081519050613cfd81614fe9565b92915050565b600060208284031215613d1557600080fd5b6000613d2384828501613c9a565b91505092915050565b600060208284031215613d3e57600080fd5b6000613d4c84828501613caf565b91505092915050565b600060208284031215613d6757600080fd5b6000613d7584828501613cc4565b91505092915050565b60008060408385031215613d9157600080fd5b6000613d9f85828601613cc4565b9250506020613db085828601613c9a565b9150509250929050565b60008060408385031215613dcd57600080fd5b6000613ddb85828601613cc4565b9250506020613dec85828601613cd9565b9150509250929050565b600060208284031215613e0857600080fd5b6000613e1684828501613cd9565b91505092915050565b600060208284031215613e3157600080fd5b6000613e3f84828501613cee565b91505092915050565b60008060408385031215613e5b57600080fd5b6000613e6985828601613cd9565b9250506020613e7a85828601613c9a565b9150509250929050565b6000613e9083836148eb565b60208301905092915050565b613ea581614f06565b82525050565b613eb481614eb4565b82525050565b6000613ec582614e4e565b613ecf8185614e7c565b9350613eda83614e3e565b8060005b83811015613f0b578151613ef28882613e84565b9750613efd83614e6f565b925050600181019050613ede565b5085935050505092915050565b613f2181614ec6565b82525050565b613f3081614ed2565b82525050565b6000613f4182614e59565b613f4b8185614e8d565b9350613f5b818560208601614f60565b80840191505092915050565b613f7081614f18565b82525050565b6000613f8182614e64565b613f8b8185614e98565b9350613f9b818560208601614f60565b613fa481614f93565b840191505092915050565b6000613fbc602283614e98565b91507f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60008301527f64730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614022602f83614e98565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f206772616e7400000000000000000000000000000000006020830152604082019050919050565b6000614088601183614e98565b91507f45786365656420706f6f6c206c696d69740000000000000000000000000000006000830152602082019050919050565b60006140c8600f83614e98565b91507f7a65726f207a617020616d6f756e7400000000000000000000000000000000006000830152602082019050919050565b6000614108602683614e98565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061416e601b83614e98565b91507f596f7572206164647265737320697320626c61636b6c697374656400000000006000830152602082019050919050565b60006141ae601b83614e98565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b60006141ee602383614e98565b91507f696e73756666696369656e7420636c61696d61626c6520636f6f6b2062616c6160008301527f6e636500000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614254601783614e98565b91507f43616c6c6572206973206e6f742061206d616e616765720000000000000000006000830152602082019050919050565b6000614294601e83614e98565b91507f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006000830152602082019050919050565b60006142d4602683614e98565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061433a601a83614e98565b91507f536166654d6174683a206469766973696f6e206279207a65726f0000000000006000830152602082019050919050565b600061437a601e83614e98565b91507f696e73756666696369656e7420636c61696d61626c652062616c616e636500006000830152602082019050919050565b60006143ba603083614e98565b91507f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008301527f2061646d696e20746f207265766f6b65000000000000000000000000000000006020830152604082019050919050565b6000614420601a83614e98565b91507f496e636f6e73697374656e7420434f4f4b2062616c616e6365730000000000006000830152602082019050919050565b6000614460601b83614e98565b91507f696e73756666696369656e7420746f74616c20726577617264656400000000006000830152602082019050919050565b60006144a0601883614e98565b91507f7a65726f20756e7374616b6520636f6f6b20616d6f756e7400000000000000006000830152602082019050919050565b60006144e0602183614e98565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614546602283614e98565b91507f6c6971756964697479206d696e696e672070726f6772616d206973207061757360008301527f65640000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006145ac602083614e98565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b60006145ec601683614e98565b91507f7a65726f20636c61696d20636f6f6b20616d6f756e74000000000000000000006000830152602082019050919050565b600061462c600783614ea9565b91507f4d414e41474552000000000000000000000000000000000000000000000000006000830152600782019050919050565b600061466c601d83614e98565b91507f696e73756666696369656e742072657761726465642062616c616e63650000006000830152602082019050919050565b60006146ac601d83614e98565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b60006146ec601683614e98565b91507f7a65726f207374616b6520636f6f6b20616d6f756e74000000000000000000006000830152602082019050919050565b600061472c601383614e98565b91507f7a65726f206861727665737420616d6f756e74000000000000000000000000006000830152602082019050919050565b600061476c601e83614e98565b91507f457863656564207065722061646472657373207374616b65206c696d697400006000830152602082019050919050565b60006147ac601f83614e98565b91507f696e73756666696369656e7420756e7374616b61626c652062616c616e6365006000830152602082019050919050565b60006147ec600583614ea9565b91507f41444d494e0000000000000000000000000000000000000000000000000000006000830152600582019050919050565b600061482c602a83614e98565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000614892602f83614e98565b91507f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008301527f20726f6c657320666f722073656c6600000000000000000000000000000000006020830152604082019050919050565b6148f481614efc565b82525050565b61490381614efc565b82525050565b60006149158284613f36565b915081905092915050565b600061492b8261461f565b9150819050919050565b6000614940826147df565b9150819050919050565b600060208201905061495f6000830184613eab565b92915050565b600060408201905061497a6000830185613e9c565b61498760208301846148fa565b9392505050565b60006060820190506149a36000830186613eab565b6149b06020830185613eab565b6149bd60408301846148fa565b949350505050565b60006040820190506149da6000830185613eab565b6149e760208301846148fa565b9392505050565b60006020820190508181036000830152614a088184613eba565b905092915050565b6000602082019050614a256000830184613f18565b92915050565b6000602082019050614a406000830184613f27565b92915050565b6000602082019050614a5b6000830184613f67565b92915050565b60006020820190508181036000830152614a7b8184613f76565b905092915050565b60006020820190508181036000830152614a9c81613faf565b9050919050565b60006020820190508181036000830152614abc81614015565b9050919050565b60006020820190508181036000830152614adc8161407b565b9050919050565b60006020820190508181036000830152614afc816140bb565b9050919050565b60006020820190508181036000830152614b1c816140fb565b9050919050565b60006020820190508181036000830152614b3c81614161565b9050919050565b60006020820190508181036000830152614b5c816141a1565b9050919050565b60006020820190508181036000830152614b7c816141e1565b9050919050565b60006020820190508181036000830152614b9c81614247565b9050919050565b60006020820190508181036000830152614bbc81614287565b9050919050565b60006020820190508181036000830152614bdc816142c7565b9050919050565b60006020820190508181036000830152614bfc8161432d565b9050919050565b60006020820190508181036000830152614c1c8161436d565b9050919050565b60006020820190508181036000830152614c3c816143ad565b9050919050565b60006020820190508181036000830152614c5c81614413565b9050919050565b60006020820190508181036000830152614c7c81614453565b9050919050565b60006020820190508181036000830152614c9c81614493565b9050919050565b60006020820190508181036000830152614cbc816144d3565b9050919050565b60006020820190508181036000830152614cdc81614539565b9050919050565b60006020820190508181036000830152614cfc8161459f565b9050919050565b60006020820190508181036000830152614d1c816145df565b9050919050565b60006020820190508181036000830152614d3c8161465f565b9050919050565b60006020820190508181036000830152614d5c8161469f565b9050919050565b60006020820190508181036000830152614d7c816146df565b9050919050565b60006020820190508181036000830152614d9c8161471f565b9050919050565b60006020820190508181036000830152614dbc8161475f565b9050919050565b60006020820190508181036000830152614ddc8161479f565b9050919050565b60006020820190508181036000830152614dfc8161481f565b9050919050565b60006020820190508181036000830152614e1c81614885565b9050919050565b6000602082019050614e3860008301846148fa565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000614ebf82614edc565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000614f1182614f3c565b9050919050565b6000614f2382614f2a565b9050919050565b6000614f3582614edc565b9050919050565b6000614f4782614f4e565b9050919050565b6000614f5982614edc565b9050919050565b60005b83811015614f7e578082015181840152602081019050614f63565b83811115614f8d576000848401525b50505050565b6000601f19601f8301169050919050565b614fad81614eb4565b8114614fb857600080fd5b50565b614fc481614ec6565b8114614fcf57600080fd5b50565b614fdb81614ed2565b8114614fe657600080fd5b50565b614ff281614efc565b8114614ffd57600080fd5b5056fea264697066735822122083212430ff27f2cefe3571d51eb0bad6496b5d2ea702e7140ba33388a3939ca764736f6c63430006020033
Verified Source Code Full Match
Compiler: v0.6.2+commit.bacdbe57
EVM: istanbul
Optimization: No
CookPool2.sol 2485 lines
// Sources flattened with hardhat v2.1.2 https://hardhat.org // File @openzeppelin/contracts/math/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ 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) { 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) { 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) { // 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) { 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) { 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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); 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) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @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. 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) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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) { 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) { require(b > 0, errorMessage); return a % b; } } // File @openzeppelin/contracts/token/ERC20/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File @openzeppelin/contracts/utils/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File @openzeppelin/contracts/token/ERC20/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File @uniswap/v2-core/contracts/interfaces/[email protected] pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // File contracts/external/UniswapV2Library.sol pragma solidity >=0.5.0; library UniswapV2Library { using SafeMath for uint256; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, "UniswapV2Library: IDENTICAL_ADDRESSES"); (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), "UniswapV2Library: ZERO_ADDRESS"); } // calculates the CREATE2 address for a pair without making any external calls function pairFor( address factory, address tokenA, address tokenB ) internal pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address( uint256( keccak256( abi.encodePacked( hex"ff", factory, keccak256(abi.encodePacked(token0, token1)), hex"96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" // init code hash ) ) ) ); } // fetches and sorts the reserves for a pair function getReserves( address factory, address tokenA, address tokenB ) internal view returns (uint256 reserveA, uint256 reserveB) { (address token0, ) = sortTokens(tokenA, tokenB); (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves(); (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0); } // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) internal pure returns (uint256 amountB) { require(amountA > 0, "UniswapV2Library: INSUFFICIENT_AMOUNT"); require( reserveA > 0 && reserveB > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY" ); amountB = amountA.mul(reserveB) / reserveA; } // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountOut) { require(amountIn > 0, "UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT"); require( reserveIn > 0 && reserveOut > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY" ); uint256 amountInWithFee = amountIn.mul(997); uint256 numerator = amountInWithFee.mul(reserveOut); uint256 denominator = reserveIn.mul(1000).add(amountInWithFee); amountOut = numerator / denominator; } // given an output amount of an asset and pair reserves, returns a required input amount of the other asset function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountIn) { require(amountOut > 0, "UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT"); require( reserveIn > 0 && reserveOut > 0, "UniswapV2Library: INSUFFICIENT_LIQUIDITY" ); uint256 numerator = reserveIn.mul(amountOut).mul(1000); uint256 denominator = reserveOut.sub(amountOut).mul(997); amountIn = (numerator / denominator).add(1); } // performs chained getAmountOut calculations on any number of pairs function getAmountsOut( address factory, uint256 amountIn, address[] memory path ) internal view returns (uint256[] memory amounts) { require(path.length >= 2, "UniswapV2Library: INVALID_PATH"); amounts = new uint256[](path.length); amounts[0] = amountIn; for (uint256 i; i < path.length - 1; i++) { (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]); amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut); } } // performs chained getAmountIn calculations on any number of pairs function getAmountsIn( address factory, uint256 amountOut, address[] memory path ) internal view returns (uint256[] memory amounts) { require(path.length >= 2, "UniswapV2Library: INVALID_PATH"); amounts = new uint256[](path.length); amounts[amounts.length - 1] = amountOut; for (uint256 i = path.length - 1; i > 0; i--) { (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]); amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut); } } } // File contracts/core/Constants.sol pragma solidity ^0.6.2; library Constants { /* Pool */ uint256 private constant INITIAL_STAKE_MULTIPLE = 1e6; uint256 private constant VESTING_DURATION = 14; //180 days (6 months) uint32 private constant VESTING_INTERVAL = 2; //30 days (1 month) uint256 private constant STAKE_LOCKUP_DURATION = 30; //30 days (1 month) /** * Getters */ function getInitialStakeMultiple() internal pure returns (uint256) { return INITIAL_STAKE_MULTIPLE; } function getVestingDuration() internal pure returns (uint256) { return VESTING_DURATION; } function getVestingInterval() internal pure returns (uint32) { return VESTING_INTERVAL; } function getStakeLockupDuration() internal pure returns (uint256) { return STAKE_LOCKUP_DURATION; } } // File @openzeppelin/contracts/utils/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File @openzeppelin/contracts/token/ERC20/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } // File @openzeppelin/contracts/access/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File @openzeppelin/contracts/utils/[email protected] // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * ... // [truncated — 85136 bytes total]
Read Contract
ADMIN_ROLE 0x75b238fc → bytes32
DEFAULT_ADMIN_ROLE 0xa217fddf → bytes32
MANAGER_ROLE 0xec87621c → bytes32
balanceOfClaimable 0x1667eb17 → uint256
balanceOfClaimed 0x7e07e275 → uint256
balanceOfPhantom 0x29f32ed4 → uint256
balanceOfRewarded 0xc0d7a94f → uint256
balanceOfStaked 0x3455f41e → uint256
balanceOfUnstakable 0x3832ad7d → uint256
balanceOfVesting 0xf11d65cd → uint256
blockNumber 0x57e871e7 → uint256
blockTimestamp 0xadb61832 → uint256
cook 0x60ab19db → address
getRewardPerBlock 0x49df8d33 → uint256
getRoleAdmin 0x248a9ca3 → bytes32
getRoleMember 0x9010d07c → address
getRoleMemberCount 0xca15c873 → uint256
getStakeLockupDuration 0x14397201 → uint256
getVestingDuration 0x2fccfbd2 → uint256
hasRole 0x91d14854 → bool
isAddrBlacklisted 0xab961d52 → bool
isFull 0xbabd3d9a → bool
isMiningPaused 0xab5e3c6b → bool
lastRewardBlock 0xa9f8d181 → uint256
owner 0x8da5cb5b → address
stakeLimitPerAddress 0x7b6a963f → uint256
stakingScheduleAmount 0xbe3e2f1a → uint256[]
stakingScheduleStartTime 0x8925f0ff → uint256[]
totalClaimed 0xd54ad2a1 → uint256
totalPhantom 0xe0cf7285 → uint256
totalPoolCapLimit 0xf7bdf3c0 → uint256
totalRewarded 0xaed29d07 → uint256
totalStaked 0x817b1cd2 → uint256
totalVesting 0x7c17357d → uint256
univ2 0x7298d36e → address
Write Contract 23 functions
These functions modify contract state and require a wallet transaction to execute.
blacklistAddress 0xf3290d75
address addr
checkMiningPaused 0xecae0ab2
No parameters
checkPerAddrStakeLimit 0xeac99b61
uint256 amountToStake
address account
checkPoolStakeCapLimit 0x9aee299b
uint256 amountToStake
claim 0x379607f5
uint256 cookAmount
emergencyWithdraw 0x5312ea8e
uint256 amount
ensureAddrNotBlacklisted 0xca9752cc
address addr
grantRole 0x2f2ff15d
bytes32 role
address account
harvest 0xddc63262
uint256 cookAmount
pauseMinigReward 0x31683faf
No parameters
removeAddressFromBlacklist 0x35e82f3a
address addr
renounceOwnership 0x715018a6
No parameters
renounceRole 0x36568abe
bytes32 role
address account
resumeMiningReward 0xb00f935a
uint256 rewardPerBlock
revokeRole 0xd547741f
bytes32 role
address account
setRewardPerBlock 0xbb872b4a
uint256 rewardPerBlock
setStakeLimitPerAddress 0x6569d38f
uint256 stakeLimitPerAddress
setTotalPoolCapLimit 0x75b7dd89
uint256 totalPoolCapLimit
stake 0xa694fc3a
uint256 cookAmount
transferOwnership 0xf2fde38b
address newOwner
unstake 0x2e17de78
uint256 cookAmount
zapCook 0xa85ddb27
uint256 cookAmount
zapStake 0x41e8119f
uint256 cookAmount
address userAddress
Recent Transactions
No transactions found for this address