Help! I don't know whats wrong with my code but

Using solidity 0.6.12 to code, pretty new to coding here.
Link to code -

Selected “thebrocode” token to diploy, compiled in different EVM, doesnt work. This is the latest error:

status false Transaction mined but execution failed
transaction hash 0xd0e200b54f0ec1360957807ed3524e453dc328895730e1b38784e3f7aa84f700 Copy value to clipboard
from 0x242e9Eb81911c56E4271835a983088788C61556E Copy value to clipboard
to TheBroCode.(constructor) Copy value to clipboard
gas 3000000 gas Copy value to clipboard
transaction cost 694728 gas Copy value to clipboard
hash 0xd0e200b54f0ec1360957807ed3524e453dc328895730e1b38784e3f7aa84f700 Copy value to clipboard
input 0x60c…c0033 Copy value to clipboard
decoded input {} Copy value to clipboard
decoded output - Copy value to clipboard
logs Copy value to clipboard Copy value to clipboard
value 0 wei

Would appreciate if someone can help please!

Can you explain when you get this error? WHat are you trying to do? What function are you calling?

From the code I understand that you are copying Safemoon right?
First thing to do is to change Router address beacuse the one you are using is Router V1 and Pancakeswap migrated to Router v2

when you deploy try setting 1 wei

Same error code popped up “Internal JSON-RPC error. { “code”: -32000, “message”: “execution reverted” }”

can you show us the deploy page?

How many bnb do you have in your wallet?
Check also that you are on mainnet
From the image I think that you are on testnet

I’m on testnet now to check if I get a X or green tick and I keep getting red X. I’m not using real money till I can deploy it successfully on testnet.

P.s. I’ve already tried to deploy 4 times with real BNB and they all failed. I think it has something to do with gas

If you are on testnet you must use Router testnet address

Router testnet? I’m on BSC testnet

I just looked it up, its a crosschain testnet. I have used BSC and eth, both have same errors

yes but you must use Pancake Router address for testnet. It is different from mainnet

But I have the same results if I use BNB smart chain though. I tried googling it and everywhere is just asking me to setup bsc testnet, which is what I’m using. Can you link the setup please and I’ll try it?

No I am saying that in your contract is harcoded pancakeswap router address. If you are testing on bsc testnet you have to use Pancakeswap router address for testnet

I have tried it from mainnet it still doesnt work :frowning:
creation of TheBroCode errored: Error: [ethjs-query] while formatting outputs from RPC ‘{“value”:{“code”:-32603,“data”:{“code”:-32000,“message”:“intrinsic gas too low”}}}’

Changed the gas up to 5

I think on the BSC-Testnet, the gas should be 10.

I tried 1000 but it still doesnt work :frowning:

No, I think the gas price on the BSC-Testnet is a fixed value. just 10 gWei.

Yes I tried 10 as well, same error :frowning: