Skip to content

Commit 6bbcb57

Browse files
nits
1 parent 220ebc1 commit 6bbcb57

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ interface DockerComposeConfig {
5959
blockchainId: string;
6060
networkName: string;
6161
networkShortName: string;
62-
currencyName: string;
63-
currencySymbol: string;
62+
tokenName: string;
63+
tokenSymbol: string;
6464
}
6565

6666
const genDockerCompose = (config: DockerComposeConfig) => `
@@ -150,8 +150,8 @@ services:
150150
NEXT_PUBLIC_NETWORK_SHORT_NAME: ${config.networkShortName}
151151
NEXT_PUBLIC_NETWORK_ID: 66666 # TODO: change to dynamic
152152
NEXT_PUBLIC_NETWORK_RPC_URL: https://${config.domain}/ext/bc/${config.blockchainId}/rpc
153-
NEXT_PUBLIC_NETWORK_CURRENCY_NAME: ${config.currencyName}
154-
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ${config.currencySymbol}
153+
NEXT_PUBLIC_NETWORK_CURRENCY_NAME: ${config.tokenName}
154+
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ${config.tokenSymbol}
155155
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18
156156
NEXT_PUBLIC_APP_HOST: ${config.domain}
157157
NEXT_PUBLIC_APP_PROTOCOL: https
@@ -212,8 +212,8 @@ export default function BlockScout() {
212212
const [domain, setDomain] = useState("");
213213
const [networkName, setNetworkName] = useState("");
214214
const [networkShortName, setNetworkShortName] = useState("");
215-
const [currencyName, setCurrencyName] = useState("");
216-
const [currencySymbol, setCurrencySymbol] = useState("");
215+
const [tokenName, setTokenName] = useState("");
216+
const [tokenSymbol, setTokenSymbol] = useState("");
217217
const [subnetIdError, setSubnetIdError] = useState<string | null>(null);
218218
const [composeYaml, setComposeYaml] = useState("");
219219
const [caddyfile, setCaddyfile] = useState("");
@@ -230,8 +230,8 @@ export default function BlockScout() {
230230
if (l1Info) {
231231
setNetworkName(l1Info.name);
232232
setNetworkShortName(l1Info.name.split(" ")[0]); // First word as short name
233-
setCurrencyName(l1Info.coinName);
234-
setCurrencySymbol(l1Info.coinName);
233+
setTokenName(l1Info.coinName);
234+
setTokenSymbol(l1Info.coinName);
235235
}
236236

237237
getBlockchainInfo(chainId).then((chainInfo) => {
@@ -250,7 +250,7 @@ export default function BlockScout() {
250250
}, [domain]);
251251

252252
useEffect(() => {
253-
let ready = !!domain && !!subnetId && !!networkName && !!networkShortName && !!currencyName && !!currencySymbol && !domainError && !subnetIdError
253+
let ready = !!domain && !!subnetId && !!networkName && !!networkShortName && !!tokenName && !!tokenSymbol && !domainError && !subnetIdError
254254

255255
if (ready) {
256256
setCaddyfile(genCaddyfile(domain));
@@ -260,25 +260,25 @@ export default function BlockScout() {
260260
blockchainId: chainId,
261261
networkName,
262262
networkShortName,
263-
currencyName,
264-
currencySymbol
263+
tokenName,
264+
tokenSymbol
265265
}));
266266
} else {
267267
setCaddyfile("");
268268
setComposeYaml("");
269269
}
270-
}, [domain, subnetId, chainId, networkName, networkShortName, currencyName, currencySymbol, domainError, subnetIdError]);
270+
}, [domain, subnetId, chainId, networkName, networkShortName, tokenName, tokenSymbol, domainError, subnetIdError]);
271271

272272
return (
273273
<>
274274
<Container
275-
title="Node Setup with Docker"
276-
description="This will start a Docker container running an RPC or validator node that tracks your L1."
275+
title="Self-hosted Explorer Setup"
276+
description="This will set up a self-hosted explorer with its own RPC Node leveraging Docker Compose."
277277
>
278278
<Steps>
279279
<Step>
280280
<h3 className="text-xl font-bold mb-4">Set up Instance</h3>
281-
<p>Set up a linux server with any cloud provider, like AWS, GCP, Azure, or Digital Ocean. 4 vCPUs, 8GB RAM, 40GB storage is enough to get you started.</p>
281+
<p>Set up a linux server with any cloud provider, like AWS, GCP, Azure, or Digital Ocean. 4 vCPUs, 8GB RAM, 40GB storage is enough to get you started. Choose more storage if the the Explorer is for a long-running testnet or mainnet L1.</p>
282282
</Step>
283283
<Step>
284284
<h3 className="text-xl font-bold mb-4">Docker Installation</h3>
@@ -348,17 +348,17 @@ export default function BlockScout() {
348348
/>
349349

350350
<Input
351-
label="Currency Name"
352-
value={currencyName}
353-
onChange={setCurrencyName}
354-
helperText="Name of your native currency (e.g. MyToken)"
351+
label="Token Name"
352+
value={tokenName}
353+
onChange={setTokenName}
354+
helperText="Name of your native token (e.g. MyToken)"
355355
/>
356356

357357
<Input
358-
label="Currency Symbol"
359-
value={currencySymbol}
360-
onChange={setCurrencySymbol}
361-
helperText="Symbol of your native currency (e.g. MTK)"
358+
label="Token Symbol"
359+
value={tokenSymbol}
360+
onChange={setTokenSymbol}
361+
helperText="Symbol of your native token (e.g. MTK)"
362362
/>
363363
</div>
364364
</Step>
@@ -367,17 +367,17 @@ export default function BlockScout() {
367367
{composeYaml && (<>
368368
<Step>
369369
<h3 className="text-xl font-bold mb-4">Caddyfile</h3>
370-
<p>Put this in a file called <code>Caddyfile</code> in the working directory. <code>compose.yml</code> will be created in the same directory.</p>
370+
<p>Create a file named <code>Caddyfile</code> and paste the following code:</p>
371371
<DynamicCodeBlock lang="yaml" code={caddyfile} />
372372
</Step>
373373
<Step>
374374
<h3 className="text-xl font-bold mb-4">Docker Compose</h3>
375-
<p>Put this in a file called <code>compose.yml</code> in the same directory as your <code>Caddyfile</code>.</p>
375+
<p>Create a file named <code>compose.yml</code> in the same directory as your <code>Caddyfile</code> and paste the following code:</p>
376376
<DynamicCodeBlock lang="yaml" code={composeYaml} />
377377
</Step>
378378

379379
<Step>
380-
<h3 className="text-xl font-bold mb-4">Start Your Node</h3>
380+
<h3 className="text-xl font-bold mb-4">Start Your Explorer</h3>
381381
<p>Navigate to the directory containing your <code>Caddyfile</code> and <code>compose.yml</code> files and run these commands:</p>
382382

383383
<div className="space-y-4">

toolbox/src/toolbox/ToolboxApp.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ const componentGroups: Record<string, ComponentGroupType> = {
5555
component: lazy(() => import('./L1/ConvertToL1')),
5656
fileNames: ["toolbox/src/toolbox/L1/ConvertToL1.tsx"],
5757
walletMode: "c-chain"
58+
},
59+
{
60+
id: "selfHostedExplorer",
61+
label: "Self-Hosted Explorer",
62+
component: lazy(() => import('./Nodes/SelfHostedExplorer')),
63+
fileNames: ["toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx"],
64+
walletMode: "testnet-mainnet",
5865
}
5966
]
6067
},
@@ -372,13 +379,6 @@ const componentGroups: Record<string, ComponentGroupType> = {
372379
component: lazy(() => import('./Nodes/PerformanceMonitor')),
373380
fileNames: ["toolbox/src/toolbox/Nodes/PerformanceMonitor.tsx"],
374381
walletMode: "optional",
375-
},
376-
{
377-
id: "selfHostedExplorer",
378-
label: "Self-Hosted Explorer",
379-
component: lazy(() => import('./Nodes/SelfHostedExplorer')),
380-
fileNames: ["toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx"],
381-
walletMode: "testnet-mainnet",
382382
}
383383
]
384384
},

0 commit comments

Comments
 (0)