Struct near_vm_logic::VMOutcome
source · pub struct VMOutcome {
pub balance: Balance,
pub storage_usage: StorageUsage,
pub return_data: ReturnData,
pub burnt_gas: Gas,
pub used_gas: Gas,
pub logs: Vec<String>,
pub profile: ProfileDataV3,
pub action_receipts: Vec<(AccountId, ReceiptMetadata)>,
pub aborted: Option<FunctionCallError>,
}
Fields§
§balance: Balance
§storage_usage: StorageUsage
§return_data: ReturnData
§burnt_gas: Gas
§used_gas: Gas
§logs: Vec<String>
§profile: ProfileDataV3
Data collected from making a contract call
action_receipts: Vec<(AccountId, ReceiptMetadata)>
§aborted: Option<FunctionCallError>
Implementations§
source§impl VMOutcome
impl VMOutcome
sourcepub fn abort(logic: VMLogic<'_>, error: FunctionCallError) -> VMOutcome
pub fn abort(logic: VMLogic<'_>, error: FunctionCallError) -> VMOutcome
Consumes the VMLogic
object and computes the final outcome with the
given error that stopped execution from finishing successfully.
sourcepub fn ok(logic: VMLogic<'_>) -> VMOutcome
pub fn ok(logic: VMLogic<'_>) -> VMOutcome
Consumes the VMLogic
object and computes the final outcome for a
successful execution.
sourcepub fn nop_outcome(error: FunctionCallError) -> VMOutcome
pub fn nop_outcome(error: FunctionCallError) -> VMOutcome
Creates an outcome with a no-op outcome.
sourcepub fn abort_but_nop_outcome_in_old_protocol(
logic: VMLogic<'_>,
error: FunctionCallError,
current_protocol_version: u32
) -> VMOutcome
pub fn abort_but_nop_outcome_in_old_protocol( logic: VMLogic<'_>, error: FunctionCallError, current_protocol_version: u32 ) -> VMOutcome
Like Self::abort()
but without feature FixContractLoadingCost
it
will return a NOP outcome. This is used for backwards-compatibility only.
Trait Implementations§
source§impl PartialEq<VMOutcome> for VMOutcome
impl PartialEq<VMOutcome> for VMOutcome
impl StructuralPartialEq for VMOutcome
Auto Trait Implementations§
impl RefUnwindSafe for VMOutcome
impl Send for VMOutcome
impl Sync for VMOutcome
impl Unpin for VMOutcome
impl UnwindSafe for VMOutcome
Blanket Implementations§
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request