Hedera Token Service System Contract

Hedera enables the native creation of fungible and non-fungible tokens through its SDKs, eliminating the need for smart contracts. This approach leverages Hedera's core features like high TPS, security, and low latency for an optimized user experience. Additionally, the Hedera Token Service provides a cost-effective method for tokenization. Smart contracts on Hedera can also interact with this service via the Hedera Token Service System contract, offering functionalities like token creation, burning, and minting through the EVM.

Some of the key functions defined in the Hedera Token Service System Contract include:

Function Name
Consensus Node Release Version
HIP
Method Interface

allowance

allowance(address token, address owner, address spender)

approve

approve(address token, address to, uint256 tokenId)

approveNFT

approveNFT(address token, address to, uint256 tokenId)

associate

associate()

associateToken

associateToken(address account, address token)

associateTokens

associateTokens(address account, address[] memory tokens)

burnToken

burnToken(address token, int64 amount, int64[] memory serialNumbers)

createFungibleToken

createFungibleToken(HederaToken memory token, int64 initialTotalSupply, int32 decimals)

createFungibleTokenWithCustomFees

createFungibleTokenWithCustomFees(HederaToken memory token, int64 initialTotalSupply, int32 decimals, FixedFee[] memory fixedFees, FractionalFee[] memory fractionalFees)

createNonFungibleToken

createNonFungibleToken(HederaToken memory token)

createNonFungibleTokenWithCustomFees

createNonFungibleTokenWithCustomFees(HederaToken memory token, FixedFee[] memory fixedFees, RoyaltyFee[] memory royaltyFees)

cryptoTransfer

Unreleased

cryptoTransfer(TransferList memory transferList, TokenTransferList[] memory tokenTransfers) external returns (int64 responseCode)

deleteToken

deleteToken(address token)

dissociate

dissociate()

dissociateToken

dissociateToken(address account, address token)

dissociateTokens

dissociateTokens(address account, address[] memory tokens)

freezeToken

freezeToken(address token, address account)

getApproved

getApproved(address token, uint256 tokenId)

getFungibleTokenInfo

getFungibleTokenInfo(address token)

getNonFungibleTokenInfo

getNonFungibleTokenInfo(address token, int64 serialNumber)

getTokenCustomFees

getTokenCustomFees(address token)

getTokenDefaultFreezeStatus

getTokenDefaultFreezeStatus(address token)

getTokenDefaultKycStatus

getTokenDefaultKycStatus(address token)

getTokenExpiryInfo

getTokenExpiryInfo(address token)

getTokenInfo

getTokenInfo(address token)

getTokenKey

getTokenKey(address token, uint256 keyType)

getTokenType

getTokenType(address token)

grantTokenKyc

grantTokenKyc(address token, address account)

isAssociated

isAssociated()

isApprovedForAll

isApprovedForAll(address token, address owner, address operator)

isFrozen

isFrozen(address token, address account)

isKyc

isKyc(address token, address account)

isToken

isToken(address token)

mintToken

mintToken(address token, int64 amount, bytes[] memory metadata)

redirectForToken

redirectForToken(address token, bytes memory data)

revokeTokenKyc

revokeTokenKyc(address token, address account)

setApprovalForAll

setApprovalForAll(address token, address operator, bool approved)

transferFrom

transferFrom(address token, address from, address to, uint256 tokenId)

transferFromNFT

transferFromNFT(address token, address from, address to, uint256 serialNumber)

transferNFT

transferNFT(address token, address sender, address recipient, int64 serialNum)

transferNFTs

transferNFTs(address token, address[] memory sender, address[] memory receiver, int64[] memory serialNumber)

transferToken

transferToken(address token, address sender, address recipient, int64 amount)

transferTokens

transferTokens(address token, address[] memory accountId, int64[] memory amount)

unfreezeToken

unfreezeToken(address token, address account)

unpauseToken

unpauseToken(address token)

updateTokenExpiryInfo

updateTokenExpiryInfo(address token, Expiry expiry)

updateTokenInfo

updateTokenInfo(address token, HederaToken hederaToken)

updateTokenKeys

updateTokenKeys(address token, Expiry expiry)

wipeTokenAccount

wipeTokenAccount(address token, address account, int64 amount)

wipeTokenAccountNFT

wipeTokenAccountNFT(address token, address account, int64[] serialNumbers)

Given your HTS token address, you can invoke these functions:

Function Name
Consensus Node Release Version
HIP
Method Interface

allowance

allowance(address owner, address spender)

approve

approve(address to, uint256 tokenId)

getApproved

getApproved(uint256 tokenId)

isApprovedForAll

isApprovedForAll(address token, address owner, address operator)

setApprovalForAll

setApprovalForAll(address operator, bool approved)

transferFrom

transferFrom(address from, address to, uint256 tokenId)

Example

Deploy a Contract Using the Hedera Token Service

Additional References

https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service

Last updated