-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add (local|testnet|mainnet) default networks (#1408)
Similar to how we support `--network futurenet` before you even set it. No need to make people go look it up on https://developers.stellar.org/docs/reference/networks This adds a dependency on [phf](https://crates.io/crates/phf) to construct a compile-time Map of named networks to named network settings. It also lists default networks with the `network ls [-l]` commands, and slightly updates (fixes, really) the behavior of `network ls`. Previously, if you had a local and global network named the same thing, `network ls` would show that name twice. Now it will only show them once. When you `network ls -l`, it will show all name collisions. $ cargo run -q -- network ls future futurenet local testnet mainnet $ cargo run -q -- network ls -l Local "/Users/chadoh/code/s/cli/.soroban/network/future.toml" Name: future Network { rpc_url: "https://rpc-futurenet.stellar.org:443", network_passphrase: "Test SDF Future Network ; October 2022", } Local "/Users/chadoh/code/s/cli/.soroban/network/futurenet.toml" Name: futurenet Network { rpc_url: "https://rpc-futurenet.stellar.org:443", network_passphrase: "Test SDF Future Network ; October 2022", } Global "/Users/chadoh/.config/soroban/network/future.toml" Name: future Network { rpc_url: "https://rpc-futurenet.stellar.org:443", network_passphrase: "Test SDF Future Network ; October 2022", } Global "/Users/chadoh/.config/soroban/network/local.toml" Name: local Network { rpc_url: "http://localhost:8000/rpc", network_passphrase: "Standalone Network ; February 2017", } Global "/Users/chadoh/.config/soroban/network/testnet.toml" Name: testnet Network { rpc_url: "https://soroban-testnet.stellar.org", network_passphrase: "Test SDF Network ; September 2015", } Default Name: local Network { rpc_url: "http://localhost:8000/rpc", network_passphrase: "Standalone Network ; February 2017", } Default Name: futurenet Network { rpc_url: "https://soroban-testnet.stellar.org", network_passphrase: "Test SDF Network ; September 2015", } Default Name: mainnet Network { rpc_url: "https://example.com/bring-your-own", network_passphrase: "Public Global Stellar Network ; September 2015", } Default Name: testnet Network { rpc_url: "https://rpc-futurenet.stellar.org:443", network_passphrase: "Test SDF Future Network ; October 2022", }
- Loading branch information
Showing
7 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters