Skip to main content

Transactions


A Transaction is a transfer of value on the blockchain. In very simple terms, a transaction is when one person gives a designated amount of cryptocurrency they own to another person.

To perform transactions on the blockchain, you need a wallet, a program linked with the blockchain to which only you have access, that keeps track of the crypto you own and allows you to transact with it. Each wallet is protected by a special cryptographic method that uses a unique pair of distinct but connected keys: a private and a public key.

A public key, also known as the address, is a series of letters and numbers that a user must share in order to receive funds. In contrast, a private key must be kept secret, much like your bank card pin number, as it authorizes the spending of any funds received by the associated public key.

A consensus mechanism and a reward system are the crucial features of the blockchain transactions.

  • Once a transaction has been agreed between users, it must be confirmed or approved before it can be added to any block on the chain.
  • In public blockchains, the decision to add a transaction to the chain is made by consensus. This means that a majority of the "nodes" (or computers on the network) must agree that the transaction is valid. Rewards incentivize people who own computers on the network to validate transactions. This process is called "Proof of Work".
  • In Proof of Work, people who own computers on the network must solve complex math problems to add blocks to the chain. Solving problems is called mining, and "miners" are usually rewarded for their work in cryptocurrencies.
  • The blockchain network then introduced a “proof of stake” verification consensus protocol. The protocol requires participants to own a stake in the blockchain, typically by owning a portion of the cryptocurrency, in order to gain the ability to select, validate, and verify transactions. This saves a lot of computing power resources as mining is no longer required.

The Transactions representation fields in our database are mentioned below:
Field NameDescriptionModeType
hashA unique hash for a particular Transaction present in the BlockchainRequiredString
from_addressAddress of the Sender for the Transaction EventRequiredString
transaction_indexIndex position of the transaction in the blockRequiredInteger
nonceGas provided by the sender.RequiredInteger
to_addressAddress of the receiver. null when its a contract creation transactionNullableString
chain_idChain on which the transaction is present, eg: Ethereum,Palm,Polygon etcNullableInteger
valueValue transferred in WeiNullableInteger
receipt_cumulative_gas_usedThe total amount of gas used when this transaction was executed in the blockNullableInteger
receipt_gas_usedThe amount of gas used by this specific transaction aloneNullableInteger
receipt_contract_addressThe contract address created, if the transaction was a contract creation, otherwise nullNullableString
receipt_root32 bytes of post-transaction stateroot (pre Byzantium)NullableString
receipt_statusEither 1 (success) or 0 (failure) (post Byzantium).NullableInteger
block_timestampTimestamp of the block residing the transactionRequiredtimestamp
block_hashHash of the block residing the TransactionRequiredString
block_numberBlock number residing the TransactionRequiredInteger
gasGas provided by the sender.NullableInteger
gas_priceGas price provided by the sender in Wei.NullableInteger
max_fee_per_gasTotal fee that covers both base and priority feesNullableInteger
max_priority_fee_per_gasFee given to miners to incentivize them to mine the transactionNullableInteger
transaction_typeType of the TransactionRequiredInteger
transaction_sub_typeEvents in the Transactions refered to as Sub transactionsNullableInteger
receipt_effective_gas_priceGas provided by the sender.NullableInteger
inputThe data sent along with the transaction.NullableString