Custom Functions
Anti Sniper Related Code
[line 505]
uint256 public _sniperSellLimit = 5 * 10*4 * 10**9;
[line 677 to 679]
function isSniperAccount(address account) public view returns (bool) {
return _isSniper[account];
}
[line 762 to 773]
function antiSniper(address account) external onlyOwner {
_isSniper[account] = true;
emit isEnrolledAsSniperAccount(account);
}
function removeAntiSniper(address account) external onlyOwner {
_isSniper[account] = false;
emit isRemovedAsSniperAccount(account);
}
[line 1032 to 1054]
if (_isSniper[from])
{
if (block.timestamp <= 1844251200) { // Will be allowed transfer until June 10, 2028 12:00:00 GMT
require ((to == uniswapV2Pair
&& amount <= _sniperSellLimit) // Can sell 50,000 tokens at a time
|| ((to == Wallet_Treasury || to == Wallet_Development)
&& amount <= donationTransferMax) // Transfer 250,000 buy back at half price
|| ((to != Wallet_Treasury || to != Wallet_Development
|| to != owner() || !_isDonationRecipient[to])
&& amount <= _maxTxAmount) // Transfer to another wallet, pay transfer tax
&& (block.timestamp >= transferTimeFrom[from] + 14 days), // Can only transfer twice a month
"CHT: Account tagged as Sniper, with limited capacity to send."
);
transferTimeFrom[from] = block.timestamp;
}
else { // Snipers can only have tokens burned
require (to == Wallet_Burn && amount <= _maxTxAmount,
"CHT: No option but to burn, buyback for 1/5th of current price."); // Treasury will manually buy back
}
}
Health Donation Utility Related Code
[line 497 to 498]
uint256 private donationSell = 999 * 10**2 * 10**9;
uint256 private donationTransferMax = 25 * 10**4 * 10**9;
[line 500 to 503]
uint256 private _donationLimit1 = 5 * 10**2 * 10**9;
uint256 private _donationLimit2 = 25 * 10**2 * 10**9;
uint256 private _donationLimit3 = 1 * 10**4 * 10**9;
uint256 private _donationLimit4 = 1 * 10**5 * 10**9;
[line 749 to 760]
function includeForDonation(address account) external onlyOwner {
_isDonationRecipient[account] = true;
emit isEnrolledAsDonationReceiver (account);
}
function excludeForDonation(address account) external onlyOwner {
_isDonationRecipient[account] = false;
emit isRemovedAsDonationReceiver (account);
}
[line 792 to 800]
function setDonationSell(uint256 dsell) external onlyOwner {
require(dsell == 999 * 10**2 * 10**9 || dsell == 999 * 10**1 * 10**9,
"Can only set to either 99,900 or 9,990"
);
donationSell = dsell;
emit updatedDonationSell (dsell);
}
[line 775 to 789]
function checkLastTransfer (address account) public view returns (
uint256 lastTransfer,
uint256 donate500,
uint256 donate2500,
uint256 donate10K,
uint256 donate100K) {
lastTransfer = transferTimeFrom[account];
donate500 = transferTimeFrom[account] + 60 minutes;
donate2500 = transferTimeFrom[account] + 8 hours;
donate10K = transferTimeFrom[account] + 36 hours;
donate100K = transferTimeFrom[account] + 20 days;
return (lastTransfer, donate500, donate2500, donate10K, donate100K);
}
[line 1076 to 1110]
// Donation Wallet receiving limits
if (_isDonationRecipient[to])
{
uint256 heldTokens = balanceOf(to);
require (from != owner() && ((heldTokens + amount) <= _maxDonationRecipientHold)
&&
((amount == _donationLimit1 // Can only donate 500 tokens at a time
&& block.timestamp > transferTimeFrom[from] + 60 minutes) // 1-hour donation cooldown
||
(amount == _donationLimit2 // Can only donate 2,500 tokens at a time
&& block.timestamp > transferTimeFrom[from] + 8 hours) // 8-hour donation cooldown
||
(amount == _donationLimit3 // Can only donate 10,000 tokens at a time
&& block.timestamp > transferTimeFrom[from] + 36 hours) // 36-hour donation cooldown
||
(amount == _donationLimit4 // Can only donate 100,000 tokens at a time
&& block.timestamp > transferTimeFrom[from] + 20 days)), // 20-day donation cooldown
"CHT: Donation cooldown times as follows: Donate 100K (20d), 10K (36h), 2500 (8h), 500 (1h)."
);
transferTimeFrom[from] = block.timestamp;
}
// Donation Wallet transfer and sell limits, buyer protection for misuse of lack of fees
if (_isDonationRecipient[from])
{
require ((amount == donationTransferMax && _isEmploymentWallet[to]) // Send 250,000 tokens to Employment Wallet
|| ((amount == donationSell && to == uniswapV2Pair)
&& (block.timestamp > transferTimeFrom[from] + 3 days)) // Sell 99,900 tokens every 3 days
|| (amount <= burnTransferAmt && to == Wallet_Burn), // Burn at most 100,000 tokens at a time
"CHT: Donation Recipient Wallets have transfer limitations."
);
transferTimeFrom[from] = block.timestamp;
}
Employment Wallet Related Code
[line 485 to 486]
address public Wallet_Employment1 = 0x3A6f95C81ab4290F152C44f1d071A40C1879aEB2;
address public Wallet_Employment2 = 0x068f73C1FB75C627f41BFbCeee847abfa97F9080;
[line 492]
uint256 private _maxEmploymentHold = 75 * 10**6 * 10**9;
[line 495]
uint256 public _employmentSellLimit = 5 * 10*5 * 10**9;
[line 1067 to 1074]
if (_isEmploymentWallet[to])
{
uint256 heldTokens = balanceOf(to);
require (from == Wallet_Treasury // Can only receive from Treasury"
&& (heldTokens + amount) <= _maxEmploymentHold, // Can only hold at most 7.5% of the supply"
"CHT: Employment Wallet can only receive from Treasury Wallet."
);
}
Last updated