Struct orao_solana_vrf::UpdateBuilder
source · pub struct UpdateBuilder { /* private fields */ }
sdk
only.Expand description
crate::UpdateNetwork
instruction builder.
Note:
- prioritization fees here are handled automatically based on the recent
prioritization fees — use
UpdateBuilder::with_compute_unit_price
to opt-out. - this builder is added for convenience — use
UpdateBuilder::into_raw_instruction
to get the raw instruction, or build it yourself (see theUpdateBuilder::into_raw_instruction
source)
Implementations§
source§impl UpdateBuilder
impl UpdateBuilder
Change configuration authority.
sourcepub fn with_treasury(self, treasury: Pubkey) -> Self
pub fn with_treasury(self, treasury: Pubkey) -> Self
Change treasury account address.
Change fulfillment authorities.
sourcepub fn with_token_fee_config(
self,
token_fee_config: Option<OraoTokenFeeConfig>,
) -> Self
pub fn with_token_fee_config( self, token_fee_config: Option<OraoTokenFeeConfig>, ) -> Self
Change token fee configuration.
sourcepub fn with_compute_unit_price(self, compute_unit_price: u64) -> Self
pub fn with_compute_unit_price(self, compute_unit_price: u64) -> Self
Defines a prioritization fee in micro-lamports (applied per compute unit).
Adds ComputeBudgetInstruction::SetComputeUnitPrice
to the request builder.
- if not specified, then median fee of the last 150 confirmed slots is used (this is by default)
- if zero, then compute unit price is not applied at all.
sourcepub fn with_compute_unit_price_multiplier(self, multiplier: f64) -> Self
pub fn with_compute_unit_price_multiplier(self, multiplier: f64) -> Self
Defines a multiplier that is applied to a median compute unit price.
This is only applied if no compute_unit_price specified, i.e. if compute unit price is measured as a median fee of the last 150 confirmed slots.
- if not specified, then no multiplier is applied (this is by default)
- if specified, then applied as follows:
compute_unit_price = median * multiplier
sourcepub fn with_compute_unit_limit(self, compute_unit_limit: u32) -> Self
pub fn with_compute_unit_limit(self, compute_unit_limit: u32) -> Self
Defines a specific compute unit limit that the transaction is allowed to consume.
Adds ComputeBudgetInstruction::SetComputeUnitLimit
to the request builder.
- if not specified, then compute unit limit is not applied at all (this is by default)
- if specified, then applied as is
sourcepub fn into_raw_instruction(
self,
id: Pubkey,
payer: Pubkey,
current_config: NetworkConfiguration,
) -> Instruction
pub fn into_raw_instruction( self, id: Pubkey, payer: Pubkey, current_config: NetworkConfiguration, ) -> Instruction
Builds the raw crate::UpdateNetwork
instruction based on this builder.
This is a low-level function, consider using UpdateBuilder::build
.
id
— the VRF program id (usually thecrate::id
)payer
— transaction fee payer that will sign the tx. This must be the effective authority.current_config
— is the effective VRF configuration (seecrate::get_network_state
)
Compute Budget Program configuration is ignored.
sourcepub async fn build<C: Deref<Target = impl Signer> + Clone>(
self,
orao_vrf: &Program<C>,
) -> Result<RequestBuilder<'_, C>, ClientError>
pub async fn build<C: Deref<Target = impl Signer> + Clone>( self, orao_vrf: &Program<C>, ) -> Result<RequestBuilder<'_, C>, ClientError>
Builds the request.
Note that this function returns an anchor_client::RequestBuilder
instance,
so feel free to put more instructions into the request.
Trait Implementations§
source§impl Debug for UpdateBuilder
impl Debug for UpdateBuilder
source§impl Default for UpdateBuilder
impl Default for UpdateBuilder
source§fn default() -> UpdateBuilder
fn default() -> UpdateBuilder
Auto Trait Implementations§
impl Freeze for UpdateBuilder
impl RefUnwindSafe for UpdateBuilder
impl Send for UpdateBuilder
impl Sync for UpdateBuilder
impl Unpin for UpdateBuilder
impl UnwindSafe for UpdateBuilder
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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