Hello, im trying to deploy a forked shitcoin on BSC with truffle. When the constructor is called, it create a pair on PCS :

// Create a uniswap pair for this new token
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());

The error is raised in the PancakeFactory contract line 487 : https://dashboard.tenderly.co/tx/bsc/0x5adc26de91223177573e3ca429ec00279c0f6d43e6f4b7a5f9f83b1dff9f31a4
Does anybody already faced this issu ?

Aug 12, 2021, 3:16 PM
Which router address did you passed?
Aug 12, 2021, 3:45 PM
Hello thanks for your help : 0x10ED43C718714eb63d5aA57B78B54704E256024E
Aug 12, 2021, 3:52 PM
I see it used 99% of gas you provided, probably it run out of gas during execution
Retry with a higher gas limit
Aug 12, 2021, 3:56 PM
You are right? I feel stupid I didn't noticed by myself :D
Aug 12, 2021, 3:57 PM
😁
Aug 12, 2021, 3:58 PM
Got rekt again lul : https://bscscan.com/tx/0x00e145afe5d8805cd852aa02e9801e05e2919366b39a708b65efb3e2ae45a3b6
With truffle telling me "The contract code couldn't be stored, please check your gas limit.."
Im forking this : https://bscscan.com/tx/0xaeef4336849848b13f6563bb0c15e36e342ce818b09c832689ad8db22d7b72fc I changed nothing but the name in the contract, I don't understand why it took more gas then fail
Aug 12, 2021, 4:14 PM
Did it fail at the same instruction as before?
Aug 12, 2021, 4:16 PM
Nope : https://dashboard.tenderly.co/tx/bsc/0x00e145afe5d8805cd852aa02e9801e05e2919366b39a708b65efb3e2ae45a3b6
Aug 12, 2021, 4:17 PM
Did you enable optimization?
Not in the way you have in mind
You can only get tokens, and then eventually sell those
Aug 12, 2021, 4:19 PM
Thanks!
Aug 12, 2021, 4:19 PM
I didn't gonna look at the truffle doc, thx again mate
Aug 12, 2021, 4:19 PM
but what I say is in the sell/buy of a specific token (my own)
Aug 12, 2021, 4:20 PM
Yw
It's the same, you can't get bnb directly from the sell/buy
Those are bnb that stay on pcs and never touch reach your token
Aug 12, 2021, 4:21 PM
Oh thanks 😃
Aug 12, 2021, 4:23 PM
I can help you
Aug 13, 2021, 3:02 AM

© 2024 Draquery.com All rights reserved.