Connect testnet
After developers initialize through rooch init
, the dev
environment is activated by default.
You can view the environment list in the configuration through the command rooch env list
:
rooch env list
Env Alias | RPC URL | Websocket URL | Active Env
---------------------------------------------------------------------------------------------------------------------------------------------------------
local | http://0.0.0.0:6767 | Null |
dev | https://dev-seed.rooch.network:443/ | Null | True
test | https://test-seed.rooch.network:443/ | Null |
Activate the test
network:
rooch env switch --alias test
Check that you have switched to the correct test
network:
rooch env list
Env Alias | RPC URL | Websocket URL | Active Env
---------------------------------------------------------------------------------------------------------------------------------------------------------
local | http://0.0.0.0:6767 | Null |
dev | https://dev-seed.rooch.network:443/ | Null |
test | https://test-seed.rooch.network:443/ | Null | True
Testnet network information
- Name: test
- ChainID: 2
- RPC: https://test-seed.rooch.network/ (opens in a new tab)
Note: The current testnet is a pioneer network, and the data may be reset before the permanent incentive testnet is launched!
Call RPC via curl
Query the ID information of the current chain and you can see that the returned JSON data is exactly the information of the test
network:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"rooch_getChainID","params":[],"id":1}' https://test-seed.rooch.network
{"jsonrpc":"2.0","result":"2","id":1}
Deploy the Example contract
Refer to the document [Obtain Rooch Gas Coin](../get gas coin) to obtain the gas used for publishing contracts.
After receiving the Gas, test the deployment contract on the testnet
network:
git clone https://github.com/rooch-network/rooch.git
cd rooch
rooch move publish -p ./examples/quick_start_counter/ --sender-account default --named-addresses quick_start_counter=default