System contract types

Reference for TRON system contract types covering accounts, balances, staking, voting, governance, smart contracts, permissions, and other commonly used protocol operations.

📘

Prerequisites

A TRON transaction carries exactly one contract payload — raw_data.contract is a list, but the protocol always populates only contract[0]. That payload is a Contract message whose type is a value of the ContractType enum and whose parameter is the corresponding protobuf. This page covers the most commonly used values of ContractType, the protobuf payload each one carries, and the key validation rules each one enforces.

Source enum: enum ContractType in protocol/src/main/protos/core/Tron.proto — the authoritative definition of every value referenced on this page.

Where a value depends on chain state (issuance fees, SR upgrade cost, unstake delay, etc.), the relevant chain parameter is named — query wallet/getchainparameters for the live value rather than hard-coding numbers.


Account & balance

TransferContract — enum 1

Plain TRX transfer.

FieldTypeDescription
owner_addressbytesSender
to_addressbytesRecipient
amountint64Amount in sun

If the recipient address is not yet activated on-chain, the transfer pays the activation fee in addition to the transfer amount — see AccountCreateContract below.

AccountCreateContract — enum 0

Creates a new on-chain account. Most callers do not invoke this directly — sending TRX to an unactivated address triggers the activation flow automatically.

FieldTypeDescription
owner_addressbytesCreator
account_addressbytesNew account address
typeenumAccount type: Normal=0, AssetIssue=1, Contract=2

Cost: chain parameter getCreateNewAccountFeeInSystemContract (currently 1 TRX on Mainnet; defaults to 0 in DynamicPropertiesStore.java:497 — the live value is the post-proposal value).

AccountUpdateContract — enum 10

Sets the human-readable name of an account.

FieldTypeDescription
owner_addressbytesAccount
account_namebytesNew name (UTF-8)

Account names are currently set-once under chain parameter #14 ALLOW_UPDATE_ACCOUNT_NAME (value 0 on Mainnet). Setting the same account a second time fails unless the parameter flips to 1.

SetAccountIdContract — enum 19

Sets a custom account ID (a separate identifier from the address).

FieldTypeDescription
owner_addressbytesAccount
account_idbytesID (ASCII string)

WithdrawBalanceContract — enum 13

Claims accumulated rewards — SR block rewards or voter rewards — into the calling account's balance.

FieldTypeDescription
owner_addressbytesSR or voter address

Cooldown: once per 24 hours (verified in WithdrawBalanceActuator.java:125-128).


TRC-10 asset

TRC-10 is the protocol-level (non-VM) token standard on TRON. Most new fungible tokens use TRC-20 instead — see Token standards overview.

AssetIssueContract — enum 6

Creates a new TRC-10 token.

FieldTypeDescription
idstringToken ID (auto-assigned)
owner_addressbytesIssuer
namebytesToken name; required, 1–32 bytes, with every byte in the printable ASCII range 0x21–0x7E (spaces are not allowed)
abbrbytesSymbol; may be empty. A nonempty value must be 1–32 bytes and follow the same printable-ASCII rule as name
total_supplyint64Total supply (≥ 1)
frozen_supplyFrozenSupply[]Time-locked supply portions
trx_numint32Amount in sun exchanged for num raw token units
numint32Raw token units exchanged for trx_num sun
precisionint32Decimal places (0, or 1–6; capped by PRECISION_DECIMAL = 6)
start_timeint64Issuance window start (ms since epoch)
end_timeint64Issuance window end
descriptionbytesDescription (UTF-8)
urlbytesProject website URL (UTF-8)
vote_scoreint32Reserved
free_asset_net_limitint64Free Bandwidth each holder gets for this token (changeable later via UpdateAssetContract.new_limit)
public_free_asset_net_limitint64Shared free-Bandwidth pool for this token network-wide (changeable later via UpdateAssetContract.new_public_limit)

FrozenSupply sub-fields:

Sub-fieldTypeDescription
frozen_amountint64Amount of tokens frozen
frozen_daysint64Lock duration in days (1–3,652; min MinFrozenSupplyTime = 1, max MaxFrozenSupplyTime = 3652)

Cost: currently 1,024 TRX on Mainnet. Chain parameter #4 getAssetIssueFee controls the amount; query wallet/getchainparameters for the selected network's current value. One issuance per account (AssetIssueActuator.java:286-288).

