1

I have created my private node with the following config:

{
    "config": {
        "chainId": 65536,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    },
    "difficulty": "20000",
    "gasLimit": "210000",
    "alloc": {
    "c8Caa71C16299B40B8579742a27EE53162886040": { "balance": "1000000000" },
    "60fDF758ed3549D550A52f2044B43aadf782aA4E": { "balance": "2000000000" }
    }
}

After that import the accounts in Geth using:

web3.personal.importRawKey("7c7f89b68b7a549a45856ae569997f98c4fba8f3272e90df1cf010f093d655e6", "abcd1234")
web3.personal.importRawKey("6a684c74467fb7b1d551968bf96eee7c1638a2537631372ca8c5c88837a50e8d", "abcd1234")

(the passphrase is correct)

Get balance shows the correct value;

> eth.getBalance("0x60fDF758ed3549D550A52f2044B43aadf782aA4E")
2000000000
> eth.getBalance("0xc8Caa71C16299B40B8579742a27EE53162886040")
1000000000

When I try to import the above accounts again using Metamask with their private keys (shown above).

Metamask shows that the accounts are loose, and with 0 balance.

Can anyone explain what I had did wrongly? Thanks

  • Is metamask set to the correct network? – TC8 Mar 5 '18 at 18:58
  • Yes correctly set to my private network – s k Mar 6 '18 at 2:56
  • Answer to my own question. Metamask now changed the name to imported instead of loose. I think that makes more sense now. And 0 balance was because the amount that I entered were just too small. – s k Mar 27 '18 at 21:59
1

The Balances you allocated to the wallets are in wei and very small that's why metamask is showing it 0. Allocate multiple of 1000000000000000000(1 Eth) and it will show in metamask.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.