From 385e36aa3fe1c3bf920b43d1e9f5b3226a9e5e71 Mon Sep 17 00:00:00 2001
From: vivekjain23 <165671934+vivekjain23@users.noreply.github.com>
Date: Mon, 23 Dec 2024 17:15:57 +0530
Subject: [PATCH] fix(docs): use constants file for urls everywhere in docs
(#4443)
* Update all relevant files to use the constant file URLs
---
docs/content/_snippets/iota-evm/oracles_contract_data.mdx | 8 ++++----
docs/content/developer/advanced/custom-indexer.mdx | 8 +++++---
docs/content/developer/getting-started/get-coins.mdx | 3 ++-
docs/content/operator/iota-full-node/source.mdx | 5 +++--
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/docs/content/_snippets/iota-evm/oracles_contract_data.mdx b/docs/content/_snippets/iota-evm/oracles_contract_data.mdx
index dd533a6e252..ff1130652be 100644
--- a/docs/content/_snippets/iota-evm/oracles_contract_data.mdx
+++ b/docs/content/_snippets/iota-evm/oracles_contract_data.mdx
@@ -16,10 +16,10 @@ import { Networks } from '@site/src/components/constant';
| Contract Type | Contract Address |
|:----------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
-| Pyth contract | [https://explorer.evm.shimmer.network/address/0x290f23E4a034Db5237edCb5aA2D94Acb4DD19fD2](https://explorer.evm.shimmer.network/address/0x290f23E4a034Db5237edCb5aA2D94Acb4DD19fD2) |
-| Supra Pull Contract | [https://explorer.evm.shimmer.network/address/0xe41444462709484272F54371F3f53bBF900Ec49E](https://explorer.evm.shimmer.network/address/0xe41444462709484272F54371F3f53bBF900Ec49E) |
-| Supra Storage Contract | [https://explorer.evm.shimmer.network/address/0x3E5E89d14576cE9f20a8347aA682517fe65B4ACB](https://explorer.evm.shimmer.network/address/0x3E5E89d14576cE9f20a8347aA682517fe65B4ACB) |
-| Supra Push Contract | [https://explorer.evm.shimmer.network/address/0x3df842b27c997cEc63160E79CB4398c82645A1c3](https://explorer.evm.shimmer.network/address/0x3df842b27c997cEc63160E79CB4398c82645A1c3) |
+| Pyth contract | [<>{Networks.shimmer.evm.blockExplorerUrls}>/address/0x290f23E4a034Db5237edCb5aA2D94Acb4DD19fD2](https://explorer.evm.shimmer.network/address/0x290f23E4a034Db5237edCb5aA2D94Acb4DD19fD2) |
+| Supra Pull Contract | [<>{Networks.shimmer.evm.blockExplorerUrls}>/address/0xe41444462709484272F54371F3f53bBF900Ec49E](https://explorer.evm.shimmer.network/address/0xe41444462709484272F54371F3f53bBF900Ec49E) |
+| Supra Storage Contract | [<>{Networks.shimmer.evm.blockExplorerUrls}>/address/0x3E5E89d14576cE9f20a8347aA682517fe65B4ACB](https://explorer.evm.shimmer.network/address/0x3E5E89d14576cE9f20a8347aA682517fe65B4ACB) |
+| Supra Push Contract | [<>{Networks.shimmer.evm.blockExplorerUrls}>/address/0x3df842b27c997cEc63160E79CB4398c82645A1c3](https://explorer.evm.shimmer.network/address/0x3df842b27c997cEc63160E79CB4398c82645A1c3) |
diff --git a/docs/content/developer/advanced/custom-indexer.mdx b/docs/content/developer/advanced/custom-indexer.mdx
index 8dc697fd66f..e3605e52a6b 100644
--- a/docs/content/developer/advanced/custom-indexer.mdx
+++ b/docs/content/developer/advanced/custom-indexer.mdx
@@ -5,6 +5,8 @@ description: You can build custom indexers using the IOTA micro-data ingestion f
import Quiz from '@site/src/components/Quiz';
import questions from '/json/developer/advanced-topics/custom-indexer.json';
+import {Networks} from '@site/src/components/constant'
+import CodeBlock from '@theme/CodeBlock';
You can build custom indexers using the IOTA micro-data ingestion framework. To create an indexer, you subscribe to a checkpoint stream with full checkpoint content. This stream can be one of the publicly available streams from IOTA, one that you set up in your local environment, or a combination of the two.
@@ -31,10 +33,10 @@ Data ingestion for your indexer supports several checkpoint stream sources.
The most straightforward stream source is to subscribe to a remote store of checkpoint contents. IOTA provides the following buckets:
-- Testnet: `https://indexer.testnet.iota.cafe`
-- Devnet: `https://indexer.devnet.iota.cafe`
+- Testnet: {Networks.iota_move_testnet.indexerRpc}
+- Devnet: {Networks.iota_move_devnet.indexerRpc}
-The checkpoint files are stored in the following format: `https://indexer.testnet.iota.cafe/.chk`. You can download the checkpoint file by sending an HTTP GET request to the relevant URL. Try it yourself for checkpoint 1 at [https://indexer.testnet.iota.cafe/1.chk](https://indexer.testnet.iota.cafe/1.chk).
+The checkpoint files are stored in the following format: {Networks.iota_move_testnet.indexerRpc+`/.chk`}
. You can download the checkpoint file by sending an HTTP GET request to the relevant URL. Try it yourself for checkpoint 1 at [{Networks.iota_move_testnet.indexerRpc}/1.chk](https://indexer.testnet.iota.cafe/1.chk).
```mermaid
flowchart LR
diff --git a/docs/content/developer/getting-started/get-coins.mdx b/docs/content/developer/getting-started/get-coins.mdx
index 0cc7704f423..ea87dc69d25 100644
--- a/docs/content/developer/getting-started/get-coins.mdx
+++ b/docs/content/developer/getting-started/get-coins.mdx
@@ -4,6 +4,7 @@ tags: [how-to, cli, typescript, sdk, faucet]
---
import Quiz from '@site/src/components/Quiz';
import questions from '/json/developer/getting-started/get-coins.json';
+import {Networks} from '@site/src/components/constant'
# Get Test Tokens
@@ -36,7 +37,7 @@ curl --location --request POST 'https://faucet.testnet.iota.cafe/gas' \
:::tip Test tokens on a local network
-If you're working with a local network, replace `'https://faucet.devnet.iota.cafe/gas'` with the appropriate value based on which package runs your network:
+If you're working with a local network, replace {Networks.iota_move_devnet.faucetUrl}
with the appropriate value based on which package runs your network:
- `iota-faucet`: `http://127.0.0.1:5003/gas`
- `iota start`: `http://127.0.0.1:9123/gas`
diff --git a/docs/content/operator/iota-full-node/source.mdx b/docs/content/operator/iota-full-node/source.mdx
index fc8f03947a2..6bb6e1f14ea 100644
--- a/docs/content/operator/iota-full-node/source.mdx
+++ b/docs/content/operator/iota-full-node/source.mdx
@@ -6,6 +6,7 @@ import Quiz from '@site/src/components/Quiz';
import questions from '/json/node-operators/iota-full-node/node-setup.json';
import WarningAdvanced from './../../_snippets/warning-advanced-instructions-node-setup.mdx'
import NodeHardwareRequirements from './../../_snippets/node-hardware-requirements.mdx'
+import {Networks} from '@site/src/components/constant'
@@ -150,7 +151,7 @@ At this point, your IOTA Full node is ready to connect to the IOTA network.
If your setup is successful, your IOTA Full node is now connected to the appropriate network.
-Your Full node serves the read endpoints of the IOTA JSON-RPC API at: `http://127.0.0.1:9000`.
+Your Full node serves the read endpoints of the IOTA JSON-RPC API at: {Networks.iota_localnet.jsonRpcUrl}
.
## Troubleshooting
@@ -216,7 +217,7 @@ Use the following steps to update your Full node:
./target/release/iota-node --config-path fullnode.yaml
```
-Your Full node restarts on: http://127.0.0.1:9000.
+Your Full node restarts on: {Networks.iota_localnet.jsonRpcUrl}
.
:::info