Etherscan Blog
Published in

Etherscan Blog

Interacting with Smart Contracts on Etherscan

On Etherscan, users can interact with any smart contract address with the contract code verified on Etherscan.

There are quite a number of information that the public can extract out of a verified smart contract on Etherscan. One of the important information that users can get is the balances of any wallet address for a token contract. Information that is public such as “allowance,” “start time,” “end time” or information that is generally not displayed on the front page of the smart contract address page can be found under the “ReadContract” tab.

The information that is available in the “ReadContract” tab may vary from contract to contract depending on the nature and the structure of the solidity contract.

An example on how to determine the balances you would have for a token. Visit contract address page > ReadContract > “balanceOf,” one can simply check their balances by querying the “balanceOf” function right on Etherscan.

balanceOf function of a contract address

Aside from reading the information in the contract, users can also interact with the smart contract under “Write Contract.”

Under the “Write Contract” tab, users can perform function written in the solidity smart contract. An example of a function written in the smart contact is the “transfer” function.

Users would need to connect with their Metamask to interact with the smart contract on Etherscan.

Write Contract from Etherscan

After connecting with Metamask, a user can execute functions that are available such as “transfer,” “approve,” “transferFrom” and other functions that are available. Also, bear in mind that function available to execute varies from contract to contract.

P.S. the read and write features on Etherscan is designed to assist users in interacting with any smart contract deployed onto the Ethereum blockchain. The function and nature of the smart contract are defined by the developers of the smart contract respectively. To ensure further security, users are only able to interact with smart contracts that are verified on Etherscan.

P.S. verified contract means that the contract code given by the owner of the contract matches the contract code deployed onto the Ethereum blockchain. Etherscan does not filter out contracts that have vulnerabilities or deceptive such as a honeypot contract.

Etherscan is the leading Ethereum Blockchain Explorer. The core of Etherscan involves extracting data from the Ethereum distributed ledger, indexing and displaying the processed data in a concise and readable manner for the masses and layperson.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kaven Choi

Kaven Choi

Community Support Specialist at Etherscan

More from Medium

Intro to the Ethereum

coverImage

TreasureDAO Hackers Have Started Returning Stolen NFTs

Production Contract Security — Part 1

How to Leverage Farm on Yearn with Gearbox