Hey theređź‘‹ i have question about erc20 contract deployment
When i try to create UniswapV2Pair inside of constructor with createPair() and deploy it to Ethereum Mainnet it occurs the error "execution reverted"
This issue doesn't arise when i deploy it to Goerli or BSC for example.
Also i'm sure that i used correct router address for Uniswap: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
When I delete or comment the line with the creation of a pair - the code is executed correctly, so the problem is in the creation of a pair...
Has anyone experienced this or knows a solution?
May 21, 2023, 6:39 AM
Check constructor arguments: If the UniswapV2Pair contract constructor requires any specific arguments,
Double-check the router address: Ensure that the router address you are using is correct and corresponds to the Uniswap V2 router contract on the Ethereum Mainnet. Any mistake in the address can cause the contract creation to fail.
Also check if you have enough gas fee
Double-check the router address: Ensure that the router address you are using is correct and corresponds to the Uniswap V2 router contract on the Ethereum Mainnet. Any mistake in the address can cause the contract creation to fail.
Also check if you have enough gas fee
May 21, 2023, 6:43 AM
I switched to a wallet with more ETH and the error message disappeared, although the previous one had enough funds for gas... but now seems everything works fine, thanks a lot
May 21, 2023, 7:01 AM
You are welcome
Audit the code to be certain it is what you want
Or deploy or testnet to test before deploying on mainnet in order to to lose gas fee
Or deploy or testnet to test before deploying on mainnet in order to to lose gas fee
May 21, 2023, 7:03 AM
The fact is that the code was successfully deployed and used on other blockchains, including Goerli. But the problem arose only at the stage of deployment to the Ethereum Mainnet. However, thanks for adviceđź’Ş
May 21, 2023, 7:06 AM
Yh I understand you are totally correct am just saying in order to check total supply nd the rest of the requirements on the token
Since u have done that you are good to go
May 21, 2023, 7:08 AM