core

class ActionsValidationErrorFieldless
DeleteActionMustBeFinal = ActionsValidationErrorFieldless.DeleteActionMustBeFinal
FunctionCallZeroAttachedGas = ActionsValidationErrorFieldless.FunctionCallZeroAttachedGas
IntegerOverflow = ActionsValidationErrorFieldless.IntegerOverflow
class TotalPrepaidGasExceeded

The total prepaid gas (for all given actions) exceeded the limit.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

limit
to_json()

Convert to a JSON string.

total_prepaid_gas
class TotalNumberOfActionsExceeded

The number of actions exceeded the given limit.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

limit
to_json()

Convert to a JSON string.

total_number_of_actions
class AddKeyMethodNamesNumberOfBytesExceeded

The total number of bytes of the method names exceeded the limit in a Add Key action.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

limit
to_json()

Convert to a JSON string.

total_number_of_bytes
class AddKeyMethodNameLengthExceeded

The length of some method name exceeded the limit in a Add Key action.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

length
limit
to_json()

Convert to a JSON string.

class InvalidAccountId

Invalid account ID.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class ContractSizeExceeded

The size of the contract code exceeded the limit in a DeployContract action.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

limit
size
to_json()

Convert to a JSON string.

class FunctionCallMethodNameLengthExceeded

The length of the method name exceeded the limit in a Function Call action.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

length
limit
to_json()

Convert to a JSON string.

class FunctionCallArgumentsLengthExceeded

The length of the arguments exceeded the limit in a Function Call action.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

length
limit
to_json()

Convert to a JSON string.

class UnsuitableStakingKey

An attempt to stake with a public key that is not convertible to ristretto.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

public_key
to_json()

Convert to a JSON string.

class InvalidPredecessorId

The predecessor_id of a Receipt is not valid.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class ReceiptInvalidReceiverId

The receiver_id of a Receipt is not valid.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class ReceiptInvalidSignerId

The signer_id of an ActionReceipt is not valid.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class InvalidDataReceiverId

The length of the returned data exceeded the limit in a DataReceipt.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class ReturnedValueLengthExceeded

The length of the returned data exceeded the limit in a DataReceipt.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

length
limit
to_json()

Convert to a JSON string.

class NumberInputDataDependenciesExceeded

The number of input data dependencies exceeds the limit in an ActionReceipt.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

limit
number_of_input_data_dependencies
to_json()

Convert to a JSON string.

class InvalidAccessKeyErrorFieldless

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

DepositWithFunctionCall = InvalidAccessKeyErrorFieldless.DepositWithFunctionCall
RequiresFullAccess = InvalidAccessKeyErrorFieldless.RequiresFullAccess
class AccessKeyNotFound

The access key identified by the public_key doesn’t exist for the account

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

public_key
to_json()

Convert to a JSON string.

class ReceiverMismatch

Transaction receiver_id doesn’t match the access key receiver_id

ak_receiver
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

tx_receiver
class MethodNameMismatch

Transaction method name isn’t allowed by the access key

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

method_name
to_json()

Convert to a JSON string.

class NotEnoughAllowance

Access Key does not have enough allowance to cover transaction cost

account_id
allowance
cost
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

public_key
to_json()

Convert to a JSON string.

class InvalidTxErrorFieldless
CostOverflow = InvalidTxErrorFieldless.CostOverflow
Expired = InvalidTxErrorFieldless.Expired
InvalidChain = InvalidTxErrorFieldless.InvalidChain
InvalidSignature = InvalidTxErrorFieldless.InvalidSignature
class InvalidSignerId

TX signer_id is not a valid AccountId

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

signer_id
to_json()

Convert to a JSON string.

class SignerDoesNotExist

TX signer_id is not found in a storage

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

signer_id
to_json()

Convert to a JSON string.

class InvalidNonce

Transaction nonce must be account[access_key].nonce + 1.

ak_nonce
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

tx_nonce
class NonceTooLarge

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

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

tx_nonce
upper_bound
class InvalidReceiverId

TX receiver_id is not a valid AccountId

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

receiver_id
to_json()

Convert to a JSON string.

class NotEnoughBalance

Account does not have enough balance to cover TX cost

balance
cost
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

signer_id
to_json()

Convert to a JSON string.

class LackBalanceForState

Signer account doesn’t have enough balance after transaction.

account_id

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

amount

Required balance to cover the state.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class TransactionSizeExceeded

The size of serialized transaction exceeded the limit.

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

limit
size
to_json()

Convert to a JSON string.

class AccountAlreadyExists

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

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class AccountDoesNotExist

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

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class CreateAccountOnlyByRegistrar

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

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

predecessor_id
registrar_account_id
to_json()

Convert to a JSON string.

class CreateAccountNotAllowed

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

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

predecessor_id
to_json()

Convert to a JSON string.

class ActorNoPermission

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

account_id
actor_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class DeleteKeyDoesNotExist

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

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

public_key
to_json()

Convert to a JSON string.

class AddKeyAlreadyExists

The public key is already used for an existing access key

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

public_key
to_json()

Convert to a JSON string.

class DeleteAccountStaking

Account is staking and can not be deleted

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class TriesToUnstake

Account is not yet staked, but tries to unstake

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class TriesToStake

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

account_id
balance
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

locked
stake
to_json()

Convert to a JSON string.

class InsufficientStake
account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

minimum_stake
stake
to_json()

Convert to a JSON string.

class OnlyImplicitAccountCreationAllowed

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>.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class DeleteAccountWithLargeState

Delete account whose state is large is temporarily banned.

account_id
static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

to_json()

Convert to a JSON string.

class ActionError

An error happened during Acton execution

static from_bytes(data)

Deserialize from bytes.

Parameters:

data (bytes) – the serialized object.

Returns: the deserialized object.

static from_json(raw)

Build from a JSON string.

index

Index of the failed action in the transaction. Action index is not defined if ActionError.kind is ActionErrorKind::LackBalanceForState

kind

The kind of ActionError happened

to_json()

Convert to a JSON string.