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

fix: used identifiers in handler #2464

Merged
merged 7 commits into from
Apr 22, 2023
Merged

Conversation

CanardMandarin
Copy link
Contributor

This PR fixes the issue #55

It is a bit old, I hope it is still relevant.
The nonce identifier does not seem to be used anymore.

@acheroncrypto
Copy link
Collaborator

Hey, thank you for fixing this. Could you add a test case for it in tests/misc so that we don't break it again in the future.

@vercel
Copy link

vercel bot commented Apr 20, 2023

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

A member of the Team first needs to authorize it.

@CanardMandarin
Copy link
Contributor Author

Sure! What do you think of #91e6abe?

@acheroncrypto
Copy link
Collaborator

This is looking good to merge once the review comment is adressed and CHANGELOG is updated.

@CanardMandarin
Copy link
Contributor Author

I'm glad you ask a test with the instruction macro, It caused some other collisions that I fixed with 6f862ee.

@acheroncrypto
Copy link
Collaborator

This is a breaking change for programs that depend on program_id, accounts, ix_data, remaining_accounts in their contexts. I doubt anybody uses those identifiers but I'm noting this here since it was being used in zero-copy tests.

Example:

#[derive(Accounts)]
pub struct MyInstruction<'info> {
    #[account(owner = *program_id)]
    my_account: AccountInfo<'info>
}

Programs shouldn't rely on variables that are defined inside codegen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants