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.
| 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; required, 1–32 bytes, with every byte in the printable ASCII range 0x21–0x7E (spaces are not allowed) |
abbr | bytes | Symbol; may be empty. A nonempty value must be 1–32 bytes and follow the same printable-ASCII rule as name |
total_supply | int64 | Total supply (≥ 1) |
frozen_supply | FrozenSupply[] | Time-locked supply portions |
trx_num | int32 | Amount in sun exchanged for num raw token units |
num | int32 | Raw token units exchanged for trx_num sun |
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: 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.
| 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 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Issuer |
description | bytes | New description |
url | bytes | New project website |
new_limit | int64 | New free Bandwidth limit for each account holding this token, in Bandwidth units |
new_public_limit | int64 | New 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).
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Token issuer |
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 scheduled maintenance update.
WitnessUpdateContract — enum 8
Updates an SR's project URL.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | SR address |
update_url | bytes | New 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).
| 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 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.
| 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 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.
| 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 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.
| 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). 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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Registered SR candidate submitting the approval operation |
proposal_id | int64 | Target proposal ID |
is_add_approval | bool | true = 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.
| 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 (maximum 32 bytes after UTF-8 encoding; 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
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.
| Field | Type | Description |
|---|---|---|
owner_address | bytes | Account |
owner | Permission | Owner permission |
witness | Permission | Witness permission (SR-signing, optional, only for SRs) |
actives | Permission[] | 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
| Enum | Type | Group |
|---|---|---|
| 0 | AccountCreateContract | Account & balance |
| 1 | TransferContract | Account & balance |
| 2 | TransferAssetContract | TRC-10 |
| 4 | VoteWitnessContract | Voting |
| 5 | WitnessCreateContract | Voting |
| 6 | AssetIssueContract | TRC-10 |
| 8 | WitnessUpdateContract | Voting |
| 9 | ParticipateAssetIssueContract | TRC-10 |
| 10 | AccountUpdateContract | Account & balance |
| 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 |
| 30 | CreateSmartContract | Smart contracts |
| 31 | TriggerSmartContract | Smart contracts |
| 32 | GetContract | Smart contracts (query) |
| 33 | UpdateSettingContract | Smart contracts |
| 45 | UpdateEnergyLimitContract | Smart contracts |
| 46 | AccountPermissionUpdateContract | Permissions |
| 48 | ClearABIContract | Smart contracts |
| 49 | UpdateBrokerageContract | Voting |
| 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 12 days ago