Address Contract Partially Verified
Address
0x55BC1d60b9E8847d1b88fC0B75e76afA827A71A0
Balance
0.003000 ETH
Nonce
1
Code Size
16025 bytes
Creator
0x5b0f1835...7278 at tx 0x4a29dbb8...348b05
Indexed Transactions
0
Contract Bytecode
16025 bytes
0x6080604052600436106102345760003560e01c806370105c3b1161012e578063a9059cbb116100ab578063dd62ed3e1161006f578063dd62ed3e14610850578063e2f456051461088d578063e6c75f71146108b8578063f2fde38b146108e3578063f5b01e151461090c5761023b565b8063a9059cbb1461076b578063b45e83f8146107a8578063c0246668146107d3578063c49b9a80146107fc578063ccb61358146108255761023b565b80638da5cb5b116100f25780638da5cb5b146106845780638ea5220f146106af57806391d55f41146106da57806395d89b4114610703578063a457c2d71461072e5761023b565b806370105c3b146105b157806370a08231146105da578063715018a6146106175780637e7613771461062e57806385141a77146106595761023b565b80631816467f116101bc5780634a74bb02116101805780634a74bb02146104c85780634b8ce602146104f35780634fbee1931461051e578063556482091461055b5780635aa821a9146105865761023b565b80631816467f146103cf57806323b872dd146103f8578063313ce56714610435578063395093511461046057806349bd5a5e1461049d5761023b565b806309e89af71161020357806309e89af7146102fe5780631127ae3b1461032757806316216e5f146103505780631694505e1461037957806318160ddd146103a45761023b565b806301143fea1461024057806302259e9e1461026b57806306fdde0314610296578063095ea7b3146102c15761023b565b3661023b57005b600080fd5b34801561024c57600080fd5b50610255610935565b6040516102629190612c8a565b60405180910390f35b34801561027757600080fd5b5061028061093b565b60405161028d9190612c8a565b60405180910390f35b3480156102a257600080fd5b506102ab610941565b6040516102b89190612d35565b60405180910390f35b3480156102cd57600080fd5b506102e860048036038101906102e39190612de6565b6109d3565b6040516102f59190612e41565b60405180910390f35b34801561030a57600080fd5b5061032560048036038101906103209190612e5c565b6109f1565b005b34801561033357600080fd5b5061034e60048036038101906103499190612e89565b610a77565b005b34801561035c57600080fd5b5061037760048036038101906103729190612e5c565b610b5b565b005b34801561038557600080fd5b5061038e610c41565b60405161039b9190612f28565b60405180910390f35b3480156103b057600080fd5b506103b9610c67565b6040516103c69190612c8a565b60405180910390f35b3480156103db57600080fd5b506103f660048036038101906103f19190612f81565b610c71565b005b34801561040457600080fd5b5061041f600480360381019061041a9190612fae565b610d31565b60405161042c9190612e41565b60405180910390f35b34801561044157600080fd5b5061044a610e29565b604051610457919061301d565b60405180910390f35b34801561046c57600080fd5b5061048760048036038101906104829190612de6565b610e32565b6040516104949190612e41565b60405180910390f35b3480156104a957600080fd5b506104b2610ede565b6040516104bf9190613047565b60405180910390f35b3480156104d457600080fd5b506104dd610f02565b6040516104ea9190612e41565b60405180910390f35b3480156104ff57600080fd5b50610508610f15565b6040516105159190612c8a565b60405180910390f35b34801561052a57600080fd5b5061054560048036038101906105409190613062565b610f1b565b6040516105529190612e41565b60405180910390f35b34801561056757600080fd5b50610570610f71565b60405161057d9190612c8a565b60405180910390f35b34801561059257600080fd5b5061059b610f77565b6040516105a89190612c8a565b60405180910390f35b3480156105bd57600080fd5b506105d860048036038101906105d39190612e89565b610f7d565b005b3480156105e657600080fd5b5061060160048036038101906105fc9190613062565b611061565b60405161060e9190612c8a565b60405180910390f35b34801561062357600080fd5b5061062c6110a9565b005b34801561063a57600080fd5b50610643611131565b6040516106509190612c8a565b60405180910390f35b34801561066557600080fd5b5061066e611137565b60405161067b9190613047565b60405180910390f35b34801561069057600080fd5b5061069961115d565b6040516106a69190613047565b60405180910390f35b3480156106bb57600080fd5b506106c4611187565b6040516106d1919061309e565b60405180910390f35b3480156106e657600080fd5b5061070160048036038101906106fc9190612e5c565b6111ad565b005b34801561070f57600080fd5b506107186112d4565b6040516107259190612d35565b60405180910390f35b34801561073a57600080fd5b5061075560048036038101906107509190612de6565b611366565b6040516107629190612e41565b60405180910390f35b34801561077757600080fd5b50610792600480360381019061078d9190612de6565b611451565b60405161079f9190612e41565b60405180910390f35b3480156107b457600080fd5b506107bd61146f565b6040516107ca9190612c8a565b60405180910390f35b3480156107df57600080fd5b506107fa60048036038101906107f591906130e5565b611475565b005b34801561080857600080fd5b50610823600480360381019061081e9190613125565b61162c565b005b34801561083157600080fd5b5061083a6116fc565b6040516108479190612c8a565b60405180910390f35b34801561085c57600080fd5b5061087760048036038101906108729190613152565b611702565b6040516108849190612c8a565b60405180910390f35b34801561089957600080fd5b506108a2611789565b6040516108af9190612c8a565b60405180910390f35b3480156108c457600080fd5b506108cd61178f565b6040516108da9190612c8a565b60405180910390f35b3480156108ef57600080fd5b5061090a60048036038101906109059190613062565b611795565b005b34801561091857600080fd5b50610933600480360381019061092e9190612e5c565b61188c565b005b600a5481565b600e5481565b606060038054610950906131c1565b80601f016020809104026020016040519081016040528092919081815260200182805461097c906131c1565b80156109c95780601f1061099e576101008083540402835291602001916109c9565b820191906000526020600020905b8154815290600101906020018083116109ac57829003601f168201915b5050505050905090565b60006109e76109e0611972565b848461197a565b6001905092915050565b6109f9611972565b73ffffffffffffffffffffffffffffffffffffffff16610a1761115d565b73ffffffffffffffffffffffffffffffffffffffff1614610a6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a649061323e565b60405180910390fd5b80600f8190555050565b610a7f611972565b73ffffffffffffffffffffffffffffffffffffffff16610a9d61115d565b73ffffffffffffffffffffffffffffffffffffffff1614610af3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aea9061323e565b60405180910390fd5b6005610b088284611b4390919063ffffffff16565b1115610b49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b40906132aa565b60405180910390fd5b8160098190555080600a819055505050565b610b63611972565b73ffffffffffffffffffffffffffffffffffffffff16610b8161115d565b73ffffffffffffffffffffffffffffffffffffffff1614610bd7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bce9061323e565b60405180910390fd5b80600e81905550610bfa6101f4610bec610c67565b611b5990919063ffffffff16565b600e541015610c3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3590613316565b60405180910390fd5b50565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600254905090565b610c79611972565b73ffffffffffffffffffffffffffffffffffffffff16610c9761115d565b73ffffffffffffffffffffffffffffffffffffffff1614610ced576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce49061323e565b60405180910390fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610d3e848484611b6f565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610d89611972565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610e09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e00906133a8565b60405180910390fd5b610e1d85610e15611972565b85840361197a565b60019150509392505050565b60006012905090565b6000610ed4610e3f611972565b848460016000610e4d611972565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ecf91906133f7565b61197a565b6001905092915050565b7f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e81565b601260159054906101000a900460ff1681565b60075481565b6000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60085481565b600d5481565b610f85611972565b73ffffffffffffffffffffffffffffffffffffffff16610fa361115d565b73ffffffffffffffffffffffffffffffffffffffff1614610ff9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff09061323e565b60405180910390fd5b600561100e8284611b4390919063ffffffff16565b111561104f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611046906132aa565b60405180910390fd5b81600b8190555080600c819055505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6110b1611972565b73ffffffffffffffffffffffffffffffffffffffff166110cf61115d565b73ffffffffffffffffffffffffffffffffffffffff1614611125576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111c9061323e565b60405180910390fd5b61112f6000612413565b565b600c5481565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6111b5611972565b73ffffffffffffffffffffffffffffffffffffffff166111d361115d565b73ffffffffffffffffffffffffffffffffffffffff1614611229576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112209061323e565b60405180910390fd5b60006010549050816010819055506112536101f4611245610c67565b611b5990919063ffffffff16565b6010541015611297576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128e90613316565b60405180910390fd5b7f0a7c714b6801281a6e2610a6371ac6a5da9a5947616d74f4aa3ad1d289278e7381836040516112c892919061342b565b60405180910390a15050565b6060600480546112e3906131c1565b80601f016020809104026020016040519081016040528092919081815260200182805461130f906131c1565b801561135c5780601f106113315761010080835404028352916020019161135c565b820191906000526020600020905b81548152906001019060200180831161133f57829003601f168201915b5050505050905090565b60008060016000611375611972565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611432576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611429906134c6565b60405180910390fd5b61144661143d611972565b8585840361197a565b600191505092915050565b600061146561145e611972565b8484611b6f565b6001905092915050565b600b5481565b61147d611972565b73ffffffffffffffffffffffffffffffffffffffff1661149b61115d565b73ffffffffffffffffffffffffffffffffffffffff16146114f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e89061323e565b60405180910390fd5b801515601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151503611583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157a90613558565b60405180910390fd5b80601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7826040516116209190612e41565b60405180910390a25050565b611634611972565b73ffffffffffffffffffffffffffffffffffffffff1661165261115d565b73ffffffffffffffffffffffffffffffffffffffff16146116a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169f9061323e565b60405180910390fd5b80601260156101000a81548160ff0219169083151502179055507f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc159816040516116f19190612e41565b60405180910390a150565b60095481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600f5481565b60105481565b61179d611972565b73ffffffffffffffffffffffffffffffffffffffff166117bb61115d565b73ffffffffffffffffffffffffffffffffffffffff1614611811576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118089061323e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611880576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611877906135ea565b60405180910390fd5b61188981612413565b50565b611894611972565b73ffffffffffffffffffffffffffffffffffffffff166118b261115d565b73ffffffffffffffffffffffffffffffffffffffff1614611908576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ff9061323e565b60405180910390fd5b80600d8190555061192b6101f461191d610c67565b611b5990919063ffffffff16565b600d54101561196f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196690613316565b60405180910390fd5b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036119e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e09061367c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4f9061370e565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611b369190612c8a565b60405180910390a3505050565b60008183611b5191906133f7565b905092915050565b60008183611b67919061375d565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611bde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd590613800565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4490613892565b60405180910390fd5b60008103611c6657611c61838360006124d9565b61240e565b7f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611d0b5750601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d615750601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611dc5576000611d7183611061565b90506010548282611d8291906133f7565b1115611dc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dba90613924565b60405180910390fd5b505b601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611e695750601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec057507f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611f0b57600d54811115611f0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f01906139b6565b60405180910390fd5b5b601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611faf5750601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561200657507f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b1561205157600e54811115612050576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204790613a48565b60405180910390fd5b5b601260149054906101000a900460ff161580156120b957507f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b80156120d15750601260159054906101000a900460ff165b80156120f05750600f546008541015806120ef5750600f5460075410155b5b156120fe576120fd612758565b5b601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156121a25750601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156124025760008060007f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16036122b4576000600a541115612259576122326064612224600a54876128dc90919063ffffffff16565b611b5990919063ffffffff16565b9250826008600082825461224691906133f7565b925050819055506122588630856124d9565b5b600060095411156122b35761228c606461227e600954876128dc90919063ffffffff16565b611b5990919063ffffffff16565b915081600760008282546122a091906133f7565b925050819055506122b28630846124d9565b5b5b7f0000000000000000000000004e8434ca189ef08a897e08c312d5af8668854b3e73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036123c5576000600b5411156123615761233a606461232c600b54876128dc90919063ffffffff16565b611b5990919063ffffffff16565b9250826008600082825461234e91906133f7565b925050819055506123608630856124d9565b5b6000600c5411156123c4576123946064612386600c54876128dc90919063ffffffff16565b611b5990919063ffffffff16565b90506123c386601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836124d9565b5b5b6123fc6123ed826123df8587611b4390919063ffffffff16565b611b4390919063ffffffff16565b856128f290919063ffffffff16565b93505050505b61240d8383836124d9565b5b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161253f90613800565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036125b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ae90613892565b60405180910390fd5b6125c2838383612908565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263f90613ada565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126db91906133f7565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161273f9190612c8a565b60405180910390a361275284848461290d565b50505050565b6001601260146101000a81548160ff021916908315150217905550600061277e30611061565b9050600f54600754101580156127965750600f548110155b156128595760006127b36002600f54611b5990919063ffffffff16565b905060006127cc82600f546128f290919063ffffffff16565b905060004790506127dd8330612912565b60006127f282476128f290919063ffffffff16565b90506127fe8382612b8c565b7f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb56184828560405161283193929190613afa565b60405180910390a1600f546007600082825461284d9190613b31565b92505081905550505050505b600f546008541015801561286f5750600f548110155b156128be576128a2600f54601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612912565b600f54600860008282546128b69190613b31565b925050819055505b506000601260146101000a81548160ff021916908315150217905550565b600081836128ea9190613b65565b905092915050565b600081836129009190613b31565b905092915050565b505050565b505050565b6000600267ffffffffffffffff81111561292f5761292e613ba7565b5b60405190808252806020026020018201604052801561295d5781602001602082028036833780820191505090505b509050308160008151811061297557612974613bd6565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a409190613c1a565b81600181518110612a5457612a53613bd6565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082612abb30600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611702565b1015612af157612af030600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660001961197a565b5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478460008486426040518663ffffffff1660e01b8152600401612b55959493929190613d40565b600060405180830381600087803b158015612b6f57600080fd5b505af1158015612b83573d6000803e3d6000fd5b50505050505050565b612bb930600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461197a565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719823085600080612c0561115d565b426040518863ffffffff1660e01b8152600401612c2796959493929190613d9a565b60606040518083038185885af1158015612c45573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612c6a9190613e10565b5050505050565b6000819050919050565b612c8481612c71565b82525050565b6000602082019050612c9f6000830184612c7b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612cdf578082015181840152602081019050612cc4565b60008484015250505050565b6000601f19601f8301169050919050565b6000612d0782612ca5565b612d118185612cb0565b9350612d21818560208601612cc1565b612d2a81612ceb565b840191505092915050565b60006020820190508181036000830152612d4f8184612cfc565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d8782612d5c565b9050919050565b612d9781612d7c565b8114612da257600080fd5b50565b600081359050612db481612d8e565b92915050565b612dc381612c71565b8114612dce57600080fd5b50565b600081359050612de081612dba565b92915050565b60008060408385031215612dfd57612dfc612d57565b5b6000612e0b85828601612da5565b9250506020612e1c85828601612dd1565b9150509250929050565b60008115159050919050565b612e3b81612e26565b82525050565b6000602082019050612e566000830184612e32565b92915050565b600060208284031215612e7257612e71612d57565b5b6000612e8084828501612dd1565b91505092915050565b60008060408385031215612ea057612e9f612d57565b5b6000612eae85828601612dd1565b9250506020612ebf85828601612dd1565b9150509250929050565b6000819050919050565b6000612eee612ee9612ee484612d5c565b612ec9565b612d5c565b9050919050565b6000612f0082612ed3565b9050919050565b6000612f1282612ef5565b9050919050565b612f2281612f07565b82525050565b6000602082019050612f3d6000830184612f19565b92915050565b6000612f4e82612d5c565b9050919050565b612f5e81612f43565b8114612f6957600080fd5b50565b600081359050612f7b81612f55565b92915050565b600060208284031215612f9757612f96612d57565b5b6000612fa584828501612f6c565b91505092915050565b600080600060608486031215612fc757612fc6612d57565b5b6000612fd586828701612da5565b9350506020612fe686828701612da5565b9250506040612ff786828701612dd1565b9150509250925092565b600060ff82169050919050565b61301781613001565b82525050565b6000602082019050613032600083018461300e565b92915050565b61304181612d7c565b82525050565b600060208201905061305c6000830184613038565b92915050565b60006020828403121561307857613077612d57565b5b600061308684828501612da5565b91505092915050565b61309881612f43565b82525050565b60006020820190506130b3600083018461308f565b92915050565b6130c281612e26565b81146130cd57600080fd5b50565b6000813590506130df816130b9565b92915050565b600080604083850312156130fc576130fb612d57565b5b600061310a85828601612da5565b925050602061311b858286016130d0565b9150509250929050565b60006020828403121561313b5761313a612d57565b5b6000613149848285016130d0565b91505092915050565b6000806040838503121561316957613168612d57565b5b600061317785828601612da5565b925050602061318885828601612da5565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806131d957607f821691505b6020821081036131ec576131eb613192565b5b50919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613228602083612cb0565b9150613233826131f2565b602082019050919050565b600060208201905081810360008301526132578161321b565b9050919050565b7f74617820746f6f20686967680000000000000000000000000000000000000000600082015250565b6000613294600c83612cb0565b915061329f8261325e565b602082019050919050565b600060208201905081810360008301526132c381613287565b9050919050565b7f76616c756520746f6f206c6f7700000000000000000000000000000000000000600082015250565b6000613300600d83612cb0565b915061330b826132ca565b602082019050919050565b6000602082019050818103600083015261332f816132f3565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000613392602883612cb0565b915061339d82613336565b604082019050919050565b600060208201905081810360008301526133c181613385565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061340282612c71565b915061340d83612c71565b9250828201905080821115613425576134246133c8565b5b92915050565b60006040820190506134406000830185612c7b565b61344d6020830184612c7b565b9392505050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006134b0602583612cb0565b91506134bb82613454565b604082019050919050565b600060208201905081810360008301526134df816134a3565b9050919050565b7f4163636f756e7420697320616c7265616479207468652076616c7565206f662060008201527f276578636c756465642700000000000000000000000000000000000000000000602082015250565b6000613542602a83612cb0565b915061354d826134e6565b604082019050919050565b6000602082019050818103600083015261357181613535565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006135d4602683612cb0565b91506135df82613578565b604082019050919050565b60006020820190508181036000830152613603816135c7565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613666602483612cb0565b91506136718261360a565b604082019050919050565b6000602082019050818103600083015261369581613659565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006136f8602283612cb0565b91506137038261369c565b604082019050919050565b60006020820190508181036000830152613727816136eb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061376882612c71565b915061377383612c71565b9250826137835761378261372e565b5b828204905092915050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006137ea602583612cb0565b91506137f58261378e565b604082019050919050565b60006020820190508181036000830152613819816137dd565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061387c602383612cb0565b915061388782613820565b604082019050919050565b600060208201905081810360008301526138ab8161386f565b9050919050565b7f45786365656473206d6178696d756d2077616c6c657420746f6b656e20616d6f60008201527f756e742e00000000000000000000000000000000000000000000000000000000602082015250565b600061390e602483612cb0565b9150613919826138b2565b604082019050919050565b6000602082019050818103600083015261393d81613901565b9050919050565b7f616d6f756e74206578636565647320746865206d61784275795472616e73616360008201527f74696f6e416d6f756e742e000000000000000000000000000000000000000000602082015250565b60006139a0602b83612cb0565b91506139ab82613944565b604082019050919050565b600060208201905081810360008301526139cf81613993565b9050919050565b7f616d6f756e74206578636565647320746865206d617853656c6c5472616e736160008201527f6374696f6e416d6f756e742e0000000000000000000000000000000000000000602082015250565b6000613a32602c83612cb0565b9150613a3d826139d6565b604082019050919050565b60006020820190508181036000830152613a6181613a25565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000613ac4602683612cb0565b9150613acf82613a68565b604082019050919050565b60006020820190508181036000830152613af381613ab7565b9050919050565b6000606082019050613b0f6000830186612c7b565b613b1c6020830185612c7b565b613b296040830184612c7b565b949350505050565b6000613b3c82612c71565b9150613b4783612c71565b9250828203905081811115613b5f57613b5e6133c8565b5b92915050565b6000613b7082612c71565b9150613b7b83612c71565b9250828202613b8981612c71565b91508282048414831517613ba057613b9f6133c8565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050613c1481612d8e565b92915050565b600060208284031215613c3057613c2f612d57565b5b6000613c3e84828501613c05565b91505092915050565b6000819050919050565b6000613c6c613c67613c6284613c47565b612ec9565b612c71565b9050919050565b613c7c81613c51565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613cb781612d7c565b82525050565b6000613cc98383613cae565b60208301905092915050565b6000602082019050919050565b6000613ced82613c82565b613cf78185613c8d565b9350613d0283613c9e565b8060005b83811015613d33578151613d1a8882613cbd565b9750613d2583613cd5565b925050600181019050613d06565b5085935050505092915050565b600060a082019050613d556000830188612c7b565b613d626020830187613c73565b8181036040830152613d748186613ce2565b9050613d836060830185613038565b613d906080830184612c7b565b9695505050505050565b600060c082019050613daf6000830189613038565b613dbc6020830188612c7b565b613dc96040830187613c73565b613dd66060830186613c73565b613de36080830185613038565b613df060a0830184612c7b565b979650505050505050565b600081519050613e0a81612dba565b92915050565b600080600060608486031215613e2957613e28612d57565b5b6000613e3786828701613dfb565b9350506020613e4886828701613dfb565b9250506040613e5986828701613dfb565b915050925092509256fea2646970667358221220a1d6c4c74f485e10b2812e047fa94aa5293ea4cd25f6d5026af4fff29073de2464736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: No
PayX.sol 1056 lines
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.17;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/**
* @dev Implementation of the {IERC20} interface.
*/
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}.
*
*/
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.
*/
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}.
*
*/
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}.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
*/
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);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*/
function _createTotalSupply(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
*/
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 Hook that is called before any transfer of tokens. This includes
* minting and burning.
*/
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.
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
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);
}
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;
}
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;
}
/**
* @dev Wrappers over Solidity's arithmetic operations.
*/
library SignedSafeMath {
/**
* @dev Returns the multiplication of two signed integers, reverting on
* overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
return a * b;
}
/**
* @dev Returns the integer division of two signed integers. Reverts on
* division by zero. The result is rounded towards zero.
*/
function div(int256 a, int256 b) internal pure returns (int256) {
return a / b;
}
/**
* @dev Returns the subtraction of two signed integers, reverting on
* overflow.
*/
function sub(int256 a, int256 b) internal pure returns (int256) {
return a - b;
}
/**
* @dev Returns the addition of two signed integers, reverting on
* overflow.
*/
function add(int256 a, int256 b) internal pure returns (int256) {
return a + b;
}
}
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
/**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
* checks.
*/
library SafeCast {
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*/
function toUint224(uint256 value) internal pure returns (uint224) {
require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
return uint224(value);
}
/**
* @dev Returns the downcasted uint128 from uint256, reverting on
* overflow (when the input is greater than largest uint128).
*/
function toUint128(uint256 value) internal pure returns (uint128) {
require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
return uint128(value);
}
/**
* @dev Returns the downcasted uint96 from uint256, reverting on
* overflow (when the input is greater than largest uint96).
*/
function toUint96(uint256 value) internal pure returns (uint96) {
require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
return uint96(value);
}
/**
* @dev Returns the downcasted uint64 from uint256, reverting on
* overflow (when the input is greater than largest uint64).
*/
function toUint64(uint256 value) internal pure returns (uint64) {
require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
return uint64(value);
}
/**
* @dev Returns the downcasted uint32 from uint256, reverting on
* overflow (when the input is greater than largest uint32).
*/
function toUint32(uint256 value) internal pure returns (uint32) {
require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
return uint32(value);
}
/**
* @dev Returns the downcasted uint16 from uint256, reverting on
* overflow (when the input is greater than largest uint16).
*/
function toUint16(uint256 value) internal pure returns (uint16) {
require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
return uint16(value);
}
/**
* @dev Returns the downcasted uint8 from uint256, reverting on
* overflow (when the input is greater than largest uint8).
*/
function toUint8(uint256 value) internal pure returns (uint8) {
require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
return uint8(value);
}
/**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*/
function toUint256(int256 value) internal pure returns (uint256) {
require(value >= 0, "SafeCast: value must be positive");
return uint256(value);
}
/**
* @dev Returns the downcasted int128 from int256, reverting on
* overflow (when the input is less than smallest int128 or
*/
function toInt128(int256 value) internal pure returns (int128) {
require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
return int128(value);
}
/**
* @dev Returns the downcasted int64 from int256, reverting on
* overflow (when the input is less than smallest int64 or
*/
function toInt64(int256 value) internal pure returns (int64) {
require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
return int64(value);
}
/**
* @dev Returns the downcasted int32 from int256, reverting on
* overflow (when the input is less than smallest int32 or
*/
function toInt32(int256 value) internal pure returns (int32) {
require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
return int32(value);
}
/**
* @dev Returns the downcasted int16 from int256, reverting on
* overflow (when the input is less than smallest int16 or
*/
function toInt16(int256 value) internal pure returns (int16) {
require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
return int16(value);
}
/**
* @dev Returns the downcasted int8 from int256, reverting on
* overflow (when the input is less than smallest int8 or
*/
function toInt8(int256 value) internal pure returns (int8) {
require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
return int8(value);
}
/**
* @dev Converts an unsigned uint256 into a signed int256.
*/
function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
return int256(value);
}
}
contract PayX is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
uint256 public liquidityTokens;
uint256 public devTokens;
uint256 public liquidityBuyFee = 0;
uint256 public devBuyFee = 30;
uint256 public devSellFee = 60;
uint256 public burnSellFee = 0;
uint256 public maxBuyTransactionAmount = 20000 * (10**18);
uint256 public maxSellTransactionAmount = 20000 * (10**18);
uint256 public swapTokensAtAmount = 10000 * (10**18);
uint256 public maxWalletToken = 20000 * (10**18);
address payable public devWallet = payable(0xE5753fb738b9e1FC94e0E4AacA6aF0efA3De4074);
address public deadWallet = 0x000000000000000000000000000000000000dEaD;
bool private inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
// exlcude from fees
mapping (address => bool) private _isExcludedFromFees;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapEthForTokens(uint256 amountIn, address[] path);
event SwapAndLiquify(uint256 tokensIntoLiqudity, uint256 ethReceived);
event ExcludeFromFees(address indexed account, bool isExcluded);
event MaxWalletAmountUpdated(uint256 prevValue, uint256 newValue);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor() ERC20("PayX", "PAYX") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
// Create a uniswap pair for this new token
address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = _uniswapV2Pair;
// exclude from paying fees or having max transaction amount
excludeFromFees(owner(), true);
excludeFromFees(address(this), true);
excludeFromFees(devWallet, true);
/*
internal function that is only called here,
and CANNOT be called ever again
*/
_createTotalSupply(owner(), 1000000 * (10**18));
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
if(amount == 0) {
super._transfer(from, to, 0);
return;
}
if (from==uniswapV2Pair && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
uint256 contractBalanceRecepient = balanceOf(to);
require(contractBalanceRecepient + amount <= maxWalletToken, "Exceeds maximum wallet token amount.");
}
if(!_isExcludedFromFees[from] && !_isExcludedFromFees[to] && from==uniswapV2Pair){
require(amount <= maxBuyTransactionAmount, "amount exceeds the maxBuyTransactionAmount.");
}
if(!_isExcludedFromFees[from] && !_isExcludedFromFees[to] && to==uniswapV2Pair){
require(amount <= maxSellTransactionAmount, "amount exceeds the maxSellTransactionAmount.");
}
if(!inSwapAndLiquify && to==uniswapV2Pair &&
swapAndLiquifyEnabled &&
(devTokens >= swapTokensAtAmount ||
liquidityTokens >= swapTokensAtAmount))
{
swapAndLiquify();
}
if(!_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
uint256 devShare;
uint256 liquidityShare;
uint256 burnShare;
if(from==uniswapV2Pair) {
if(devBuyFee > 0) {
devShare = amount.mul(devBuyFee).div(100);
devTokens += devShare;
super._transfer(from, address(this), devShare);
}
if(liquidityBuyFee > 0) {
liquidityShare = amount.mul(liquidityBuyFee).div(100);
liquidityTokens += liquidityShare;
super._transfer(from, address(this), liquidityShare);
}
}
if(to==uniswapV2Pair) {
if(devSellFee > 0) {
devShare = amount.mul(devSellFee).div(100);
devTokens += devShare;
super._transfer(from, address(this), devShare);
}
if(burnSellFee > 0) {
burnShare = amount.mul(burnSellFee).div(100);
super._transfer(from, deadWallet, burnShare);
}
}
amount = amount.sub(devShare.add(liquidityShare).add(burnShare));
}
super._transfer(from, to, amount);
}
function swapAndLiquify() private lockTheSwap {
uint256 contractTokenBalance = balanceOf(address(this));
if(liquidityTokens >= swapTokensAtAmount && contractTokenBalance >= swapTokensAtAmount) {
// split the contract balance into halves
uint256 half = swapTokensAtAmount.div(2);
uint256 otherHalf = swapTokensAtAmount.sub(half);
// capture the contract's current ETH balance.
uint256 initialBalance = address(this).balance;
// swap tokens for ETH
swapTokensForEth(half, address(this));
// how much ETH did we just swap into?
uint256 newBalance = address(this).balance.sub(initialBalance);
// add liquidity to uniswap
addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
liquidityTokens -= swapTokensAtAmount;
}
if(devTokens >= swapTokensAtAmount && contractTokenBalance >= swapTokensAtAmount) {
swapTokensForEth(swapTokensAtAmount, devWallet);
devTokens -= swapTokensAtAmount;
}
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
// approve token transfer to cover all possible scenarios
_approve(address(this), address(uniswapV2Router), tokenAmount);
// add the liquidity
uniswapV2Router.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
owner(),
block.timestamp
);
}
function swapTokensForEth(uint256 tokenAmount, address _to) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
if(allowance(address(this), address(uniswapV2Router)) < tokenAmount) {
_approve(address(this), address(uniswapV2Router), ~uint256(0));
}
// make the swap
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
_to,
block.timestamp
);
}
function removeBuyFee(uint256 _liqFee, uint256 _devFee) public onlyOwner() {
require(_liqFee.add(_devFee) <= 5, "tax too high");
liquidityBuyFee = _liqFee;
devBuyFee = _devFee;
}
function removeSellFee(uint256 _devFee, uint256 _burnFee) public onlyOwner() {
require(_devFee.add(_burnFee) <= 5, "tax too high");
devSellFee = _devFee;
burnSellFee = _burnFee;
}
function updateDevWallet(address payable _devWallet) public onlyOwner {
devWallet = _devWallet;
}
function setMaxBuyTransactionAmount(uint256 _maxTxAmount) public onlyOwner {
maxBuyTransactionAmount = _maxTxAmount;
require(maxBuyTransactionAmount >= totalSupply().div(500), "value too low");
}
function setMaxSellTransactionAmount(uint256 _maxTxAmount) public onlyOwner {
maxSellTransactionAmount = _maxTxAmount;
require(maxSellTransactionAmount >= totalSupply().div(500), "value too low");
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
require(_isExcludedFromFees[account] != excluded, "Account is already the value of 'excluded'");
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function SetSwapTokensAtAmount(uint256 newLimit) external onlyOwner {
swapTokensAtAmount = newLimit;
}
function isExcludedFromFees(address account) public view returns(bool) {
return _isExcludedFromFees[account];
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
function setMaxWalletToken(uint256 _newValue) external onlyOwner {
uint256 prevValue = maxWalletToken;
maxWalletToken = _newValue;
require(maxWalletToken >= totalSupply().div(500), "value too low");
emit MaxWalletAmountUpdated(prevValue, _newValue);
}
receive() external payable {
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
burnSellFee 0x7e761377 → uint256
deadWallet 0x85141a77 → address
decimals 0x313ce567 → uint8
devBuyFee 0x01143fea → uint256
devSellFee 0xb45e83f8 → uint256
devTokens 0x55648209 → uint256
devWallet 0x8ea5220f → address
isExcludedFromFees 0x4fbee193 → bool
liquidityBuyFee 0xccb61358 → uint256
liquidityTokens 0x4b8ce602 → uint256
maxBuyTransactionAmount 0x5aa821a9 → uint256
maxSellTransactionAmount 0x02259e9e → uint256
maxWalletToken 0xe6c75f71 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
swapAndLiquifyEnabled 0x4a74bb02 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 16 functions
These functions modify contract state and require a wallet transaction to execute.
SetSwapTokensAtAmount 0x09e89af7
uint256 newLimit
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFees 0xc0246668
address account
bool excluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeBuyFee 0x1127ae3b
uint256 _liqFee
uint256 _devFee
removeSellFee 0x70105c3b
uint256 _devFee
uint256 _burnFee
renounceOwnership 0x715018a6
No parameters
setMaxBuyTransactionAmount 0xf5b01e15
uint256 _maxTxAmount
setMaxSellTransactionAmount 0x16216e5f
uint256 _maxTxAmount
setMaxWalletToken 0x91d55f41
uint256 _newValue
setSwapAndLiquifyEnabled 0xc49b9a80
bool _enabled
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateDevWallet 0x1816467f
address _devWallet
Recent Transactions
No transactions found for this address