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 anchor bindings anchor-lang #3440

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mgild
Copy link
Contributor

@mgild mgild commented Dec 19, 2024

This change adds wrapper bindings for the AddressLookupTable program and AddressLookupTable Account.

Usage:

#[derive(Accounts)]
pub struct Action<'info> {
    pub lut_program: Program<'info, AddressLookupTable>,
    pub lut_signer: Signer<'info>,
    pub lookup_table: Account<'info, AddressLookupTableAccount<'info>>,
}

Tests:

cd lang
cargo build

Copy link

vercel bot commented Dec 19, 2024

@mgild is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been requested before, so thank you for adding this!

It would be very helpful to have some tests for these types. They don't need to be very complicated; just some tests to check compilation and basic functionality. Compilation tests are especially important given how easy it is to miss the idl-build feature impl.

There are also a couple more issues that I mentioned in the comments, but it looks good otherwise.

lang/Cargo.toml Outdated Show resolved Hide resolved
lang/src/address_lookup_table_program.rs Outdated Show resolved Hide resolved
lang/src/address_lookup_table_program.rs Outdated Show resolved Hide resolved
lang/src/address_lookup_table_program.rs Show resolved Hide resolved
lang/src/lib.rs Outdated Show resolved Hide resolved
lang/src/lib.rs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants