Hi everyone,
I need some help with the SAFEMOON contract. On contract deployment, all of the tokens are sent to the contract owner. How can I change the number of tokens that are sent to the contract owner on deployment?
I tried changing the value in the Transfer
event. On bscscan testnet, it shows that 666 tokens were supposedly transferred but when I check the metamask wallet, the total supply was transferred to the wallet.
Here's the transaction: https://testnet.bscscan.com/tx/0xc52d50a02d56934054026b62078ed1147f37ea2c363bfe70a5109260f47f2e59
constructor () public {
_rOwned[_msgSender()] = _rTotal;
//test address: 0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3
//production address: 0x10ED43C718714eb63d5aA57B78B54704E256024E
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
emit Transfer(address(0), _msgSender(), 6660000);
}
How can I change the number of tokens that are sent to the contract owner on deployment?