Skip to content

Commit a6855de

Browse files
committed
feat: update iExec Explorer links to use dynamic URL based on selected chain
1 parent 6c5c6a3 commit a6855de

File tree

5 files changed

+62
-13
lines changed

5 files changed

+62
-13
lines changed

src/get-started/tooling-and-explorers/iexec-explorer.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ explore apps and protectedData—all in one powerful dashboard.
1414
<ImageViewer
1515
:image-url-dark="explorerGlobalImage"
1616
image-alt="iExec Explorer"
17-
link-url="https://explorer.iex.ec/"
17+
:link-url="explorerUrl"
1818
caption="🔗 Explore the iExec Protocol"
1919
/>
2020

@@ -79,7 +79,7 @@ Explorer displays data for the network you choose.
7979
<ImageViewer
8080
:image-url-dark="dealViewImage"
8181
image-alt="Deal View"
82-
link-url="https://explorer.iex.ec/arbitrum-mainnet/deals"
82+
:link-url="`${explorerUrl}/deals`"
8383
caption="🔗 Explore Deals"
8484
/>
8585

@@ -105,7 +105,7 @@ Explorer displays data for the network you choose.
105105
<ImageViewer
106106
:image-url-dark="taskViewImage"
107107
image-alt="Task View"
108-
link-url="https://explorer.iex.ec/arbitrum-mainnet/tasks"
108+
:link-url="`${explorerUrl}/tasks`"
109109
caption="🔗 Explore Tasks"
110110
/>
111111

@@ -121,14 +121,14 @@ Browse and analyze all tasks across the iExec network:
121121
<ImageViewer
122122
:image-url-dark="taskDetailsStartedImage"
123123
image-alt="Result Decryption"
124-
link-url="https://explorer.iex.ec/arbitrum-mainnet/tasks"
124+
:link-url="`${explorerUrl}/tasks`"
125125
caption="🔗 Explore Tasks"
126126
/>
127127

128128
<ImageViewer
129129
:image-url-dark="taskDetailsCompletedImage"
130130
image-alt="Task Completed"
131-
link-url="https://explorer.iex.ec/arbitrum-mainnet/tasks"
131+
:link-url="`${explorerUrl}/tasks`"
132132
caption="🔗 Explore Tasks"
133133
/>
134134

@@ -157,7 +157,7 @@ Browse and analyze all tasks across the iExec network:
157157
<ImageViewer
158158
:image-url-dark="appViewImage"
159159
image-alt="App View"
160-
link-url="https://explorer.iex.ec/arbitrum-mainnet/apps"
160+
:link-url="`${explorerUrl}/apps`"
161161
caption="🔗 Explore iApp Marketplace"
162162
/>
163163

@@ -172,7 +172,7 @@ Explore the iExec application marketplace:
172172
<ImageViewer
173173
:image-url-dark="datasetViewImage"
174174
image-alt="Dataset View"
175-
link-url="https://explorer.iex.ec/arbitrum-mainnet/datasets"
175+
:link-url="`${explorerUrl}/datasets`"
176176
caption="🔗 Explore Protected Datasets"
177177
/>
178178

@@ -189,7 +189,7 @@ Navigate the protected data landscape:
189189
<ImageViewer
190190
:image-url-dark="workerpoolViewImage"
191191
image-alt="Workerpool View"
192-
link-url="https://explorer.iex.ec/arbitrum-mainnet/workerpools"
192+
:link-url="`${explorerUrl}/workerpools`"
193193
caption="🔗 Explore Workerpools Infrastructure"
194194
/>
195195

@@ -202,9 +202,19 @@ Explore the decentralized computing infrastructure:
202202
- **Usage Statistics**: Analyze workerpool utilization
203203

204204
<script setup>
205+
import { computed } from 'vue';
205206
import ImageViewer from '@/components/ImageViewer.vue';
206207
import FeatureCard from '@/components/FeatureCard.vue';
207208
import CardGrid from '@/components/CardGrid.vue';
209+
import useUserStore from '@/stores/useUser.store';
210+
import {getChainById} from '@/utils/chain.utils';
211+
212+
// Get current chain and compute explorer info
213+
const userStore = useUserStore();
214+
const selectedChain = computed(() => userStore.getCurrentChainId());
215+
216+
const chainData = computed(() => getChainById(selectedChain.value));
217+
const explorerUrl = computed(() => chainData.value.iexecExplorerUrl);
208218

209219
// Assets
210220
import explorerGlobalImage from '@/assets/tooling-&-explorers/iexec-explorer/explorer-global.png';

src/references/dataProtector/dataProtectorCore/processProtectedData.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ const processProtectedDataResponse =
208208

