-
Notifications
You must be signed in to change notification settings - Fork 75
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
[refunder] submitting txs #759
Conversation
f083691
to
a1315d4
Compare
a1315d4
to
b79a009
Compare
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.
Still have to look a bit more into the submission logic tomorrow. That stuff tends to be tricky.
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.
Looks good to me with the exception that an eth-flow order can technically be partially fillable.
// The gas price of the refund tx is the current prevailing gas price | ||
// of the web3 gas estimation plus a buffer. | ||
// Since we are using Eip1559 gas specification, | ||
// we will only pay the buffer if it is used | ||
let mut new_max_fee_per_gas = max_fee_per_gas * GAS_PRICE_BUFFER_FACTOR; |
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.
Why don't we do it this way in services too? I feel like we could simplify our code in the same way.
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.
Nice!
Related to issue: #626
This PR has the logic to make the refunder submit the actual refund tx.
The overall loop goes like this:
Test Plan
I added some unit tests. E2e test is provided in this PR: #776