Deploy Additional Blockchain for Multi-hop
Set up a new blockchain to test ICTT multi-hop transfers.
Create a new blockchain myblockchain2
for multi-hop transfer
avalanche blockchain create myblockchain2
✔ Subnet-EVM
✔ I want to use defaults for a test environment
✔ Chain ID: 2
✔ Token Symbol: chain2
prefunding address 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC with balance 1000000000000000000000000
✓ Successfully created blockchain configuration
Get the Teleporter Registry Address
of myblockchain2
avalanche blockchain describe myblockchain2
+-------------------------------------------------------------------------------------------+
| TELEPORTER |
+---------------+------------------------------+--------------------------------------------+
| Local Network | Teleporter Messenger Address | 0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf |
| +------------------------------+--------------------------------------------+
| | Teleporter Registry Address | 0xa3493940a13b426BD2f7dA6E55A39c060C0e6020 | // [!code highlight]
+---------------+------------------------------+--------------------------------------------+
Save the Teleporter Registry Address
Most other environment variables we will need are already set in the devcontainer or from the previous section.
export TELEPORTER_REGISTRY_CHAIN2=0xa3493940a13b426BD2f7dA6E55A39c060C0e6020
Get the Blockchain ID (hex)
of myblockchain2
+---------------------------------------------------------------------------------------------------------------+
| MYBLOCKCHAIN2 |
+---------------+-----------------------------------------------------------------------------------------------+
| Name | myblockchain2 |
+---------------+-----------------------------------------------------------------------------------------------+
| VM ID | qDNV9vtxZYYNqm7TSa9KnDTRabGxtBLv6vd888791J9a89kTF |
+---------------+-----------------------------------------------------------------------------------------------+
| VM Version | v0.6.9 |
+---------------+--------------------------+--------------------------------------------------------------------+
| Local Network | ChainID | 2 |
| +--------------------------+--------------------------------------------------------------------+
| | SubnetID | 2KhsQJhH3VqS7WWMreodAAHpGfGCUNuGQDSaP2vUT29p1HELBV |
| +--------------------------+--------------------------------------------------------------------+
| | Owners (Threhold=1) | P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p |
| +--------------------------+--------------------------------------------------------------------+
| | BlockchainID (CB58) | 2ZempAyezixFRdJhJribDdj2wiK6YFF63CkXKaimfPb3hWeWVH |
| +--------------------------+--------------------------------------------------------------------+
| | BlockchainID (HEX) | 0xcdd5b2b99ae462c32a8e4ea47e94f2c7804519353558fd4127cf7ae11d8a6e52 | // [!code highlight]
+---------------+--------------------------+--------------------------------------------------------------------+
Save the Source Blockchain ID
export SOURCE_BLOCKCHAIN2_ID_HEX=0xcdd5b2b99ae462c32a8e4ea47e94f2c7804519353558fd4127cf7ae11d8a6e52
Add myblockchain2
RPC to foundry.toml
config
[rpc_endpoints]
local-c = "http://localhost:9650/ext/bc/C/rpc"
myblockchain = "http://localhost:9650/ext/bc/myblockchain/rpc"
myblockchain2 = "http://localhost:9650/ext/bc/myblockchain2/rpc"
Edit on GitHub
Last updated on 1/13/2025