Open drewroberts opened 8 months ago
Here is that function in my old contract standard:
function updateSwapTokensAtAmount(uint256 newAmount)
external
onlyOwner
returns (bool)
{
require(
newAmount >= (totalSupply() * 1) / 100000,
"ERC20: Swap amount cannot be lower than 0.001% total supply."
);
require(
newAmount <= (totalSupply() * 5) / 1000,
"ERC20: Swap amount cannot be higher than 0.5% total supply."
);
swapTokensAtAmount = newAmount;
return true;
}
This function allows contract owner to update the threshold that the tax swap sells tokens to receive ETH and distribute to tax wallets.