pub struct PriceList { /* private fields */ }
Expand description
Provides prices for operations in the VM. All costs are in milligas.
Implementations§
source§impl PriceList
impl PriceList
sourcepub fn on_chain_message(&self, msg_size: usize) -> GasCharge
pub fn on_chain_message(&self, msg_size: usize) -> GasCharge
Returns the gas required for storing a message of a given size in the chain, plus the cost of updating the sending actor’s nonce and balance in the state-tree.
sourcepub fn on_value_transfer(&self) -> GasCharge
pub fn on_value_transfer(&self) -> GasCharge
Returns the gas required when invoking a method.
sourcepub fn on_method_invocation(
&self,
_param_size: u32,
param_links: usize,
) -> GasCharge
pub fn on_method_invocation( &self, _param_size: u32, param_links: usize, ) -> GasCharge
Returns the gas required when invoking a method.
sourcepub fn on_method_return(
&self,
call_depth: u32,
return_size: u32,
return_links: usize,
) -> GasCharge
pub fn on_method_return( &self, call_depth: u32, return_size: u32, return_links: usize, ) -> GasCharge
Returns the gas required for returning a value from a method. At the top-level, this charges for storing the block on-chain. Everywhere else, it charges for tracking IPLD links.
sourcepub fn on_create_actor(&self, new_address: bool) -> GasCharge
pub fn on_create_actor(&self, new_address: bool) -> GasCharge
Returns the gas required for creating an actor. Pass true
to when explicitly assigning a
new address.
sourcepub fn on_delete_actor(&self) -> GasCharge
pub fn on_delete_actor(&self) -> GasCharge
Returns the gas required for deleting an actor.
sourcepub fn on_verify_signature(
&self,
sig_type: SignatureType,
data_len: usize,
) -> GasCharge
pub fn on_verify_signature( &self, sig_type: SignatureType, data_len: usize, ) -> GasCharge
Returns gas required for signature verification.
sourcepub fn on_verify_aggregate_signature(
&self,
num_sigs: usize,
data_len: usize,
) -> GasCharge
pub fn on_verify_aggregate_signature( &self, num_sigs: usize, data_len: usize, ) -> GasCharge
Returns gas required for BLS aggregate signature verification.
sourcepub fn on_recover_secp_public_key(&self) -> GasCharge
pub fn on_recover_secp_public_key(&self) -> GasCharge
Returns gas required for recovering signer pubkey from signature
sourcepub fn on_hashing(&self, hasher: SupportedHashes, data_len: usize) -> GasCharge
pub fn on_hashing(&self, hasher: SupportedHashes, data_len: usize) -> GasCharge
Returns gas required for hashing data.
pub fn on_utf8_validation(&self, len: usize) -> GasCharge
sourcepub fn on_compute_unsealed_sector_cid(
&self,
_proof: RegisteredSealProof,
_pieces: &[PieceInfo],
) -> GasCharge
pub fn on_compute_unsealed_sector_cid( &self, _proof: RegisteredSealProof, _pieces: &[PieceInfo], ) -> GasCharge
Returns gas required for computing unsealed sector Cid.
sourcepub fn on_verify_seal(&self, _info: &SealVerifyInfo) -> GasCharge
pub fn on_verify_seal(&self, _info: &SealVerifyInfo) -> GasCharge
Returns gas required for seal verification.
pub fn on_verify_aggregate_seals( &self, aggregate: &AggregateSealVerifyProofAndInfos, ) -> GasCharge
sourcepub fn on_verify_replica_update(
&self,
_replica: &ReplicaUpdateInfo,
) -> GasCharge
pub fn on_verify_replica_update( &self, _replica: &ReplicaUpdateInfo, ) -> GasCharge
Returns gas required for replica verification.
sourcepub fn on_verify_post(&self, info: &WindowPoStVerifyInfo) -> GasCharge
pub fn on_verify_post(&self, info: &WindowPoStVerifyInfo) -> GasCharge
Returns gas required for PoSt verification.
sourcepub fn on_verify_consensus_fault(
&self,
_h1_len: usize,
_h2_len: usize,
_extra_len: usize,
) -> GasCharge
pub fn on_verify_consensus_fault( &self, _h1_len: usize, _h2_len: usize, _extra_len: usize, ) -> GasCharge
Returns gas required for verifying consensus fault.
sourcepub fn on_get_randomness(&self, lookback: ChainEpoch) -> GasCharge
pub fn on_get_randomness(&self, lookback: ChainEpoch) -> GasCharge
Returns the cost of the gas required for getting randomness from the client with the given lookback.
sourcepub fn on_block_open_base(&self) -> GasCharge
pub fn on_block_open_base(&self) -> GasCharge
Returns the base gas required for loading an object, independent of the object’s size.
sourcepub fn on_block_open(&self, data_size: usize, links: usize) -> GasCharge
pub fn on_block_open(&self, data_size: usize, links: usize) -> GasCharge
Returns the gas required for loading an object based on the size of the object.
sourcepub fn on_block_read(&self, data_size: usize) -> GasCharge
pub fn on_block_read(&self, data_size: usize) -> GasCharge
Returns the gas required for reading a loaded object.
sourcepub fn on_block_create(&self, data_size: usize, links: usize) -> GasCharge
pub fn on_block_create(&self, data_size: usize, links: usize) -> GasCharge
Returns the gas required for adding an object to the FVM cache.
sourcepub fn on_block_link(
&self,
hash_code: SupportedHashes,
data_size: usize,
) -> GasCharge
pub fn on_block_link( &self, hash_code: SupportedHashes, data_size: usize, ) -> GasCharge
Returns the gas required for committing an object to the state blockstore.
sourcepub fn on_block_stat(&self) -> GasCharge
pub fn on_block_stat(&self) -> GasCharge
Returns the gas required for storing an object.
sourcepub fn on_actor_lookup(&self) -> GasCharge
pub fn on_actor_lookup(&self) -> GasCharge
Returns the gas required to lookup an actor in the state-tree.
sourcepub fn on_actor_update(&self) -> GasCharge
pub fn on_actor_update(&self) -> GasCharge
Returns the gas required to update an actor in the state-tree. Assumes that the actor lookup fee has already been charged.
sourcepub fn on_actor_create(&self) -> GasCharge
pub fn on_actor_create(&self) -> GasCharge
Returns the gas required to create a new actor in the state-tree. Assumes that the actor lookup and update fees have already been charged.
sourcepub fn on_self_balance(&self) -> GasCharge
pub fn on_self_balance(&self) -> GasCharge
Returns the gas required for accessing the balance of the current actor.
sourcepub fn on_balance_of(&self) -> GasCharge
pub fn on_balance_of(&self) -> GasCharge
Returns the gas required for accessing the balance of an actor.
sourcepub fn on_resolve_address(&self) -> GasCharge
pub fn on_resolve_address(&self) -> GasCharge
Returns the gas required for resolving an actor address.
Might require lookup in the state tree as well as loading the state of the init actor.
sourcepub fn on_lookup_delegated_address(&self) -> GasCharge
pub fn on_lookup_delegated_address(&self) -> GasCharge
Returns the gas required for looking up an actor’s delegated address.
sourcepub fn on_get_actor_code_cid(&self) -> GasCharge
pub fn on_get_actor_code_cid(&self) -> GasCharge
Returns the gas required for getting the CID of the code of an actor.
Might require looking up the actor in the state tree.
sourcepub fn on_get_builtin_actor_type(&self) -> GasCharge
pub fn on_get_builtin_actor_type(&self) -> GasCharge
Returns the gas required for looking up the type of a builtin actor by CID.
sourcepub fn on_get_code_cid_for_type(&self) -> GasCharge
pub fn on_get_code_cid_for_type(&self) -> GasCharge
Returns the gas required for looking up the CID of a builtin actor by type.
sourcepub fn on_tipset_cid(&self, lookback: ChainEpoch) -> GasCharge
pub fn on_tipset_cid(&self, lookback: ChainEpoch) -> GasCharge
Returns the gas required for looking up a tipset CID with the given lookback.
sourcepub fn on_network_context(&self) -> GasCharge
pub fn on_network_context(&self) -> GasCharge
Returns the gas required for accessing the network context.
sourcepub fn on_message_context(&self) -> GasCharge
pub fn on_message_context(&self) -> GasCharge
Returns the gas required for accessing the message context.
sourcepub fn on_install_actor(&self, wasm_size: usize) -> GasCharge
pub fn on_install_actor(&self, wasm_size: usize) -> GasCharge
Returns the gas required for installing an actor.
pub fn on_actor_event( &self, entries: usize, keysize: usize, valuesize: usize, ) -> GasCharge
pub fn on_get_root(&self) -> GasCharge
pub fn on_set_root(&self) -> GasCharge
Trait Implementations§
source§impl PartialEq for PriceList
impl PartialEq for PriceList
impl Eq for PriceList
impl StructuralPartialEq for PriceList
Auto Trait Implementations§
impl Freeze for PriceList
impl RefUnwindSafe for PriceList
impl Send for PriceList
impl Sync for PriceList
impl Unpin for PriceList
impl UnwindSafe for PriceList
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
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
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<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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 moresource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> References<RawCodec> for T
impl<T> References<RawCodec> for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.