TransferAssetContract — enum 2

Transfers a TRC-10 token.

FieldTypeDescription
asset_namebytesToken ID (decimal string, e.g., "1000001")
owner_addressbytesSender
to_addressbytesRecipient
amountint64Amount in raw token units (no decimal-precision scaling)

ParticipateAssetIssueContract — enum 9

Buys into an active TRC-10 issuance window.

FieldTypeDescription
owner_addressbytesBuyer
to_addressbytesIssuer
asset_namebytesToken ID
amountint64TRX paid (in sun)

The buyer receives floor(amount × num / trx_num) raw token units, where amount is the TRX payment in sun. Divide the raw token amount by 10^precision to obtain the display amount. Participation is valid only while the on-chain time satisfies start_time ≤ now < end_time; a transaction executed at end_time is rejected.

UpdateAssetContract — enum 15

Updates the description, URL, and quota fields of an existing TRC-10 token.

FieldTypeDescription
owner_addressbytesIssuer
descriptionbytesNew description
urlbytesNew project website
new_limitint64New free Bandwidth limit for each account holding this token, in Bandwidth units
new_public_limitint64New shared free Bandwidth limit for this token across the network, in Bandwidth units

Both values must be non-negative and lower than the network's one-day Bandwidth limit. They update free_asset_net_limit and public_free_asset_net_limit; they do not limit token holdings or issuance.

UnfreezeAssetContract — enum 14

Releases frozen TRC-10 supply (those defined in frozen_supply at issuance).

FieldTypeDescription
owner_addressbytesToken issuer

Voting and Super Representatives

VoteWitnessContract — enum 4

Casts votes for SR candidates. The caller's votes spend their TRON Power (TP) balance.

FieldTypeDescription
owner_addressbytesVoter
votesVote[]List of (SR address, vote count) pairs

Vote sub-fields:

Sub-fieldTypeDescription
vote_addressbytesSR candidate address
vote_countint64TP to allocate (1 staked TRX = 1 TP)

Maximum: 30 votes per call (Parameter.java:68 — MAX_VOTE_NUMBER = 30). The total vote_count cannot exceed the caller's TP.

WitnessCreateContract — enum 5

Registers as an SR candidate.

FieldTypeDescription
owner_addressbytesApplicant
urlbytesSR's project website URL (UTF-8)

Cost: chain parameter #1 getAccountUpgradeCost — currently 9,999 TRX (DynamicPropertiesStore.java:382 default saveAccountUpgradeCost(9_999_000_000L)). The fee is burned (not reclaimable). Successful registration creates an entry in the SR Candidate pool; the account becomes an active SR if it ranks in the top 27 at the next scheduled maintenance update.

WitnessUpdateContract — enum 8

Updates an SR's project URL.

FieldTypeDescription
owner_addressbytesSR address
update_urlbytesNew URL; required, 1–256 bytes

UpdateBrokerageContract — enum 49

Sets an SR's brokerage rate — the percentage of total rewards the SR keeps for itself (the rest goes to voters).

FieldTypeDescription
owner_addressbytesSR
brokerageint32New rate, integer percent in [0, 100] (default 20 on Mainnet)

Stake 1.0 (legacy)

Stake 1.0 is the original time-locked staking model. New integrations should use Stake 2.0. These types remain relevant for decoding historical transactions and releasing stakes created before Stake 2.0 activated.

UnfreezeBalanceContract — enum 12

Legacy: unstake Stake-1.0 TRX. Funds are released immediately on a successful call.

FieldTypeDescription
owner_addressbytesUnstaker
resourceenumResource type that was originally staked
receiver_addressbytesOriginal delegation target (must match the original stake)

Stake 2.0

Current staking model. Source: Staking on the TRON network.

FreezeBalanceV2Contract — enum 54

Stake TRX for resources. Effect is immediate.

FieldTypeDescription
owner_addressbytesStaker
frozen_balanceint64Amount in sun
resourceenum0 = BANDWIDTH, 1 = ENERGY (no time parameter)

UnfreezeBalanceV2Contract — enum 55

Initiates the unstake process. Funds become available after the chain-parameter delay.

