How to Create Community Badges
This guide explains how third-party DAOs, NFT projects, and Web3 protocols can deploy custom ERC-1155 badge contracts using Society Protocol's CommunityWrapperFactory (0x84ffd2805af9d0946e02Fe19Cd1eE58228669B0e).
💡 Overview
Deploying custom badges through the factory provides your project with instant compatibility across Society Protocol's ecosystem:
- No Smart Contract Coding: Initialize permissioned ERC-1155 badges via single factory calls.
- Automatic Registry Indexing: Deployed wrappers register immediately in
CommunityRegistry(0xEa00...EB76). - Custom Minting & Transfer Rules: Define whether your badges are soulbound, burnable, or transferable.
🛠️ Deployment Methods
Method 1: Web Interface (Recommended)
-
Navigate to the Community Developer Console (accessible once logged in).
-
Connect your community admin wallet (or Safe multisig).
-
Fill out your community metadata:
- Community Name: (e.g. Acme DAO)
- Badge Symbol: (e.g. ACME)
-
Base URI:
ipfs://.../(Metadata directory URI) -
Select permission flags (Mintable by admin, Transferable, Burnable).
-
Click Deploy Community Wrapper and execute the transaction.
Method 2: Smart Contract Interaction (CLI / Foundry / Hardhat)
Developers can interact directly with CommunityWrapperFactory at 0x84ffd2805af9d0946e02Fe19Cd1eE58228669B0e.
// Interface Excerpt
interface ICommunityWrapperFactory {
function createCommunityWrapper(
string memory name,
string memory symbol,
string memory baseURI,
address admin,
bool isSoulbound
) external returns (address wrapperAddress);
}
Example Deployment via Foundry Cast:
cast send 0x84ffd2805af9d0946e02Fe19Cd1eE58228669B0e \
"createCommunityWrapper(string,string,string,address,bool)" \
"Acme Community" "ACME" "ipfs://QmYourHash/" 0xYourAdminAddress true \
--rpc-url https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY \
--private-key $PRIVATE_KEY
⚙️ Post-Deployment Management
Once deployed:
-
Minting Badges: The assigned admin address can call
mintBadge(address to, uint256 id, uint256 amount)on the returnedCommunityWrapperinstance. -
Hook Integration: Attach optional hooks (e.g.
SingleMintHookor custom gating logic) to restrict issuance parameters.