Skip to content

Commit

Permalink
fix(txmeta): output accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
ogmedia committed Oct 3, 2022
1 parent d696640 commit 1e277f6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions programs/txmeta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ declare_id!("SMPL5bz5ERMdweouWrXtk3jmb6FnjZkWf7pHDsE6Zwz");
pub mod txmeta {
use super::*;

pub fn track_meta(_ctx: Context<Track>) -> Result<()> {
pub fn track_meta(ctx: Context<Track>, meta: String) -> Result<()> {
let remaining = ctx.remaining_accounts;
remaining.iter().for_each(|account| {
msg!("Account: {:?}", account.key());
});
msg!("Track Meta: {:?}", meta);
Ok(())
}
}

#[derive(Accounts)]
#[instruction(meta: String)]
pub struct Track<'info>{
#[account(mut)]
pub member: Signer<'info>,
}

0 comments on commit 1e277f6

Please sign in to comment.