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: u32, 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,
remove_rounding_in_fee_calculation: bool,
) -> u64
👎Deprecated since 2.1.0: Please use solana_fee::calculate_fee
instead.
pub fn calculate_fee( &self, message: &SanitizedMessage, lamports_per_signature: u64, budget_limits: &FeeBudgetLimits, include_loaded_account_data_size_in_fee: bool, remove_rounding_in_fee_calculation: bool, ) -> u64
solana_fee::calculate_fee
instead.Calculate fee for SanitizedMessage
Sourcepub fn calculate_fee_details(
&self,
message: &SanitizedMessage,
lamports_per_signature: u64,
budget_limits: &FeeBudgetLimits,
include_loaded_account_data_size_in_fee: bool,
remove_rounding_in_fee_calculation: bool,
) -> FeeDetails
👎Deprecated since 2.1.0: Please use solana_fee::calculate_fee_details
instead.
pub fn calculate_fee_details( &self, message: &SanitizedMessage, lamports_per_signature: u64, budget_limits: &FeeBudgetLimits, include_loaded_account_data_size_in_fee: bool, remove_rounding_in_fee_calculation: bool, ) -> FeeDetails
solana_fee::calculate_fee_details
instead.Calculate fee details for SanitizedMessage
Trait Implementations§
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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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