CosmWasm Demo Net Launched

Ethan Frey
CosmWasm
Published in
3 min readMar 3, 2020
Photo by SpaceX on Unsplash

We have been working hard on full-stack solutions as part of CosmWasm. From secure, efficient smart contracts based on Rust, to a Cosmos SDK-based application to execute the contracts, to a TypeScript frontend library and webapps to present these contracts nicely. However, until today, all the instructions and demos have been using a local “dev-net”.

Today, we are announcing the launch of a Demo Net, a minimal Testnet, which is open for everyone to upload their contracts, to serve as a backend for your new frontend apps, and to allow collaboration between different developers and projects. If you are working on a project with CosmWasm, we encourage you to try out the Demo Net and share some links to your contracts and dApps.

If you are a developer, there is more detailed information below. If you are just following the progress of CosmWasm, this is laying down the infrastructure to push out some publicly hosted apps running on CosmWasm… expect to see some dApps soon that you can run without using git and compiling them locally.

Connecting to a Full Node

If you want to try out you app on a remote server that you can share with colleagues, and which won’t go away when you reboot your machine, then you are in luck. You can just adjust the localhost endpoints in any demo to the following.

REST Server (for cosmwasm-js ): https://lcd.demo-07.cosmwasm.com/

Tendermint RPC (for wasmcli): https://rpc.demo-07.cosmwasm.com/

You can already try adjusting the configuration for a self-built Neuma extension to use these networks.

Getting Funds

Of course, the first issue you will hit is that you have an empty wallet, while one of the big advantages of the local “dev net” was that you started with plenty of money. Luckily we set up a faucet with a simple REST API, so you can just hit it with curl or call it from your JavaScript apps, etc. Once you have generated a private key locally and have the address for it, you can run the following (where $ADDRESS is your address):

curl --header "Content-Type: application/json" \
--request POST \
--data "{\"ticker\":\"COSM\",\"address\":\"$ADDRESS\"}" \
https://faucet.demo-07.cosmwasm.com/credit

This will get you 10 COSM (which is 10 million ucosm ). Full usage info can be found on the faucet README

Connecting Your Node

If you don’t just want to connect your app, but also run your own full node, you can do that without permission. If you want to stake some tokens and validate as well, just ask me for some tokens. The best place is on the Telegram group. Once your full node is up and sync’d, I can send you some ustake to make it a validator (yes, we have 2 tokens, one for fees, other for staking).

Please note this is not supposed to be a large-scale public testnet and we will not be doing much support or onboarding yet. But if you know how to run a node and are excited to join in early on, you are welcome to get on board. Once you have set up wasmd, you should be able to sync your node as follows:

rm -rf ~/.wasmd
wasmd init full-node-1
curl -sS https://rpc.demo-07.cosmwasm.com/genesis | jq .result.genesis > ~/.wasmd/config/genesis.json
wasmd start --p2p.persistent_peers=7a56d4c85f3bd06a7a296c4052fa54ad80f78d62@p2p.demo-07.cosmwasm.com:26656

At the time of writing this article, this took me a few minutes to sync… a time which is sure to grow with the size of the chain. You can always follow progress with curl localhost:26657/status | jq .result.sync_info

Enjoy the new Demo Net and try running the tutorial against it. Please follow our blog, or join our Telegram group for more updates.

--

--