pub struct CreateBuffers<'a> {
pub program_id: Pubkey,
pub payer: Pubkey,
pub buffers: &'a [(Pubkey, Pubkey)],
}Expand description
Builder for a CreateBuffer instruction that creates one buffer per
(buffer_pda, mint) pair in buffers.
Each buffer_pda must be the canonical PDA returned by
crate::pda::buffer::find_buffer_pda for its mint; the program derives
the bump itself and rejects any other address. payer funds every new token
account’s rent.
Buffer creation is idempotent: an already-existing buffer_pda is left
unchanged and the instruction still succeeds, so two parties racing to
create the same buffer both succeed.
Wire format: [discriminator=4], 1 byte. The tokens are implied by the
mint accounts, so no further data is needed.
Required accounts:
[payer (W,S), system_program (R), token_program (R), (buffer_pda (W), mint (R))...].
The three shared accounts come first and are read positionally; the
per-buffer pairs follow. The system program only has to be present so the
CreateAccount CPI can dispatch; it isn’t read by index.
Fields§
§program_id: Pubkey§payer: Pubkey§buffers: &'a [(Pubkey, Pubkey)]