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

Can't use identifiers program_id or accounts in handler names #55

Closed
armaniferrante opened this issue Feb 1, 2021 · 2 comments
Closed
Labels
good first issue Good for newcomers lang

Comments

@armaniferrante
Copy link
Member

armaniferrante commented Feb 1, 2021

The codegen uses these names before invoking the handler. Instead, we should add a __ prefix to all variables used by the codegen so that there's no collision.

@armaniferrante
Copy link
Member Author

armaniferrante commented May 31, 2021

Related #347.

As pointed out by @NorbertBodziony, one can't use the word "nonce" in the zero copy state constructor.

 pub fn new(
            &mut self,
            ctx: Context<New>,
            nonce: u8,
        ) -> ProgramResult {}

@acheroncrypto
Copy link
Collaborator

Fixed in #2464.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers lang
Projects
None yet
Development

No branches or pull requests

3 participants