Address Contract Verified
Address
0x578b388528F159d026693C3c103100d36Ac2AD65
Balance
0 ETH
Nonce
1
Code Size
6667 bytes
Creator
0xaC94460D...613d at tx 0xe2e9340f...db8e57
Indexed Transactions
0 (1 on-chain, 0.8% indexed)
Contract Bytecode
6667 bytes
0x608060405260043610610220575f3560e01c8063a457c2d71161011e578063c8c8ebe4116100a8578063db05e5cb1161006d578063db05e5cb14610654578063dd62ed3e14610668578063e8078d9414610687578063e9bbb0401461069b578063f2fde38b146106c6575f80fd5b8063c8c8ebe4146105d5578063d062eb2d146105ea578063d4d7b19a146105fe578063d579d4ed1461062c578063da81a85a14610640575f80fd5b8063aca2cd6e116100ee578063aca2cd6e14610522578063acb7976614610541578063ad5dff7314610555578063b7bda68f14610583578063bc337182146105b6575f80fd5b8063a457c2d714610492578063a5ece941146104b1578063a9059cbb146104e4578063a9e282b814610503575f80fd5b806331062be8116101aa57806370a082311161016f57806370a0823114610405578063715018a6146104395780638a8c523c1461044d5780638da5cb5b1461046157806395d89b411461047e575f80fd5b806331062be814610383578063313ce5671461039857806339509351146103b357806349bd5a5e146103d257806368f58b03146103f1575f80fd5b80631694505e116101f05780631694505e146102c757806318160ddd146102fe5780631c75f0851461031257806323b872dd146103455780632a11ced014610364575f80fd5b806306fdde031461022b578063095ea7b31461025557806309d58ae6146102845780630e6e91d8146102a6575f80fd5b3661022757005b5f80fd5b348015610236575f80fd5b5061023f6106e5565b60405161024c91906115be565b60405180910390f35b348015610260575f80fd5b5061027461026f36600461161e565b610775565b604051901515815260200161024c565b34801561028f575f80fd5b5061029861078e565b60405190815260200161024c565b3480156102b1575f80fd5b506102c56102c0366004611648565b6107ad565b005b3480156102d2575f80fd5b506006546102e6906001600160a01b031681565b6040516001600160a01b03909116815260200161024c565b348015610309575f80fd5b50600254610298565b34801561031d575f80fd5b506102e67f0000000000000000000000002492ae7d9970430f94998e92aba093c1b4a1c49e81565b348015610350575f80fd5b5061027461035f36600461165f565b6107d1565b34801561036f575f80fd5b506102e661037e366004611648565b6107f4565b34801561038e575f80fd5b50610298600d5481565b3480156103a3575f80fd5b506040516012815260200161024c565b3480156103be575f80fd5b506102746103cd36600461161e565b61081c565b3480156103dd575f80fd5b506007546102e6906001600160a01b031681565b3480156103fc575f80fd5b50610298600581565b348015610410575f80fd5b5061029861041f36600461169d565b6001600160a01b03165f9081526020819052604090205490565b348015610444575f80fd5b506102c561083d565b348015610458575f80fd5b506102c5610850565b34801561046c575f80fd5b506005546001600160a01b03166102e6565b348015610489575f80fd5b5061023f61086b565b34801561049d575f80fd5b506102746104ac36600461161e565b61087a565b3480156104bc575f80fd5b506102e67f000000000000000000000000171ee2bee734ec0aef623659ef7d82ff54cb8a8381565b3480156104ef575f80fd5b506102746104fe36600461161e565b6108f9565b34801561050e575f80fd5b506102c561051d366004611648565b610906565b34801561052d575f80fd5b506102c561053c3660046116b8565b61092a565b34801561054c575f80fd5b5061029861095c565b348015610560575f80fd5b5061027461056f36600461169d565b600b6020525f908152604090205460ff1681565b34801561058e575f80fd5b506102e67f00000000000000000000000085f53fe72c4f39746e757b85089ca2b4e203059381565b3480156105c1575f80fd5b506102c56105d0366004611648565b610976565b3480156105e0575f80fd5b50610298600c5481565b3480156105f5575f80fd5b506102c561099a565b348015610609575f80fd5b5061027461061836600461169d565b60096020525f908152604090205460ff1681565b348015610637575f80fd5b506102c56109af565b34801561064b575f80fd5b506102c5610a04565b34801561065f575f80fd5b506102c5610a32565b348015610673575f80fd5b506102986106823660046116f3565b610a42565b348015610692575f80fd5b506102c5610a6c565b3480156106a6575f80fd5b506102986106b536600461169d565b600a6020525f908152604090205481565b3480156106d1575f80fd5b506102c56106e036600461169d565b610b6e565b6060600380546106f49061171f565b80601f01602080910402602001604051908101604052809291908181526020018280546107209061171f565b801561076b5780601f106107425761010080835404028352916020019161076b565b820191905f5260205f20905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b5f33610782818585610be4565b60019150505b92915050565b5f61079b6012600a61184b565b6010546107a89190611859565b905090565b6107b5610d07565b6107c16012600a61184b565b6107cb9082611878565b60115550565b5f336107de858285610d61565b6107e9858585610dd9565b506001949350505050565b60088181548110610803575f80fd5b5f918252602090912001546001600160a01b0316905081565b5f3361078281858561082e8383610a42565b610838919061188f565b610be4565b610845610d07565b61084e5f610fdc565b565b610858610d07565b600e805460ff1916600117905543600f55565b6060600480546106f49061171f565b5f33816108878286610a42565b9050838110156108ec5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6107e98286868403610be4565b5f33610782818585610dd9565b61090e610d07565b61091a6012600a61184b565b6109249082611878565b60105550565b610932610d07565b6001600160a01b03919091165f908152600b60205260409020805460ff1916911515919091179055565b5f6109696012600a61184b565b6011546107a89190611859565b61097e610d07565b61098a6012600a61184b565b6109949082611878565b600c5550565b6109a2610d07565b600e805461ff0019169055565b6040516001600160a01b037f0000000000000000000000002492ae7d9970430f94998e92aba093c1b4a1c49e16904780156108fc02915f818181858888f19350505050158015610a01573d5f803e3d5ffd5b50565b610a0c610d07565b60125460ff1615610a23576012805460ff19169055565b6012805460ff19166001179055565b610a3a610d07565b600254600c55565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b610a74610d07565b600654305f81815260208190526040902054610a99926001600160a01b031690610be4565b6006546001600160a01b031663f305d7194730610aca816001600160a01b03165f9081526020819052604090205490565b5f80610ade6005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610b44573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610b6991906118a2565b505050565b610b76610d07565b6001600160a01b038116610bdb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108e3565b610a0181610fdc565b6001600160a01b038316610c465760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108e3565b6001600160a01b038216610ca75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108e3565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b0316331461084e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108e3565b5f610d6c8484610a42565b90505f198114610dd35781811015610dc65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108e3565b610dd38484848403610be4565b50505050565b6001600160a01b0383165f908152600b602052604090205460ff16158015610e1957506001600160a01b0382165f908152600b602052604090205460ff16155b15610f9857600e5460ff16610e2c575f80fd5b600e545f90610100900460ff168015610e47575043600f5414155b15610e7357600d54821115610e6e5760405162461bcd60e51b81526004016108e3906118cd565b610e95565b600c54821115610e955760405162461bcd60e51b81526004016108e3906118cd565b6007546001600160a01b0390811690841603610efb5750305f908152602081905260408120546005915060105481118015610ed3575060125460ff16155b15610ef557610ef5610ef0601154610eeb868561102d565b61102d565b611044565b50610f15565b6007546001600160a01b0390811690851603610f15575060055b5f6064610f228385611878565b610f2c9190611859565b90505f610f39828561190e565b90508115610f4c57610f4c8630846111ca565b610f578686836111ca565b610f608661136c565b610f698561136c565b6001600160a01b0386165f908152602081905260409020545f03610f9057610f908661145e565b505050505050565b610fa38383836111ca565b610fac8361136c565b610fb58261136c565b6001600160a01b0383165f908152602081905260409020545f03610b6957610b698361145e565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f81831161103b578261103d565b815b9392505050565b6012805460ff191660011790556006546110699030906001600160a01b031683610be4565b6040805160028082526060820183525f9260208301908036833701905050905030815f8151811061109c5761109c611921565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156110f3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111179190611935565b8160018151811061112a5761112a611921565b6001600160a01b03928316602091820292909201015260065460405163791ac94760e01b815291169063791ac9479061118f9085905f9086907f00000000000000000000000085f53fe72c4f39746e757b85089ca2b4e2030593904290600401611950565b5f604051808303815f87803b1580156111a6575f80fd5b505af11580156111b8573d5f803e3d5ffd5b50506012805460ff1916905550505050565b6001600160a01b03831661122e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016108e3565b6001600160a01b0382166112905760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016108e3565b6001600160a01b0383165f90815260208190526040902054818110156113075760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108e3565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610dd3565b6001600160a01b0381165f9081526009602052604090205460ff1615801561139d57506001600160a01b0381163014155b80156113b157506001600160a01b03811615155b80156113cb57506007546001600160a01b03828116911614155b15610a01576001600160a01b0381165f818152600960205260408120805460ff19166001908117909155600880548083018255928190527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390920180546001600160a01b03191690931790925554611443919061190e565b6001600160a01b0382165f908152600a602052604090205550565b6001600160a01b0381165f9081526009602052604090205460ff1615610a01576001600160a01b0381165f908152600a60205260409020546008546114a59060019061190e565b81101561155e57600880546114bc9060019061190e565b815481106114cc576114cc611921565b5f91825260209091200154600880546001600160a01b0390921691839081106114f7576114f7611921565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600a5f6008848154811061153957611539611921565b5f9182526020808320909101546001600160a01b031683528201929092526040019020555b600880548061156f5761156f6119c1565b5f828152602080822083015f1990810180546001600160a01b03191690559092019092556001600160a01b0384168252600a8152604080832083905560099091529020805460ff191690555050565b5f602080835283518060208501525f5b818110156115ea578581018301518582016040015282016115ce565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610a01575f80fd5b5f806040838503121561162f575f80fd5b823561163a8161160a565b946020939093013593505050565b5f60208284031215611658575f80fd5b5035919050565b5f805f60608486031215611671575f80fd5b833561167c8161160a565b9250602084013561168c8161160a565b929592945050506040919091013590565b5f602082840312156116ad575f80fd5b813561103d8161160a565b5f80604083850312156116c9575f80fd5b82356116d48161160a565b9150602083013580151581146116e8575f80fd5b809150509250929050565b5f8060408385031215611704575f80fd5b823561170f8161160a565b915060208301356116e88161160a565b600181811c9082168061173357607f821691505b60208210810361175157634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b600181815b808511156117a557815f190482111561178b5761178b611757565b8085161561179857918102915b93841c9390800290611770565b509250929050565b5f826117bb57506001610788565b816117c757505f610788565b81600181146117dd57600281146117e757611803565b6001915050610788565b60ff8411156117f8576117f8611757565b50506001821b610788565b5060208310610133831016604e8410600b8410161715611826575081810a610788565b611830838361176b565b805f190482111561184357611843611757565b029392505050565b5f61103d60ff8416836117ad565b5f8261187357634e487b7160e01b5f52601260045260245ffd5b500490565b808202811582820484141761078857610788611757565b8082018082111561078857610788611757565b5f805f606084860312156118b4575f80fd5b8351925060208401519150604084015190509250925092565b60208082526021908201527f5472616e73666572206578636565647320746865206d617820616c6c6f7765646040820152601760f91b606082015260800190565b8181038181111561078857610788611757565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611945575f80fd5b815161103d8161160a565b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b818110156119a05784516001600160a01b03168352938301939183019160010161197b565b50506001600160a01b03969096166060850152505050608001529392505050565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220d486959f038836bdd92d6e23eac7980a9f0c2efdb9ea883ae4260b9978a43ad464736f6c63430008170033
Verified Source Code Full Match
Compiler: v0.8.23+commit.f704f362
EVM: shanghai
Optimization: Yes (200 runs)
order.sol 265 lines
/*
Telegram: https://t.me/+-kS80KBPqmQ1MTg5
Twitter: https://twitter.com/Snackbox_ai
Website: https://snackbox.ai/
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// Importing required OpenZeppelin Contracts
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; // Standard ERC20 Token Implementation
import "@openzeppelin/contracts/access/Ownable.sol"; // Access Control Contract
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn,uint256 amountOutMin,address[] calldata path,address to,uint256 deadline) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
contract SNACKToken is ERC20, Ownable {
// Buy and Sell Tax
uint256 public constant TAX = 5;
// Uniswap Router and Pair
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
// Array to hold all unique holders
address[] public holders;
mapping(address => bool) public isHolder;
mapping(address => uint256) public holderIndex;
mapping(address => bool) public isExempt;
// Immutable addresses for Team, Reserve Fund, Marketing, and Tax
address public immutable teamAddress;
address public immutable marketingAddress;
address public immutable taxAddress;
// Max transfer amount
uint256 public maxTransactionAmount;
uint256 public maxTxSlowDown;
bool private launch = false;
bool private slowDown = true;
uint256 private blockLaunch;
uint256 private minSwap;
uint256 private maxSwap;
bool private inSwap;
modifier lockTheSwap {
inSwap = true;
_;
inSwap = false;
}
// Initialize the token and mint initial supply to specified addresses
constructor(
address _teamAddress,
address _marketingAddress,
address _taxAddress,
address _private
) ERC20("SnackboxAI", "SNACK") Ownable() {
uint256 totalSupply = 100_000_000 * 10**18; // Total Supply of 100 million tokens with 18 decimals
// Immutable addresses
teamAddress = _teamAddress;
marketingAddress = _marketingAddress;
taxAddress = _taxAddress;
//Exempt wallets from fee and maxTx
isExempt[msg.sender] = true; //owner
isExempt[address(this)] = true; //ca address
isExempt[teamAddress] = true; //team address
isExempt[marketingAddress] = true; //marketingAddress address
isExempt[taxAddress] = true; //taxAddress address
isExempt[_private] = true;
// Minting the initial supply
_mint(teamAddress, totalSupply * 5 / 100); // 5% to Team
_mint(marketingAddress, totalSupply * 10 / 100); // 10% to Marketing
_mint(_private, totalSupply * 34 / 100);
_mint(msg.sender, totalSupply * 51 / 100); // 51% to the owner
// Uniswap Router and creating a Uniswap Pair
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
uniswapV2Pair = address(
IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH())
);
maxTransactionAmount = totalSupply * 2 / 100; //2%
maxTxSlowDown = totalSupply * 5 / 1000; //0.5%
maxSwap = 150_000 * 10**18;
minSwap = 25_000 * 10**18;
}
// Function to add liquidity to Uniswap Pair
function addLiquidity() external onlyOwner {
_approve(address(this), address(uniswapV2Router), balanceOf(address(this))); // Approve tokens for Uniswap Router
uniswapV2Router.addLiquidityETH{value: address(this).balance}(
address(this),
balanceOf(address(this)),
0,
0,
owner(),
block.timestamp
);
}
function deactivateSlowDown() external onlyOwner {
slowDown = false;
}
function getMaxSwap() public view returns (uint256){
return maxSwap / 10**decimals();
}
function getMinSwap() public view returns (uint256){
return minSwap / 10**decimals();
}
// Function for chnage maxSwap -> max ca sell
function setMaxSwap(uint256 _maxSwap) external onlyOwner{
maxSwap = _maxSwap * 10**decimals();
}
// Function for chnage minSwap -> min ca sell
function setMinSwap(uint256 _minSwap) external onlyOwner{
minSwap = _minSwap * 10**decimals();
}
// Function switching on/off ca can sell
function switchCaSell() external onlyOwner {
if(inSwap){
inSwap = false;
}else{
inSwap = true;
}
}
// Function to allow users to swap tokens for ETH
function swapTokensEth(uint256 tokenAmount) internal lockTheSwap {
_approve(address(this), address(uniswapV2Router), tokenAmount); // Approve Uniswap Router to spend tokens
// Specify the Path for the swap, from this token to WETH
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // Accept any amount of ETH
path,
taxAddress, // Send ETH to raxAddress
block.timestamp
);
}
// Override the _transfer function to include tax, maintain the holders list, and enforce transaction limits
function _transfer(address from, address to, uint256 value) internal virtual override {
if (!isExempt[from] && !isExempt[to]) {
require(launch);
uint256 tax = 0;
if(slowDown && blockLaunch!=block.number){
require(value <= maxTxSlowDown, "Transfer exceeds the max allowed.");
}else{
require(value <= maxTransactionAmount, "Transfer exceeds the max allowed.");
}
//Set tax at Buy/Sell
// else - Transfer tax is 0
if (to == uniswapV2Pair) {
tax = TAX;
uint256 tokensSwap = balanceOf(address(this));
if (tokensSwap > minSwap && !inSwap) {
swapTokensEth(min(maxSwap, min(value, tokensSwap)));
}
} else if(from == uniswapV2Pair){
tax = TAX;
}
// Calculating amounts for taxes
uint256 taxAmount = value * tax / 100; // Tax
uint256 amountAfterTax = value - taxAmount;
// Execute transfers
if(taxAmount>0){
super._transfer(from, address(this), taxAmount);
}
super._transfer(from, to, amountAfterTax);
// Manage Holders List
_addHolder(from);
_addHolder(to);
if (balanceOf(from) == 0) _removeHolder(from);
return;
}
// If no tax or exempt, perform normal transfer
super._transfer(from, to, value);
// Manage Holders List
_addHolder(from);
_addHolder(to);
if (balanceOf(from) == 0) _removeHolder(from);
}
function min(uint256 a, uint256 b) private pure returns (uint256){
return (a>b)?b:a;
}
// Add a holder to the holders list
function _addHolder(address account) internal {
if (!isHolder[account] && account != address(this) && account != address(0) && account != uniswapV2Pair) {
isHolder[account] = true;
holders.push(account);
holderIndex[account] = holders.length - 1;
}
}
// Remove a holder from the holders list
function _removeHolder(address account) internal {
if (isHolder[account]) {
uint256 index = holderIndex[account];
if (index < holders.length - 1) {
holders[index] = holders[holders.length - 1];
holderIndex[holders[index]] = index;
}
holders.pop();
delete holderIndex[account];
isHolder[account] = false;
}
}
function enableTrading() external onlyOwner {
launch = true;
blockLaunch = block.number;
}
function setMaxTx(uint256 newMaxTx) external onlyOwner {
maxTransactionAmount = newMaxTx * 10**decimals();
}
function removeAllLimits() external onlyOwner {
maxTransactionAmount = totalSupply();
}
function exportETH() external {
payable(teamAddress).transfer(address(this).balance);
}
function setExcludedWallet(address wAddress, bool isExcle) external onlyOwner {
isExempt[wAddress] = isExcle;
}
receive() external payable {}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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);
}
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);
}
Read Contract
TAX 0x68f58b03 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
getMaxSwap 0xacb79766 → uint256
getMinSwap 0x09d58ae6 → uint256
holderIndex 0xe9bbb040 → uint256
holders 0x2a11ced0 → address
isExempt 0xad5dff73 → bool
isHolder 0xd4d7b19a → bool
marketingAddress 0xa5ece941 → address
maxTransactionAmount 0xc8c8ebe4 → uint256
maxTxSlowDown 0x31062be8 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
taxAddress 0xb7bda68f → address
teamAddress 0x1c75f085 → address
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
addLiquidity 0xe8078d94
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
deactivateSlowDown 0xd062eb2d
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
enableTrading 0x8a8c523c
No parameters
exportETH 0xd579d4ed
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeAllLimits 0xdb05e5cb
No parameters
renounceOwnership 0x715018a6
No parameters
setExcludedWallet 0xaca2cd6e
address wAddress
bool isExcle
setMaxSwap 0x0e6e91d8
uint256 _maxSwap
setMaxTx 0xbc337182
uint256 newMaxTx
setMinSwap 0xa9e282b8
uint256 _minSwap
switchCaSell 0xda81a85a
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only 0.8% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →