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 utility for funding NEAR testnet accounts #222

Open
Hyodar opened this issue Jun 5, 2024 · 0 comments
Open

Add utility for funding NEAR testnet accounts #222

Hyodar opened this issue Jun 5, 2024 · 0 comments

Comments

@Hyodar
Copy link
Contributor

Hyodar commented Jun 5, 2024

I have a small script I used for funding the NEAR testnet accounts (added pretty much enough for quite a while) that should be added to the repository at some point in the best way possible. The idea is it creates a new account using the faucet and deletes it, transferring the funds received from the faucet to the beneficiary address. I think integrating it to some kind of CLI would be the best approach here instead of adding one more .sh around. This is the script:

#!/bin/bash

random_n=$(shuf -i 1-100000 -n 1)
unix_time=$(date +%s)
account_name="test_${unix_time}_${random_n}.testnet"
near create-account ${account_name} --useFaucet
near delete-account ${account_name} $1 --force

So you just call it e.g. ./fund_account.sh sfrelayer421614-0-2.testnet. This uses the current version of the NEAR cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant