From ec621e71dcdb3ef62dc3c4b1702b50f53276bc3b Mon Sep 17 00:00:00 2001 From: Josh Hundley Date: Wed, 12 May 2021 09:09:13 -0700 Subject: [PATCH] docs: update old devnet and testnet url references --- clap-utils/src/input_validators.rs | 4 ++-- cli-config/src/config.rs | 8 ++++---- docs/src/cli/choose-a-cluster.md | 2 +- docs/src/cli/transfer-tokens.md | 18 +++++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/clap-utils/src/input_validators.rs b/clap-utils/src/input_validators.rs index 33f2eeb51d..bb9fad1722 100644 --- a/clap-utils/src/input_validators.rs +++ b/clap-utils/src/input_validators.rs @@ -215,8 +215,8 @@ where pub fn normalize_to_url_if_moniker>(url_or_moniker: T) -> String { match url_or_moniker.as_ref() { "m" | "mainnet-beta" => "https://api.mainnet-beta.solana.com", - "t" | "testnet" => "https://testnet.solana.com", - "d" | "devnet" => "https://devnet.solana.com", + "t" | "testnet" => "https://api.testnet.solana.com", + "d" | "devnet" => "https://api.devnet.solana.com", "l" | "localhost" => "http://localhost:8899", url => url, } diff --git a/cli-config/src/config.rs b/cli-config/src/config.rs index ce7d02629f..f98af53f4a 100644 --- a/cli-config/src/config.rs +++ b/cli-config/src/config.rs @@ -107,13 +107,13 @@ mod test { #[test] fn compute_websocket_url() { assert_eq!( - Config::compute_websocket_url(&"http://devnet.solana.com"), - "ws://devnet.solana.com/".to_string() + Config::compute_websocket_url(&"http://api.devnet.solana.com"), + "ws://api.devnet.solana.com/".to_string() ); assert_eq!( - Config::compute_websocket_url(&"https://devnet.solana.com"), - "wss://devnet.solana.com/".to_string() + Config::compute_websocket_url(&"https://api.devnet.solana.com"), + "wss://api.devnet.solana.com/".to_string() ); assert_eq!( diff --git a/docs/src/cli/choose-a-cluster.md b/docs/src/cli/choose-a-cluster.md index a2bc4cb2b4..cf10c1f190 100644 --- a/docs/src/cli/choose-a-cluster.md +++ b/docs/src/cli/choose-a-cluster.md @@ -21,7 +21,7 @@ cluster. For example to target the Devnet cluster, run: ```bash -solana config set --url https://devnet.solana.com +solana config set --url https://api.devnet.solana.com ``` ## Ensure Versions Match diff --git a/docs/src/cli/transfer-tokens.md b/docs/src/cli/transfer-tokens.md index 9e899cd7b0..1d80977da7 100644 --- a/docs/src/cli/transfer-tokens.md +++ b/docs/src/cli/transfer-tokens.md @@ -27,7 +27,7 @@ on devnet have **no** value, so don't worry if you lose them. First, _airdrop_ yourself some play tokens on the devnet. ```bash -solana airdrop 1 --url https://devnet.solana.com +solana airdrop 1 --url https://api.devnet.solana.com ``` where you replace the text `` with your base58-encoded @@ -39,7 +39,7 @@ Confirm the airdrop was successful by checking the account's balance. It should output `1 SOL`: ```bash -solana balance --url https://devnet.solana.com +solana balance --url https://api.devnet.solana.com ``` #### Create a second wallet address @@ -71,7 +71,7 @@ with the private keypair corresponding to the sender's public key in the transaction. ```bash -solana transfer --from 0.5 --allow-unfunded-recipient --url https://devnet.solana.com --fee-payer +solana transfer --from 0.5 --allow-unfunded-recipient --url https://api.devnet.solana.com --fee-payer ``` where you replace `` with the path to a keypair in your first wallet, @@ -81,7 +81,7 @@ wallet. Confirm the updated balances with `solana balance`: ```bash -solana balance --url http://devnet.solana.com +solana balance --url http://api.devnet.solana.com ``` where `` is either the public key from your keypair or the @@ -101,11 +101,11 @@ Save this seed phrase to recover your new keypair: width enhance concert vacant ketchup eternal spy craft spy guard tag punch # If this was a real wallet, never share these words on the internet like this! ========================================================================== -$ solana airdrop 1 DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://devnet.solana.com # Airdropping 1 SOL to my wallet's address/pubkey +$ solana airdrop 1 DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com # Airdropping 1 SOL to my wallet's address/pubkey Requesting airdrop of 1 SOL from 35.233.193.70:9900 1 SOL -$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://devnet.solana.com # Check the address's balance +$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com # Check the address's balance 1 SOL $ solana-keygen new --no-outfile # Creating a second wallet, a paper wallet @@ -118,13 +118,13 @@ Save this seed phrase to recover your new keypair: clump panic cousin hurt coast charge engage fall eager urge win love # If this was a real wallet, never share these words on the internet like this! ==================================================================== -$ solana transfer --from my_solana_wallet.json 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv 0.5 --allow-unfunded-recipient --url https://devnet.solana.com --fee-payer my_solana_wallet.json # Transferring tokens to the public address of the paper wallet +$ solana transfer --from my_solana_wallet.json 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv 0.5 --allow-unfunded-recipient --url https://api.devnet.solana.com --fee-payer my_solana_wallet.json # Transferring tokens to the public address of the paper wallet 3gmXvykAd1nCQQ7MjosaHLf69Xyaqyq1qw2eu1mgPyYXd5G4v1rihhg1CiRw35b9fHzcftGKKEu4mbUeXY2pEX2z # This is the transaction signature -$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://devnet.solana.com +$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com 0.499995 SOL # The sending account has slightly less than 0.5 SOL remaining due to the 0.000005 SOL transaction fee payment -$ solana balance 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv --url https://devnet.solana.com +$ solana balance 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv --url https://api.devnet.solana.com 0.5 SOL # The second wallet has now received the 0.5 SOL transfer from the first wallet ```