[contracts] Simplify hardhat node startup
This commit is contained in:
parent
8853105920
commit
8d0f9775b5
|
@ -21,4 +21,3 @@ build/
|
|||
|
||||
.update.timestamp
|
||||
dagger.nims
|
||||
deployment-localhost.json
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue