Execution revert error when deploying Safemoon fork on Rinkeby with Remix

I’m trying to deploy a Safemoon fork on Rinkeby but it kept getting reverted without giving me any log message.

This is all I get: false Transaction mined but execution failed

How do I get the log to identify the bugger. Remix debugger doesn’t seem to work for this contract

1 Like

Hi @testingneverstop welcome to the forums.

It sounds to me as if you’re trying to force a deployment of incorrectly compiled contracts somehow and the code is wrong so that throws a big error on the network and just reverts it to nothing.

If the remix debugging doesn’t work, then there might be a problem with your dev environment.

For development, I would really start with the basics and build up a working dev environment.

Follow the first hardhat tutorial https://hardhat.org/tutorial/

Then follow this OZ tutorial OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat

If you follow this with an IDE, it will get you a working dev environment that you can troubleshoot and debug in all day long.

If you’ve already followed these tutorials and believe you have a working dev environment (but not for this contract) then paste the code and I can look to see what is going wrong.

There could be a constructor issue, or an import issue.

I managed to make the debugger work.
This is what I got
"The called function should be payable if you send value and the value you send should be less than your current balance"

This seems to be the problem function

constructor () internal {
   address msgSender = _msgSender();
   _owner = msgSender;
   emit OwnershipTransferred(address(0), msgSender);

}
I tried to add payable to it but it doesn't work as well.

1 Like

It’s using pancakeswap Router mainnet address, you can find it in line 758,

IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F);

You should change this address to Router address in BSC testnet,

#PancakeSwap on BSC testnet:

Factory: 0x6725F303b657a9451d8BA641348b6761A6CC7a17

Router: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1

2 Likes