Created
September 15, 2021 17:35
-
-
Save polluterofminds/72394e59414f8e9cb6b36146d5729073 to your computer and use it in GitHub Desktop.
Generate Test NFT Metadata In Bulk
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 fs = require("fs"); | |
const faker = require('faker'); | |
const TOTAL = 10_000; | |
const generateRandomMetadata = () => { | |
return { | |
name: faker.name.findName(), | |
description: faker.lorem.sentences(), | |
image: faker.image.avatar() | |
} | |
} | |
(async () => { | |
for(let i=0; i < TOTAL; i++) { | |
const metadata = generateRandomMetadata() | |
fs.writeFileSync(`./metadata/${i}`, JSON.stringify(metadata)); | |
} | |
console.log("Done!"); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment