Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hbars do not show in metamask with hedera-local-node #309

Closed
mgarbs opened this issue Jul 7, 2022 · 2 comments
Closed

hbars do not show in metamask with hedera-local-node #309

mgarbs opened this issue Jul 7, 2022 · 2 comments
Assignees
Labels
bug Something isn't working limechain P2 process Build, test and deployment-process related tasks
Milestone

Comments

@mgarbs
Copy link

mgarbs commented Jul 7, 2022

Description

What happened: Metamask wallet shows 0 hbars

Expected to see 9.60581137 ℏ in metamsk after creating and importing account

Steps to reproduce

NOTE: Using macOS w/ M1 chipset

  1. Spin up hedera-local-node
  2. Add Hedera Local Network to Metamask
    image
  3. Create an aliased account with account-alias-ecdsa.js
    • .env file looks like this:
HEDERA_NETWORK={"127.0.0.1:50211":"0.0.3"}
OPERATOR_ID=0.0.2
OPERATOR_KEY=302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137
CHAIN_ID=0x12a
MIRROR_NODE_URL=http://127.0.0.1:5551
LOCAL_NODE=true
SERVER_PORT=7546
E2E_RELAY_HOST=http://127.0.0.1:7546
  1. Import an account into metamask using the raw private key from the console output of step 2
  2. See a zero balance (should see 9.60581137 ℏ)
    image

Additional context

Created account exists in the mirror node
image

No response

Hedera network

other

Version

v1.0.3

Operating system

macOS

@mgarbs mgarbs added the bug Something isn't working label Jul 7, 2022
@Nana-EC Nana-EC added P1 process Build, test and deployment-process related tasks labels Jul 8, 2022
@Nana-EC Nana-EC added this to the 0.4.0 milestone Jul 8, 2022
@Nana-EC Nana-EC added P2 limechain and removed P1 labels Jul 8, 2022
@natanasow
Copy link
Collaborator

@mgarbs

Hi, there are several types of accounts in the hedera ecosystem:

  • ECDSA
  • Alias with ECDSA
  • ED25519
  • Contract

Only Alias with ECDSA can be used on-the-fly in Metamask.

We updated the hedera-local startup script and now it's creating all of the 3 types of accounts. You can test it by pulling the last version from main branch. It's not released in npm yet, so you have to run the hedera-local via cloning the repo.

The generated accounts list should look like this 👇

|------------------------------------------------------------------------------------------|
|------------------------------| Accounts list (ECDSA keys) |------------------------------|
|    id    |                            private key                             |  balance |
|------------------------------------------------------------------------------------------|
| 0.0.1051 - 0x7f109a9e3b0d8ecfba9cc23a3614433ce0fa7ddcc80f2a8f10b222179a5a80d6 - 100000 ℏ |
| 0.0.1052 - 0x6ec1f2e7d126a74a1d2ff9e1c5d90b92378c725e506651ff8bb8616a5c724628 - 100000 ℏ |
| 0.0.1053 - 0xb4d7f7e82f61d81c95985771b8abf518f9328d019c36849d4214b5f995d13814 - 100000 ℏ |
|------------------------------------------------------------------------------------------|

|--------------------------------------------------------------------------------------------------------------------------------------|
|--------------------------------------------------| Accounts list (Alias ECDSA keys) |------------------------------------------------|
|    id    |                  address                   |                             private key                            | balance |
|--------------------------------------------------------------------------------------------------------------------------------------|
| 0.0.1045 - 0x67D8d32E9Bf1a9968a5ff53B87d777Aa8EBBEe69 - 0x105d050185ccb907fba04dd92d8de9e32c18305e097ab41dadda21489a211524 - 10000 ℏ |
| 0.0.1046 - 0x05FbA803Be258049A27B820088bab1cAD2058871 - 0x2e1d968b041d84dd120a5860cee60cd83f9374ef527ca86996317ada3d0d03e7 - 10000 ℏ |
| 0.0.1047 - 0x927E41Ff8307835A1C081e0d7fD250625F2D4D0E - 0x45a5a7108a18dd5013cf2d5857a28144beadc9c70b3bdbd914e38df4e804b8d8 - 10000 ℏ |
|--------------------------------------------------------------------------------------------------------------------------------------|

|------------------------------------------------------------------------------------------|
|-----------------------------| Accounts list (ED25519 keys) |-----------------------------|
|    id    |                            private key                             |  balance |
|------------------------------------------------------------------------------------------|
| 0.0.1054 - 0xa608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4 - 100000 ℏ |
| 0.0.1055 - 0xbbd0894de0b4ecfa862e963825c5448d2d17f807a16869526bff29185747acdb - 100000 ℏ |
| 0.0.1056 - 0x8fd50f886a2e7ed499e7686efd1436b50aa9b64b26e4ecc4e58ca26e6257b67d - 100000 ℏ |
|------------------------------------------------------------------------------------------|

@mgarbs
Copy link
Author

mgarbs commented Jul 14, 2022

Thank you for the explanation @natanasow !

@mgarbs mgarbs closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working limechain P2 process Build, test and deployment-process related tasks
Projects
None yet
Development

No branches or pull requests

3 participants