We need the following installed:
- docker
- jq
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)
Then we create a new address using:
node src/js/scripts/create-new-accounts.js > .env
source .env
In first pane:
./stack build
./stack geth
Now we need to fund all of our accounts:
./stack fund-admin
./stack fund-faucet
./stack fund-services
./stack balances
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
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