0

The truffle compile and migrate work fine, but when I add the config file to the ganache, it makes all the account balances as 0.00 ETH.

I am following this repo https://github.com/SuyashMore/SwasthyaChain/tree/master

enter image description here

I'm really new to this so I'm not sure if I need to include any thing else.

Thank you!

1
  • What do you mean by "when I add the config file to the ganache"? Can you share the truffle config file used?
    – Ismael
    Commented Oct 4, 2023 at 6:37

1 Answer 1

0

When you follow the tutorial and change the settings in your Ganache workspace & chain instance, including the "Autogenerate HD Mnemonic", I assume you hit the Restart button. The restart behaviour is buggy, see Ganache UI Issue 1275.

If you want to use that tutorial, just don't put the "Autogenerate HD Mnemonic" switch on. It's not crucial to the tutorial. All it's supposed to do is autogenerate the seed phrase, from which the private keys and eventually the public addresses are generated. And even I am not sure if it's working properly, see related Ganache UI Issue 4075.

You are not supposed to use those generated accounts on a real network anyway, so skipping that option is fine.

Lastly, since you mentioned you are new to this, you may want to follow a tutorial with some other tooling/framework: eg Hardhat. The reason is that Truffle is discontinued. You might be better off starting with a tool that's being developed & maintained.

1
  • Ohh that makes sense, it worked for me after I turned off Autogenerate, I will look into HardHat then Commented Oct 24, 2023 at 3:02

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.