FieldTypeDescription
owner_addressbytesUnstaker
unfreeze_balanceint64Amount in sun (≤ currently staked amount)
resourceenum0 = BANDWIDTH, 1 = ENERGY, 2 = TRON_POWER

Delay: chain parameter #70 getUnfreezeDelayDays — currently 14 days on Mainnet (UnfreezeBalanceV2Actuator.java:231). After this period, call WithdrawExpireUnfreezeContract to claim the unstaked TRX.

WithdrawExpireUnfreezeContract — enum 56

Withdraws TRX whose unstake delay has elapsed.

FieldTypeDescription
owner_addressbytesAccount address

CancelAllUnfreezeV2Contract — enum 59

Cancels all Stake 2.0 unstake requests for the account. TRX from requests that are still within the waiting period is returned to its original stake and restores the corresponding resource quota and TRON Power. Amounts whose waiting period has already elapsed are withdrawn to the account balance in the same transaction. The transaction information reports these outcomes in cancel_unfreezeV2_amount and withdraw_expire_amount.

FieldTypeDescription
owner_addressbytesAccount address

DelegateResourceContract — enum 57

Delegates resources from your stake to another address. The receiver gets resource quota but no TP and no ownership of the underlying TRX.

FieldTypeDescription
owner_addressbytesResource owner
resourceenum0 = BANDWIDTH, 1 = ENERGY
balanceint64Amount of staked TRX whose resources to delegate (in sun)
receiver_addressbytesRecipient
lockboolWhether to lock the delegation
lock_periodint64Lock period in blocks (1 block ≈ 3 seconds — BLOCK_PRODUCED_INTERVAL = 3000); only valid when lock = true

Maximum lock_period: chain parameter #78 getMaxDelegateLockPeriod. The protocol default is 86,400 blocks (about 3 days), the theoretical maximum is 10,512,000 blocks (about 365 days), and the current Mainnet value is 864,000 blocks (about 30 days).

UnDelegateResourceContract — enum 58

Reclaims resources from an unlocked delegation, or from a locked delegation after its lock period has expired. For a locked delegation, java-tron treats the balance as reclaimable only when its expiration time is earlier than the current block timestamp.

FieldTypeDescription
owner_addressbytesOriginal delegator
resourceenumMust match the delegation's resource
balanceint64Amount to undelegate (≤ originally delegated)
receiver_addressbytesMust match the delegation's receiver

Governance and proposals

ProposalCreateContract — enum 16

Creates a chain-parameter-change proposal. Submittable by any SR, SR Partner, or SR Candidate.

FieldTypeDescription
owner_addressbytesCreator
parametersmap<int64, int64>Parameter ID → new value pairs

No hard limit on the number of parameter changes per proposal exists in source (ProposalCreateActuator.java:110-116 only rejects empty proposals). The voting window is controlled by chain parameter #92 getProposalExpireTime (currently 3 days). The first maintenance-triggering block at or after expiry counts approvals from the active SR set in effect before that block's maintenance update. A proposal passes with at least 18 eligible approvals; its parameter values are then written to chain state and apply to subsequent blocks.

ProposalApproveContract — enum 17

A registered SR candidate adds or withdraws an approval for a pending proposal.

FieldTypeDescription
owner_addressbytesRegistered SR candidate submitting the approval operation
proposal_idint64Target proposal ID
is_add_approvalbooltrue = add approval; false = withdraw a prior approval

Any registered SR candidate may submit or withdraw an approval before expiration. When the proposal expires, only approvals from the 27 active SRs in the eligible set are counted.

ProposalDeleteContract — enum 18

Cancels a proposal before it expires. Source ProposalDeleteActuator.java:116-118 blocks deletion only if the proposal has already passed its expiration time — there is no 24-hour minimum delay.

FieldTypeDescription
owner_addressbytesMust be the proposal creator
proposal_idint64Target proposal

Smart contracts

CreateSmartContract — enum 30

Deploys a new smart contract.

FieldTypeDescription
owner_addressbytesDeployer
new_contractSmartContractContract definition (see below)
call_token_valueint64TRC-10 amount sent to the new contract (optional)
token_idint64TRC-10 token ID (when call_token_value > 0)

SmartContract sub-fields:

