Add comprehensive mapping of ContractTypes, Proto Messages, and Actuators#312
Open
King31T wants to merge 4 commits intotronprotocol:masterfrom
Open
Add comprehensive mapping of ContractTypes, Proto Messages, and Actuators#312King31T wants to merge 4 commits intotronprotocol:masterfrom
King31T wants to merge 4 commits intotronprotocol:masterfrom
Conversation
…ator, state and function description
vivian1912
reviewed
Apr 28, 2026
| | 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 代币 | |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Good catch. I will fix it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.