Hot answers tagged

14

The address needs be surrounded with quotes. "0xca35b7d915458ef540ade6068dfe2f44e8fa733c" should work.


7

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 the blocks using an SQL command. You can base the where condition on block_timestamp. Bellow is the structure of the "block" table provided by Presto Ethereum: ...


6

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 implement the function function tokenURI(uint256 _tokenId) external view returns (string); which will return a URI pointing to that token's metadata. It may be in ...


6

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 filter options object as follows: String|Object - The string "latest" or "pending" to watch for changes in the latest block or pending transactions respectively. Or a filter options ...


6

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.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(1.23456, "ether")}) "0x4a950bc3651c991aa2ff50fc49601e69960f1f75823df3d4a5dfc7d3c5e3c190" ...


4

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 geth.exe


4

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 latest block: eth.getBlock("latest"), but there is no such function for a transaction. That said, if you're operating on a private blockchain (you trust all ...


3

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 through the blockchain yourself and save the data that interests you. Note that reading the entire chain is slow. You will want to keep your database updated in ...


2

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 what I was doing wrong. This works: "0xca35b7d915458ef540ade6068dfe2f44e8fa733c" This doesn't work. '0xca35b7d915458ef540ade6068dfe2f44e8fa733c'


2

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 You can't get internal transactions since it requires executing block transactions. The only data that you can get is blocks and transactions. And yes it ...


2

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 all (or required) key-value pairs using RLP. Geth then takes these key-value pairs (which are nodes on a merle patricia trie) and creates merkle patricia tries`...


1

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 functions inside functions are not allowed. Solc Compiler oversight? Innappropriate mapping declaration overwrites storage You would want to reorganize the ...


1

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 intrinsic body code. For a normal STOP code, or if the code returned is otherwise empty, then the state is left with a zombie account, and any remaining ...


1

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 cares if you read some data from your node so no need to send that information further. That way you don't have to worry about "burdening" the blockchain or ...


1

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 web3 getTransaction(hash) or RPC eth_getTransactionByHash) but you cannot look up transactions by sender. Services like http://etherscan.io that offer more ...


1

contract MyToken mapping (address => uint256) public balances; function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } ... } Reference - The DAO, version 1.0 with the $50 million bug.


1

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 back-end scaper. You can set it up in a cron job to keep the data fresh.


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