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

Add base decoder for ComposableCoW contract #1660

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Add base decoder for ComposableCoW contract #1660

merged 5 commits into from
Jun 18, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Jun 17, 2024

Summary

As part of #1649, we need to return extra swap information for TWAP decoding, e.g. the start time, number of parts, time between parts and duration of part.

This adds a new ComposableCowDecoder, based on the required elements of the CoW SDK to detect and decode createWithContext calls. The reason for creating our own decoder is to reduce dependency reliance: the SDK has a peer dependency of ethers for example (which we don't use).

Changes

  • Add ComposableCoW ABI
  • Create ComposableCowDecoder
  • Add test coverage

@iamacook iamacook self-assigned this Jun 17, 2024
@iamacook iamacook requested a review from a team as a code owner June 17, 2024 13:54
@coveralls
Copy link

coveralls commented Jun 17, 2024

Pull Request Test Coverage Report for Build 9548973981

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 49.427%

Totals Coverage Status
Change from base Build 9546758491: 0.0%
Covered Lines: 3967
Relevant Lines: 6452

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 17, 2024

Pull Request Test Coverage Report for Build 9548972969

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 49.427%

Totals Coverage Status
Change from base Build 9546758491: 0.0%
Covered Lines: 3967
Relevant Lines: 6452

💛 - Coveralls

@iamacook iamacook marked this pull request as draft June 17, 2024 15:04
@iamacook iamacook marked this pull request as ready for review June 18, 2024 07:55
@iamacook iamacook marked this pull request as draft June 18, 2024 07:58
});
});

it.todo('should throw if TWAP handler is invalid');
Copy link
Member Author

Choose a reason for hiding this comment

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

I will come back and add this coverage as it involves understanding of complex encoding.

@iamacook iamacook marked this pull request as ready for review June 18, 2024 08:10
@coveralls
Copy link

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9561299550

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 49.427%

Totals Coverage Status
Change from base Build 9546758491: 0.0%
Covered Lines: 3967
Relevant Lines: 6452

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9562233686

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 49.427%

Totals Coverage Status
Change from base Build 9546758491: 0.0%
Covered Lines: 3967
Relevant Lines: 6452

💛 - Coveralls

@iamacook iamacook merged commit 7218ecb into main Jun 18, 2024
16 checks passed
@iamacook iamacook deleted the twap-decoder branch June 18, 2024 10:06
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.

3 participants