Attribute Macro extra_accounts

Source
#[extra_accounts]
Expand description

This macro attribute is used to define a BOLT system extra accounts.

The extra account struct define the accounts (which are not components), that the system expect.

§Example

#[extra_accounts]
pub struct ExtraAccounts {
#[account(address = bolt_lang::solana_program::sysvar::clock::id())]
pub clock: AccountInfo<'info>,
#[account(address = pubkey!("CbHEFbSQdRN4Wnoby9r16umnJ1zWbULBHg4yqzGQonU1"), signer)]
pub my_account: AccountInfo<'info>,
#[account(address = Metadata::id())]
pub metadata_program: Program<'info, Metadata>,
}