IHederaTokenService
Title: IHederaTokenService
Author: Vendored minimal subset of hiero-ledger/hiero-contracts contracts/token-service/IHederaTokenService.sol
(https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol), commit 5ade6c8 (2026-09-09). Upstream license: Apache-2.0 (Hedera Hashgraph, LLC).
ABI of the Hedera Token Service system contract at 0x0000000000000000000000000000000000000167.
Struct layouts are byte-identical to upstream (they define the create/update selectors). Only the
functions Lattice's HTS modules call are kept; every function returns an int64 response code
(HederaResponseCodes.SUCCESS == 22) instead of reverting.
Getters are declared non-view upstream; Lattice calls the view-classified ones through staticcall.
Functions
associateToken
function associateToken(address account, address token) external returns (int64 responseCode);Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| token | address |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 |
dissociateToken
function dissociateToken(address account, address token) external returns (int64 responseCode);Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| token | address |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 |
transferToken
function transferToken(address token, address sender, address receiver, int64 amount)
external
returns (int64 responseCode);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| sender | address | |
| receiver | address | |
| amount | int64 |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 |
transferNFT
function transferNFT(address token, address sender, address receiver, int64 serialNumber)
external
returns (int64 responseCode);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| sender | address | |
| receiver | address | |
| serialNumber | int64 |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 |
transferFrom
function transferFrom(address token, address from, address to, uint256 amount) external returns (int64 responseCode);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| from | address | |
| to | address | |
| amount | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 |
mintToken
function mintToken(address token, int64 amount, bytes[] memory metadata)
external
returns (int64 responseCode, int64 newTotalSupply, int64[] memory serialNumbers);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| amount | int64 | |
| metadata | bytes[] |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| newTotalSupply | int64 | |
| serialNumbers | int64[] |
burnToken
function burnToken(address token, int64 amount, int64[] memory serialNumbers)
external
returns (int64 responseCode, int64 newTotalSupply);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| amount | int64 | |
| serialNumbers | int64[] |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| newTotalSupply | int64 |
createFungibleToken
function createFungibleToken(HederaToken memory token, int64 initialTotalSupply, int32 decimals)
external
payable
returns (int64 responseCode, address tokenAddress);Parameters
| Name | Type | Description |
|---|---|---|
| token | HederaToken | |
| initialTotalSupply | int64 | |
| decimals | int32 |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| tokenAddress | address |
createNonFungibleToken
function createNonFungibleToken(HederaToken memory token)
external
payable
returns (int64 responseCode, address tokenAddress);Parameters
| Name | Type | Description |
|---|---|---|
| token | HederaToken |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| tokenAddress | address |
updateTokenKeys
function updateTokenKeys(address token, TokenKey[] memory keys) external returns (int64 responseCode);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| keys | TokenKey[] |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 |
isToken
function isToken(address token) external returns (int64 responseCode, bool isToken);Parameters
| Name | Type | Description |
|---|---|---|
| token | address |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| isToken | bool |
getTokenType
function getTokenType(address token) external returns (int64 responseCode, int32 tokenType);Parameters
| Name | Type | Description |
|---|---|---|
| token | address |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| tokenType | int32 |
getTokenInfo
function getTokenInfo(address token) external returns (int64 responseCode, TokenInfo memory tokenInfo);Parameters
| Name | Type | Description |
|---|---|---|
| token | address |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| tokenInfo | TokenInfo |
getFungibleTokenInfo
function getFungibleTokenInfo(address token)
external
returns (int64 responseCode, FungibleTokenInfo memory fungibleTokenInfo);Parameters
| Name | Type | Description |
|---|---|---|
| token | address |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| fungibleTokenInfo | FungibleTokenInfo |
getTokenKey
function getTokenKey(address token, uint256 keyType) external returns (int64 responseCode, KeyValue memory key);Parameters
| Name | Type | Description |
|---|---|---|
| token | address | |
| keyType | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| responseCode | int64 | |
| key | KeyValue |
Structs
Expiry
struct Expiry {
int64 second;
address autoRenewAccount;
int64 autoRenewPeriod;
}Properties
| Name | Type | Description |
|---|---|---|
| second | int64 | |
| autoRenewAccount | address | |
| autoRenewPeriod | int64 |
KeyValue
Exactly one member must be populated. contractId activates only when the given contract's OWN
code runs in the frame that calls HTS; delegatableContractId also activates when that contract
is merely the recipient of the frame (i.e. it is running another contract's code via
delegatecall — every EIP-2535 facet call). Diamonds MUST use delegatableContractId.
struct KeyValue {
bool inheritAccountKey;
address contractId;
bytes ed25519;
bytes ECDSA_secp256k1;
address delegatableContractId;
}Properties
| Name | Type | Description |
|---|---|---|
| inheritAccountKey | bool | |
| contractId | address | |
| ed25519 | bytes | |
| ECDSA_secp256k1 | bytes | |
| delegatableContractId | address |
TokenKey
keyType bit field: 1 admin, 2 kyc, 4 freeze, 8 wipe, 16 supply, 32 fee schedule, 64 pause.
struct TokenKey {
uint256 keyType;
KeyValue key;
}Properties
| Name | Type | Description |
|---|---|---|
| keyType | uint256 | |
| key | KeyValue |
HederaToken
struct HederaToken {
string name;
string symbol;
address treasury;
string memo;
bool tokenSupplyType;
int64 maxSupply;
bool freezeDefault;
TokenKey[] tokenKeys;
Expiry expiry;
}Properties
| Name | Type | Description |
|---|---|---|
| name | string | |
| symbol | string | |
| treasury | address | |
| memo | string | |
| tokenSupplyType | bool | |
| maxSupply | int64 | |
| freezeDefault | bool | |
| tokenKeys | TokenKey[] | |
| expiry | Expiry |
FixedFee
struct FixedFee {
int64 amount;
address tokenId;
bool useHbarsForPayment;
bool useCurrentTokenForPayment;
address feeCollector;
}Properties
| Name | Type | Description |
|---|---|---|
| amount | int64 | |
| tokenId | address | |
| useHbarsForPayment | bool | |
| useCurrentTokenForPayment | bool | |
| feeCollector | address |
FractionalFee
struct FractionalFee {
int64 numerator;
int64 denominator;
int64 minimumAmount;
int64 maximumAmount;
bool netOfTransfers;
address feeCollector;
}Properties
| Name | Type | Description |
|---|---|---|
| numerator | int64 | |
| denominator | int64 | |
| minimumAmount | int64 | |
| maximumAmount | int64 | |
| netOfTransfers | bool | |
| feeCollector | address |
RoyaltyFee
struct RoyaltyFee {
int64 numerator;
int64 denominator;
int64 amount;
address tokenId;
bool useHbarsForPayment;
address feeCollector;
}Properties
| Name | Type | Description |
|---|---|---|
| numerator | int64 | |
| denominator | int64 | |
| amount | int64 | |
| tokenId | address | |
| useHbarsForPayment | bool | |
| feeCollector | address |
TokenInfo
struct TokenInfo {
HederaToken token;
int64 totalSupply;
bool deleted;
bool defaultKycStatus;
bool pauseStatus;
FixedFee[] fixedFees;
FractionalFee[] fractionalFees;
RoyaltyFee[] royaltyFees;
string ledgerId;
}Properties
| Name | Type | Description |
|---|---|---|
| token | HederaToken | |
| totalSupply | int64 | |
| deleted | bool | |
| defaultKycStatus | bool | |
| pauseStatus | bool | |
| fixedFees | FixedFee[] | |
| fractionalFees | FractionalFee[] | |
| royaltyFees | RoyaltyFee[] | |
| ledgerId | string |
FungibleTokenInfo
struct FungibleTokenInfo {
TokenInfo tokenInfo;
int32 decimals;
}Properties
| Name | Type | Description |
|---|---|---|
| tokenInfo | TokenInfo | |
| decimals | int32 |