System contract types

Reference for every system contract type a TRON transaction can carry — account, balance, staking, voting, governance, smart contracts, permissions, exchange, and market.

📘

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 (UTF-8, max 32 bytes)
abbrbytesSymbol (UTF-8, max 16 bytes)
total_supplyint64Total supply (≥ 1)
frozen_supplyFrozenSupply[]Time-locked supply portions
trx_numint32TRX needed to buy num tokens (price numerator/denominator)
numint32Token count per trx_num TRX
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: chain parameter #4 getAssetIssueFee — currently 1,024 TRX (verified in DynamicPropertiesStore.java:515, default saveAssetIssueFee(1024000000L)). 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 token amount delivered is computed from the issuance's trx_num / num price ratio and precision. Only valid while the current time is within start_time ≤ now ≤ end_time.

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 per-account holding limit
new_public_limitint64New public-offering limit

UnfreezeAssetContract — enum 14

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

FieldTypeDescription
owner_addressbytesToken issuer

VoteAssetContract — enum 3 (deprecated)

Defined in the proto but has no active actuator in current java-tron. Listed here only for completeness; never construct or expect this contract type in modern transactions.


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:68MAX_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 Maintenance Period.

WitnessUpdateContract — enum 8

Updates an SR's project URL.

FieldTypeDescription
owner_addressbytesSR address
update_urlbytesNew URL (UTF-8, can be empty to clear)

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 code should use Stake 2.0 instead — these actuators remain for backward compatibility with assets staked before Stake 2.0 activated.

FreezeBalanceContract — enum 11

Legacy: stake TRX for resources.

FieldTypeDescription
owner_addressbytesStaker
frozen_balanceint64Amount in sun
frozen_durationint64Lock duration in days (originally 3, see chain history)
resourceenum0 = BANDWIDTH, 1 = ENERGY
receiver_addressbytesOptional delegation target

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 pending Stake 2.0 unstake operations. The TRX is re-staked at the original resource type; resource quotas are restored. Cannot cancel an unstake whose delay has already elapsed (use WithdrawExpireUnfreezeContract instead).

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 delegated resources before the lock period expires (or immediately for unlocked delegations).

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). Voting window: chain parameter #92 getProposalExpireTime (3 days). A proposal passes when at least 18 active SRs have approved it by expiry, and it takes effect at that same moment.

ProposalApproveContract — enum 17

Active SR votes on a pending proposal.

FieldTypeDescription
owner_addressbytesVoting SR
proposal_idint64Target proposal ID
is_add_approvalbooltrue = add approval; false = withdraw a prior approval

Only the 27 active SRs may vote. Each SR can change its vote any time before expiration.

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 (max 32 bytes; 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

Query-only contract type (not a state-changing transaction). Returns the contract's metadata. Most callers use the wallet/getcontract HTTP endpoint rather than building this contract type directly.


Account Permission Management

AccountPermissionUpdateContract — enum 46

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

FieldTypeDescription
owner_addressbytesAccount
ownerPermissionOwner permission
witnessPermissionWitness permission (SR-signing, optional, only for SRs)
activesPermission[]List of 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.


Exchange (TRX ↔ TRC-10 / TRC-10 ↔ TRC-10 on-chain DEX)

The exchange contracts implement an on-chain bonding-curve DEX between TRX and TRC-10 tokens, or between two TRC-10 tokens. Most modern token swaps use TVM-based DEXes (SunSwap, etc.) on top of TRC-20 instead, but the exchange contract types remain active in source.

ExchangeCreateContract — enum 41

Creates a new exchange (token pair).

FieldTypeDescription
owner_addressbytesCreator
first_token_idbytesFirst token's ID (or _ for TRX)
first_token_balanceint64Initial balance of first token
second_token_idbytesSecond token's ID (or _ for TRX)
second_token_balanceint64Initial balance of second token

ExchangeInjectContract — enum 42

Adds liquidity to an existing exchange.

FieldTypeDescription
owner_addressbytesLiquidity provider
exchange_idint64Target exchange
token_idbytesToken being injected
quantint64Amount to inject

ExchangeWithdrawContract — enum 43

Withdraws liquidity from an existing exchange.

FieldTypeDescription
owner_addressbytesLiquidity provider
exchange_idint64Target exchange
token_idbytesToken to withdraw
quantint64Amount to withdraw

ExchangeTransactionContract — enum 44

Trades against an existing exchange.

FieldTypeDescription
owner_addressbytesTrader
exchange_idint64Target exchange
token_idbytesToken the trader is paying
quantint64Amount being paid
expectedint64Minimum amount of the other token expected (slippage guard)

Market (on-chain limit-order DEX)

The market contracts implement a generic limit-order DEX over TRC-10 / TRX pairs. Like the exchange contracts above, the bulk of modern DEX activity has moved to TVM-based AMMs, but these contract types remain part of the protocol.

MarketSellAssetContract — enum 52

Places a sell order.

FieldTypeDescription
owner_addressbytesSeller
sell_token_idbytesToken offered
sell_token_quantityint64Amount offered
buy_token_idbytesToken wanted
buy_token_quantityint64Amount wanted

MarketCancelOrderContract — enum 53

Cancels a previously-placed order.

FieldTypeDescription
owner_addressbytesOrder placer
order_idbytesTarget order's ID

Legacy / deprecated

CustomContract — enum 20

Legacy custom-contract opcode for protocol versions ≤ v4.1.2. Do not use. New deployments must use TriggerSmartContract.

VoteAssetContract — enum 3

Defined in proto but no active actuator (see above under TRC-10 asset).


Quick lookup

EnumTypeGroup
0AccountCreateContractAccount & balance
1TransferContractAccount & balance
2TransferAssetContractTRC-10
3VoteAssetContractDeprecated
4VoteWitnessContractVoting
5WitnessCreateContractVoting
6AssetIssueContractTRC-10
8WitnessUpdateContractVoting
9ParticipateAssetIssueContractTRC-10
10AccountUpdateContractAccount & balance
11FreezeBalanceContractStake 1.0 (legacy)
12UnfreezeBalanceContractStake 1.0 (legacy)
13WithdrawBalanceContractAccount & balance
14UnfreezeAssetContractTRC-10
15UpdateAssetContractTRC-10
16ProposalCreateContractGovernance
17ProposalApproveContractGovernance
18ProposalDeleteContractGovernance
19SetAccountIdContractAccount & balance
20CustomContractDeprecated
30CreateSmartContractSmart contracts
31TriggerSmartContractSmart contracts
32GetContractSmart contracts (query)
33UpdateSettingContractSmart contracts
41ExchangeCreateContractExchange
42ExchangeInjectContractExchange
43ExchangeWithdrawContractExchange
44ExchangeTransactionContractExchange
45UpdateEnergyLimitContractSmart contracts
46AccountPermissionUpdateContractPermissions
48ClearABIContractSmart contracts
49UpdateBrokerageContractVoting
52MarketSellAssetContractMarket
53MarketCancelOrderContractMarket
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