Address Contract Verified
Address
0x8175a2eF53bdf1318CF66DDf128b7408c6a38C33
Balance
0.001202 ETH
Nonce
1
Code Size
8007 bytes
Creator
0x3A4d5bE4...e4fC at tx 0xddfa6c1c...80a148
Indexed Transactions
0
Contract Bytecode
8007 bytes
0x6080604052600436106102285760003560e01c8063715018a611610123578063b91ac788116100ab578063e66f9c661161006f578063e66f9c6614610755578063e96fada21461076a578063edafd4ad1461077f578063f2fde38b146107b2578063fce589d8146105465761022f565b8063b91ac78814610693578063c2b7bbb6146106bd578063ca33e64c146106f0578063cb9598c314610705578063dd62ed3e1461071a5761022f565b806395d89b41116100f257806395d89b41146105f757806398118cb414610546578063a457c2d71461060c578063a9059cbb14610645578063ab643c5a1461067e5761022f565b8063715018a61461058e578063890a8127146105a35780638997a942146105b85780638da5cb5b146105e25761022f565b80632b112e49116101b157806349bd5a5e1161017557806349bd5a5e146104d257806354200d6f146104e7578063552a3784146105135780636b67c4df1461054657806370a082311461055b5761022f565b80632b112e49146103fc578063313ce56714610411578063395093511461043c5780633a814487146104755780633f4218e01461049f5761022f565b80631694505e116101f85780631694505e14610349578063180b0d7e1461037a57806318160ddd1461038f57806323b872dd146103a457806327c8f835146103e75761022f565b806293dc141461023457806306fdde031461024b578063095ea7b3146102d557806313114a9d146103225761022f565b3661022f57005b600080fd5b34801561024057600080fd5b506102496107e5565b005b34801561025757600080fd5b50610260610876565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029a578181015183820152602001610282565b50505050905090810190601f1680156102c75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e157600080fd5b5061030e600480360360408110156102f857600080fd5b506001600160a01b038135169060200135610899565b604080519115158252519081900360200190f35b34801561032e57600080fd5b506103376108b7565b60408051918252519081900360200190f35b34801561035557600080fd5b5061035e6108dd565b604080516001600160a01b039092168252519081900360200190f35b34801561038657600080fd5b506103376108ec565b34801561039b57600080fd5b506103376108f2565b3480156103b057600080fd5b5061030e600480360360608110156103c757600080fd5b506001600160a01b038135811691602081013590911690604001356108f8565b3480156103f357600080fd5b5061035e6109a7565b34801561040857600080fd5b506103376109cb565b34801561041d57600080fd5b50610426610a15565b6040805160ff9092168252519081900360200190f35b34801561044857600080fd5b5061030e6004803603604081101561045f57600080fd5b506001600160a01b038135169060200135610a1a565b34801561048157600080fd5b506102496004803603602081101561049857600080fd5b5035610a65565b3480156104ab57600080fd5b5061030e600480360360208110156104c257600080fd5b50356001600160a01b0316610b5d565b3480156104de57600080fd5b5061035e610b72565b3480156104f357600080fd5b506102496004803603602081101561050a57600080fd5b50351515610b81565b34801561051f57600080fd5b506102496004803603602081101561053657600080fd5b50356001600160a01b0316610bf6565b34801561055257600080fd5b50610337610cd7565b34801561056757600080fd5b506103376004803603602081101561057e57600080fd5b50356001600160a01b0316610cdc565b34801561059a57600080fd5b50610249610cf7565b3480156105af57600080fd5b5061030e610da3565b3480156105c457600080fd5b50610249600480360360208110156105db57600080fd5b5035610dac565b3480156105ee57600080fd5b5061035e610e55565b34801561060357600080fd5b50610260610e64565b34801561061857600080fd5b5061030e6004803603604081101561062f57600080fd5b506001600160a01b038135169060200135610e82565b34801561065157600080fd5b5061030e6004803603604081101561066857600080fd5b506001600160a01b038135169060200135610f1a565b34801561068a57600080fd5b50610337610f2e565b34801561069f57600080fd5b5061035e600480360360208110156106b657600080fd5b5035610f32565b3480156106c957600080fd5b50610249600480360360208110156106e057600080fd5b50356001600160a01b0316610f5c565b3480156106fc57600080fd5b5061035e611010565b34801561071157600080fd5b5061024961101f565b34801561072657600080fd5b506103376004803603604081101561073d57600080fd5b506001600160a01b038135811691602001351661108b565b34801561076157600080fd5b506103376110b6565b34801561077657600080fd5b5061035e6110bc565b34801561078b57600080fd5b50610249600480360360208110156107a257600080fd5b50356001600160a01b03166110cb565b3480156107be57600080fd5b50610249600480360360208110156107d557600080fd5b50356001600160a01b03166111ac565b6107ed6112ae565b6001600160a01b03166107fe610e55565b6001600160a01b031614610847576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b600880548061085257fe5b600082815260209020810160001990810180546001600160a01b0319169055019055565b604080518082019091526009815268121a5d9948135a5b9960ba1b602082015290565b60006108ad6108a66112ae565b84846112b2565b5060015b92915050565b60006108d860646108d2816108cc818061139e565b9061139e565b906113ff565b905090565b6006546001600160a01b031681565b61271081565b60035490565b6000610905848484611466565b6001600160a01b0384166000908152600260205260408120816109266112ae565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156109885760405162461bcd60e51b8152600401808060200182810382526028815260200180611dee6028913960400191505060405180910390fd5b61099c856109946112ae565b8584036112b2565b506001949350505050565b7f000000000000000000000000000000000000000000000000000000000000dead81565b60006108d86109da6000610cdc565b610a0f610a067f000000000000000000000000000000000000000000000000000000000000dead610cdc565b6003549061178f565b9061178f565b601290565b60006108ad610a276112ae565b848460026000610a356112ae565b6001600160a01b03908116825260208083019390935260409182016000908120918b1681529252902054016112b2565b610a6d6112ae565b6001600160a01b0316610a7e610e55565b6001600160a01b031614610ac7576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b600081118015610ad75750804710155b610b1f576040805162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b604482015290519081900360640190fd5b6005546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610b59573d6000803e3d6000fd5b5050565b60096020526000908152604090205460ff1681565b6007546001600160a01b031681565b610b896112ae565b6001600160a01b0316610b9a610e55565b6001600160a01b031614610be3576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b600a805460ff1916911515919091179055565b610bfe6112ae565b6001600160a01b0316610c0f610e55565b6001600160a01b031614610c58576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b6001600160a01b038116610c9d5760405162461bcd60e51b8152600401808060200182810382526025815260200180611ec86025913960400191505060405180910390fd5b600480546001600160a01b039092166001600160a01b0319909216821790556000908152600960205260409020805460ff19166001179055565b606481565b6001600160a01b031660009081526001602052604090205490565b610cff6112ae565b6001600160a01b0316610d10610e55565b6001600160a01b031614610d59576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600a5460ff1681565b610db46112ae565b6001600160a01b0316610dc5610e55565b6001600160a01b031614610e0e576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b600b805490829055604080518281526020810184905281517fed1923361acd7f2ae9a8dac2e6edaaacde2913aaadc886d9287288427de515d7929181900390910190a15050565b6000546001600160a01b031690565b6040805180820190915260048152634849564560e01b602082015290565b60008060026000610e916112ae565b6001600160a01b0390811682526020808301939093526040918201600090812091881681529252902054905082811015610efc5760405162461bcd60e51b8152600401808060200182810382526025815260200180611eed6025913960400191505060405180910390fd5b610f10610f076112ae565b858584036112b2565b5060019392505050565b60006108ad610f276112ae565b8484611466565b4790565b60088181548110610f4257600080fd5b6000918252602090912001546001600160a01b0316905081565b610f646112ae565b6001600160a01b0316610f75610e55565b6001600160a01b031614610fbe576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b6110276112ae565b6001600160a01b0316611038610e55565b6001600160a01b031614611081576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b6110896117ec565b565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600b5481565b6005546001600160a01b031681565b6110d36112ae565b6001600160a01b03166110e4610e55565b6001600160a01b03161461112d576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b6001600160a01b0381166111725760405162461bcd60e51b8152600401808060200182810382526025815260200180611ec86025913960400191505060405180910390fd5b600580546001600160a01b039092166001600160a01b0319909216821790556000908152600960205260409020805460ff19166001179055565b6111b46112ae565b6001600160a01b03166111c5610e55565b6001600160a01b03161461120e576040805162461bcd60e51b81526020600482018190526024820152600080516020611e16833981519152604482015290519081900360640190fd5b6001600160a01b0381166112535760405162461bcd60e51b8152600401808060200182810382526026815260200180611d5f6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0383166112f75760405162461bcd60e51b8152600401808060200182810382526024815260200180611ea46024913960400191505060405180910390fd5b6001600160a01b03821661133c5760405162461bcd60e51b8152600401808060200182810382526022815260200180611d856022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000828201838110156113f8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000808211611455576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161145e57fe5b049392505050565b6001600160a01b0383166114ab5760405162461bcd60e51b8152600401808060200182810382526025815260200180611e7f6025913960400191505060405180910390fd5b6001600160a01b0382166114f05760405162461bcd60e51b8152600401808060200182810382526023815260200180611d3c6023913960400191505060405180910390fd5b6000811161152f5760405162461bcd60e51b8152600401808060200182810382526029815260200180611e366029913960400191505060405180910390fd5b6001600160a01b038316600090815260016020526040902054818110156115875760405162461bcd60e51b8152600401808060200182810382526026815260200180611da76026913960400191505060405180910390fd5b6001600160a01b0384166000908152600160205260408120838303905582906115b76127106108d284606461191c565b905060006115cc6127106108d285606461191c565b905060006115e16127106108d286606461191c565b90506115ed8888611975565b156116ff573060008181526001602090815260409182902080548686019081019091558251908152915186880386900385900393926001600160a01b038d1692600080516020611e5f83398151915292918290030190a383156116b2576001600160a01b037f000000000000000000000000000000000000000000000000000000000000dead81166000818152600160209081526040918290208054890190558151888152915192938d1692600080516020611e5f8339815191529281900390910190a35b6001600160a01b038089166000818152600160209081526040918290208054860190558151858152915192938d1692600080516020611e5f8339815191529281900390910190a350611747565b6001600160a01b038088166000818152600160209081526040918290208054890190558151888152915192938c1692600080516020611e5f8339815191529281900390910190a35b61174f611aa6565b801561175e5750600c5460ff16155b801561177857506007546001600160a01b03898116911614155b15611785576117856117ec565b5050505050505050565b6000828211156117e6576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600c805460ff191660019081179091553060009081526020919091526040812054479160c890611821826108d285606461191c565b90506000611834836108d286606461191c565b905060006118438360026113ff565b905081810161185181611acf565b600061185d478961178f565b90508015611908576000611873606460026113ff565b60640190506000611892826108d260648661191c90919063ffffffff16565b905060006118b0836108d26118a9606460026113ff565b879061191c565b905081156118f4576005546040516001600160a01b039091169083156108fc029084906000818181858888f193505050501580156118f2573d6000803e3d6000fd5b505b8015611904576119048682611c7e565b5050505b5050600c805460ff19169055505050505050565b60008261192b575060006108b1565b8282028284828161193857fe5b04146113f85760405162461bcd60e51b8152600401808060200182810382526021815260200180611dcd6021913960400191505060405180910390fd5b6001600160a01b03821660009081526009602052604081205460ff16806119b457506001600160a01b03821660009081526009602052604090205460ff165b156119c1575060006108b1565b60006008805480602002602001604051908101604052809291908181526020018280548015611a1957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119fb575b5050505050905060005b8151811015611a9b57818181518110611a3857fe5b60200260200101516001600160a01b0316856001600160a01b03161480611a835750818181518110611a6657fe5b60200260200101516001600160a01b0316846001600160a01b0316145b15611a93576001925050506108b1565b600101611a23565b506000949350505050565b600a5460009060ff1680156108d8575050600b5430600090815260016020526040902054101590565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611afe57fe5b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611b5257600080fd5b505afa158015611b66573d6000803e3d6000fd5b505050506040513d6020811015611b7c57600080fd5b5051815182906001908110611b8d57fe5b6001600160a01b039283166020918202929092010152600654611bb391309116846112b2565b60065460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b83811015611c39578181015183820152602001611c21565b505050509050019650505050505050600060405180830381600087803b158015611c6257600080fd5b505af1158015611c76573d6000803e3d6000fd5b505050505050565b600654611c969030906001600160a01b0316846112b2565b600654600480546040805163f305d71960e01b815230938101939093526024830186905260006044840181905260648401526001600160a01b0391821660848401524260a48401525192169163f305d71991849160c480830192606092919082900301818588803b158015611d0a57600080fd5b505af1158015611d1e573d6000803e3d6000fd5b50505050506040513d6060811015611d3557600080fd5b5050505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735f72656365697665722073686f756c64206e6f74206265207a65726f20616464726573732e45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122056d008f0a56096ed821b7f2fc296de58232dae6451f04dda0f34808967ba3b6e64736f6c63430007060033
Verified Source Code Full Match
Compiler: v0.7.6+commit.7338295f
EVM: istanbul
Optimization: Yes (200 runs)
TheHiveMind.sol 355 lines
//The Hive Mind is an opt-in Social Expiriment on the Ethereum Network.
//Join us to participate in testing the limits of Blockchain, Community, and Human Nature.
//Exploring a phenomenon known only as "The Hive Mind" and how it relates to those things.
//This is a contract migration to fix our Dextscore and Tokensniffer scores. Originally Deployed 1/27/2024
//Official Links
//https://growthehive.org
//https://twitter.com/growthehive
//https://t.me/Hive_Mind_Official
//https://t.me/cannon_calls
//https://cannon.app
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
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 TheHiveMind is IERC20, IERC20Metadata, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private constant _name = "Hive Mind";
string private constant _symbol = "HIVE";
uint8 private constant _decimals = 18;
address public immutable deadAddress = address(0xdead);
uint256 public constant burnFee = 100;
uint256 public constant liquidityFee = 100;
uint256 public constant marketingFee = 100;
uint256 public constant feeDenominator = 10000;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address[] public pairs;
mapping (address => bool) public isFeeExempt;
bool public autoLiquifyEnabled = true;
uint256 public autoLiquifyThreshold;
bool inSwap;
modifier lockTheSwap {
inSwap = true;
_;
inSwap = false;
}
event UpdateAutoLiquifyThreshold(uint256 oldThreshold, uint256 curThreshold);
constructor() {
_totalSupply = 100000000000 * 10 ** _decimals; // 100 Billion
autoLiquifyThreshold = 5000000 * 10 ** _decimals; // 5 Million
_balances[msg.sender] = _totalSupply;
autoLiquidityReceiver = msg.sender;
marketingFeeReceiver = msg.sender;
isFeeExempt[msg.sender] = true;
isFeeExempt[address(this)] = true;
// Create a uniswap pair for this new token
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // 0xC532a74256D3Db42D0Bf7a0400fEFDbad7694008
// Create a uniswap pair for this new token
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
pairs.push(uniswapV2Pair);
emit Transfer(address(0), msg.sender, _totalSupply);
}
function name() external view virtual override returns (string memory) {
return _name;
}
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
function decimals() external view virtual override returns (uint8) {
return _decimals;
}
function totalSupply() external view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) external virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) external view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) external virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) external virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
_approve(sender, _msgSender(), currentAllowance - amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
return true;
}
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");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[sender] = senderBalance - amount;
uint256 transferAmount = amount;
uint256 burnAmount = transferAmount.mul(burnFee).div(feeDenominator);
uint256 liquidityAmount = transferAmount.mul(liquidityFee).div(feeDenominator);
uint256 marketingAmount = transferAmount.mul(marketingFee).div(feeDenominator);
if (shouldTakeFee(sender, recipient)) {
// Transfer amount after fee deductions
uint256 amountAfterFee = transferAmount - burnAmount - liquidityAmount - marketingAmount;
// Update balances for burn, liquidity, and marketing
_balances[address(this)] += liquidityAmount + marketingAmount;
emit Transfer(sender, address(this), liquidityAmount + marketingAmount);
// Burn tokens
if (burnAmount > 0) {
_balances[deadAddress] += burnAmount;
emit Transfer(sender, deadAddress, burnAmount);
}
// Transfer amount after fee to recipient
_balances[recipient] += amountAfterFee;
emit Transfer(sender, recipient, amountAfterFee);
} else {
// Transfer amount without fees
_balances[recipient] += transferAmount;
emit Transfer(sender, recipient, transferAmount);
}
// Auto liquidity provision
if (shouldAutoLiquify() && !inSwap && sender != address(uniswapV2Pair)) {
autoLiquify();
}
}
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);
}
function shouldTakeFee(address sender, address recipient) internal virtual view returns (bool) {
if (isFeeExempt[sender] || isFeeExempt[recipient]) return false;
address[] memory liqPairs = pairs;
for (uint256 i = 0; i < liqPairs.length; i++) {
if (sender == liqPairs[i] || recipient == liqPairs[i]) return true;
}
return false;
}
function shouldAutoLiquify() internal virtual view returns (bool) {
return autoLiquifyEnabled && _balances[address(this)] >= autoLiquifyThreshold;
}
function liquify() external onlyOwner {
autoLiquify();
}
function autoLiquify() internal virtual lockTheSwap {
uint256 balanceBefore = address(this).balance;
uint256 totalAmount = _balances[address(this)];
uint256 denom = liquidityFee + marketingFee;
uint256 liquiditySwap = totalAmount.mul(liquidityFee).div(denom);
uint256 marketingSwap = totalAmount.mul(marketingFee).div(denom);
uint256 amountToLiquify = liquiditySwap.div(2);
uint256 amountToSwap = amountToLiquify + marketingSwap;
swapTokensForEth(amountToSwap);
uint256 swapedETHAmount = address(this).balance.sub(balanceBefore);
if (swapedETHAmount > 0) {
uint256 ethDenom = marketingFee + liquidityFee.div(2);
uint256 ethSwapMarketingAmount = swapedETHAmount.mul(marketingFee).div(ethDenom); // ETH for Marketing
uint256 ethLiquidify = swapedETHAmount.mul(liquidityFee.div(2)).div(ethDenom); // ETH for Liqudity
if (ethSwapMarketingAmount > 0) {
// Send ETH for Marketing
payable(marketingFeeReceiver).transfer(ethSwapMarketingAmount);
}
if (ethLiquidify > 0){
addLiquidity(amountToLiquify, ethLiquidify);
}
}
}
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
autoLiquidityReceiver,
block.timestamp
);
}
function ETHbalance() external view returns (uint256) {
return address(this).balance;
}
function setAutoLiquifyEnabled(bool _enabled) external onlyOwner {
autoLiquifyEnabled = _enabled;
}
function setAutoLiquifyThreshold(uint256 _threshold) external onlyOwner {
uint256 oldThreshold = autoLiquifyThreshold;
autoLiquifyThreshold = _threshold;
emit UpdateAutoLiquifyThreshold(oldThreshold, _threshold);
}
function setMarketingFeeReceiver(address _receiver) external onlyOwner {
require(_receiver != address(0), "_receiver should not be zero address.");
marketingFeeReceiver = _receiver;
isFeeExempt[_receiver] = true;
}
function setAutoLiquidityReceiver(address _receiver) external onlyOwner {
require(_receiver != address(0), "_receiver should not be zero address.");
autoLiquidityReceiver = _receiver;
isFeeExempt[_receiver] = true;
}
function getCirculatingSupply() external view returns (uint256) {
return _totalSupply.sub(balanceOf(deadAddress)).sub(balanceOf(address(0)));
}
function addPair(address pair) external onlyOwner {
pairs.push(pair);
}
function totalFees() external view returns (uint256) {
return burnFee.add(liquidityFee).add(marketingFee).div(100);
}
function removeLastPair() external onlyOwner {
pairs.pop();
}
function recoverExcess(uint256 amount) external onlyOwner {
require(amount > 0 && address(this).balance >= amount, "Insufficient balance");
payable(marketingFeeReceiver).transfer(amount);
}
receive() external payable {}
}
SafeMath.sol 214 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}
Address.sol 189 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
Ownable.sol 68 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
IERC20.sol 77 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
IUniswapV2Pair.sol 52 lines
pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
Read Contract
ETHbalance 0xab643c5a → uint256
allowance 0xdd62ed3e → uint256
autoLiquidityReceiver 0xca33e64c → address
autoLiquifyEnabled 0x890a8127 → bool
autoLiquifyThreshold 0xe66f9c66 → uint256
balanceOf 0x70a08231 → uint256
burnFee 0xfce589d8 → uint256
deadAddress 0x27c8f835 → address
decimals 0x313ce567 → uint8
feeDenominator 0x180b0d7e → uint256
getCirculatingSupply 0x2b112e49 → uint256
isFeeExempt 0x3f4218e0 → bool
liquidityFee 0x98118cb4 → uint256
marketingFee 0x6b67c4df → uint256
marketingFeeReceiver 0xe96fada2 → address
name 0x06fdde03 → string
owner 0x8da5cb5b → address
pairs 0xb91ac788 → address
symbol 0x95d89b41 → string
totalFees 0x13114a9d → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 15 functions
These functions modify contract state and require a wallet transaction to execute.
addPair 0xc2b7bbb6
address pair
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
liquify 0xcb9598c3
No parameters
recoverExcess 0x3a814487
uint256 amount
removeLastPair 0x0093dc14
No parameters
renounceOwnership 0x715018a6
No parameters
setAutoLiquidityReceiver 0x552a3784
address _receiver
setAutoLiquifyEnabled 0x54200d6f
bool _enabled
setAutoLiquifyThreshold 0x8997a942
uint256 _threshold
setMarketingFeeReceiver 0xedafd4ad
address _receiver
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address