From e41460d50004040295ec594c495f5c4069875850 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 15 May 2021 00:08:24 +0000 Subject: [PATCH] feat: update api urls (backport #17186) (#17248) * feat: update api urls (cherry picked from commit 0f3045fb6807ebaa794e6d72a7a5c7fb16275b83) * fix: cluster test (cherry picked from commit ae5a10dffd9d483ced16718e3203b50a6ef91dad) * docs: update old devnet and testnet url references (cherry picked from commit ec621e71dcdb3ef62dc3c4b1702b50f53276bc3b) * fix: update devnet and testnet urls (cherry picked from commit 7be3171f4aecf6a964fafbc22bb6f7b62f047ba9) Co-authored-by: Josh Hundley --- clap-utils/src/input_validators.rs | 4 ++-- cli-config/src/config.rs | 8 ++++---- .../current/cli/choose-a-cluster.md | 2 +- .../current/cli/transfer-tokens.md | 18 +++++++++--------- .../current/cluster/rpc-endpoints.md | 4 ++-- .../current/clusters.md | 8 ++++---- .../current/implemented-proposals/installer.md | 2 +- .../running-validator/validator-monitor.md | 8 ++++---- .../running-validator/validator-start.md | 4 ++-- docs/src/cli/choose-a-cluster.md | 2 +- docs/src/cli/transfer-tokens.md | 18 +++++++++--------- docs/src/implemented-proposals/installer.md | 2 +- .../src/running-validator/validator-monitor.md | 8 ++++---- docs/src/running-validator/validator-start.md | 4 ++-- install/src/defaults.rs | 2 +- scripts/solana-install-deploy.sh | 2 +- stake-accounts/src/arg_parser.rs | 2 +- .../offline_stake_operations.sh | 2 +- tokens/src/arg_parser.rs | 2 +- web3.js/src/util/cluster.js | 8 ++++---- web3.js/test/cluster.test.js | 12 ++++++++---- 21 files changed, 63 insertions(+), 59 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/i18n/zh/docusaurus-plugin-content-docs/current/cli/choose-a-cluster.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/choose-a-cluster.md index fb3f2d0a8c..98852508c3 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/choose-a-cluster.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/choose-a-cluster.md @@ -17,7 +17,7 @@ solana config get 例如,要指定 Devnet 集群,请运行: ```bash -solana config set --url https://devnet.solana.com +solana config set --url https://api.devnet.solana.com ``` ## 确保版本相匹配 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/transfer-tokens.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/transfer-tokens.md index 24147b5b1f..f027fcdcac 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/transfer-tokens.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/cli/transfer-tokens.md @@ -17,7 +17,7 @@ title: 发送和接收代币 首先,在测试网给您的钱包_空投_ 一些虚拟代币。 ```bash -solana airdrop 10 --url https://devnet.solana.com +solana airdrop 10 --url https://api.devnet.solana.com ``` 其中,用您的 base58-encoded 公钥/钱包地址替换此处的 ``文本。 @@ -27,7 +27,7 @@ solana airdrop 10 --url https://devnet.solana.com 通过检查帐户余额确认空投已经成功。 输出值应当为 `10 SOL`: ```bash -solana balance --url https://devnet.solana.com +solana balance --url https://api.devnet.solana.com ``` #### 创建第二个钱包地址 @@ -51,7 +51,7 @@ pubkey: GKvqsuNcnwWqPzzuhLmGi4rzzh55FhJtGizkhHaEJqiV 接下来,通过发送来证明你拥有空投代币。 Solana 集群只有在您用交易发送方公钥对应的私钥签名时,才会接受交易。 ```bash -solana transfer --from 5 --url https://devnet.solana.com --fee-payer +solana transfer --from 5 --url https://api.devnet.solana.com --fee-payer ``` 其中,用第一个钱包的秘钥对的路径替换 ``,用第二个钱包地址替换 ``。 @@ -59,7 +59,7 @@ solana transfer --from 5 --url https://dev 使用 `solana balance` 确认余额已经更新: ```bash -solana balance --url http://devnet.solana.com +solana balance --url http://api.devnet.solana.com ``` 其中 `` 是您密钥对的公钥或收件人的公钥。 @@ -78,11 +78,11 @@ pubkey: DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK # width enhance concert vacant ketchup eternal spy craft spy guard tag punch # 如果这是一个真实的钱包,不要将这次单词分享到网络上! ========================================================================== -$ solana airdrop 10 DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://devnet.solana.com # 空投 10 个 SOL 到我的钱包地址/公钥 +$ solana airdrop 10 DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com # 空投 10 个 SOL 到我的钱包地址/公钥 正在从 35.233.193.70:9900 请求 10 SOL 10 SOL -$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://devnet.solana.com # 检查钱包余额 +$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com # 检查钱包余额 10 SOL $ solana-keygen new --no-outfile # 创建第二个钱包即纸钱包 @@ -95,13 +95,13 @@ pubkey: 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv # 这是 clump panic cousin hurt coast charge engage fall eager urge win love # 如果这是一个真实的钱包,切记不要将这次单词分享到网络上! ==================================================================== -$ solana transfer --from my_solana_wallet.json 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv 5 --url https://devnet.solana.com --fee-payer my_solana_wallet.json # 发送代币到纸钱包的公钥地址 +$ solana transfer --from my_solana_wallet.json 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv 5 --url https://api.devnet.solana.com --fee-payer my_solana_wallet.json # 发送代币到纸钱包的公钥地址 3gmXvykAd1nCQQ7MjosaHLf69Xyaqyq1qw2eu1mgPyYXd5G4v1rihhg1CiRw35b9fHzcftGKKEu4mbUeXY2pEX2z # 该笔交易的签名 -$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://devnet.solana.com +$ solana balance DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK --url https://api.devnet.solana.com 4.999995 SOL # 由于需要 0.000005 SOL 的交易费用,发送金额要稍微小于 5 SOL -$ solana balance 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv --url https://devnet.solana.com +$ solana balance 7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv --url https://api.devnet.solana.com 5 SOL # 第二个钱包现在已经接收到第一个钱包发送的 5 SOL ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/cluster/rpc-endpoints.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/cluster/rpc-endpoints.md index c07f2f37a3..5d2dc2b758 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/cluster/rpc-endpoints.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/cluster/rpc-endpoints.md @@ -6,11 +6,11 @@ Solana 维护专用的 API 节点来完成 [JSON RPC](developing/clients/jsonrpc ## Devnet(开发者网络) -- `https://devnet.solana.com` - 单个 Solana 托管的 api 节点;限定频率 +- `https://api.devnet.solana.com` - 单个 Solana 托管的 api 节点;限定频率 ## Testnet(测试网) -- `https://testnet.solana.com` - 单个 Solana 托管的 api 节点;限定频率 +- `https://api.testnet.solana.com` - 单个 Solana 托管的 api 节点;限定频率 ## Mainnet Beta(主网 Beta) diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/clusters.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/clusters.md index 500164049a..05c7fcb894 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/clusters.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/clusters.md @@ -26,12 +26,12 @@ Solana维护着几个不同用途的集群。 ```bash export SOLANA_METRICS_CONFIG="host=https://metrics.solana.com:8086,db=devnet,u=scratch_writer,p=topsecret" ``` -- Devnet RPC URL:`https://devnet.solana.com` +- Devnet RPC URL:`https://api.devnet.solana.com` ##### 示例 `solana` 命令行配置 ```bash -solana config set --url https://devnet.solana.com +solana config set --url https://api.devnet.solana.com ``` ##### 示例 `solana-validator` 命令行 @@ -66,12 +66,12 @@ $ solana-validator \ ```bash export SOLANA_METRICS_CONFIG="host=https://metrics.solana.com:8086,db=tds,u=testnet_write,p=c4fa841aa918bf8274e3e2a44d77568d9861b3ea" ``` -- Testnet 的 RPC URL: `https://testnet.solana.com` +- Testnet 的 RPC URL: `https://api.testnet.solana.com` ##### 示例 `solana` 命令行配置 ```bash -solana config set --url https://testnet.solana.com +solana config set --url https://api.testnet.solana.com ``` ##### 示例 `solana-validator` 命令行 diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/implemented-proposals/installer.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/implemented-proposals/installer.md index e82f01f7e7..8dab0c416d 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/implemented-proposals/installer.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/implemented-proposals/installer.md @@ -156,7 +156,7 @@ FLAGS: OPTIONS: -d, --data_dir Directory to store install data [default: .../Library/Application Support/solana] - -u, --url JSON RPC URL for the solana cluster [default: http://devnet.solana.com] + -u, --url JSON RPC URL for the solana cluster [default: http://api.devnet.solana.com] -p, --pubkey Public key of the update manifest [default: 9XX329sPuskWhH4DQh6k16c87dHKhXLBZTL3Gxmve8Gp] ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-monitor.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-monitor.md index 7c45fbc102..99faedf9f8 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-monitor.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-monitor.md @@ -32,11 +32,11 @@ solana vote-account ~/vote-account-keypair.json ```bash #与solana-gossip相似,您应该在集群节点列表中看到您的验证节点 -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.devnet.solana.com # 如果您的验证节点进行了正确的投票,那么它应该出现在“当前”投票帐户列表中。 如果已经质押,那么`stake` 应当为 > 0 -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://api.devnet.solana.com # 返回当前的领导者安排表 -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://api.devnet.solana.com # 返回当前 epoch 的信息 slotIndex 应该在随后的调用中获得进展。 -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://api.devnet.solana.com ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-start.md b/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-start.md index 44c1beb16a..75da51c451 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-start.md +++ b/docs/i18n/zh/docusaurus-plugin-content-docs/current/running-validator/validator-start.md @@ -7,7 +7,7 @@ title: 启动验证程序 Solana cli包含`get`和`set`配置命令,可自动为cli命令设置`--url`参数。 例如: ```bash -solana config set --url http://devnet.solana.com +solana config set --url http://api.devnet.solana.com ``` 尽管本节演示了如何连接到Devnet群集,但其他的[Solana群集](../clusters.md)步骤与此类似。 @@ -166,7 +166,7 @@ solana config set --keypair ~/validator-keypair.json ```text Wallet Config Updated: /home/solana/.config/solana/wallet/config.yml -* url: http://devnet.solana.com +* url: http://api.devnet.solana.com * keypair: /home/solana/validator-keypair.json ``` 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 ``` diff --git a/docs/src/implemented-proposals/installer.md b/docs/src/implemented-proposals/installer.md index 436f594e21..12fb2742df 100644 --- a/docs/src/implemented-proposals/installer.md +++ b/docs/src/implemented-proposals/installer.md @@ -156,7 +156,7 @@ FLAGS: OPTIONS: -d, --data_dir Directory to store install data [default: .../Library/Application Support/solana] - -u, --url JSON RPC URL for the solana cluster [default: http://devnet.solana.com] + -u, --url JSON RPC URL for the solana cluster [default: http://api.devnet.solana.com] -p, --pubkey Public key of the update manifest [default: 9XX329sPuskWhH4DQh6k16c87dHKhXLBZTL3Gxmve8Gp] ``` diff --git a/docs/src/running-validator/validator-monitor.md b/docs/src/running-validator/validator-monitor.md index 879453c41a..85da6702aa 100644 --- a/docs/src/running-validator/validator-monitor.md +++ b/docs/src/running-validator/validator-monitor.md @@ -37,11 +37,11 @@ cluster, as well as the health of the cluster: ```bash # Similar to solana-gossip, you should see your validator in the list of cluster nodes -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.devnet.solana.com # If your validator is properly voting, it should appear in the list of `current` vote accounts. If staked, `stake` should be > 0 -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://api.devnet.solana.com # Returns the current leader schedule -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://api.devnet.solana.com # Returns info about the current epoch. slotIndex should progress on subsequent calls. -curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://devnet.solana.com +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://api.devnet.solana.com ``` diff --git a/docs/src/running-validator/validator-start.md b/docs/src/running-validator/validator-start.md index f5e3342604..f001dbfcd3 100644 --- a/docs/src/running-validator/validator-start.md +++ b/docs/src/running-validator/validator-start.md @@ -8,7 +8,7 @@ The solana cli includes `get` and `set` configuration commands to automatically set the `--url` argument for cli commands. For example: ```bash -solana config set --url http://devnet.solana.com +solana config set --url http://api.devnet.solana.com ``` While this section demonstrates how to connect to the Devnet cluster, the steps @@ -208,7 +208,7 @@ You should see the following output: ```text Wallet Config Updated: /home/solana/.config/solana/wallet/config.yml -* url: http://devnet.solana.com +* url: http://api.devnet.solana.com * keypair: /home/solana/validator-keypair.json ``` diff --git a/install/src/defaults.rs b/install/src/defaults.rs index f0d5e53f5b..78aa1bc720 100644 --- a/install/src/defaults.rs +++ b/install/src/defaults.rs @@ -1,4 +1,4 @@ -pub const JSON_RPC_URL: &str = "http://devnet.solana.com"; +pub const JSON_RPC_URL: &str = "http://api.devnet.solana.com"; lazy_static! { pub static ref CONFIG_FILE: Option = { diff --git a/scripts/solana-install-deploy.sh b/scripts/solana-install-deploy.sh index a0e103781f..ea77ca34bc 100755 --- a/scripts/solana-install-deploy.sh +++ b/scripts/solana-install-deploy.sh @@ -46,7 +46,7 @@ esac case $URL in stable) - URL=http://devnet.solana.com + URL=http://api.devnet.solana.com ;; localhost) URL=http://localhost:8899 diff --git a/stake-accounts/src/arg_parser.rs b/stake-accounts/src/arg_parser.rs index fc2f029b46..fefd2ab113 100644 --- a/stake-accounts/src/arg_parser.rs +++ b/stake-accounts/src/arg_parser.rs @@ -149,7 +149,7 @@ where .global(true) .takes_value(true) .value_name("URL") - .help("RPC entrypoint address. i.e. http://devnet.solana.com"), + .help("RPC entrypoint address. i.e. http://api.devnet.solana.com"), ) .subcommand( SubCommand::with_name("new") diff --git a/system-test/stake-operations-testcases/offline_stake_operations.sh b/system-test/stake-operations-testcases/offline_stake_operations.sh index 7635ee2eb4..513a168ab2 100755 --- a/system-test/stake-operations-testcases/offline_stake_operations.sh +++ b/system-test/stake-operations-testcases/offline_stake_operations.sh @@ -29,7 +29,7 @@ if [[ -n "$1" ]]; then fi if [[ -z "$url" ]]; then - echo Provide complete URL, ex: "$0" http://devnet.solana.com:8899 + echo Provide complete URL, ex: "$0" http://api.devnet.solana.com:8899 exit 1 fi solana config set --url $url diff --git a/tokens/src/arg_parser.rs b/tokens/src/arg_parser.rs index 5d6604d439..a63b30d115 100644 --- a/tokens/src/arg_parser.rs +++ b/tokens/src/arg_parser.rs @@ -37,7 +37,7 @@ where .global(true) .takes_value(true) .value_name("URL") - .help("RPC entrypoint address. i.e. http://devnet.solana.com"), + .help("RPC entrypoint address. i.e. http://api.devnet.solana.com"), ) .subcommand( SubCommand::with_name("distribute-tokens") diff --git a/web3.js/src/util/cluster.js b/web3.js/src/util/cluster.js index 2fe3a1157a..29e8b96aac 100644 --- a/web3.js/src/util/cluster.js +++ b/web3.js/src/util/cluster.js @@ -5,13 +5,13 @@ */ const endpoint = { http: { - devnet: 'http://devnet.solana.com', - testnet: 'http://testnet.solana.com', + devnet: 'http://api.devnet.solana.com', + testnet: 'http://api.testnet.solana.com', 'mainnet-beta': 'http://api.mainnet-beta.solana.com', }, https: { - devnet: 'https://devnet.solana.com', - testnet: 'https://testnet.solana.com', + devnet: 'https://api.devnet.solana.com', + testnet: 'https://api.testnet.solana.com', 'mainnet-beta': 'https://api.mainnet-beta.solana.com', }, }; diff --git a/web3.js/test/cluster.test.js b/web3.js/test/cluster.test.js index 2b58424262..f8f896b307 100644 --- a/web3.js/test/cluster.test.js +++ b/web3.js/test/cluster.test.js @@ -13,9 +13,13 @@ describe('Cluster Util', () => { }); it('devnet', () => { - expect(clusterApiUrl()).to.eq('https://devnet.solana.com'); - expect(clusterApiUrl('devnet')).to.eq('https://devnet.solana.com'); - expect(clusterApiUrl('devnet', true)).to.eq('https://devnet.solana.com'); - expect(clusterApiUrl('devnet', false)).to.eq('http://devnet.solana.com'); + expect(clusterApiUrl()).to.eq('https://api.devnet.solana.com'); + expect(clusterApiUrl('devnet')).to.eq('https://api.devnet.solana.com'); + expect(clusterApiUrl('devnet', true)).to.eq( + 'https://api.devnet.solana.com', + ); + expect(clusterApiUrl('devnet', false)).to.eq( + 'http://api.devnet.solana.com', + ); }); });