[][src]Struct srml_contract::Schedule

pub struct Schedule<Gas> {
    pub version: u32,
    pub put_code_per_byte_cost: Gas,
    pub grow_mem_cost: Gas,
    pub regular_op_cost: Gas,
    pub return_data_per_byte_cost: Gas,
    pub event_data_per_byte_cost: Gas,
    pub event_data_base_cost: Gas,
    pub sandbox_data_read_cost: Gas,
    pub sandbox_data_write_cost: Gas,
    pub max_stack_height: u32,
    pub max_memory_pages: u32,
    pub enable_println: bool,
}

Definition of the cost schedule and other parameterizations for wasm vm.

Fields

version: u32

Version of the schedule.

put_code_per_byte_cost: Gas

Cost of putting a byte of code into the storage.

grow_mem_cost: Gas

Gas cost of a growing memory by single page.

regular_op_cost: Gas

Gas cost of a regular operation.

return_data_per_byte_cost: Gas

Gas cost per one byte returned.

event_data_per_byte_cost: Gas

Gas cost to deposit an event; the per-byte portion.

event_data_base_cost: Gas

Gas cost to deposit an event; the base.

sandbox_data_read_cost: Gas

Gas cost per one byte read from the sandbox memory.

sandbox_data_write_cost: Gas

Gas cost per one byte written to the sandbox memory.

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.

max_memory_pages: u32

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

enable_println: bool

Whether the ext_println function is allowed to be used contracts. MUST only be enabled for dev chains, NOT for production chains

Trait Implementations

impl<Gas: Eq> Eq for Schedule<Gas>[src]

impl<Gas: As<u64>> Default for Schedule<Gas>[src]

impl<Gas: Clone> Clone for Schedule<Gas>[src]

impl<Gas: PartialEq> PartialEq<Schedule<Gas>> for Schedule<Gas>[src]

impl<Gas: Debug> Debug for Schedule<Gas>[src]

impl<Gas> Encode for Schedule<Gas> where
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode,
    Gas: Encode
[src]

impl<Gas> Serialize for Schedule<Gas> where
    Gas: Serialize
[src]

impl<Gas> Decode for Schedule<Gas> where
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode,
    Gas: Decode
[src]

impl<'de, Gas> Deserialize<'de> for Schedule<Gas> where
    Gas: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<Gas> Sync for Schedule<Gas> where
    Gas: Sync

impl<Gas> Send for Schedule<Gas> where
    Gas: Send

impl<Gas> Unpin for Schedule<Gas> where
    Gas: Unpin

impl<Gas> UnwindSafe for Schedule<Gas> where
    Gas: UnwindSafe

impl<Gas> RefUnwindSafe for Schedule<Gas> where
    Gas: RefUnwindSafe

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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

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

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

impl<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> Clear for T where
    T: PartialEq<T> + Eq + Default
[src]

impl<T> MaybeSerializeDebugButNotDeserialize for T where
    T: Debug + Serialize
[src]

impl<T> MaybeSerialize for T where
    T: Serialize
[src]

impl<T> MaybeSerializeDebug for T where
    T: Debug + DeserializeOwned + Serialize
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Member for T where
    T: 'static + MaybeDebug + Send + Sync + PartialEq<T> + Eq + Clone
[src]

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

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

impl<T> KeyedVec for T where
    T: Codec
[src]

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

type Output = T

Should always be Self

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized
[src]

impl<T> InitializableFromZeroed for T where
    T: Default
[src]

impl<T> Erased for T[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> Parameter for T where
    T: Codec + Clone + Eq + Debug
[src]

impl<T> Hashable for T where
    T: Codec
[src]