A web frontend for interacting with the mStable contracts.
git clone git@github.com:mstable/mStable-app.git && cd mStable-app
cp .env.example.ropsten .env
to connect to Ropsten (orcp .env.example.mainnet .env
to connect to Mainnet)yarn
yarn provision
yarn codegen
- Optional: replace env vars in
.env
with e.g. a real Infura provider key
Simply run yarn start
.
The installation instructions above will connect to the deployed contracts and Subgraph on either Ropsten or Mainnet, but it is also possible to run the whole stack locally. This should generally not be necessary.
First, ensure that these are installed:
And that the the Docker daemon is running.
Simply run yarn truffle:migrate
and the contracts will be deployed to a
local Ganache instance on http://127.0.0.1:7545.
Firstly run graph-node
locally:
- Navigate to
lib/graph-node/docker
. - Edit
docker-compose.yml
if needed (e.g. to set the host URL for Ganache). - Run
docker-compose up
to start the node.
Next, create and deploy the subgraph.
- Navigate to
lib/mStable-subgraph
. - Edit
subgraph.yaml
if needed to set the contract addresses to those deployed locally. - Run
yarn codegen
. - Run
yarn create-local
; the graph node should output a log. - Run
yarn deploy-local
; the graph node should start running the subgraph and begin processing blocks.
More detailed instructions are available here.