Skip to content

Latest commit

 

History

History
83 lines (57 loc) · 1.29 KB

CONTRIBUTING.md

File metadata and controls

83 lines (57 loc) · 1.29 KB

Development

We need the following installed:

  • docker
  • jq

compile contract

The first thing we need to do is compile the smart contract so we have the ABI and can build that into the container:

(cd src/js && npm install && npx hardhat compile)

create addresses

Then we create a new address using:

node src/js/scripts/create-new-accounts.js > .env
source .env

run geth

In first pane:

./stack build
./stack geth

fund accounts

Now we need to fund all of our accounts:

./stack fund-admin
./stack fund-faucet
./stack fund-services
./stack balances

deloy contract

Then we can deploy the contract:

(cd src/js && npx hardhat deploy --network localgeth)

The smart contract is now deployed and the address is written to the JSON file living in src/js/deployments/localgeth/Modicum.json

run services

Each of these in a different window.

source .env
./stack solver && ./stack logs solver
source .env
./stack mediator && ./stack logs mediator
source .env
./stack resource-provider && ./stack logs resource-provider
source .env
./stack submitjob --template cowsay:v0.0.1 --params "hello"

NOTE: if you want a fresh installation - then:

./stack clean