Hey can anyone help me with this?
Let's say total supply is 1 million token, then How to write contract for 30% Burned 5% Distributed to holders 2.5% Added to liquidity 2.5% to dev wallet 5% of the initial token supply reserved in dev wallet. It is on Binance smart chain.
May 16, 2021, 4:29 PM
I am here to learn that aswell
May 16, 2021, 4:29 PM
how to make a safemoon clone?
fork/clone safemoon
May 16, 2021, 4:55 PM
but i think it does not have functions for Burn, Holder Distribution and Liquidity Pool
May 16, 2021, 5:51 PM
it does
May 16, 2021, 6:06 PM
the Burn function is Manual. At first glance there doesn’t seem to be any burn functionality. I searched for the term “burn”, I looked for a Transfer event with to being the zero-address, directly and maybe indirectly, and there doesn’t seem to be any burning going on.
Another indication is that totalSupply() returns _tTotal, and apart from the initial assignment, the value of _tTotal is never reassigned.
Finally, all transfer functions internally call _transfer(), and _transfer() requires to to be non-zero… so this excludes burning tokens by requesting them to be transferred to the zero-address.
Since balanceOf() seems to be calculated with a formula, one last check to make, even out of curiosity, would be to ensure/reason that if in theory one were to sum balanceOf() over all possible 2160 addresses, the sum would equal totalSupply. If this can be proven to be the case, then the contract 100% does not burn tokens. If on the other hand it would turn out that, say, the implementation is buggy and the balances do not add up, then that would mean that tokens are being effectively “burnt”, or lost rather… but then that would also mean that the contract is not ERC-20 compliant.
Another indication is that totalSupply() returns _tTotal, and apart from the initial assignment, the value of _tTotal is never reassigned.
Finally, all transfer functions internally call _transfer(), and _transfer() requires to to be non-zero… so this excludes burning tokens by requesting them to be transferred to the zero-address.
Since balanceOf() seems to be calculated with a formula, one last check to make, even out of curiosity, would be to ensure/reason that if in theory one were to sum balanceOf() over all possible 2160 addresses, the sum would equal totalSupply. If this can be proven to be the case, then the contract 100% does not burn tokens. If on the other hand it would turn out that, say, the implementation is buggy and the balances do not add up, then that would mean that tokens are being effectively “burnt”, or lost rather… but then that would also mean that the contract is not ERC-20 compliant.
May 16, 2021, 6:27 PM
no lol
first link
0x10ED43C718714eb63d5aA57B78B54704E256024E
magic
magic
they manually burn
May 16, 2021, 6:49 PM
I am compiling and deploying a a token on BSC but I can't see any ABI in info as if they are invisible can anyone point out why
May 16, 2021, 6:52 PM
shit
May 16, 2021, 7:18 PM
Bsc?
I think I saw you
In openzeppelin
//New Pancakeswap router version?
//No problem, just change it!
function setRouterAddress(address newRouter) public onlyOwner() {
IUniswapV2Router02 _newPancakeRouter = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_newPancakeRouter.factory()).createPair(address(this), _newPancakeRouter.WETH());
uniswapV2Router = _newPancakeRouter;
}
//No problem, just change it!
function setRouterAddress(address newRouter) public onlyOwner() {
IUniswapV2Router02 _newPancakeRouter = IUniswapV2Router02(newRouter);
uniswapV2Pair = IUniswapV2Factory(_newPancakeRouter.factory()).createPair(address(this), _newPancakeRouter.WETH());
uniswapV2Router = _newPancakeRouter;
}
This work?😂
May 16, 2021, 7:26 PM
Well I think logic is correct
May 16, 2021, 7:40 PM
What about burnable token can we add them to pancakeswap v2 it seems I can't😂
Cointool asked much for such basic function, I still prefer the solidity way adding more functions with less fee.😂
May 16, 2021, 7:49 PM
why not? I made tons of this
May 16, 2021, 7:50 PM
will learn more from you then
Fixing the router code wil save our project after another migration of router to v3+😂
May 16, 2021, 8:28 PM
yes this is my function aim
May 16, 2021, 9:05 PM
Is he here the openzeppelin smart guy who answered my questions😆
May 16, 2021, 9:06 PM
What?😂
May 16, 2021, 9:07 PM
Can you share it when you mastered that😆
May 16, 2021, 9:12 PM
well just call the function and see what happens
you can test using pancake v1 e v2
May 16, 2021, 9:14 PM
Pancake v1 is abandoned😂
May 16, 2021, 9:28 PM
yes is the only way you can test the function I think
May 16, 2021, 9:29 PM
Yep this should work
May 16, 2021, 9:31 PM
niceeeee
I want credits😂😂😂😂
May 16, 2021, 9:35 PM
Saw that code in openzeppelin post tag of freezy😂
May 16, 2021, 9:43 PM
good job
May 16, 2021, 9:44 PM