Skip to main content
26 votes
Accepted

Error when trying to verify contract

I got this error too and this worked: Delete artifacts and cache folders run npx hardhat compile then verify
Jack's user avatar
  • 276
25 votes
Accepted

How to find solidity code for a contract address

Mainly due to optimizations carried out when the source code is compiled it's not feasible to get the source code from the bytecode/opcode itself. Refer this question. Compilation back to the ...
Achala Dissanayake's user avatar
18 votes
Accepted

Normal transactions VS. Internal transactions in etherscan

Internal transactions, despite the name (which isn't part of the yellowpaper; it's a convention people have settled on) aren't actual transactions, and aren't included directly in the blockchain; they'...
niksmac's user avatar
  • 9,673
17 votes
Accepted

How to verify token after etherscan, and submit icon

I don't know if the process to verify has changed, but you need to send your ICON image by e-mail. To do this you’ll need to go to the Etherscan Contact Us Page and send them an e-mail with the ...
Guilherme Flores's user avatar
17 votes
Accepted

How do I get the implementation contract address from the proxy contract address?

Most proxy contracts typically have a public variable defined as a: address public implementation; Which defines the address of the implementation contract. You could then call it as a view function ...
Patrick Collins's user avatar
16 votes

Normal transactions VS. Internal transactions in etherscan

In the Ethereum protocol there's only transactions and message calls. A transaction is a type of message call. A transaction may perform other message calls, but these are not transactions (even ...
eth's user avatar
  • 86k
15 votes

How do I find the exact solidity compiler version used by truffle?

I'm running Truffle 3.4.11 and running just: truffle version gives me the Solidity version as well: truffle version ...
Gus's user avatar
  • 341
15 votes
Accepted

What's difference between "Gas Used By Txn" and "Cumulative Gas Used" fields?

Gas Used By Txn - gas used by the transaction Cumulative Gas Used - gas used by the transaction plus gas used by the transactions executed before the current one in the same block. Cumulative gas is ...
medvedev1088's user avatar
15 votes
Accepted

How do fronrunning and sniper bots work?

A good overview of frontrunning, and related miner extractable value (MEV), problems are well established and well known at this point. The difference between these two modes of frontrunning that in ...
Mikko Ohtamaa's user avatar
15 votes

Etherscan API Invalid API key

I had this problem. The API Key seems to take about five minutes to activate once it is created.
Sajad Rastegar's user avatar
12 votes

Normal transactions VS. Internal transactions in etherscan

An internal transaction is not a real transaction - it has no signature and is not included in the blockchain. It is the result of a contract initiating a value transfer, or calling another contract, ...
Ethan's user avatar
  • 724
12 votes
Accepted

Etherscan: How can I verify a contract with multiple imports deployed with Truffle?

Currently etherscan does not support verification of multifile contracts. But there is discussion on etherscan's reddit about this issue. Concatenating files into one worked some time ago, but since ...
max taldykin's user avatar
  • 2,966
12 votes

Etherscan API - Get all token balances

As previously mentioned it doesn't appear possible using etherscan. But it's possible using the (free) ethexplorer.io API. The format is: https://api.ethplorer.io/getAddressInfo/[YOUR_ADDRESS]?apiKey=...
Mark Thomson's user avatar
11 votes
Accepted

Obtain token transfer data from an address

How about using Etherscan's Event Log API? https://api.etherscan.io/api?module=logs&action=getLogs &fromBlock=0 &toBlock=latest &address=[Token Contract Address] &...
benjaminion's user avatar
  • 9,297
10 votes
Accepted

How does etherscan fetch the number of token holders from a smart contract?

They keep track of Transfer events emitted by that smart contract. Most likely they record them in an SQL database and maintain a ledger based on these events. The event is defined in the ERC20 https:/...
medvedev1088's user avatar
10 votes
Accepted

How to manually approve a token for swap on Uniswap (direct contract interaction)

Get the pool address Go to the Uniswap UI at https://app.uniswap.org/. Choose the token pair you want and then click the View pair analytics ↗. This will take you to a link like https://uniswap.info/...
Markus - soliditydeveloper.com's user avatar
10 votes
Accepted

I got "sandwich attacked" on my transaction

You are not providing enough information about your case, but most likely you have been front-run. When you are giving away free money on the blockchain, some people will take it. When you announce ...
Nulik's user avatar
  • 4,061
9 votes
Accepted

How to get an ERC20 token listed in etherscan.io

Etherscan's FAQ page answers your first question in the "Token Tracker Listings" section. Here is what it says: Any compatible ERC20 tokens on the Ethereum blockchain can be publicly and ...
Tesa's user avatar
  • 2,269
9 votes
Accepted

How to get details for an Ethereum transaction

EtherScan API also provides a API for transaction details which I missed. It's part of Geth/Parity Proxy APIs by name eth_getTransactionByHash
garg10may's user avatar
  • 724
9 votes

How do you verify a contract on etherscan that is deployed by another contract?

It is not possible as on 24th March 2018. Etherscan is unable to locate contract code on the address of subcontract. Here is the transaction which deploys two contracts. But for the second contract, ...
Ayushya's user avatar
  • 1,698
9 votes
Accepted

What does "Topics" mean in "Event log"?

In a transaction receipt the fied topics correspond to your event arguments which are indexed in your smart contract. For all events you will find as first argument the hash of the event name, and ...
Lbrth_BoC's user avatar
  • 445
9 votes

How do I get the latest block using etherscan api?

Even easier: https://api.blockcypher.com/v1/eth/main Blockcypher is a pretty good api for this kind of stuff.
matthewpark319's user avatar
9 votes
Accepted

weird transaction sending to self

It's about canceling a transaction. More precisely, it's a replacement transaction for something else that was in the pending transaction pool. Consider a case where a transaction is sent with ...
Rob Hitchens's user avatar
  • 55.4k
9 votes
Accepted

What's the meaning of "similar match" in source verification?

Here is the reply I got from Kaven @Etherscan, in case it's useful for somebody else: Contract that gets the “Similar Match” annotation has the identical contract code (exact bytecode) with ...
fiiiu's user avatar
  • 141
9 votes
Accepted

API for ERC20 token balance - EtherScan

From https://etherscan.io/apis#tokens: Get ERC20-Token Account Balance for TokenContractAddress https://api.etherscan.io/api?module=account&action=tokenbalance&contractaddress=...
user19510's user avatar
  • 28.1k
8 votes
Accepted

Are pending transactions "dropped" and "reinstated"?

My understanding is that your understanding is correct, except you're missing one particular property of the Ethereum node software. Namely, as part of #3, the transaction is stored in the node's ...
lungj's user avatar
  • 6,680
8 votes
Accepted

Etherscan verification purpose

It verifies that the bytecode of the smart contract which is stored in the Ethereum network corresponds to the Solidity code initially available only to the smart contract developer. Etherescan ...
medvedev1088's user avatar
8 votes

My friend sent me a screenshot of a transaction hash, but when I search for it I find divergent data. What happened?

Your friend simply edited the HTML and changed the TimeStamp, To, and Value on that page. You can tell this because all of the other stats on the page are correct, with the exception of the items ...
Shane Fontaine's user avatar
8 votes
Accepted

Finding the address of the proxied to address of a proxy

Implementation is stored as value in IMPLEMENTATION_SLOT (see the source code), so you can get the underlined Contract with: let proxyContract = "0x4fabb145d64652a948d72533023f6e7a623c7c53"; ...
tenbits's user avatar
  • 2,428
8 votes

Error when trying to verify contract

You will need to delete the files and recompile: run npx hardhat clean run npx hardhat compile try verify again. npx hardhat clean deletes cache and artifacts :)
brayve pancake's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible