Acknowledge user engagement by minting non-transferable badges for milestone achievements.

Create a token collection

  1. Go to the ‘Tokens’ tab in the Dashboard.
  2. Click ‘+ New Token’. Select a ERC-1155.
  3. Fill out the details and choose ‘non-trasferable’. Click ‘Done’.

Integrate into your application

You can skip the following requirements if you’ve already configured your group’s developer settings.

  1. In the Dashboard, go to the ‘Settings’ tab.
  2. Go to the ‘API keys’ and click ‘Add’ to generate a new key. API.png
  3. Name your API key and click ‘Generate’.

    Copy and save the key in a secured location. We don’t store or retrieve your API keys.

  4. Go to the ‘Allowed domains’ tab and add your app’s domain

Next, add a code snipped to distribute rewards for your users to claim:

import { useClaimTokens } from "@groupos/walletkit/apps"

const { claimTokens, loading } = useClaimTokens({chainId: 1, contractAddress: "0x..."})
const { claimNfts, loading } = useClaimNfts({chainId: 1, contractAddress: "0x..."})

return (
    // ERC-20
    <button
        disabled={loading}
        onClick={() => claimTokens({claimRef: "voting-shares"})}
    >
        {loading ? "Claiming..." : "Claim Voting Shares"}
    </button>
    // ERC-1155
    <button
        disabled={loading}
        onClick={() => claimNfts({tokenId: 1, claimRef: "verified-badge"})}
    >
        {loading ? "Claiming..." : "Claim Verified Badge"}
    </button>
)