Skip to content

Commit

Permalink
add download of imageHash
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed Jul 8, 2024
1 parent a562b5c commit cb13f11
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/tasks/runners/exportImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -70,5 +71,10 @@ task('export-images', 'Export project logo images')
ipfsHash: images[i].thumbnailImageHash,
outputDir,
})
await download({
gateway,
ipfsHash: images[i].imageHash,
outputDir,
})
}
})

0 comments on commit cb13f11

Please sign in to comment.