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

lang: Deprecate #[interface] attribute #3195

Conversation

acheroncrypto
Copy link
Collaborator

Problem

Adding support for custom discriminators made the #[interface] attribute redundant, since the only thing this attribute does is to override the instruction's discriminator. For example:

#[interface(spl_transfer_hook_interface::execute)]

can now be replaced with:

#[instruction(discriminator = ExecuteInstruction::SPL_DISCRIMINATOR_SLICE)]

Many ways to achieve the same thing often leads to confusion for users, and also extra bloat in our codebase.

Summary of changes

Deprecate the #[interface] attribute and add a deprecation note explaining how to migrate.


Note: This PR is part of a greater effort explained in #3097.

Copy link

vercel bot commented Aug 24, 2024

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

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto merged commit 679c130 into coral-xyz:master Aug 24, 2024
49 of 50 checks passed
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.

1 participant