Parameters
Parameter | Type | Description |
---|---|---|
denom_creation_fee | Coins | Fee charged for creating new custom tokens |
denom_creation_gas_consume | uint64 | Additional gas consumed during token creation |
fee_collector_address | string | Address where creation fees are sent |
whitelisted_hooks | WhitelistedHook[] | List of approved before-send hook contracts |
Messages
MsgCreateDenom
Create a new custom token denomination. Fields:sender
: Address creating the tokensubdenom
: Alphanumeric identifier (max 44 characters)
new_token_denom
: Full denomination (factory/{creator_address}/{subdenom}
)
MsgMint
Mint tokens to the sender’s address or specified mint_to_address (admin only). Fields:sender
: Token admin addressamount
: Coin to mintmint_to_address
: Recipient address (optional, defaults to sender)
MsgBurn
Burn tokens from the sender’s address or specified burn_from_address (admin only). Fields:sender
: Token admin addressamount
: Coin to burnburn_from_address
: Address to burn from (optional, defaults to sender)
MsgChangeAdmin
Change the admin of a token denomination (admin only). Fields:sender
: Current admin addressdenom
: Token denominationnew_admin
: New admin address (empty string to renounce)
MsgSetDenomMetadata
Set or update token metadata using a metadata file (admin only). Fields:sender
: Token admin addressmetadata
: Token metadata (bank module metadata format)
MsgSetBeforeSendHook
Set or remove a before-send hook for a token (admin only). Fields:sender
: Token admin addressdenom
: Token denominationcontract_addr
: Hook contract address (empty to remove)
MsgForceTransfer
Force a transfer that bypasses before-send hooks (admin only). Fields:sender
: Token admin addressamount
: Coin to transfertransfer_from_address
: Source addresstransfer_to_address
: Destination address
Queries
QueryParams
Retrieve current module parameters. CLI:QueryDenomAuthorityMetadata
Retrieve admin address for a token denomination. CLI:QueryDenomsFromCreator
Retrieve all tokens created by a specific address. CLI:QueryBeforeSendHookAddress
Retrieve the before-send hook contract for a token. CLI:QueryFullDenom
Construct the full denomination from creator and subdenom. Note: This query is available via gRPC but not implemented in CLI.Key Concepts
- Token Format:
factory/{creator_address}/{subdenom}
- Admin Control: Token creators have admin rights by default
- Before-Send Hooks: Optional contracts called before every transfer
- Whitelisted Hooks: Only governance-approved contracts can be used as hooks
- Creation Fees: Configurable fees sent to fee collector address
- Force Transfer: Admins can bypass hooks for emergency situations
- Length Limits: Subdenom max 44 chars, creator max 75 chars
- Module Account Protection: Burning from module accounts is prevented