pub struct FeeComponents {
pub min: u64,
pub max: u64,
pub constant: u64,
pub bandwidth_byte: u64,
pub verification: u64,
pub storage_byte_hour: u64,
pub ram_byte_hour: u64,
pub contract_transaction_gas: u64,
pub transfer_volume_hbar: u64,
pub response_memory_byte: u64,
pub response_disk_byte: u64,
}
Expand description
The different components used for fee calculation.
Fields§
§min: u64
The minimum fee that needs to be paid.
max: u64
The maximum fee that can be submitted.
constant: u64
A constant determined by the business to calculate the fee.
bandwidth_byte: u64
The cost of each byte in a transaction.
verification: u64
The cost of each signature in a transaction.
storage_byte_hour: u64
Cost of storage measured in byte-hours.
ram_byte_hour: u64
Cost of memory measured in byte-hours.
contract_transaction_gas: u64
Price of gas.
transfer_volume_hbar: u64
Cost per hbar transfered.
fee = floor(transfer_value in tinybars / (transfer_volume_hbar / 1000))
response_memory_byte: u64
The price per byte of bandwidth spent for data retrieved from memory for a response.
response_disk_byte: u64
The price per byte of bandwidth spent for data retrieved from disk for a response.
Implementations§
Source§impl FeeComponents
impl FeeComponents
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a new FeeComponents
from protobuf-encoded bytes
.
§Errors
Error::FromProtobuf
if decoding the bytes fails to produce a valid protobuf.Error::FromProtobuf
if decoding the protobuf fails.
Trait Implementations§
Source§impl Clone for FeeComponents
impl Clone for FeeComponents
Source§fn clone(&self) -> FeeComponents
fn clone(&self) -> FeeComponents
Returns a duplicate 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 FeeComponents
impl Debug for FeeComponents
Source§impl PartialEq for FeeComponents
impl PartialEq for FeeComponents
impl Eq for FeeComponents
impl StructuralPartialEq for FeeComponents
Auto Trait Implementations§
impl Freeze for FeeComponents
impl RefUnwindSafe for FeeComponents
impl Send for FeeComponents
impl Sync for FeeComponents
impl Unpin for FeeComponents
impl UnwindSafe for FeeComponents
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request