Skip to content
Discussion options

You must be logged in to vote

Yes, the extraAttribute config is open to static data or functions.

In this case, max_value would be a fixed values. something like

const extraAttributes = () => [
  {
    trait_type: "Aqua Power",
    display_type: "boost_number",
    value: (Math.random() * 100).toFixed(0),
    max_value: 100,
  },
]

Will return an attribute like the following:

   {
      "trait_type": "Aqua Power",
      "display_type": "boost_number",
      "value": 79,
      "max_value": 100
    }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@j-greig
Comment options

Answer selected by nftchef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #128 on November 11, 2022 05:46.