Enum near_primitives::errors::ActionErrorKind[][src]

pub enum ActionErrorKind {
Show 16 variants AccountAlreadyExists { account_id: AccountId, }, AccountDoesNotExist { account_id: AccountId, }, CreateAccountOnlyByRegistrar { account_id: AccountId, registrar_account_id: AccountId, predecessor_id: AccountId, }, CreateAccountNotAllowed { account_id: AccountId, predecessor_id: AccountId, }, ActorNoPermission { account_id: AccountId, actor_id: AccountId, }, DeleteKeyDoesNotExist { account_id: AccountId, public_key: PublicKey, }, AddKeyAlreadyExists { account_id: AccountId, public_key: PublicKey, }, DeleteAccountStaking { account_id: AccountId, }, LackBalanceForState { account_id: AccountId, amount: Balance, }, TriesToUnstake { account_id: AccountId, }, TriesToStake { account_id: AccountId, stake: Balance, locked: Balance, balance: Balance, }, InsufficientStake { account_id: AccountId, stake: Balance, minimum_stake: Balance, }, FunctionCallError(FunctionCallErrorSer), NewReceiptValidationError(ReceiptValidationError), OnlyImplicitAccountCreationAllowed { account_id: AccountId, }, DeleteAccountWithLargeState { account_id: AccountId, },
}

Variants

AccountAlreadyExists

Fields

account_id: AccountId

Happens when CreateAccount action tries to create an account with account_id which is already exists in the storage

AccountDoesNotExist

Fields

account_id: AccountId

Happens when TX receiver_id doesn’t exist (but action is not Action::CreateAccount)

CreateAccountOnlyByRegistrar

Fields

account_id: AccountId
registrar_account_id: AccountId
predecessor_id: AccountId

A top-level account ID can only be created by registrar.

CreateAccountNotAllowed

Fields

account_id: AccountId
predecessor_id: AccountId

A newly created account must be under a namespace of the creator account

ActorNoPermission

Fields

account_id: AccountId
actor_id: AccountId

Administrative actions like DeployContract, Stake, AddKey, DeleteKey. can be proceed only if sender=receiver or the first TX action is a CreateAccount action

DeleteKeyDoesNotExist

Fields

account_id: AccountId
public_key: PublicKey

Account tries to remove an access key that doesn’t exist

AddKeyAlreadyExists

Fields

account_id: AccountId
public_key: PublicKey

The public key is already used for an existing access key

DeleteAccountStaking

Fields

account_id: AccountId

Account is staking and can not be deleted

LackBalanceForState

Fields

account_id: AccountId

An account which needs balance

amount: Balance

Balance required to complete an action.

ActionReceipt can’t be completed, because the remaining balance will not be enough to cover storage.

TriesToUnstake

Fields

account_id: AccountId

Account is not yet staked, but tries to unstake

TriesToStake

Fields

account_id: AccountId
stake: Balance
locked: Balance
balance: Balance

The account doesn’t have enough balance to increase the stake.

InsufficientStake

Fields

account_id: AccountId
stake: Balance
minimum_stake: Balance

FunctionCallError(FunctionCallErrorSer)

Tuple Fields

An error occurred during a FunctionCall Action, parameter is debug message.

NewReceiptValidationError(ReceiptValidationError)

Tuple Fields

Error occurs when a new ActionReceipt created by the FunctionCall action fails receipt validation.

OnlyImplicitAccountCreationAllowed

Fields

account_id: AccountId

Error occurs when a CreateAccount action is called on hex-characters account of length 64. See implicit account creation NEP: https://github.com/nearprotocol/NEPs/pull/71.

DeleteAccountWithLargeState

Fields

account_id: AccountId

Delete account whose state is large is temporarily banned.

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.