pub struct RotateRoundCpiBuilder<'a, 'b> { /* private fields */ }Expand description
Instruction builder for RotateRound via CPI.
§Accounts:
[writable, signer]authority[]satrush_config[writable]board[writable]current_round[writable]next_round[]usd_mint[writable]board_usd_ata[writable]epoch_vault[writable]epoch_vault_usd_ata[writable]one_btc_vault[writable]one_btc_vault_usd_ata[writable]treasury[writable]treasury_usd_ata[]slot_hashes[]token_program[]system_program[]event_authority[]program
Implementations§
Source§impl<'a, 'b> RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> RotateRoundCpiBuilder<'a, 'b>
pub fn new(program: &'b AccountInfo<'a>) -> Self
pub fn satrush_config( &mut self, satrush_config: &'b AccountInfo<'a>, ) -> &mut Self
Sourcepub fn board(&mut self, board: &'b AccountInfo<'a>) -> &mut Self
pub fn board(&mut self, board: &'b AccountInfo<'a>) -> &mut Self
Stays a regular Account: get_next_round_id() feeds next_round’s
PDA seeds, which LazyAccount cannot serve.
Sourcepub fn current_round(&mut self, current_round: &'b AccountInfo<'a>) -> &mut Self
pub fn current_round(&mut self, current_round: &'b AccountInfo<'a>) -> &mut Self
The current round being closed out (revealed). Lazy for the same stack
reason as the config; its PDA derives from board.round_id (a plain
field path the IDL seed parser can encode), which pins it to the
board’s current round with no separate id constraint.
Sourcepub fn next_round(&mut self, next_round: &'b AccountInfo<'a>) -> &mut Self
pub fn next_round(&mut self, next_round: &'b AccountInfo<'a>) -> &mut Self
The freshly deployed next round, which becomes the board’s active round.
Its id is fixed by the seeds (board.get_next_round_id()); the handler
populates it via Round::try_new.
pub fn usd_mint(&mut self, usd_mint: &'b AccountInfo<'a>) -> &mut Self
Sourcepub fn board_usd_ata(&mut self, board_usd_ata: &'b AccountInfo<'a>) -> &mut Self
pub fn board_usd_ata(&mut self, board_usd_ata: &'b AccountInfo<'a>) -> &mut Self
Board’s USD pool where every deploy’s full amount landed — the sweep source.
Sourcepub fn epoch_vault(&mut self, epoch_vault: &'b AccountInfo<'a>) -> &mut Self
pub fn epoch_vault(&mut self, epoch_vault: &'b AccountInfo<'a>) -> &mut Self
Epoch Vault singleton — receives the round’s accumulated epoch fee leg.
pub fn epoch_vault_usd_ata( &mut self, epoch_vault_usd_ata: &'b AccountInfo<'a>, ) -> &mut Self
Sourcepub fn one_btc_vault(&mut self, one_btc_vault: &'b AccountInfo<'a>) -> &mut Self
pub fn one_btc_vault(&mut self, one_btc_vault: &'b AccountInfo<'a>) -> &mut Self
1 BTC Vault singleton — receives the round’s accumulated 1 BTC fee leg.
pub fn one_btc_vault_usd_ata( &mut self, one_btc_vault_usd_ata: &'b AccountInfo<'a>, ) -> &mut Self
Sourcepub fn treasury(&mut self, treasury: &'b AccountInfo<'a>) -> &mut Self
pub fn treasury(&mut self, treasury: &'b AccountInfo<'a>) -> &mut Self
Treasury singleton — receives the round’s accumulated protocol fee leg.
No seeds constraint: discriminator + owner checks pin the one Treasury
instance that can ever exist (init on fixed seeds).
pub fn treasury_usd_ata( &mut self, treasury_usd_ata: &'b AccountInfo<'a>, ) -> &mut Self
Sourcepub fn slot_hashes(&mut self, slot_hashes: &'b AccountInfo<'a>) -> &mut Self
pub fn slot_hashes(&mut self, slot_hashes: &'b AccountInfo<'a>) -> &mut Self
because the sysvar is too large to deserialize.
pub fn token_program(&mut self, token_program: &'b AccountInfo<'a>) -> &mut Self
pub fn system_program( &mut self, system_program: &'b AccountInfo<'a>, ) -> &mut Self
pub fn program(&mut self, program: &'b AccountInfo<'a>) -> &mut Self
Sourcepub fn add_remaining_account(
&mut self,
account: &'b AccountInfo<'a>,
is_writable: bool,
is_signer: bool,
) -> &mut Self
pub fn add_remaining_account( &mut self, account: &'b AccountInfo<'a>, is_writable: bool, is_signer: bool, ) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(
&mut self,
accounts: &[(&'b AccountInfo<'a>, bool, bool)],
) -> &mut Self
pub fn add_remaining_accounts( &mut self, accounts: &[(&'b AccountInfo<'a>, bool, bool)], ) -> &mut Self
Add additional accounts to the instruction.
Each account is represented by a tuple of the AccountInfo, a bool indicating whether the account is writable or not,
and a bool indicating whether the account is a signer or not.
pub fn invoke(&self) -> ProgramResult
pub fn invoke_signed(&self, signers_seeds: &[&[&[u8]]]) -> ProgramResult
Trait Implementations§
Source§impl<'a, 'b> Clone for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> Clone for RotateRoundCpiBuilder<'a, 'b>
Source§fn clone(&self) -> RotateRoundCpiBuilder<'a, 'b>
fn clone(&self) -> RotateRoundCpiBuilder<'a, 'b>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a, 'b> !RefUnwindSafe for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> !Send for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> !Sync for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> !UnwindSafe for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> Freeze for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> Unpin for RotateRoundCpiBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for RotateRoundCpiBuilder<'a, 'b>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more