2

I'm interacting with the blockchain using MetaMask. Here's my JS code:

var filter = web3.eth.filter('latest');
    filter.watch(callback)

function callback(error, result){
    console.log(result);
}

After I run this code I start to recieve 32 byte hashes (1 hash in 10 - 15 seconds).

VM183:5 0x58e2dee05f23f4eed79505c5bf206a9f0a40fa63b7292e0e6e74f7d617cc96c0
VM183:5 0x6e4bde273ade0e8a6f89043e984fa9868f9a5be8f872ebd49886d151575e71c4
VM183:5 0xea0a0d730a6a478adda9d612b4a17451732d3a570ff8d8cd3c19ea0b7808c944
VM183:5 0xa28edff62ecd25fe579f1bd369d215f5587dee6f6be1d69f85d3995f0d7bb0c8
VM183:5 0xe382fc446246e83124205535b915768c16f5d2e1ebb72e9a171da770ec827c89
VM183:5 0x2f246cb4f09e88f05b4f19539d4aac2a4bcfd8294f18899cb5df14cd7941885c
VM183:5 0x1621d5b8eda67208a146b043b3c23f1bc89c918cfec011106c6714f05ccd37bf
...

Here's a browser console snapshot: enter image description here

What are those? There are not txhashes/blockhashes, because when I put any of them into the search field on https://testnet.etherscan.io I get:

Unable to locate Transaction entry

Maybe they are signatures of events that fire on the blockchain when the new block is mined. I'm really confused.

From web3 api docs:

filter.watch(callback): Watches for state changes that fit the filter and calls the callback.

What are state changes in this case?

1 Answer 1

2

Ok, these are blockhashes. From web3 api:

When using the "latest" parameter, it returns the block hash of the last incoming block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.