How To Use Read/Write Contract Features on Etherscan

Users can interact with any verified smart contract using the Read or Write Contract feature on Etherscan. These options are available on the contract and token page. These pages are where all data and information related to an Ethereum contract are displayed as shown below.

We are using a token contract address as an example on how to use the feature. The tutorial will be split into two sections, namely, Read Contract Feature and Write Contract Feature.

Read Contract Feature

Read Contract feature makes the contract code to be human-readable and allows users to interact with the code. In Read Contract, you can only query the information that has been fed or coded into the contract. If we take this contract, for example, you can see the list of functions encoded in the smart contract like name, totalSupply, balances, and owner, to name a few.

Displaying the list of the contract information on Read Contract

By clicking onto the function, you will be able to interact with the code. Depending on the function, some of them will only display information about the contract as shown below.

Displaying the Name function of the token contract
Displaying the Owner function of the token contract

While some of the functions allow you to add input to the contract so that it can call the information related to the input data. In the example below, we queried how much USDT that Etherscan: Donate address has.

Displaying Balances function of the token contract

Write Contract Feature

Write Contract Feature allows you to interact with the contract directly on Etherscan. This feature is always available even if the platform's website is down or inaccessible. Unlike Read Contract feature, this feature requires you to connect your wallet to be able to interact with the contract.

To connect your wallet, click the "Connect to Web3" button and choose your preferred wallet.

Once connected, you can start interacting with the contract. To show an example, we are interacting with the [approve] function that allows the other address to spend on your behalf depending on the amount set. We are approving Etherscan: Donate address to spend a maximum of 10 USDT on your behalf as shown below.

There are many more features that you can explore on Etherscan. Learn more about them through our Knowledge Base here.

Faiz Adnan
Faiz Adnan
Last updated: