index.ts


Overview

This file serves as the Pulumi deployment entrypoint script for the **Arbitrum** blockchain coinstack within the ShapeShift Unchained platform. It automates the provisioning of Kubernetes resources required to run Arbitrum's blockchain node ("daemon") and indexer services by:

The script tailor-fits the deployment parameters specifically for the Arbitrum blockchain node and its indexer, enabling reliable, scalable, and maintainable infrastructure management.


Detailed Explanation

Exported Asynchronous Default Function

export = async (): Promise<Outputs> => { ... }

Key Imported Entities


Important Implementation Details


Usage Example

This file is not directly invoked by developers but is executed by Pulumi during infrastructure deployment:

pulumi up

The Pulumi CLI discovers this `index.ts` file as the deployment entrypoint for the Arbitrum coinstack, runs the exported async function, and provisions all Kubernetes resources accordingly.


Interaction with Other System Components


Mermaid Diagram: Flowchart of index.ts Deployment Workflow

flowchart TD
  A[Start Pulumi Deployment] --> B[Read sample.env file]
  B --> C[Retrieve Kubernetes config, namespace via getConfig()]
  C --> D[Map statefulService.services to CoinServiceArgs]
  D --> E{Service Name}
  E -->|daemon| F[Configure daemon ports, env vars, ConfigMaps, volume mounts, probes]
  E -->|indexer| G[Apply defaultBlockbookServiceArgs and indexer config]
  E -->|other| H[Throw Error: Unsupported service]
  F --> I[Collect all CoinServiceArgs]
  G --> I
  I --> J[Invoke deployCoinstack with deployment args]
  J --> K[Deploy StatefulSets, Services, ConfigMaps to Kubernetes]
  K --> L[Pods start, run probes, mount volumes]
  L --> M[Daemon connects to L1 Ethereum RPC & Beacon]
  L --> N[Indexer indexes blockchain data]
  M & N --> O[Deployment complete, Outputs returned]

Summary

The `index.ts` file is the Arbitrum blockchain coinstack Pulumi deployment script that orchestrates the setup of daemon and indexer services in Kubernetes. It leverages shared deployment infrastructure, applies Arbitrum-specific configurations, and ensures robust service health management. This modular approach fits into the broader Multi-Blockchain Coinstacks system, enabling consistent multi-chain infrastructure provisioning on the ShapeShift Unchained platform.