Skip to content
Lattice

IHederaTokenService

Git Source

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

NameTypeDescription
accountaddress
tokenaddress

Returns

NameTypeDescription
responseCodeint64

dissociateToken

function dissociateToken(address account, address token) external returns (int64 responseCode);

Parameters

NameTypeDescription
accountaddress
tokenaddress

Returns

NameTypeDescription
responseCodeint64

transferToken

function transferToken(address token, address sender, address receiver, int64 amount)
        external
        returns (int64 responseCode);

Parameters

NameTypeDescription
tokenaddress
senderaddress
receiveraddress
amountint64

Returns

NameTypeDescription
responseCodeint64

transferNFT

function transferNFT(address token, address sender, address receiver, int64 serialNumber)
        external
        returns (int64 responseCode);

Parameters

NameTypeDescription
tokenaddress
senderaddress
receiveraddress
serialNumberint64

Returns

NameTypeDescription
responseCodeint64

transferFrom

function transferFrom(address token, address from, address to, uint256 amount) external returns (int64 responseCode);

Parameters

NameTypeDescription
tokenaddress
fromaddress
toaddress
amountuint256

Returns

NameTypeDescription
responseCodeint64

mintToken

function mintToken(address token, int64 amount, bytes[] memory metadata)
        external
        returns (int64 responseCode, int64 newTotalSupply, int64[] memory serialNumbers);

Parameters

NameTypeDescription
tokenaddress
amountint64
metadatabytes[]

Returns

NameTypeDescription
responseCodeint64
newTotalSupplyint64
serialNumbersint64[]

burnToken

function burnToken(address token, int64 amount, int64[] memory serialNumbers)
        external
        returns (int64 responseCode, int64 newTotalSupply);

Parameters

NameTypeDescription
tokenaddress
amountint64
serialNumbersint64[]

Returns

NameTypeDescription
responseCodeint64
newTotalSupplyint64

createFungibleToken

function createFungibleToken(HederaToken memory token, int64 initialTotalSupply, int32 decimals)
        external
        payable
        returns (int64 responseCode, address tokenAddress);

Parameters

NameTypeDescription
tokenHederaToken
initialTotalSupplyint64
decimalsint32

Returns

NameTypeDescription
responseCodeint64
tokenAddressaddress

createNonFungibleToken

function createNonFungibleToken(HederaToken memory token)
        external
        payable
        returns (int64 responseCode, address tokenAddress);

Parameters

NameTypeDescription
tokenHederaToken

Returns

NameTypeDescription
responseCodeint64
tokenAddressaddress

updateTokenKeys

function updateTokenKeys(address token, TokenKey[] memory keys) external returns (int64 responseCode);

Parameters

NameTypeDescription
tokenaddress
keysTokenKey[]

Returns

NameTypeDescription
responseCodeint64

isToken

function isToken(address token) external returns (int64 responseCode, bool isToken);

Parameters

NameTypeDescription
tokenaddress

Returns

NameTypeDescription
responseCodeint64
isTokenbool

getTokenType

function getTokenType(address token) external returns (int64 responseCode, int32 tokenType);

Parameters

NameTypeDescription
tokenaddress

Returns

NameTypeDescription
responseCodeint64
tokenTypeint32

getTokenInfo

function getTokenInfo(address token) external returns (int64 responseCode, TokenInfo memory tokenInfo);

Parameters

NameTypeDescription
tokenaddress

Returns

NameTypeDescription
responseCodeint64
tokenInfoTokenInfo

getFungibleTokenInfo

function getFungibleTokenInfo(address token)
        external
        returns (int64 responseCode, FungibleTokenInfo memory fungibleTokenInfo);

Parameters

NameTypeDescription
tokenaddress

Returns

NameTypeDescription
responseCodeint64
fungibleTokenInfoFungibleTokenInfo

getTokenKey

function getTokenKey(address token, uint256 keyType) external returns (int64 responseCode, KeyValue memory key);

Parameters

NameTypeDescription
tokenaddress
keyTypeuint256

Returns

NameTypeDescription
responseCodeint64
keyKeyValue

Structs

Expiry

struct Expiry {
        int64 second;
        address autoRenewAccount;
        int64 autoRenewPeriod;
    }

Properties

NameTypeDescription
secondint64
autoRenewAccountaddress
autoRenewPeriodint64

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

NameTypeDescription
inheritAccountKeybool
contractIdaddress
ed25519bytes
ECDSA_secp256k1bytes
delegatableContractIdaddress

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

NameTypeDescription
keyTypeuint256
keyKeyValue

HederaToken

struct HederaToken {
        string name;
        string symbol;
        address treasury;
        string memo;
        bool tokenSupplyType;
        int64 maxSupply;
        bool freezeDefault;
        TokenKey[] tokenKeys;
        Expiry expiry;
    }

Properties

NameTypeDescription
namestring
symbolstring
treasuryaddress
memostring
tokenSupplyTypebool
maxSupplyint64
freezeDefaultbool
tokenKeysTokenKey[]
expiryExpiry

FixedFee

struct FixedFee {
        int64 amount;
        address tokenId;
        bool useHbarsForPayment;
        bool useCurrentTokenForPayment;
        address feeCollector;
    }

Properties

NameTypeDescription
amountint64
tokenIdaddress
useHbarsForPaymentbool
useCurrentTokenForPaymentbool
feeCollectoraddress

FractionalFee

struct FractionalFee {
        int64 numerator;
        int64 denominator;
        int64 minimumAmount;
        int64 maximumAmount;
        bool netOfTransfers;
        address feeCollector;
    }

Properties

NameTypeDescription
numeratorint64
denominatorint64
minimumAmountint64
maximumAmountint64
netOfTransfersbool
feeCollectoraddress

RoyaltyFee

struct RoyaltyFee {
        int64 numerator;
        int64 denominator;
        int64 amount;
        address tokenId;
        bool useHbarsForPayment;
        address feeCollector;
    }

Properties

NameTypeDescription
numeratorint64
denominatorint64
amountint64
tokenIdaddress
useHbarsForPaymentbool
feeCollectoraddress

TokenInfo

struct TokenInfo {
        HederaToken token;
        int64 totalSupply;
        bool deleted;
        bool defaultKycStatus;
        bool pauseStatus;
        FixedFee[] fixedFees;
        FractionalFee[] fractionalFees;
        RoyaltyFee[] royaltyFees;
        string ledgerId;
    }

Properties

NameTypeDescription
tokenHederaToken
totalSupplyint64
deletedbool
defaultKycStatusbool
pauseStatusbool
fixedFeesFixedFee[]
fractionalFeesFractionalFee[]
royaltyFeesRoyaltyFee[]
ledgerIdstring

FungibleTokenInfo

struct FungibleTokenInfo {
        TokenInfo tokenInfo;
        int32 decimals;
    }

Properties

NameTypeDescription
tokenInfoTokenInfo
decimalsint32