Skip to content

Sync system-contracts doc with java-tron proto#601

Open
abn2357 wants to merge 3 commits into
tronprotocol:masterfrom
abn2357:fix_system_contract
Open

Sync system-contracts doc with java-tron proto#601
abn2357 wants to merge 3 commits into
tronprotocol:masterfrom
abn2357:fix_system_contract

Conversation

@abn2357
Copy link
Copy Markdown
Contributor

@abn2357 abn2357 commented May 15, 2026

Summary

  • Add a ContractType Overview table in system-contracts.md that lists every ContractType (enum value from Tron.proto) together with its Proto Message, Actuator class, current status, and the business it triggers; the per-contract message definitions stay in the sections below.
  • Fill in previously missing per-contract sections: UpdateEnergyLimitContract, AccountPermissionUpdateContract, MarketSellAssetContract, MarketCancelOrderContract, CancelAllUnfreezeV2Contract.
  • Fix field-name mismatches against the proto:
    • ParticipateAssetIssueContract: account_nameasset_name
    • ClearABIContract: account_addresscontract_address
  • Tighten AccountPermissionUpdateContract field constraints to match AccountPermissionUpdateActuator.validate():
    • witness is required for SR accounts and must be empty for non-witness accounts
    • actives is capped at 8 entries
  • Drop the (Deprecated) prefix from the FreezeBalanceContract heading so it lines up with the other disabled contracts (ExchangeTransactionContract, ShieldedTransferContract, MarketSellAssetContract, ...); status is already conveyed in the overview table.
  • Replace the duplicated ContractType table in multi-signatures.md with a link back to the new overview section to keep a single source of truth.

All entries were cross-checked against protocol/src/main/protos/core/Tron.proto, the per-contract *.proto files, and each *Actuator.java in java-tron.

Test plan

  • mkdocs serve (or the project's docs build) renders the new ## ContractType Overview table and the new per-contract sections without warnings
  • The cross-link from multi-signatures.md (./system-contracts.md#contracttype-overview) resolves
  • Spot-check a few rows in the table against Tron.proto and the corresponding *Actuator.java constructor in java-tron

abn2357 added 2 commits May 13, 2026 17:51
…ctType overview

- Add missing contracts: MarketSellAssetContract, MarketCancelOrderContract, CancelAllUnfreezeV2Contract
- Expand the Account Permission Management link into a full AccountPermissionUpdateContract message section
- Fix ParticipateAssetIssueContract field name: account_name -> asset_name
- Reorder all sections to match the ContractType enum order
- Move the ContractType overview table from multi-signatures.md to system-contracts.md as the canonical index, leaving a link reference behind
- ClearABIContract: rename account_address to contract_address to match proto
- AccountPermissionUpdateContract: clarify that witness permission is required
  for SR accounts and must be empty otherwise; note 8-entry cap on actives
- Drop (Deprecated) prefix from FreezeBalanceContract heading for consistency
  with other disabled contracts (status is already in the overview table)
- AssetIssueContract: add missing precision=7 and id=41 fields; fix the
  order=11 comment ("useless"); document the id field.
- UnfreezeBalanceContract: correct receiver_address field number from 13
  to 15.
- DelegateResourceContract: add missing lock_period=6 field and document
  its interaction with the MAX_DELEGATE_LOCK_PERIOD proposal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant