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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Sender |
to_address | bytes | Recipient |
amount | int64 | Amount 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Creator |
account_address | bytes | New account address |
type | enum | Account 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Account |
account_name | bytes | New name (UTF-8) |
Account names are currently set-once under chain parameter
#14ALLOW_UPDATE_ACCOUNT_NAME(value0on Mainnet). Setting the same account a second time fails unless the parameter flips to1.
SetAccountIdContract — enum 19
Sets a custom account ID (a separate identifier from the address).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Account |
account_id | bytes | ID (ASCII string) |
WithdrawBalanceContract — enum 13
Claims accumulated rewards — SR block rewards or voter rewards — into the calling account's balance.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | SR 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.
| Field | Type | Description |
|---|---|---|
id | string | Token ID (auto-assigned) |
owner_address | bytes | Issuer |
name | bytes | Token name (UTF-8, max 32 bytes) |
abbr | bytes | Symbol (UTF-8, max 16 bytes) |
total_supply | int64 | Total supply (≥ 1) |
frozen_supply | FrozenSupply[] | Time-locked supply portions |
trx_num | int32 | TRX needed to buy num tokens (price numerator/denominator) |
num | int32 | Token count per trx_num TRX |
precision | int32 | Decimal places (0, or 1–6; capped by PRECISION_DECIMAL = 6) |
start_time | int64 | Issuance window start (ms since epoch) |
end_time | int64 | Issuance window end |
description | bytes | Description (UTF-8) |
url | bytes | Project website URL (UTF-8) |
vote_score | int32 | Reserved |
free_asset_net_limit | int64 | Free Bandwidth each holder gets for this token (changeable later via UpdateAssetContract.new_limit) |
public_free_asset_net_limit | int64 | Shared free-Bandwidth pool for this token network-wide (changeable later via UpdateAssetContract.new_public_limit) |
FrozenSupply sub-fields:
| Sub-field | Type | Description |
|---|---|---|
frozen_amount | int64 | Amount of tokens frozen |
frozen_days | int64 | Lock 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.
| Field | Type | Description |
|---|---|---|
asset_name | bytes | Token ID (decimal string, e.g., "1000001") |
owner_address | bytes | Sender |
to_address | bytes | Recipient |
amount | int64 | Amount in raw token units (no decimal-precision scaling) |
ParticipateAssetIssueContract — enum 9
Buys into an active TRC-10 issuance window.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Buyer |
to_address | bytes | Issuer |
asset_name | bytes | Token ID |
amount | int64 | TRX 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Issuer |
description | bytes | New description |
url | bytes | New project website |
new_limit | int64 | New per-account holding limit |
new_public_limit | int64 | New public-offering limit |
UnfreezeAssetContract — enum 14
Releases frozen TRC-10 supply (those defined in frozen_supply at issuance).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Token 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Voter |
votes | Vote[] | List of (SR address, vote count) pairs |
Vote sub-fields:
| Sub-field | Type | Description |
|---|---|---|
vote_address | bytes | SR candidate address |
vote_count | int64 | TP 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Applicant |
url | bytes | SR'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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | SR address |
update_url | bytes | New 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).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | SR |
brokerage | int32 | New 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Staker |
frozen_balance | int64 | Amount in sun |
frozen_duration | int64 | Lock duration in days (originally 3, see chain history) |
resource | enum | 0 = BANDWIDTH, 1 = ENERGY |
receiver_address | bytes | Optional delegation target |
UnfreezeBalanceContract — enum 12
Legacy: unstake Stake-1.0 TRX. Funds are released immediately on a successful call.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Unstaker |
resource | enum | Resource type that was originally staked |
receiver_address | bytes | Original 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Staker |
frozen_balance | int64 | Amount in sun |
resource | enum | 0 = BANDWIDTH, 1 = ENERGY (no time parameter) |
UnfreezeBalanceV2Contract — enum 55
Initiates the unstake process. Funds become available after the chain-parameter delay.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Unstaker |
unfreeze_balance | int64 | Amount in sun (≤ currently staked amount) |
resource | enum | 0 = 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Account 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).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Account 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Resource owner |
resource | enum | 0 = BANDWIDTH, 1 = ENERGY |
balance | int64 | Amount of staked TRX whose resources to delegate (in sun) |
receiver_address | bytes | Recipient |
lock | bool | Whether to lock the delegation |
lock_period | int64 | Lock 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).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Original delegator |
resource | enum | Must match the delegation's resource |
balance | int64 | Amount to undelegate (≤ originally delegated) |
receiver_address | bytes | Must 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Creator |
parameters | map<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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Voting SR |
proposal_id | int64 | Target proposal ID |
is_add_approval | bool | true = 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Must be the proposal creator |
proposal_id | int64 | Target proposal |
Smart contracts
CreateSmartContract — enum 30
Deploys a new smart contract.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Deployer |
new_contract | SmartContract | Contract definition (see below) |
call_token_value | int64 | TRC-10 amount sent to the new contract (optional) |
token_id | int64 | TRC-10 token ID (when call_token_value > 0) |
SmartContract sub-fields:
| Field | Type | Description |
|---|---|---|
origin_address | bytes | Deployer (same as owner_address) |
contract_address | bytes | Generated contract address |
abi | ABI | Optional ABI (queryable later via wallet/getcontract) |
bytecode | bytes | Compiled TVM bytecode |
call_value | int64 | TRX (in sun) sent to the constructor |
consume_user_resource_percent | int64 | Caller-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 |
name | string | Contract name (max 32 bytes; checked at validation) |
origin_energy_limit | int64 | Deployer'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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Caller |
contract_address | bytes | Target contract |
data | bytes | ABI-encoded call (4-byte selector + 32-byte-padded arguments) |
call_value | int64 | TRX sent with the call (in sun) |
call_token_value | int64 | TRC-10 sent with the call (in raw token units) |
token_id | int64 | TRC-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).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Contract deployer |
contract_address | bytes | Target contract |
consume_user_resource_percent | int64 | New value, [0, 100] |
UpdateEnergyLimitContract — enum 45
Updates a contract's origin_energy_limit.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Contract deployer |
contract_address | bytes | Target contract |
origin_energy_limit | int64 | New 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Contract deployer |
contract_address | bytes | Target 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Account |
owner | Permission | Owner permission |
witness | Permission | Witness permission (SR-signing, optional, only for SRs) |
actives | Permission[] | 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).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Creator |
first_token_id | bytes | First token's ID (or _ for TRX) |
first_token_balance | int64 | Initial balance of first token |
second_token_id | bytes | Second token's ID (or _ for TRX) |
second_token_balance | int64 | Initial balance of second token |
ExchangeInjectContract — enum 42
Adds liquidity to an existing exchange.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Liquidity provider |
exchange_id | int64 | Target exchange |
token_id | bytes | Token being injected |
quant | int64 | Amount to inject |
ExchangeWithdrawContract — enum 43
Withdraws liquidity from an existing exchange.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Liquidity provider |
exchange_id | int64 | Target exchange |
token_id | bytes | Token to withdraw |
quant | int64 | Amount to withdraw |
ExchangeTransactionContract — enum 44
Trades against an existing exchange.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Trader |
exchange_id | int64 | Target exchange |
token_id | bytes | Token the trader is paying |
quant | int64 | Amount being paid |
expected | int64 | Minimum 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Seller |
sell_token_id | bytes | Token offered |
sell_token_quantity | int64 | Amount offered |
buy_token_id | bytes | Token wanted |
buy_token_quantity | int64 | Amount wanted |
MarketCancelOrderContract — enum 53
Cancels a previously-placed order.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Order placer |
order_id | bytes | Target 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
| Enum | Type | Group |
|---|---|---|
| 0 | AccountCreateContract | Account & balance |
| 1 | TransferContract | Account & balance |
| 2 | TransferAssetContract | TRC-10 |
| 3 | VoteAssetContract | Deprecated |
| 4 | VoteWitnessContract | Voting |
| 5 | WitnessCreateContract | Voting |
| 6 | AssetIssueContract | TRC-10 |
| 8 | WitnessUpdateContract | Voting |
| 9 | ParticipateAssetIssueContract | TRC-10 |
| 10 | AccountUpdateContract | Account & balance |
| 11 | FreezeBalanceContract | Stake 1.0 (legacy) |
| 12 | UnfreezeBalanceContract | Stake 1.0 (legacy) |
| 13 | WithdrawBalanceContract | Account & balance |
| 14 | UnfreezeAssetContract | TRC-10 |
| 15 | UpdateAssetContract | TRC-10 |
| 16 | ProposalCreateContract | Governance |
| 17 | ProposalApproveContract | Governance |
| 18 | ProposalDeleteContract | Governance |
| 19 | SetAccountIdContract | Account & balance |
| 20 | CustomContract | Deprecated |
| 30 | CreateSmartContract | Smart contracts |
| 31 | TriggerSmartContract | Smart contracts |
| 32 | GetContract | Smart contracts (query) |
| 33 | UpdateSettingContract | Smart contracts |
| 41 | ExchangeCreateContract | Exchange |
| 42 | ExchangeInjectContract | Exchange |
| 43 | ExchangeWithdrawContract | Exchange |
| 44 | ExchangeTransactionContract | Exchange |
| 45 | UpdateEnergyLimitContract | Smart contracts |
| 46 | AccountPermissionUpdateContract | Permissions |
| 48 | ClearABIContract | Smart contracts |
| 49 | UpdateBrokerageContract | Voting |
| 52 | MarketSellAssetContract | Market |
| 53 | MarketCancelOrderContract | Market |
| 54 | FreezeBalanceV2Contract | Stake 2.0 |
| 55 | UnfreezeBalanceV2Contract | Stake 2.0 |
| 56 | WithdrawExpireUnfreezeContract | Stake 2.0 |
| 57 | DelegateResourceContract | Stake 2.0 |
| 58 | UnDelegateResourceContract | Stake 2.0 |
| 59 | CancelAllUnfreezeV2Contract | Stake 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
- Transactions — transaction structure and lifecycle
- Accounts — account model and key derivation
- Multi-signature — Account Permission Management schema
- Staking on the TRON network — Stake 2.0 lifecycle
- Network parameters — values referenced above (
getAssetIssueFee,getAccountUpgradeCost,getUnfreezeDelayDays, etc.) - Token standards overview — TRC-10 / TRC-20 / TRC-721 / TRC-1155
Updated 7 days ago