Address Contract Partially Verified
Address
0x74bE64B45D394FA57816c1950E94dBB8d7A7B306
Balance
0 ETH
Nonce
1
Code Size
10335 bytes
Creator
0xe9cbFbcf...bCEB at tx 0x00cd1aea...bfbcb2
Indexed Transactions
0
Contract Bytecode
10335 bytes
0x6080604052600436106103035760003560e01c80637571336a11610190578063bbc0c742116100dc578063d85ba06311610095578063f11a24d31161006f578063f11a24d314610930578063f2fde38b14610946578063f637434214610966578063f8b45b051461097c57600080fd5b8063d85ba063146108be578063dd62ed3e146108d4578063e2f456051461091a57600080fd5b8063bbc0c74214610808578063c024666814610827578063c18bc19514610847578063c876d0b914610867578063c8c8ebe414610888578063d257b34f1461089e57600080fd5b806395d89b4111610149578063a325f6e811610123578063a325f6e814610782578063a457c2d714610798578063a9059cbb146107b8578063b62496f5146107d857600080fd5b806395d89b4114610737578063975d71e21461074c5780639a7a23d61461076257600080fd5b80637571336a1461068e5780637ab43983146106ae5780637ea98fda146106c45780638a8c523c146106e45780638da5cb5b146106f95780638ea5220f1461071757600080fd5b806327c8f8351161024f57806366ca9b83116102085780636fbc0105116101e25780636fbc01051461061857806370a082311461062e578063715018a614610664578063751039fc1461067957600080fd5b806366ca9b83146105c25780636a486a8e146105e25780636ddd1713146105f857600080fd5b806327c8f835146104e9578063313ce567146104ff578063395093511461051b57806349bd5a5e1461053b5780634a62bb651461056f5780634fbee1931461058957600080fd5b806318160ddd116102bc5780631ef72b51116102965780631ef72b5114610473578063203e727e1461049357806323b872dd146104b3578063264cdd4d146104d357600080fd5b806318160ddd146104285780631816467f1461043d5780631a8145bb1461045d57600080fd5b806302dbd8f81461030f578063047fc9aa1461033157806306fdde031461035a578063095ea7b31461037c57806310d5de53146103ac5780631694505e146103dc57600080fd5b3661030a57005b600080fd5b34801561031b57600080fd5b5061032f61032a3660046122d5565b610992565b005b34801561033d57600080fd5b5061034760165481565b6040519081526020015b60405180910390f35b34801561036657600080fd5b5061036f610a32565b60405161035191906122f7565b34801561038857600080fd5b5061039c610397366004612364565b610ac4565b6040519015158152602001610351565b3480156103b857600080fd5b5061039c6103c7366004612390565b60186020526000908152604090205460ff1681565b3480156103e857600080fd5b506104107f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610351565b34801561043457600080fd5b50600254610347565b34801561044957600080fd5b5061032f610458366004612390565b610adb565b34801561046957600080fd5b5061034760125481565b34801561047f57600080fd5b50600754610410906001600160a01b031681565b34801561049f57600080fd5b5061032f6104ae3660046123ad565b610b27565b3480156104bf57600080fd5b5061039c6104ce3660046123c6565b610c0b565b3480156104df57600080fd5b5061034760135481565b3480156104f557600080fd5b5061041061dead81565b34801561050b57600080fd5b5060405160098152602001610351565b34801561052757600080fd5b5061039c610536366004612364565b610c74565b34801561054757600080fd5b506104107f000000000000000000000000d805fb416585d1d724e29f0e38529b9c7a5db81d81565b34801561057b57600080fd5b50600b5461039c9060ff1681565b34801561059557600080fd5b5061039c6105a4366004612390565b6001600160a01b031660009081526017602052604090205460ff1690565b3480156105ce57600080fd5b5061032f6105dd3660046122d5565b610caa565b3480156105ee57600080fd5b50610347600f5481565b34801561060457600080fd5b50600b5461039c9062010000900460ff1681565b34801561062457600080fd5b5061034760115481565b34801561063a57600080fd5b50610347610649366004612390565b6001600160a01b031660009081526020819052604090205490565b34801561067057600080fd5b5061032f610d3d565b34801561068557600080fd5b5061039c610db1565b34801561069a57600080fd5b5061032f6106a9366004612407565b610dee565b3480156106ba57600080fd5b5061034760145481565b3480156106d057600080fd5b5061032f6106df366004612390565b610e43565b3480156106f057600080fd5b5061032f610e8f565b34801561070557600080fd5b506005546001600160a01b0316610410565b34801561072357600080fd5b50600654610410906001600160a01b031681565b34801561074357600080fd5b5061036f610ecc565b34801561075857600080fd5b5061034760155481565b34801561076e57600080fd5b5061032f61077d366004612407565b610edb565b34801561078e57600080fd5b50610347600e5481565b3480156107a457600080fd5b5061039c6107b3366004612364565b610fb7565b3480156107c457600080fd5b5061039c6107d3366004612364565b611006565b3480156107e457600080fd5b5061039c6107f3366004612390565b60196020526000908152604090205460ff1681565b34801561081457600080fd5b50600b5461039c90610100900460ff1681565b34801561083357600080fd5b5061032f610842366004612407565b611013565b34801561085357600080fd5b5061032f6108623660046123ad565b61109c565b34801561087357600080fd5b50600b5461039c906301000000900460ff1681565b34801561089457600080fd5b5061034760085481565b3480156108aa57600080fd5b5061039c6108b93660046123ad565b611174565b3480156108ca57600080fd5b50610347600c5481565b3480156108e057600080fd5b506103476108ef366004612445565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561092657600080fd5b5061034760095481565b34801561093c57600080fd5b50610347600d5481565b34801561095257600080fd5b5061032f610961366004612390565b6112c6565b34801561097257600080fd5b5061034760105481565b34801561098857600080fd5b50610347600a5481565b6005546001600160a01b031633146109c55760405162461bcd60e51b81526004016109bc90612473565b60405180910390fd5b601082905560118190556109d981836124be565b600f81905560031015610a2e5760405162461bcd60e51b815260206004820152601c60248201527f4d757374206b6565702066656573206174203325206f72206c6573730000000060448201526064016109bc565b5050565b606060038054610a41906124d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6d906124d6565b8015610aba5780601f10610a8f57610100808354040283529160200191610aba565b820191906000526020600020905b815481529060010190602001808311610a9d57829003601f168201915b5050505050905090565b6000610ad1338484611417565b5060015b92915050565b6005546001600160a01b03163314610b055760405162461bcd60e51b81526004016109bc90612473565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610b515760405162461bcd60e51b81526004016109bc90612473565b610b5d6009600a6125f5565b6103e8610b6960025490565b610b74906001612604565b610b7e9190612623565b610b889190612623565b811015610bef5760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f7420736574206d61785472616e73616374696f6e416d6f756e742060448201526e6c6f776572207468616e20302e312560881b60648201526084016109bc565b610bfb6009600a6125f5565b610c059082612604565b60085550565b6000610c1884848461153c565b610c6a8433610c65856040518060600160405280602881526020016127dd602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190611be9565b611417565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610ad1918590610c6590866113b1565b6005546001600160a01b03163314610cd45760405162461bcd60e51b81526004016109bc90612473565b600d829055600e819055610ce881836124be565b600c81905560031015610a2e5760405162461bcd60e51b815260206004820152601c60248201527f4d757374206b6565702066656573206174203325206f72206c6573730000000060448201526064016109bc565b6005546001600160a01b03163314610d675760405162461bcd60e51b81526004016109bc90612473565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546000906001600160a01b03163314610dde5760405162461bcd60e51b81526004016109bc90612473565b50600b805460ff19169055600190565b6005546001600160a01b03163314610e185760405162461bcd60e51b81526004016109bc90612473565b6001600160a01b03919091166000908152601860205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610e6d5760405162461bcd60e51b81526004016109bc90612473565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610eb95760405162461bcd60e51b81526004016109bc90612473565b600b805462ffff00191662010100179055565b606060048054610a41906124d6565b6005546001600160a01b03163314610f055760405162461bcd60e51b81526004016109bc90612473565b7f000000000000000000000000d805fb416585d1d724e29f0e38529b9c7a5db81d6001600160a01b0316826001600160a01b03161415610fad5760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b657250616972730000000000000060648201526084016109bc565b610a2e8282611c23565b6000610ad13384610c6585604051806060016040528060258152602001612805602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190611be9565b6000610ad133848461153c565b6005546001600160a01b0316331461103d5760405162461bcd60e51b81526004016109bc90612473565b6001600160a01b038216600081815260176020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b031633146110c65760405162461bcd60e51b81526004016109bc90612473565b6110d26009600a6125f5565b6103e86110de60025490565b6110e9906005612604565b6110f39190612623565b6110fd9190612623565b8110156111585760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015263302e352560e01b60648201526084016109bc565b6111646009600a6125f5565b61116e9082612604565b600a5550565b6005546000906001600160a01b031633146111a15760405162461bcd60e51b81526004016109bc90612473565b620186a06111ae60025490565b6111b9906001612604565b6111c39190612623565b8210156112305760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b60648201526084016109bc565b6103e861123c60025490565b611247906005612604565b6112519190612623565b8211156112bd5760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171a92903a37ba30b61039bab838363c9760611b60648201526084016109bc565b50600955600190565b6005546001600160a01b031633146112f05760405162461bcd60e51b81526004016109bc90612473565b6001600160a01b0381166113555760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109bc565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000806113be83856124be565b9050838110156114105760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016109bc565b9392505050565b6001600160a01b0383166114795760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109bc565b6001600160a01b0382166114da5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109bc565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166115625760405162461bcd60e51b81526004016109bc90612645565b6001600160a01b0382166115885760405162461bcd60e51b81526004016109bc9061268a565b8061159e5761159983836000611c77565b505050565b600b5460ff1615611914576005546001600160a01b038481169116148015906115d557506005546001600160a01b03838116911614155b80156115e957506001600160a01b03821615155b801561160057506001600160a01b03821661dead14155b80156116165750600554600160a01b900460ff16155b1561191457600b54610100900460ff166116ae576001600160a01b03831660009081526017602052604090205460ff168061166957506001600160a01b03821660009081526017602052604090205460ff165b6116ae5760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016109bc565b6001600160a01b03831660009081526019602052604090205460ff1680156116ef57506001600160a01b03821660009081526018602052604090205460ff16155b156117d3576008548111156117645760405162461bcd60e51b815260206004820152603560248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201527436b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760591b60648201526084016109bc565b600a546001600160a01b03831660009081526020819052604090205461178a90836124be565b11156117ce5760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016109bc565b611914565b6001600160a01b03821660009081526019602052604090205460ff16801561181457506001600160a01b03831660009081526018602052604090205460ff16155b1561188a576008548111156117ce5760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b60648201526084016109bc565b6001600160a01b03821660009081526018602052604090205460ff1661191457600a546001600160a01b0383166000908152602081905260409020546118d090836124be565b11156119145760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016109bc565b30600090815260208190526040902054600954811080159081906119405750600b5462010000900460ff165b80156119565750600554600160a01b900460ff16155b801561197b57506001600160a01b03851660009081526019602052604090205460ff16155b80156119a057506001600160a01b03851660009081526017602052604090205460ff16155b80156119c557506001600160a01b03841660009081526017602052604090205460ff16155b156119f3576005805460ff60a01b1916600160a01b1790556119e5611d80565b6005805460ff60a01b191690555b6005546001600160a01b03861660009081526017602052604090205460ff600160a01b909204821615911680611a4157506001600160a01b03851660009081526017602052604090205460ff165b15611a4a575060005b60008115611bd5576001600160a01b03861660009081526019602052604090205460ff168015611a7c57506000600f54115b15611b0a57611aa16064611a9b600f5488611ee590919063ffffffff16565b90611f64565b9050600f5460105482611ab49190612604565b611abe9190612623565b60126000828254611acf91906124be565b9091555050600f54601154611ae49083612604565b611aee9190612623565b60136000828254611aff91906124be565b90915550611bb79050565b6001600160a01b03871660009081526019602052604090205460ff168015611b3457506000600c54115b15611bb757611b536064611a9b600c5488611ee590919063ffffffff16565b9050600c54600d5482611b669190612604565b611b709190612623565b60126000828254611b8191906124be565b9091555050600c54600e54611b969083612604565b611ba09190612623565b60136000828254611bb191906124be565b90915550505b8015611bc857611bc8873083611c77565b611bd281866126cd565b94505b611be0878787611c77565b50505050505050565b60008184841115611c0d5760405162461bcd60e51b81526004016109bc91906122f7565b506000611c1a84866126cd565b95945050505050565b6001600160a01b038216600081815260196020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6001600160a01b038316611c9d5760405162461bcd60e51b81526004016109bc90612645565b6001600160a01b038216611cc35760405162461bcd60e51b81526004016109bc9061268a565b611d00816040518060600160405280602681526020016127b7602691396001600160a01b0386166000908152602081905260409020549190611be9565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611d2f90826113b1565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161152f565b3060009081526020819052604081205490506000601354601254611da491906124be565b90506000821580611db3575081155b15611dbd57505050565b600954611dcb906005612604565b831115611de357600954611de0906005612604565b92505b600060028360125486611df69190612604565b611e009190612623565b611e0a9190612623565b90506000611e188583611fa6565b905047611e2482611fe8565b6000611e304783611fa6565b90506000611e4d87611a9b60135485611ee590919063ffffffff16565b90506000611e5b82846126cd565b6000601281905560135590508515801590611e765750600081115b15611e8557611e8586826121b7565b6007546040516001600160a01b03909116904790600081818185875af1925050503d8060008114611ed2576040519150601f19603f3d011682016040523d82523d6000602084013e611ed7565b606091505b505050505050505050505050565b600082611ef457506000610ad5565b6000611f008385612604565b905082611f0d8583612623565b146114105760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016109bc565b600061141083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122a7565b600061141083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611be9565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061201d5761201d6126e4565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561209657600080fd5b505afa1580156120aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ce91906126fa565b816001815181106120e1576120e16126e4565b60200260200101906001600160a01b031690816001600160a01b03168152505061212c307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611417565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790612181908590600090869030904290600401612717565b600060405180830381600087803b15801561219b57600080fd5b505af11580156121af573d6000803e3d6000fd5b505050505050565b6121e2307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611417565b60405163f305d71960e01b815230600482015260248101839052600060448201819052606482015261dead60848201524260a48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03169063f305d71990839060c4016060604051808303818588803b15801561226757600080fd5b505af115801561227b573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906122a09190612788565b5050505050565b600081836122c85760405162461bcd60e51b81526004016109bc91906122f7565b506000611c1a8486612623565b600080604083850312156122e857600080fd5b50508035926020909101359150565b600060208083528351808285015260005b8181101561232457858101830151858201604001528201612308565b81811115612336576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461236157600080fd5b50565b6000806040838503121561237757600080fd5b82356123828161234c565b946020939093013593505050565b6000602082840312156123a257600080fd5b81356114108161234c565b6000602082840312156123bf57600080fd5b5035919050565b6000806000606084860312156123db57600080fd5b83356123e68161234c565b925060208401356123f68161234c565b929592945050506040919091013590565b6000806040838503121561241a57600080fd5b82356124258161234c565b91506020830135801515811461243a57600080fd5b809150509250929050565b6000806040838503121561245857600080fd5b82356124638161234c565b9150602083013561243a8161234c565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156124d1576124d16124a8565b500190565b600181811c908216806124ea57607f821691505b6020821081141561250b57634e487b7160e01b600052602260045260246000fd5b50919050565b600181815b8085111561254c578160001904821115612532576125326124a8565b8085161561253f57918102915b93841c9390800290612516565b509250929050565b60008261256357506001610ad5565b8161257057506000610ad5565b81600181146125865760028114612590576125ac565b6001915050610ad5565b60ff8411156125a1576125a16124a8565b50506001821b610ad5565b5060208310610133831016604e8410600b84101617156125cf575081810a610ad5565b6125d98383612511565b80600019048211156125ed576125ed6124a8565b029392505050565b600061141060ff841683612554565b600081600019048311821515161561261e5761261e6124a8565b500290565b60008261264057634e487b7160e01b600052601260045260246000fd5b500490565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6000828210156126df576126df6124a8565b500390565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561270c57600080fd5b81516114108161234c565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156127675784516001600160a01b031683529383019391830191600101612742565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561279d57600080fd5b835192506020840151915060408401519050925092509256fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203529121e66b48098e447520b45740a7d7310f41ec654e4f97c363f761211a1a764736f6c63430008090033
Verified Source Code Partial Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: Yes (200 runs)
GiveWellInuV2.sol 1242 lines
/*
https://t.me/GiveWellInu
VB tweet - https://twitter.com/vitalikbuterin/status/1590473524220952577?s=46&t=M-p6nvBmOjFV_I4z8IjOrg
Taxes are 3% on buys and 3% on sells. 2% per swap goes to GiveWell.org, 1% per swap will be added to the LP.
Their ETH wallet address can be found here: (0x7cF2eBb5Ca55A8bd671A020F8BDbAF07f60F26C1)
https://www.givewell.org/about/donate/cryptocurrency
As of the time of this launch over 13ETH ($16K USD) has already been donated to GiveWell by the GINU team.
http://Twitter.com/GiveWell_Inu
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.9;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
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;
}
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;
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
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);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* 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 value {ERC20} uses, unless this function is
* 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 9;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `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 = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
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 () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
library SafeMathInt {
int256 private constant MIN_INT256 = int256(1) << 255;
int256 private constant MAX_INT256 = ~(int256(1) << 255);
/**
* @dev Multiplies two int256 variables and fails on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
int256 c = a * b;
// Detect overflow when multiplying MIN_INT256 with -1
require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
require((b == 0) || (c / b == a));
return c;
}
/**
* @dev Division of two int256 variables and fails on overflow.
*/
function div(int256 a, int256 b) internal pure returns (int256) {
// Prevent overflow when dividing MIN_INT256 by -1
require(b != -1 || a != MIN_INT256);
// Solidity already throws when dividing by 0.
return a / b;
}
/**
* @dev Subtracts two int256 variables and fails on overflow.
*/
function sub(int256 a, int256 b) internal pure returns (int256) {
int256 c = a - b;
require((b >= 0 && c <= a) || (b < 0 && c > a));
return c;
}
/**
* @dev Adds two int256 variables and fails on overflow.
*/
function add(int256 a, int256 b) internal pure returns (int256) {
int256 c = a + b;
require((b >= 0 && c >= a) || (b < 0 && c < a));
return c;
}
/**
* @dev Converts to absolute value, and fails on overflow.
*/
function abs(int256 a) internal pure returns (int256) {
require(a != MIN_INT256);
return a < 0 ? -a : a;
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
require(a >= 0);
return uint256(a);
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
int256 b = int256(a);
require(b >= 0);
return b;
}
}
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;
}
contract GiveWellInuV2 is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
address public constant deadAddress = address(0xdead);
bool private swapping;
address public devWallet;
address public GiveWellWallet;
uint8 constant _decimals = 9;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
bool public transferDelayEnabled = false;
uint256 public buyTotalFees;
uint256 public buyLiquidityFee;
uint256 public buyGiveWellWalletFee;
uint256 public sellTotalFees;
uint256 public sellLiquidityFee;
uint256 public sellGiveWellWalletFee;
uint256 public tokensForLiquidity;
uint256 public tokensForGiveWellWallet;
uint256 public walletDigit;
uint256 public transDigit;
uint256 public supply;
/******************/
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
constructor() ERC20("GiveWell Inu", "GINU") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
excludeFromMaxTransaction(address(uniswapV2Pair), true);
_setAutomatedMarketMakerPair(address(uniswapV2Pair), true);
uint256 _buyLiquidityFee = 1;
uint256 _buyGiveWellWalletFee = 2;
uint256 _sellLiquidityFee = 1;
uint256 _sellGiveWellWalletFee = 2;
uint256 totalSupply = 4 * 1e9 * 10 ** _decimals;
supply += totalSupply;
walletDigit = 25;
transDigit = 25;
maxTransactionAmount = supply * transDigit / 1000;
swapTokensAtAmount = supply * 75 / 100000; // 0.075% swap wallet;
maxWallet = supply * walletDigit / 1000;
buyLiquidityFee = _buyLiquidityFee;
buyGiveWellWalletFee = _buyGiveWellWalletFee;
buyTotalFees = buyLiquidityFee + buyGiveWellWalletFee;
sellLiquidityFee = _sellLiquidityFee;
sellGiveWellWalletFee = _sellGiveWellWalletFee;
sellTotalFees = sellLiquidityFee + sellGiveWellWalletFee;
GiveWellWallet = 0x7cF2eBb5Ca55A8bd671A020F8BDbAF07f60F26C1; //set as GiveWell wallet
// exclude from paying fees or having max transaction amount
excludeFromFees(owner(), true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromMaxTransaction(owner(), true);
excludeFromMaxTransaction(address(this), true);
excludeFromMaxTransaction(address(0xdead), true);
_approve(owner(), address(uniswapV2Router), totalSupply);
_mint(msg.sender, 4 * 1e9 * 10 ** _decimals);
tradingActive = false;
swapEnabled = false;
}
receive() external payable {
}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool){
limitsInEffect = false;
return true;
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){
require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");
require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply.");
swapTokensAtAmount = newAmount;
return true;
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 1 / 1000)/(10 ** _decimals), "Cannot set maxTransactionAmount lower than 0.1%");
maxTransactionAmount = newNum * (10** _decimals);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 5 / 1000)/(10 ** _decimals), "Cannot set maxWallet lower than 0.5%");
maxWallet = newNum * (10** _decimals);
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
function updateBuyFees(uint256 _liquidityFee, uint _buyGiveWellWalletFee) external onlyOwner {
buyLiquidityFee = _liquidityFee;
buyGiveWellWalletFee = _buyGiveWellWalletFee;
buyTotalFees = buyLiquidityFee + buyGiveWellWalletFee;
require(buyTotalFees <= 3, "Must keep fees at 3% or less");
}
function updateSellFees(uint256 _liquidityFee, uint _sellGiveWellWalletFee) external onlyOwner {
sellLiquidityFee = _liquidityFee;
sellGiveWellWalletFee = _sellGiveWellWalletFee;
sellTotalFees = sellLiquidityFee + sellGiveWellWalletFee;
require(sellTotalFees <= 3, "Must keep fees at 3% or less");
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
require(pair != uniswapV2Pair, "The pair cannot be removed from automatedMarketMakerPairs");
_setAutomatedMarketMakerPair(pair, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
automatedMarketMakerPairs[pair] = value;
emit SetAutomatedMarketMakerPair(pair, value);
}
function updateDevWallet(address newWallet) external onlyOwner {
devWallet = newWallet;
}
function updateGiveWellWallet(address newWallet) external onlyOwner {
GiveWellWallet = newWallet;
}
function isExcludedFromFees(address account) public view returns(bool) {
return _isExcludedFromFees[account];
}
function updateLimits() private {
maxTransactionAmount = supply * transDigit / 100;
swapTokensAtAmount = supply * 5 / 10000; // 0.05% swap wallet;
maxWallet = supply * walletDigit / 100;
}
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(limitsInEffect){
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
){
if(!tradingActive){
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
//when buy
if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
//when sell
else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
require(amount <= maxTransactionAmount, "Sell transfer amount exceeds the maxTransactionAmount.");
}
else if(!_isExcludedMaxTransactionAmount[to]){
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if(
canSwap &&
swapEnabled &&
!swapping &&
!automatedMarketMakerPairs[from] &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = !swapping;
// if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if(takeFee){
// on sell
if (automatedMarketMakerPairs[to] && sellTotalFees > 0){
fees = amount.mul(sellTotalFees).div(100);
tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
tokensForGiveWellWallet += fees * sellGiveWellWalletFee / sellTotalFees;
}
// on buy
else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount.mul(buyTotalFees).div(100);
tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
tokensForGiveWellWallet += fees * buyGiveWellWalletFee / buyTotalFees;
}
if(fees > 0){
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
// make the swap
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
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
deadAddress,
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
uint256 totalTokensToSwap = tokensForLiquidity + tokensForGiveWellWallet;
bool success;
if(contractBalance == 0 || totalTokensToSwap == 0) {return;}
if(contractBalance > swapTokensAtAmount * 5){
contractBalance = swapTokensAtAmount * 5;
}
// Halve the amount of liquidity tokens
uint256 liquidityTokens = contractBalance * tokensForLiquidity / totalTokensToSwap / 2;
uint256 amountToSwapForETH = contractBalance.sub(liquidityTokens);
uint256 initialETHBalance = address(this).balance;
swapTokensForEth(amountToSwapForETH);
uint256 ethBalance = address(this).balance.sub(initialETHBalance);
uint256 ethForGiveWell = ethBalance.mul(tokensForGiveWellWallet).div(totalTokensToSwap);
uint256 ethForLiquidity = ethBalance - ethForGiveWell;
tokensForLiquidity = 0;
tokensForGiveWellWallet = 0;
if(liquidityTokens > 0 && ethForLiquidity > 0){
addLiquidity(liquidityTokens, ethForLiquidity);
}
(success,) = address(GiveWellWallet).call{value: address(this).balance}("");
}
}
Read Contract
GiveWellWallet 0x1ef72b51 → address
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyGiveWellWalletFee 0xa325f6e8 → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyTotalFees 0xd85ba063 → uint256
deadAddress 0x27c8f835 → address
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
isExcludedFromFees 0x4fbee193 → bool
limitsInEffect 0x4a62bb65 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellGiveWellWalletFee 0x6fbc0105 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellTotalFees 0x6a486a8e → uint256
supply 0x047fc9aa → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForGiveWellWallet 0x264cdd4d → uint256
tokensForLiquidity 0x1a8145bb → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
transDigit 0x975d71e2 → uint256
transferDelayEnabled 0xc876d0b9 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
walletDigit 0x7ab43983 → uint256
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeLimits 0x751039fc
No parameters
returns: bool
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x66ca9b83
uint256 _liquidityFee
uint256 _buyGiveWellWalletFee
updateDevWallet 0x1816467f
address newWallet
updateGiveWellWallet 0x7ea98fda
address newWallet
updateMaxTxnAmount 0x203e727e
uint256 newNum
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateSellFees 0x02dbd8f8
uint256 _liquidityFee
uint256 _sellGiveWellWalletFee
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
returns: bool
Recent Transactions
No transactions found for this address