[][src]Struct near_bindgen::VMConfig

pub struct VMConfig {
    pub ext_costs: ExtCostsConfig,
    pub grow_mem_cost: u32,
    pub regular_op_cost: u32,
    pub max_gas_burnt: u64,
    pub max_stack_height: u32,
    pub initial_memory_pages: u32,
    pub max_memory_pages: u32,
    pub registers_memory_limit: u64,
    pub max_register_size: u64,
    pub max_number_registers: u64,
    pub max_number_logs: u64,
    pub max_log_len: u64,
}

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.

max_gas_burnt: u64

Max amount of gas that can be used, excluding gas attached to promises.

max_stack_height: u32

How tall the stack is allowed to grow?

See https://wiki.parity.io/WebAssembly-StackHeight to find out how the stack frame cost is calculated.

initial_memory_pages: u32

The initial number of memory pages.

max_memory_pages: u32

What is the maximal memory pages amount is allowed to have for a contract.

registers_memory_limit: u64

Limit of memory used by registers.

max_register_size: u64

Maximum number of bytes that can be stored in a single register.

max_number_registers: u64

Maximum number of registers that can be used simultaneously.

max_number_logs: u64

Maximum number of log entries.

max_log_len: u64

Maximum length of a single log, in bytes.

Methods

impl VMConfig[src]

pub fn non_crypto_hash(&self) -> u64[src]

Computes non-cryptographically-proof hash. The computation is fast but not cryptographically secure.

pub fn free() -> VMConfig[src]

Trait Implementations

impl Clone for VMConfig[src]

impl Debug for VMConfig[src]

impl Default for VMConfig[src]

impl<'de> Deserialize<'de> for VMConfig[src]

impl Hash for VMConfig[src]

impl Serialize for VMConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.