ERC-20
Overview
Max Total Supply
1,000,000,000 ARMT
Holders
16
Transfers
-
0
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Source Code Verified (Exact Match)
Contract Name:
ArmenianToken
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
/// @title ArmenianToken
/// @notice ERC20 token with a buy tax mechanism for charity donations via Uniswap V2
/// @dev Extends OpenZeppelin's ERC20 and Ownable contracts, includes tax and auto-swap functionality
contract ArmenianToken is ERC20, Ownable {
/// @notice Total supply of tokens (1 billion with 18 decimals)
uint256 private constant TOTAL_SUPPLY = 1_000_000_000 * 10 ** 18;
/// @notice Denominator for tax calculations (1000 = 100%)
uint256 private constant TAX_DENOMINATOR = 1000;
/// @notice Mapping of whitelisted DEX addresses
mapping(address => bool) public dexWhitelist;
/// @notice Buy tax in basis points (e.g., 100 = 10%)
uint256 public buyTaxBps;
/// @notice Accumulated tokens for charity from buy tax
uint256 public charityTokens;
/// @notice Address to receive charity donations
address public charityAddress;
/// @notice Threshold for automatic token-to-ETH swap
uint256 public swapThreshold;
/// @notice Uniswap V2 Router interface for swapping tokens
IUniswapV2Router02 public uniswapRouter;
/// @notice Thrown when buy tax percentage exceeds 99.9%
error TaxTooHigh();
/// @notice Thrown when owner address is zero
error InvalidOwnerAddress();
/// @notice Thrown when charity address is zero
error InvalidCharityAddress();
/// @notice Thrown when token holder address is zero
error InvalidRouterAddress();
/// @notice Thrown when insufficient tokens are accumulated for swap or transfer
error InsufficientCharityTokens();
/// @notice Thrown when ETH withdrawal address is zero
error InvalidWithdrawAddress();
/// @notice Thrown when no ETH is available for withdrawal
error NoEthToWithdraw();
/// @notice Emitted when a DEX is added or removed from the whitelist
/// @param dex The DEX address
/// @param status Whitelist status (true = added, false = removed)
event DEXWhitelisted(address indexed dex, bool status);
/// @notice Emitted when buy tax percentage is updated
/// @param newTaxBps The new tax percentage in basis points
event BuyTaxUpdated(uint256 newTaxBps);
/// @notice Emitted when charity address is updated
/// @param charity The new charity address
event CharityAddressUpdated(address indexed charity);
/// @notice Emitted when auto-swap threshold is updated
/// @param newThreshold The new threshold value
event SwapThresholdUpdated(uint256 newThreshold);
/// @notice Emitted when Uniswap router address is updated
/// @param router The new router address
event SwapRouterUpdated(address indexed router);
/// @notice Emitted when tokens are swapped to ETH and sent to charity
/// @param charity The charity address
/// @param tokenAmount The amount of tokens swapped
/// @param ethAmount The amount of ETH received
event TokensSwappedToCharity(
address indexed charity,
uint256 tokenAmount,
uint256 ethAmount
);
/// @notice Emitted when tokens are transferred directly to charity
/// @param charity The charity address
/// @param amount The amount of tokens transferred
event TokensTransferredToCharity(address indexed charity, uint256 amount);
/// @notice Emitted when ETH is withdrawn from the contract
/// @param to The recipient address
/// @param amount The amount of ETH withdrawn
event EthWithdrawn(address indexed to, uint256 amount);
/// @notice Constructor to initialize the token with owner, charity, token holder, and Uniswap router addresses
/// @param _ownerAddress Address that will have ownership of the contract
/// @param _charityAddress Address to receive charity donations
/// @param _uniswapRouter Address of the Uniswap V2 Router
constructor(
address _ownerAddress,
address _charityAddress,
address _uniswapRouter
) ERC20("ArmenianToken", "ARMT") Ownable(_ownerAddress) {
if (_ownerAddress == address(0)) revert InvalidOwnerAddress();
if (_charityAddress == address(0)) revert InvalidCharityAddress();
if (_uniswapRouter == address(0)) revert InvalidRouterAddress();
charityAddress = _charityAddress;
buyTaxBps = 100; // 10% default
swapThreshold = 5_000 * 10 ** 18; // Default threshold
uniswapRouter = IUniswapV2Router02(_uniswapRouter);
_approve(address(this), address(uniswapRouter), type(uint256).max);
_mint(_ownerAddress, TOTAL_SUPPLY);
}
/// @notice Adds or removes a DEX from the whitelist
/// @param _dex The DEX address
/// @param _status Whitelist status (true = add, false = remove)
function updateDEXWhitelist(address _dex, bool _status) external onlyOwner {
dexWhitelist[_dex] = _status;
emit DEXWhitelisted(_dex, _status);
}
/// @notice Updates the buy tax percentage
/// @param _bps New tax percentage in basis points (e.g., 100 = 10%)
/// @dev Reverts if percentage exceeds 99.9%
function setBuyTaxPercentage(uint256 _bps) external onlyOwner {
if (_bps > 250) revert TaxTooHigh();
buyTaxBps = _bps;
emit BuyTaxUpdated(_bps);
}
/// @notice Updates the charity address
/// @param _charity New charity address
/// @dev Reverts if address is zero
function setCharityAddress(address _charity) external onlyOwner {
if (_charity == address(0)) revert InvalidCharityAddress();
charityAddress = _charity;
emit CharityAddressUpdated(_charity);
}
/// @notice Updates the auto-swap threshold
/// @param _threshold New threshold for automatic token-to-ETH swaps
function setAutoSwapThreshold(uint256 _threshold) external onlyOwner {
swapThreshold = _threshold;
emit SwapThresholdUpdated(_threshold);
}
/// @notice Updates the Uniswap V2 Router address
/// @param _router New router address
/// @dev Reverts if address is zero, approves max allowance for new router
function setSwapRouter(address _router) external onlyOwner {
if (_router == address(0)) revert InvalidRouterAddress();
uniswapRouter = IUniswapV2Router02(_router);
_approve(address(this), address(uniswapRouter), type(uint256).max);
emit SwapRouterUpdated(_router);
}
/// @notice Withdraws ETH from the contract to a specified address
/// @param _to Recipient address
/// @dev Reverts if address is zero or no ETH is available
function withdrawEth(address _to) external onlyOwner {
if (_to == address(0)) revert InvalidWithdrawAddress();
uint256 ethBalance = address(this).balance;
if (ethBalance == 0) revert NoEthToWithdraw();
payable(_to).transfer(ethBalance);
emit EthWithdrawn(_to, ethBalance);
}
/// @notice Overrides ERC20 _update to apply tax on DEX purchases
/// @param from Source address
/// @param to Destination address
/// @param value Amount of tokens to transfer
/// @dev Applies tax on DEX buys, auto-swaps tokens to ETH if threshold is met
function _update(
address from,
address to,
uint256 value
) internal virtual override {
if (dexWhitelist[from] && buyTaxBps > 0) {
uint256 taxAmount = (value * buyTaxBps) / TAX_DENOMINATOR;
uint256 netAmount = value - taxAmount;
charityTokens += taxAmount;
super._update(from, address(this), taxAmount);
super._update(from, to, netAmount);
} else if (dexWhitelist[from] || dexWhitelist[to]) {
super._update(from, to, value);
} else {
super._update(from, to, value);
if (charityTokens >= swapThreshold) {
_swapTokensToETH(charityTokens);
}
}
}
/// @notice Manually swaps accumulated tokens to ETH and sends to charity
/// @param tokenAmount Amount of tokens to swap
function manualSwapToETH(uint256 tokenAmount) external onlyOwner {
_swapTokensToETH(tokenAmount);
}
/// @notice Transfers accumulated tokens directly to charity
/// @param amount Amount of tokens to transfer
/// @dev Reverts if amount exceeds accumulated tokens
function transferTokensToCharity(uint256 amount) external onlyOwner {
if (amount > charityTokens) revert InsufficientCharityTokens();
charityTokens -= amount;
_transfer(address(this), charityAddress, amount);
emit TokensTransferredToCharity(charityAddress, amount);
}
/// @notice Internal function to swap tokens to ETH and send to charity
/// @param tokenAmount Amount of tokens to swap
/// @dev Reverts if insufficient tokens or invalid router address
function _swapTokensToETH(uint256 tokenAmount) private {
if (tokenAmount > charityTokens) revert InsufficientCharityTokens();
if (address(uniswapRouter) == address(0)) revert InvalidRouterAddress();
charityTokens -= tokenAmount;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapRouter.WETH();
uint256 initialBalance = charityAddress.balance;
uniswapRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
charityAddress,
block.timestamp + 3000
);
uint256 ethReceived = charityAddress.balance - initialBalance;
emit TokensSwappedToCharity(charityAddress, tokenAmount, ethReceived);
}
/// @notice Allows the contract to receive ETH
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}.
*
* 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 ERC-20
* applications.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* Both 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 returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 returns (uint8) {
return 18;
}
/// @inheritdoc IERC20
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/// @inheritdoc IERC20
function balanceOf(address account) public view virtual 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 `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/// @inheritdoc IERC20
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` 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 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* 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 `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` 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.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` 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.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
*
* ```solidity
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner`'s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity >=0.6.2;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
}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);
}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;
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_ownerAddress","type":"address"},{"internalType":"address","name":"_charityAddress","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"InsufficientCharityTokens","type":"error"},{"inputs":[],"name":"InvalidCharityAddress","type":"error"},{"inputs":[],"name":"InvalidOwnerAddress","type":"error"},{"inputs":[],"name":"InvalidRouterAddress","type":"error"},{"inputs":[],"name":"InvalidWithdrawAddress","type":"error"},{"inputs":[],"name":"NoEthToWithdraw","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TaxTooHigh","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTaxBps","type":"uint256"}],"name":"BuyTaxUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"charity","type":"address"}],"name":"CharityAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dex","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"DEXWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EthWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"router","type":"address"}],"name":"SwapRouterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"SwapThresholdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"charity","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"TokensSwappedToCharity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"charity","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensTransferredToCharity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyTaxBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"charityAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"charityTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"dexWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"manualSwapToETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"setAutoSwapThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bps","type":"uint256"}],"name":"setBuyTaxPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_charity","type":"address"}],"name":"setCharityAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setSwapRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferTokensToCharity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dex","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateDEXWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080806040523461082c57600090606081611a8880380380916100228285610831565b833981010312610828576100358161086a565b9061004e60406100476020840161086a565b920161086a565b60405161005c604082610831565b600d81526c20b936b2b734b0b72a37b5b2b760991b602082015260405190610085604083610831565b60048252631054935560e21b60208301528051906001600160401b03821161081457600354600181811c9116801561080a575b60208210146107f6579081601f849311610788575b50602090601f8311600114610723578892610718575b50508160011b916000199060031b1c1916176003555b8051906001600160401b03821161070457600454600181811c911680156106fa575b60208210146106e6579081601f849311610678575b50602090601f8311600114610613578792610608575b50508160011b916000199060031b1c1916176004555b6001600160a01b0383169182156105f457600580546001600160a01b03198116851790915583906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08780a36001600160a01b03169081156105e5576001600160a01b03169081156105d657600980546001600160a01b0319908116929092179055606460075569010f0cf064dd59200000600a55600b80549091168217905530156105c25730845260016020526040842081855260205260408420600019905560405160001981527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203092a3828052600660205260ff604084205416806105b7575b1561031c57509060075490816b033b2e3c9fd0803ce800000002916b033b2e3c9fd0803ce800000083040361030857506103e8900490816b033b2e3c9fd0803ce800000003906b033b2e3c9fd0803ce800000082116102f2576102de836102d56102e39560085461088b565b60085530610925565b610925565b6040516110e690816109828239f35b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b81526011600452602490fd5b828052600660205260ff6040842054169081156105a1575b5015610349576103449150610898565b6102e3565b61035290610898565b60085490600a54821015610368575b50506102e3565b50600b546001600160a01b031690811561059057610386818061087e565b60085560405191610398606084610831565b600283526020830192604036853780511561057a573084526040516315ab88c960e31b815291602083600481845afa801561056e576000938491610530575b5082516001101561051c576001600160a01b039081166040840152600954168031959042610bb881019190821061050857833b1561050457939185939160405195869463791ac94760e01b865260a48601908a600488015287602488015260a060448801525180915260c486019390875b8181106104df575050508492869284926064840152608483015203925af180156104d457917fc641d4844b603e3dd7b62bf555a6876333f4cfc6587cc5d10b0c19ce3af3708693916040936104c4575b50506009546001600160a01b0316936104b290853161087e565b82519182526020820152a23880610361565b816104ce91610831565b38610498565b6040513d84823e3d90fd5b82516001600160a01b031686528a985089975060209586019590920191600101610448565b8580fd5b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b84526032600452602484fd5b90506020813d602011610566575b8161054b60209383610831565b810103126105625761055c9061086a565b386103d7565b8380fd5b3d915061053e565b6040513d6000823e3d90fd5b634e487b7160e01b600052603260045260246000fd5b6314203b4b60e01b60005260046000fd5b8352506006602052604082205460ff1638610334565b506007541515610269565b63e602df0560e01b84526004849052602484fd5b6314203b4b60e01b8552600485fd5b63184cec5960e21b8552600485fd5b631e4fbdf760e01b85526004859052602485fd5b015190503880610146565b600488528188209250601f198416885b8181106106605750908460019594939210610647575b505050811b0160045561015c565b015160001960f88460031b161c19169055388080610639565b92936020600181928786015181550195019301610623565b600488529091507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b601f840160051c810191602085106106dc575b90601f859493920160051c01905b8181106106ce5750610130565b8881558493506001016106c1565b90915081906106b3565b634e487b7160e01b87526022600452602487fd5b90607f169061011b565b634e487b7160e01b86526041600452602486fd5b0151905038806100e3565b600389528189209250601f198416895b8181106107705750908460019594939210610757575b505050811b016003556100f9565b015160001960f88460031b161c19169055388080610749565b92936020600181928786015181550195019301610733565b600389529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c810191602085106107ec575b90601f859493920160051c01905b8181106107de57506100cd565b8981558493506001016107d1565b90915081906107c3565b634e487b7160e01b88526022600452602488fd5b90607f16906100b8565b634e487b7160e01b87526041600452602487fd5b5080fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761085457604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361082c57565b919082039182116102f257565b919082018092116102f257565b6002546b033b2e3c9fd0803ce800000081018091116102f2576002556001600160a01b031680610900576b033b2e3c9fd0803ce7ffffff19600254016002555b6000600080516020611a6883398151915260206040516b033b2e3c9fd0803ce80000008152a3565b80600052600060205260406000206b033b2e3c9fd0803ce800000081540190556108d8565b600080516020611a6883398151915260206000926109458560025461088b565b6002556001600160a01b0316938415841461096c5780600254036002555b604051908152a3565b8484528382526040842081815401905561096356fe608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c9081630445b66714610b355750806306fdde0314610a76578063095ea7b3146109f05780630c1dc21f146109595780630c280b3a1461093b5780630c9be46d146108c157806318160ddd146108a3578063184686e61461082457806323b872dd1461074d57806325e16063146106ad578063313ce5671461069157806341273657146105a657806370a082311461056c578063715018a61461050f578063735de9f7146104e65780638da5cb5b146104bd57806395d89b41146103b5578063a56d37f91461034f578063a9059cbb1461031e578063afcf2fc4146102f5578063c473413a146102d7578063cc9a4e11146102b3578063d2060a3314610267578063da8b7ccf14610228578063dd62ed3e146101d75763f2fde38b14610148573861000f565b346101d25760203660031901126101d257610161610b99565b610169610c20565b6001600160a01b031680156101bc57600580546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b346101d25760403660031901126101d2576101f0610b99565b6101f8610baf565b6001600160a01b039182166000908152600160209081526040808320949093168252928352819020549051908152f35b346101d25760203660031901126101d2576001600160a01b03610249610b99565b166000526006602052602060ff604060002054166040519015158152f35b346101d25760203660031901126101d2577f18ff2fc8464635e4f668567019152095047e34d7a2ab4b97661ba4dc7fd0647660206004356102a6610c20565b80600a55604051908152a1005b346101d25760203660031901126101d2576102cc610c20565b61001b600435610d79565b346101d25760003660031901126101d2576020600754604051908152f35b346101d25760003660031901126101d2576009546040516001600160a01b039091168152602090f35b346101d25760403660031901126101d25761034461033a610b99565b6024359033610c49565b602060405160018152f35b346101d25760203660031901126101d25760043561036b610c20565b60fa81116103a4576020817f7a758dc8e99047b028278b3e2ff1416d8493a7aacee7a5dc30b6bf93270eccce92600755604051908152a1005b632bc7b84d60e21b60005260046000fd5b346101d25760003660031901126101d25760405160006004548060011c906001811680156104b3575b60208310811461049f5782855290811561047b575060011461041b575b6104178361040b81850382610bc5565b60405191829182610b50565b0390f35b91905060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b916000905b8082106104615750909150810160200161040b6103fb565b919260018160209254838588010152019101909291610449565b60ff191660208086019190915291151560051b8401909101915061040b90506103fb565b634e487b7160e01b84526022600452602484fd5b91607f16916103de565b346101d25760003660031901126101d2576005546040516001600160a01b039091168152602090f35b346101d25760003660031901126101d257600b546040516001600160a01b039091168152602090f35b346101d25760003660031901126101d257610528610c20565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101d25760203660031901126101d2576001600160a01b0361058d610b99565b1660005260006020526020604060002054604051908152f35b346101d25760203660031901126101d2576105bf610b99565b6105c7610c20565b6001600160a01b0316801561068057600b80546001600160a01b03191682179055301561066a5760009030825260016020526040822060018060a01b03821683526020526040822060001990558060405160001981527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203092a37f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df8280a280f35b63e602df0560e01b600052600060045260246000fd5b6314203b4b60e01b60005260046000fd5b346101d25760003660031901126101d257602060405160128152f35b346101d25760203660031901126101d2576106c6610b99565b6106ce610c20565b6001600160a01b0316801561073c5747801561072b576000808080848682f11561071f5760207f8455ae6be5d92f1df1c3c1484388e247a36c7e60d72055ae216dbc258f257d4b91604051908152a2005b6040513d6000823e3d90fd5b6361cc654560e01b60005260046000fd5b637a55fc8960e11b60005260046000fd5b346101d25760603660031901126101d257610766610b99565b61076e610baf565b6001600160a01b03821660008181526001602090815260408083203384529091529020549092604435929160001981106107ae575b506103449350610c49565b83811061080757841561066a5733156107f157610344946000526001602052604060002060018060a01b03331660005260205283604060002091039055846107a3565b634a1406b160e11b600052600060045260246000fd5b8390637dc7a0d960e11b6000523360045260245260445260646000fd5b346101d25760403660031901126101d25761083d610b99565b602435908115158092036101d25760207f04fc44b91a5e859b2199fbc444786c6e1f030206d2b944b9b57f6f08b4d31e7991610877610c20565b60018060a01b0316928360005260068252604060002060ff1981541660ff8316179055604051908152a2005b346101d25760003660031901126101d2576020600254604051908152f35b346101d25760203660031901126101d2576108da610b99565b6108e2610c20565b6001600160a01b0316801561092a57600980546001600160a01b031916821790557fbb41096ffa24eba11bfb81fc65a289ad885edd2da01304592f17cc4529914640600080a2005b63184cec5960e21b60005260046000fd5b346101d25760003660031901126101d2576020600854604051908152f35b346101d25760203660031901126101d257600435610975610c20565b6008548082116109df578161098991610bfd565b6008556009546109a49082906001600160a01b031630610c49565b6009546040519182526001600160a01b0316907f9102a75323ab1f3401a17ea693a6fa8c776e3b376affaa0474e777d32c06169290602090a2005b631372000f60e11b60005260046000fd5b346101d25760403660031901126101d257610a09610b99565b60243590331561066a576001600160a01b03169081156107f157336000526001602052604060002082600052602052806040600020556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346101d25760003660031901126101d25760405160006003548060011c90600181168015610b2b575b60208310811461049f5782855290811561047b5750600114610acb576104178361040b81850382610bc5565b91905060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b916000905b808210610b115750909150810160200161040b6103fb565b919260018160209254838588010152019101909291610af9565b91607f1691610a9f565b346101d25760003660031901126101d257602090600a548152f35b91909160208152825180602083015260005b818110610b83575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610b62565b600435906001600160a01b03821682036101d257565b602435906001600160a01b03821682036101d257565b90601f8019910116810190811067ffffffffffffffff821117610be757604052565b634e487b7160e01b600052604160045260246000fd5b91908203918211610c0a57565b634e487b7160e01b600052601160045260246000fd5b6005546001600160a01b03163303610c3457565b63118cdaa760e01b6000523360045260246000fd5b91906001600160a01b0383168015610d56576001600160a01b038216908115610d405780600052600660205260ff6040600020541680610d35575b15610cd257505060075492838302938385041483151715610c0a57610ccb610cb46103e8610cd096048095610bfd565b93610cc181600854610d6c565b6008553083610fc7565b610fc7565b565b600052600660205260ff60406000205416908115610d1c575b5015610cfa57610cd092610fc7565b610d0392610fc7565b600854600a54811015610d135750565b610cd090610d79565b9050600052600660205260ff6040600020541638610ceb565b506007541515610c84565b63ec442f0560e01b600052600060045260246000fd5b634b637e8f60e11b600052600060045260246000fd5b91908201809211610c0a57565b600854906000828211610fb857600b546001600160a01b0316928315610fa95782610da391610bfd565b600855604051610db4606082610bc5565b6002815260208101936040368637815115610f95573085526040516315ab88c960e31b8152602081600481855afa908115610f8a578491610f44575b50825160011015610f30576001600160a01b039081166040840152600954168031959042610bb8810191908210610f1c57833b15610f1857939185939160405195869463791ac94760e01b865260a48601908a600488015287602488015260a060448801525180915260c486019390875b818110610ef3575050508492869284926064840152608483015203925af18015610ee857917fc641d4844b603e3dd7b62bf555a6876333f4cfc6587cc5d10b0c19ce3af370869391604093610ed8575b50506009546001600160a01b031693610ecb908531610bfd565b82519182526020820152a2565b81610ee291610bc5565b38610eb1565b6040513d84823e3d90fd5b82516001600160a01b031686528a985089975060209586019590920191600101610e61565b8580fd5b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b84526032600452602484fd5b90506020813d602011610f82575b81610f5f60209383610bc5565b81010312610f7e57516001600160a01b0381168103610f7e5738610df0565b8380fd5b3d9150610f52565b6040513d86823e3d90fd5b634e487b7160e01b83526032600452602483fd5b6314203b4b60e01b8252600482fd5b631372000f60e11b8152600490fd5b6001600160a01b031690816110435760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9161100685600254610d6c565b6002555b6001600160a01b0316938461102b5780600254036002555b604051908152a3565b84600052600082526040600020818154019055611022565b816000526000602052604060002054838110611093577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef918460209285600052600084520360406000205561100a565b91905063391434e360e21b60005260045260245260445260646000fdfea26469706673582212201f37bbc1f1e224be18c7b9bd9d0cff8259691d2c32932dfd2e8001a551956a4964736f6c634300081a0033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0000000000000000000000007ea54a30b56412d0381b19dc6f1f56e050691b8e00000000000000000000000063d3454b04e40a319af6de6b2b3f361b637b91810000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Deployed Bytecode
0x608080604052600436101561001d575b50361561001b57600080fd5b005b60003560e01c9081630445b66714610b355750806306fdde0314610a76578063095ea7b3146109f05780630c1dc21f146109595780630c280b3a1461093b5780630c9be46d146108c157806318160ddd146108a3578063184686e61461082457806323b872dd1461074d57806325e16063146106ad578063313ce5671461069157806341273657146105a657806370a082311461056c578063715018a61461050f578063735de9f7146104e65780638da5cb5b146104bd57806395d89b41146103b5578063a56d37f91461034f578063a9059cbb1461031e578063afcf2fc4146102f5578063c473413a146102d7578063cc9a4e11146102b3578063d2060a3314610267578063da8b7ccf14610228578063dd62ed3e146101d75763f2fde38b14610148573861000f565b346101d25760203660031901126101d257610161610b99565b610169610c20565b6001600160a01b031680156101bc57600580546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b346101d25760403660031901126101d2576101f0610b99565b6101f8610baf565b6001600160a01b039182166000908152600160209081526040808320949093168252928352819020549051908152f35b346101d25760203660031901126101d2576001600160a01b03610249610b99565b166000526006602052602060ff604060002054166040519015158152f35b346101d25760203660031901126101d2577f18ff2fc8464635e4f668567019152095047e34d7a2ab4b97661ba4dc7fd0647660206004356102a6610c20565b80600a55604051908152a1005b346101d25760203660031901126101d2576102cc610c20565b61001b600435610d79565b346101d25760003660031901126101d2576020600754604051908152f35b346101d25760003660031901126101d2576009546040516001600160a01b039091168152602090f35b346101d25760403660031901126101d25761034461033a610b99565b6024359033610c49565b602060405160018152f35b346101d25760203660031901126101d25760043561036b610c20565b60fa81116103a4576020817f7a758dc8e99047b028278b3e2ff1416d8493a7aacee7a5dc30b6bf93270eccce92600755604051908152a1005b632bc7b84d60e21b60005260046000fd5b346101d25760003660031901126101d25760405160006004548060011c906001811680156104b3575b60208310811461049f5782855290811561047b575060011461041b575b6104178361040b81850382610bc5565b60405191829182610b50565b0390f35b91905060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b916000905b8082106104615750909150810160200161040b6103fb565b919260018160209254838588010152019101909291610449565b60ff191660208086019190915291151560051b8401909101915061040b90506103fb565b634e487b7160e01b84526022600452602484fd5b91607f16916103de565b346101d25760003660031901126101d2576005546040516001600160a01b039091168152602090f35b346101d25760003660031901126101d257600b546040516001600160a01b039091168152602090f35b346101d25760003660031901126101d257610528610c20565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101d25760203660031901126101d2576001600160a01b0361058d610b99565b1660005260006020526020604060002054604051908152f35b346101d25760203660031901126101d2576105bf610b99565b6105c7610c20565b6001600160a01b0316801561068057600b80546001600160a01b03191682179055301561066a5760009030825260016020526040822060018060a01b03821683526020526040822060001990558060405160001981527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203092a37f36db479a3b4d3672bd6f5fca4484283f60b5ac70647b1ceec13ecbb1d030a2df8280a280f35b63e602df0560e01b600052600060045260246000fd5b6314203b4b60e01b60005260046000fd5b346101d25760003660031901126101d257602060405160128152f35b346101d25760203660031901126101d2576106c6610b99565b6106ce610c20565b6001600160a01b0316801561073c5747801561072b576000808080848682f11561071f5760207f8455ae6be5d92f1df1c3c1484388e247a36c7e60d72055ae216dbc258f257d4b91604051908152a2005b6040513d6000823e3d90fd5b6361cc654560e01b60005260046000fd5b637a55fc8960e11b60005260046000fd5b346101d25760603660031901126101d257610766610b99565b61076e610baf565b6001600160a01b03821660008181526001602090815260408083203384529091529020549092604435929160001981106107ae575b506103449350610c49565b83811061080757841561066a5733156107f157610344946000526001602052604060002060018060a01b03331660005260205283604060002091039055846107a3565b634a1406b160e11b600052600060045260246000fd5b8390637dc7a0d960e11b6000523360045260245260445260646000fd5b346101d25760403660031901126101d25761083d610b99565b602435908115158092036101d25760207f04fc44b91a5e859b2199fbc444786c6e1f030206d2b944b9b57f6f08b4d31e7991610877610c20565b60018060a01b0316928360005260068252604060002060ff1981541660ff8316179055604051908152a2005b346101d25760003660031901126101d2576020600254604051908152f35b346101d25760203660031901126101d2576108da610b99565b6108e2610c20565b6001600160a01b0316801561092a57600980546001600160a01b031916821790557fbb41096ffa24eba11bfb81fc65a289ad885edd2da01304592f17cc4529914640600080a2005b63184cec5960e21b60005260046000fd5b346101d25760003660031901126101d2576020600854604051908152f35b346101d25760203660031901126101d257600435610975610c20565b6008548082116109df578161098991610bfd565b6008556009546109a49082906001600160a01b031630610c49565b6009546040519182526001600160a01b0316907f9102a75323ab1f3401a17ea693a6fa8c776e3b376affaa0474e777d32c06169290602090a2005b631372000f60e11b60005260046000fd5b346101d25760403660031901126101d257610a09610b99565b60243590331561066a576001600160a01b03169081156107f157336000526001602052604060002082600052602052806040600020556040519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560203392a3602060405160018152f35b346101d25760003660031901126101d25760405160006003548060011c90600181168015610b2b575b60208310811461049f5782855290811561047b5750600114610acb576104178361040b81850382610bc5565b91905060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b916000905b808210610b115750909150810160200161040b6103fb565b919260018160209254838588010152019101909291610af9565b91607f1691610a9f565b346101d25760003660031901126101d257602090600a548152f35b91909160208152825180602083015260005b818110610b83575060409293506000838284010152601f8019910116010190565b8060208092870101516040828601015201610b62565b600435906001600160a01b03821682036101d257565b602435906001600160a01b03821682036101d257565b90601f8019910116810190811067ffffffffffffffff821117610be757604052565b634e487b7160e01b600052604160045260246000fd5b91908203918211610c0a57565b634e487b7160e01b600052601160045260246000fd5b6005546001600160a01b03163303610c3457565b63118cdaa760e01b6000523360045260246000fd5b91906001600160a01b0383168015610d56576001600160a01b038216908115610d405780600052600660205260ff6040600020541680610d35575b15610cd257505060075492838302938385041483151715610c0a57610ccb610cb46103e8610cd096048095610bfd565b93610cc181600854610d6c565b6008553083610fc7565b610fc7565b565b600052600660205260ff60406000205416908115610d1c575b5015610cfa57610cd092610fc7565b610d0392610fc7565b600854600a54811015610d135750565b610cd090610d79565b9050600052600660205260ff6040600020541638610ceb565b506007541515610c84565b63ec442f0560e01b600052600060045260246000fd5b634b637e8f60e11b600052600060045260246000fd5b91908201809211610c0a57565b600854906000828211610fb857600b546001600160a01b0316928315610fa95782610da391610bfd565b600855604051610db4606082610bc5565b6002815260208101936040368637815115610f95573085526040516315ab88c960e31b8152602081600481855afa908115610f8a578491610f44575b50825160011015610f30576001600160a01b039081166040840152600954168031959042610bb8810191908210610f1c57833b15610f1857939185939160405195869463791ac94760e01b865260a48601908a600488015287602488015260a060448801525180915260c486019390875b818110610ef3575050508492869284926064840152608483015203925af18015610ee857917fc641d4844b603e3dd7b62bf555a6876333f4cfc6587cc5d10b0c19ce3af370869391604093610ed8575b50506009546001600160a01b031693610ecb908531610bfd565b82519182526020820152a2565b81610ee291610bc5565b38610eb1565b6040513d84823e3d90fd5b82516001600160a01b031686528a985089975060209586019590920191600101610e61565b8580fd5b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b84526032600452602484fd5b90506020813d602011610f82575b81610f5f60209383610bc5565b81010312610f7e57516001600160a01b0381168103610f7e5738610df0565b8380fd5b3d9150610f52565b6040513d86823e3d90fd5b634e487b7160e01b83526032600452602483fd5b6314203b4b60e01b8252600482fd5b631372000f60e11b8152600490fd5b6001600160a01b031690816110435760207fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9161100685600254610d6c565b6002555b6001600160a01b0316938461102b5780600254036002555b604051908152a3565b84600052600082526040600020818154019055611022565b816000526000602052604060002054838110611093577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef918460209285600052600084520360406000205561100a565b91905063391434e360e21b60005260045260245260445260646000fdfea26469706673582212201f37bbc1f1e224be18c7b9bd9d0cff8259691d2c32932dfd2e8001a551956a4964736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007ea54a30b56412d0381b19dc6f1f56e050691b8e00000000000000000000000063d3454b04e40a319af6de6b2b3f361b637b91810000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
-----Decoded View---------------
Arg [0] : _ownerAddress (address): 0x7eA54A30b56412D0381b19DC6F1F56E050691B8e
Arg [1] : _charityAddress (address): 0x63d3454B04e40a319af6De6B2B3F361b637b9181
Arg [2] : _uniswapRouter (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007ea54a30b56412d0381b19dc6f1f56e050691b8e
Arg [1] : 00000000000000000000000063d3454b04e40a319af6de6b2b3f361b637b9181
Arg [2] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.
Add Token to MetaMask (Web3)