Address
0x83d1c45e15f86fceecc47cbabeff5e71a1faa94bCurrent Holdings
$0.0954
TXs sent
not counted
First Active
2026-02-07
block 25,731,665
Last Active
223 days ago
block 25,732,072
Net worth historyi
4 snapshots · to block 27,539,991coverage change 26 Augcoverage change 27 Augcoverage change 27 Augcoverage change 27 Augcoverage change 27 Aug
exact matchABCDsolc 0.8.20+commit.a1b79de6runtime exact · creation exact
pragma solidity 0.8.20;
// SPDX-License-Identifier: Unlicensed
import "./Ownable.sol";
import "./ERC20.sol";
import "./IPulseX.sol";
interface IPulseXPair {
function token0() external view returns (address);
function token1() external view returns (address);
}
contract ABCD is Ownable, ERC20 {
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000 * (10**18);
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public reflectionFee;
uint256 public buyBurnFee;
uint256 public hoardFee;
uint256 public LPaddFee;
uint256 private _reflectionFee;
uint256 private _buyBurnFee;
uint256 private _hoardFee;
uint256 private _LPaddFee;
uint256 public swapThresholdPercent; // Percentage of circulating supply (10 = 0.01%)
IPulseXRouter public pulseXRouter;
address private burnWallet = address(0x0000000000000000000000000000000000000369);
address public hoardWallet;
address[] public pairs;
bool private swapping;
address[] private _excluded;
mapping(address => uint256) public rOwned;
mapping(address => uint256) public tOwned;
mapping(address => uint256) public totalSend;
mapping(address => uint256) public totalReceived;
mapping(address => bool) public isExcludedFromFee;
mapping(address => bool) public isExcludedFromReflection;
mapping(address => bool) public isliquidityPair;
event SwapThresholdUpdated(uint256 newPercent, uint256 newThreshold);
event AccountExcludeFromFee(address account, bool status);
event AccountIncludeInReflection(address account);
event AccountExcludeFromReflection(address account);
event HoardWalletUpdated(address newHoard);
event TokenRescued(address indexed token, address indexed recipient, uint256 amount);
event PLSRescued(address indexed recipient, uint256 amount);
event HoardPLSTransferred(uint256 amount, bool success);
event LPAdded(uint256 amountABCD, uint256 amountPLS);
constructor(address owner) ERC20("ABCD", "ABCD") {
require(address(owner) != address(0), "Zero address");
rOwned[address(owner)] = _rTotal;
pulseXRouter = IPulseXRouter(0x165C3410fC91EF562C50559f7d2289fEbed552d9);
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0xA1077a294dDE1B09bB078844df40758a5D0f9a27))); //WPLS
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x1C81b4358246d3088Ab4361aB755F3D8D4dd62d2))); //FINVESTA
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x063E79CF6A555dac9033EAa3c61A8f02F1020759))); //MISSOR
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x2fa878Ab3F87CC1C9737Fc071108F904c0B0C95d))); //INC
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x95B303987A60C71504D99Aa1b13B4DA07b0790ab))); //PLSX
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39))); //HEX
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x57fde0a71132198BBeC939B98976993d8D89D225))); //HEXETH
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0xefD766cCb38EaF1dfd701853BFCe31359239F305))); //eDAI
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0x3d1e671B4486314f9cD3827f3F3D80B2c6D46FB4))); //OPUS
pairs.push(IPulseXFactory(pulseXRouter.factory()).createPair(address(this), address(0xC67E1E5F535bDDF5d0CEFaA9b7ed2A170f654CD7))); //CODA
_excludeFromReflection(address(burnWallet));
_excludeFromReflection(address(this));
_excludeFromReflection(address(owner));
_setLiquidityPair(pairs[0]);
_setLiquidityPair(pairs[1]);
_setLiquidityPair(pairs[2]);
_setLiquidityPair(pairs[3]);
_setLiquidityPair(pairs[4]);
_setLiquidityPair(pairs[5]);
_setLiquidityPair(pairs[6]);
_setLiquidityPair(pairs[7]);
_setLiquidityPair(pairs[8]);
_setLiquidityPair(pairs[9]);
_excludeFromFee(address(owner), true);
_excludeFromFee(address(this), true);
_excludeFromFee(0x98bf93ebf5c380C0e6Ae8e192A7e2AE08edAcc02, true);
_excludeFromFee(0x165C3410fC91EF562C50559f7d2289fEbed552d9, true);
hoardWallet = address(owner);
_excludeFromFee(hoardWallet, true);
swapThresholdPercent = 10; // 0.01% of circulating supply
reflectionFee = 100; // 1%
buyBurnFee = 500; // 5%
hoardFee = 100; // 1%
LPaddFee = 50; // 0.50%
restoreAllFee();
totalReceived[address(owner)] +=_tTotal;
emit Transfer(address(0), address(owner), _tTotal);
}
receive() external payable {}
function totalSupply() public override pure returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public override view returns (uint256) {
if (isExcludedFromReflection[account]) return tOwned[account];
return tokenFromReflection(rOwned[account]);
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
return rAmount / currentRate;
}
function _excludeFromReflection(address account) internal {
if(rOwned[account] > 0) {
tOwned[account] = tokenFromReflection(rOwned[account]);
}
isExcludedFromReflection[account] = true;
_excluded.push(account);
}
function _setLiquidityPair(address pair) internal {
isliquidityPair[address(pair)] = true;
_excludeFromReflection(address(pair));
}
function _excludeFromFee(address account, bool value) internal {
isExcludedFromFee[account] = value;
}
function _reflectFee(uint256 rFee) internal {
_rTotal = _rTotal - rFee;
}
function _contractFee(uint256 tContract) internal {
uint256 currentRate = _getRate();
uint256 rContract = tContract * currentRate;
rOwned[address(this)] = rOwned[address(this)] + rContract;
if(isExcludedFromReflection[address(this)])
tOwned[address(this)] = tOwned[address(this)] + tContract;
}
function _getValues(uint256 tAmount) internal view returns (uint256, uint256, uint256, uint256, uint256) {
(uint256 tTransferAmount, uint256 tFee, uint256 tContract) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tContract, _getRate());
return (rAmount, rTransferAmount, rFee, tTransferAmount, tContract);
}
function _getTValues(uint256 tAmount) internal view returns (uint256, uint256, uint256) {
uint256 tFee = calculateReflectionFee(tAmount);
uint256 tContract = calculateContractFee(tAmount);
uint256 tTransferAmount = tAmount - tFee - tContract;
return (tTransferAmount, tFee, tContract);
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tContract, uint256 currentRate) internal pure returns (uint256, uint256, uint256) {
uint256 rAmount = tAmount * currentRate;
uint256 rFee = tFee * currentRate;
uint256 rContract = tContract * currentRate;
uint256 rTransferAmount = rAmount - rFee - rContract;
return (rAmount, rTransferAmount, rFee);
}
function _getRate() internal view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply / tSupply;
}
function _getCurrentSupply() internal view returns(uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (rOwned[_excluded[i]] > rSupply || tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
rSupply = rSupply - rOwned[_excluded[i]];
tSupply = tSupply - tOwned[_excluded[i]];
}
if (rSupply < _rTotal / _tTotal) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function calculateReflectionFee(uint256 _amount) internal view returns (uint256) {
return _amount * _reflectionFee / 10000;
}
function calculateContractFee(uint256 _amount) internal view returns (uint256) {
return _amount * (_buyBurnFee + _hoardFee + _LPaddFee) / 10000;
}
function removeAllFee() internal {
_reflectionFee = 0;
_buyBurnFee = 0;
_hoardFee = 0;
_LPaddFee = 0;
}
function restoreAllFee() internal {
_reflectionFee = reflectionFee;
_buyBurnFee = buyBurnFee;
_hoardFee = hoardFee;
_LPaddFee = LPaddFee;
}
function getCirculatingSupply() public view returns (uint256) {
return _tTotal - balanceOf(burnWallet);
}
function getCurrentSwapThreshold() public view returns (uint256) {
return getCirculatingSupply() * swapThresholdPercent / 100000;
}
function _transfer(address from, address to, uint256 amount) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 contractTokenBalance = balanceOf(address(this));
uint256 currentThreshold = getCurrentSwapThreshold();
bool canSwap = contractTokenBalance >= currentThreshold;
if(canSwap && !swapping && isliquidityPair[to] && from != address(this))
{
swapping = true;
swapTokensForPLS(currentThreshold);
uint256 PLSBalance = address(this).balance;
uint256 allFee = buyBurnFee + hoardFee + LPaddFee;
if(allFee > 0) {
uint256 buyBurnPart = PLSBalance * buyBurnFee / allFee;
uint256 hoardPart = PLSBalance * hoardFee / allFee;
uint256 LPaddPart = PLSBalance * LPaddFee / allFee;
if(buyBurnPart > 0)
{
buybackBurnABCD(buyBurnPart);
}
if(hoardPart > 0)
{
(bool success, ) = payable(hoardWallet).call{value: hoardPart}("");
emit HoardPLSTransferred(hoardPart, success);
}
if(LPaddPart > 0)
{
addLiquidityToDeadAddress(LPaddPart);
}
}
swapping = false;
}
bool takeFee = true;
if(isExcludedFromFee[from] || isExcludedFromFee[to])
{
takeFee = false;
}
_tokenTransfer(from, to, amount, takeFee);
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) internal {
totalSend[sender] += amount;
if(!takeFee)
{
removeAllFee();
}
uint256 _totalFee = _reflectionFee + _buyBurnFee + _hoardFee + _LPaddFee;
if(_totalFee > 0)
{
uint256 _feeAmount = amount * _totalFee / 10000;
totalReceived[recipient] += amount - _feeAmount;
}
else
{
totalReceived[recipient] += amount;
}
if (isExcludedFromReflection[sender] && !isExcludedFromReflection[recipient])
{
_transferFromExcluded(sender, recipient, amount);
}
else if (!isExcludedFromReflection[sender] && isExcludedFromReflection[recipient])
{
_transferToExcluded(sender, recipient, amount);
}
else if (!isExcludedFromReflection[sender] && !isExcludedFromReflection[recipient])
{
_transferStandard(sender, recipient, amount);
}
else if (isExcludedFromReflection[sender] && isExcludedFromReflection[recipient])
{
_transferBothExcluded(sender, recipient, amount);
}
else
{
_transferStandard(sender, recipient, amount);
}
if(!takeFee)
{
restoreAllFee();
}
}
function _transferStandard(address sender, address recipient, uint256 tAmount) internal {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tContract) = _getValues(tAmount);
rOwned[sender] = rOwned[sender] - rAmount;
rOwned[recipient] = rOwned[recipient] + rTransferAmount;
_contractFee(tContract);
_reflectFee(rFee);
if(tContract > 0)
{
emit Transfer(sender, address(this), tContract);
}
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) internal {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tContract) = _getValues(tAmount);
rOwned[sender] = rOwned[sender] - rAmount;
tOwned[recipient] = tOwned[recipient] + tTransferAmount;
rOwned[recipient] = rOwned[recipient] + rTransferAmount;
_contractFee(tContract);
_reflectFee(rFee);
if(tContract > 0)
{
emit Transfer(sender, address(this), tContract);
}
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) internal {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tContract) = _getValues(tAmount);
tOwned[sender] = tOwned[sender] - tAmount;
rOwned[sender] = rOwned[sender] - rAmount;
rOwned[recipient] = rOwned[recipient] + rTransferAmount;
_contractFee(tContract);
_reflectFee(rFee);
if(tContract > 0)
{
emit Transfer(sender, address(this), tContract);
}
emit Transfer(sender, recipient, tTransferAmount);
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) internal {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tContract) = _getValues(tAmount);
tOwned[sender] = tOwned[sender] - tAmount;
rOwned[sender] = rOwned[sender] - rAmount;
tOwned[recipient] = tOwned[recipient] + tTransferAmount;
rOwned[recipient] = rOwned[recipient] + rTransferAmount;
_contractFee(tContract);
_reflectFee(rFee);
if(tContract > 0)
{
emit Transfer(sender, address(this), tContract);
}
emit Transfer(sender, recipient, tTransferAmount);
}
function swapTokensForPLS(uint256 tokenAmount) internal {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = pulseXRouter.WPLS();
_approve(address(this), address(pulseXRouter), tokenAmount);
pulseXRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
function buybackBurnABCD(uint256 PLSAmount) internal {
address[] memory path = new address[](2);
path[0] = pulseXRouter.WPLS();
path[1] = address(this);
try pulseXRouter.swapExactETHForTokensSupportingFeeOnTransferTokens{value: PLSAmount}(
0,
path,
address(burnWallet),
block.timestamp
) {} catch {
// Buyback failed, PLS stays in contract and can be rescued or used in next swap
}
}
function addLiquidityToDeadAddress(uint256 PLSAmount) internal {
uint256 contractABCDBalance = balanceOf(address(this));
uint256 totalSwappableFees = buyBurnFee + hoardFee + LPaddFee;
uint256 ABCDAmount = contractABCDBalance * LPaddFee / totalSwappableFees / 2;
if(ABCDAmount > 0 && PLSAmount > 0) {
_approve(address(this), address(pulseXRouter), ABCDAmount);
try pulseXRouter.addLiquidityETH{value: PLSAmount}(
address(this),
ABCDAmount,
0,
0,
burnWallet,
block.timestamp
) {
emit LPAdded(ABCDAmount, PLSAmount);
} catch {
emit LPAdded(0, 0);
}
}
}
function addLiquidityETH(uint256 ABCDToken) external payable {
_transfer(address(msg.sender), address(this), ABCDToken);
_approve(address(this), address(pulseXRouter), ABCDToken);
pulseXRouter.addLiquidityETH{value: msg.value}(
address(this),
ABCDToken,
0,
0,
address(msg.sender),
block.timestamp
);
}
function addLiquidity(address pair, uint256 token0Amount, uint256 token1Amount) external {
require(isliquidityPair[pair], "Liquidity pair is not correct");
address token0 = address(IPulseXPair(pair).token0());
address token1 = address(IPulseXPair(pair).token1());
uint256 token0Balance = IERC20(token0).balanceOf(address(this));
uint256 token1Balance = IERC20(token1).balanceOf(address(this));
IERC20(token0).transferFrom(address(msg.sender), address(this), token0Amount);
IERC20(token1).transferFrom(address(msg.sender), address(this), token1Amount);
uint256 token0NewBalance = (IERC20(token0).balanceOf(address(this))) - token0Balance;
uint256 token1NewBalance = (IERC20(token1).balanceOf(address(this))) - token1Balance;
IERC20(token0).approve(address(pulseXRouter), token0NewBalance);
IERC20(token1).approve(address(pulseXRouter), token1NewBalance);
pulseXRouter.addLiquidity(
address(token0),
address(token1),
token0NewBalance,
token1NewBalance,
0,
0,
address(msg.sender),
block.timestamp
);
}
function removeLiquidity(address pair, uint256 liquidity) external {
require(isliquidityPair[pair], "Liquidity pair is not correct");
address token0 = address(IPulseXPair(pair).token0());
address token1 = address(IPulseXPair(pair).token1());
IERC20(pair).transferFrom(address(msg.sender), address(this), liquidity);
IERC20(pair).approve(address(pulseXRouter), liquidity);
bool previousFeeStatus = isExcludedFromFee[address(msg.sender)];
isExcludedFromFee[address(msg.sender)] = true;
pulseXRouter.removeLiquidity(
address(token0),
address(token1),
liquidity,
0,
0,
address(msg.sender),
block.timestamp
);
isExcludedFromFee[address(msg.sender)] = previousFeeStatus;
}
function removeLiquidityETH(address pair, uint256 liquidity) external {
require(isliquidityPair[pair], "Liquidity pair is not correct");
IERC20(pair).transferFrom(address(msg.sender), address(this), liquidity);
IERC20(pair).approve(address(pulseXRouter), liquidity);
bool previousFeeStatus = isExcludedFromFee[address(msg.sender)];
isExcludedFromFee[address(msg.sender)] = true;
pulseXRouter.removeLiquidityETHSupportingFeeOnTransferTokens(
address(this),
liquidity,
0,
0,
address(msg.sender),
block.timestamp
);
isExcludedFromFee[address(msg.sender)] = previousFeeStatus;
}
function updateSwapThresholdPercent(uint256 newPercent) external onlyOwner {
require(newPercent >= 1 && newPercent <= 100, "Percent must be between 0.001% and 0.1%");
swapThresholdPercent = newPercent;
emit SwapThresholdUpdated(newPercent, getCurrentSwapThreshold());
}
function excludeFromReflection(address account) public onlyOwner() {
require(!isExcludedFromReflection[account], "Account is already excluded");
_excludeFromReflection(account);
emit AccountExcludeFromReflection(account);
}
function includeInReflection(address account) external onlyOwner() {
require(isExcludedFromReflection[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
tOwned[account] = 0;
isExcludedFromReflection[account] = false;
_excluded.pop();
break;
}
}
emit AccountIncludeInReflection(account);
}
function excludeFromFee(address account, bool status) external onlyOwner {
require(account != address(0), "Wallet address is not correct");
_excludeFromFee(account, status);
emit AccountExcludeFromFee(account, status);
}
function setHoardWallet(address newHoard) external onlyOwner {
require(newHoard != address(0), "Invalid hoard address");
hoardWallet = newHoard;
_excludeFromFee(newHoard, true);
emit HoardWalletUpdated(newHoard);
}
function updateFees(
uint256 newReflectionFee,
uint256 newBuyBurnFee,
uint256 newHoardFee,
uint256 newLPaddFee
) external onlyOwner {
require(newReflectionFee <= 200, "Reflection fee too high");
require(newBuyBurnFee <= 600, "Buy burn fee too high");
require(newHoardFee <= 200, "Hoard fee too high");
require(newLPaddFee <= 100, "LP add fee too high");
require(newReflectionFee + newBuyBurnFee + newHoardFee + newLPaddFee <= 1000, "Total fees cannot exceed 10%");
reflectionFee = newReflectionFee;
buyBurnFee = newBuyBurnFee;
hoardFee = newHoardFee;
LPaddFee = newLPaddFee;
restoreAllFee();
}
function rescuePLS(address recipient) external onlyOwner {
require(!swapping, "Swap in progress");
require(recipient != address(0), "Invalid recipient");
uint256 amount = address(this).balance;
payable(recipient).transfer(amount);
emit PLSRescued(recipient, amount);
}
function rescueToken(address token, address recipient) external onlyOwner {
require(token != address(this), "Cannot rescue ABCD");
require(recipient != address(0), "Invalid recipient");
uint256 amount = IERC20(token).balanceOf(address(this));
IERC20(token).transfer(recipient, amount);
emit TokenRescued(token, recipient, amount);
}
}