title | sidebar_label | sidebar_position | slug |
---|---|---|---|
Name Service |
Build a Name Service |
1 |
/build/name-service |
:::note Synopsis Building your first Cosmos-SDK blockchain with Spawn. This tutorial focuses on a 'nameservice' where you set your account to a name you choose.
- Generating a new chain
- Creating a new module
- Adding custom logic
- Run locally
- Interacting with the network :::
Let's create a new chain called 'rollchain'. You are going to set defining characteristics such as
- Which modules to disable from the template if any
- Proof of Stake consensus
- Wallet prefix (bech32)
- Token name (denom)
- Binary executable (bin)
spawn new rollchain --consensus=pos --disable=cosmwasm --bech32=roll --denom=uroll --bin=rolld
🎉 Your new blockchain 'rollchain' is now generated!
Now it is time to build the nameservice module structure.
Move into the 'rollchain' directory and generate the new module with the following commands:
# moves into the rollchain directory you just generated
cd rollchain
# scaffolds your new nameservice module
spawn module new nameservice
# proto-gen proto files to go
#
# If you get a cannot find module error
# go clean -modcache
make proto-gen
This creates a new template module with the name nameservice
in the x
and proto
directories. It also automatically connected to your application and is ready for use.