Struct near_parameters::view::ExtCostsConfigView

source ·
pub struct ExtCostsConfigView {
Show 67 fields pub base: Gas, pub contract_loading_base: Gas, pub contract_loading_bytes: Gas, pub read_memory_base: Gas, pub read_memory_byte: Gas, pub write_memory_base: Gas, pub write_memory_byte: Gas, pub read_register_base: Gas, pub read_register_byte: Gas, pub write_register_base: Gas, pub write_register_byte: Gas, pub utf8_decoding_base: Gas, pub utf8_decoding_byte: Gas, pub utf16_decoding_base: Gas, pub utf16_decoding_byte: Gas, pub sha256_base: Gas, pub sha256_byte: Gas, pub keccak256_base: Gas, pub keccak256_byte: Gas, pub keccak512_base: Gas, pub keccak512_byte: Gas, pub ripemd160_base: Gas, pub ripemd160_block: Gas, pub ed25519_verify_base: Gas, pub ed25519_verify_byte: Gas, pub ecrecover_base: Gas, pub log_base: Gas, pub log_byte: Gas, pub storage_write_base: Gas, pub storage_write_key_byte: Gas, pub storage_write_value_byte: Gas, pub storage_write_evicted_byte: Gas, pub storage_read_base: Gas, pub storage_read_key_byte: Gas, pub storage_read_value_byte: Gas, pub storage_remove_base: Gas, pub storage_remove_key_byte: Gas, pub storage_remove_ret_value_byte: Gas, pub storage_has_key_base: Gas, pub storage_has_key_byte: Gas, pub storage_iter_create_prefix_base: Gas, pub storage_iter_create_prefix_byte: Gas, pub storage_iter_create_range_base: Gas, pub storage_iter_create_from_byte: Gas, pub storage_iter_create_to_byte: Gas, pub storage_iter_next_base: Gas, pub storage_iter_next_key_byte: Gas, pub storage_iter_next_value_byte: Gas, pub touching_trie_node: Gas, pub read_cached_trie_node: Gas, pub promise_and_base: Gas, pub promise_and_per_promise: Gas, pub promise_return: Gas, pub validator_stake_base: Gas, pub validator_total_stake_base: Gas, pub contract_compile_base: Gas, pub contract_compile_bytes: Gas, pub alt_bn128_g1_multiexp_base: Gas, pub alt_bn128_g1_multiexp_element: Gas, pub alt_bn128_g1_sum_base: Gas, pub alt_bn128_g1_sum_element: Gas, pub alt_bn128_pairing_check_base: Gas, pub alt_bn128_pairing_check_element: Gas, pub yield_create_base: Gas, pub yield_create_byte: Gas, pub yield_resume_base: Gas, pub yield_resume_byte: Gas,
}
Expand description

Typed view of ExtCostsConfig to preserve JSON output field names in protocol config RPC output.

Fields§

§base: Gas

Base cost for calling a host function.

§contract_loading_base: Gas

Base cost of loading a pre-compiled contract

§contract_loading_bytes: Gas

Cost per byte of loading a pre-compiled contract

§read_memory_base: Gas

Base cost for guest memory read

§read_memory_byte: Gas

Cost for guest memory read

§write_memory_base: Gas

Base cost for guest memory write

§write_memory_byte: Gas

Cost for guest memory write per byte

§read_register_base: Gas

Base cost for reading from register

§read_register_byte: Gas

Cost for reading byte from register

§write_register_base: Gas

Base cost for writing into register

§write_register_byte: Gas

Cost for writing byte into register

§utf8_decoding_base: Gas

Base cost of decoding utf8. It’s used for log_utf8 and panic_utf8.

§utf8_decoding_byte: Gas

Cost per byte of decoding utf8. It’s used for log_utf8 and panic_utf8.

§utf16_decoding_base: Gas

Base cost of decoding utf16. It’s used for log_utf16.

§utf16_decoding_byte: Gas

Cost per byte of decoding utf16. It’s used for log_utf16.

§sha256_base: Gas

Cost of getting sha256 base

§sha256_byte: Gas

Cost of getting sha256 per byte

§keccak256_base: Gas

Cost of getting sha256 base

§keccak256_byte: Gas

