make install
First generate the mnemonic you will use for Hermes:
nolusd keys mnemonic
Then recover osmosis key and use the UI to get some uosmo:
osmosisd keys add hermes_key --recover
Init and start:
./scripts/init-local-network.sh --reserve-tokens <reserve_account_init_tokens> --hermes-mnemonic <the_mnemonic_generated_by_the_previous_steps> --dex-network-addr-rpc <dex_network_addr_host_part_rpc> --dex-network-addr-grpc <dex_network_addr_host_part_grpc>
Set up the DEX parameter: Set up the DEX parameters manually
The make install
command will compile and locally install nolusd on your machine. init-local-network.sh
generates a node setup, including setting the dex parameter (run init-local-network.sh --help
for more configuration options). For more details check the scripts README
*Notes:
-
Make sure "nolus-money-market" repo is checked out as a sibling to this repo.
-
The Osmosis binary is required: Follow the steps.
-
Before running the "./scripts/init-local-network.sh" again, make sure the nolusd and hermes processes are killed.
-
The "hermes" and "nolusd" logs are stored in ~/hermes and ~/.nolus respectively.
nolusd start --home "networks/nolus/local-validator-1"
Follow the steps here. Write down the connection and channel identifiers at Nolus and Osmosis for further usage.
The goal is to let smart contracts know the details of the connectivity to Osmosis. Herebelow is a sample request. This should be done via sudo gov proposal:
nolusd tx gov submit-proposal sudo-contract nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f '{"setup_dex": {"connection_id": "connection-0", "transfer_channel": {"local_endpoint": "channel-0", "remote_endpoint": "channel-1499"}}}' --title "Set up the DEX parameter" --description "Thе proposal aims to set the DEX parameters in the Leaser contract" --deposit 10000000unls --fees 900unls --gas auto --gas-adjustment 1.1 --from wallet
*Notes: "channel-1499" should be replaced, so you can get the actual channel ID of the remote endpoint with:
nolusd q ibc channel connections connection-0 --output json | jq '.channels[0].counterparty.channel_id' | tr -d '"'
Check the transaction has passed:
nolusd q wasm contract-state smart nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f '{"config":{}}'
By default, make build
generates a dynamically linked binary. In case someone would like to reproduce the way the binary is built in the pipeline then the command to achieve it locally is:
docker run --rm -it -v "$(pwd)":/code public.ecr.aws/nolus/builder:<replace_with_the latest_tag> make build -C /code
- Update the Go modules
- Update the wasmvm version in the builder Dockerfile at .github/images/builder.Dockerfile
- Increment the IMAGE_TAG and use the same version in the build-binary step in .github/workflows/build.yaml