User application for Agoric Inter Protocol--Vaults, BLD Boost, Liquidations, etc.
-
Download and build the latest copy of
agoric-sdk
, including Agoric's Cosmic SwingSet.cd agoric-sdk yarn && yarn build yarn link-cli ~/bin/agoric # or use any local dir in $PATH (e.g. ~/.local/bin/agoric)
Test that
agoric
works with:agoric --version
For Cosmic SwingSet (in
agoric-sdk
):cd packages/cosmic-swingset make
Test that Cosmic SwingSet tools work with:
agd --help
-
(One-time) Define keys expected by the startup scripts*
agd keys add gov1 --keyring-backend=test agd keys add gov2 --keyring-backend=test
*If you have access to the mnemonics, use
--interactive
to get a prompt to import them. Without that it will create new keys. You can save the seed phrase somewhere, or even create a keplr account with it for testing. You can useagd keys list --keyring-backend=test
to check which keys you've created. -
Start a local chain with psm, vaults, etc.
cd packages/inter-protocol && scripts/start-local-chain.sh
-
Go the the wallet repository and start a local client server:
cd wallet-app && yarn install cd wallet && yarn start
-
Open the wallet UI and adjust Settings to use the localhost network.
If you created a Keplr account with the seed from YOUR_ACCOUNT_KEY, you should already have a smart wallet provisioned.
-
Return to this repository and
yarn && yarn dev
to start the local server with Hot Module Replacement (which automatically refreshes the UI as you change source files). To connect to your local wallet UI, use http://127.0.0.1:5173/?wallet=local.
yarn install && yarn build
will create a bundled SPA in the dist
folder that can be served from a web server.
You can preview the bundled application by running yarn preview
.
By default, it will have a network dropdown for choosing between various test networks.
For production, it's
recommended that you use the environment variable VITE_NETWORK_CONFIG_URL
to preset a real network and hide the dropdown:
VITE_NETWORK_CONFIG_URL=https://<PRODUCTION-NETWORK>.net/network-config yarn build