Reward a badge in your application to celebrate user achievements, such as completing a series of tasks, reaching a milestone, participating in an event, or contributing quality content.

You can create a badge using the sdk or via the dashboard

Before proceeding ensure you’ve instantiated the SDK and created a dApp.
See the Quickstart to get setup.

1

Reward Badge

import { ActivityType, RewardType } from "@openformat/sdk";

const params = {
  receiver: "0x03755352654D73DA06756077Dd7f040ADcE3Fd58", // The address of the user who is receiving the badge
  tokens: [
    {
      id: "complete_quiz", // A given ID for mission a user completes in your application
      address: "INSERT_BADGE_ADDRESS", // The smart contract address of the BADGE you want to reward
      type: RewardType.BADGE,
      activityType: ActivityType.MISSION,
      amount: 1,
      tokenURI:
        "ipfs://bafkreiafldew5domnvgqqzdre6vn67ymdpui2bxpuirsemy4aswlkusggy",
      // https://ipfs.io/ipfs/bafkreiafldew5domnvgqqzdre6vn67ymdpui2bxpuirsemy4aswlkusggy
    },
  ],
};

await sdk.Reward.trigger(params);