-
Notifications
You must be signed in to change notification settings - Fork 5
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 runtime argument for minimum cow transfer threshold #324
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
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. Note that you may also want to update the dashboard to exclude min amounts.
src/fetch/transfer_file.py
Outdated
if tr.amount_wei > args.min_transfer_amount_wei: | ||
payout_transfers.append(tr) | ||
else: | ||
if tr.amount_wei > args.min_transfer_amount_cow_atoms: |
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.
This reads a bit strange in that it does not refer to wei but is called amount_wei
.
But renaming to amount
or amount_atoms
looks a bit overkill for the change in this PR.
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.
LGTM
Running it locally produces the expected result.
We should potentially revisit this change once we support layer 2s. Gas optimizations as in this PR are a bit of an implementation detail of mainnet.
This PR adds the option to specify a minimum COW transfer amount, effectively ignoring all transfers below that amount.
After merging this PR and before tagging a new release, I will do a PR in the infrastructure repo to set up these arguments correctly.