Struct solana_sdk::fee::FeeStructure
source · pub struct FeeStructure {
pub lamports_per_signature: u64,
pub lamports_per_write_lock: u64,
pub compute_fee_bins: Vec<FeeBin>,
}
Expand description
Information used to calculate fees
Fields§
§lamports_per_signature: u64
lamports per signature
lamports_per_write_lock: u64
lamports_per_write_lock
compute_fee_bins: Vec<FeeBin>
Compute unit fee bins
Implementations§
source§impl FeeStructure
impl FeeStructure
pub fn new( sol_per_signature: f64, sol_per_write_lock: f64, compute_fee_bins: Vec<(u64, f64)> ) -> Self
pub fn get_max_fee(&self, num_signatures: u64, num_write_locks: u64) -> u64
pub fn calculate_memory_usage_cost( loaded_accounts_data_size_limit: usize, heap_cost: u64 ) -> u64
sourcepub fn calculate_fee(
&self,
message: &SanitizedMessage,
lamports_per_signature: u64,
budget_limits: &FeeBudgetLimits,
include_loaded_account_data_size_in_fee: bool
) -> u64
pub fn calculate_fee( &self, message: &SanitizedMessage, lamports_per_signature: u64, budget_limits: &FeeBudgetLimits, include_loaded_account_data_size_in_fee: bool ) -> u64
Calculate fee for SanitizedMessage
Trait Implementations§
source§impl AbiExample for FeeStructure
impl AbiExample for FeeStructure
source§impl Clone for FeeStructure
impl Clone for FeeStructure
source§fn clone(&self) -> FeeStructure
fn clone(&self) -> FeeStructure
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FeeStructure
impl Debug for FeeStructure
source§impl Default for FeeStructure
impl Default for FeeStructure
source§impl PartialEq for FeeStructure
impl PartialEq for FeeStructure
source§fn eq(&self, other: &FeeStructure) -> bool
fn eq(&self, other: &FeeStructure) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FeeStructure
impl StructuralPartialEq for FeeStructure
Auto Trait Implementations§
impl Freeze for FeeStructure
impl RefUnwindSafe for FeeStructure
impl Send for FeeStructure
impl Sync for FeeStructure
impl Unpin for FeeStructure
impl UnwindSafe for FeeStructure
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
Mutably borrows from an owned value. Read more