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

Deprecate executedSurplusFee, adding executedFee and executedFeeToken #2247

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Jan 13, 2025

Summary

executedSurplusFee is being deprecated, in favour of executedFee and executedFeeToken. This deprecates the formers, and adds the latter to Orders.

Eventually, the executedFeeToken will also need updating as it will will be expressed in SURPLUS tokens (BUY tokens for SELL orders and SELL tokens for BUY orders). For now, it remains the sellToken.

Note: all fields are no longer nullable, apart from previewed TWAP parts.

Changes

  • Add executedFee/executedFeeToken to OrderSchema.
  • Add fields to relevant swap/TWAP entities, removing wrong nullable properties.
  • Map new fields in respective swap/TWAP mappers.
  • Update builder to use same values for executedSurplusFee<>executedFee and sellToken<>executedFeeToken.
  • Update tests accordingly.

@iamacook iamacook self-assigned this Jan 13, 2025
@iamacook iamacook marked this pull request as ready for review January 13, 2025 10:42
@iamacook iamacook requested a review from a team as a code owner January 13, 2025 10:42
Comment on lines +103 to +105
executedSurplusFee: z.coerce.bigint(),
executedFee: z.coerce.bigint(),
executedFeeToken: AddressSchema,
Copy link
Member Author

Choose a reason for hiding this comment

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

CoW confirmed that none of these are nullable.

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.

1 participant