$ ape --version
0.4.5
$ ape plugins list
ganache 0.4.0a1
Python Version: 3.9.7
OS: osx 12.3.1
What went wrong?
$ cat ape-config.yaml
test:
mnemonic: test test test test test test test test test test test junk
number_of_accounts: 5
Using ape console by ape console --network ethereum:local:ganache --verbosity DEBUG.
the mnemonic ganache used to generate test_account is not what's configured in ape-config.yaml, below is the debug info when console starts:
DEBUG: HD Wallet
DEBUG: ==================
DEBUG: Mnemonic: night crater logic spread endless aim vehicle bulb draw humble require equal
DEBUG: Base HD Path: m/44'/60'/0'/0/{account_index}
accounts.test_accounts generate from ape-config.yaml has no balance
In [1]: accounts.test_accounts[0]
Out[1]: <TestAccount 0x1e59ce931B4CFea3fe4B875411e280e173cB7A9C>
In [2]: accounts.test_accounts[0].balance
Out[2]: 0
How can it be fixed?
These two problems could be fixed by changing the ganache command line args, now it uses --wallet.seed {MNEMONIC}, which is wrong.
The correct args should be --wallet.mnemonic {MNEMONIC} --wallet.hdPath m/44'/60'/0'
Set --wallet.hdPath m/44'/60'/0' is necessary, because ganache's default is m/44'/60'/0'/0, which is different from eth-tester and ape-foundry
Environment information
ape
and plugin versions:What went wrong?
Using ape console by
ape console --network ethereum:local:ganache --verbosity DEBUG
.ape-config.yaml
, below is the debug info when console starts:accounts.test_accounts
generate fromape-config.yaml
has no balanceHow can it be fixed?
These two problems could be fixed by changing the ganache command line args, now it uses
--wallet.seed {MNEMONIC}
, which is wrong. The correct args should be--wallet.mnemonic {MNEMONIC} --wallet.hdPath m/44'/60'/0'
Set--wallet.hdPath m/44'/60'/0'
is necessary, because ganache's default ism/44'/60'/0'/0
, which is different from eth-tester and ape-foundry