Skip to main content
16 votes
Accepted

Solidity error when encoding arguments to query public mapping

The address needs be surrounded with quotes. "0xca35b7d915458ef540ade6068dfe2f44e8fa733c" should work.
afu802's user avatar
  • 376
14 votes
Accepted

How to get metadata from ERC721

The other answer is incorrect. See the ERC721 Standard for exactly how to do this. If a token contract properly implements the ERC721 Standard and the ERC721Metadata extension, it will always ...
AnAllergyToAnalogy's user avatar
7 votes
Accepted

API to enumerate the blocks from a specific day

There is no Web API, but you can perform this using SQL. You can do it simply with "Presto Ethereum Connector" (https://github.com/xiaoyao1991/presto-ethereum) Using Presto Ethereum, you can query ...
Muhammad Altabba's user avatar
7 votes

How to query local Ethereum blockchain for a specified transaction?

Find Transaction By Transaction Hash Ideally you would have saved the transaction hash, and then you can query for the transaction using this transaction hash. Here is an example: > eth....
BokkyPooBah's user avatar
  • 40.3k
6 votes
Accepted

Listing transactions in a private blockchain?

Take a look at web3.ETH.filter Parameters String|Object - The string "latest" or "pending" to watch for changes in the latest block or pending transactions respectively. Or a ...
niksmac's user avatar
  • 9,683
4 votes

Index and query blockchain data and levelDB

Geth does three operations on the database that you should consider when trying to find alternatives. Geth loads the entire database in levelDB (what I believe you want to do). Geth then deciphers ...
Fortune's user avatar
  • 522
4 votes
Accepted

Asynchronously querying the block chain

Unfortunately, there is no filter provided to parse the confirmed transactions without going through a block first i.e., you can trigger a filter (and execute call_async_method()) whenever there is a ...
galahad's user avatar
  • 3,930
4 votes
Accepted

How does etherchain access and query Ethereum blockchain transaction data?

What you are looking for is a open node. I'm not sure where you could find one, however there probably is a open node somewhere. You could scrape etherchain for data, or connect it to for example ...
Jeth's user avatar
  • 312
4 votes

Fetching InternalType data from another contract

The "internalType" is the representation used by solidity. For example the contract contract B { struct View { uint x; } function foo(View memory bad) public view { ...
Ismael's user avatar
  • 30.5k
3 votes
Accepted

How to gather historical events emitted by any contract

Did you try using eth_getLogs. This is also exposed via the Ethers provider: https://docs.ethers.io/v5/api/providers/provider/#Provider-getLogs. The syntax for the parameter is the same as for ...
Richard's user avatar
  • 5,034
3 votes

How does etherchain access and query Ethereum blockchain transaction data?

I believe Etherchain is processing the blockchain as it evolves, and they're creating their own database which is far better at searching and reporting. Anybody can do this, you just need to read ...
Ross Perkins's user avatar
3 votes

How to get metadata from ERC721

To view ERC721 token content use: https://etherscan.io/ For example get a token address from OpenSea, input into the etherscan.io query and search. Select 'Tracker' --> 'Inventory' --> token id --> '...
Dan's user avatar
  • 31
2 votes

Solidity error when encoding arguments to query public mapping

The address has to be provided with quotes. Just like huafu said. Must be double qutoes "". It is not going to work with single qutoes. In Javascript it doesn't matter and I was trying to figure out ...
Rob Magier's user avatar
2 votes

Index and query blockchain data and levelDB

There are inherent limitations of this approach: You can't get the world state from the underlying database since all keys are hashed there. It includes: accounts and their balances contract storage ...
medvedev1088's user avatar
1 vote

How to query my Polygon NFTs created on Opensea?

To find items on Polygon, make sure to check "Polygon" under the "Chains" section on the left panel. If you want to access through opensea-js API, unfortunately it is not supported ...
btwiuse's user avatar
  • 176
1 vote
Accepted

Is there a way to test whether an external contract implements (or does not implement) a given interface method?

One way is to use try-catch error handling. Here's a minimal code for the same: // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; interface IRandomMethod { function getUint() external view ...
SYED ASAD KAZMI's user avatar
1 vote
Accepted

Can you fetch the whole transaction history of specific contracts somewhere?

If you like to fetch specific contracts (or to an extent general account) address history, then you can use service such as Moralis. They have Transaction API that can help you index transaction data ...
Yoseph Kurnia Soenggoro's user avatar
1 vote

Can you fetch the whole transaction history of specific contracts somewhere?

Yes, there are several services that allow you to query all transactions related to a specific smart contract. Etherscan, for example, provides a "View Contract" feature that allows you to ...
vgonearth's user avatar
  • 139
1 vote

Searching for Ethereum addresses that match a partial address?

It is generally not possible to search for partial addresses or transaction hashes using publicly available blockchain explorers like Etherscan. Most blockchain explorers only allow users to search ...
VX3's user avatar
  • 676
1 vote

How can I query the onchain data on the ethereum blockchain without using any APIs?

If you need live onchain data, you have 3 options. Using an API or providers like Alchemy etc. If the users connects his wallet you can use the users provider in his wallet (metamask for ex.) You can ...
Yetik's user avatar
  • 339
1 vote

Is there a multi-call equivalent for calls that aren't made to a smart contract?

You can use ethers.providers.JsonRpcBatchProvider, its JS API is equivalent to the JsonRpcProvider. It simply batches the requests, so that multiple requests are sent together in a single network ...
Soham Zemse's user avatar
  • 2,061
1 vote
Accepted

How to query contract input (address) using Etherscan's API?

You cannot query the method of the smart contract actually. you should query the events/logs of the smart contracts If you are trying to query the canMint() function executions. you need to query the ...
MYANZIK shrestha's user avatar
1 vote
Accepted

Mappings inside functions to filter query

You cannot assign mappings inside a function even if the compiler seems to let you. That will lead to corrupted storage. The storage layout of persistent variables must be global. Temporary mappings ...
Rob Hitchens's user avatar
  • 55.4k
1 vote
Accepted

Error: Couldn't decode bytes32 from ABI: 0x The size doesn't match

The answer here is, that the contract was deployed, but empty! Section 7.1 of the yellow paper it states that "while the initialisation code is executing, the newly created address exists but with no ...
sunwarr10r's user avatar
1 vote

Querying the blockchain: Search transaction by data

The answer is no. The standard ethereum clients (geth and parity) maintain only a limited set of indexes for querying the blockchain. For example, you can look up a transaction by its hash (using ...
wiherek's user avatar
  • 111
1 vote

ETH blockchain reading scalability

As you said, view and pure "reading" functions are free. The reason for this is that they are only executed in your own node and not broadcasted to the blockchain to other nodes. Nobody else really ...
Lauri Peltonen's user avatar
1 vote

Solidity error when encoding arguments to query public mapping

contract MyToken mapping (address => uint256) public balances; function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } ... } ...
BokkyPooBah's user avatar
  • 40.3k
1 vote

How run queries on the block chain?

We're working on software that allows you to export transactions from any number of different accounts into various formats including databases. Check it out here: http://ethslurp.com. It works as a ...
Thomas Jay Rush's user avatar

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