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

check funder balance is sufficient to fund all accounts before funding any #91

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

zeroXbrock
Copy link
Member

@zeroXbrock zeroXbrock commented Jan 14, 2025

Motivation

Users were seeing low-level error messages during the funding step which didn't explain the high-level problem. This change stops you before that can happen.

Solution

  • sum up total cost of funding accounts in fund_accounts and error if the sender has less than that balance
    • takes into account gas price and adds 10% in case of future congestion
  • shorten log to make it not seem like an error

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zeroXbrock zeroXbrock merged commit 221b1a9 into main Jan 15, 2025
5 checks passed
@zeroXbrock zeroXbrock deleted the feature/preemptive-error-check_funding branch January 15, 2025 19:39
This was referenced Jan 15, 2025
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