Skip to main content

Understanding your Testnet

Assuming you have kickstarted your Testnet and it is running in the background, you can retrieve information on your Testnet from the CLI.

Ensure running Testnet​

First, you need to make sure that your Testnet is running. To verify that your Testnet is running, run the command:

harbor list testnet

This will give us a list of Testnets, like so:

listing testnets...
+--------------------------------------+-----------------------------+--------+--------------------------------+
| ID | NAME | STATUS | CREATED |
+--------------------------------------+-----------------------------+--------+--------------------------------+
| fa96c88a-e518-49dd-80ab-dc15063fd6a0 | testnet-name-1 | ACTIVE | 2022-09-26 07:47:56.266345 |
| | | | +0000 +0000 |
| 0e643cb7-5cd7-460b-b740-08a0b56a48d4 | testnet-name-2 | ACTIVE | 2022-09-27 13:54:22.187643 |
| | | | +0000 +0000 |
| dd9ce4a8-084b-4278-984d-b2858a137ce2 | testnet-name-3 | ACTIVE | 2022-09-28 04:53:17.585098 |
| | | | +0000 +0000 |
+--------------------------------------+-----------------------------+--------+--------------------------------+

Make sure your Testnet of interest is running by checking that the status is ACTIVE.

However, if it isn't ACTIVE, run the command in the same directory as your configuration file:

harbor apply <testnet-name>

Where <testnet-name> is the name of choice of your Testnet. Make sure the tag keys of both your off-chain actors and chains are filled before running the command.

You should see the following:

Doing preflight checks...
Creating smart contracts...
Preparing your ethereum deployment...
Building chain image... 100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| | (0/1, 0 it/hr) [0s:0s]
β ’ Pushing images to container repository [1s]
Constructing chain...
🌍 Testnet create/update in progress... [1m40s]

###### 1 Chains

Chain = ⛓️ethereum
Status = βœ” RUNNING
Endpoint = 🌎 http://3.111.187.140:4000


###### 0 Off-chain actors

You can now be sure that your Testnet is running.

CLI​

Finding Testnet information​

What if you wanted a bird's eye view of all your running actors with their respective endpoints? That's simple! Given that the Testnet is running, execute the command below:

harbor describe testnet --name <testnet_name>

This will give you the Testnet information in the following format:

Testnet name: sample-testnet-name
+----------+---------+---------------------------+
| CHAINS | STATUS | ENDPOINT |
+----------+---------+---------------------------+
| ethereum | RUNNING | http://34.213.53.1:3000 |
+----------+---------+---------------------------+

Total chains count: 1
+--------+---------+---------------------------+
| ACTORS | STATUS | ENDPOINT |
+--------+---------+---------------------------+
| ipfs | RUNNING | http://43.205.242.46:5000 |
+--------+---------+---------------------------+

Total off-chain actors count: 1

Wallets and Contracts for chain ethereum
+--------------------------------------------+----------+---------+-------------------------------+----------+
| ADDRESS | TYPE | NAME | BALANCE | CHAIN |
+--------------------------------------------+----------+---------+-------------------------------+----------+
| 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 | wallet | - | ETH-9999999068271250000000, | ethereum |
| 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | wallet | - | ETH-10000000000000000000000, | ethereum |
| 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC | wallet | - | ETH-10000000000000000000000, | ethereum |
| 0x5FbDB2315678afecb367f032d93F642f64180aa3 | contract | Greeter | ETH-0, | ethereum |
+--------------------------------------------+----------+---------+-------------------------------+----------+

You can also output the Testnet information in a JSON format. To do this, add in an extra output flag followed by json as the value. Like this:

info

The output flag only works if we find the testnet using the name flag.

harbor describe testnet --name <testnet_name> --output json

This will give you:

{
"name": "test",
"chains": {
"ethereum": {
"status": "STOPPED",
"endpoint": "http://34.213.53.1:3000"
}
},
"offChainActors": {
"ipfs": {
"status": "STOPPED",
"endpoints": ["43.205.242.46:5000"]
}
}
}

Using the actor name, you can find logs concerning a specific Testnet actor.

Finding Logs​

With your Testnet running, you can retrieve logs of individual actors. Make sure you get your actor's name using the describe command above.

Given that you have the actor's name, run this command:

harbor log actor --testnet-id <testnet_id> --name <chain_name/actor_name>

This will give you the actor's log. Here's an example of the log from an ethereum chain.

2023-02-15 11:41:47.085 +0000 WET deploying "SimpleStorage" (tx: 0x81483ef99b7a0f7c786a780b805349d379a9cd2fe280960853975f9d9c046ef8)...: deployed at 0x10e38eE9dd4C549b61400Fc19347D00eD3edAfC4 with 463682 gas
2023-02-15 11:41:47.085 +0000 WET IS THIS WORKING?
2023-02-15 11:41:47.337 +0000 WET deploying "Greeter" (tx: 0xbe9dd6e0506dd2f75b0fa0b6f795acb7dfe295eb8a1d597756eb219e05080b1f)...: deployed at 0xd753c12650c280383Ce873Cc3a898F6f53973d16 with 384928 gas
2023-02-15 11:41:47.528 +0000 WET Contracts deployed..!
2023-02-15 11:41:48.843 +0000 WET Started HTTP and WebSocket JSON-RPC server at http://0.0.0.0:4000/
2023-02-15 11:41:48.843 +0000 WET Accounts
2023-02-15 11:41:48.843 +0000 WET ========
2023-02-15 11:41:48.843 +0000 WET WARNING: These accounts, and their private keys, are publicly known.
2023-02-15 11:41:48.843 +0000 WET Any funds sent to them on Mainnet or any other live network WILL BE LOST.
2023-02-15 11:41:49.153 +0000 WET Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH)
2023-02-15 11:41:49.153 +0000 WET Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
2023-02-15 11:41:49.153 +0000 WET Account #1: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000 ETH)
2023-02-15 11:41:49.153 +0000 WET Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
. . .

UI​

You can also receive basic information about your Testnet via the UI. To do this, you need to first select a Testnet from the list of Testnets in a sample project page:

fwe

Selecting a Testnet will then show you the Testnet page itself:

testnet_page

This will give you information on your off-chain actors (with endpoints) along with the blockchain(s) information (wallets, endpoints, contracts).

You have the option of copying a smart contract's address and also downloading it's ABI. Clicking on the Info button of a smart contract card will reveal such options:

contract_info

Also, you can copy both the public and private keys of any wallet! Click on the Info button of a wallet card to show these options:

wallet_info