My code
use anchor_lang::prelude::*;
use anchor_lang::solana_program::pubkey;
declare_id!("8SQ7LtBoufLSXWbcHf7bXuEzFWksbLjE8T7jUi3Yxz1");
#[program]
pub mod cnft {
use super::*;
pub fn withdraw_cnft(ctx: Context<Withdraw>) -> Result<()> {
let merkle_tree = pubkey!("EwxweDQtWzitdmJabX9irUXHbfjTBKujqWVaFtFGr3Gt");
let lead_index : u32 = 1u32;
msg!("Transfering CNFT {} from tree {}" , lead_index, merkle_tree);
Ok(())
}
}
#[derive(Accounts)]
pub struct Initialize {}
error
error[E0432]: unresolved import `crate`
--> programs/cnft/src/lib.rs:6:1
|
6 | #[program]
| ^^^^^^^^^^ could not find `__client_accounts_withdraw` in the crate root
|
= note: this error originates in the attribute macro `program` (in Nightly builds, run with -Z macro-backtrace for more info)
and
error[E0412]: cannot find type `Withdraw` in this scope
--> programs/cnft/src/lib.rs:11:39
|
11 | pub fn withdraw_cnft(ctx: Context<Withdraw>) -> Result<()> {
| ^^^^^^^^ not found in this scope