[contracts] Simplify hardhat node startup
This commit is contained in:
parent
8853105920
commit
8d0f9775b5
|
@ -21,4 +21,3 @@ build/
|
||||||
|
|
||||||
.update.timestamp
|
.update.timestamp
|
||||||
dagger.nims
|
dagger.nims
|
||||||
deployment-localhost.json
|
|
||||||
|
|
|
@ -37,12 +37,7 @@ task testContracts, "Build, deploy and test contracts":
|
||||||
exec "cd vendor/dagger-contracts && npm install"
|
exec "cd vendor/dagger-contracts && npm install"
|
||||||
|
|
||||||
# start node
|
# start node
|
||||||
# Note: combining this command with the previous does not work
|
exec "cd vendor/dagger-contracts && npm start &"
|
||||||
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'"
|
|
||||||
|
|
||||||
# run contract tests using deployed contracts
|
# run contract tests using deployed contracts
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -5,7 +5,7 @@ import pkg/questionable
|
||||||
type Deployment* = object
|
type Deployment* = object
|
||||||
json: JsonNode
|
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
|
## Reads deployment information from a json file. It expects a file that has
|
||||||
## been exported with Hardhat deploy.
|
## been exported with Hardhat deploy.
|
||||||
|
|
Loading…
Reference in New Issue