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

Emit signer created event #402

Merged
merged 2 commits into from
May 2, 2024
Merged

Conversation

akshay-ap
Copy link
Member

@akshay-ap akshay-ap commented Apr 29, 2024

Fixes #397

Changes in PR:

  • Emit signer created event in factory
  • Document
  • Test

The signer address is not indexed based on the justification below:

Using indexed keyword allows searching for events by filter (useful when searching events using libraries like web3.py, web3.js, etc.), Also, having indexed param would mean that etherum.logs table in Dune would have signer address available in topic1 column. If not marked as indexed, then singer address need to be decoded from data column.

https://docs.soliditylang.org/en/latest/contracts.html#events

Indexing is accompanied by additional gas cost. So, indexed is recommended only if necessary. As we use dune and parsing data column of etherum.logs would give signer address, I don't think indexing is needed.

@akshay-ap akshay-ap self-assigned this Apr 29, 2024
@akshay-ap akshay-ap requested a review from a team as a code owner April 29, 2024 07:55
@akshay-ap akshay-ap requested review from nlordell, mmv08 and remedcu and removed request for a team April 29, 2024 07:55
@akshay-ap akshay-ap marked this pull request as draft April 29, 2024 07:55
@akshay-ap akshay-ap force-pushed the feature-emit-signer-creation-event branch from a72e9a3 to 5b2f5d0 Compare April 29, 2024 09:59
@akshay-ap akshay-ap marked this pull request as ready for review April 29, 2024 10:17
Copy link
Collaborator

@nlordell nlordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great. Missing reasoning/justification behind why we chose to index no fields.

@akshay-ap akshay-ap requested a review from nlordell May 2, 2024 07:44
@nlordell
Copy link
Collaborator

nlordell commented May 2, 2024

Please include in the PR description:

Missing reasoning/justification behind why we chose to index no fields.

@coveralls
Copy link

coveralls commented May 2, 2024

Pull Request Test Coverage Report for Build 8922065551

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 87.151%

Totals Coverage Status
Change from base Build 8920852675: 0.07%
Covered Lines: 122
Relevant Lines: 129

💛 - Coveralls

@akshay-ap akshay-ap merged commit 466a9b8 into main May 2, 2024
15 checks passed
@akshay-ap akshay-ap deleted the feature-emit-signer-creation-event branch May 2, 2024 10:13
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebAuthn Signer Creation Should Emit an Event
3 participants