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
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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