-
Notifications
You must be signed in to change notification settings - Fork 107
Add automatically fund a key on testnet #2097
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi! I see where you're coming from, but we're avoiding to do too many magical things that users may not be aware of. In your case, the best way of doing quite the same would be creating a key, then using $ stellar keys generate default --fund --global
✅ Key saved with alias default in "/Users/fnando/.config/stellar/identity/default.toml"
✅ Account default funded on "Standalone Network ; February 2017"
$ stellar keys use default
ℹ️ The default source account is set to `default`From now on, you don't have to use You can see how your env is set up by using |
|
Hi @fnando, i don't quite understand what you mean in comparison with the issue message. Do you mean the Users must run and which is quite different from what the issue states (flow would mean that devs getting started would have less to do upfront before a stellar contract deploy would just work), please do clarify. |
| short = 's', | ||
| visible_alias = "source", | ||
| env = "STELLAR_ACCOUNT", | ||
| default_value = "default" |
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.
What if instead of introducing a magic value, we leveraged the env var by setting the env var at a high level. The idea I suggested in the issue was less about having a magic 'default', but more about identifying when a default key hasn't been set via the use command, and there are no generated keys, and creating a key and then setting it as if the use command had been called. Outputting messages saying it is doing that.
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.
ooh, so to be clear If no STELLAR_ACCOUNT is set and no default key exists, the source_account method should create and set a default key?
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.
That's what I meant in the original issue I think.
What
closes #2048
automatically creates and funds a key on testnet when none is provided for testnet.
Why
It Randomly generates a key and funds it meaning that devs getting started would have less setup to do.
Known limitations
Still have to supply the --wasm flag