Struct near_vm_logic::VMConfig
source · pub struct VMConfig {
pub ext_costs: ExtCostsConfig,
pub grow_mem_cost: u32,
pub regular_op_cost: u32,
pub limit_config: VMLimitConfig,
}
Expand description
Dynamic configuration parameters required for the WASM runtime to execute a smart contract.
This (VMConfig
) and RuntimeFeesConfig
combined are sufficient to define
protocol specific behavior of the contract runtime. The former contains
configuration for the WASM runtime specifically, while the latter contains
configuration for the transaction runtime and WASM runtime.
Fields§
§ext_costs: ExtCostsConfig
Costs for runtime externals
grow_mem_cost: u32
Gas cost of a growing memory by single page.
regular_op_cost: u32
Gas cost of a regular operation.
limit_config: VMLimitConfig
Describes limits for VM and Runtime.
Implementations§
Trait Implementations§
source§impl From<VMConfigView> for VMConfig
impl From<VMConfigView> for VMConfig
source§fn from(view: VMConfigView) -> VMConfig
fn from(view: VMConfigView) -> VMConfig
Converts to this type from the input type.
source§impl PartialEq<VMConfig> for VMConfig
impl PartialEq<VMConfig> for VMConfig
impl Eq for VMConfig
impl StructuralEq for VMConfig
impl StructuralPartialEq for VMConfig
Auto Trait Implementations§
impl RefUnwindSafe for VMConfig
impl Send for VMConfig
impl Sync for VMConfig
impl Unpin for VMConfig
impl UnwindSafe for VMConfig
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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