Address Contract Verified
Address
0x6EFb32bc7893b793603E39643D86594CE3638157
Balance
0 ETH
Nonce
1
Code Size
5525 bytes
Creator
0xA9CA8ad1...D24D at tx 0x85634377...87e330
Indexed Transactions
0
Contract Bytecode
5525 bytes
0x6080604052600436106101d3575f3560e01c806395d89b41116100fd578063c8c8ebe411610092578063db05e5cb11610062578063db05e5cb146104fe578063dd62ed3e14610512578063e8078d9414610531578063f2fde38b14610545575f80fd5b8063c8c8ebe4146104ad578063d062eb2d146104c2578063d579d4ed146104d6578063da81a85a146104ea575f80fd5b8063aca2cd6e116100cd578063aca2cd6e1461042d578063acb797661461044c578063ad5dff7314610460578063bc3371821461048e575f80fd5b806395d89b41146103bc578063a457c2d7146103d0578063a9059cbb146103ef578063a9e282b81461040e575f80fd5b806331062be81161017357806370a082311161014357806370a0823114610343578063715018a6146103775780638a8c523c1461038b5780638da5cb5b1461039f575f80fd5b806331062be8146102bd578063313ce567146102d257806339509351146102ed57806349bd5a5e1461030c575f80fd5b806309d58ae6116101ae57806309d58ae6146102555780630e6e91d81461026957806318160ddd1461028a57806323b872dd1461029e575f80fd5b806306e172de146101de57806306fdde0314610205578063095ea7b314610226575f80fd5b366101da57005b5f80fd5b3480156101e9575f80fd5b506101f2600581565b6040519081526020015b60405180910390f35b348015610210575f80fd5b50610219610564565b6040516101fc9190611151565b348015610231575f80fd5b506102456102403660046111b1565b6105f4565b60405190151581526020016101fc565b348015610260575f80fd5b506101f261060d565b348015610274575f80fd5b506102886102833660046111db565b61062c565b005b348015610295575f80fd5b506002546101f2565b3480156102a9575f80fd5b506102456102b83660046111f2565b610650565b3480156102c8575f80fd5b506101f2600a5481565b3480156102dd575f80fd5b50604051601281526020016101fc565b3480156102f8575f80fd5b506102456103073660046111b1565b610673565b348015610317575f80fd5b5060075461032b906001600160a01b031681565b6040516001600160a01b0390911681526020016101fc565b34801561034e575f80fd5b506101f261035d366004611230565b6001600160a01b03165f9081526020819052604090205490565b348015610382575f80fd5b50610288610694565b348015610396575f80fd5b506102886106a7565b3480156103aa575f80fd5b506005546001600160a01b031661032b565b3480156103c7575f80fd5b506102196106c2565b3480156103db575f80fd5b506102456103ea3660046111b1565b6106d1565b3480156103fa575f80fd5b506102456104093660046111b1565b610750565b348015610419575f80fd5b506102886104283660046111db565b61075d565b348015610438575f80fd5b5061028861044736600461124b565b610781565b348015610457575f80fd5b506101f26107b3565b34801561046b575f80fd5b5061024561047a366004611230565b60086020525f908152604090205460ff1681565b348015610499575f80fd5b506102886104a83660046111db565b6107cd565b3480156104b8575f80fd5b506101f260095481565b3480156104cd575f80fd5b506102886107f1565b3480156104e1575f80fd5b50610288610806565b3480156104f5575f80fd5b5061028861085b565b348015610509575f80fd5b50610288610889565b34801561051d575f80fd5b506101f261052c366004611286565b610899565b34801561053c575f80fd5b506102886108c3565b348015610550575f80fd5b5061028861055f366004611230565b6109c5565b606060038054610573906112b2565b80601f016020809104026020016040519081016040528092919081815260200182805461059f906112b2565b80156105ea5780601f106105c1576101008083540402835291602001916105ea565b820191905f5260205f20905b8154815290600101906020018083116105cd57829003601f168201915b5050505050905090565b5f33610601818585610a3b565b60019150505b92915050565b5f61061a6012600a6113de565b600d5461062791906113ec565b905090565b610634610b5e565b6106406012600a6113de565b61064a908261140b565b600e5550565b5f3361065d858285610bb8565b610668858585610c30565b506001949350505050565b5f336106018185856106858383610899565b61068f9190611422565b610a3b565b61069c610b5e565b6106a55f610dc1565b565b6106af610b5e565b600b805460ff1916600117905543600c55565b606060048054610573906112b2565b5f33816106de8286610899565b9050838110156107435760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6106688286868403610a3b565b5f33610601818585610c30565b610765610b5e565b6107716012600a6113de565b61077b908261140b565b600d5550565b610789610b5e565b6001600160a01b03919091165f908152600860205260409020805460ff1916911515919091179055565b5f6107c06012600a6113de565b600e5461062791906113ec565b6107d5610b5e565b6107e16012600a6113de565b6107eb908261140b565b60095550565b6107f9610b5e565b600b805461ff0019169055565b6040516001600160a01b037f000000000000000000000000604ed21dae56aa7f1fc11b5301104bd8868e9b0016904780156108fc02915f818181858888f19350505050158015610858573d5f803e3d5ffd5b50565b610863610b5e565b600f5460ff161561087a57600f805460ff19169055565b600f805460ff19166001179055565b610891610b5e565b600254600955565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6108cb610b5e565b600654305f818152602081905260409020546108f0926001600160a01b031690610a3b565b6006546001600160a01b031663f305d7194730610921816001600160a01b03165f9081526020819052604090205490565b5f806109356005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af115801561099b573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906109c09190611435565b505050565b6109cd610b5e565b6001600160a01b038116610a325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161073a565b61085881610dc1565b6001600160a01b038316610a9d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161073a565b6001600160a01b038216610afe5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161073a565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b031633146106a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161073a565b5f610bc38484610899565b90505f198114610c2a5781811015610c1d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161073a565b610c2a8484848403610a3b565b50505050565b6001600160a01b0383165f9081526008602052604090205460ff16158015610c7057506001600160a01b0382165f9081526008602052604090205460ff16155b15610db657600b5460ff16610c83575f80fd5b600b545f90610100900460ff168015610c9e575043600c5414155b15610cca57600a54821115610cc55760405162461bcd60e51b815260040161073a90611460565b610cec565b600954821115610cec5760405162461bcd60e51b815260040161073a90611460565b6007546001600160a01b0390811690841603610d525750305f9081526020819052604081205460059150600d5481118015610d2a5750600f5460ff16155b15610d4c57610d4c610d47600e54610d428685610e12565b610e12565b610e29565b50610d6c565b6007546001600160a01b0390811690851603610d6c575060055b5f6064610d79838561140b565b610d8391906113ec565b90505f610d9082856114ac565b90508115610da357610da3863084610faf565b610dae868683610faf565b505050505050565b6109c0838383610faf565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f818311610e205782610e22565b815b9392505050565b600f805460ff19166001179055600654610e4e9030906001600160a01b031683610a3b565b6040805160028082526060820183525f9260208301908036833701905050905030815f81518110610e8157610e816114bf565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610ed8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc91906114d3565b81600181518110610f0f57610f0f6114bf565b6001600160a01b03928316602091820292909201015260065460405163791ac94760e01b815291169063791ac94790610f749085905f9086907f0000000000000000000000007a175fe3b09ae562bb18441f8072cb7c6abb1d829042906004016114ee565b5f604051808303815f87803b158015610f8b575f80fd5b505af1158015610f9d573d5f803e3d5ffd5b5050600f805460ff1916905550505050565b6001600160a01b0383166110135760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161073a565b6001600160a01b0382166110755760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161073a565b6001600160a01b0383165f90815260208190526040902054818110156110ec5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161073a565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610c2a565b5f602080835283518060208501525f5b8181101561117d57858101830151858201604001528201611161565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610858575f80fd5b5f80604083850312156111c2575f80fd5b82356111cd8161119d565b946020939093013593505050565b5f602082840312156111eb575f80fd5b5035919050565b5f805f60608486031215611204575f80fd5b833561120f8161119d565b9250602084013561121f8161119d565b929592945050506040919091013590565b5f60208284031215611240575f80fd5b8135610e228161119d565b5f806040838503121561125c575f80fd5b82356112678161119d565b91506020830135801515811461127b575f80fd5b809150509250929050565b5f8060408385031215611297575f80fd5b82356112a28161119d565b9150602083013561127b8161119d565b600181811c908216806112c657607f821691505b6020821081036112e457634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b600181815b8085111561133857815f190482111561131e5761131e6112ea565b8085161561132b57918102915b93841c9390800290611303565b509250929050565b5f8261134e57506001610607565b8161135a57505f610607565b8160018114611370576002811461137a57611396565b6001915050610607565b60ff84111561138b5761138b6112ea565b50506001821b610607565b5060208310610133831016604e8410600b84101617156113b9575081810a610607565b6113c383836112fe565b805f19048211156113d6576113d66112ea565b029392505050565b5f610e2260ff841683611340565b5f8261140657634e487b7160e01b5f52601260045260245ffd5b500490565b8082028115828204841417610607576106076112ea565b80820180821115610607576106076112ea565b5f805f60608486031215611447575f80fd5b8351925060208401519150604084015190509250925092565b6020808252602c908201527f5472616e73666572206578636565647320746865206d6178696d756d20616d6f60408201526b3ab73a1030b63637bbb2b21760a11b606082015260800190565b81810381811115610607576106076112ea565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156114e3575f80fd5b8151610e228161119d565b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b8181101561153e5784516001600160a01b031683529383019391830191600101611519565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212200eed49247b01a30e9d0df375cded9791456675a2a34d1dea4204147527fbc5bb64736f6c63430008180033
Verified Source Code Full Match
Compiler: v0.8.24+commit.e11b9ed9
EVM: shanghai
Optimization: Yes (200 runs)
CandleAI.sol 226 lines
/*
$CNDL is a functional, modern and automated approach to trading on-chain utilizing millions of data points.
Every trade optimized.
Telegram: https://t.me/candle_AI/
Twitter (X): https://twitter.com/cndl_ai/
Website: https://cndl.ai/
Medium: https://medium.com/@CNDL_AI/
Whitepaper: https://docs.cndl.ai/
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// Latest OpenZeppelin Library Contract Standards used for ERC20 and Access Control
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
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 CandleAI is ERC20, Ownable {
// Buy and Sell Tax set to 5%
uint256 public constant BuySellTax = 5;
// Uniswap Router and Pair Options and Wallets
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) public isExempt;
// Team and Marketing Wallets
address private immutable teamAddress;
address private immutable marketingAddress;
address private immutable taxAddress;
// Generic Transaction Options
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;
}
// Token Initialization, Minting, and Distribution
constructor(
address _teamAddress,
address _marketingAddress,
address _taxAddress,
address _private
) ERC20("CandleAI", "CNDL") Ownable() {
uint256 totalSupply = 100000000 * 10**18; // 100 000 000 tokens with nine decimals
// Immutable Addresses
teamAddress = _teamAddress;
marketingAddress = _marketingAddress;
taxAddress = _taxAddress;
// Deployer and Team Exemptions
isExempt[msg.sender] = true;
isExempt[address(this)] = true;
isExempt[teamAddress] = true;
isExempt[marketingAddress] = true;
isExempt[taxAddress] = true;
isExempt[_private] = true;
// Mint of the Supply
_mint(teamAddress, totalSupply * 12 / 100); // 2% to the TW
_mint(marketingAddress, totalSupply * 8 / 100); // 8% to the MW
_mint(_private, totalSupply * 24 / 100); // 24% to the Owner
_mint(msg.sender, totalSupply * 56 / 100); // 66% to the Deployer
// Uniswap Router and Creating a Uniswap Pair
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
uniswapV2Pair = address(
IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH())
);
// Transaction Options
maxTransactionAmount = totalSupply * 2 / 100;
maxTxSlowDown = totalSupply * 5 / 1000;
maxSwap = 150000 * 10**18;
minSwap = 25000 * 10**18;
}
// Function to Add Liquidity to the Pair
function addLiquidity() external onlyOwner {
_approve(address(this), address(uniswapV2Router), balanceOf(address(this)));
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 setMaxSwap(uint256 _maxSwap) external onlyOwner{
maxSwap = _maxSwap * 10**decimals();
}
function setMinSwap(uint256 _minSwap) external onlyOwner{
minSwap = _minSwap * 10**decimals();
}
function switchCaSell() external onlyOwner {
if (inSwap){
inSwap = false;
} else {
inSwap = true;
}
}
// Function to Allow Users to Swap the Pair
function swapTokensEth(uint256 tokenAmount) internal lockTheSwap {
_approve(address(this), address(uniswapV2Router), tokenAmount);
// Pair Swap Path Options
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
taxAddress,
block.timestamp
);
}
// Override the Transfer Function to include Buy and Sell Tax and Transaction Options
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 maximum amount allowed.");
} else {
require(value <= maxTransactionAmount, "Transfer exceeds the maximum amount allowed.");
}
// Set Tax at Buy / Sell
if (to == uniswapV2Pair) {
tax = BuySellTax;
uint256 tokensSwap = balanceOf(address(this));
if (tokensSwap > minSwap && !inSwap) {
swapTokensEth(min(maxSwap, min(value, tokensSwap)));
}
} else if (from == uniswapV2Pair){
tax = BuySellTax;
}
// 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);
return;
}
super._transfer(from, to, value);
}
function min(uint256 a, uint256 b) private pure returns (uint256){
return (a>b)?b:a;
}
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
BuySellTax 0x06e172de → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
getMaxSwap 0xacb79766 → uint256
getMinSwap 0x09d58ae6 → uint256
isExempt 0xad5dff73 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxTxSlowDown 0x31062be8 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → 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
No transactions found for this address