Contains commands, files and links made to ease communication during Neutron Nebular workshop.
[1] Follow the link to the official golang website: https://go.dev/doc/install
[2] Clone the repo from here: https://github.com/neutron-org/neutron-query-relayer
[3]
- Clone the repo from here: https://github.com/neutron-org/neutron
- cd to it and run
make install
- make sure neutrond binary is available by running
neutrond version
[4] Jq is a command-line JSON processor. Follow the link to install it: https://jqlang.github.io/jq/download/
[5]
neutrond config chain-id pion-1
neutrond config keyring-backend test
neutrond config output json
neutrond config node https://rpc-palvus.pion-1.ntrn.tech:443
neutrond config broadcast-mode block
[6]
neutrond keys add nnw-wallet
[7]
Use the previously generated nnw-wallet
address instead of the <addr>
placeholder.
- visit https://discord.neutron.org
- find
nnw-faucet
channel in theNEBULAR
section - type:
$request <addr>
- join channel https://t.me/+PzE7GmHOVWxhNTU6
- type:
/request <addr>
Contact's code has already been stored under ID = 1220.
[8]
neutrond tx wasm instantiate 1220 '{
"rich_line": "1000000",
"asset_denom": "uatom",
"frequency": 60,
"connection_id": "connection-42"
}' --from nnw-wallet --admin nnw-wallet --label rhm --gas 5000000 --gas-prices 0.025untrn | jq .
put your contract's address instead of the <addr>
placeholder.
[9]
neutrond q wasm cs smart <addr> '{"config": {}}'
[10]
neutrond tx bank send nnw-wallet <addr> 2000000untrn | jq .
and check the balance
[11]
neutrond q bank balances <addr> | jq .
We'll look after two addresses and check their wealth:
- poor Alice —
cosmos1p624fu7ywzxaty6w9cl5j3cj0u6rzzlk8qymc8
- rich Bob —
cosmos1deqmwmwfwkgwulu8yyqcwdhs5mtmy2gfzhyyak
Use you contract's address instead of the <addr>
placeholder
[12]
- Look after Alice
neutrond tx wasm execute <addr> '{"keep_an_eye_on":{"addr": "cosmos1p624fu7ywzxaty6w9cl5j3cj0u6rzzlk8qymc8"}}' --from nnw-wallet --gas 5000000 --gas-prices 0.025untrn | jq .
- Look after Bob
neutrond tx wasm execute <addr> '{"keep_an_eye_on":{"addr": "cosmos1deqmwmwfwkgwulu8yyqcwdhs5mtmy2gfzhyyak"}}' --from nnw-wallet --gas 5000000 --gas-prices 0.025untrn | jq .
[13]
- copy the
.env
file from here to the relayer app root folder:
cp .env ../neutron-query-relayer
- put your contract's address to the RELAYER_REGISTRY_ADDRESSES var:
RELAYER_REGISTRY_ADDRESSES=neutron1...
- run relayer:
export $(grep -v '^#' .env | xargs) && make dev
[14]
Use you contract's address instead of the <addr>
placeholder
neutrond q wasm contract-state smart <addr> '{"objects": {}}' | jq .
neutrond q wasm contract-state smart <addr> '{"poor": {}}' | jq .
neutrond q wasm contract-state smart <addr> '{"rich": {}}' | jq .