On Local Network
This guide shows you how to deploy an Avalanche L1 to a local Avalanche network.
This how-to guide focuses on taking an already created Avalanche L1 configuration and deploying it to a local Avalanche network.
Prerequisites
Deploying Avalanche L1s Locally
In the following commands, make sure to substitute the name of your Avalanche L1 configuration for <blockchainName>
.
To deploy your Avalanche L1, run:
avalanche blockchain deploy <blockchainName>
and select Local Network
to deploy on. Alternatively, you can bypass this prompt by providing the --local
flag. For example:
avalanche blockchain deploy <blockchainName> --local
The command may take a couple minutes to run.
Note: If you run bash
on your shell and are running Avalanche-CLI on ARM64 on Mac, you will require Rosetta 2 to be able to deploy Avalanche L1s locally. You can download Rosetta 2 using softwareupdate --install-rosetta
.
Results
If all works as expected, the command output should look something like this:
> avalanche blockchain deploy myblockchain
✔ Local Network
Deploying [myblockchain] to Local Network
AvalancheGo path: /Users/felipe.madero/.avalanche-cli/bin/avalanchego/avalanchego-v1.13.0/avalanchego
Booting Network. Wait until healthy...
Node logs directory: /Users/felipe.madero/.avalanche-cli/runs/network_20250410_104205/<NodeID>/logs
Network ready to use.
Using [P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p] to be set as a change owner for leftover AVAX
AvalancheGo path: /Users/felipe.madero/.avalanche-cli/bin/avalanchego/avalanchego-v1.13.0/avalanchego
✓ Local cluster myblockchain-local-node-local-network not found. Creating...
Starting local avalanchego node using root: /Users/felipe.madero/.avalanche-cli/local/myblockchain-local-node-local-network ...
✓ Booting Network. Wait until healthy...
✓ Avalanchego started and ready to use from /Users/felipe.madero/.avalanche-cli/local/myblockchain-local-node-local-network
Node logs directory: /Users/felipe.madero/.avalanche-cli/local/myblockchain-local-node-local-network/<NodeID>/logs
Network ready to use.
URI: http://127.0.0.1:60172
NodeID: NodeID-NuQc8BQ8mV9TVksgMtpyc57VnWzU2J6aN
Your blockchain control keys: [P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p]
Your blockchain auth keys for chain creation: [P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p]
CreateSubnetTx fee: 0.000010278 AVAX
Blockchain has been created with ID: 2W9boARgCWL25z6pMFNtkCfNA5v28VGg9PmBgUJfuKndEdhrvw
Now creating blockchain...
CreateChainTx fee: 0.000129564 AVAX
+--------------------------------------------------------------------+
| DEPLOYMENT RESULTS |
+---------------+----------------------------------------------------+
| Chain Name | myblockchain |
+---------------+----------------------------------------------------+
| Subnet ID | 2W9boARgCWL25z6pMFNtkCfNA5v28VGg9PmBgUJfuKndEdhrvw |
+---------------+----------------------------------------------------+
| VM ID | qDNV9vtxZYYNqm7TN1mYBuaaknLdefDbFK8bFmMLTJQJKaWjV |
+---------------+----------------------------------------------------+
| Blockchain ID | Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y |
+---------------+ |
| P-Chain TXID | |
+---------------+----------------------------------------------------+
Now calling ConvertSubnetToL1Tx...
ConvertSubnetToL1Tx fee: 0.000036992 AVAX
ConvertSubnetToL1Tx ID: 2d2EE7AorEhfKLBtnDGnAtcDYMGfPbWnHYDpNDm3SopYg6VtpV
Waiting for the Subnet to be converted into a sovereign L1 ... 100% [===============]
Validator Manager Protocol: ACP99
Restarting node NodeID-NuQc8BQ8mV9TVksgMtpyc57VnWzU2J6aN to track newly deployed subnet/s
Waiting for blockchain Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y to be bootstrapped
✓ Local Network successfully tracking myblockchain
✓ Checking if node is healthy...
✓ Node is healthy after 0 seconds
Initializing Proof of Authority Validator Manager contract on blockchain myblockchain ...
✓ Proof of Authority Validator Manager contract successfully initialized on blockchain myblockchain
Your L1 is ready for on-chain interactions.
RPC Endpoint: http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc
ICM Messenger successfully deployed to myblockchain (0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf)
ICM Registry successfully deployed to myblockchain (0xEc7018552DC7E197Af85f157515f5976b1A15B12)
ICM Messenger successfully deployed to c-chain (0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf)
ICM Registry successfully deployed to c-chain (0x17aB05351fC94a1a67Bf3f56DdbB941aE6c63E25)
✓ ICM is successfully deployed
Generating relayer config file at /Users/felipe.madero/.avalanche-cli/runs/network_20250410_104205/icm-relayer-config.json
Relayer version icm-relayer-v1.6.2
Executing Relayer
✓ Relayer is successfully deployed
+--------------------------------------------------------------------------------------------------------------------------------+
| MYBLOCKCHAIN |
+---------------+----------------------------------------------------------------------------------------------------------------+
| Name | myblockchain |
+---------------+----------------------------------------------------------------------------------------------------------------+
| VM ID | qDNV9vtxZYYNqm7TN1mYBuaaknLdefDbFK8bFmMLTJQJKaWjV |
+---------------+----------------------------------------------------------------------------------------------------------------+
| VM Version | v0.7.3 |
+---------------+----------------------------------------------------------------------------------------------------------------+
| Validation | Proof Of Authority |
+---------------+--------------------------+-------------------------------------------------------------------------------------+
| Local Network | ChainID | 888 |
| +--------------------------+-------------------------------------------------------------------------------------+
| | SubnetID | 2W9boARgCWL25z6pMFNtkCfNA5v28VGg9PmBgUJfuKndEdhrvw |
| +--------------------------+-------------------------------------------------------------------------------------+
| | Owners (Threhold=1) | P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p |
| +--------------------------+-------------------------------------------------------------------------------------+
| | BlockchainID (CB58) | Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y |
| +--------------------------+-------------------------------------------------------------------------------------+
| | BlockchainID (HEX) | 0x48644613a5ef255fa171bf4773df668b57ea0ea9593df8927a6d9f32376a9c6f |
| +--------------------------+-------------------------------------------------------------------------------------+
| | RPC Endpoint | http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc |
+---------------+--------------------------+-------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------+
| ICM |
+---------------+-----------------------+--------------------------------------------+
| Local Network | ICM Messenger Address | 0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf |
| +-----------------------+--------------------------------------------+
| | ICM Registry Address | 0xEc7018552DC7E197Af85f157515f5976b1A15B12 |
+---------------+-----------------------+--------------------------------------------+
+--------------------------+
| TOKEN |
+--------------+-----------+
| Token Name | TST Token |
+--------------+-----------+
| Token Symbol | TST |
+--------------+-----------+
+---------------------------------------------------------------------------------------------------------------------------------------+
| INITIAL TOKEN ALLOCATION |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
| DESCRIPTION | ADDRESS AND PRIVATE KEY | AMOUNT (TST) | AMOUNT (WEI) |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
| Main funded account | 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC | 1000000 | 1000000000000000000000000 |
| ewoq | 56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027 | | |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
| Used by ICM | 0xf34408C05e3B339B1c89d15163d4B9D96845597A | 600 | 600000000000000000000 |
| cli-teleporter-deployer | 30d57c7b6e7e393e2e4ce8166768b497cc37930361a15b1c647d6e665d88afff | | |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
+----------------------------------------------------------------------------------------------------------------------------------+
| SMART CONTRACTS |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| DESCRIPTION | ADDRESS | DEPLOYER |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| Validator Messages Lib | 0x9C00629cE712B0255b17A4a657171Acd15720B8C | |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| Proxy Admin | 0xC0fFEE1234567890aBCdeF1234567890abcDef34 | 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| ACP99 Compatible PoA Validator Manager | 0x0C0DEbA5E0000000000000000000000000000000 | |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| Transparent Proxy | 0x0Feedc0de0000000000000000000000000000000 | |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
+----------------------------------------------------------------------+
| INITIAL PRECOMPILE CONFIGS |
+------------+-----------------+-------------------+-------------------+
| PRECOMPILE | ADMIN ADDRESSES | MANAGER ADDRESSES | ENABLED ADDRESSES |
+------------+-----------------+-------------------+-------------------+
| Warp | n/a | n/a | n/a |
+------------+-----------------+-------------------+-------------------+
+-------------------------------------------------------------------------------------------------+
| MYBLOCKCHAIN RPC URLS |
+-----------+-------------------------------------------------------------------------------------+
| Localhost | http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc |
+-----------+-------------------------------------------------------------------------------------+
+------------------------------------------------------------------+
| PRIMARY NODES |
+------------------------------------------+-----------------------+
| NODE ID | LOCALHOST ENDPOINT |
+------------------------------------------+-----------------------+
| NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg | http://127.0.0.1:9650 |
+------------------------------------------+-----------------------+
| NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ | http://127.0.0.1:9652 |
+------------------------------------------+-----------------------+
+----------------------------------------------------------------------------------+
| L1 NODES |
+------------------------------------------+------------------------+--------------+
| NODE ID | LOCALHOST ENDPOINT | L1 |
+------------------------------------------+------------------------+--------------+
| NodeID-NuQc8BQ8mV9TVksgMtpyc57VnWzU2J6aN | http://127.0.0.1:60172 | myblockchain |
+------------------------------------------+------------------------+--------------+
+-------------------------------------------------------------------------------------------------------+
| WALLET CONNECTION |
+-----------------+-------------------------------------------------------------------------------------+
| Network RPC URL | http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc |
+-----------------+-------------------------------------------------------------------------------------+
| Network Name | myblockchain |
+-----------------+-------------------------------------------------------------------------------------+
| Chain ID | 888 |
+-----------------+-------------------------------------------------------------------------------------+
| Token Symbol | TST |
+-----------------+-------------------------------------------------------------------------------------+
| Token Name | TST Token |
+-----------------+-------------------------------------------------------------------------------------+
✓ L1 is successfully deployed on Local Network
You can use the deployment details to connect to and interact with your Avalanche L1.
Deploying Avalanche L1s Locally
To deploy your Avalanche L1, run:
avalanche blockchain deploy myblockchain
Make sure to substitute the name of your Avalanche L1 if you used a different one than myblockchain
.
? Choose a network for the operation:
▸ Local Network
Devnet
Etna Devnet
Fuji Testnet
Mainnet
Next, select Local Network
.
This command boots a three node Avalanche network on your machine:
- Two nodes to act as primary validators for the local network, that will validate the local P and C chains (unrelated to testnet/mainnet)..
- One node to act as sovereign validator for the new L1 that is deployed into the local network.
The command needs to download the latest versions of AvalancheGo and Subnet-EVM. It may take a couple minutes to run.
Note: If you run bash
on your shell and are running Avalanche-CLI on ARM64 on Mac, you will require Rosetta 2 to be able to deploy Avalanche L1s locally. You can download Rosetta 2 using softwareupdate --install-rosetta
.
If all works as expected, the command output should look something like this:
avalanche blockchain deploy myblockchain
# output
✔ Local Network
Deploying [myblockchain] to Local Network
AvalancheGo path: /Users/felipe.madero/.avalanche-cli/bin/avalanchego/avalanchego-v1.13.0/avalanchego
Booting Network. Wait until healthy...
Node logs directory: /Users/felipe.madero/.avalanche-cli/runs/network_20250410_104205/<NodeID>/logs
Network ready to use.
Using [P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p] to be set as a change owner for leftover AVAX
AvalancheGo path: /Users/felipe.madero/.avalanche-cli/bin/avalanchego/avalanchego-v1.13.0/avalanchego
✓ Local cluster myblockchain-local-node-local-network not found. Creating...
Starting local avalanchego node using root: /Users/felipe.madero/.avalanche-cli/local/myblockchain-local-node-local-network ...
✓ Booting Network. Wait until healthy...
✓ Avalanchego started and ready to use from /Users/felipe.madero/.avalanche-cli/local/myblockchain-local-node-local-network
Node logs directory: /Users/felipe.madero/.avalanche-cli/local/myblockchain-local-node-local-network/<NodeID>/logs
Network ready to use.
URI: http://127.0.0.1:60172
NodeID: NodeID-NuQc8BQ8mV9TVksgMtpyc57VnWzU2J6aN
Your blockchain control keys: [P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p]
Your blockchain auth keys for chain creation: [P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p]
CreateSubnetTx fee: 0.000010278 AVAX
Blockchain has been created with ID: 2W9boARgCWL25z6pMFNtkCfNA5v28VGg9PmBgUJfuKndEdhrvw
Now creating blockchain...
CreateChainTx fee: 0.000129564 AVAX
+--------------------------------------------------------------------+
| DEPLOYMENT RESULTS |
+---------------+----------------------------------------------------+
| Chain Name | myblockchain |
+---------------+----------------------------------------------------+
| Subnet ID | 2W9boARgCWL25z6pMFNtkCfNA5v28VGg9PmBgUJfuKndEdhrvw |
+---------------+----------------------------------------------------+
| VM ID | qDNV9vtxZYYNqm7TN1mYBuaaknLdefDbFK8bFmMLTJQJKaWjV |
+---------------+----------------------------------------------------+
| Blockchain ID | Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y |
+---------------+ |
| P-Chain TXID | |
+---------------+----------------------------------------------------+
Now calling ConvertSubnetToL1Tx...
ConvertSubnetToL1Tx fee: 0.000036992 AVAX
ConvertSubnetToL1Tx ID: 2d2EE7AorEhfKLBtnDGnAtcDYMGfPbWnHYDpNDm3SopYg6VtpV
Waiting for the Subnet to be converted into a sovereign L1 ... 100% [===============]
Validator Manager Protocol: ACP99
Restarting node NodeID-NuQc8BQ8mV9TVksgMtpyc57VnWzU2J6aN to track newly deployed subnet/s
Waiting for blockchain Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y to be bootstrapped
✓ Local Network successfully tracking myblockchain
✓ Checking if node is healthy...
✓ Node is healthy after 0 seconds
Initializing Proof of Authority Validator Manager contract on blockchain myblockchain ...
✓ Proof of Authority Validator Manager contract successfully initialized on blockchain myblockchain
Your L1 is ready for on-chain interactions.
RPC Endpoint: http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc
ICM Messenger successfully deployed to myblockchain (0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf)
ICM Registry successfully deployed to myblockchain (0xEc7018552DC7E197Af85f157515f5976b1A15B12)
ICM Messenger successfully deployed to c-chain (0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf)
ICM Registry successfully deployed to c-chain (0x17aB05351fC94a1a67Bf3f56DdbB941aE6c63E25)
✓ ICM is successfully deployed
Generating relayer config file at /Users/felipe.madero/.avalanche-cli/runs/network_20250410_104205/icm-relayer-config.json
Relayer version icm-relayer-v1.6.2
Executing Relayer
✓ Relayer is successfully deployed
+--------------------------------------------------------------------------------------------------------------------------------+
| MYBLOCKCHAIN |
+---------------+----------------------------------------------------------------------------------------------------------------+
| Name | myblockchain |
+---------------+----------------------------------------------------------------------------------------------------------------+
| VM ID | qDNV9vtxZYYNqm7TN1mYBuaaknLdefDbFK8bFmMLTJQJKaWjV |
+---------------+----------------------------------------------------------------------------------------------------------------+
| VM Version | v0.7.3 |
+---------------+----------------------------------------------------------------------------------------------------------------+
| Validation | Proof Of Authority |
+---------------+--------------------------+-------------------------------------------------------------------------------------+
| Local Network | ChainID | 888 |
| +--------------------------+-------------------------------------------------------------------------------------+
| | SubnetID | 2W9boARgCWL25z6pMFNtkCfNA5v28VGg9PmBgUJfuKndEdhrvw |
| +--------------------------+-------------------------------------------------------------------------------------+
| | Owners (Threhold=1) | P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p |
| +--------------------------+-------------------------------------------------------------------------------------+
| | BlockchainID (CB58) | Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y |
| +--------------------------+-------------------------------------------------------------------------------------+
| | BlockchainID (HEX) | 0x48644613a5ef255fa171bf4773df668b57ea0ea9593df8927a6d9f32376a9c6f |
| +--------------------------+-------------------------------------------------------------------------------------+
| | RPC Endpoint | http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc |
+---------------+--------------------------+-------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------+
| ICM |
+---------------+-----------------------+--------------------------------------------+
| Local Network | ICM Messenger Address | 0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf |
| +-----------------------+--------------------------------------------+
| | ICM Registry Address | 0xEc7018552DC7E197Af85f157515f5976b1A15B12 |
+---------------+-----------------------+--------------------------------------------+
+--------------------------+
| TOKEN |
+--------------+-----------+
| Token Name | TST Token |
+--------------+-----------+
| Token Symbol | TST |
+--------------+-----------+
+---------------------------------------------------------------------------------------------------------------------------------------+
| INITIAL TOKEN ALLOCATION |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
| DESCRIPTION | ADDRESS AND PRIVATE KEY | AMOUNT (TST) | AMOUNT (WEI) |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
| Main funded account | 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC | 1000000 | 1000000000000000000000000 |
| ewoq | 56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027 | | |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
| Used by ICM | 0xf34408C05e3B339B1c89d15163d4B9D96845597A | 600 | 600000000000000000000 |
| cli-teleporter-deployer | 30d57c7b6e7e393e2e4ce8166768b497cc37930361a15b1c647d6e665d88afff | | |
+-------------------------+------------------------------------------------------------------+--------------+---------------------------+
+----------------------------------------------------------------------------------------------------------------------------------+
| SMART CONTRACTS |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| DESCRIPTION | ADDRESS | DEPLOYER |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| Validator Messages Lib | 0x9C00629cE712B0255b17A4a657171Acd15720B8C | |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| Proxy Admin | 0xC0fFEE1234567890aBCdeF1234567890abcDef34 | 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| ACP99 Compatible PoA Validator Manager | 0x0C0DEbA5E0000000000000000000000000000000 | |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
| Transparent Proxy | 0x0Feedc0de0000000000000000000000000000000 | |
+----------------------------------------+--------------------------------------------+--------------------------------------------+
+----------------------------------------------------------------------+
| INITIAL PRECOMPILE CONFIGS |
+------------+-----------------+-------------------+-------------------+
| PRECOMPILE | ADMIN ADDRESSES | MANAGER ADDRESSES | ENABLED ADDRESSES |
+------------+-----------------+-------------------+-------------------+
| Warp | n/a | n/a | n/a |
+------------+-----------------+-------------------+-------------------+
+-------------------------------------------------------------------------------------------------+
| MYBLOCKCHAIN RPC URLS |
+-----------+-------------------------------------------------------------------------------------+
| Localhost | http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc |
+-----------+-------------------------------------------------------------------------------------+
+------------------------------------------------------------------+
| PRIMARY NODES |
+------------------------------------------+-----------------------+
| NODE ID | LOCALHOST ENDPOINT |
+------------------------------------------+-----------------------+
| NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg | http://127.0.0.1:9650 |
+------------------------------------------+-----------------------+
| NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ | http://127.0.0.1:9652 |
+------------------------------------------+-----------------------+
+----------------------------------------------------------------------------------+
| L1 NODES |
+------------------------------------------+------------------------+--------------+
| NODE ID | LOCALHOST ENDPOINT | L1 |
+------------------------------------------+------------------------+--------------+
| NodeID-NuQc8BQ8mV9TVksgMtpyc57VnWzU2J6aN | http://127.0.0.1:60172 | myblockchain |
+------------------------------------------+------------------------+--------------+
+-------------------------------------------------------------------------------------------------------+
| WALLET CONNECTION |
+-----------------+-------------------------------------------------------------------------------------+
| Network RPC URL | http://127.0.0.1:60172/ext/bc/Yt9d8RRW9JcoqfvyefqJJMX14HawtBc28J9CQspQKPkdonp1y/rpc |
+-----------------+-------------------------------------------------------------------------------------+
| Network Name | myblockchain |
+-----------------+-------------------------------------------------------------------------------------+
| Chain ID | 888 |
+-----------------+-------------------------------------------------------------------------------------+
| Token Symbol | TST |
+-----------------+-------------------------------------------------------------------------------------+
| Token Name | TST Token |
+-----------------+-------------------------------------------------------------------------------------+
✓ L1 is successfully deployed on Local Network
To manage the newly deployed local Avalanche network, see the avalanche network
command tree.
You can use the deployment details to connect to and interact with your Avalanche L1. Now it's time to interact with it.
Interacting with Your Avalanche L1
You can use the value provided by Browser Extension connection details
to connect to your Avalanche L1 with Core, MetaMask, or any other wallet.
Note
To allow API calls from other machines, use --http-host=0.0.0.0
in the config.
Browser Extension connection details (any node URL from above works):
RPC URL: http://127.0.0.1:9650/ext/bc/2BK8CKA4Vfvi69TBTc5GW94JQ9nPiL8xPpPNeeckb9UFSPYedD/rpc
Funded address: 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC with 1000000 (10^18) - private key: 56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027
Network name: myblockchain
Chain ID: 888
Currency Symbol: TST
This tutorial uses Core.
Importing the Test Private Key
This address derives from a well-known private key. Anyone can steal funds sent to this address. Only use it on development networks that only you have access to. If you send production funds to this address, attackers may steal them instantly.
First, you need to import your airdrop private key into Core.
In the Accounts screen, select the Imported
tab. Click on Import private key
.
Here, enter the private key. Import the well-known private key 0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027
.
Next, rename the Core account to prevent confusion. On the Imported
tab, click on the pen icon next to your account. Rename the account DO NOT USE -- Public test key
to prevent confusion with any personal wallets.
Connect to the Avalanche L1
Next, you need to add your Avalanche L1 to Core's networks.
In the Core Extension click, See All Networks
and then select the +
icon in the top right.
Enter your Avalanche L1's details, found in the output of your avalanche blockchain deploy
command, into the form and click Save
.
If all worked as expected, your balance should read 1 million tokens. Your Avalanche L1 is ready for action. You might want to try to Deploy a Smart Contract on Your Subnet-EVM Using Remix and Core.
Deploying Multiple Avalanche L1s
You may deploy multiple Avalanche L1s concurrently, but you can't deploy the same Avalanche L1 multiple times without resetting all deployed Avalanche L1 state.
Redeploying the Avalanche L1
To redeploy the Avalanche L1, you first need to wipe the Avalanche L1 state. This permanently deletes all data from all locally deployed Avalanche L1s. To do so, run
avalanche network clean
You are now free to redeploy your Avalanche L1 with
avalanche blockchain deploy <blockchainName> --local
Stopping the Local Network
To gracefully stop a running local network while preserving state, run:
avalanche network stop
# output
Network stopped successfully.
When restarted, all of your deployed Avalanche L1s resume where they left off.
Resuming the Local Network
To resume a stopped network, run:
avalanche network start
# output
Starting previously deployed and stopped snapshot
Booting Network. Wait until healthy...
...............
Network ready to use. Local network node endpoints:
+-------+----------+------------------------------------------------------------------------------------+
| NODE | VM | URL |
+-------+----------+------------------------------------------------------------------------------------+
| node5 | myblockchain | http://127.0.0.1:9658/ext/bc/SPqou41AALqxDquEycNYuTJmRvZYbfoV9DYApDJVXKXuwVFPz/rpc |
+-------+----------+------------------------------------------------------------------------------------+
| node1 | myblockchain | http://127.0.0.1:9650/ext/bc/SPqou41AALqxDquEycNYuTJmRvZYbfoV9DYApDJVXKXuwVFPz/rpc |
+-------+----------+------------------------------------------------------------------------------------+
| node2 | myblockchain | http://127.0.0.1:9652/ext/bc/SPqou41AALqxDquEycNYuTJmRvZYbfoV9DYApDJVXKXuwVFPz/rpc |
+-------+----------+------------------------------------------------------------------------------------+
| node3 | myblockchain | http://127.0.0.1:9654/ext/bc/SPqou41AALqxDquEycNYuTJmRvZYbfoV9DYApDJVXKXuwVFPz/rpc |
+-------+----------+------------------------------------------------------------------------------------+
| node4 | myblockchain | http://127.0.0.1:9656/ext/bc/SPqou41AALqxDquEycNYuTJmRvZYbfoV9DYApDJVXKXuwVFPz/rpc |
+-------+----------+------------------------------------------------------------------------------------+
The network resumes with the same state it paused with.
Next Steps
After you feel comfortable with this deployment flow, try deploying smart contracts on your chain with Remix, Hardhat, or Foundry. You can also experiment with customizing your Avalanche L1 by addingprecompiles or adjusting the airdrop.
Once you've developed a stable Avalanche L1 you like, see Create an EVM Avalanche L1 on Fuji Testnet to take your Avalanche L1 one step closer to production.
FAQ
How is the Avalanche L1 ID (SubnetID) determined upon creation?
The Avalanche L1 ID (SubnetID) is the hash of the transaction that created the Avalanche L1.
Is this guide helpful?