I keep getting this error message when trying to deploy a Safemoon fork. There's no other information provided.

Code is here


I'm using remix with metamask

I also tried to deploy this on BSC test net and got the same error message

  • maybe this contract depends on another contract and you need somehow to deploy it and change the address. just a guess I have no idea. Look at this line.. it does have a hardcoded address IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F);
    – Majd TL
    Commented Apr 23, 2021 at 7:41

1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.