Skip to content
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

Expand NewEntity action to allow for field setting from event (or call) attributes. #56

Open
cvauclair opened this issue Aug 12, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@cvauclair
Copy link
Collaborator

Add optional arguments to the NewEntity @gg:handler action to allow for field setting from event (or call) attributes. This would reduce the need to make contract calls just to set contract static parameters.

Potential idea example:

interface IUniswapV2Factory {
  /* @gg:handler 
    actions:
      - NewEntity Pair from pair with token0 = token0, token1 = token1
  */
  event PairCreated(address indexed token0, address indexed token1, address pair, uint);
  ...
}

This will require enhancing the parsing of @gg:handler actions so as to allow variations in the actions syntax (E.g.: NewEntity X from Y and NewEntity X from Y with field1 = attr1, field2 = attr2). A new small seperate lexer/parser could potentially be made just to handle the actions syntax.

@cvauclair cvauclair added the enhancement New feature or request label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant