What is a Smart Contract ABI anyways? — A guide to understand client-blockchain communication

Ernesto Garcia N
9 min readAug 31, 2021
Simple Storage ABI

As you step into Smart Contract development for EVM-compatible chains such as Ethereum or Binance Smart Chain, one of the most difficult tasks to do is getting familiar with how things actually work, and while researching, one of the worst explained concepts and that carries a lot of questions are the Smart Contract’s ABIs.

This section is almost never explained because the fun thing is to create Smart Contracts in Solidity or to use Web3.js to connect an interface to it, but there’s a great reason for it to exist.

For Smart Contract and DApps development things are usually different from the well-known and hardly used client-server model, right? There are no API and database models. Also, you don’t have anywhere to call with a fetch call, isn’t it?

All you have to do is instantiate a Smart Contract using Web3 (or any equivalent) like this:

const Contract = require('web3-eth-contract');Contract.setProvider('http://localhost:8546');

const contract = new Contract(abi, address);

contract.methods.somFunc().send({from: ....})

Well, turns out things are not exactly the same, but, once you understood its principles, is more familiar than what you might think, and the Smart Contract’s ABI is a fundamental piece of the client-blockchain communication puzzle.

Let’s revisit some basics.

How does a UI communicate with a blockchain node?

As you may know, blockchain is composed of its nodes, the so-called clients, that are basically just infrastructure of computers connected P2P on the network and each one has ideally the copy of the entire blockchain.

These clients communicate with each other and send information about transactions and blocks, including function calls and contract execution, but they receive those function calls and executions from the outside.

Transactions come from the outside
Ernesto Garcia N

Ethereum Developer @OpenZeppelin | Intern twice @Google | Blockchain Development Teacher @blockdemy and @platzi