# Hts Fungible Token

> Create and manage fungible tokens on Hedera Token Service — TokenCreateTransaction with admin/KYC/freeze/wipe/supply/pause/feeSchedule keys, treasury, decimals, mint/burn, CryptoTransfer token moves, associate/dissociate, grant/revoke KYC, freeze/unfreeze, wipe, pause/unpause, TokenInfoQuery. Use when user mentions HTS, fungible token, mint, burn, associate token, KYC flag, freeze account, wipe balance, pause token, custom fees, or ERC-20 comparison on Hedera.

- Skill: `evaluris-solutions/hts-fungible-token` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add evaluris-solutions/hts-fungible-token`
- Raw SKILL.md: https://api.skillmd.com/api/skills/evaluris-solutions/hts-fungible-token/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Evaluris-Solutions (https://skillmd.com/u/evaluris-solutions)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/evaluris-solutions/hts-fungible-token

---


## Overview

**HTS** represents fungible assets as native ledger entities with optional compliance controls beyond typical ERC-20 deployments. This skill encodes the procedural mapping between business roles (treasury, compliance, operations) and Hedera key fields documented under [Token Properties](https://docs.hedera.com/hedera/core-concepts/tokens/hedera-token-service-hts-native-tokenization/token-properties.md).

## When to use this skill

- Designing treasury + compliance separation via distinct keys.
- Choosing **infinite** vs **finite** supply (`TokenSupplyType`).
- Debugging association/KYC/freeze precedence issues before transfers succeed.

## Prerequisites

- Funded operator account on intended network.
- Treasury account — defaults to operator in reference scripts; production uses cold treasury.

## Workflow

1. **Model roles → keys** — See [references/key-roles-taxonomy.md](references/key-roles-taxonomy.md).
2. **Create token** — `TokenCreateTransaction` with name, symbol, decimals, initial supply, treasury, keys.

   ```javascript
   await new TokenCreateTransaction()
     .setTokenName("Demo USD")
     .setTokenSymbol("DUSD")
     .setDecimals(8)
     .setInitialSupply(1_000_000)
     .setTreasuryAccountId(treasuryId)
     .setTokenType(TokenType.FungibleCommon)
     .setSupplyType(TokenSupplyType.Infinite)
     .setAdminKey(adminKey)
     .setSupplyKey(supplyKey)
     // ... optional compliance keys
   ```

   Reference: [scripts/create-fungible-token.js](scripts/create-fungible-token.js).

3. **Associate recipients** — Accounts must **opt-in** via `TokenAssociateTransaction` before receiving tokens (unless auto-account patterns apply — verify docs).

4. **Transfers** — `TransferTransaction.addTokenTransfer(tokenId, account, amount)` with signed payer/treasury as required.

5. **Compliance toggles** — `TokenGrantKycTransaction`, `TokenRevokeKycTransaction`, `TokenFreezeTransaction`, `TokenUnfreezeTransaction`, `TokenWipeTransaction`, `TokenPauseTransaction`, `TokenUnpauseTransaction`.

6. **Mint/burn** — `TokenMintTransaction`, `TokenBurnTransaction` require `supplyKey` signatures.

## Examples

**Example 1**

> “Create an infinite-supply governance token with separate admin and supply keys.”

Provision distinct `PrivateKey`s, assign `adminKey` vs `supplyKey`, leave mint-only authority with multisig supply key if policy demands.

**Example 2**

> “Investors must pass KYC before receiving allocations.”

Enable `kycKey`, default deny via documentation + off-chain checks, call **grant KYC** before first transfer.

**Example 3**

> “Pause trading during an incident.”

Use `pauseKey`, document **who** may unpause; communicate regulatory expectations if investors are retail.

## Troubleshooting

| Issue | Meaning |
| --- | --- |
| `TOKEN_NOT_ASSOCIATED_TO_ACCOUNT` | Recipient never associated |
| `ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN` | KYC flag blocking receipt |
| `TOKEN_IS_PAUSED` | Global pause active |
| `INSUFFICIENT_TOKEN_BALANCE` | Treasury empty / wrong decimals math |

## References

- Local: [references/key-roles-taxonomy.md](references/key-roles-taxonomy.md), [references/compliance-config.md](references/compliance-config.md)
- Docs: [Define a token](https://docs.hedera.com/hedera/sdks-and-apis/sdks/token-service/define-a-token.md), [Custom token fees](https://docs.hedera.com/hedera/sdks-and-apis/sdks/token-service/custom-token-fees.md)

