Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Better documentation of default_balance_ether option needed #468

Open
0xGabi opened this issue Aug 18, 2019 · 9 comments
Open

Better documentation of default_balance_ether option needed #468

0xGabi opened this issue Aug 18, 2019 · 9 comments

Comments

@0xGabi
Copy link

0xGabi commented Aug 18, 2019

Expected Behavior

It should set account balance to new default_balance_ether option.

Current Behavior

It sets account balance to 100 ETH no matter the default_balance_ether option.

Possible Solution

Steps to Reproduce (for bugs)

  1. Install with npm i -g @aragon/aragen
  2. Ran aragen start --default_balance_ether <balance>
  3. Check on a provider that you still have default 100 ETH balance

Context

I would like to initialize the account with a configurable amount of ETH.

Your Environment

  • Version used: 2.7.0
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1): node LTS
  • Server type and version:
  • Operating System and version: MacOS 10.15 Beta (19A526h)
  • Link to your project: here
@davidmurdoch
Copy link
Member

The docs are a bit confusing here (we are already working on updating them to make them better). The CLI option you are looking for is --defaultBalanceEther. Try that and let me know if you still have a problem. Sorry for the confusion!

@0xGabi
Copy link
Author

0xGabi commented Aug 19, 2019

Hi David thanks for your answer. I actually double check with several combination of defaultBalanceEther, e and default_balance_ether and is still not working.

I think I have done the same you are doing here. You can look the specific line of my core here, thanks.

Nevertheless I tried using ganache-cli with --defaultBalanceEther and work as expected 🤔

@davidmurdoch
Copy link
Member

Are you suggesting this is a bug in the way aragen reads in its command line args?

@0xGabi
Copy link
Author

0xGabi commented Aug 22, 2019

I'm not sure if I understood your question correctly, I think the answer is no, cause I tried to initialize ganache-core server with a a hardcoded value and it also set accounts with 100 ETH

@davidmurdoch
Copy link
Member

Hm. I've tested myself and this does work:

    const options = {
      default_balance_ether: 1.23456
    };
    const provider = Ganache.provider(options);

@0xGabi
Copy link
Author

0xGabi commented Aug 22, 2019

Great, I should double check the code, thanks for you time

@davidmurdoch
Copy link
Member

Let me know if you figure out the issue! I'd love to clarify our documentation so this doesn't happen to anyone else in the future.

@0xGabi
Copy link
Author

0xGabi commented Sep 10, 2019

Hey @davidmurdoch I think I found what was going on. In our case we have a chain snapshot and the same mnemonic was used to generate that snapshot so the accounts were already allocated default amount of ETH when the snapshot was created. I wonder in case of passing a db_path how much of the configurations are able to be modify, for example including a new mnemonic with 200ETH as default is something possible?

Thanks

@davidmurdoch
Copy link
Member

Reopening this issue so we can clarify our documentation around how the flags interoperate.

@davidmurdoch davidmurdoch reopened this Sep 10, 2019
@haltman-at haltman-at changed the title default_balance_ether option have no effects when creating ganache server Better documentation of default_balance_ether option needed Mar 10, 2021
@davidmurdoch davidmurdoch moved this to Inbox in Ganache Jul 19, 2022
@davidmurdoch davidmurdoch moved this from Inbox to Backlog in Ganache Jul 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Backlog
Development

No branches or pull requests

3 participants