Address Contract Partially Verified
Address
0xa7cb9Aeb4dF4d963B4fb6265c4Aa85908E270438
Balance
0.000000000 ETH
Nonce
1
Code Size
11516 bytes
Creator
0x7715592b...0Ba4 at tx 0xc09e6495...57614e
Indexed Transactions
0
Contract Bytecode
11516 bytes
0x6080604052600436106102605760003560e01c8063715018a611610144578063a9059cbb116100b6578063dd62ed3e1161007a578063dd62ed3e14610753578063e30c397814610773578063e626815814610791578063f112ba72146107b1578063f2fde38b146107c6578063f7dcdcce146107e657600080fd5b8063a9059cbb146106be578063c0246668146106de578063c400f5e7146106fe578063c4d66de81461071e578063d94775261461073e57600080fd5b80638e749a8f116101085780638e749a8f146106095780638fffabed1461062957806395d89b4114610649578063966b53c41461065e578063a457c2d71461067e578063a5ece9411461069e57600080fd5b8063715018a614610571578063768565571461058657806379ba5097146105b657806379cc6790146105cb5780638da5cb5b146105eb57600080fd5b806339509351116101dd5780634fbee193116101a15780634fbee1931461046e578063502f74461461049e57806360d091a4146104db578063638b1b14146104fb5780636c9e28aa1461051b57806370a082311461053b57600080fd5b806339509351146103cc578063408ccbdf146103ec57806342966c681461040c5780634a4dd9cd1461042c5780634f011b831461044c57600080fd5b80631a0e718c116102245780631a0e718c1461033b5780631af3c61d1461035b57806323b872dd146103705780632d99d32e14610390578063313ce567146103b057600080fd5b8063032401571461026c57806306fdde031461028e578063095ea7b3146102b957806317d41cd0146102e957806318160ddd1461031c57600080fd5b3661026757005b600080fd5b34801561027857600080fd5b5061028c61028736600461286f565b610806565b005b34801561029a57600080fd5b506102a36109b7565b6040516102b091906128b2565b60405180910390f35b3480156102c557600080fd5b506102d96102d4366004612915565b610a49565b60405190151581526020016102b0565b3480156102f557600080fd5b50610309610304366004612941565b610a63565b60405161ffff90911681526020016102b0565b34801561032857600080fd5b506002545b6040519081526020016102b0565b34801561034757600080fd5b5061028c61035636600461295a565b610a91565b34801561036757600080fd5b5061028c610b90565b34801561037c57600080fd5b506102d961038b36600461297c565b610c01565b34801561039c57600080fd5b5061028c6103ab3660046129bd565b610c25565b3480156103bc57600080fd5b50604051601281526020016102b0565b3480156103d857600080fd5b506102d96103e7366004612915565b610cb5565b3480156103f857600080fd5b50610309610407366004612941565b610cd7565b34801561041857600080fd5b5061028c610427366004612941565b610ce7565b34801561043857600080fd5b5061028c61044736600461286f565b610cf4565b34801561045857600080fd5b5060065461030990600160b01b900461ffff1681565b34801561047a57600080fd5b506102d96104893660046129fb565b60106020526000908152604090205460ff1681565b3480156104aa57600080fd5b506012546104c39061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016102b0565b3480156104e757600080fd5b5061028c6104f63660046129fb565b610e93565b34801561050757600080fd5b50600a546104c3906001600160a01b031681565b34801561052757600080fd5b5061028c61053636600461286f565b610f20565b34801561054757600080fd5b5061032d6105563660046129fb565b6001600160a01b031660009081526020819052604090205490565b34801561057d57600080fd5b5061028c6110bf565b34801561059257600080fd5b506102d96105a13660046129fb565b60146020526000908152604090205460ff1681565b3480156105c257600080fd5b5061028c6110d3565b3480156105d757600080fd5b5061028c6105e6366004612915565b61114a565b3480156105f757600080fd5b506005546001600160a01b03166104c3565b34801561061557600080fd5b50610309610624366004612941565b61115f565b34801561063557600080fd5b506013546104c3906001600160a01b031681565b34801561065557600080fd5b506102a361116f565b34801561066a57600080fd5b50610309610679366004612941565b61117e565b34801561068a57600080fd5b506102d9610699366004612915565b61118e565b3480156106aa57600080fd5b50600c546104c3906001600160a01b031681565b3480156106ca57600080fd5b506102d96106d9366004612915565b611209565b3480156106ea57600080fd5b5061028c6106f93660046129bd565b611217565b34801561070a57600080fd5b5061028c6107193660046129fb565b61127f565b34801561072a57600080fd5b5061028c6107393660046129fb565b61130c565b34801561074a57600080fd5b5061032d6113db565b34801561075f57600080fd5b5061032d61076e366004612a18565b611423565b34801561077f57600080fd5b506006546001600160a01b03166104c3565b34801561079d57600080fd5b5061028c6107ac36600461286f565b61144e565b3480156107bd57600080fd5b5061032d6115ed565b3480156107d257600080fd5b5061028c6107e13660046129fb565b611618565b3480156107f257600080fd5b50610309610801366004612941565b611689565b61080e611699565b600b5460115484916108279161ffff9182169116612a72565b6108319190612a94565b6011805461ffff191661ffff9283161790819055600b548492610861926201000092839004821692900416612a72565b61086b9190612a94565b6011805463ffff000019166201000061ffff938416021790819055600b5483926108a392600160201b92839004821692900416612a72565b6108ad9190612a94565b6011805461ffff928316600160201b0265ffff0000000019821681179092556109c49083169190921617118015906108f457506011546109c46201000090910461ffff1611155b801561091057506011546109c4600160201b90910461ffff1611155b6109355760405162461bcd60e51b815260040161092c90612aaf565b60405180910390fd5b6040805160608101825261ffff8086168252848116602083015283169181019190915261096690600b9060036127ad565b506040805161ffff808616825280851660208301528316918101919091527f3ba32fc894a5a194d08f732e0c8261fa9d3efec991bb714893133f1375cde81e906060015b60405180910390a1505050565b6060600380546109c690612b05565b80601f01602080910402602001604051908101604052809291908181526020018280546109f290612b05565b8015610a3f5780601f10610a1457610100808354040283529160200191610a3f565b820191906000526020600020905b815481529060010190602001808311610a2257829003601f168201915b5050505050905090565b600033610a578185856116f3565b60019150505b92915050565b600b8160038110610a7357600080fd5b60109182820401919006600202915054906101000a900461ffff1681565b610a99611699565b60008161ffff16118015610ab357506101f48161ffff1611155b610b395760405162461bcd60e51b815260206004820152604b60248201527f537761705468726573686f6c643a2043616e6e6f7420657863656564206c696d60448201527f6974732066726f6d20302e30312520746f20352520666f72206e65772073776160648201526a1c081d1a1c995cda1bdb1960aa1b608482015260a40161092c565b6006805461ffff60b01b1916600160b01b61ffff8416908102919091179091556040519081527fcf1366790fe21e66c9df9dcf67218b1e10acd64d3c99ae8a7429a68de91f1720906020015b60405180910390a150565b6000610b9a6115ed565b30600090815260208190526040902054610bb49190612b3f565b90506000610bc182611817565b60408051848152602081018390529192507f5c3340567bf85cd43734028361fe821eac789fbe397b8d1a4f9ebb3ab4c81ef7910160405180910390a15050565b600033610c0f8582856118bb565b610c1a858585611935565b506001949350505050565b610c2d611699565b6013546001600160a01b0390811690831603610ca75760405162461bcd60e51b815260206004820152603360248201527f44656661756c74526f757465723a2043616e6e6f742072656d6f766520696e696044820152721d1a585b081c185a5c88199c9bdb481b1a5cdd606a1b606482015260840161092c565b610cb18282611fd9565b5050565b600033610a57818585610cc88383611423565b610cd29190612b52565b6116f3565b60118160038110610a7357600080fd5b610cf13382612031565b50565b610cfc611699565b600d546011548491610d159161ffff9182169116612a72565b610d1f9190612a94565b6011805461ffff191661ffff9283161790819055600d548492610d4f926201000092839004821692900416612a72565b610d599190612a94565b6011805463ffff000019166201000061ffff938416021790819055600d548392610d9192600160201b92839004821692900416612a72565b610d9b9190612a94565b6011805461ffff928316600160201b0265ffff0000000019821681179092556109c4908316919092161711801590610de257506011546109c46201000090910461ffff1611155b8015610dfe57506011546109c4600160201b90910461ffff1611155b610e1a5760405162461bcd60e51b815260040161092c90612aaf565b6040805160608101825261ffff80861682528481166020830152831691810191909152610e4b90600d9060036127ad565b506040805161ffff808616825280851660208301528316918101919091527f1e5d76e30cd4303515f118e75cbf9d9440bb68ab78b2c2fa46984200dc11ad64906060016109aa565b610e9b611699565b6001600160a01b038116610ec15760405162461bcd60e51b815260040161092c90612b65565b600a80546001600160a01b0319166001600160a01b038316179055610ee7816001611217565b6040516001600160a01b03821681527f6ef5c55bf991f333ad120679e74ec7640b0edaf86c361263a1ffcb4f53106eb890602001610b85565b610f28611699565b600e546011548491610f419161ffff9182169116612a72565b610f4b9190612a94565b6011805461ffff191661ffff9283161790819055600e548492610f7b926201000092839004821692900416612a72565b610f859190612a94565b6011805463ffff000019166201000061ffff938416021790819055600e548392610fbd92600160201b92839004821692900416612a72565b610fc79190612a94565b6011805461ffff928316600160201b0265ffff0000000019821681179092556109c490831691909216171180159061100e57506011546109c46201000090910461ffff1611155b801561102a57506011546109c4600160201b90910461ffff1611155b6110465760405162461bcd60e51b815260040161092c90612aaf565b6040805160608101825261ffff8086168252848116602083015283169181019190915261107790600e9060036127ad565b506040805161ffff808616825280851660208301528316918101919091527f5c6dd066977d1639216aedea00d1204fef7166f3c39e50c26ea04bfd41e561c8906060016109aa565b6110c7611699565b6110d16000612163565b565b60065433906001600160a01b031681146111415760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161092c565b610cf181612163565b6111558233836118bb565b610cb18282612031565b600d8160038110610a7357600080fd5b6060600480546109c690612b05565b600f8160038110610a7357600080fd5b6000338161119c8286611423565b9050838110156111fc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161092c565b610c1a82868684036116f3565b600033610a57818585611935565b61121f611699565b6001600160a01b038216600081815260106020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df791015b60405180910390a25050565b611287611699565b6001600160a01b0381166112ad5760405162461bcd60e51b815260040161092c90612b65565b600c80546001600160a01b0319166001600160a01b0383161790556112d3816001611217565b6040516001600160a01b03821681527feaf1986d341c3096d2d5d32f86ed29a21fee4e0d8365cd2b6fa85c0ec6889cf690602001610b85565b600654600160a81b900460ff168061132e5750600654600160a01b900460ff16155b6113915760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161092c565b600654600160a81b900460ff161580156113bb576006805461ffff60a01b191661010160a01b1790555b6113c48261217c565b8015610cb1576006805460ff60a81b191690555050565b6006546013546001600160a01b031660009081526020819052604081205490916127109161141491600160b01b900461ffff1690612bd1565b61141e9190612be8565b905090565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611456611699565b600f54601154849161146f9161ffff9182169116612a72565b6114799190612a94565b6011805461ffff191661ffff9283161790819055600f5484926114a9926201000092839004821692900416612a72565b6114b39190612a94565b6011805463ffff000019166201000061ffff938416021790819055600f5483926114eb92600160201b92839004821692900416612a72565b6114f59190612a94565b6011805461ffff928316600160201b0265ffff0000000019821681179092556109c490831691909216171180159061153c57506011546109c46201000090910461ffff1611155b801561155857506011546109c4600160201b90910461ffff1611155b6115745760405162461bcd60e51b815260040161092c90612aaf565b6040805160608101825261ffff808616825284811660208301528316918101919091526115a590600f9060036127ad565b506040805161ffff808616825280851660208301528316918101919091527f2524ccb75260c9a50c71af1740c212c049a01232ef122061416b51815ec57a18906060016109aa565b600060095460085460075460006116049190612b52565b61160e9190612b52565b61141e9190612b52565b611620611699565b600680546001600160a01b0383166001600160a01b031990911681179091556116516005546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600e8160038110610a7357600080fd5b6005546001600160a01b031633146110d15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161092c565b6001600160a01b0383166117555760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161092c565b6001600160a01b0382166117b65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161092c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600080611825600284612be8565b905060006118338285612b3f565b905061183e82612372565b4780156118b357600080600061185485856124ef565b604080518481526020810184905290810182905292955090935091507f3db50c324c27fb39c451e35d4d23abba3e20d96d036e7a40f4adc681c1ce30139060600160405180910390a16118a78386612b3f565b98975050505050505050565b509392505050565b60006118c78484611423565b9050600019811461192f57818110156119225760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161092c565b61192f84848484036116f3565b50505050565b60125460ff161580156119485750600081115b801561196757506012546001600160a01b038381166101009092041614155b801561198c57506001600160a01b03831660009081526010602052604090205460ff16155b80156119b157506001600160a01b03821660009081526010602052604090205460ff16155b15611d7c576001600160a01b03831660009081526014602052604081205460039060ff16156119ef5760115461ffff16156119ea575060005b611a41565b6001600160a01b03841660009081526014602052604090205460ff1615611a2a5760115462010000900461ffff16156119ea57506001611a41565b601154600160201b900461ffff1615611a41575060025b60038160ff161015611d6857600061271060118360ff1660038110611a6857611a68612a46565b601091828204019190066002029054906101000a900461ffff1661ffff1685611a919190612bd1565b611a9b9190612be8565b9250611aa78385612b3f565b935060118260ff1660038110611abf57611abf612a46565b601091828204019190066002029054906101000a900461ffff1661ffff16600b8360ff1660038110611af357611af3612a46565b601091828204019190066002029054906101000a900461ffff1661ffff1684611b1c9190612bd1565b611b269190612be8565b60076000828254611b379190612b52565b909155506011905060ff831660038110611b5357611b53612a46565b601091828204019190066002029054906101000a900461ffff1661ffff16600d8360ff1660038110611b8757611b87612a46565b601091828204019190066002029054906101000a900461ffff1661ffff1684611bb09190612bd1565b611bba9190612be8565b60086000828254611bcb9190612b52565b9091555060009050600e60ff841660038110611be957611be9612a46565b601091828204019190066002029054906101000a900461ffff1661ffff161115611cca5760118260ff1660038110611c2357611c23612a46565b601091828204019190066002029054906101000a900461ffff1661ffff16600e8360ff1660038110611c5757611c57612a46565b601091828204019190066002029054906101000a900461ffff1661ffff1684611c809190612bd1565b611c8a9190612be8565b9050611c968682612031565b6040518181527f7c76b725c3bdd88cc239c1cbdc4c37e260fc0650dd4784ce22d4fbd64d98c4d99060200160405180910390a15b60118260ff1660038110611ce057611ce0612a46565b601081049091015461ffff6002600f938416026101000a909104169060ff841660038110611d1057611d10612a46565b601091828204019190066002029054906101000a900461ffff1661ffff1684611d399190612bd1565b611d439190612be8565b60096000828254611d549190612b52565b90915550611d6490508184612b3f565b9250505b8115611d7957611d798530846125b7565b50505b6000611d866113db565b611d8e6115ed565b10158015611db457506013546001600160a01b0316600090815260208190526040812054115b60125490915060ff16158015611de357506001600160a01b03841660009081526014602052604090205460ff16155b8015611e0257506012546001600160a01b038581166101009092041614155b8015611e0b5750805b15611fce576012805460ff1916600117905560006007541180611e3057506000600854115b15611fa95760006008546007546000611e499190612b52565b611e539190612b52565b90506000611e6082612372565b60075447906000908490611e749084612bd1565b611e7e9190612be8565b90508015611efe57600a546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505092508215611efe57600a54604080516001600160a01b039092168252602082018390527f01c315ade553f98aff01ff11fa4b8d61ebe9ea3c2347276e6d78ec0aa07af1a1910160405180910390a15b600060078190556008548590611f149085612bd1565b611f1e9190612be8565b90508015611f9e57600c546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505093508315611f9e57600c54604080516001600160a01b039092168252602082018390527f3e6afd69feef8f4cc1adbe6d3905e477db85aa5aa28d02674dc4bc6d39237fe4910160405180910390a15b505060006008555050505b60095415611fc357611fbc600954611817565b5060006009555b6012805460ff191690555b61192f8484846125b7565b6001600160a01b038216600081815260146020908152604091829020805460ff191685151590811790915591519182527f911aa18ddbbbc33c9b4c704a71bdaa0984b0aa2e82726a7f51e64bad0b0a84559101611273565b6001600160a01b0382166120915760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161092c565b6001600160a01b038216600090815260208190526040902054818110156121055760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161092c565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600680546001600160a01b0319169055610cf18161275b565b80601260016101000a8154816001600160a01b0302191690836001600160a01b03160217905550601260019054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061221a9190612c0a565b6001600160a01b031663c9c6539630601260019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561227c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a09190612c0a565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190612c0a565b601380546001600160a01b0319166001600160a01b0392909216918217905561233b906001611fd9565b6040516001600160a01b038216907fbc052db65df144ad4f71f02da93cae3d4401104c30ac374d7cc10d87ee07b60290600090a250565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106123a7576123a7612a46565b60200260200101906001600160a01b031690816001600160a01b031681525050601260019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561241a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061243e9190612c0a565b8160018151811061245157612451612a46565b6001600160a01b03928316602091820292909201015260125461247c913091610100900416846116f3565b60125460405163791ac94760e01b81526101009091046001600160a01b03169063791ac947906124b9908590600090869030904290600401612c27565b600060405180830381600087803b1580156124d357600080fd5b505af11580156124e7573d6000803e3d6000fd5b505050505050565b600080600061251430601260019054906101000a90046001600160a01b0316876116f3565b60125460405163f305d71960e01b8152306004820152602481018790526000604482018190526064820181905260848201524260a48201526101009091046001600160a01b03169063f305d71990869060c40160606040518083038185885af1158015612585573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906125aa9190612c98565b9250925092509250925092565b6001600160a01b03831661261b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161092c565b6001600160a01b03821661267d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161092c565b6001600160a01b038316600090815260208190526040902054818110156126f55760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161092c565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361192f565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001830191839082156128335791602002820160005b8382111561280357835183826101000a81548161ffff021916908361ffff16021790555092602001926002016020816001010492830192600103026127c3565b80156128315782816101000a81549061ffff0219169055600201602081600101049283019260010302612803565b505b5061283f929150612843565b5090565b5b8082111561283f5760008155600101612844565b803561ffff8116811461286a57600080fd5b919050565b60008060006060848603121561288457600080fd5b61288d84612858565b925061289b60208501612858565b91506128a960408501612858565b90509250925092565b600060208083528351808285015260005b818110156128df578581018301518582016040015282016128c3565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610cf157600080fd5b6000806040838503121561292857600080fd5b823561293381612900565b946020939093013593505050565b60006020828403121561295357600080fd5b5035919050565b60006020828403121561296c57600080fd5b61297582612858565b9392505050565b60008060006060848603121561299157600080fd5b833561299c81612900565b925060208401356129ac81612900565b929592945050506040919091013590565b600080604083850312156129d057600080fd5b82356129db81612900565b9150602083013580151581146129f057600080fd5b809150509250929050565b600060208284031215612a0d57600080fd5b813561297581612900565b60008060408385031215612a2b57600080fd5b8235612a3681612900565b915060208301356129f081612900565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b61ffff828116828216039080821115612a8d57612a8d612a5c565b5092915050565b61ffff818116838216019080821115612a8d57612a8d612a5c565b60208082526036908201527f546178657344656661756c74526f757465723a2043616e6e6f7420657863656560408201527564206d617820746f74616c20666565206f662032352560501b606082015260800190565b600181811c90821680612b1957607f821691505b602082108103612b3957634e487b7160e01b600052602260045260246000fd5b50919050565b81810381811115610a5d57610a5d612a5c565b80820180821115610a5d57610a5d612a5c565b60208082526046908201527f546178657344656661756c74526f7574657257616c6c65743a2057616c6c657460408201527f2074617820726563697069656e742063616e6e6f74206265206120307830206160608201526564647265737360d01b608082015260a00190565b8082028115828204841417610a5d57610a5d612a5c565b600082612c0557634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215612c1c57600080fd5b815161297581612900565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612c775784516001600160a01b031683529383019391830191600101612c52565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215612cad57600080fd5b835192506020840151915060408401519050925092509256fea2646970667358221220c0ac90ab9b2ea3c0d4d0db3f3bfb22313d7612a179618179e3de02cb833f088064736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
ERC20.sol 365 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./IERC20Metadata.sol";
import "./Context.sol";
/**
* @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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead 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, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override 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 default value returned by this function, unless
* it's overridden.
*
* 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 override returns (uint8) {
return 18;
}
/**
* @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:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, 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}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, 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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
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) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + 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) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This 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:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, 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:
*
* - `account` 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 += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(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);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @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 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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
Token.sol 360 lines
/*
#####################################
Token generated with ❤️ on 20lab.app
#####################################
*/
// SPDX-License-Identifier: No License
pragma solidity 0.8.19;
import "./ERC20.sol";
import "./ERC20Burnable.sol";
import "./Ownable2Step.sol";
import "./Initializable.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Pair.sol";
import "./IUniswapV2Router01.sol";
import "./IUniswapV2Router02.sol";
contract CognoFi is ERC20, ERC20Burnable, Ownable2Step, Initializable {
uint16 public swapThresholdRatio;
uint256 private _developmentPending;
uint256 private _marketingPending;
uint256 private _liquidityPending;
address public developmentAddress;
uint16[3] public developmentFees;
address public marketingAddress;
uint16[3] public marketingFees;
uint16[3] public autoBurnFees;
uint16[3] public liquidityFees;
mapping (address => bool) public isExcludedFromFees;
uint16[3] public totalFees;
bool private _swapping;
IUniswapV2Router02 public routerV2;
address public pairV2;
mapping (address => bool) public AMMPairs;
event SwapThresholdUpdated(uint16 swapThresholdRatio);
event developmentAddressUpdated(address developmentAddress);
event developmentFeesUpdated(uint16 buyFee, uint16 sellFee, uint16 transferFee);
event developmentFeeSent(address recipient, uint256 amount);
event marketingAddressUpdated(address marketingAddress);
event marketingFeesUpdated(uint16 buyFee, uint16 sellFee, uint16 transferFee);
event marketingFeeSent(address recipient, uint256 amount);
event autoBurnFeesUpdated(uint16 buyFee, uint16 sellFee, uint16 transferFee);
event autoBurned(uint256 amount);
event liquidityFeesUpdated(uint16 buyFee, uint16 sellFee, uint16 transferFee);
event liquidityAdded(uint amountToken, uint amountCoin, uint liquidity);
event ForceLiquidityAdded(uint256 leftoverTokens, uint256 unaddedTokens);
event ExcludeFromFees(address indexed account, bool isExcluded);
event RouterV2Updated(address indexed routerV2);
event AMMPairsUpdated(address indexed AMMPair, bool isPair);
constructor()
ERC20(unicode"CognoFi", unicode"CGF")
{
address supplyRecipient = 0x5EB597490b5b9f0Cd862a186c66b6a1cDF94039C;
updateSwapThreshold(50);
developmentAddressSetup(0xCc14a19C59d2B8CfBbD81EB16759004c64AE7D6A);
developmentFeesSetup(375, 375, 0);
marketingAddressSetup(0x1f032E6eA5b1cb508511fd449Fa93385C41cFb32);
marketingFeesSetup(100, 100, 0);
autoBurnFeesSetup(0, 25, 0);
liquidityFeesSetup(25, 0, 0);
excludeFromFees(supplyRecipient, true);
excludeFromFees(address(this), true);
_mint(supplyRecipient, 210000000 * (10 ** decimals()) / 10);
_transferOwnership(0x5EB597490b5b9f0Cd862a186c66b6a1cDF94039C);
}
/*
This token is not upgradeable, but uses both the constructor and initializer for post-deployment setup.
*/
function initialize(address _router) initializer external {
_updateRouterV2(_router);
}
receive() external payable {}
function decimals() public pure override returns (uint8) {
return 18;
}
function _swapTokensForCoin(uint256 tokenAmount) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = routerV2.WETH();
_approve(address(this), address(routerV2), tokenAmount);
routerV2.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path, address(this), block.timestamp);
}
function updateSwapThreshold(uint16 _swapThresholdRatio) public onlyOwner {
require(_swapThresholdRatio > 0 && _swapThresholdRatio <= 500, "SwapThreshold: Cannot exceed limits from 0.01% to 5% for new swap threshold");
swapThresholdRatio = _swapThresholdRatio;
emit SwapThresholdUpdated(_swapThresholdRatio);
}
function getSwapThresholdAmount() public view returns (uint256) {
return balanceOf(pairV2) * swapThresholdRatio / 10000;
}
function getAllPending() public view returns (uint256) {
return 0 + _developmentPending + _marketingPending + _liquidityPending;
}
function developmentAddressSetup(address _newAddress) public onlyOwner {
require(_newAddress != address(0), "TaxesDefaultRouterWallet: Wallet tax recipient cannot be a 0x0 address");
developmentAddress = _newAddress;
excludeFromFees(_newAddress, true);
emit developmentAddressUpdated(_newAddress);
}
function developmentFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - developmentFees[0] + _buyFee;
totalFees[1] = totalFees[1] - developmentFees[1] + _sellFee;
totalFees[2] = totalFees[2] - developmentFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
developmentFees = [_buyFee, _sellFee, _transferFee];
emit developmentFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function marketingAddressSetup(address _newAddress) public onlyOwner {
require(_newAddress != address(0), "TaxesDefaultRouterWallet: Wallet tax recipient cannot be a 0x0 address");
marketingAddress = _newAddress;
excludeFromFees(_newAddress, true);
emit marketingAddressUpdated(_newAddress);
}
function marketingFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - marketingFees[0] + _buyFee;
totalFees[1] = totalFees[1] - marketingFees[1] + _sellFee;
totalFees[2] = totalFees[2] - marketingFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
marketingFees = [_buyFee, _sellFee, _transferFee];
emit marketingFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function autoBurnFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - autoBurnFees[0] + _buyFee;
totalFees[1] = totalFees[1] - autoBurnFees[1] + _sellFee;
totalFees[2] = totalFees[2] - autoBurnFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
autoBurnFees = [_buyFee, _sellFee, _transferFee];
emit autoBurnFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function _swapAndLiquify(uint256 tokenAmount) private returns (uint256 leftover) {
// Sub-optimal method for supplying liquidity
uint256 halfAmount = tokenAmount / 2;
uint256 otherHalf = tokenAmount - halfAmount;
_swapTokensForCoin(halfAmount);
uint256 coinBalance = address(this).balance;
if (coinBalance > 0) {
(uint amountToken, uint amountCoin, uint liquidity) = _addLiquidity(otherHalf, coinBalance);
emit liquidityAdded(amountToken, amountCoin, liquidity);
return otherHalf - amountToken;
} else {
return otherHalf;
}
}
function _addLiquidity(uint256 tokenAmount, uint256 coinAmount) private returns (uint, uint, uint) {
_approve(address(this), address(routerV2), tokenAmount);
return routerV2.addLiquidityETH{value: coinAmount}(address(this), tokenAmount, 0, 0, address(0), block.timestamp);
}
function addLiquidityFromLeftoverTokens() external {
uint256 leftoverTokens = balanceOf(address(this)) - getAllPending();
uint256 unaddedTokens = _swapAndLiquify(leftoverTokens);
emit ForceLiquidityAdded(leftoverTokens, unaddedTokens);
}
function liquidityFeesSetup(uint16 _buyFee, uint16 _sellFee, uint16 _transferFee) public onlyOwner {
totalFees[0] = totalFees[0] - liquidityFees[0] + _buyFee;
totalFees[1] = totalFees[1] - liquidityFees[1] + _sellFee;
totalFees[2] = totalFees[2] - liquidityFees[2] + _transferFee;
require(totalFees[0] <= 2500 && totalFees[1] <= 2500 && totalFees[2] <= 2500, "TaxesDefaultRouter: Cannot exceed max total fee of 25%");
liquidityFees = [_buyFee, _sellFee, _transferFee];
emit liquidityFeesUpdated(_buyFee, _sellFee, _transferFee);
}
function excludeFromFees(address account, bool isExcluded) public onlyOwner {
isExcludedFromFees[account] = isExcluded;
emit ExcludeFromFees(account, isExcluded);
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
if (!_swapping && amount > 0 && to != address(routerV2) && !isExcludedFromFees[from] && !isExcludedFromFees[to]) {
uint256 fees = 0;
uint8 txType = 3;
if (AMMPairs[from]) {
if (totalFees[0] > 0) txType = 0;
}
else if (AMMPairs[to]) {
if (totalFees[1] > 0) txType = 1;
}
else if (totalFees[2] > 0) txType = 2;
if (txType < 3) {
uint256 autoBurnPortion = 0;
fees = amount * totalFees[txType] / 10000;
amount -= fees;
_developmentPending += fees * developmentFees[txType] / totalFees[txType];
_marketingPending += fees * marketingFees[txType] / totalFees[txType];
if (autoBurnFees[txType] > 0) {
autoBurnPortion = fees * autoBurnFees[txType] / totalFees[txType];
_burn(from, autoBurnPortion);
emit autoBurned(autoBurnPortion);
}
_liquidityPending += fees * liquidityFees[txType] / totalFees[txType];
fees = fees - autoBurnPortion;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
}
bool canSwap = getAllPending() >= getSwapThresholdAmount() && balanceOf(pairV2) > 0;
if (!_swapping && !AMMPairs[from] && from != address(routerV2) && canSwap) {
_swapping = true;
if (false || _developmentPending > 0 || _marketingPending > 0) {
uint256 token2Swap = 0 + _developmentPending + _marketingPending;
bool success = false;
_swapTokensForCoin(token2Swap);
uint256 coinsReceived = address(this).balance;
uint256 developmentPortion = coinsReceived * _developmentPending / token2Swap;
if (developmentPortion > 0) {
success = payable(developmentAddress).send(developmentPortion);
if (success) {
emit developmentFeeSent(developmentAddress, developmentPortion);
}
}
_developmentPending = 0;
uint256 marketingPortion = coinsReceived * _marketingPending / token2Swap;
if (marketingPortion > 0) {
success = payable(marketingAddress).send(marketingPortion);
if (success) {
emit marketingFeeSent(marketingAddress, marketingPortion);
}
}
_marketingPending = 0;
}
if (_liquidityPending > 0) {
_swapAndLiquify(_liquidityPending);
_liquidityPending = 0;
}
_swapping = false;
}
super._transfer(from, to, amount);
}
function _updateRouterV2(address router) private {
routerV2 = IUniswapV2Router02(router);
pairV2 = IUniswapV2Factory(routerV2.factory()).createPair(address(this), routerV2.WETH());
_setAMMPair(pairV2, true);
emit RouterV2Updated(router);
}
function setAMMPair(address pair, bool isPair) external onlyOwner {
require(pair != pairV2, "DefaultRouter: Cannot remove initial pair from list");
_setAMMPair(pair, isPair);
}
function _setAMMPair(address pair, bool isPair) private {
AMMPairs[pair] = isPair;
if (isPair) {
}
emit AMMPairsUpdated(pair, isPair);
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
override
{
super._beforeTokenTransfer(from, to, amount);
}
function _afterTokenTransfer(address from, address to, uint256 amount)
internal
override
{
super._afterTokenTransfer(from, to, amount);
}
}
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
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;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "./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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
Ownable2Step.sol 57 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.0;
import "./Ownable.sol";
/**
* @dev Contract module which provides 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} and {acceptOwnership}.
*
* This module is used through inheritance. It will make available all functions
* from parent (Ownable).
*/
abstract contract Ownable2Step is Ownable {
address private _pendingOwner;
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
return _pendingOwner;
}
/**
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual override onlyOwner {
_pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual override {
delete _pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() public virtual {
address sender = _msgSender();
require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
_transferOwnership(sender);
}
}
ERC20Burnable.sol 39 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
import "./ERC20.sol";
import "./Context.sol";
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}
Initializable.sol 47 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
IUniswapV2Pair.sol 52 lines
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;
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
Read Contract
AMMPairs 0x76856557 → bool
allowance 0xdd62ed3e → uint256
autoBurnFees 0xf7dcdcce → uint16
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
developmentAddress 0x638b1b14 → address
developmentFees 0x17d41cd0 → uint16
getAllPending 0xf112ba72 → uint256
getSwapThresholdAmount 0xd9477526 → uint256
isExcludedFromFees 0x4fbee193 → bool
liquidityFees 0x966b53c4 → uint16
marketingAddress 0xa5ece941 → address
marketingFees 0x8e749a8f → uint16
name 0x06fdde03 → string
owner 0x8da5cb5b → address
pairV2 0x8fffabed → address
pendingOwner 0xe30c3978 → address
routerV2 0x502f7446 → address
swapThresholdRatio 0x4f011b83 → uint16
symbol 0x95d89b41 → string
totalFees 0x408ccbdf → uint16
totalSupply 0x18160ddd → uint256
Write Contract 21 functions
These functions modify contract state and require a wallet transaction to execute.
acceptOwnership 0x79ba5097
No parameters
addLiquidityFromLeftoverTokens 0x1af3c61d
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
autoBurnFeesSetup 0x6c9e28aa
uint16 _buyFee
uint16 _sellFee
uint16 _transferFee
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
developmentAddressSetup 0x60d091a4
address _newAddress
developmentFeesSetup 0x03240157
uint16 _buyFee
uint16 _sellFee
uint16 _transferFee
excludeFromFees 0xc0246668
address account
bool isExcluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
initialize 0xc4d66de8
address _router
liquidityFeesSetup 0xe6268158
uint16 _buyFee
uint16 _sellFee
uint16 _transferFee
marketingAddressSetup 0xc400f5e7
address _newAddress
marketingFeesSetup 0x4a4dd9cd
uint16 _buyFee
uint16 _sellFee
uint16 _transferFee
renounceOwnership 0x715018a6
No parameters
setAMMPair 0x2d99d32e
address pair
bool isPair
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateSwapThreshold 0x1a0e718c
uint16 _swapThresholdRatio
Recent Transactions
No transactions found for this address