-
Notifications
You must be signed in to change notification settings - Fork 96
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
Need to import ProgramResult type for 1-account-data-matching ui tests #13
Comments
I am aware of the issue in the provided code example. It uses the ProgramResult type in the log_message function's return type, but it doesn't explicitly import it. To resolve this, I need to import the ProgramResult type from the anchor_lang::solana_program::entrypoint module. use anchor_lang::prelude::*; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[program]
} #[derive(Accounts)] With this change, the ProgramResult type will be properly imported, and the code should now compile without any issues. The UI tests and any other parts of the code that use ProgramResult will work as expected. This ensures that the code is correct and follows the recommended import conventions for ProgramResult. |
In the ui tests, for example for recommended: https://github.com/project-serum/sealevel-attacks/blob/master/programs/1-account-data-matching/recommended/src/lib.rs, it refers to
ProgramResult
but doesn't import it.Need to import it somehow like:
use anchor_lang::solana_program::entrypoint::ProgramResult;
. This goes for all ui tests for this particular attack.The text was updated successfully, but these errors were encountered: