useanchor_lang::prelude::*;usecrate::state::Signal;/// Accounts for thread_memo - simple memo functionality for thread testing.
/// Only called via CPI from thread_exec, so authorization is verified by signer.
/// The thread signs via invoke_signed in thread_exec.
#[derive(Accounts)]pubstructThreadMemo<'info>{/// The thread account that signs this instruction via CPI
pubsigner:Signer<'info>,
}pubfnthread_memo(_ctx:Context<ThreadMemo>,
memo: String,
signal:Option<Signal>,
)->Result<Signal>{msg!("Thread memo: {}", memo);if signal.is_some(){let response: Signal = signal.unwrap();returnOk(response);}Ok(Signal::None)}