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 runtime argument for minimum cow transfer threshold #324

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

harisang
Copy link
Contributor

@harisang harisang commented Oct 25, 2023

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.

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@harisang
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Oct 25, 2023
@harisang harisang requested a review from fhenneke October 25, 2023 09:32
Copy link
Contributor

@bh2smith bh2smith left a 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.

if tr.amount_wei > args.min_transfer_amount_wei:
payout_transfers.append(tr)
else:
if tr.amount_wei > args.min_transfer_amount_cow_atoms:
Copy link
Collaborator

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.

Copy link
Collaborator

@fhenneke fhenneke left a 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.

@harisang harisang merged commit b04d99e into main Oct 31, 2023
5 checks passed
@harisang harisang deleted the add_min_cow_transfer_threshold branch October 31, 2023 08:34
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants