1

When I run the make anvil command in terminal it provide me a bunch of accounts with test accounts. I am not able to import tokens from test account to my metamask account

1 Answer 1

2

In order to add the test token deployed on Anvil chain. You need to perform the following steps:

  1. Make sure the Anvil node is running locally.

    Anvil node

  2. Add Anvil network as a custom network manually to your MetaMask.

    Adding network manually

  3. Make sure that the entered details exactly match with the configuration of the Anvil node which is running locally.

    Anvil details

  4. You can get the private key of the account(s) from the console of the running Anvil node.

    Anvil account Private Key

  5. Now, you've to import account in your MetaMask using the private key of the first account (i.e., the default account) of the Anvil chain.

    Import account

  6. After, the account is imported, it'll be shown like this:

    imported account

  7. Then, you've to import token in your MetaMask by clicking on Import tokens and entering the token contract address in the field.

    import tokens

    Token contract address

1
  • 1
    Detail answer. The most important thing is the step #1 - ensure the Anvil node is running locally :D Commented Jul 6, 2024 at 3:15

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.