mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-02 05:23:09 +00:00
chore(marketplace): use hardhat ignition (#1195)
This commit is contained in:
parent
c5e424ff1b
commit
7b660e3554
2
.github/workflows/ci-reusable.yml
vendored
2
.github/workflows/ci-reusable.yml
vendored
@ -61,6 +61,8 @@ jobs:
|
||||
run: |
|
||||
npm install
|
||||
npm start &
|
||||
# Wait for the contracts to be deployed
|
||||
sleep 5
|
||||
|
||||
## Part 2 Tests ##
|
||||
- name: Contract tests
|
||||
|
||||
@ -53,6 +53,7 @@ proc openLogFile(node: HardhatProcess, logFilePath: string): IoHandle =
|
||||
|
||||
method start*(node: HardhatProcess) {.async.} =
|
||||
let poptions = node.processOptions + {AsyncProcessOption.StdErrToStdOut}
|
||||
|
||||
trace "starting node",
|
||||
args = node.arguments,
|
||||
executable = node.executable,
|
||||
@ -63,10 +64,28 @@ method start*(node: HardhatProcess) {.async.} =
|
||||
node.process = await startProcess(
|
||||
node.executable,
|
||||
node.workingDir,
|
||||
@["node", "--export", "deployment-localhost.json"].concat(node.arguments),
|
||||
@["node"].concat(node.arguments),
|
||||
options = poptions,
|
||||
stdoutHandle = AsyncProcess.Pipe,
|
||||
)
|
||||
|
||||
await node.waitUntilStarted()
|
||||
|
||||
var execResult = await execCommandEx(
|
||||
"cd " & node.workingDir() & " && " & node.workingDir() / node.executable() &
|
||||
" run " & node.workingDir() / "scripts" / "mine.js --network localhost"
|
||||
)
|
||||
|
||||
assert execResult.status == 0
|
||||
|
||||
execResult = await execCommandEx(
|
||||
"cd " & node.workingDir() & " && " & node.workingDir() / node.executable() &
|
||||
" ignition deploy ignition/modules/marketplace.js --network localhost"
|
||||
)
|
||||
|
||||
assert execResult.status == 0
|
||||
|
||||
trace "hardhat post start scripts executed"
|
||||
except CancelledError as error:
|
||||
raise error
|
||||
except CatchableError as e:
|
||||
|
||||
@ -139,14 +139,12 @@ template multinodesuite*(name: string, body: untyped) =
|
||||
let updatedLogFile = getLogFile(role, none int)
|
||||
args.add "--log-file=" & updatedLogFile
|
||||
|
||||
let node = await HardhatProcess.startNode(args, config.debugEnabled, "hardhat")
|
||||
try:
|
||||
await node.waitUntilStarted()
|
||||
let node = await HardhatProcess.startNode(args, config.debugEnabled, "hardhat")
|
||||
trace "hardhat node started"
|
||||
return node
|
||||
except NodeProcessError as e:
|
||||
raiseMultiNodeSuiteError "hardhat node not started: " & e.msg
|
||||
|
||||
trace "hardhat node started"
|
||||
return node
|
||||
raiseMultiNodeSuiteError "cannot start hardhat process: " & e.msg
|
||||
|
||||
proc newCodexProcess(
|
||||
roleIdx: int, conf: CodexConfig, role: Role
|
||||
|
||||
2
vendor/codex-contracts-eth
vendored
2
vendor/codex-contracts-eth
vendored
@ -1 +1 @@
|
||||
Subproject commit 2dddc260152b6e9c24ae372397f9b9b2d27ce8e4
|
||||
Subproject commit dee3d7b654de02db2e8a023e37120b51150ff6cb
|
||||
Loading…
x
Reference in New Issue
Block a user