Skip to content

Add comprehensive mapping of ContractTypes, Proto Messages, and Actuators#312

Open
King31T wants to merge 4 commits intotronprotocol:masterfrom
King31T:add_contracttype_actuator
Open

Add comprehensive mapping of ContractTypes, Proto Messages, and Actuators#312
King31T wants to merge 4 commits intotronprotocol:masterfrom
King31T:add_contracttype_actuator

Conversation

@King31T
Copy link
Copy Markdown
Contributor

@King31T King31T commented Apr 23, 2026

What does this PR do?

This PR provides a centralized and detailed reference for all ContractType entries within the system. It establishes a clear mapping between Protocol messages, their corresponding Actuators, current activation status (Enabled/Disabled), and the specific business logic they trigger.

| 5 | WitnessCreateContract | WitnessContract.WitnessCreateContract | WitnessCreateActuator | ✅ 启用 | 申请成为超级代表候选人,写入 witness store |
| 6 | AssetIssueContract | AssetIssueContractOuterClass.AssetIssueContract | AssetIssueActuator | ✅ 启用 | 发行 TRC10 代币,按 ICO 规则冻结募集期余额 |
| 7 | WitnessUpdateContract | WitnessContract.WitnessUpdateContract | WitnessUpdateActuator | ✅ 启用 | 更新 SR 的官网 URL |
| 8 | ParticipateAssetIssueContract | AssetIssueContractOuterClass.ParticipateAssetIssueContract | ParticipateAssetIssueActuator | ✅ 启用 | 在 ICO 期间用 TRX 认购 TRC10 代币 |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The # column should reflect the actual ContractType enum values from Tron.proto, not sequential row numbers.
The first column appears to use sequential numbering (0–40), but the actual enum values in Transaction.Contract.ContractType are not contiguous — there are intentional gaps. This matters because these values are used as bit positions when calculating the operations field in account permissions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I will fix it

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.

3 participants