Created
November 1, 2021 07:07
-
-
Save rafinskipg/03caf61d12f3607cf19adf6155adc70c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const description = "My nft is cool, this is the image number: 1" | |
const attributes = [{ | |
trait_type: 'Hair', | |
value: 'None' | |
}] | |
const dataNft = await uploadNFTStorage(`./output/images/${items[i].tokenId}.png`, `${items[i].tokenId}`, description, attributes); | |
const info: TokenIpfs = { | |
name: 'Image 1', | |
tokenId: 1, | |
description, | |
image: dataNft.ipfsImage, | |
hostedImage: dataNft.hostedImage, | |
imageMetadata: dataNft.url, | |
attributes | |
} | |
fs.writeFileSync(`./output/data/${item.tokenId}.json`, JSON.stringify(info, null, 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment