From 42b74ab2b2e72e4a0228df67a21bbb79d9e87ccf Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Fri, 30 May 2025 05:13:14 +0000 Subject: [PATCH 01/12] pruning --- .../src/toolbox/Nodes/AvalanchegoDocker.tsx | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx b/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx index ce9a76a1820..50e641bc480 100644 --- a/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx +++ b/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx @@ -21,8 +21,9 @@ import { RadioGroup } from "../../components/RadioGroup"; import { Success } from "../../components/Success"; -const debugConfigBase64 = (chainId: string) => { - const debugConfig = { +const nodeConfigBase64 = (chainId: string, debugEnabled: boolean, pruningEnabled: boolean) => { + const vmConfig = debugEnabled ? { + "pruning-enabled": pruningEnabled, "log-level": "debug", "warp-api-enabled": true, "eth-apis": [ @@ -42,13 +43,15 @@ const debugConfigBase64 = (chainId: string) => { "debug-file-tracer", "debug-handler" ] + } : { + "pruning-enabled": pruningEnabled, } // First encode the inner config object - const debugConfigEncoded = btoa(JSON.stringify(debugConfig)); + const vmConfigEncoded = btoa(JSON.stringify(vmConfig)); const configMap: Record = {} - configMap[chainId] = { Config: debugConfigEncoded, Upgrade: null } + configMap[chainId] = { Config: vmConfigEncoded, Upgrade: null } console.log('configMap', configMap); @@ -56,7 +59,7 @@ const debugConfigBase64 = (chainId: string) => { } -const generateDockerCommand = (subnets: string[], isRPC: boolean, networkID: number, debugChainId?: string) => { +const generateDockerCommand = (subnets: string[], isRPC: boolean, networkID: number, chainId: string, debugEnabled: boolean = false, pruningEnabled: boolean = false) => { const env: Record = { AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK: "true", AVAGO_PUBLIC_IP_RESOLUTION_SERVICE: "opendns", @@ -80,9 +83,7 @@ const generateDockerCommand = (subnets: string[], isRPC: boolean, networkID: num env.AVAGO_HTTP_ALLOWED_HOSTS = "\"*\""; } - if (debugChainId) { - env.AVAGO_CHAIN_CONFIG_CONTENT = debugConfigBase64(debugChainId); - } + env.AVAGO_CHAIN_CONFIG_CONTENT = nodeConfigBase64(chainId, debugEnabled, pruningEnabled); const chunks = [ "docker run -it -d", @@ -174,20 +175,21 @@ export default function AvalanchegoDocker() { const [nodeRunningMode, setNodeRunningMode] = useState("server"); const [domain, setDomain] = useState(""); const [enableDebugTrace, setEnableDebugTrace] = useState(false); + const [pruningEnabled, setPruningEnabled] = useState(true); const [subnetIdError, setSubnetIdError] = useState(null); const [isAddChainModalOpen, setIsAddChainModalOpen] = useState(false); const [chainAddedToWallet, setChainAddedToWallet] = useState(null); - + const { avalancheNetworkID } = useWalletStore(); const { addL1 } = useL1ListStore()(); useEffect(() => { try { - setRpcCommand(generateDockerCommand([subnetId], isRPC, avalancheNetworkID, enableDebugTrace ? chainId : undefined)); + setRpcCommand(generateDockerCommand([subnetId], isRPC, avalancheNetworkID, chainId, enableDebugTrace, pruningEnabled)); } catch (error) { setRpcCommand((error as Error).message); } - }, [subnetId, isRPC, avalancheNetworkID, enableDebugTrace, chainId]); + }, [subnetId, isRPC, avalancheNetworkID, enableDebugTrace, chainId, pruningEnabled]); useEffect(() => { if (!isRPC) { @@ -217,6 +219,7 @@ export default function AvalanchegoDocker() { setNodeRunningMode("server"); setDomain(""); setEnableDebugTrace(false); + setPruningEnabled(true); setSubnetIdError(null); setIsAddChainModalOpen(false); }; @@ -315,6 +318,12 @@ export default function AvalanchegoDocker() { checked={enableDebugTrace} onChange={setEnableDebugTrace} />} + + {isRPC && setPruningEnabled(!checked)} + />} {nodeRunningMode === "server" && (

Port Configuration

From 5b33e7cc3ded826a6abead26e46463d063fdae0c Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Fri, 30 May 2025 05:32:51 +0000 Subject: [PATCH 02/12] block scout WIP --- .../src/toolbox/Nodes/AvalanchegoDocker.tsx | 6 +- toolbox/src/toolbox/Nodes/BlockScout.tsx | 333 ++++++++++++++++++ toolbox/src/toolbox/ToolboxApp.tsx | 9 +- 3 files changed, 344 insertions(+), 4 deletions(-) create mode 100644 toolbox/src/toolbox/Nodes/BlockScout.tsx diff --git a/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx b/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx index 50e641bc480..e435bfb8c36 100644 --- a/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx +++ b/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx @@ -21,7 +21,7 @@ import { RadioGroup } from "../../components/RadioGroup"; import { Success } from "../../components/Success"; -const nodeConfigBase64 = (chainId: string, debugEnabled: boolean, pruningEnabled: boolean) => { +export const nodeConfigBase64 = (chainId: string, debugEnabled: boolean, pruningEnabled: boolean) => { const vmConfig = debugEnabled ? { "pruning-enabled": pruningEnabled, "log-level": "debug", @@ -136,7 +136,7 @@ ${domain}/ext/bc/${chainID}/rpc` } } -const dockerInstallInstructions: Record = { +export const dockerInstallInstructions: Record = { 'Ubuntu/Debian': `sudo apt-get update && \\ sudo apt-get install -y docker.io && \\ sudo usermod -aG docker $USER && \\ @@ -165,7 +165,7 @@ docker run -it --rm hello-world `, } as const; -type OS = keyof typeof dockerInstallInstructions; +export type OS = keyof typeof dockerInstallInstructions; export default function AvalanchegoDocker() { const [chainId, setChainId] = useState(""); diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx new file mode 100644 index 00000000000..e2f192cecc2 --- /dev/null +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -0,0 +1,333 @@ +"use client"; + +import { useWalletStore } from "../../stores/walletStore"; +import { useState, useEffect, useMemo } from "react"; +import { networkIDs } from "@avalabs/avalanchejs"; +import versions from "../../versions.json"; +import { Container } from "../../components/Container"; +import { Input } from "../../components/Input"; +import { getBlockchainInfo } from "../../coreViem/utils/glacier"; +import InputChainId from "../../components/InputChainId"; +import { Checkbox } from "../../components/Checkbox"; + +import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; +import { Steps, Step } from "fumadocs-ui/components/steps"; +import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; +import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'; +import { AddChainModal } from "../../components/ConnectWallet/AddChainModal"; +import { useL1ListStore } from "../../stores/l1ListStore"; +import { Button } from "../../components/Button"; +import { RadioGroup } from "../../components/RadioGroup"; +import { Success } from "../../components/Success"; +import { dockerInstallInstructions, nodeConfigBase64, type OS } from "./AvalanchegoDocker"; + +const genCaddyfile = (domain: string) => ` +${domain} { + # Backend API routes + handle /api* { + reverse_proxy backend:4000 + } + + handle /socket* { + reverse_proxy backend:4000 + } + + handle /sitemap.xml { + reverse_proxy backend:4000 + } + + handle /auth* { + reverse_proxy backend:4000 + } + + handle /metrics { + reverse_proxy backend:4000 + } + + # Avago blockchain proxy + handle /ext/bc/* { + reverse_proxy avago:9650 + } + + # Shared files with directory browsing + handle /shared/* { + root * /var + file_server browse + } + + # Frontend (default catch-all) + handle { + reverse_proxy bc_frontend:3000 + } +} +` + +const genDockerCompose = () => ` +services: + redis-db: + image: 'redis:alpine' + container_name: redis-db + command: redis-server + db-init: + image: postgres:15 + entrypoint: + - sh + - -c + - | + chown -R 2000:2000 /var/lib/postgresql/data + volumes: + - postgres_data:/var/lib/postgresql/data + db: + depends_on: + db-init: + condition: service_completed_successfully + image: postgres:15 + shm_size: 256m + restart: always + container_name: 'db' + command: postgres -c 'max_connections=200' -c 'client_connection_check_interval=60000' + environment: + POSTGRES_PASSWORD: "" + POSTGRES_USER: "postgres" + POSTGRES_HOST_AUTH_METHOD: "trust" + ports: + - target: 5432 + published: 7432 + volumes: + - postgres_data:/var/lib/postgresql/data + backend: + depends_on: + - db + - redis-db + image: blockscout/blockscout:6.10.1 + pull_policy: always + restart: always + stop_grace_period: 5m + container_name: 'backend' + command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" + environment: + ETHEREUM_JSONRPC_VARIANT: geth + ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc + ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc + DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout + SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN + NETWORK: EVM + SUBNETWORK: MySubnet + PORT: 4000 + INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: false + INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: false + # LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg + # FOOTER_LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg + # FAVICON_MASTER_URL: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg + ECTO_USE_SSL: false + DISABLE_EXCHANGE_RATES: true + SUPPORTED_CHAINS: "[]" + TXS_STATS_DAYS_TO_COMPILE_AT_INIT: 10 + MICROSERVICE_SC_VERIFIER_ENABLED: false + MICROSERVICE_SC_VERIFIER_URL: http://sc-verifier:8050 + MICROSERVICE_SC_VERIFIER_TYPE: sc_verifier + MICROSERVICE_VISUALIZE_SOL2UML_ENABLED: false + MICROSERVICE_VISUALIZE_SOL2UML_URL: http://visualizer:8050 + MICROSERVICE_SIG_PROVIDER_ENABLED: false + MICROSERVICE_SIG_PROVIDER_URL: http://sig-provider:8050 + links: + - db:database + # volumes: + # - /etc/blockscout/conf/custom/images:/app/apps/block_scout_web/assets/static/images + bc_frontend: + depends_on: + - backend + - caddy + image: ghcr.io/blockscout/frontend:v1.37.4 + pull_policy: always + platform: linux/amd64 + restart: always + container_name: 'bc_frontend' + environment: + NEXT_PUBLIC_API_HOST: 57.183.4.43.sslip.io + NEXT_PUBLIC_API_PROTOCOL: https + NEXT_PUBLIC_API_BASE_PATH: / + # FAVICON_MASTER_URL: https://ash.center/img/ash-logo.svg # Your favicon URL + NEXT_PUBLIC_NETWORK_NAME: Ash Subnet + NEXT_PUBLIC_NETWORK_SHORT_NAME: Ash + NEXT_PUBLIC_NETWORK_ID: 66666 + NEXT_PUBLIC_NETWORK_RPC_URL: http://57.183.4.43:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc + NEXT_PUBLIC_NETWORK_CURRENCY_NAME: AshCoin + NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ASH + NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18 + NEXT_PUBLIC_APP_HOST: 57.183.4.43.sslip.io + NEXT_PUBLIC_APP_PROTOCOL: https + NEXT_PUBLIC_HOMEPAGE_CHARTS: "['daily_txs']" + NEXT_PUBLIC_IS_TESTNET: true + NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL: wss + NEXT_PUBLIC_API_SPEC_URL: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml + NEXT_PUBLIC_VISUALIZE_API_HOST: https://57.183.4.43.sslip.io + NEXT_PUBLIC_VISUALIZE_API_BASE_PATH: /visualizer-service + NEXT_PUBLIC_STATS_API_HOST: "" + NEXT_PUBLIC_STATS_API_BASE_PATH: /stats-service + caddy: + depends_on: + - backend + image: caddy:latest + container_name: caddy + restart: always + extra_hosts: + - 'host.docker.internal:host-gateway' + volumes: + - "./Caddyfile:/etc/caddy/Caddyfile" + - caddy_data:/data + - caddy_config:/config + ports: + - target: 80 + published: 80 + - target: 443 + published: 443 + avago: + image: containerman17/subnet-evm-plus:latest + container_name: avago + restart: always + ports: + - "9650:9650" + - "9651:9651" + volumes: + - ~/.avalanchego:/root/.avalanchego + environment: + AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK: "true" + AVAGO_PUBLIC_IP_RESOLUTION_SERVICE: "opendns" + AVAGO_HTTP_HOST: "0.0.0.0" + AVAGO_TRACK_SUBNETS: "oerPWBbtbe13eWbo3AegYUrHuSETeTwyNy7szoHJJ1QQBL9nu,h7egyVb6fKHMDpVaEsTEcy7YaEnXrayxZS4A1AEU4pyBzmwGp" + AVAGO_HTTP_ALLOWED_HOSTS: "*" + AVAGO_CHAIN_CONFIG_CONTENT: "eyJTVURvSzlQODlQQ2NndXNreW9mNDFmWmV4dzdVM3p1YkRQMkRacEdmM0hiRld3SjRFIjp7IkNvbmZpZyI6ImV5SnNiMmN0YkdWMlpXd2lPaUprWldKMVp5SXNJbmRoY25BdFlYQnBMV1Z1WVdKc1pXUWlPblJ5ZFdVc0ltVjBhQzFoY0dseklqcGJJbVYwYUNJc0ltVjBhQzFtYVd4MFpYSWlMQ0p1WlhRaUxDSmhaRzFwYmlJc0luZGxZak1pTENKcGJuUmxjbTVoYkMxbGRHZ2lMQ0pwYm5SbGNtNWhiQzFpYkc5amEyTm9ZV2x1SWl3aWFXNTBaWEp1WVd3dGRISmhibk5oWTNScGIyNGlMQ0pwYm5SbGNtNWhiQzFrWldKMVp5SXNJbWx1ZEdWeWJtRnNMV0ZqWTI5MWJuUWlMQ0pwYm5SbGNtNWhiQzF3WlhKemIyNWhiQ0lzSW1SbFluVm5JaXdpWkdWaWRXY3RkSEpoWTJWeUlpd2laR1ZpZFdjdFptbHNaUzEwY21GalpYSWlMQ0prWldKMVp5MW9ZVzVrYkdWeUlsMTkiLCJVcGdyYWRlIjpudWxsfX0=" + logging: + driver: json-file + options: + max-size: "50m" + max-file: "3" + +volumes: + postgres_data: + caddy_data: + caddy_config: +` + +export default function BlockScout() { + const [chainId, setChainId] = useState(""); + const [subnetId, setSubnetId] = useState(""); + const [domain, setDomain] = useState(""); + const [subnetIdError, setSubnetIdError] = useState(null); + const [composeYaml, setComposeYaml] = useState(""); + const [caddyfile, setCaddyfile] = useState(""); + + useEffect(() => { + setSubnetIdError(null); + setSubnetId(""); + if (!chainId) return + + getBlockchainInfo(chainId).then((chainInfo) => { + setSubnetId(chainInfo.subnetId); + }).catch((error) => { + setSubnetIdError((error as Error).message); + }); + }, [chainId]); + + const domainError = useMemo(() => { + if (!domain) return null; + // Updated regex to handle both traditional domains and IP-based domains like 1.2.3.4.sslip.io + const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9\-\.]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]{2,})+$/; + if (!domainRegex.test(domain)) return "Please enter a valid domain name (e.g. example.com or 1.2.3.4.sslip.io)"; + return null; + }, [domain]); + + useEffect(() => { + let ready = !!domain && !!subnetId && !domainError && !subnetIdError + + if (ready) { + setCaddyfile(genCaddyfile(domain)); + setComposeYaml(genDockerCompose()); + } else { + setCaddyfile(""); + setComposeYaml(""); + } + }, [domain, subnetId, domainError, subnetIdError]); + + return ( + <> + + + +

Set up Instance

+

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.

+
+ +

Docker Installation

+

Make sure you have Docker installed on your system. You can use the following commands to install it:

+ + + {Object.keys(dockerInstallInstructions).map((os) => ( + + + + ))} + +
+ + +

Select L1

+

Enter the Avalanche Blockchain ID (not EVM chain ID) of the L1 you want to run a node for.

+ + + + +
+ + {subnetId && ( + <> + +

Domain

+

Enter your domain name or server's public IP address. For a free domain, use your server's public IP with .sslip.io (e.g. 1.2.3.4.sslip.io). Get your IP with 'curl checkip.amazonaws.com'.

+ +
+ )} + + {composeYaml && (<> + +

Caddyfile

+

Put this in a file called Caddyfile in the working directory. compose.yml will be created in the same directory.

+ +
+ +

Docker Compose

+

Put this in a file called compose.yml and run docker compose up -d to start the node.

+ +
+ )} + + +
+ + +
+ + ); +}; diff --git a/toolbox/src/toolbox/ToolboxApp.tsx b/toolbox/src/toolbox/ToolboxApp.tsx index b73c4af997c..b0df0956f25 100644 --- a/toolbox/src/toolbox/ToolboxApp.tsx +++ b/toolbox/src/toolbox/ToolboxApp.tsx @@ -357,7 +357,7 @@ const componentGroups: Record = { } ] }, - "Nodes Utils": { + "Node Utils": { components: [ { id: "rpcMethodsCheck", @@ -372,6 +372,13 @@ const componentGroups: Record = { component: lazy(() => import('./Nodes/PerformanceMonitor')), fileNames: ["toolbox/src/toolbox/Nodes/PerformanceMonitor.tsx"], walletMode: "optional", + }, + { + id: "blockScout", + label: "BlockScout", + component: lazy(() => import('./Nodes/BlockScout')), + fileNames: ["toolbox/src/toolbox/Nodes/BlockScout.tsx"], + walletMode: "testnet-mainnet", } ] }, From 938509aec483e1b796453ece5271dd5643c8a51f Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Fri, 30 May 2025 05:33:58 +0000 Subject: [PATCH 03/12] lint --- toolbox/src/toolbox/Nodes/BlockScout.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index e2f192cecc2..bcb2c7acd82 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -1,25 +1,15 @@ "use client"; -import { useWalletStore } from "../../stores/walletStore"; import { useState, useEffect, useMemo } from "react"; -import { networkIDs } from "@avalabs/avalanchejs"; -import versions from "../../versions.json"; import { Container } from "../../components/Container"; import { Input } from "../../components/Input"; import { getBlockchainInfo } from "../../coreViem/utils/glacier"; import InputChainId from "../../components/InputChainId"; -import { Checkbox } from "../../components/Checkbox"; import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; -import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'; -import { AddChainModal } from "../../components/ConnectWallet/AddChainModal"; -import { useL1ListStore } from "../../stores/l1ListStore"; -import { Button } from "../../components/Button"; -import { RadioGroup } from "../../components/RadioGroup"; -import { Success } from "../../components/Success"; -import { dockerInstallInstructions, nodeConfigBase64, type OS } from "./AvalanchegoDocker"; +import { dockerInstallInstructions, type OS } from "./AvalanchegoDocker"; const genCaddyfile = (domain: string) => ` ${domain} { From 7617307e47df08e57a5802cb371e6198b2a5200b Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Fri, 30 May 2025 05:38:16 +0000 Subject: [PATCH 04/12] todos --- toolbox/src/toolbox/Nodes/BlockScout.tsx | 52 ++++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index bcb2c7acd82..5ce5fdf8c54 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -52,7 +52,7 @@ ${domain} { } ` -const genDockerCompose = () => ` +const genDockerCompose = (domain: string) => ` services: redis-db: image: 'redis:alpine' @@ -97,18 +97,18 @@ services: command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" environment: ETHEREUM_JSONRPC_VARIANT: geth - ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc - ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc - DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout - SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN - NETWORK: EVM - SUBNETWORK: MySubnet - PORT: 4000 + ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc # TODO: change to dynamic + ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc # TODO: change to dynamic + DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout # TODO: what is this ? + SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN # TODO: what is this ? + NETWORK: EVM + SUBNETWORK: MySubnet # TODO: what is this ? + PORT: 4000 INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: false INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: false - # LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg - # FOOTER_LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg - # FAVICON_MASTER_URL: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg + # LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: change to dynamic ? + # FOOTER_LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: change to dynamic ? + # FAVICON_MASTER_URL: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: change to dynamic ? ECTO_USE_SSL: false DISABLE_EXCHANGE_RATES: true SUPPORTED_CHAINS: "[]" @@ -134,24 +134,24 @@ services: restart: always container_name: 'bc_frontend' environment: - NEXT_PUBLIC_API_HOST: 57.183.4.43.sslip.io + NEXT_PUBLIC_API_HOST: ${domain} NEXT_PUBLIC_API_PROTOCOL: https NEXT_PUBLIC_API_BASE_PATH: / - # FAVICON_MASTER_URL: https://ash.center/img/ash-logo.svg # Your favicon URL - NEXT_PUBLIC_NETWORK_NAME: Ash Subnet - NEXT_PUBLIC_NETWORK_SHORT_NAME: Ash - NEXT_PUBLIC_NETWORK_ID: 66666 - NEXT_PUBLIC_NETWORK_RPC_URL: http://57.183.4.43:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc - NEXT_PUBLIC_NETWORK_CURRENCY_NAME: AshCoin - NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ASH - NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18 - NEXT_PUBLIC_APP_HOST: 57.183.4.43.sslip.io + # FAVICON_MASTER_URL: https://ash.center/img/ash-logo.svg # TODO: change to dynamic ? + NEXT_PUBLIC_NETWORK_NAME: Ash Subnet # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_SHORT_NAME: Ash # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_ID: 66666 # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_RPC_URL: https://${domain}/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_CURRENCY_NAME: AshCoin # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ASH # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18 + NEXT_PUBLIC_APP_HOST: ${domain} NEXT_PUBLIC_APP_PROTOCOL: https NEXT_PUBLIC_HOMEPAGE_CHARTS: "['daily_txs']" NEXT_PUBLIC_IS_TESTNET: true NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL: wss NEXT_PUBLIC_API_SPEC_URL: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml - NEXT_PUBLIC_VISUALIZE_API_HOST: https://57.183.4.43.sslip.io + NEXT_PUBLIC_VISUALIZE_API_HOST: https://${domain} NEXT_PUBLIC_VISUALIZE_API_BASE_PATH: /visualizer-service NEXT_PUBLIC_STATS_API_HOST: "" NEXT_PUBLIC_STATS_API_BASE_PATH: /stats-service @@ -173,10 +173,10 @@ services: - target: 443 published: 443 avago: - image: containerman17/subnet-evm-plus:latest + image: containerman17/subnet-evm-plus:latest # TODO: use the official subnet-evm image container_name: avago restart: always - ports: + ports: # TODO: reconsider ports - "9650:9650" - "9651:9651" volumes: @@ -185,8 +185,8 @@ services: AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK: "true" AVAGO_PUBLIC_IP_RESOLUTION_SERVICE: "opendns" AVAGO_HTTP_HOST: "0.0.0.0" - AVAGO_TRACK_SUBNETS: "oerPWBbtbe13eWbo3AegYUrHuSETeTwyNy7szoHJJ1QQBL9nu,h7egyVb6fKHMDpVaEsTEcy7YaEnXrayxZS4A1AEU4pyBzmwGp" - AVAGO_HTTP_ALLOWED_HOSTS: "*" + AVAGO_TRACK_SUBNETS: "oerPWBbtbe13eWbo3AegYUrHuSETeTwyNy7szoHJJ1QQBL9nu,h7egyVb6fKHMDpVaEsTEcy7YaEnXrayxZS4A1AEU4pyBzmwGp" # TODO: + AVAGO_HTTP_ALLOWED_HOSTS: "*" # TODO: generate chain config AVAGO_CHAIN_CONFIG_CONTENT: "eyJTVURvSzlQODlQQ2NndXNreW9mNDFmWmV4dzdVM3p1YkRQMkRacEdmM0hiRld3SjRFIjp7IkNvbmZpZyI6ImV5SnNiMmN0YkdWMlpXd2lPaUprWldKMVp5SXNJbmRoY25BdFlYQnBMV1Z1WVdKc1pXUWlPblJ5ZFdVc0ltVjBhQzFoY0dseklqcGJJbVYwYUNJc0ltVjBhQzFtYVd4MFpYSWlMQ0p1WlhRaUxDSmhaRzFwYmlJc0luZGxZak1pTENKcGJuUmxjbTVoYkMxbGRHZ2lMQ0pwYm5SbGNtNWhiQzFpYkc5amEyTm9ZV2x1SWl3aWFXNTBaWEp1WVd3dGRISmhibk5oWTNScGIyNGlMQ0pwYm5SbGNtNWhiQzFrWldKMVp5SXNJbWx1ZEdWeWJtRnNMV0ZqWTI5MWJuUWlMQ0pwYm5SbGNtNWhiQzF3WlhKemIyNWhiQ0lzSW1SbFluVm5JaXdpWkdWaWRXY3RkSEpoWTJWeUlpd2laR1ZpZFdjdFptbHNaUzEwY21GalpYSWlMQ0prWldKMVp5MW9ZVzVrYkdWeUlsMTkiLCJVcGdyYWRlIjpudWxsfX0=" logging: driver: json-file From 40259d09c18c6e5c23c6440a0bb320b93a61a836 Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Mon, 2 Jun 2025 03:11:09 +0000 Subject: [PATCH 05/12] right urls --- toolbox/src/toolbox/Nodes/BlockScout.tsx | 232 +++++++++++------------ 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index 5ce5fdf8c54..1e2f134c171 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -5,7 +5,7 @@ import { Container } from "../../components/Container"; import { Input } from "../../components/Input"; import { getBlockchainInfo } from "../../coreViem/utils/glacier"; import InputChainId from "../../components/InputChainId"; - +import versions from "../../versions.json"; import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; @@ -52,7 +52,7 @@ ${domain} { } ` -const genDockerCompose = (domain: string) => ` +const genDockerCompose = (domain: string, subnetId: string, blockchainId: string) => ` services: redis-db: image: 'redis:alpine' @@ -94,11 +94,11 @@ services: restart: always stop_grace_period: 5m container_name: 'backend' - command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" + command: sh -c 'bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start' environment: ETHEREUM_JSONRPC_VARIANT: geth - ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc # TODO: change to dynamic - ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc # TODO: change to dynamic + ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/${blockchainId}/rpc # TODO: change to dynamic + ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/${blockchainId}/rpc # TODO: change to dynamic DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout # TODO: what is this ? SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN # TODO: what is this ? NETWORK: EVM @@ -106,9 +106,9 @@ services: PORT: 4000 INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: false INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: false - # LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: change to dynamic ? - # FOOTER_LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: change to dynamic ? - # FAVICON_MASTER_URL: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: change to dynamic ? + # LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: your value here + # FOOTER_LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: your value here + # FAVICON_MASTER_URL: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: your value here ECTO_USE_SSL: false DISABLE_EXCHANGE_RATES: true SUPPORTED_CHAINS: "[]" @@ -141,7 +141,7 @@ services: NEXT_PUBLIC_NETWORK_NAME: Ash Subnet # TODO: change to dynamic NEXT_PUBLIC_NETWORK_SHORT_NAME: Ash # TODO: change to dynamic NEXT_PUBLIC_NETWORK_ID: 66666 # TODO: change to dynamic - NEXT_PUBLIC_NETWORK_RPC_URL: https://${domain}/ext/bc/SUDoK9P89PCcguskyof41fZexw7U3zubDP2DZpGf3HbFWwJ4E/rpc # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_RPC_URL: https://${domain}/ext/bc/${blockchainId}/rpc NEXT_PUBLIC_NETWORK_CURRENCY_NAME: AshCoin # TODO: change to dynamic NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ASH # TODO: change to dynamic NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18 @@ -173,11 +173,11 @@ services: - target: 443 published: 443 avago: - image: containerman17/subnet-evm-plus:latest # TODO: use the official subnet-evm image + image: avaplatform/subnet-evm:${versions['avaplatform/subnet-evm']} container_name: avago restart: always - ports: # TODO: reconsider ports - - "9650:9650" + ports: + - "127.0.0.1:9650:9650" - "9651:9651" volumes: - ~/.avalanchego:/root/.avalanchego @@ -185,7 +185,7 @@ services: AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK: "true" AVAGO_PUBLIC_IP_RESOLUTION_SERVICE: "opendns" AVAGO_HTTP_HOST: "0.0.0.0" - AVAGO_TRACK_SUBNETS: "oerPWBbtbe13eWbo3AegYUrHuSETeTwyNy7szoHJJ1QQBL9nu,h7egyVb6fKHMDpVaEsTEcy7YaEnXrayxZS4A1AEU4pyBzmwGp" # TODO: + AVAGO_TRACK_SUBNETS: "${subnetId}" AVAGO_HTTP_ALLOWED_HOSTS: "*" # TODO: generate chain config AVAGO_CHAIN_CONFIG_CONTENT: "eyJTVURvSzlQODlQQ2NndXNreW9mNDFmWmV4dzdVM3p1YkRQMkRacEdmM0hiRld3SjRFIjp7IkNvbmZpZyI6ImV5SnNiMmN0YkdWMlpXd2lPaUprWldKMVp5SXNJbmRoY25BdFlYQnBMV1Z1WVdKc1pXUWlPblJ5ZFdVc0ltVjBhQzFoY0dseklqcGJJbVYwYUNJc0ltVjBhQzFtYVd4MFpYSWlMQ0p1WlhRaUxDSmhaRzFwYmlJc0luZGxZak1pTENKcGJuUmxjbTVoYkMxbGRHZ2lMQ0pwYm5SbGNtNWhiQzFpYkc5amEyTm9ZV2x1SWl3aWFXNTBaWEp1WVd3dGRISmhibk5oWTNScGIyNGlMQ0pwYm5SbGNtNWhiQzFrWldKMVp5SXNJbWx1ZEdWeWJtRnNMV0ZqWTI5MWJuUWlMQ0pwYm5SbGNtNWhiQzF3WlhKemIyNWhiQ0lzSW1SbFluVm5JaXdpWkdWaWRXY3RkSEpoWTJWeUlpd2laR1ZpZFdjdFptbHNaUzEwY21GalpYSWlMQ0prWldKMVp5MW9ZVzVrYkdWeUlsMTkiLCJVcGdyYWRlIjpudWxsfX0=" logging: @@ -201,123 +201,123 @@ volumes: ` export default function BlockScout() { - const [chainId, setChainId] = useState(""); - const [subnetId, setSubnetId] = useState(""); - const [domain, setDomain] = useState(""); - const [subnetIdError, setSubnetIdError] = useState(null); - const [composeYaml, setComposeYaml] = useState(""); - const [caddyfile, setCaddyfile] = useState(""); + const [chainId, setChainId] = useState(""); + const [subnetId, setSubnetId] = useState(""); + const [domain, setDomain] = useState(""); + const [subnetIdError, setSubnetIdError] = useState(null); + const [composeYaml, setComposeYaml] = useState(""); + const [caddyfile, setCaddyfile] = useState(""); - useEffect(() => { - setSubnetIdError(null); - setSubnetId(""); - if (!chainId) return + useEffect(() => { + setSubnetIdError(null); + setSubnetId(""); + if (!chainId) return - getBlockchainInfo(chainId).then((chainInfo) => { - setSubnetId(chainInfo.subnetId); - }).catch((error) => { - setSubnetIdError((error as Error).message); - }); - }, [chainId]); + getBlockchainInfo(chainId).then((chainInfo) => { + setSubnetId(chainInfo.subnetId); + }).catch((error) => { + setSubnetIdError((error as Error).message); + }); + }, [chainId]); - const domainError = useMemo(() => { - if (!domain) return null; - // Updated regex to handle both traditional domains and IP-based domains like 1.2.3.4.sslip.io - const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9\-\.]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]{2,})+$/; - if (!domainRegex.test(domain)) return "Please enter a valid domain name (e.g. example.com or 1.2.3.4.sslip.io)"; - return null; - }, [domain]); + const domainError = useMemo(() => { + if (!domain) return null; + // Updated regex to handle both traditional domains and IP-based domains like 1.2.3.4.sslip.io + const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9\-\.]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]{2,})+$/; + if (!domainRegex.test(domain)) return "Please enter a valid domain name (e.g. example.com or 1.2.3.4.sslip.io)"; + return null; + }, [domain]); - useEffect(() => { - let ready = !!domain && !!subnetId && !domainError && !subnetIdError + useEffect(() => { + let ready = !!domain && !!subnetId && !domainError && !subnetIdError - if (ready) { - setCaddyfile(genCaddyfile(domain)); - setComposeYaml(genDockerCompose()); - } else { - setCaddyfile(""); - setComposeYaml(""); - } - }, [domain, subnetId, domainError, subnetIdError]); + if (ready) { + setCaddyfile(genCaddyfile(domain)); + setComposeYaml(genDockerCompose(domain, subnetId, chainId)); + } else { + setCaddyfile(""); + setComposeYaml(""); + } + }, [domain, subnetId, domainError, subnetIdError]); - return ( - <> - - - -

Set up Instance

-

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.

-
- -

Docker Installation

-

Make sure you have Docker installed on your system. You can use the following commands to install it:

+ return ( + <> + + + +

Set up Instance

+

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.

+
+ +

Docker Installation

+

Make sure you have Docker installed on your system. You can use the following commands to install it:

- - {Object.keys(dockerInstallInstructions).map((os) => ( - - - - ))} - -
+ + {Object.keys(dockerInstallInstructions).map((os) => ( + + + + ))} + +
- -

Select L1

-

Enter the Avalanche Blockchain ID (not EVM chain ID) of the L1 you want to run a node for.

+ +

Select L1

+

Enter the Avalanche Blockchain ID (not EVM chain ID) of the L1 you want to run a node for.

- + - -
+ +
- {subnetId && ( - <> - -

Domain

-

Enter your domain name or server's public IP address. For a free domain, use your server's public IP with .sslip.io (e.g. 1.2.3.4.sslip.io). Get your IP with 'curl checkip.amazonaws.com'.

- -
- )} + {subnetId && ( + <> + +

Domain

+

Enter your domain name or server's public IP address. For a free domain, use your server's public IP with .sslip.io (e.g. 1.2.3.4.sslip.io). Get your IP with 'curl checkip.amazonaws.com'.

+ +
+ )} - {composeYaml && (<> - -

Caddyfile

-

Put this in a file called Caddyfile in the working directory. compose.yml will be created in the same directory.

- -
- -

Docker Compose

-

Put this in a file called compose.yml and run docker compose up -d to start the node.

- -
- )} + {composeYaml && (<> + +

Caddyfile

+

Put this in a file called Caddyfile in the working directory. compose.yml will be created in the same directory.

+ +
+ +

Docker Compose

+

Put this in a file called compose.yml and run docker compose up -d to start the node.

+ +
+ )} -
+ -
- - ); + + + ); }; From 5ad0b55a3b73195e987bb2e769a1e92301d5d4bf Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Mon, 2 Jun 2025 03:17:33 +0000 Subject: [PATCH 06/12] chain config --- .../src/toolbox/Nodes/AvalanchegoDocker.tsx | 2 -- toolbox/src/toolbox/Nodes/BlockScout.tsx | 23 ++++++++----------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx b/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx index e435bfb8c36..dc9bac272e6 100644 --- a/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx +++ b/toolbox/src/toolbox/Nodes/AvalanchegoDocker.tsx @@ -53,8 +53,6 @@ export const nodeConfigBase64 = (chainId: string, debugEnabled: boolean, pruning const configMap: Record = {} configMap[chainId] = { Config: vmConfigEncoded, Upgrade: null } - console.log('configMap', configMap); - return btoa(JSON.stringify(configMap)) } diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index 1e2f134c171..b86a8ea0a30 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -9,7 +9,7 @@ import versions from "../../versions.json"; import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; -import { dockerInstallInstructions, type OS } from "./AvalanchegoDocker"; +import { dockerInstallInstructions, type OS, nodeConfigBase64 } from "./AvalanchegoDocker"; const genCaddyfile = (domain: string) => ` ${domain} { @@ -97,18 +97,15 @@ services: command: sh -c 'bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start' environment: ETHEREUM_JSONRPC_VARIANT: geth - ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/${blockchainId}/rpc # TODO: change to dynamic - ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/${blockchainId}/rpc # TODO: change to dynamic - DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout # TODO: what is this ? - SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN # TODO: what is this ? + ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/${blockchainId}/rpc + ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/${blockchainId}/rpc + DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout # TODO: default, please change + SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN # TODO: default, please change NETWORK: EVM SUBNETWORK: MySubnet # TODO: what is this ? PORT: 4000 INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: false INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: false - # LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: your value here - # FOOTER_LOGO: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: your value here - # FAVICON_MASTER_URL: /app/apps/block_scout_web/assets/static/images/ash-logo-circle-30.svg # TODO: your value here ECTO_USE_SSL: false DISABLE_EXCHANGE_RATES: true SUPPORTED_CHAINS: "[]" @@ -137,7 +134,7 @@ services: NEXT_PUBLIC_API_HOST: ${domain} NEXT_PUBLIC_API_PROTOCOL: https NEXT_PUBLIC_API_BASE_PATH: / - # FAVICON_MASTER_URL: https://ash.center/img/ash-logo.svg # TODO: change to dynamic ? + FAVICON_MASTER_URL: https://ash.center/img/ash-logo.svg # TODO: change to dynamic ? NEXT_PUBLIC_NETWORK_NAME: Ash Subnet # TODO: change to dynamic NEXT_PUBLIC_NETWORK_SHORT_NAME: Ash # TODO: change to dynamic NEXT_PUBLIC_NETWORK_ID: 66666 # TODO: change to dynamic @@ -168,10 +165,8 @@ services: - caddy_data:/data - caddy_config:/config ports: - - target: 80 - published: 80 - - target: 443 - published: 443 + - "80:80" + - "443:443" avago: image: avaplatform/subnet-evm:${versions['avaplatform/subnet-evm']} container_name: avago @@ -187,7 +182,7 @@ services: AVAGO_HTTP_HOST: "0.0.0.0" AVAGO_TRACK_SUBNETS: "${subnetId}" AVAGO_HTTP_ALLOWED_HOSTS: "*" # TODO: generate chain config - AVAGO_CHAIN_CONFIG_CONTENT: "eyJTVURvSzlQODlQQ2NndXNreW9mNDFmWmV4dzdVM3p1YkRQMkRacEdmM0hiRld3SjRFIjp7IkNvbmZpZyI6ImV5SnNiMmN0YkdWMlpXd2lPaUprWldKMVp5SXNJbmRoY25BdFlYQnBMV1Z1WVdKc1pXUWlPblJ5ZFdVc0ltVjBhQzFoY0dseklqcGJJbVYwYUNJc0ltVjBhQzFtYVd4MFpYSWlMQ0p1WlhRaUxDSmhaRzFwYmlJc0luZGxZak1pTENKcGJuUmxjbTVoYkMxbGRHZ2lMQ0pwYm5SbGNtNWhiQzFpYkc5amEyTm9ZV2x1SWl3aWFXNTBaWEp1WVd3dGRISmhibk5oWTNScGIyNGlMQ0pwYm5SbGNtNWhiQzFrWldKMVp5SXNJbWx1ZEdWeWJtRnNMV0ZqWTI5MWJuUWlMQ0pwYm5SbGNtNWhiQzF3WlhKemIyNWhiQ0lzSW1SbFluVm5JaXdpWkdWaWRXY3RkSEpoWTJWeUlpd2laR1ZpZFdjdFptbHNaUzEwY21GalpYSWlMQ0prWldKMVp5MW9ZVzVrYkdWeUlsMTkiLCJVcGdyYWRlIjpudWxsfX0=" + AVAGO_CHAIN_CONFIG_CONTENT: "${nodeConfigBase64(blockchainId, true, false)}" logging: driver: json-file options: From be7d88ee96667c5daab71a41c457f58005c78493 Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Mon, 2 Jun 2025 03:50:44 +0000 Subject: [PATCH 07/12] vars --- toolbox/src/toolbox/Nodes/BlockScout.tsx | 103 +++++++++++++++++++---- 1 file changed, 86 insertions(+), 17 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index b86a8ea0a30..6bf80afd44b 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -10,6 +10,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; import { dockerInstallInstructions, type OS, nodeConfigBase64 } from "./AvalanchegoDocker"; +import { useL1ByChainId } from "../../stores/l1ListStore"; const genCaddyfile = (domain: string) => ` ${domain} { @@ -52,7 +53,17 @@ ${domain} { } ` -const genDockerCompose = (domain: string, subnetId: string, blockchainId: string) => ` +interface DockerComposeConfig { + domain: string; + subnetId: string; + blockchainId: string; + networkName: string; + networkShortName: string; + currencyName: string; + currencySymbol: string; +} + +const genDockerCompose = (config: DockerComposeConfig) => ` services: redis-db: image: 'redis:alpine' @@ -97,8 +108,8 @@ services: command: sh -c 'bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start' environment: ETHEREUM_JSONRPC_VARIANT: geth - ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/${blockchainId}/rpc - ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/${blockchainId}/rpc + ETHEREUM_JSONRPC_HTTP_URL: http://avago:9650/ext/bc/${config.blockchainId}/rpc + ETHEREUM_JSONRPC_TRACE_URL: http://avago:9650/ext/bc/${config.blockchainId}/rpc DATABASE_URL: postgresql://postgres:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout # TODO: default, please change SECRET_KEY_BASE: 56NtB48ear7+wMSf0IQuWDAAazhpb31qyc7GiyspBP2vh7t5zlCsF5QDv76chXeN # TODO: default, please change NETWORK: EVM @@ -131,24 +142,24 @@ services: restart: always container_name: 'bc_frontend' environment: - NEXT_PUBLIC_API_HOST: ${domain} + NEXT_PUBLIC_API_HOST: ${config.domain} NEXT_PUBLIC_API_PROTOCOL: https NEXT_PUBLIC_API_BASE_PATH: / FAVICON_MASTER_URL: https://ash.center/img/ash-logo.svg # TODO: change to dynamic ? - NEXT_PUBLIC_NETWORK_NAME: Ash Subnet # TODO: change to dynamic - NEXT_PUBLIC_NETWORK_SHORT_NAME: Ash # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_NAME: ${config.networkName} + NEXT_PUBLIC_NETWORK_SHORT_NAME: ${config.networkShortName} NEXT_PUBLIC_NETWORK_ID: 66666 # TODO: change to dynamic - NEXT_PUBLIC_NETWORK_RPC_URL: https://${domain}/ext/bc/${blockchainId}/rpc - NEXT_PUBLIC_NETWORK_CURRENCY_NAME: AshCoin # TODO: change to dynamic - NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ASH # TODO: change to dynamic + NEXT_PUBLIC_NETWORK_RPC_URL: https://${config.domain}/ext/bc/${config.blockchainId}/rpc + NEXT_PUBLIC_NETWORK_CURRENCY_NAME: ${config.currencyName} + NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ${config.currencySymbol} NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18 - NEXT_PUBLIC_APP_HOST: ${domain} + NEXT_PUBLIC_APP_HOST: ${config.domain} NEXT_PUBLIC_APP_PROTOCOL: https NEXT_PUBLIC_HOMEPAGE_CHARTS: "['daily_txs']" NEXT_PUBLIC_IS_TESTNET: true NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL: wss NEXT_PUBLIC_API_SPEC_URL: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml - NEXT_PUBLIC_VISUALIZE_API_HOST: https://${domain} + NEXT_PUBLIC_VISUALIZE_API_HOST: https://${config.domain} NEXT_PUBLIC_VISUALIZE_API_BASE_PATH: /visualizer-service NEXT_PUBLIC_STATS_API_HOST: "" NEXT_PUBLIC_STATS_API_BASE_PATH: /stats-service @@ -180,9 +191,9 @@ services: AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK: "true" AVAGO_PUBLIC_IP_RESOLUTION_SERVICE: "opendns" AVAGO_HTTP_HOST: "0.0.0.0" - AVAGO_TRACK_SUBNETS: "${subnetId}" - AVAGO_HTTP_ALLOWED_HOSTS: "*" # TODO: generate chain config - AVAGO_CHAIN_CONFIG_CONTENT: "${nodeConfigBase64(blockchainId, true, false)}" + AVAGO_TRACK_SUBNETS: "${config.subnetId}" + AVAGO_HTTP_ALLOWED_HOSTS: "*" + AVAGO_CHAIN_CONFIG_CONTENT: "${nodeConfigBase64(config.blockchainId, true, false)}" logging: driver: json-file options: @@ -199,15 +210,30 @@ export default function BlockScout() { const [chainId, setChainId] = useState(""); const [subnetId, setSubnetId] = useState(""); const [domain, setDomain] = useState(""); + const [networkName, setNetworkName] = useState(""); + const [networkShortName, setNetworkShortName] = useState(""); + const [currencyName, setCurrencyName] = useState(""); + const [currencySymbol, setCurrencySymbol] = useState(""); const [subnetIdError, setSubnetIdError] = useState(null); const [composeYaml, setComposeYaml] = useState(""); const [caddyfile, setCaddyfile] = useState(""); + const getL1Info = useL1ByChainId(chainId); + useEffect(() => { setSubnetIdError(null); setSubnetId(""); if (!chainId) return + // Set defaults from L1 store if available + const l1Info = getL1Info(); + if (l1Info) { + setNetworkName(l1Info.name); + setNetworkShortName(l1Info.name.split(" ")[0]); // First word as short name + setCurrencyName(l1Info.coinName); + setCurrencySymbol(l1Info.coinName); + } + getBlockchainInfo(chainId).then((chainInfo) => { setSubnetId(chainInfo.subnetId); }).catch((error) => { @@ -224,16 +250,24 @@ export default function BlockScout() { }, [domain]); useEffect(() => { - let ready = !!domain && !!subnetId && !domainError && !subnetIdError + let ready = !!domain && !!subnetId && !!networkName && !!networkShortName && !!currencyName && !!currencySymbol && !domainError && !subnetIdError if (ready) { setCaddyfile(genCaddyfile(domain)); - setComposeYaml(genDockerCompose(domain, subnetId, chainId)); + setComposeYaml(genDockerCompose({ + domain, + subnetId, + blockchainId: chainId, + networkName, + networkShortName, + currencyName, + currencySymbol + })); } else { setCaddyfile(""); setComposeYaml(""); } - }, [domain, subnetId, domainError, subnetIdError]); + }, [domain, subnetId, chainId, networkName, networkShortName, currencyName, currencySymbol, domainError, subnetIdError]); return ( <> @@ -293,6 +327,41 @@ export default function BlockScout() { helperText="Enter your domain name or IP address with .sslip.io (e.g. 1.2.3.4.sslip.io)" />
+ + +

Network Details

+

Configure your network's public display information. These will be shown in the block explorer.

+ +
+ + + + + + + +
+
)} {composeYaml && (<> From ff37d50d0ffcc1ae150e6d7bcd910c531aff694a Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Mon, 2 Jun 2025 03:56:52 +0000 Subject: [PATCH 08/12] instructions --- toolbox/src/toolbox/Nodes/BlockScout.tsx | 42 +++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index 6bf80afd44b..a6f0d5103e5 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -11,6 +11,7 @@ import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; import { dockerInstallInstructions, type OS, nodeConfigBase64 } from "./AvalanchegoDocker"; import { useL1ByChainId } from "../../stores/l1ListStore"; +import { Note } from "../../components/Note"; const genCaddyfile = (domain: string) => ` ${domain} { @@ -372,9 +373,48 @@ export default function BlockScout() {

Docker Compose

-

Put this in a file called compose.yml and run docker compose up -d to start the node.

+

Put this in a file called compose.yml in the same directory as your Caddyfile.

+ + +

Start Your Node

+

Navigate to the directory containing your Caddyfile and compose.yml files and run these commands:

+ +
+
+

Start the services (detached mode):

+ +

The -d flag runs containers in the background so you can close your terminal.

+
+ +
+

Check if everything is running:

+ +

Shows the status of all containers. They should all show "Up" or "running".

+
+ +
+

View logs if something goes wrong:

+ +

Press Ctrl+C to stop watching logs. Replace "backend" with any service name to see its logs.

+
+ +
+

Stop everything and clean up:

+ +

The -v flag removes volumes (databases). Warning: This forces reindexing.

+
+ +

+ Services take 2-5 minutes to fully start up. Your BlockScout explorer will be available at https://{domain || "your-domain.com"}.

+ +

If containers keep restarting, check logs with docker logs [service-name]. Use docker compose restart [service-name] to restart individual services. +

+
+ + +
)} From 91d42f59ba7cf59dca6aaa6b098a46716e8f099d Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Mon, 2 Jun 2025 04:08:30 +0000 Subject: [PATCH 09/12] linit --- toolbox/src/toolbox/Nodes/BlockScout.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/BlockScout.tsx index a6f0d5103e5..238de7ca66a 100644 --- a/toolbox/src/toolbox/Nodes/BlockScout.tsx +++ b/toolbox/src/toolbox/Nodes/BlockScout.tsx @@ -11,7 +11,6 @@ import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; import { dockerInstallInstructions, type OS, nodeConfigBase64 } from "./AvalanchegoDocker"; import { useL1ByChainId } from "../../stores/l1ListStore"; -import { Note } from "../../components/Note"; const genCaddyfile = (domain: string) => ` ${domain} { From 220ebc1428cc3785f30f27077b9a579e516af2d1 Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Mon, 2 Jun 2025 04:09:48 +0000 Subject: [PATCH 10/12] rename --- .../Nodes/{BlockScout.tsx => SelfHostedExplorer.tsx} | 0 toolbox/src/toolbox/ToolboxApp.tsx | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename toolbox/src/toolbox/Nodes/{BlockScout.tsx => SelfHostedExplorer.tsx} (100%) diff --git a/toolbox/src/toolbox/Nodes/BlockScout.tsx b/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx similarity index 100% rename from toolbox/src/toolbox/Nodes/BlockScout.tsx rename to toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx diff --git a/toolbox/src/toolbox/ToolboxApp.tsx b/toolbox/src/toolbox/ToolboxApp.tsx index b0df0956f25..782db8e1e2a 100644 --- a/toolbox/src/toolbox/ToolboxApp.tsx +++ b/toolbox/src/toolbox/ToolboxApp.tsx @@ -374,10 +374,10 @@ const componentGroups: Record = { walletMode: "optional", }, { - id: "blockScout", - label: "BlockScout", - component: lazy(() => import('./Nodes/BlockScout')), - fileNames: ["toolbox/src/toolbox/Nodes/BlockScout.tsx"], + id: "selfHostedExplorer", + label: "Self-Hosted Explorer", + component: lazy(() => import('./Nodes/SelfHostedExplorer')), + fileNames: ["toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx"], walletMode: "testnet-mainnet", } ] From 6bbcb5779dce7e4ccffcb413ab0fced40f3cb19a Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Tue, 3 Jun 2025 05:15:00 +0000 Subject: [PATCH 11/12] nits --- .../src/toolbox/Nodes/SelfHostedExplorer.tsx | 52 +++++++++---------- toolbox/src/toolbox/ToolboxApp.tsx | 14 ++--- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx b/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx index 238de7ca66a..08229c30ebd 100644 --- a/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx +++ b/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx @@ -59,8 +59,8 @@ interface DockerComposeConfig { blockchainId: string; networkName: string; networkShortName: string; - currencyName: string; - currencySymbol: string; + tokenName: string; + tokenSymbol: string; } const genDockerCompose = (config: DockerComposeConfig) => ` @@ -150,8 +150,8 @@ services: NEXT_PUBLIC_NETWORK_SHORT_NAME: ${config.networkShortName} NEXT_PUBLIC_NETWORK_ID: 66666 # TODO: change to dynamic NEXT_PUBLIC_NETWORK_RPC_URL: https://${config.domain}/ext/bc/${config.blockchainId}/rpc - NEXT_PUBLIC_NETWORK_CURRENCY_NAME: ${config.currencyName} - NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ${config.currencySymbol} + NEXT_PUBLIC_NETWORK_CURRENCY_NAME: ${config.tokenName} + NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL: ${config.tokenSymbol} NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS: 18 NEXT_PUBLIC_APP_HOST: ${config.domain} NEXT_PUBLIC_APP_PROTOCOL: https @@ -212,8 +212,8 @@ export default function BlockScout() { const [domain, setDomain] = useState(""); const [networkName, setNetworkName] = useState(""); const [networkShortName, setNetworkShortName] = useState(""); - const [currencyName, setCurrencyName] = useState(""); - const [currencySymbol, setCurrencySymbol] = useState(""); + const [tokenName, setTokenName] = useState(""); + const [tokenSymbol, setTokenSymbol] = useState(""); const [subnetIdError, setSubnetIdError] = useState(null); const [composeYaml, setComposeYaml] = useState(""); const [caddyfile, setCaddyfile] = useState(""); @@ -230,8 +230,8 @@ export default function BlockScout() { if (l1Info) { setNetworkName(l1Info.name); setNetworkShortName(l1Info.name.split(" ")[0]); // First word as short name - setCurrencyName(l1Info.coinName); - setCurrencySymbol(l1Info.coinName); + setTokenName(l1Info.coinName); + setTokenSymbol(l1Info.coinName); } getBlockchainInfo(chainId).then((chainInfo) => { @@ -250,7 +250,7 @@ export default function BlockScout() { }, [domain]); useEffect(() => { - let ready = !!domain && !!subnetId && !!networkName && !!networkShortName && !!currencyName && !!currencySymbol && !domainError && !subnetIdError + let ready = !!domain && !!subnetId && !!networkName && !!networkShortName && !!tokenName && !!tokenSymbol && !domainError && !subnetIdError if (ready) { setCaddyfile(genCaddyfile(domain)); @@ -260,25 +260,25 @@ export default function BlockScout() { blockchainId: chainId, networkName, networkShortName, - currencyName, - currencySymbol + tokenName, + tokenSymbol })); } else { setCaddyfile(""); setComposeYaml(""); } - }, [domain, subnetId, chainId, networkName, networkShortName, currencyName, currencySymbol, domainError, subnetIdError]); + }, [domain, subnetId, chainId, networkName, networkShortName, tokenName, tokenSymbol, domainError, subnetIdError]); return ( <>

Set up Instance

-

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.

+

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.

Docker Installation

@@ -348,17 +348,17 @@ export default function BlockScout() { />
@@ -367,17 +367,17 @@ export default function BlockScout() { {composeYaml && (<>

Caddyfile

-

Put this in a file called Caddyfile in the working directory. compose.yml will be created in the same directory.

+

Create a file named Caddyfile and paste the following code:

Docker Compose

-

Put this in a file called compose.yml in the same directory as your Caddyfile.

+

Create a file named compose.yml in the same directory as your Caddyfile and paste the following code:

-

Start Your Node

+

Start Your Explorer

Navigate to the directory containing your Caddyfile and compose.yml files and run these commands:

diff --git a/toolbox/src/toolbox/ToolboxApp.tsx b/toolbox/src/toolbox/ToolboxApp.tsx index 782db8e1e2a..ce53c179054 100644 --- a/toolbox/src/toolbox/ToolboxApp.tsx +++ b/toolbox/src/toolbox/ToolboxApp.tsx @@ -55,6 +55,13 @@ const componentGroups: Record = { component: lazy(() => import('./L1/ConvertToL1')), fileNames: ["toolbox/src/toolbox/L1/ConvertToL1.tsx"], walletMode: "c-chain" + }, + { + id: "selfHostedExplorer", + label: "Self-Hosted Explorer", + component: lazy(() => import('./Nodes/SelfHostedExplorer')), + fileNames: ["toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx"], + walletMode: "testnet-mainnet", } ] }, @@ -372,13 +379,6 @@ const componentGroups: Record = { component: lazy(() => import('./Nodes/PerformanceMonitor')), fileNames: ["toolbox/src/toolbox/Nodes/PerformanceMonitor.tsx"], walletMode: "optional", - }, - { - id: "selfHostedExplorer", - label: "Self-Hosted Explorer", - component: lazy(() => import('./Nodes/SelfHostedExplorer')), - fileNames: ["toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx"], - walletMode: "testnet-mainnet", } ] }, From a7507624538eb6cf7895893301196590eeccfcff Mon Sep 17 00:00:00 2001 From: Containerman17 <8990432+containerman17@users.noreply.github.com> Date: Tue, 3 Jun 2025 05:15:43 +0000 Subject: [PATCH 12/12] move SelfHostedExplorer --- toolbox/src/toolbox/{Nodes => L1}/SelfHostedExplorer.tsx | 2 +- toolbox/src/toolbox/ToolboxApp.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename toolbox/src/toolbox/{Nodes => L1}/SelfHostedExplorer.tsx (99%) diff --git a/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx b/toolbox/src/toolbox/L1/SelfHostedExplorer.tsx similarity index 99% rename from toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx rename to toolbox/src/toolbox/L1/SelfHostedExplorer.tsx index 08229c30ebd..684d34cc960 100644 --- a/toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx +++ b/toolbox/src/toolbox/L1/SelfHostedExplorer.tsx @@ -9,7 +9,7 @@ import versions from "../../versions.json"; import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; import { Steps, Step } from "fumadocs-ui/components/steps"; import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock'; -import { dockerInstallInstructions, type OS, nodeConfigBase64 } from "./AvalanchegoDocker"; +import { dockerInstallInstructions, type OS, nodeConfigBase64 } from "../Nodes/AvalanchegoDocker"; import { useL1ByChainId } from "../../stores/l1ListStore"; const genCaddyfile = (domain: string) => ` diff --git a/toolbox/src/toolbox/ToolboxApp.tsx b/toolbox/src/toolbox/ToolboxApp.tsx index ce53c179054..371431bffbc 100644 --- a/toolbox/src/toolbox/ToolboxApp.tsx +++ b/toolbox/src/toolbox/ToolboxApp.tsx @@ -59,7 +59,7 @@ const componentGroups: Record = { { id: "selfHostedExplorer", label: "Self-Hosted Explorer", - component: lazy(() => import('./Nodes/SelfHostedExplorer')), + component: lazy(() => import('./L1/SelfHostedExplorer')), fileNames: ["toolbox/src/toolbox/Nodes/SelfHostedExplorer.tsx"], walletMode: "testnet-mainnet", }