From 8d0f9775b547327a5743e4840d031381d872ad35 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 15 Mar 2022 17:19:21 +0100 Subject: [PATCH] [contracts] Simplify hardhat node startup --- .gitignore | 1 - dagger.nimble | 7 +------ dagger/contracts/deployment.nim | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 6b64b633..ce25b0f8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,3 @@ build/ .update.timestamp dagger.nims -deployment-localhost.json diff --git a/dagger.nimble b/dagger.nimble index f81f1acf..bc4ebc68 100644 --- a/dagger.nimble +++ b/dagger.nimble @@ -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: diff --git a/dagger/contracts/deployment.nim b/dagger/contracts/deployment.nim index bb38fc8b..a6ddacc7 100644 --- a/dagger/contracts/deployment.nim +++ b/dagger/contracts/deployment.nim @@ -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.