209209
Do not use this to provide any sensitive information to the application. All
210210
arguments passed this way are visible in plain text using the
211-
[iExec blockchain explorer](https://explorer.iex.ec).
211+
<a :href="explorerUrl" target="_blank" rel="noopener">iExec blockchain
212+
explorer</a> .
212213

213214
:::
214215

@@ -451,7 +452,9 @@ import { type ProcessProtectedDataResponse } from '@iexec/dataprotector';
451452
`string`
452453

453454
The ID of the transaction that happened on iExec's side chain. You may view
454-
details on the transaction using the [iExec explorer](https://explorer.iex.ec).
455+
details on the transaction using the
456+
<a :href="explorerUrl" target="_blank" rel="noopener">iExec blockchain
457+
explorer</a> .
455458

456459
### dealId
457460

@@ -465,7 +468,8 @@ Identifies the specific deal associated with this transaction.
465468

466469
A unique identifier associated with a task currently running on the iExec
467470
protocol. You can monitor task execution using the
468-
[iExec blockchain explorer](https://explorer.iex.ec/arbitrum-mainnet).
471+
<a :href="explorerUrl" target="_blank" rel="noopener">iExec blockchain
472+
explorer</a> .
469473

470474
::: tip
471475

@@ -498,7 +502,17 @@ processed during the task.
498502
:::
499503

500504
<script setup>
505+
import { computed } from 'vue';
501506
import RequiredBadge from '@/components/RequiredBadge.vue'
502507
import OptionalBadge from '@/components/OptionalBadge.vue'
503508
import ChainNotSupportedBadge from '@/components/ChainNotSupportedBadge.vue'
509+
import useUserStore from '@/stores/useUser.store';
510+
import {getChainById} from '@/utils/chain.utils';
511+
512+
// Get current chain and compute explorer info
513+
const userStore = useUserStore();
514+
const selectedChain = computed(() => userStore.getCurrentChainId());
515+
516+
const chainData = computed(() => getChainById(selectedChain.value));
517+
const explorerUrl = computed(() => chainData.value.iexecExplorerUrl);
504518
</script>

src/references/web3mail/methods/sendEmail.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ import { type SendEmailResponse } from '@iexec/web3mail';
321321

322322
This uniquely identifies the email task on the iExec side chain. You can view
323323
the status of the `sendEmail` method by monitoring the task on the
324-
[iExec Explorer](https://explorer.iex.ec/arbitrum-mainnet).
324+
<a :href="explorerUrl" target="_blank" rel="noopener">iExec blockchain
325+
explorer</a> .
325326

326327
## Error Handling
327328

@@ -392,7 +393,17 @@ For any other errors, you'll get a `WorkflowError` error in the form of:
392393
```
393394

394395
<script setup>
396+
import { computed } from 'vue';
395397
import RequiredBadge from '@/components/RequiredBadge.vue'
396398
import OptionalBadge from '@/components/OptionalBadge.vue'
397399
import ChainNotSupportedBadge from '@/components/ChainNotSupportedBadge.vue'
400+
import useUserStore from '@/stores/useUser.store';
401+
import {getChainById} from '@/utils/chain.utils';
402+
403+
// Get current chain and compute explorer info
404+
const userStore = useUserStore();
405+
const selectedChain = computed(() => userStore.getCurrentChainId());
406+
407+
const chainData = computed(() => getChainById(selectedChain.value));
408+
const explorerUrl = computed(() => chainData.value.iexecExplorerUrl);
398409
</script>

src/references/web3telegram/methods/sendTelegram.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,20 @@ import { type SendTelegramResponse } from '@iexec/web3telegram';
292292

293293
This uniquely identifies the telegram task on the iExec side chain. You can view
294294
the status of the `sendTelegram` method by monitoring the task on the
295-
[iExec Explorer](https://explorer.iex.ec/arbitrum-mainnet).
295+
<a :href="explorerUrl" target="_blank" rel="noopener">iExec blockchain
296+
explorer</a> .
296297

297298
<script setup>
299+
import { computed } from 'vue';
298300
import OptionalBadge from '@/components/OptionalBadge.vue'
299301
import ChainNotSupportedBadge from '@/components/ChainNotSupportedBadge.vue'
302+
import useUserStore from '@/stores/useUser.store';
303+
import {getChainById} from '@/utils/chain.utils';
304+
305+
// Get current chain and compute explorer info
306+
const userStore = useUserStore();
307+
const selectedChain = computed(() => userStore.getCurrentChainId());
308+
309+
const chainData = computed(() => getChainById(selectedChain.value));
310+
const explorerUrl = computed(() => chainData.value.iexecExplorerUrl);
300311
</script>

src/utils/chain.utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface Chain {
2323
url: string;
2424
};
2525
};
26+
iexecExplorerUrl: string;
2627
}
2728

2829
export function getSupportedChains(): Chain[] {
@@ -34,6 +35,7 @@ export function getSupportedChains(): Chain[] {
3435
nativeCurrency: arbitrum.nativeCurrency,
3536
rpcUrls: arbitrum.rpcUrls,
3637
blockExplorers: arbitrum.blockExplorers,
38+
iexecExplorerUrl: 'https://explorer.iex.ec/arbitrum-mainnet',
3739
},
3840
{
3941
id: Number(bellecour.id),
@@ -49,6 +51,7 @@ export function getSupportedChains(): Chain[] {
4951
'https://blockscout-bellecour.iex.ec',
5052
},
5153
},
54+
iexecExplorerUrl: 'https://explorer.iex.ec/bellecour',
5255
},
5356
];
5457
}

0 commit comments

Comments
 (0)