pub trait MoveTestAdapter<'a> {
    type ExtraPublishArgs;
    type ExtraRunArgs;
    type Subcommand;
    type ExtraInitArgs;

    // Required methods
    fn compiled_state(&mut self) -> &mut CompiledState<'a>;
    fn default_syntax(&self) -> SyntaxChoice;
    fn init(
        default_syntax: SyntaxChoice,
        option: Option<&'a FullyCompiledProgram>,
        init_data: Option<TaskInput<(InitCommand, Self::ExtraInitArgs)>>
    ) -> Self;
    fn publish_module(
        &mut self,
        module: CompiledModule,
        gas_budget: Option<u64>,
        extra: Self::ExtraPublishArgs
    ) -> Result<()>;
    fn execute_script(
        &mut self,
        script: CompiledScript,
        type_args: Vec<TypeTag>,
        signers: Vec<AccountAddress>,
        args: Vec<TransactionArgument>,
        gas_budget: Option<u64>,
        extra: Self::ExtraRunArgs
    ) -> Result<()>;
    fn call_function(
        &mut self,
        module: &ModuleId,
        function: &IdentStr,
        type_args: Vec<TypeTag>,
        signers: Vec<AccountAddress>,
        args: Vec<TransactionArgument>,
        gas_budget: Option<u64>,
        extra: Self::ExtraRunArgs
    ) -> Result<()>;
    fn view_data(
        &mut self,
        address: AccountAddress,
        module: &ModuleId,
        resource: &IdentStr,
        type_args: Vec<TypeTag>
    ) -> Result<String>;
    fn handle_subcommand(
        &mut self,
        subcommand: TaskInput<Self::Subcommand>
    ) -> Result<Option<String>>;

    // Provided method
    fn handle_command(
        &mut self,
        task: TaskInput<TaskCommand<Self::ExtraInitArgs, Self::ExtraPublishArgs, Self::ExtraRunArgs, Self::Subcommand>>
    ) -> Result<Option<String>> { ... }
}

Required Associated Types§

Required Methods§

source

fn compiled_state(&mut self) -> &mut CompiledState<'a>

source

fn default_syntax(&self) -> SyntaxChoice

source

fn init( default_syntax: SyntaxChoice, option: Option<&'a FullyCompiledProgram>, init_data: Option<TaskInput<(InitCommand, Self::ExtraInitArgs)>> ) -> Self

source

fn publish_module( &mut self, module: CompiledModule, gas_budget: Option<u64>, extra: Self::ExtraPublishArgs ) -> Result<()>

source

fn execute_script( &mut self, script: CompiledScript, type_args: Vec<TypeTag>, signers: Vec<AccountAddress>, args: Vec<TransactionArgument>, gas_budget: Option<u64>, extra: Self::ExtraRunArgs ) -> Result<()>

source

fn call_function( &mut self, module: &ModuleId, function: &IdentStr, type_args: Vec<TypeTag>, signers: Vec<AccountAddress>, args: Vec<TransactionArgument>, gas_budget: Option<u64>, extra: Self::ExtraRunArgs ) -> Result<()>

source

fn view_data( &mut self, address: AccountAddress, module: &ModuleId, resource: &IdentStr, type_args: Vec<TypeTag> ) -> Result<String>

source

fn handle_subcommand( &mut self, subcommand: TaskInput<Self::Subcommand> ) -> Result<Option<String>>

Provided Methods§

Implementors§