Otterspace Docs
  • Overview
    • 🦦Intro to Otterspace
    • 🔑Key Concepts
      • 🔥Burning and revocation
      • ⏳Expiration
      • 🤓Metadata schemas
    • ❓F.A.Q
  • Documentation
    • 🔌API
      • 🔐Authentication
    • 🐙Subgraph
    • 🛠️Contracts
      • 🎨Create a Badge Spec
      • 🪂Airdrop a Badge
      • ✅Adding to allowlist
      • 🤝Minting allowlisted Badges
      • ➕Add/Remove Admins
  • Guides
    • 🔏Token-gating using badges
  • Integrations
    • Using badges with Snapshot
    • Guild.xyz for token gating
    • Using with Gnosis Safe
    • On OpenSea, Metamask etc
  • Get Help
    • 🕺Discord/Twitter
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Contracts

Create a Badge Spec

Design a Badge Spec & upload to IPFS

PreviousContractsNextAirdrop a Badge

Last updated 1 year ago

Was this helpful?

{
   "schema":"<https://api.otterspace.xyz/schemas/badge/1.0.1.json>",
   "name":"First Badge",
   "description":"Otterspace Badge",
   "properties":{
      "raftTokenId":"90",
      "createdByAddress":"0xeD40624Deb1202e63D0729b6411FfA0Efb333aD9",
    "expiresAt": "2023-07-21T13:57:28.882Z"
   },
   "image":"ipfs://bafybeifqjf35xulfl46uauwbsqbrjgxa4d3iybjvdq7bo6xzdlaq6mpr6u/image"
}

Badges are maximally backward compatible with ERC-721 and hence we use NFT metadata to represent the Badge Spec.

The example Badge Spec above is hosted on IPFS at

Before issuing Badges to Ethereum Accounts, you need to create a Spec like the one above and upload it to IPFS.

🛠️
🎨
https://ipfs.io/ipfs/bafyreigrhoupt3dcjuadq7i34cetwla2axfwayyszffoixfrrmr2ttthoe/metadata.jsonipfs.io