Created
May 17, 2022 22:57
-
-
Save doingthisalright/dcc32003731661e14a83ded5da701d56 to your computer and use it in GitHub Desktop.
Metaplex: Generate NFT Configuration files
This file contains 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
// Usage `node GenerateNftConfigFiles.js` | |
const fs = require('fs') | |
const totalNFTSize = 10000; | |
for (let index = 0; index < totalNFTSize; index++) { | |
const content = { | |
"name": `<NAME>`, | |
"symbol": `<SYM>`, | |
"seller_fee_basis_points": 500, | |
"image": `image.jpg`, | |
"properties": { | |
"files": [ | |
{ | |
"uri": `image.jpg`, | |
"type": "image/jpg" | |
} | |
], | |
"creators": [ | |
{ | |
"address": "<ADDRESS>", | |
"share": 100 | |
} | |
] | |
}, | |
"collection": { | |
"name": `<Name>`, | |
"family": "<Family>" | |
} | |
}; | |
const fileName = `./assets/${index}.json`; | |
fs.writeFile(fileName, JSON.stringify(content, null, 2), function(err) { | |
if(err) { | |
console.log(err); | |
} else { | |
console.log("JSON saved to " + fileName); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment