To be able to test smart contracts on Etherscan you need to understand what is Etherscan?
Etherscan is a block explorer that allows you to view public data about transactions, smart contracts, addresses, etc. on the Ethereum blockchain. All interactions on Ethereum are public and you can use Etherscan as a search engine to find information through these interactions. You can use the transaction hash (transaction ID) to check all related activity, including tokens, smart contracts and wallet addresses, etc.
You do not need to register for Etherscan, but you can create an account to use more functions. For example, you can set alerts to be notified of incoming transactions, access developer tools, and create feeds.
Etherscan does not give you an Ethereum wallet to use or store any private keys. You also cannot use Etherscan to trade. Etherscan acts solely as a source of blockchain information and a smart contract database. To transact or store cryptocurrencies, you need a crypto wallet such as Trust Wallet, MetaMask, Math Wallet, or Binance Chain Wallet.
How to test smart contracts on Etherscan
If you frequently interact with smart contracts in a DApp, you should learn how to find smart contracts on Etherscan. This way you can double check to make sure you are sending funds to the correct contract.
If you need to add a new token to your wallet, you will have to find the contract address of that token. The smart contract address contains the logic of the token, such as how the token is transferred and other behaviors.
To find the token address, you can go to CoinMarketCap, CoinGecko or the official website of the project. You can also visit https://etherscan.io/tokens.
Always make sure you are adding the correct token address by double-checking it on the sites mentioned above. Let’s take a look at the ERC-20 Uniswap token on Ethereum:
1. Copy and paste the smart contract address into the search field.
2. You will now see details of the contract balance and other general information related to the Uniswap (UNI) token contract.
3. Below, we have more options to view, including the transaction, the annotation, and the smart contract itself. Click [Contract] side to see options with which you can interact and read the Uniswap policy.
4. Tab [Read Contract] shows you general information about the contract. For example, this tab allows you to query the balance of a specific address or wallet that has permission to use the tokens in your wallet.
Click [Write Contract] allows you to interact directly with the contract. This is useful when you are unable to access the DeFi and DApp platforms, possibly due to technical problems or website downtime. In some cases, you can try to interact with the smart contract without using the project’s API.
Click [Connect to Web3] will allow you to connect a crypto wallet like MetaMask or Binance Chain Wallet and interact with the contract.
The simplest operation here is to transfer coins. Using [transferFrom], you can transfer tokens from an address that you have permission to to other addresses.
[transfer] allows you to transfer the associated token of the contract from the wallet to which you are connected. The transaction below will send 1 UNI from the wallet you connected to the receiving wallet address you paste in. You must also make sure you have entered the correct number of decimal places for the amount you want to deposit.
Most users never need to use these features. However, you should still know where these features are located in case you need to access funds stored in a smart contract.
How to check gas fees on Etherscan
Gas fees are part of Ethereum transaction fees. These fees vary depending on the block your transaction is added to. Each block has a fixed fee and this fee varies depending on the network traffic. Gas tracker on Etherscan shows you the price and time difference of different gas charges. It is a useful tool for predicting network congestion and how much you might have to pay to send a simple money transfer or interact with a more complex smart contract.
How to find airdrops on Etherscan
Etherscan also serves as a database of ongoing airdrops on the Ethereum network. Each airdrop will have its own rules of participation, which you can see in the column [Details]. You can find the list of airdrops by visiting https://etherscan.io/airdrops.
See more: How to check transactions and wallets on Etherscan