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

remove-unnecessary-events #126

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

remove-unnecessary-events #126

wants to merge 5 commits into from

Conversation

sangier
Copy link
Contributor

@sangier sangier commented Nov 28, 2024

Description

WIP on #108. Currently this PR :

  • removes ICS20Tansfer events according to the spec.
  • removes PacketCommited and AckCommitted events from IBCStore

What is missing :

closes: #108


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Wrote unit and integration tests.
  • Added relevant natspec and godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@@ -233,7 +223,7 @@ contract ICS20Transfer is IIBCApp, IICS20Transfer, IICS20Errors, Ownable, Reentr
string calldata destChannel,
ICS20Lib.FungibleTokenPacketData memory packetData
)
private
public
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this, I changed the visibility here to have access to this function to properly test the logic of the foreignDenoms test without relying on the events. However it may not be the ideal solutions.

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.77%. Comparing base (71d82b4) to head (c7e0816).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
- Coverage   93.89%   93.77%   -0.13%     
==========================================
  Files           9        9              
  Lines         311      305       -6     
==========================================
- Hits          292      286       -6     
  Misses         19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sangier
Copy link
Contributor Author

sangier commented Nov 28, 2024

Noted that currently our code:

  • Doesn't emit an event on an update client - in the spec we do so
  • We do emit events for PacketCommited and AckCommitted - while in the spec 1,2 we don't.

My take is that we should add the updateClient event and remove the Committed events. Committed events will be emitted right before the router events and, like those, they emit the packet, thus they appear to be redundant.

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

Successfully merging this pull request may close these issues.

Implement spec events
1 participant