Skip to content

Blockchain Explained

Your guide to transactions, smart contracts and more

What is a blockchain transaction?

A transaction captures details of an activity that has taken place on a blockchain. In the Ethereum blockchain and Ethereum-compatible blockchains there are three types of transaction that can take place:

  1. The transfer of cryptocurrency from one account to another
  2. Deployment of a smart contract
  3. Transacting with a smart contract

The specifics of blockchain accounts and smart contracts will be discussed in subsequent articles, but it’s important to understand that there are only three types of transactions that can take place.

Transaction View 24
The transactions view in the Chainlens Block Explorer

The most common types of transactions are those associated with tokens on a blockchain network. These are managed by smart contracts which have been deployed to that network. Transferring a token takes place as a transaction within a smart contract on Ethereum, hence having some awareness of the information contained within transactions is important for deciphering this.

Transactions have the following key attributes:

  • Index
  • Transaction hash
  • Sender address
  • Recipient address
  • Amount
  • Fee
  • Data
  • Events

There are other fields associated with transactions, for instance, the creation of a transaction involves submitting a cryptographically signed transaction to the network and then processing a response message if successful, however, such protocol details are technical content we will not be covering here.

Transactions do not have a timestamp associated with them, as they are only considered to have taken place once the block they are contained within is produced. Transactions are however ordered in blocks by their index.

Transactions, like blocks, have a hash associated with them. As with block hashes, transaction hashes uniquely identify the contents of the transaction.

Transaction Details 24
Details of a transaction in the Chainlens Block Explorer

The sender address is the wallet that initiated the transaction.

The recipient address is the destination address for the transaction. This can be a wallet to receive cryptocurrency funds into, the address of a smart contract to transact with or empty if we are deploying a new smart contract.

The amount is the amount in the cryptocurrency of the network (for instance Ether) to be sent in the transaction.

The fee is the amount the sender is willing to pay for the transaction to take place in the native cryptocurrency of the network. This is defined by two attributes — the gas price and the gas limit which are the amount per unit of computation you are willing to pay and the total amount of gas you are willing to spend (read What are gas fees? for more information).

The data field contains binary information relevant to the transaction. When sending cryptocurrency it could be a message for the receiver, if deploying a smart contract it is the code of the contract, and when transacting with a smart contract it is details of the function invoked on the contract.

The events field provides information about any data output by the smart contract in the transaction.

The data and events fields are crucial sources of information, as it is from this that information such as token ownership is defined.

Summary

A transaction represents an action taking place on a blockchain network. There are three types of transactions on Ethereum networks — the transfer of cryptocurrency from one account to another, the deployment of a smart contract and interacting with a smart contract.

There are a number of fields that are contained within a transaction. Two of the key fields for interpreting activities that have taken place on the blockchain are the data and events fields.

Become a web3 native by reading all of our Blockchain Explained articles.

Are you ready to adopt blockchain technology?

Our products and services make blockchain technology accessible for everyone

Chainlens Blockchain Explorer

SaaS and on-prem blockchain data and analytics platform for Ethereum compatible, layer 2 and Polkadot networks.

understand your on-chain assets

Enterprise blockchain support

Production support for public and private blockchain networks built using Quorum and Hyperledger Besu clients.

SLA-backed production support

Web3 Labs Newsletter

With the Web3 industry moving at such a fast pace, it can be time consuming to keep track of all the latest news and events.

Subscribe to our newsletter and you'll receive regular insights and updates relating to enterprise blockchain in one place.