-
Notifications
You must be signed in to change notification settings - Fork 251
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
program sdk: move AddressLookupTableAccount
to message::v0
#154
Conversation
I don't think we need to add a |
9f95b43
to
511fe42
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #154 +/- ##
=======================================
Coverage 81.8% 81.8%
=======================================
Files 838 838
Lines 226389 226389
=======================================
+ Hits 185342 185361 +19
+ Misses 41047 41028 -19 |
i'm not sure the motivation for the change is accurate. ALT accounts were introduced in v0 transactions. legacy tx had no way to specify them. that they're "only used in v0 trasactions" is just a function of there being no newer transaction version. ALT should remain independent of any transaction version, imo |
Fair point, but the type right below it in Perhaps it's better to do a little refactoring and introduce a module for lookup-related items? |
right. i think that's a different problem.
|
I don't really understand this change.. why is it important to move a struct around within the same crate?
This struct is in the solana-program crate not the "Address Lookup Table program crate" |
The idea was to then deprecate the The program SDK doesn't need anything from the program, but downstream users could import the new ALT client if they needed to use the program's API. This struct here is just used within message creation, and not needed for the program's API. |
Problem
Similar to #141, the struct for
AddressLookupTableAccount
exported from the Address Lookup Table program crate is also only used in one place: V0 Message.Summary of Changes
Move the struct directly into
sdk::program::message::v0
as a public struct.The struct's visibility makes it available for use in
sdk::program::message
as well as downstream for developers who may need the type when working with messages.Again similar to #141, this allows the program SDK to remain decoupled from the new core BPF Address Lookup Table program crate, in development here.