FieldTypeDescription
origin_addressbytesDeployer (same as owner_address)
contract_addressbytesGenerated contract address
abiABIOptional ABI (queryable later via wallet/getcontract)
bytecodebytesCompiled TVM bytecode
call_valueint64TRX (in sun) sent to the constructor
consume_user_resource_percentint64Caller-pays percent, range [0, 100]. protobuf default is 0 (caller pays 0%, deployer 100%); SDKs such as TronWeb fill 100 when the field is unset
namestringContract name (maximum 32 bytes after UTF-8 encoding; checked at validation)
origin_energy_limitint64Deployer's per-call Energy cap; must be > 0 (VMActuator.java:387, no upper limit)

For the Energy / fee_limit / origin_energy_limit interactions in detail, see FeeLimit & Energy cost.

TriggerSmartContract — enum 31

Invokes a function on an existing contract.

FieldTypeDescription
owner_addressbytesCaller
contract_addressbytesTarget contract
databytesABI-encoded call (4-byte selector + 32-byte-padded arguments)
call_valueint64TRX sent with the call (in sun)
call_token_valueint64TRC-10 sent with the call (in raw token units)
token_idint64TRC-10 token ID

See Parameter encoding and decoding for the ABI encoding rules.

UpdateSettingContract — enum 33

Updates a contract's consume_user_resource_percent (the caller/deployer Energy split).

FieldTypeDescription
owner_addressbytesContract deployer
contract_addressbytesTarget contract
consume_user_resource_percentint64New value, [0, 100]

UpdateEnergyLimitContract — enum 45

Updates a contract's origin_energy_limit.

FieldTypeDescription
owner_addressbytesContract deployer
contract_addressbytesTarget contract
origin_energy_limitint64New value; must be > 0 (no documented upper bound)

ClearABIContract — enum 48

Clears the on-chain ABI of a contract. The contract continues to execute normally; only the ABI lookup via wallet/getcontract returns empty afterward.

FieldTypeDescription
owner_addressbytesContract deployer
contract_addressbytesTarget contract

GetContract — enum 32

GetContract is a reserved protocol enum value with no transaction actuator. It cannot be used to build an executable Transaction.Contract; query contract metadata through wallet/getcontract or another node query API.


Account Permission Management

AccountPermissionUpdateContract — enum 46

Updates the multi-sign permission structure of an account — owner permission, optional witness permission (only for SRs), and 1–8 active permissions.

FieldTypeDescription
owner_addressbytesAccount
ownerPermissionOwner permission
witnessPermissionWitness permission (SR-signing, optional, only for SRs)
activesPermission[]Complete updated list; an account must retain at least 1 and may have at most 8 active permissions

Each Permission carries a threshold, a list of (address, weight) keys, and an operations bitmap that gates which contract types this permission can sign. See Multi-signature for the full schema.


Quick lookup

EnumTypeGroup
0AccountCreateContractAccount & balance
1TransferContractAccount & balance
2TransferAssetContractTRC-10
4VoteWitnessContractVoting
5WitnessCreateContractVoting
6AssetIssueContractTRC-10
8WitnessUpdateContractVoting
9ParticipateAssetIssueContractTRC-10
10AccountUpdateContractAccount & balance
12UnfreezeBalanceContractStake 1.0 (legacy)
13WithdrawBalanceContractAccount & balance
14UnfreezeAssetContractTRC-10
15UpdateAssetContractTRC-10
16ProposalCreateContractGovernance
17ProposalApproveContractGovernance
18ProposalDeleteContractGovernance
19SetAccountIdContractAccount & balance
30CreateSmartContractSmart contracts
31TriggerSmartContractSmart contracts
32GetContractSmart contracts (query)
33UpdateSettingContractSmart contracts
45UpdateEnergyLimitContractSmart contracts
46AccountPermissionUpdateContractPermissions
48ClearABIContractSmart contracts
49UpdateBrokerageContractVoting
54FreezeBalanceV2ContractStake 2.0
55UnfreezeBalanceV2ContractStake 2.0
56WithdrawExpireUnfreezeContractStake 2.0
57DelegateResourceContractStake 2.0
58UnDelegateResourceContractStake 2.0
59CancelAllUnfreezeV2ContractStake 2.0

Enum values 7, 21–29, 34–40, 47, 50 are unused in the current proto and reserved for future contract types or have been historically retired.


Related resources