-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize address parsing of stake-related interfaces #5411
Comments
I understand that |
@lxcmyf |
does the signature of the function |
I understand that the signature will not change, because the parameter return value of the constructor has not changed, but the support logic for the new transaction type has been added. If you have any questions, please add @mikeluxue |
You can associate this issue with your PR if there is one. |
The link of PR is as follows: #5419 |
@CarlChaoCarl I found out that this is still missing. |
OK, just updated. @lxcmyf |
How about vote and withdraw reward types of transaction? Does the same issue exist? |
@ferdinand026 |
Rationale
TransactionLog combined with EventPlugin mechanism is an important way to analyze transaction data.
At present, it is found that when calling the query transaction interface of the tron-eventquery service,
one of the transaction's fields returned is as follows:
To the transaction type: UnDelegateResourceContract, the returned fields: fromAddress, toAddress are not correctly assigned.
Below are the stake-related transactions include:
The fromAddress and toAddress should be correctly parsed into the TransactionLog, and then the fields will be correct when the query transaction of the tron-eventquery service is called.
Why should this feature exist?
Before writing the new transaction into the transactionLog, the address needs to be parsed correctly
Implementation
For the new transactions, to correctly parse fromAddress and toAddress to TransactionLog, the following code must be modified: class TransactionLogTriggerCapsule, method TransactionLogTriggerCapsule
In this way, for the newly added transactions, fromAddress and toAddress are able to be correctly parsed and then assigned to TransactionLogTrigger.
Furthermore, for the TransactionLog's message event, an "extMap" field has been added, originally designed as a general extension field.Currently, this field is only assigned a value for transaction logs of the "CancelAllUnfreezeV2Contract" type; other transactions do not receive a value.For "CancelAllUnfreezeV2Contract" type transactions, it represents the amount of resources (bandwidth energy) canceled by the operation of canceling "UnfreezeV2" type transactions.
The text was updated successfully, but these errors were encountered: