trufflesuite / ganache-ui

Personal blockchain for Ethereum development
https://www.trufflesuite.com/ganache
MIT License
4.66k stars 803 forks source link

Feature suggestion: show event logs in transactions #80

Closed carlolm closed 5 years ago

carlolm commented 6 years ago

This would be really helpful for development, to display the logged events for successfully mined transactions.

fshaikh commented 6 years ago

Any updates on this please?

jtakalai commented 6 years ago

Attaching ABI to addresses (maybe through deploy tx) would be enough I think? Event logs even in undecoded form would be helpful.

sogoiii commented 6 years ago

I made some time to work on this. I have its decoding and showing events from a given transaction. Still working through a bunch of UI things.

mikeseese commented 6 years ago

Hey everyone! Sorry for the delay on this. I joined Truffle in May, so I don't get notified about earlier activity, and I haven't yet gone through all of the issues

@sogoiii I'm actually working this effort currently. Thank you so much for taking the time to work this!! We may pull some stuff from your work if it helps decrease some time on our part and aligns with the way we've planned, but we'll probably stick with our implementation.

Our implementation is part of a larger effort however (which means it won't be released in the short term [more like months rather than weeks]). So if you choose to continue your (hopefully) minimal implementation, and it's it fits the flow, then we could potentially merge that in the meantime. If your implementation requires a large effort (either on your or our part), I would recommend against working it for your sake :)

sogoiii commented 6 years ago

Well i'm like half way done?? My remaining steps are:

  1. Finnish adding page so user can specific locations of artifacts.
  2. Updating artifact store. I have a cheap solution now.
  3. Lastly Styling the transactions page to show events dynamically.

I have it decoding data and displaying it in the transactions page. It will look better than what I have below.

screen shot 2018-08-02 at 6 12 06 pm

benjamincburns commented 6 years ago

Hi @sogoiii! In case you don't know me, I lead the development of Ganache internals on the Truffle team.

I'm so sorry to say that the work @seesemichaelj is presently doing is in direct conflict with the work you mentioned. As he said in his previous comment, the scope of his work is a bit more broad, as it will bring lots of details about your project's contracts into Ganache, including decoded event logs.

My advice in the future would be to check in with us before starting on something like this to make sure you're not duplicating someone else's effort. In the mean time @seesemichaelj is going to go through open cases to make sure that he's assigned the relevant ones to himself for the current work he's doing.

If you're interested in contributing in other areas of ganache or ganache-core development I'd be super excited to help steer you toward something that would bring you some value that isn't already in progress.

ldub commented 6 years ago

Any update on this feature?

mikeseese commented 6 years ago

Hey @ldub! This feature is going into Ganache 2.0, which we announced/demoed at TruffleCon. I'll see if we can write up a blog post with details of those product updates! A brief list of things to come to Ganache 2.0:

As far as timeline, we've got the features mostly implemented, but we're still banging out bugs/etc. We're also testing 2.0 rigorously before releasing as we want this to be a solid build. Very likely this will be sometime after DevCon.

ldub commented 6 years ago

Awesome, thanks for the update! Looking forward to Ganache 2.0

mikeseese commented 5 years ago

This is implemented for the upcoming Ganache 2.0 release as stated before. Below is a sneak peak!

screenshot from 2018-12-08 16-05-05

Clicking on the event would give you more details like such: image

If you want to get notified when 2.0 is released, you should checkout Github's new "watch Releases Only option": image You'll get notified when new releases are made if you select that Releases Only option. The auto updater should also notify you when a release is ready too!

zulhfreelancer commented 5 years ago

@seesemichaelj cool! Question — will it support deep events too?

For example, contract A call a function contract B.

Contract B emits an event. Will Ganache shows the emitted event in contract B as well?

If you guys need some pointers, do check out my small library here to extract out deep events.

https://github.com/zulhfreelancer/truffle-events

I hope that helps!

mikeseese commented 5 years ago

It should, yup! Will give your example on that link a whirl.

mikeseese commented 5 years ago

Looks like this is already supported @zulhfreelancer! Thanks for the test case!

peek 2018-12-08 17-06

zulhfreelancer commented 5 years ago

Nice!