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§

source

fn peek_registry( id: &T::Hash ) -> Result<RegistryContract<T::Hash, T::AccountId, Balance, BlockNumberFor<T>>, DispatchError>

source

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

source

fn instantiate_check(kind: &ContractType) -> Result<(), DispatchError>

source

fn storage_check(kind: &ContractType) -> Result<(), DispatchError>

source

fn volatile_check(kind: &ContractType) -> Result<(), DispatchError>

source

fn remunerable_check(kind: &ContractType) -> Result<(), DispatchError>

source

fn try_persist_author( contract: &T::AccountId, author: Option<&AuthorInfo<T::AccountId, Balance>> ) -> Result<(), DispatchError>

source

fn try_remove_author(contract: &T::AccountId) -> Result<(), DispatchError>

Implementors§

source§

impl<T: ConfigSystem, Balance: Encode + Decode> ThreeVm<T, Balance> for NoopThreeVm