pub struct RotateRoundBuilder { /* private fields */ }Expand description
Instruction builder for RotateRound.
§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[optional]slot_hashes (default toSysvarS1otHashes111111111111111111111111111)[optional]token_program (default toTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)[optional]system_program (default to11111111111111111111111111111111)[]event_authority[]program
Implementations§
Source§impl RotateRoundBuilder
impl RotateRoundBuilder
pub fn new() -> Self
pub fn satrush_config(&mut self, satrush_config: Address) -> &mut Self
Sourcepub fn board(&mut self, board: Address) -> &mut Self
pub fn board(&mut self, board: Address) -> &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: Address) -> &mut Self
pub fn current_round(&mut self, current_round: Address) -> &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: Address) -> &mut Self
pub fn next_round(&mut self, next_round: Address) -> &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: Address) -> &mut Self
Sourcepub fn board_usd_ata(&mut self, board_usd_ata: Address) -> &mut Self
pub fn board_usd_ata(&mut self, board_usd_ata: Address) -> &mut Self
Board’s USD pool where every deploy’s full amount landed — the sweep source.
Sourcepub fn epoch_vault(&mut self, epoch_vault: Address) -> &mut Self
pub fn epoch_vault(&mut self, epoch_vault: Address) -> &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: Address) -> &mut Self
Sourcepub fn one_btc_vault(&mut self, one_btc_vault: Address) -> &mut Self
pub fn one_btc_vault(&mut self, one_btc_vault: Address) -> &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: Address, ) -> &mut Self
Sourcepub fn treasury(&mut self, treasury: Address) -> &mut Self
pub fn treasury(&mut self, treasury: Address) -> &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: Address) -> &mut Self
Sourcepub fn slot_hashes(&mut self, slot_hashes: Address) -> &mut Self
pub fn slot_hashes(&mut self, slot_hashes: Address) -> &mut Self
[optional account, default to 'SysvarS1otHashes111111111111111111111111111']
because the sysvar is too large to deserialize.
Sourcepub fn token_program(&mut self, token_program: Address) -> &mut Self
pub fn token_program(&mut self, token_program: Address) -> &mut Self
[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']
Sourcepub fn system_program(&mut self, system_program: Address) -> &mut Self
pub fn system_program(&mut self, system_program: Address) -> &mut Self
[optional account, default to '11111111111111111111111111111111']
pub fn program(&mut self, program: Address) -> &mut Self
Sourcepub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
pub fn add_remaining_account(&mut self, account: AccountMeta) -> &mut Self
Add an additional account to the instruction.
Sourcepub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
pub fn add_remaining_accounts(&mut self, accounts: &[AccountMeta]) -> &mut Self
Add additional accounts to the instruction.
pub fn instruction(&self) -> Instruction
Trait Implementations§
Source§impl Clone for RotateRoundBuilder
impl Clone for RotateRoundBuilder
Source§fn clone(&self) -> RotateRoundBuilder
fn clone(&self) -> RotateRoundBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RotateRoundBuilder
impl Debug for RotateRoundBuilder
Source§impl Default for RotateRoundBuilder
impl Default for RotateRoundBuilder
Source§fn default() -> RotateRoundBuilder
fn default() -> RotateRoundBuilder
Auto Trait Implementations§
impl Freeze for RotateRoundBuilder
impl RefUnwindSafe for RotateRoundBuilder
impl Send for RotateRoundBuilder
impl Sync for RotateRoundBuilder
impl Unpin for RotateRoundBuilder
impl UnsafeUnpin for RotateRoundBuilder
impl UnwindSafe for RotateRoundBuilder
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