-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add loader-v4 instruction constructors #33151
Conversation
LGTM. I assume there will be some tests that will use these methods? |
Yes, need to add some tests. I looked into |
Sounds good. I thought maybe in some tests that construct instructions directly, these methods could be used, if that's convenient. |
Yes, those should be simpler to add. Let me try and add it in this PR. I would also like to add some tests that calls the loader with the constructed instructions. Maybe that can go in a separate PR. |
1d5b0ed
to
ba8ffa2
Compare
ba8ffa2
to
f1ef158
Compare
Added tests for the constructors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
84d80b6
to
d78b029
Compare
vec![ | ||
AccountMeta::new(*buffer_address, true), | ||
AccountMeta::new_readonly(*authority, true), | ||
AccountMeta::new(*recipient_address, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recipient_address
is not needed and should be payer_address
here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it. The caller can pass the payer address as the recipient_address
.
Problem
Need convenient methods to construct loader-v4 instructions. These will be useful in CLI and other places.
Summary of Changes
Add the constructors.
Fixes #