Help with deploying a contract clone

This is more of a curiosity question than anything. However, when I copy an ERC20 contract from ETHERSCAN or BSCSCAN, or copy the safemoon.sol contract from github and try to deploy it via Remix Deployer (on the correct network) on the testnet or mainnet do I create a contract successfully, but there are no tokens minted and no token tracker. When I use the import function then it works.

I guarantee this is something simple I’m missing. And yes, I understand that deploying a copied contract may contain vulnerabilities and is not best practice, and if I move forward with this project
I’ll be hiring a developer, however I just want to understand this issue.

Thank you

Hi DiamondDanny, welcome to the forums!

If you deployed SafeMoon exactly as is, you should have tokens.

When you created the contract, did you validate it?

Depending on the wallet, you will need to add the custom token to your wallet so it can reflect your balance properly.

Hi, welcome! :wave:

Yeah, just like Tsushima_Yoshiko said, If you deployed SafeMoon exactly as is, you should have tokens., so please make sure when you deploy contract, that is before you clicking the Deploy button in the Remix, you should select the correct contract to deploy rather than use the default contract.

Please send me inbox, I need hire you for service

Hi, i tryed too to clone safemoon on Remix, but when I deploy it i get an error:

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Internal JSON-RPC error. { "code": -32000, "message": "gas required exceeds allowance (30000000) or always failing transaction" }

I’m using Binance testnet, and from Remix I selected Injected Web3. What is the problem?

1 Like

To get started please follow the tutorial over at OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat

It’s a great guide to get you a dev environment set up and ready for action. After setting up your dev environment and getting things working, then you can try to deploy custom contracts.

Hey, did you ever make progress on this? I am also just experimenting.

I Deployed a copy of the safemoon contract on remix using web3 after successfully writing and deploying my own simpler contracts.

When I deploy the safemoon one, I see the deployment on bscscan but no coins are transferred. I also tried validating the contract and still no coins in the creator wallet.

Was wondering if it has anything to do with the lock functions?

1 Like

@DefiUser1234 Hi! Do you have solution for the same ?
I am in the same boat.

Could you please help me ?

@DiamondDanny Hi ! Could you tell me, How and where to use import function for the same?

Actually I’m facing same problem on BSCtestnet …

Can’t show token supply and tracker.

I get the same error when I try to deploy it on Binance Test Net. Did anyone solve this?

Hey man, have you solved this? I have try and same result … i have deploy simple contract on testnet but clone from from others it’s succesful but no tokens! @toprakmelek telegram

This can be caused by Pancake router address if you didn’t change it

I think that if you don’t see anything on bsc scan is because you are deploying the wrong contract. Just try using Remix and make sure to select the right contract here:

If you select Address, then you have made an error.

Does anyone have the PancakeSwap Router Address for BSC Testnet, if it exists? I saw an issue on their GitHub asking the team to do this but unsure if it has been done yet or not.

Did you try to google it? Or just search in the forum?

1 Like

Hi,
Add me on telegram: @DefiDeveloper555

if you need help in defi swap/token or anything related to crypto.

I did exactly this but not working

what are we the select , i saw "ownable", "safemath", ierc20, context,uniswap, all this where prefix to the name of my contract which of them should i choose ?