Why can I not deploy this BEP20 token with Remix?

840 Views Asked by At

I am trying to deploy this contract https://github.com/juustesout/EtherRanger/blob/main/EtherRanger.sol to BSC Testnet, and I get this error in return :

"revert The transaction has been reverted to the initial state. Note: The called function should be payable if you send value and the value you send should be less than your current balance. Debug the transaction to get more information. "

this is an example of a failed transaction on BSC Testnet https://testnet.bscscan.com/tx/0x5cbe0adcf6a522d89c974cadf70358dd9d79476988b4fb829fc1cc86c88aff0c

I tried forking multiple contracts from BSC, working tokens, but I always get the same error. I tried adding 'payable' to the constructor function, as other StackOverflow posts suggest, but no go. I have been reading any number of posts through Google Search, but I am getting nowhere.

The contracts compile flawless, no errors, no warnings, but they just won't deploy.

Could someone check if they can deploy this contract on BSC Testnet ? It may be a setting on my Remix or something, I am at a loss, I cannot tell where the error comes from.

2

There are 2 best solutions below

1
On

I don’t know anything about this contract but I guess the hardcoded addresses for the IBEP20 and others are the problem. You need to deploy these contracts too and then pass their addresses to the interface addresses in your constructor.

0
On

But to connect to the BSC test network, you need to find the drop-down menu with a list of networks at the top of the MetaMask

https://domhtml.ru/en/sozdanie-sobstvennyh-tokenov-standarta-bep-20-v-seti-binance-smart-chain-bsc-pri-pomoshhi-remix-ide/