Enum InvalidTxError

Source
pub enum InvalidTxError {
Show 18 variants InvalidAccessKeyError(InvalidAccessKeyError), InvalidSignerId { signer_id: String, }, SignerDoesNotExist { signer_id: AccountId, }, InvalidNonce { ak_nonce: u64, tx_nonce: u64, }, NonceTooLarge { tx_nonce: u64, upper_bound: u64, }, InvalidReceiverId { receiver_id: String, }, InvalidSignature, NotEnoughBalance { balance: String, cost: String, signer_id: AccountId, }, LackBalanceForState { amount: String, signer_id: AccountId, }, CostOverflow, InvalidChain, Expired, ActionsValidation(ActionsValidationError), TransactionSizeExceeded { limit: u64, size: u64, }, InvalidTransactionVersion, StorageError(StorageError), ShardCongested { congestion_level: f64, shard_id: u32, }, ShardStuck { missed_chunks: u64, shard_id: u32, },
}
Expand description

An error happened during TX execution

JSON schema
{
 "description": "An error happened during TX execution",
 "oneOf": [
   {
     "description": "Happens if a wrong AccessKey used or AccessKey has not enough permissions",
     "type": "object",
     "required": [
       "InvalidAccessKeyError"
     ],
     "properties": {
       "InvalidAccessKeyError": {
         "$ref": "#/components/schemas/InvalidAccessKeyError"
       }
     },
     "additionalProperties": false
   },
   {
     "description": "TX signer_id is not a valid [`AccountId`]",
     "type": "object",
     "required": [
       "InvalidSignerId"
     ],
     "properties": {
       "InvalidSignerId": {
         "type": "object",
         "required": [
           "signer_id"
         ],
         "properties": {
           "signer_id": {
             "type": "string"
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "TX signer_id is not found in a storage",
     "type": "object",
     "required": [
       "SignerDoesNotExist"
     ],
     "properties": {
       "SignerDoesNotExist": {
         "type": "object",
         "required": [
           "signer_id"
         ],
         "properties": {
           "signer_id": {
             "$ref": "#/components/schemas/AccountId"
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "Transaction nonce must be strictly greater than `account[access_key].nonce`.",
     "type": "object",
     "required": [
       "InvalidNonce"
     ],
     "properties": {
       "InvalidNonce": {
         "type": "object",
         "required": [
           "ak_nonce",
           "tx_nonce"
         ],
         "properties": {
           "ak_nonce": {
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           },
           "tx_nonce": {
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "Transaction nonce is larger than the upper bound given by the block height",
     "type": "object",
     "required": [
       "NonceTooLarge"
     ],
     "properties": {
       "NonceTooLarge": {
         "type": "object",
         "required": [
           "tx_nonce",
           "upper_bound"
         ],
         "properties": {
           "tx_nonce": {
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           },
           "upper_bound": {
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "TX receiver_id is not a valid AccountId",
     "type": "object",
     "required": [
       "InvalidReceiverId"
     ],
     "properties": {
       "InvalidReceiverId": {
         "type": "object",
         "required": [
           "receiver_id"
         ],
         "properties": {
           "receiver_id": {
             "type": "string"
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "TX signature is not valid",
     "type": "string",
     "enum": [
       "InvalidSignature"
     ]
   },
   {
     "description": "Account does not have enough balance to cover TX cost",
     "type": "object",
     "required": [
       "NotEnoughBalance"
     ],
     "properties": {
       "NotEnoughBalance": {
         "type": "object",
         "required": [
           "balance",
           "cost",
           "signer_id"
         ],
         "properties": {
           "balance": {
             "type": "string"
           },
           "cost": {
             "type": "string"
           },
           "signer_id": {
             "$ref": "#/components/schemas/AccountId"
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "Signer account doesn't have enough balance after transaction.",
     "type": "object",
     "required": [
       "LackBalanceForState"
     ],
     "properties": {
       "LackBalanceForState": {
         "type": "object",
         "required": [
           "amount",
           "signer_id"
         ],
         "properties": {
           "amount": {
             "description": "Required balance to cover the state.",
             "type": "string"
           },
           "signer_id": {
             "description": "An account which doesn't have enough balance to cover storage.",
             "allOf": [
               {
                 "$ref": "#/components/schemas/AccountId"
               }
             ]
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "An integer overflow occurred during transaction cost estimation.",
     "type": "string",
     "enum": [
       "CostOverflow"
     ]
   },
   {
     "description": "Transaction parent block hash doesn't belong to the current chain",
     "type": "string",
     "enum": [
       "InvalidChain"
     ]
   },
   {
     "description": "Transaction has expired",
     "type": "string",
     "enum": [
       "Expired"
     ]
   },
   {
     "description": "An error occurred while validating actions of a Transaction.",
     "type": "object",
     "required": [
       "ActionsValidation"
     ],
     "properties": {
       "ActionsValidation": {
         "$ref": "#/components/schemas/ActionsValidationError"
       }
     },
     "additionalProperties": false
   },
   {
     "description": "The size of serialized transaction exceeded the limit.",
     "type": "object",
     "required": [
       "TransactionSizeExceeded"
     ],
     "properties": {
       "TransactionSizeExceeded": {
         "type": "object",
         "required": [
           "limit",
           "size"
         ],
         "properties": {
           "limit": {
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           },
           "size": {
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "Transaction version is invalid.",
     "type": "string",
     "enum": [
       "InvalidTransactionVersion"
     ]
   },
   {
     "type": "object",
     "required": [
       "StorageError"
     ],
     "properties": {
       "StorageError": {
         "$ref": "#/components/schemas/StorageError"
       }
     },
     "additionalProperties": false
   },
   {
     "description": "The receiver shard of the transaction is too congested to accept new\ntransactions at the moment.",
     "type": "object",
     "required": [
       "ShardCongested"
     ],
     "properties": {
       "ShardCongested": {
         "type": "object",
         "required": [
           "congestion_level",
           "shard_id"
         ],
         "properties": {
           "congestion_level": {
             "description": "A value between 0 (no congestion) and 1 (max congestion).",
             "type": "number",
             "format": "double"
           },
           "shard_id": {
             "description": "The congested shard.",
             "type": "integer",
             "format": "uint32",
             "minimum": 0.0
           }
         }
       }
     },
     "additionalProperties": false
   },
   {
     "description": "The receiver shard of the transaction missed several chunks and rejects\nnew transaction until it can make progress again.",
     "type": "object",
     "required": [
       "ShardStuck"
     ],
     "properties": {
       "ShardStuck": {
         "type": "object",
         "required": [
           "missed_chunks",
           "shard_id"
         ],
         "properties": {
           "missed_chunks": {
             "description": "The number of blocks since the last included chunk of the shard.",
             "type": "integer",
             "format": "uint64",
             "minimum": 0.0
           },
           "shard_id": {
             "description": "The shard that fails making progress.",
             "type": "integer",
             "format": "uint32",
             "minimum": 0.0
           }
         }
       }
     },
     "additionalProperties": false
   }
 ]
}

Variants§

§

InvalidAccessKeyError(InvalidAccessKeyError)

Happens if a wrong AccessKey used or AccessKey has not enough permissions

§

InvalidSignerId

TX signer_id is not a valid AccountId

Fields

§signer_id: String
§

SignerDoesNotExist

TX signer_id is not found in a storage

Fields

§signer_id: AccountId
§

InvalidNonce

Transaction nonce must be strictly greater than account[access_key].nonce.

Fields

§ak_nonce: u64
§tx_nonce: u64
§

NonceTooLarge

Transaction nonce is larger than the upper bound given by the block height

Fields

§tx_nonce: u64
§upper_bound: u64
§

InvalidReceiverId

TX receiver_id is not a valid AccountId

Fields

§receiver_id: String
§

InvalidSignature

TX signature is not valid

§

NotEnoughBalance

Account does not have enough balance to cover TX cost

Fields

§balance: String
§cost: String
§signer_id: AccountId
§

LackBalanceForState

Signer account doesn’t have enough balance after transaction.

Fields

§amount: String

Required balance to cover the state.

§signer_id: AccountId

An account which doesn’t have enough balance to cover storage.

§

CostOverflow

An integer overflow occurred during transaction cost estimation.

§

InvalidChain

Transaction parent block hash doesn’t belong to the current chain

§

Expired

Transaction has expired

§

ActionsValidation(ActionsValidationError)

An error occurred while validating actions of a Transaction.

§

TransactionSizeExceeded

The size of serialized transaction exceeded the limit.

Fields

§limit: u64
§size: u64
§

InvalidTransactionVersion

Transaction version is invalid.

§

StorageError(StorageError)

§

ShardCongested

The receiver shard of the transaction is too congested to accept new transactions at the moment.

Fields

§congestion_level: f64
§shard_id: u32

The congested shard.

§

ShardStuck

The receiver shard of the transaction missed several chunks and rejects new transaction until it can make progress again.

Fields

§missed_chunks: u64

The number of blocks since the last included chunk of the shard.

§shard_id: u32

The shard that fails making progress.

Trait Implementations§

Source§

impl Clone for InvalidTxError

Source§

fn clone(&self) -> InvalidTxError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InvalidTxError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for InvalidTxError

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&InvalidTxError> for InvalidTxError

Source§

fn from(value: &InvalidTxError) -> Self

Converts to this type from the input type.
Source§

impl From<ActionsValidationError> for InvalidTxError

Source§

fn from(value: ActionsValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidAccessKeyError> for InvalidTxError

Source§

fn from(value: InvalidAccessKeyError) -> Self

Converts to this type from the input type.
Source§

impl From<InvalidTxError> for TxExecutionError

Source§

fn from(value: InvalidTxError) -> Self

Converts to this type from the input type.
Source§

impl From<StorageError> for InvalidTxError

Source§

fn from(value: StorageError) -> Self

Converts to this type from the input type.
Source§

impl Serialize for InvalidTxError

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,