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

services/friendbot: support funding existing accounts #5399

Merged
merged 8 commits into from
Jul 25, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jul 24, 2024

What

Support funding existing accounts in Friendbot.

If an account does not exist, do as done today, create the account with the starting balance.

If an account exists, and balance is equal to or above the starting balance, error as the account is funded sufficiently.

If an account exists, and balance is below the starting balance, send a payment to the account of the starting balance.

Why

The stellar-cli supports funding accounts and there's a request to support funding to top up existing accounts that have spent funds (stellar/stellar-cli#1389).

There are reasons why this shouldn't be done. It's possible for someone to more easily exhaust the testnet native balance available. However, it is really already very easy to do that by simply passing random addresses. And because this change doesn't allow unlimited funding of a single account without moving funds out of the account the same amount of friction will exist as it does today to someone wishing to accumulate lots of testnet native.

Close stellar/stellar-cli#1389

@leighmcculloch leighmcculloch marked this pull request as ready for review July 24, 2024 03:05
@leighmcculloch leighmcculloch requested a review from fnando July 24, 2024 03:41
Copy link

@chadoh chadoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, thanks!

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coupla tiny comments, just waiting on the Slack discussion to ✔️

services/friendbot/internal/minion.go Show resolved Hide resolved
services/friendbot/internal/minion.go Outdated Show resolved Hide resolved
services/friendbot/internal/minion.go Show resolved Hide resolved
@leighmcculloch leighmcculloch requested a review from Shaptic July 24, 2024 21:35
@leighmcculloch leighmcculloch merged commit 31fc8f4 into master Jul 25, 2024
23 checks passed
@leighmcculloch leighmcculloch deleted the friendbot-fund-existing branch July 25, 2024 01:49
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.

keys fund: top-off accounts if below --minimum-balance
3 participants