[contracts] Simplify hardhat node startup

This commit is contained in:
Mark Spanbroek 2022-03-15 17:19:21 +01:00 committed by markspanbroek
parent 8853105920
commit 8d0f9775b5
3 changed files with 2 additions and 8 deletions

1
.gitignore vendored
View File

@ -21,4 +21,3 @@ build/
.update.timestamp
dagger.nims
deployment-localhost.json

View File

@ -37,12 +37,7 @@ task testContracts, "Build, deploy and test contracts":
exec "cd vendor/dagger-contracts && npm install"
# start node
# Note: combining this command with the previous does not work
exec "cd vendor/dagger-contracts && npx hardhat node --no-deploy &"
# deploy contracts
exec "sleep 3 && " &
"cd vendor/dagger-contracts && npx hardhat deploy --network localhost --export '../../deployment-localhost.json'"
exec "cd vendor/dagger-contracts && npm start &"
# run contract tests using deployed contracts
try:

View File

@ -5,7 +5,7 @@ import pkg/questionable
type Deployment* = object
json: JsonNode
const defaultFile = "./deployment-localhost.json"
const defaultFile = "vendor/dagger-contracts/deployment-localhost.json"
## Reads deployment information from a json file. It expects a file that has
## been exported with Hardhat deploy.