fungible-token
Simple fungible token with fixed or unlimited supply and configurable mint/transfer approvals
Fungible Token
Instruction text for agents that use the Fungible Token skill, loaded by bb dev skills fungible-token and the MCP get_skill_instructions tool.
Try it
Paste this into Claude Code, Codex, or Cursor with the BitBadges MCP server wired. The agent loads the skill, builds, verifies, and hands back a link to review and sign.
Load the fungible-token skill and build me one: simple fungible token with fixed or unlimited supply and configurable mint/transfer approvals. Use the session tools, run validate, review, and simulate in parallel, fix anything critical, then call get_review_url and give me the link.From a shell, bb dev skills fungible-token prints the same instructions.
Summary
Required standards: ["Fungible Tokens"]
- validTokenIds: must be exactly [{ "start": "1", "end": "1" }] (single token ID)
- All tokens share the same token ID (1), making them interchangeable
- Amount field in transfers determines quantity
- Token metadata must reference token ID 1
- Ownership times typically forever: [{ "start": "1", "end": "18446744073709551615" }]
Instructions
Fungible Token Configuration
When creating a fungible token collection, you must follow these requirements:
Required Configuration
-
validTokenIds: Set to exactly [{ "start": "1", "end": "1" }]
- This ensures only token ID 1 is valid
- This is the standard pattern for fungible tokens
-
Standards: Include "Fungible Tokens" in the standards array
- Example: "standards": ["Fungible Tokens"]
-
Token Metadata: Each tokenMetadata entry must reference token ID 1
- Example: "tokenIds": [{ "start": "1", "end": "1" }]
Supply Tracking with approvalAmounts
Fungible tokens use approvalAmounts (not predeterminedBalances) to track minting supply:
{
"approvalCriteria": {
"overridesFromOutgoingApprovals": true,
"approvalAmounts": {
"overallApprovalAmount": "1000000",
"perInitiatedByAddressApprovalAmount": "1000",
"perToAddressApprovalAmount": "0",
"perFromAddressApprovalAmount": "0",
"amountTrackerId": "mint-tracker",
"resetTimeIntervals": { "startTime": "0", "intervalLength": "0" }
}
}
}- overallApprovalAmount: total supply cap (use "0" for unlimited)
- perInitiatedByAddressApprovalAmount: max per user (use "0" for unlimited)
- Important: predeterminedBalances and approvalAmounts are incompatible, fungible tokens use approvalAmounts, not predeterminedBalances
Pattern-Specific Gotchas
- All tokens share the same token ID (1), making them interchangeable
- Amount field in transfers determines quantity (e.g., "amount": "100" means 100 tokens)
- Ownership times are typically forever: [{ "start": "1", "end": "18446744073709551615" }]
Common Mistakes
- Don't use predeterminedBalances for fungible tokens, use approvalAmounts instead. They are incompatible.
- Don't use numbers instead of strings for amounts, use "1000" not 1000. All numeric values must be string-encoded.
- Don't forget autoApproveAllIncomingTransfers: true in defaultBalances, without it, recipients cannot receive tokens on public-mint collections.
- Don't forget overridesFromOutgoingApprovals: true on Mint approvals, required for all fromListId: "Mint" approvals.
- Don't use multiple token IDs, fungible tokens must use exactly one token ID [{ "start": "1", "end": "1" }].
Example Structure
{
"updateValidTokenIds": true,
"validTokenIds": [{ "start": "1", "end": "1" }],
"updateStandards": true,
"standards": ["Fungible Tokens"],
"updateTokenMetadata": true,
"tokenMetadata": [{
"uri": "ipfs://...",
"customData": "",
"tokenIds": [{ "start": "1", "end": "1" }]
}]
}