Create Transaction

When an account wants to send some balance to another account, this account has to make a transaction. There are 2 types of transactions:

  • Normal transaction: users make transactions and send them directly on chain. Users have to pay fee for the transactions they make.

  • Smart contract transaction: users make transactions and send them through system contract. Users have to pay fee by system contract logics.

Required elements to create a transaction includes:

  • The destination address

  • Amount

  • Transaction fee (View in Transaction Fee)

  • Signature of the sender

  • The nonce

Error code

Case

Description

InsufficientBalance

value is greater than source account's balance

Transfer with value which is greater than source account's balance

InvalidTransaction

Payment

Inability to pay some fees (e.g. account balance too low)

InvalidTransaction

Future

Transaction will be valid in the future, the tx nonce is greater than the expected nonce

InvalidTransaction

Stale

Transaction is outdated, the tx nonce is smaller than the expected nonce

InvalidTransaction

BadProof

When using a signed extension that provides additional data for signing, it is required that the signing and the verifying side use the same additional data. Additional data will only be used to generate the signature, but will not be part of the transaction itself. As the verifying side does not know which additional data was used while signing it will only be able to assume a bad signature and cannot express a more meaningful error.

UnknownTransaction

NoUnsignedValidator

Could not find an unsigned validator for the unsigned transaction

InvalidTransaction

ExhaustsResources

The transaction would exhaust the resources of current block. The transaction might be valid, but there are not enough resources left in the current block or the current extrinsic exceeds the maximum weight a single extrinsic can have (2*10^12).

TemporarilyBanned

The transaction is temporarily banned. The outdated tx has been spam too much.

TooLowPriority

Transaction has too low priority to replace existing one in the pool.

Last updated