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
SignerDoesNotExist
TX signer_id is not found in a storage
InvalidNonce
Transaction nonce must be strictly greater than account[access_key].nonce
.
NonceTooLarge
Transaction nonce is larger than the upper bound given by the block height
InvalidReceiverId
TX receiver_id is not a valid AccountId
InvalidSignature
TX signature is not valid
NotEnoughBalance
Account does not have enough balance to cover TX cost
LackBalanceForState
Signer account doesn’t have enough balance after transaction.
Fields
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.
InvalidTransactionVersion
Transaction version is invalid.
StorageError(StorageError)
ShardCongested
The receiver shard of the transaction is too congested to accept new transactions at the moment.
ShardStuck
The receiver shard of the transaction missed several chunks and rejects new transaction until it can make progress again.
Trait Implementations§
Source§impl Clone for InvalidTxError
impl Clone for InvalidTxError
Source§fn clone(&self) -> InvalidTxError
fn clone(&self) -> InvalidTxError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more