Cost of getting sha256 per byte

§keccak512_base: Gas

Cost of getting sha256 base

§keccak512_byte: Gas

Cost of getting sha256 per byte

§ripemd160_base: Gas

Cost of getting ripemd160 base

§ripemd160_block: Gas

Cost of getting ripemd160 per message block

§ed25519_verify_base: Gas

Cost of getting ed25519 base

§ed25519_verify_byte: Gas

Cost of getting ed25519 per byte

§ecrecover_base: Gas

Cost of calling ecrecover

§log_base: Gas

Cost for calling logging.

§log_byte: Gas

Cost for logging per byte

§storage_write_base: Gas

Storage trie write key base cost

§storage_write_key_byte: Gas

Storage trie write key per byte cost

§storage_write_value_byte: Gas

Storage trie write value per byte cost

§storage_write_evicted_byte: Gas

Storage trie write cost per byte of evicted value.

§storage_read_base: Gas

Storage trie read key base cost

§storage_read_key_byte: Gas

Storage trie read key per byte cost

§storage_read_value_byte: Gas

Storage trie read value cost per byte cost

§storage_remove_base: Gas

Remove key from trie base cost

§storage_remove_key_byte: Gas

Remove key from trie per byte cost

§storage_remove_ret_value_byte: Gas

Remove key from trie ret value byte cost

§storage_has_key_base: Gas

Storage trie check for key existence cost base

§storage_has_key_byte: Gas

Storage trie check for key existence per key byte

§storage_iter_create_prefix_base: Gas

Create trie prefix iterator cost base

§storage_iter_create_prefix_byte: Gas

Create trie prefix iterator cost per byte.

§storage_iter_create_range_base: Gas

Create trie range iterator cost base

§storage_iter_create_from_byte: Gas

Create trie range iterator cost per byte of from key.

§storage_iter_create_to_byte: Gas

Create trie range iterator cost per byte of to key.

§storage_iter_next_base: Gas

Trie iterator per key base cost

§storage_iter_next_key_byte: Gas

Trie iterator next key byte cost

§storage_iter_next_value_byte: Gas

Trie iterator next key byte cost

§touching_trie_node: Gas

Cost per reading trie node from DB

§read_cached_trie_node: Gas

Cost for reading trie node from memory

§promise_and_base: Gas

Cost for calling promise_and

§promise_and_per_promise: Gas

Cost for calling promise_and for each promise

§promise_return: Gas

Cost for calling promise_return

§validator_stake_base: Gas

Cost of calling validator_stake.

§validator_total_stake_base: Gas

Cost of calling validator_total_stake.

§contract_compile_base: Gas§contract_compile_bytes: Gas§alt_bn128_g1_multiexp_base: Gas

Base cost for multiexp

§alt_bn128_g1_multiexp_element: Gas

Per element cost for multiexp

§alt_bn128_g1_sum_base: Gas

Base cost for sum

§alt_bn128_g1_sum_element: Gas

Per element cost for sum

§alt_bn128_pairing_check_base: Gas

Base cost for pairing check

§alt_bn128_pairing_check_element: Gas

Per element cost for pairing check

§yield_create_base: Gas

Base cost for creating a yield promise.

§yield_create_byte: Gas

Per byte cost of arguments and method name.

§yield_resume_base: Gas

Base cost for resuming a yield receipt.

§yield_resume_byte: Gas

Per byte cost of resume payload.

Trait Implementations§

source§

impl Clone for ExtCostsConfigView

source§

fn clone(&self) -> ExtCostsConfigView

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExtCostsConfigView

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ExtCostsConfigView

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<ExtCostsConfig> for ExtCostsConfigView

source§

fn from(config: ExtCostsConfig) -> Self

Converts to this type from the input type.
source§

impl From<ExtCostsConfigView> for ExtCostsConfig

source§

fn from(view: ExtCostsConfigView) -> Self

Converts to this type from the input type.
source§

impl Hash for ExtCostsConfigView

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for ExtCostsConfigView

source§

fn eq(&self, other: &ExtCostsConfigView) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ExtCostsConfigView

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ExtCostsConfigView

source§

impl StructuralPartialEq for ExtCostsConfigView

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

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