From cb13f1115d0a7f2f7f091bba5755439d72dc6261 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Mon, 8 Jul 2024 11:58:43 -0400 Subject: [PATCH] add download of imageHash --- contracts/tasks/runners/exportImages.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contracts/tasks/runners/exportImages.ts b/contracts/tasks/runners/exportImages.ts index 46a78236..4a0b0585 100644 --- a/contracts/tasks/runners/exportImages.ts +++ b/contracts/tasks/runners/exportImages.ts @@ -55,8 +55,9 @@ task('export-images', 'Export project logo images') const round = JSON.parse(data) const projects = round.projects const images = projects.map((project: any) => { - const { bannerImageHash, thumbnailImageHash } = project.metadata - return { bannerImageHash, thumbnailImageHash } + const { bannerImageHash, thumbnailImageHash, imageHash } = + project.metadata + return { bannerImageHash, thumbnailImageHash, imageHash } }) for (let i = 0; i < images.length; i++) { @@ -70,5 +71,10 @@ task('export-images', 'Export project logo images') ipfsHash: images[i].thumbnailImageHash, outputDir, }) + await download({ + gateway, + ipfsHash: images[i].imageHash, + outputDir, + }) } })