pub struct DeployPublicBuilder { /* private fields */ }Expand description
Instruction builder for DeployPublic.
§Accounts:
[writable, signer]authority[]satrush_config[writable]board[writable]round[]usd_mint[writable]authority_usd_ata[writable]board_usd_ata[writable]public_deployment[writable]miner[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]token_program (default toTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)[optional]system_program (default to11111111111111111111111111111111)
Implementations§
Source§impl DeployPublicBuilder
impl DeployPublicBuilder
pub fn new() -> Self
pub fn satrush_config(&mut self, satrush_config: Address) -> &mut Self
pub fn board(&mut self, board: Address) -> &mut Self
Sourcepub fn round(&mut self, round: Address) -> &mut Self
pub fn round(&mut self, round: Address) -> &mut Self
Round the miner is deploying into. Must be the board’s current round.
Stays a regular Account: its id feeds PDA seeds here and below, and
the IDL seed parser can only encode plain field paths like round.id.
pub fn usd_mint(&mut self, usd_mint: Address) -> &mut Self
Miner’s USD token account funds are pulled from.
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 deposit pool that funds are deposited into.
Sourcepub fn public_deployment(&mut self, public_deployment: Address) -> &mut Self
pub fn public_deployment(&mut self, public_deployment: Address) -> &mut Self
Per-(round, miner) deployment record. Init fails if the miner already deployed into this round.
Sourcepub fn miner(&mut self, miner: Address) -> &mut Self
pub fn miner(&mut self, miner: Address) -> &mut Self
Miner profile for authority. Created lazily on the first deploy and
loaded on subsequent ones; its streak advances on every play.
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 epoch fee leg.
Sourcepub fn epoch_vault_usd_ata(&mut self, epoch_vault_usd_ata: Address) -> &mut Self
pub fn epoch_vault_usd_ata(&mut self, epoch_vault_usd_ata: Address) -> &mut Self
Epoch Vault’s USD pool the epoch fee is transferred into.
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 1 BTC fee leg.
Sourcepub fn one_btc_vault_usd_ata(
&mut self,
one_btc_vault_usd_ata: Address,
) -> &mut Self
pub fn one_btc_vault_usd_ata( &mut self, one_btc_vault_usd_ata: Address, ) -> &mut Self
1 BTC Vault’s USD pool the 1 BTC fee is transferred into.
Sourcepub fn treasury(&mut self, treasury: Address) -> &mut Self
pub fn treasury(&mut self, treasury: Address) -> &mut Self
Treasury singleton — receives the protocol fee leg. No seeds constraint:
the PDA derivation is redundant — the discriminator + owner checks already
pin the one Treasury instance that can ever exist (init on fixed seeds).
Sourcepub fn treasury_usd_ata(&mut self, treasury_usd_ata: Address) -> &mut Self
pub fn treasury_usd_ata(&mut self, treasury_usd_ata: Address) -> &mut Self
Treasury’s USD fee pool the protocol fee is transferred into. Validated by
field equality (token::) rather than ATA derivation (associated_token::):
this instruction sits at the 4 KB BPF stack ceiling and cannot afford the
derivation. Any treasury-owned USD account passes, but misdirecting the fee
into a non-canonical one only strands the payer’s own fee.
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 selection_mask(&mut self, selection_mask: u32) -> &mut Self
pub fn amount(&mut self, amount: u64) -> &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 DeployPublicBuilder
impl Clone for DeployPublicBuilder
Source§fn clone(&self) -> DeployPublicBuilder
fn clone(&self) -> DeployPublicBuilder
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 DeployPublicBuilder
impl Debug for DeployPublicBuilder
Source§impl Default for DeployPublicBuilder
impl Default for DeployPublicBuilder
Source§fn default() -> DeployPublicBuilder
fn default() -> DeployPublicBuilder
Auto Trait Implementations§
impl Freeze for DeployPublicBuilder
impl RefUnwindSafe for DeployPublicBuilder
impl Send for DeployPublicBuilder
impl Sync for DeployPublicBuilder
impl Unpin for DeployPublicBuilder
impl UnsafeUnpin for DeployPublicBuilder
impl UnwindSafe for DeployPublicBuilder
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