New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create event/logging functionality #359

Merged
merged 9 commits into from Sep 27, 2017

Conversation

Projects
None yet
2 participants
@DavidKnott
Contributor

DavidKnott commented Sep 23, 2017

- What I did

I added the ability for developers to create events (using the logging evm opcodes).
This PR is in response to issue #346 and #297.

- How I did it

  1. Changed the abi output for events so that it'd show bytes maxlen (this bytes3 instead of bytes). This was necessary for events logged to be decoded
  2. Created the event signature class which shows the necessary information for events (event_id, topics, data, etc)
  3. Added checks for logs at the top of files to the parser
  4. Added pack_logging_topics and pack_logging_data to pack the logging args correctly (pack_arguments used a different format which didn't work with the abi decoder and used more memory)
  5. Added the logging opcode itself with topics and args.
  6. Added typ checking for logging
  7. Created tests for logging (More still need to be added but I think I've got a good start)

- How to verify it

  1. Look through my PR, the test_logging.py in particular
  2. Pull down this branch and try logging yourself

- Description for the changelog

Add logging functionality

- Cute Animal Picture

image

@DavidKnott DavidKnott merged commit cf1b5b1 into ethereum:master Sep 27, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
from viper.exceptions import VariableDeclarationException, TypeMismatchException, StructureException
def test_empy_event_logging():

This comment has been minimized.

@veox

veox Sep 30, 2017

Non-issue: typo, empy -> empty.

@veox

veox Sep 30, 2017

Non-issue: typo, empy -> empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment