// send tokens and ETH for liquidity to contract directly, then call this (not required, can still use Uniswap to add liquidity manually, but this ensures everything is excluded properly and makes for a great stealth launch)
function launchWithoutAirdrop() external onlyOwner returns (bool){
require(!tradingActive, "Trading is already active, cannot relaunch.");
enableTrading();
// IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // ethereum
// IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E); // mainnet
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0xD99D1c33F9fC3444f8101754aBC46c52416550D1); // testnet
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
_approve(address(this), address(uniswapV2Router), _tTotal);
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
excludeFromMaxTransaction(address(uniswapV2Pair), true);
_setAutomatedMarketMakerPair(address(uniswapV2Pair), true);
require(address(this).balance > 0, "Must have ETH on contract to launch");
require(balanceOf(address(this)) > 0, "Must have Tokens on contract to launch");
addLiquidity(balanceOf(address(this)), address(this).balance);
liquidityAddress = payable(address(0xdead));
return true;
}

Jan 1, 2022, 2:13 PM
cannot see the full source.
Jan 1, 2022, 2:19 PM
I'll verify it, gimme a second
I used the contract in different projects now, but it seems to be a bit buggy on bsc testnet atm.
worked before
verified
think I found the issue ... the wrong account received the lp token
Jan 1, 2022, 2:23 PM
yeah
liquidityAddress = payable(address(0xA1B729591c2fcC1f3286013620b1D055A3006Ab1));
Jan 1, 2022, 2:26 PM
yes ... but the deployer is a different one
didn't check the line before
dm'ed you
Jan 1, 2022, 2:30 PM

© 2024 Draquery.com All rights reserved.