// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint 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 IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(
address recipient,
uint256 amount
) external returns (bool);
function allowance(
address owner,
address spender
) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(
address payable recipient,
uint256 amount
) internal returns (bool) {
require(
address(this).balance >= amount,
"Address: insufficient balance"
);
(bool success, ) = recipient.call{value: amount}("");
return success;
}
function functionCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
0,
"Address: low-level call failed"
);
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return
functionCallWithValue(
target,
data,
value,
"Address: low-level call with value failed"
);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(
address(this).balance >= value,
"Address: insufficient balance for call"
);
(bool success, bytes memory returndata) = target.call{value: value}(
data
);
return
verifyCallResultFromTarget(
target,
success,
returndata,
errorMessage
);
}
function functionStaticCall(
address target,
bytes memory data
) internal view returns (bytes memory) {
return
functionStaticCall(
target,
data,
"Address: low-level static call failed"
);
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return
verifyCallResultFromTarget(
target,
success,
returndata,
errorMessage
);
}
function functionDelegateCall(
address target,
bytes memory data
) internal returns (bytes memory) {
return
functionDelegateCall(
target,
data,
"Address: low-level delegate call failed"
);
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return
verifyCallResultFromTarget(
target,
success,
returndata,
errorMessage
);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(
bytes memory returndata,
string memory errorMessage
) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
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;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(
address account
) public view virtual override returns (uint256) {
return _balances[account];
}
function transfer(
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
uint256 currentAllowance = _allowances[sender][_msgSender()];
if (currentAllowance != type(uint256).max) {
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
}
_transfer(sender, recipient, amount);
return true;
}
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
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;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
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;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
/**
* @title Incentives
* @dev ERC20 Token with customizable tax mechanisms for buys and sells,
* whitelisting, liquidity pool management, fee exclusion, accumulated tax
* distribution (every 24 hours), event logging, snapshot feature, and circuit
* breakers for tax rates.
*/
contract Incentives is ERC20, Ownable, ReentrancyGuard {
uint256 public constant MAX_SUPPLY = 100_000_000 * (10 ** 18); // 100 million tokens
/// @notice Buy tax rate in basis points (parts per 10,000)
uint16 public buyTaxRate = 400; // 4% buy tax
/// @notice Sell tax rate in basis points (parts per 10,000)
uint16 public sellTaxRate = 400; // 4% sell tax
/// @notice Maximum allowable tax rate (e.g., 1000 = 10%)
uint16 public constant MAX_TAX_RATE = 1_000; // 10%
/// @notice Wallet addresses for tax distribution
address public marketingWallet;
address public operationsWallet;
address public developmentWallet;
/// @notice Tax distribution percentages (must sum to 100)
uint16 public marketingTaxRate = 25; // 25% of the tax amount
uint16 public operationsTaxRate = 25; // 25% of the tax amount
uint16 public developmentTaxRate = 50; // 50% of the tax amount
/// @notice Addresses excluded from fees
mapping(address => bool) private _isExcludedFromFees;
/// @notice Accumulated taxes to be distributed
uint256 private accumulatedMarketingTax;
uint256 private accumulatedOperationsTax;
uint256 private accumulatedDevelopmentTax;
/// @notice Timestamp of the last tax distribution
uint256 private lastTaxDistributionTime;
/// @notice Minimum time between tax distributions (24 hours)
uint256 public constant TAX_DISTRIBUTION_INTERVAL = 24 hours;
uint256 public firstTimeStamp;
mapping(address => bool) private whitelistedAddresses;
mapping(address => bool) private liquidityPools;
bool private tradingOpen;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
mapping (address => bool) public isBot;
mapping (address => uint256) public _transactorLastblock;
uint256 public limit_timestamp = 24 hours;
uint256 public initial_tax = 10;
uint256 public maxBuyLimit; // Max buy limit (2% of max supply)
uint256 public maxSellLimit; // Max sell limit (1% of max supply)
/// @notice Events
event TaxRateUpdated(
uint16 oldBuyTaxRate,
uint16 newBuyTaxRate,
uint16 oldSellTaxRate,
uint16 newSellTaxRate
);
event TaxWalletsUpdated(
address marketingWallet,
address operationsWallet,
address developmentWallet
);
event WhitelistUpdated(address indexed account, bool isWhitelisted);
event LiquidityPoolUpdated(address indexed account, bool isLiquidityPool);
event TaxDistributionUpdated(
uint16 marketingTaxRate,
uint16 operationsTaxRate,
uint16 developmentTaxRate
);
event ExcludedFromFees(address indexed account, bool isExcluded);
event TaxesDistributed(
uint256 marketingAmount,
uint256 operationsAmount,
uint256 developmentAmount
);
event TaxDistributionAttempted(uint256 timestamp, string reason);
/**
* @dev Constructor that gives msg.sender all of existing tokens.
* @param _marketingWallet Address of the marketing wallet
* @param _operationsWallet Address of the operations wallet
* @param _developmentWallet Address of the development wallet
*/
constructor(
address _marketingWallet,
address _operationsWallet,
address _developmentWallet
) ERC20("Incentives", "$INCV") {
require(
_marketingWallet != address(0),
"Marketing wallet is the zero address"
);
require(
_operationsWallet != address(0),
"Operations wallet is the zero address"
);
require(
_developmentWallet != address(0),
"Development wallet is the zero address"
);
marketingWallet = _marketingWallet;
operationsWallet = _operationsWallet;
developmentWallet = _developmentWallet;
maxBuyLimit = (MAX_SUPPLY * 2) / 100; // 2% of max supply
maxSellLimit = (MAX_SUPPLY * 1) / 100; // 1% of max supply
_isExcludedFromFees[msg.sender] = true; // Exclude owner from fees
_isExcludedFromFees[address(this)] = true; // Exclude owner from fees
tradingOpen = false;
_mint(msg.sender, MAX_SUPPLY); // Mint all tokens to the owner
uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
}
/**
* @notice Update buy and sell tax rates
* @param _buyTaxRate New buy tax rate (in basis points)
* @param _sellTaxRate New sell tax rate (in basis points)
*/
function setTaxRates(uint16 _buyTaxRate, uint16 _sellTaxRate)
external
onlyOwner
{
require(
_buyTaxRate <= MAX_TAX_RATE,
"Buy tax rate exceeds maximum"
);
require(
_sellTaxRate <= MAX_TAX_RATE,
"Sell tax rate exceeds maximum"
);
uint16 oldBuyTaxRate = buyTaxRate;
uint16 oldSellTaxRate = sellTaxRate;
buyTaxRate = _buyTaxRate;
sellTaxRate = _sellTaxRate;
emit TaxRateUpdated(
oldBuyTaxRate,
_buyTaxRate,
oldSellTaxRate,
_sellTaxRate
);
}
/**
* @notice Update tax wallet addresses
* @param _marketingWallet Address of the marketing wallet
* @param _operationsWallet Address of the operations wallet
* @param _developmentWallet Address of the development wallet
*/
function setTaxWallets(
address _marketingWallet,
address _operationsWallet,
address _developmentWallet
) external onlyOwner {
require(
_marketingWallet != address(0),
"Marketing wallet is the zero address"
);
require(
_operationsWallet != address(0),
"Operations wallet is the zero address"
);
require(
_developmentWallet != address(0),
"Development wallet is the zero address"
);
marketingWallet = _marketingWallet;
operationsWallet = _operationsWallet;
developmentWallet = _developmentWallet;
emit TaxWalletsUpdated(
_marketingWallet,
_operationsWallet,
_developmentWallet
);
}
/**
* @notice Update tax distribution percentages
* @param _marketingTaxRate Percentage of tax allocated to marketing
* @param _operationsTaxRate Percentage of tax allocated to operations
* @param _developmentTaxRate Percentage of tax allocated to development
*/
function setTaxDistribution(
uint16 _marketingTaxRate,
uint16 _operationsTaxRate,
uint16 _developmentTaxRate
) external onlyOwner {
require(
_marketingTaxRate +
_operationsTaxRate +
_developmentTaxRate ==
100,
"Total tax distribution must equal 100%"
);
marketingTaxRate = _marketingTaxRate;
operationsTaxRate = _operationsTaxRate;
developmentTaxRate = _developmentTaxRate;
emit TaxDistributionUpdated(
_marketingTaxRate,
_operationsTaxRate,
_developmentTaxRate
);
}
/**
* @notice Add or remove addresses from the whitelist
* @param _addresses Addresses to be updated
* @param _isWhitelisted Whether the addresses are whitelisted
*/
function setWhitelist(
address[] calldata _addresses,
bool _isWhitelisted
) external onlyOwner {
require(
_addresses.length <= 100,
"Too many addresses at once"
);
for (uint256 i = 0; i < _addresses.length; i++) {
address addr = _addresses[i];
require(
addr != address(0),
"Address cannot be the zero address"
);
whitelistedAddresses[addr] = _isWhitelisted;
emit WhitelistUpdated(addr, _isWhitelisted);
}
}
/**
* @notice Check if an address is whitelisted
* @param _address Address to check
* @return True if the address is whitelisted
*/
function isWhitelisted(address _address)
public
view
returns (bool)
{
return whitelistedAddresses[_address];
}
/**
* @notice Add or remove addresses from the liquidity pools
* @param _addresses Addresses to be updated
* @param _isLiquidityPool Whether the addresses are liquidity pools
*/
function setLiquidityPools(
address[] calldata _addresses,
bool _isLiquidityPool
) external onlyOwner {
require(
_addresses.length <= 100,
"Too many addresses at once"
);
for (uint256 i = 0; i < _addresses.length; i++) {
address addr = _addresses[i];
require(
addr != address(0),
"Address cannot be the zero address"
);
liquidityPools[addr] = _isLiquidityPool;
emit LiquidityPoolUpdated(addr, _isLiquidityPool);
}
}
function setMaxBuyLimit(uint16 percent) external onlyOwner {
require(percent <= 100);
maxBuyLimit = (MAX_SUPPLY * percent) / 100;
}
function setInitialTax(uint16 percent) external onlyOwner {
require(percent <= 100);
initial_tax = percent;
}
function setMaxSellLimit(uint16 percent) external onlyOwner {
require(percent <= 100);
maxSellLimit = (MAX_SUPPLY * percent) / 100;
}
function setLimitTimestamp(uint256 newLimit) external onlyOwner {
require(newLimit > 5 minutes);
limit_timestamp = newLimit;
}
/**
* @notice Check if an address is a liquidity pool
* @param _address Address to check
* @return True if the address is a liquidity pool
*/
function isLiquidityPool(address _address)
public
view
returns (bool)
{
return liquidityPools[_address];
}
/**
* @notice Exclude or include an address from fees
* @param account Address to be updated
* @param excluded Whether the address is excluded from fees
*/
function setExcludedFromFees(address account, bool excluded)
external
onlyOwner
{
_isExcludedFromFees[account] = excluded;
emit ExcludedFromFees(account, excluded);
}
/**
* @notice Check if an address is excluded from fees
* @param account Address to check
* @return True if the address is excluded from fees
*/
function isExcludedFromFees(address account)
public
view
returns (bool)
{
return _isExcludedFromFees[account];
}
/**
* @dev Internal transfer function with tax logic
* @param sender Sender address
* @param recipient Recipient address
* @param amount Amount to transfer
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
if (
_isExcludedFromFees[sender] ||
_isExcludedFromFees[recipient] ||
isWhitelisted(sender) ||
isWhitelisted(recipient)
) {
super._transfer(sender, recipient, amount);
return;
}
require(firstTimeStamp > 0, "not paired yet");
uint256 taxAmount = 0;
if (isLiquidityPool(sender)) {
taxAmount = (amount * buyTaxRate) / 10_000;
} else if (isLiquidityPool(recipient)) {
taxAmount = (amount * sellTaxRate) / 10_000;
}
if(block.timestamp - firstTimeStamp <= limit_timestamp) {
if(_transactorLastblock[tx.origin] == block.number) {
if(isLiquidityPool(recipient))
isBot[sender] = true;
isBot[recipient] = true;
}
if( isBot[sender] ) {
super._transfer(sender, address(this), (amount / 100) * initial_tax);
}
_transactorLastblock[tx.origin] = block.number;
}
else {
if (isLiquidityPool(sender)) {
require(amount <= maxBuyLimit, "Buy amount exceeds max buy limit");
} else if (isLiquidityPool(recipient)) {
require(amount <= maxSellLimit, "Sell amount exceeds max sell limit");
}
}
uint256 amountAfterTax = amount - taxAmount;
super._transfer(sender, recipient, amountAfterTax);
if (taxAmount > 0) {
uint256 marketingAmount = (taxAmount * marketingTaxRate) / 100;
uint256 operationsAmount = (taxAmount * operationsTaxRate) / 100;
uint256 developmentAmount = taxAmount -
marketingAmount -
operationsAmount; // Remaining amount
// Accumulate taxes within the contract
accumulatedMarketingTax += marketingAmount;
accumulatedOperationsTax += operationsAmount;
accumulatedDevelopmentTax += developmentAmount;
// Transfer the tax amount to the contract itself
super._transfer(sender, address(this), taxAmount);
}
}
/**
* @notice Attempt to distribute accumulated taxes to the respective wallets
* Emits TaxDistributionAttempted event on failure.
*/
function attemptTaxDistribution() external onlyOwner {
try this.distributeAccumulatedTaxes() {
// Success, TaxesDistributed event is emitted in distributeAccumulatedTaxes
} catch Error(string memory reason) {
emit TaxDistributionAttempted(block.timestamp, reason);
} catch {
emit TaxDistributionAttempted(
block.timestamp,
"Unknown error"
);
}
}
/**
* @dev Internal function to distribute accumulated taxes
* Can only be called by the contract itself
*/
function distributeAccumulatedTaxes()
external
nonReentrant
{
require(
msg.sender == address(this),
"Can only be called via attemptTaxDistribution"
);
require(
block.timestamp >=
lastTaxDistributionTime + TAX_DISTRIBUTION_INTERVAL,
"Tax distribution interval not met"
);
uint256 marketingAmount = accumulatedMarketingTax;
uint256 operationsAmount = accumulatedOperationsTax;
uint256 developmentAmount = accumulatedDevelopmentTax;
require(
marketingAmount > 0 ||
operationsAmount > 0 ||
developmentAmount > 0,
"No taxes to distribute"
);
accumulatedMarketingTax = 0;
accumulatedOperationsTax = 0;
accumulatedDevelopmentTax = 0;
if (marketingAmount > 0) {
super._transfer(
address(this),
marketingWallet,
marketingAmount
);
}
if (operationsAmount > 0) {
super._transfer(
address(this),
operationsWallet,
operationsAmount
);
}
if (developmentAmount > 0) {
super._transfer(
address(this),
developmentWallet,
developmentAmount
);
}
lastTaxDistributionTime = block.timestamp;
emit TaxesDistributed(
marketingAmount,
operationsAmount,
developmentAmount
);
}
function startTrading() external onlyOwner() {
require(!tradingOpen,"trading is already open");
_approve(address(this), address(uniswapV2Router), balanceOf(address(this)));
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());
uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
tradingOpen = true;
firstTimeStamp = block.timestamp;
liquidityPools[uniswapV2Pair] = true;
}
/**
* @notice Get the accumulated marketing tax amount
* @return The accumulated marketing tax
*/
function getAccumulatedMarketingTax()
external
view
returns (uint256)
{
return accumulatedMarketingTax;
}
/**
* @notice Get the accumulated operations tax amount
* @return The accumulated operations tax
*/
function getAccumulatedOperationsTax()
external
view
returns (uint256)
{
return accumulatedOperationsTax;
}
/**
* @notice Get the accumulated development tax amount
* @return The accumulated development tax
*/
function getAccumulatedDevelopmentTax()
external
view
returns (uint256)
{
return accumulatedDevelopmentTax;
}
/**
* @notice Get the timestamp of the last tax distribution
* @return The timestamp of the last tax distribution
*/
function getLastTaxDistributionTime()
external
view
returns (uint256)
{
return lastTaxDistributionTime;
}
/**
* @dev Function to receive Ether. msg.data must be empty
*/
receive() external payable {}
/**
* @notice Rescue ERC20 tokens from the contract
* @param token Address of the ERC20 token to rescue
* @param amount Amount of tokens to rescue
*/
function rescueERC20(address token, uint256 amount) external onlyOwner {
require(token != address(0), "Cannot rescue from the zero address");
require(amount > 0, "Amount must be greater than 0");
IERC20(token).transfer(owner(), amount);
}
/**
* @notice Rescue ETH from the contract
* @param amount Amount of ETH to rescue
*/
function rescueETH(uint256 amount) external onlyOwner {
require(amount > 0, "Amount must be greater than 0");
require(address(this).balance >= amount, "Insufficient ETH balance");
payable(owner()).transfer(amount);
}
}
{
"compilationTarget": {
"contracts/INCV.sol": "Incentives"
},
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_marketingWallet","type":"address"},{"internalType":"address","name":"_operationsWallet","type":"address"},{"internalType":"address","name":"_developmentWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludedFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isLiquidityPool","type":"bool"}],"name":"LiquidityPoolUpdated","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":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"TaxDistributionAttempted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"marketingTaxRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"operationsTaxRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"developmentTaxRate","type":"uint16"}],"name":"TaxDistributionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"oldBuyTaxRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"newBuyTaxRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"oldSellTaxRate","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"newSellTaxRate","type":"uint16"}],"name":"TaxRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"marketingWallet","type":"address"},{"indexed":false,"internalType":"address","name":"operationsWallet","type":"address"},{"indexed":false,"internalType":"address","name":"developmentWallet","type":"address"}],"name":"TaxWalletsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"marketingAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"operationsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"developmentAmount","type":"uint256"}],"name":"TaxesDistributed","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isWhitelisted","type":"bool"}],"name":"WhitelistUpdated","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TAX_RATE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TAX_DISTRIBUTION_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_transactorLastblock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"attemptTaxDistribution","outputs":[],"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":"buyTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"developmentTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"developmentWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeAccumulatedTaxes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"firstTimeStamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAccumulatedDevelopmentTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAccumulatedMarketingTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAccumulatedOperationsTax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastTaxDistributionTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initial_tax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isLiquidityPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limit_timestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBuyLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSellLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operationsTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operationsWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellTaxRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"setExcludedFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"percent","type":"uint16"}],"name":"setInitialTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"setLimitTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"bool","name":"_isLiquidityPool","type":"bool"}],"name":"setLiquidityPools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"percent","type":"uint16"}],"name":"setMaxBuyLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"percent","type":"uint16"}],"name":"setMaxSellLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_marketingTaxRate","type":"uint16"},{"internalType":"uint16","name":"_operationsTaxRate","type":"uint16"},{"internalType":"uint16","name":"_developmentTaxRate","type":"uint16"}],"name":"setTaxDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_buyTaxRate","type":"uint16"},{"internalType":"uint16","name":"_sellTaxRate","type":"uint16"}],"name":"setTaxRates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_marketingWallet","type":"address"},{"internalType":"address","name":"_operationsWallet","type":"address"},{"internalType":"address","name":"_developmentWallet","type":"address"}],"name":"setTaxWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"bool","name":"_isWhitelisted","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTrading","outputs":[],"stateMutability":"nonpayable","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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]