Circles Documentation
  • Welcome to Circles
  • Overview
    • Understanding Personal and Group Currencies
      • Personal Currencies
      • Group Currencies
    • Why Build on Circles?
    • Circles Architecture
  • Developer Docs
    • The Circles Stack
    • Circles SDK Overview
    • Quickstart Guide for Circles SDK
    • Setting Circles Profiles
    • Building with different Circles Avatars
      • Personal / Human Avatars
        • Inviting and accepting human avatars
        • Mint personal tokens
        • Fetching profile of an human avatar
        • Manage trust connections
        • Get token balances of an avatar
        • Transfer personal Circles tokens to different avatar
      • Group Avatars
        • Create Base Groups for your community.
          • Vanilla groups with V2 hub
        • Mint group tokens
        • Managing group invites
        • Find groups and memberships
        • Getting total supply of group tokens available
      • Organization Avatars
        • Creation of Organizations
        • Managing trust connections via Org avatar account
  • Tutorials and Examples
    • Setting up Circles SDK with React
  • Querying Circles profiles and data
    • Query Circles Data
    • Subscribing to Avatar events
    • Utilising CirclesQuery Class
    • Query Circles profiles
  • Circles SDK Reference
    • Circles SDK interface
    • SDK Methods
    • Circles Data Methods
    • Circles Events Types
  • Developer Support
    • Glossary
    • Past Hackathon Projects on Circles
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Developer Docs
  2. Building with different Circles Avatars
  3. Group Avatars

Mint group tokens

This method allows a group to mint new Group Circles using trusted collateral tokens. The group specifies which collateral to use and the corresponding amounts.

const groupAddress = '0xYourGroupAddress'; // The address of the group  
const collateralTokens = ['0xToken1', '0xToken2']; // Addresses of the collateral tokens  
const collateralAmounts = [BigInt(1000), BigInt(2000)]; // Corresponding amounts for each token  
const data = new Uint8Array(); // Empty data array or specific data if needed  
  
try {  
    const receipt = await avatar.groupMint(groupAddress, collateralTokens, collateralAmounts, data);  
    console.log('Minting successful:', receipt);  
} catch (error) {  
    console.error('Minting failed:', error);  
}

PreviousVanilla groups with V2 hubNextManaging group invites

Last updated 7 hours ago

Was this helpful?