-
Notifications
You must be signed in to change notification settings - Fork 82
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
Executed total fee token #2966
base: main
Are you sure you want to change the base?
Executed total fee token #2966
Conversation
Reminder: Please update the DB Readme. Caused by: |
&total_fee, | ||
&executed_protocol_fees, | ||
Asset { | ||
token: ByteArray(order_fee.total.token.0 .0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth having From<TokenAddress>
for ByteArray
as it appears in more occurrences 🤔
/// | ||
/// Denominated in SELL token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this clarification here since the function name is self-explanatory already?
@@ -0,0 +1,24 @@ | |||
ALTER TABLE order_execution | |||
RENAME COLUMN surplus_fee TO total_fee; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new column is still called total_fee
instead of executed_fee
in the migration and readme.md
.
ADD COLUMN total_fee_token bytea NOT NULL DEFAULT '\x0000000000000000000000000000000000000000'; | ||
|
||
-- Now populate existing rows with the sell token taken from the 'orders' table, or if it doesn't exist, try from 'jit_orders'. | ||
UPDATE order_execution oe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test that this query does not leave any surplus_token
uninitialized?
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Will be worked on in Q4. |
This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed. |
Description
Implements (1) and (2) from #2963.
Also, renames
surplus_fee
tototal_fee
in database.Changes
order_execution.total_fee_token
to databaseexecuted_fee
.Note: all places where sell token needs to be substituted with surplus token are marked with
TODO surplus token
and this will be tackled as part of (3) from #2963.How to test
Existing e2e tests. Observed values during the tests.