API Reference

Address: 0x0000000000000000000000000000000000001001

Complete interface for interacting with the BitBadges tokenization module from Solidity contracts.

Type System

All types are defined in TokenizationTypes.sol and mirror the Cosmos SDK proto definitions. Use TokenizationHelpers.sol for constructing types.

Key Types:

  • UintRange: Range of IDs (start, end inclusive)

  • Balance: Token balance with amount, ownership times, and token IDs

  • CollectionMetadata: Collection-level metadata

  • TokenMetadata: Token-level metadata

  • UserBalanceStore: Complete user balance and approval state

  • CollectionPermissions: Collection-level permissions

See contracts/types/TokenizationTypes.sol for complete definitions.

Transaction Methods

Collection Management

createCollection

Creates a new token collection. Returns the collection ID.

updateCollection

Updates an existing collection.

deleteCollection

Deletes a collection (only creator can delete).

setManager, setCollectionMetadata, setStandards, setCustomData, setIsArchived

Collection configuration methods.

Token Management

setValidTokenIds

Sets valid token ID ranges for a collection.

setTokenMetadata

Sets metadata for specific token ID ranges.

Transfers

transferTokens

Transfers tokens from the caller to one or more recipients.

Example:

Approvals

setIncomingApproval, setOutgoingApproval

Set incoming/outgoing approvals with complex criteria (merkle challenges, voting, time-based checks, etc.).

deleteIncomingApproval, deleteOutgoingApproval

Delete approvals by ID.

updateUserApprovals

Update user approvals with update flags.

setCollectionApprovals

Set collection-level approvals.

purgeApprovals

Purge expired or specified approvals.

Dynamic Stores

createDynamicStore, updateDynamicStore, deleteDynamicStore

Manage dynamic key-value stores for flexible data storage.

setDynamicStoreValue

Set a value in a dynamic store for an address.

Address Lists

createAddressLists

Create one or more address lists.

Voting

castVote

Cast a vote on a proposal.

Query Methods

Collections

getCollection

Queries a collection by ID. Returns TokenCollection struct.

Balances

getBalance

Queries a user's complete balance store. Returns UserBalanceStore struct.

getBalanceAmount

Queries the total balance amount for specific token IDs and ownership times. Returns uint256.

getTotalSupply

Queries the total supply for specific token IDs and ownership times. Returns uint256.

Address Lists

getAddressList

Queries an address list by ID. Returns AddressList struct.

Dynamic Stores

getDynamicStore, getDynamicStoreValue

Query dynamic stores and their values.

Approvals and Trackers

getApprovalTracker, getChallengeTracker, getETHSignatureTracker

Query approval tracking data.

Voting

getVote, getVotes

Query voting data.

Other

getWrappableBalances

Queries wrappable balances for a denom and address.

isAddressReservedProtocol, getAllReservedProtocolAddresses

Protocol address utilities.

params

Queries module parameters.

Helper Library

Use TokenizationHelpers.sol for constructing and validating types:

Security Note

The creator field in all transaction methods is automatically set from msg.sender and cannot be specified by calling contracts. This prevents impersonation attacks.

Implementation Details

For detailed gas costs, error codes, and implementation specifics, see:

Last updated