You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
So, I have updated the code with the necessary import:
use anchor_lang::prelude::*;
use anchor_spl::token::TokenAccount;
use anchor_lang::solana_program::entrypoint::ProgramResult; // I added this import to bring in ProgramResult
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: