Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Implement contract events (LOG) API #421

Closed
Nashatyrev opened this issue Jun 16, 2016 · 6 comments
Closed

Implement contract events (LOG) API #421

Nashatyrev opened this issue Jun 16, 2016 · 6 comments
Labels
Milestone

Comments

@Nashatyrev
Copy link
Member

We are lacking of convenient LOG tracking API. It is currently implemented as JSON RPC filters, but we need to add this as Java API

@ajunge
Copy link

ajunge commented Sep 29, 2016

I'm trying to capture contract events. Is there a sample of how to do it with JSON RPC now?

@arass
Copy link

arass commented Nov 14, 2016

Anyone working on this? I could give this a try (once Morden is working again).

@btiernay
Copy link

What would be great is a way to supply the ABI and parse into something like a JsonNode. This would be similar in function to http://ethereum.stackexchange.com/questions/1381/how-do-i-parse-the-transaction-receipt-log-with-web3-js

@arass
Copy link

arass commented Nov 22, 2016

I was thinking more high level.
Constructor based on type of search, maybe? Builder pattern?
Constructor (contract_address).method("inc").blocking(true).build();
If blocking is enabled - it will block on next(), so that it's an infinite loop (exit via Inerrupted exception, or allow for a blocking timeout (both)).

Then something as simple to use as an Iterable interface, perhaps?
Then you can do:
for (T t : contractEvents)
myCode(t);

T can be whatever internal datatype we get from API. Avoids overhead in converting data.

@adridadou
Copy link
Contributor

I've done something about that on github.com/adridadou/eth-contract-api
Where you can register a watcher on Events and they are converted into a type you have defined.
If it helps ..

@zilm13 zilm13 added this to the 1.7.0 milestone Nov 29, 2017
@mkalinin
Copy link
Contributor

PR #984

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants