Docs
Developer guides
Connect to devnet

Connect to Developer Test Network

After initializing with rooch init, the dev environment is activated by default.

You can use the command rooch env list to view the list of environments in the configuration:

rooch env list
       Env Alias         |                     RPC URL                      |                  Websocket URL                   |  Active Env 
---------------------------------------------------------------------------------------------------------------------------------------------------------
         local           |               http://0.0.0.0:50051               |                       Null                       |             
          dev            |       https://dev-seed.rooch.network:443/        |                       Null                       |     True  

If the active environment is not dev, you can switch to the Developer Network by running the command rooch env switch --alias dev.

Developer Network Information

  1. Name: dev
  2. ChainID: 20230103
  3. RPC: https://dev-seed.rooch.network/ (opens in a new tab)

Note: The Developer Testnet automatically updates to the main branch of the Rooch GitHub repository (opens in a new tab). If the latest version includes incompatible data changes, the test data will be cleared automatically.

Deploying the Example Contract

Currently, the Developer Testnet automatically assigns GasCoin to developers, allowing them to deploy contracts directly through commands.

git clone https://github.com/rooch-network/rooch.git
cd rooch
rooch move publish -p ./examples/counter --sender-account default --named-addresses rooch_examples=default

Calling RPC with curl

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"rooch_getChainID","params":[],"id":1}' https://dev-seed.rooch.network
{"jsonrpc":"2.0","result":"20230103","id":1}

If you prefer a convenient local development environment, you can also run a local test network.