Trait t3rn_primitives::threevm::ThreeVm
source · pub trait ThreeVm<T, Balance>: Precompile<T, Balance> + Signaller<T::Hash, Result = Result<SignalOpcode, DispatchError>> + Remuneration<T, Balance>where
T: ConfigSystem,
Balance: Encode + Decode,{
// Required methods
fn peek_registry(
id: &T::Hash
) -> Result<RegistryContract<T::Hash, T::AccountId, Balance, BlockNumberFor<T>>, DispatchError>;
fn from_registry<Module, ModuleGen>(
id: &T::Hash,
module_generator: ModuleGen
) -> Result<Module, DispatchError>
where Module: ModuleOperations<T, Balance>,
ModuleGen: Fn(Vec<u8>) -> Module;
fn instantiate_check(kind: &ContractType) -> Result<(), DispatchError>;
fn storage_check(kind: &ContractType) -> Result<(), DispatchError>;
fn volatile_check(kind: &ContractType) -> Result<(), DispatchError>;
fn remunerable_check(kind: &ContractType) -> Result<(), DispatchError>;
fn try_persist_author(
contract: &T::AccountId,
author: Option<&AuthorInfo<T::AccountId, Balance>>
) -> Result<(), DispatchError>;
fn try_remove_author(contract: &T::AccountId) -> Result<(), DispatchError>;
}
Required Methods§
fn peek_registry( id: &T::Hash ) -> Result<RegistryContract<T::Hash, T::AccountId, Balance, BlockNumberFor<T>>, DispatchError>
sourcefn from_registry<Module, ModuleGen>(
id: &T::Hash,
module_generator: ModuleGen
) -> Result<Module, DispatchError>where
Module: ModuleOperations<T, Balance>,
ModuleGen: Fn(Vec<u8>) -> Module,
fn from_registry<Module, ModuleGen>( id: &T::Hash, module_generator: ModuleGen ) -> Result<Module, DispatchError>where Module: ModuleOperations<T, Balance>, ModuleGen: Fn(Vec<u8>) -> Module,
Allows creating a Module
from a binary blob from the contracts registry