Back to problems

Generate Random NFT

Object-Oriented Programming · Coinbase · Medium

Given a configuration that defines a set of traits along with the permissible values for each, your task is to produce n NFTs. An NFT is formed by randomly choosing exactly one value for every trait. Since duplicates are allowed, multiple NFTs may share the same combination of trait values. The configuration is provided as a JSON object with a traits field. Each trait maps to an array of possible values. Example JSON Configuration: Constraints: You can assume the JSON string…

Checking your access…