pub trait BaseRuntime {
    type Read: Debug + Send;
    type ContainsKey: Debug + Send;
    type ReadMultiValuesBytes: Debug + Send;
    type ReadValueBytes: Debug + Send;
    type FindKeysByPrefix: Debug + Send;
    type FindKeyValuesByPrefix: Debug + Send;

Show 21 methods // Required methods fn chain_id(&mut self) -> Result<ChainId, ExecutionError>; fn block_height(&mut self) -> Result<BlockHeight, ExecutionError>; fn application_id(&mut self) -> Result<UserApplicationId, ExecutionError>; fn application_parameters(&mut self) -> Result<Vec<u8>, ExecutionError>; fn read_system_timestamp(&mut self) -> Result<Timestamp, ExecutionError>; fn read_chain_balance(&mut self) -> Result<Amount, ExecutionError>; fn read_owner_balance( &mut self, owner: Owner ) -> Result<Amount, ExecutionError>; fn read_owner_balances( &mut self ) -> Result<Vec<(Owner, Amount)>, ExecutionError>; fn read_balance_owners(&mut self) -> Result<Vec<Owner>, ExecutionError>; fn chain_ownership(&mut self) -> Result<ChainOwnership, ExecutionError>; fn contains_key_new( &mut self, key: Vec<u8> ) -> Result<Self::ContainsKey, ExecutionError>; fn contains_key_wait( &mut self, promise: &Self::ContainsKey ) -> Result<bool, ExecutionError>; fn read_multi_values_bytes_new( &mut self, keys: Vec<Vec<u8>> ) -> Result<Self::ReadMultiValuesBytes, ExecutionError>; fn read_multi_values_bytes_wait( &mut self, promise: &Self::ReadMultiValuesBytes ) -> Result<Vec<Option<Vec<u8>>>, ExecutionError>; fn write_batch(&mut self, batch: Batch) -> Result<(), ExecutionError>; fn read_value_bytes_new( &mut self, key: Vec<u8> ) -> Result<Self::ReadValueBytes, ExecutionError>; fn read_value_bytes_wait( &mut self, promise: &Self::ReadValueBytes ) -> Result<Option<Vec<u8>>, ExecutionError>; fn find_keys_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeysByPrefix, ExecutionError>; fn find_keys_by_prefix_wait( &mut self, promise: &Self::FindKeysByPrefix ) -> Result<Vec<Vec<u8>>, ExecutionError>; fn find_key_values_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeyValuesByPrefix, ExecutionError>; fn find_key_values_by_prefix_wait( &mut self, promise: &Self::FindKeyValuesByPrefix ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, ExecutionError>;
}

Required Associated Types§

Required Methods§

source

fn chain_id(&mut self) -> Result<ChainId, ExecutionError>

The current chain ID.

source

fn block_height(&mut self) -> Result<BlockHeight, ExecutionError>

The current block height.

source

fn application_id(&mut self) -> Result<UserApplicationId, ExecutionError>

The current application ID.

source

fn application_parameters(&mut self) -> Result<Vec<u8>, ExecutionError>

The current application parameters.

source

fn read_system_timestamp(&mut self) -> Result<Timestamp, ExecutionError>

Reads the system timestamp.

source

fn read_chain_balance(&mut self) -> Result<Amount, ExecutionError>

Reads the balance of the chain.

source

fn read_owner_balance(&mut self, owner: Owner) -> Result<Amount, ExecutionError>

Reads the owner balance.

source

fn read_owner_balances( &mut self ) -> Result<Vec<(Owner, Amount)>, ExecutionError>

Reads the balances from all owners.

source

fn read_balance_owners(&mut self) -> Result<Vec<Owner>, ExecutionError>

Reads balance owners.

source

fn chain_ownership(&mut self) -> Result<ChainOwnership, ExecutionError>

Reads the current ownership configuration for this chain.

source

fn contains_key_new( &mut self, key: Vec<u8> ) -> Result<Self::ContainsKey, ExecutionError>

Tests whether a key exists in the key-value store (new)

source

fn contains_key_wait( &mut self, promise: &Self::ContainsKey ) -> Result<bool, ExecutionError>

Tests whether a key exists in the key-value store (wait)

source

fn read_multi_values_bytes_new( &mut self, keys: Vec<Vec<u8>> ) -> Result<Self::ReadMultiValuesBytes, ExecutionError>

Reads several keys from the key-value store (new)

source

fn read_multi_values_bytes_wait( &mut self, promise: &Self::ReadMultiValuesBytes ) -> Result<Vec<Option<Vec<u8>>>, ExecutionError>

Reads several keys from the key-value store (wait)

source

fn write_batch(&mut self, batch: Batch) -> Result<(), ExecutionError>

Writes a batch of changes.

Hack: This fails for services.

source

fn read_value_bytes_new( &mut self, key: Vec<u8> ) -> Result<Self::ReadValueBytes, ExecutionError>

Reads the key from the key-value store (new)

source

fn read_value_bytes_wait( &mut self, promise: &Self::ReadValueBytes ) -> Result<Option<Vec<u8>>, ExecutionError>

Reads the key from the key-value store (wait)

source

fn find_keys_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeysByPrefix, ExecutionError>

Reads the data from the keys having a specific prefix (new).

source

fn find_keys_by_prefix_wait( &mut self, promise: &Self::FindKeysByPrefix ) -> Result<Vec<Vec<u8>>, ExecutionError>

Reads the data from the keys having a specific prefix (wait).

source

fn find_key_values_by_prefix_new( &mut self, key_prefix: Vec<u8> ) -> Result<Self::FindKeyValuesByPrefix, ExecutionError>

Reads the data from the key/values having a specific prefix (new).

source

fn find_key_values_by_prefix_wait( &mut self, promise: &Self::FindKeyValuesByPrefix ) -> Result<Vec<(Vec<u8>, Vec<u8>)>, ExecutionError>

Reads the data from the key/values having a specific prefix (wait).

Implementors§