Skip to content
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

Tron ETL fixes #5

Open
aniket818 opened this issue Aug 2, 2024 · 0 comments
Open

Tron ETL fixes #5

aniket818 opened this issue Aug 2, 2024 · 0 comments

Comments

@aniket818
Copy link

aniket818 commented Aug 2, 2024

Contrary to EVM RPCs, Tron RPC does not have a universal schema for transactions, meaning neither sender_address, receiver_address or token_outgoing_value is represented by universal fields. Hence, Tron ETL has to be customised to fetch data correctly.

Transactions can be classified into different transaction_types [type in txn http(wallet/gettransactionbyid)], and each has their separate schema and separate fields to fetch data from. The following is a list of the changes needed for each individual transaction_type.

  1. WithdrawBalanceContract: from should be to_address and not from_address. Eg: 8783467353593407655604edc857469af7615edeeb798a349400361b31f7092e
  2. WithdrawExpireUnfreezeContract: from should be to_address and not from_address. Eg: e28a9d007e6c8866fceb9c1cd50d7315cf673589fd07da18bd91b16c9af27a40
  3. UnfreezeAssetContract: from should be to_address (and maybe value = 0). Eg. 282cdcdf18fa40adf63d762bc723c155215d3590e6e5b7f6f279e31589c6cdde
  4. VoteWitnessContract: value = 0. Eg. 15577925ce4a8aac2f190ddd02c947eb6e629d19e4b5da8b376535e8642b6537
  5. WitnessCreateContract: value = 0. Eg. da2b5da5740841792242b74c43b041578c8cdad8e7d6c778ff636da628d92d11
  6. UnfreezeBalanceV2Contract: value = raw_data.contract.parameter.value.frozen_balance from txn http. Eg. 64e2f1a00338826dc90ffffe5cf4e50eb57b7817bdddc09881041857813f3150
  7. ExchangeWithdrawContract: from should be to_address. Eg. f299929b1bfb27b3bd8c604b53c37cd29d39e6e89b5d9c0db365906660014acb
  8. FreezeBalanceV2Contract: value = raw_data.contract.parameter.value.unfreeze_balance from txn http. Eg. fe64622e30def418215bec4b39108a9dc3cab16cebbde17cb28a58a8e42ac75b
  9. ParticipateAssetIssueContract: value = contract.parameter.value.amount from txn http and from should be to_address. Eg. 0e984d6b93d6bd9d2baae13fddcd64099db9434c753cc505f2ef0f78c2042aa9
  10. UnfreezeBalanceContract: from should be to_address. Eg. b47e82ef63d5e5ab58da8024cdbb415b07d3c46f1fb487d71ddcd8dae7c4faec
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

No branches or pull requests

1 participant