Trait sui_types::execution_mode::ExecutionMode
source · pub trait ExecutionMode {
type ArgumentUpdates;
type ExecutionResults;
// Required methods
fn allow_arbitrary_function_calls() -> bool;
fn allow_arbitrary_values() -> bool;
fn skip_conservation_checks() -> bool;
fn packages_are_predefined() -> bool;
fn empty_arguments() -> Self::ArgumentUpdates;
fn empty_results() -> Self::ExecutionResults;
fn add_argument_update(
resolver: &impl TypeTagResolver,
acc: &mut Self::ArgumentUpdates,
arg: Argument,
_new_value: &Value
) -> Result<(), ExecutionError>;
fn finish_command(
resolver: &impl TypeTagResolver,
acc: &mut Self::ExecutionResults,
argument_updates: Self::ArgumentUpdates,
command_result: &[Value]
) -> Result<(), ExecutionError>;
}
Required Associated Types§
sourcetype ArgumentUpdates
type ArgumentUpdates
All updates to a Arguments used in that Command
sourcetype ExecutionResults
type ExecutionResults
the gathered results from batched executions
Required Methods§
sourcefn allow_arbitrary_function_calls() -> bool
fn allow_arbitrary_function_calls() -> bool
Controls the calling of arbitrary Move functions
sourcefn allow_arbitrary_values() -> bool
fn allow_arbitrary_values() -> bool
Controls the ability to instantiate any Move function parameter with a Pure call arg. In other words, you can instantiate any struct or object or other value with its BCS byte
sourcefn skip_conservation_checks() -> bool
fn skip_conservation_checks() -> bool
Do not perform conservation checks after execution.
sourcefn packages_are_predefined() -> bool
fn packages_are_predefined() -> bool
If not set, the package ID should be calculated like an object and an UpgradeCap is produced
fn empty_arguments() -> Self::ArgumentUpdates
fn empty_results() -> Self::ExecutionResults
fn add_argument_update( resolver: &impl TypeTagResolver, acc: &mut Self::ArgumentUpdates, arg: Argument, _new_value: &Value ) -> Result<(), ExecutionError>
fn finish_command( resolver: &impl TypeTagResolver, acc: &mut Self::ExecutionResults, argument_updates: Self::ArgumentUpdates, command_result: &[Value] ) -> Result<(), ExecutionError>
Object Safety§
This trait is not object safe.
Implementors§
source§impl ExecutionMode for Genesis
impl ExecutionMode for Genesis
type ArgumentUpdates = ()
type ExecutionResults = ()
source§impl ExecutionMode for Normal
impl ExecutionMode for Normal
type ArgumentUpdates = ()
type ExecutionResults = ()
source§impl ExecutionMode for System
impl ExecutionMode for System
Execution mode for executing a system transaction, including the epoch change transaction and the consensus commit prologue. In this mode, we allow calls to any function bypassing visibility.