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

feat: add TransactionMessage class #27526

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Sep 1, 2022

Problem

Lack of a common interface for creating and displaying transactions which supports both legacy and versioned transactions

Summary of Changes

  • Add TransactionMessage class which can be used to construct or decompile legacy and v0 transactions.
  • Add Message.compile method to the legacy message class to mirror the equivalent MessageV0.compile method added in feat: implement message v0 compilation #27524
  • Add getAccountKeys method to both Message and MessageV0 classes for use in transaction decompilation and to allow devs to conveniently resolve account indexes with a common interface for legacy and versioned transactions
  • Add resolveAddressTableLookups method to MessageV0 which is used to decompile v0 transactions

Fixes #

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #27526 (6c74068) into master (3374f41) will increase coverage by 0.1%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #27526     +/-   ##
=========================================
+ Coverage    77.6%    77.7%   +0.1%     
=========================================
  Files          54       55      +1     
  Lines        2770     2850     +80     
  Branches      379      392     +13     
=========================================
+ Hits         2150     2216     +66     
- Misses        484      495     +11     
- Partials      136      139      +3     

@jstarry jstarry added the automerge Merge this Pull Request automatically once CI passes label Sep 7, 2022
@mergify mergify bot merged commit 9f81d27 into solana-labs:master Sep 7, 2022
@jstarry jstarry deleted the web3/decompile-message branch September 7, 2022 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants