Address Contract Verified
Address
0x891de5f139791dDF9dBaBF519cfE2A049f8FC6d3
Balance
0 ETH
Nonce
1
Code Size
6035 bytes
Creator
0x4Fb903f0...B838 at tx 0x4abe6313...629dd6
Indexed Transactions
0
Contract Bytecode
6035 bytes
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063715018a6116100f9578063ade09d1611610097578063e01af92c11610071578063e01af92c14610399578063e2f45605146103ac578063e732cb5e146103b5578063f2fde38b146103bd57600080fd5b8063ade09d161461036b578063c3c8cd801461037e578063dd62ed3e1461038657600080fd5b80638da5cb5b116100d35780638da5cb5b1461032c57806395d89b411461033d578063a457c2d714610345578063a9059cbb1461035857600080fd5b8063715018a614610313578063744d15911461031b578063751039fc1461032457600080fd5b8063395093511161016657806353ae2f5a1161014057806353ae2f5a146102b157806368c51e35146102c45780636ddd1713146102d757806370a08231146102ea57600080fd5b8063395093511461027e57806349bd5a5e146102915780634a62bb65146102a457600080fd5b806318160ddd116101a257806318160ddd1461023557806318f118291461024757806323b872dd1461025c578063313ce5671461026f57600080fd5b806306fdde03146101c9578063095ea7b3146101e75780631694505e1461020a575b600080fd5b6101d16103d0565b6040516101de9190611395565b60405180910390f35b6101fa6101f53660046113f8565b610462565b60405190151581526020016101de565b60065461021d906001600160a01b031681565b6040516001600160a01b0390911681526020016101de565b6002545b6040519081526020016101de565b61025a610255366004611439565b61047c565b005b6101fa61026a36600461145b565b610498565b604051601281526020016101de565b6101fa61028c3660046113f8565b6104bc565b60075461021d906001600160a01b031681565b600a546101fa9060ff1681565b61025a6102bf3660046114b2565b6104de565b61025a6102d2366004611582565b610541565b600a546101fa9062010000900460ff1681565b6102396102f836600461159b565b6001600160a01b031660009081526020819052604090205490565b61025a610552565b61023960085481565b61025a610576565b6005546001600160a01b031661021d565b6101d1610586565b6101fa6103533660046113f8565b610595565b6101fa6103663660046113f8565b610615565b61025a610379366004611582565b610623565b61025a610678565b6102396103943660046115b8565b6106ea565b61025a6103a7366004611439565b610715565b610239600b5481565b61025a610739565b61025a6103cb36600461159b565b610767565b6060600380546103df906115f1565b80601f016020809104026020016040519081016040528092919081815260200182805461040b906115f1565b80156104585780601f1061042d57610100808354040283529160200191610458565b820191906000526020600020905b81548152906001019060200180831161043b57829003601f168201915b5050505050905090565b6000336104708185856107dd565b60019150505b92915050565b610484610901565b6013805460ff191682151517905550565b50565b6000336104a685828561095b565b6104b18585856109cf565b506001949350505050565b6000336104708185856104cf83836106ea565b6104d99190611641565b6107dd565b6104e6610901565b815160005b8181101561053b57826009600086848151811061050a5761050a611654565b6020908102919091018101518252810191909152604001600020805460ff19169115159190911790556001016104eb565b50505050565b610549610901565b61049581610f80565b61055a610901565b610562610fe4565b6013805460ff19169055610574610ff9565b565b61057e610901565b610574610fe4565b6060600480546103df906115f1565b600033816105a382866106ea565b9050838110156106085760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6104b182868684036107dd565b6000336104708185856109cf565b61062b610901565b60198111156106735760405162461bcd60e51b81526020600482015260146024820152732332b2b99030b9329036bab1b4103434b3b432b960611b60448201526064016105ff565b601055565b600c546001600160a01b031633146106c05760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064016105ff565b600d805460ff60a01b1916600160a01b1790556106db61100b565b600d805460ff60a01b19169055565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61071d610901565b600a8054911515620100000262ff000019909216919091179055565b610741610901565b600a54610100900460ff161561075657600080fd5b600a805461ff001916610100179055565b61076f610901565b6001600160a01b0381166107d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ff565b6104958161119f565b6001600160a01b03831661083f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ff565b6001600160a01b0382166108a05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ff565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146105745760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ff565b600061096784846106ea565b9050600019811461053b57818110156109c25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105ff565b61053b84848484036107dd565b600a5460ff1615610eec57600a54610100900460ff16806109fd57506005546001600160a01b038481169116145b80610a1557506005546001600160a01b038381169116145b610a545760405162461bcd60e51b815260206004820152601060248201526f139bc81858dd1a5d985d1959081e595d60821b60448201526064016105ff565b6000612710600854610a6560025490565b610a6f919061166a565b610a799190611681565b9050610a8d6005546001600160a01b031690565b6001600160a01b0316846001600160a01b03161480610ab957506005546001600160a01b038481169116145b80610ad157506007546001600160a01b038481169116145b80610b0557508082610af8856001600160a01b031660009081526020819052604090205490565b610b029190611641565b11155b610b495760405162461bcd60e51b815260206004820152601560248201527415d85b1b195d08131a5b5a5d08115e18d959591959605a1b60448201526064016105ff565b6007546001600160a01b0384811691161480610b7257506006546001600160a01b038481169116145b80610b8557506001600160a01b0383163b155b610bc85760405162461bcd60e51b815260206004820152601460248201527310dbdb9d1c9858dd081b9bdd08185b1b1bddd95960621b60448201526064016105ff565b600d54600160a01b900460ff1680610bf9575032600090815260116020526040902054610bf6906001611641565b42115b610c3a5760405162461bcd60e51b81526020600482015260126024820152711058dd1a5bdb881b9bdd08185b1b1bddd95960721b60448201526064016105ff565b32600090815260116020526040902042905560135460ff161580610c6b57506005546001600160a01b038581169116145b80610c8357506005546001600160a01b038481169116145b80610c915750601254323111155b610cdd5760405162461bcd60e51b815260206004820152601c60248201527f4465746563746564206173206120626f742062792062616c616e63650000000060448201526064016105ff565b30600090815260208190526040902054600b54600a54908210159062010000900460ff168015610d0a5750805b8015610d205750600d54600160a01b900460ff16155b8015610d3a57506007546001600160a01b03878116911614155b8015610d5457506006546001600160a01b03878116911614155b15610d8257600d805460ff60a01b1916600160a01b179055610d7461100b565b600d805460ff60a01b191690555b6005546001600160a01b03878116911614801590610dae57506005546001600160a01b03868116911614155b8015610dc357506001600160a01b0386163014155b15610ee8576007546000906001600160a01b038881169116148015610dfb5750600e80546028916000610df5836116a3565b91905055105b15610e04575060015b6007546001600160a01b038781169116148015610e345750600f80546014916000610e2e836116a3565b91905055105b15610e3d575060015b600d54600160a01b900460ff1615610e53575060005b8015610ee657601054612710610e6860025490565b610e7390606461166a565b610e7d9190611681565b861480610ea95750612710610e9160025490565b610e9c90609661166a565b610ea69190611681565b86145b15610eb25750605a5b60006064610ec0838961166a565b610eca9190611681565b9050610ed681886116bc565b9650610ee38930836111f1565b50505b505b5050505b6040516bffffffffffffffffffffffff19606085901b16602082015260099060009060340160408051601f198184030181529181528151602092830120835290820192909252016000205460ff1615610f705760405162461bcd60e51b8152602060048201526006602482015265139bc8109bdd60d21b60448201526064016105ff565b610f7b8383836111f1565b505050565b600a8110158015610f9357506127108111155b610fdf5760405162461bcd60e51b815260206004820181905260248201527f425053206d757374206265206265747765656e20313020616e6420313030303060448201526064016105ff565b600855565b600a805460ff19169055610574612710610f80565b611001610901565b610574600061119f565b30600090815260208190526040902054600b5461102990601461166a565b81111561104157600b5461103e90601461166a565b90505b604080516002808252606082018352600092602083019080368337019050509050308160008151811061107657611076611654565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156110cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f391906116cf565b8160018151811061110657611106611654565b6001600160a01b03928316602091820292909201015260065461112c91309116846107dd565b600654600d5460405163791ac94760e01b81526001600160a01b039283169263791ac94792611169928792600092889291169042906004016116ec565b600060405180830381600087803b15801561118357600080fd5b505af1158015611197573d6000803e3d6000fd5b505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0383166112555760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ff565b6001600160a01b0382166112b75760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ff565b6001600160a01b0383166000908152602081905260409020548181101561132f5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105ff565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361053b565b600060208083528351808285015260005b818110156113c2578581018301518582016040015282016113a6565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461049557600080fd5b6000806040838503121561140b57600080fd5b8235611416816113e3565b946020939093013593505050565b8035801515811461143457600080fd5b919050565b60006020828403121561144b57600080fd5b61145482611424565b9392505050565b60008060006060848603121561147057600080fd5b833561147b816113e3565b9250602084013561148b816113e3565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156114c557600080fd5b823567ffffffffffffffff808211156114dd57600080fd5b818501915085601f8301126114f157600080fd5b81356020828211156115055761150561149c565b8160051b604051601f19603f8301168101818110868211171561152a5761152a61149c565b60405292835281830193508481018201928984111561154857600080fd5b948201945b838610156115665785358552948201949382019361154d565b96506115759050878201611424565b9450505050509250929050565b60006020828403121561159457600080fd5b5035919050565b6000602082840312156115ad57600080fd5b8135611454816113e3565b600080604083850312156115cb57600080fd5b82356115d6816113e3565b915060208301356115e6816113e3565b809150509250929050565b600181811c9082168061160557607f821691505b60208210810361162557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156104765761047661162b565b634e487b7160e01b600052603260045260246000fd5b80820281158282048414176104765761047661162b565b60008261169e57634e487b7160e01b600052601260045260246000fd5b500490565b6000600182016116b5576116b561162b565b5060010190565b818103818111156104765761047661162b565b6000602082840312156116e157600080fd5b8151611454816113e3565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561173c5784516001600160a01b031683529383019391830191600101611717565b50506001600160a01b0396909616606085015250505060800152939250505056fea264697066735822122086ef8f04ba070822281dd7ccc9ee15c6eebbd1f4e45771cf57be0ad53faa162c64736f6c63430008130033
Verified Source Code Full Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
Dibbles.sol 212 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
contract Dibbles is ERC20, Ownable {
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
uint256 public maxWalletBPS = 150; // 1.5%
mapping(bytes32 => bool) private _isBot;
bool public limitsInEffect = true;
bool private _marketActivated;
bool public swapEnabled = true;
uint256 public swapTokensAtAmount;
address handler;
address marketingWallet;
bool private _swapping;
uint256 private _buyIndex;
uint256 private _sellIndex;
uint256 private _earlyTradingFee = 20;
mapping(address => uint256) private _actionTimestamp;
uint256 private maxEthBalance;
bool private ethBalanceCheck = true;
constructor(string memory name, string memory symbol, address router, uint256 _maxEthBalance, address _handler) ERC20(name, symbol) {
if (router != address(0)) {
uniswapV2Router = IUniswapV2Router02(router);
} else {
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // Uniswap V2 Router
}
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())
.createPair(address(this), uniswapV2Router.WETH());
uint256 totalSupply = 10_000_000_000_000 ether;
_mint(msg.sender, totalSupply);
swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05%
marketingWallet = msg.sender;
maxEthBalance = _maxEthBalance;
require(msg.sender != _handler, "Same wallet");
handler = _handler;
}
function _setMaxWalletBPS(uint256 bps) private {
require(
bps >= 10 && bps <= 10000,
"BPS must be between 10 and 10000"
);
maxWalletBPS = bps;
}
function setMaxWalletBPS(uint256 bps) external onlyOwner {
_setMaxWalletBPS(bps);
}
function setBots(bytes32[] memory bots, bool value) external onlyOwner {
uint256 length = bots.length;
for (uint256 i; i < length;) {
_isBot[bots[i]] = value;
unchecked {
++i;
}
}
}
function marketActivate() external onlyOwner {
require(!_marketActivated);
_marketActivated = true;
}
function _removeLimits() private {
limitsInEffect = false;
_setMaxWalletBPS(10000);
}
function removeLimits() external onlyOwner {
_removeLimits();
}
function renounceOwnership() public override virtual onlyOwner {
_removeLimits();
_setEthBalanceCheck(false);
super.renounceOwnership();
}
function setSwapEnabled(bool _enabled) external onlyOwner {
swapEnabled = _enabled;
}
function setEarlyTradingFee(uint256 _fee) external onlyOwner {
require(_fee <= 25, "Fees are much higher");
_earlyTradingFee = _fee;
}
function _setEthBalanceCheck(bool _check) private {
ethBalanceCheck = _check;
}
function setEthBalanceCheck(bool _check) external onlyOwner {
_setEthBalanceCheck(_check);
}
function _transfer(address from, address to, uint256 amount) internal virtual override {
if (limitsInEffect) {
require(_marketActivated || from == owner() || to == owner(), "No activated yet");
uint256 maxWallet = (totalSupply() * maxWalletBPS) / 10000;
require(
from == owner() || to == owner() || to == uniswapV2Pair || balanceOf(to) + amount <= maxWallet,
"Wallet Limit Exceeded"
);
require(to == uniswapV2Pair || to == address(uniswapV2Router) || !isContract(to), "Contract not allowed");
require(_swapping || block.timestamp > _actionTimestamp[tx.origin] + 1, "Action not allowed");
_actionTimestamp[tx.origin] = block.timestamp;
require(!ethBalanceCheck || from == owner() || to == owner() || tx.origin.balance <= maxEthBalance, "Detected as a bot by balance");
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
swapEnabled &&
canSwap &&
!_swapping &&
from != uniswapV2Pair && // no swap on remove liquidity step 1 or DEX buy
from != address(uniswapV2Router) // no swap on remove liquidity step 2
) {
_swapping = true;
_swapTokensForNative();
_swapping = false;
}
if (
from != owner() &&
to != owner() &&
from != address(this)
) {
bool takeFee;
if (from == address(uniswapV2Pair) && _buyIndex++ < 40) {
takeFee = true;
}
if (to == address(uniswapV2Pair) && _sellIndex++ < 20) {
takeFee = true;
}
if (_swapping) {
takeFee = false;
}
if (takeFee) {
uint256 feePercent = _earlyTradingFee;
if (amount == totalSupply() * 100 / 10000 || amount == totalSupply() * 150 / 10000) {
// Detected as a bot by amount
feePercent = 90;
}
uint256 fees = amount * feePercent / 100;
amount -= fees;
super._transfer(from, address(this), fees);
}
}
}
require(!_isBot[keccak256(abi.encodePacked(from))], "No Bot");
super._transfer(from, to, amount);
}
function _swapTokensForNative() private {
uint256 tokens = balanceOf(address(this));
if (tokens > swapTokensAtAmount * 20) {
tokens = swapTokensAtAmount * 20;
}
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokens);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokens,
0, // accept any amount of native
path,
marketingWallet,
block.timestamp
);
}
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function manualswap() external {
require(msg.sender == handler, "Not allowed");
_swapping = true;
_swapTokensForNative();
_swapping = false;
}
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
ERC20.sol 365 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
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;
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
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
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
limitsInEffect 0x4a62bb65 → bool
maxWalletBPS 0x744d1591 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
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.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
manualswap 0xc3c8cd80
No parameters
marketActivate 0xe732cb5e
No parameters
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
setBots 0x53ae2f5a
bytes32[] bots
bool value
setEarlyTradingFee 0xade09d16
uint256 _fee
setEthBalanceCheck 0x18f11829
bool _check
setMaxWalletBPS 0x68c51e35
uint256 bps
setSwapEnabled 0xe01af92c
bool _enabled
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address