### Install and Run React App Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/warp-widget/examples/README.md Instructions for setting up and running the React application example. This involves navigating to the directory, installing dependencies, and starting the development server. ```bash cd react-app pnpm install pnpm dev ``` -------------------------------- ### Run Example Binary Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md Run a specific example binary included in the project. Replace `example` with the desired example's name. ```bash cargo run --example example ``` -------------------------------- ### Setup PostgreSQL Database for Scraper Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/main/agents/scraper/README.md Use this command to start a PostgreSQL database container for local testing. Ensure Docker is installed and running. ```bash docker run --name scraper -e POSTGRES_PASSWORD=47221c18c610 -p 5432:5432 -d postgres ``` ```bash # optionally to connect docker exec -it scraper /usr/bin/psql -U postgres ``` ```bash # and to shutdown docker stop scraper docker rm -v scraper ``` -------------------------------- ### Local Development Setup for Key Funder Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/keyfunder/README.md Build and run the Key Funder service locally for development. This involves building the project and then starting the development server with required environment variables. ```bash # Build pnpm build # Run locally KEYFUNDER_CONFIG_FILE=./config.yaml HYP_KEY=0x... RPC_URL_ETHEREUM=https://... pnpm start:dev ``` -------------------------------- ### Install Foundry Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/README.md Installs Foundry, a toolkit for Ethereum application development, using foundryup. ```bash curl -L https://foundry.paradigm.xyz | bash foundryup --install $(cat solidity/.foundryrc) ``` -------------------------------- ### Install Dependencies Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/ccip-server/README.md Install project dependencies using pnpm or npm. Navigate to the ccip-server directory first. ```bash cd typescript/ccip-server pnpm install # or `npm install` ``` -------------------------------- ### Install CLI Globally Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Build the CLI locally and then install it globally using `npm link`. ```bash pnpm -C typescript/cli build && npm link ``` -------------------------------- ### Install Foundry Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer-sim/README.md Instructions for installing Foundry, a prerequisite for running integration tests that require Anvil. ```bash curl -L https://foundry.paradigm.xyz | bash && foundryup ``` -------------------------------- ### Start Development Server Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/http-registry-server/README.md Start the development server in a separate terminal after running the 'dev' command. Specify the registry path as an argument. ```bash # From typescript/http-registry-server pnpm start:dev -- --registry path/to/registry ``` -------------------------------- ### Install Hyperlane Cosmos SDK Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cosmos-sdk/README.md Install the SDK using NPM or pnpm. Ensure you have Node.js 18 or newer. ```bash # Install with NPM npm install @hyperlane-xyz/cosmos-sdk # Or with pnpm pnpm add @hyperlane-xyz/cosmos-sdk ``` -------------------------------- ### Install and Build Rebalancer Package Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer/README.md Install dependencies and build the rebalancer package from the monorepo. ```bash # From monorepo root pnpm install # Build the package pnpm --filter @hyperlane-xyz/rebalancer build ``` -------------------------------- ### Install @hyperlane-xyz/warp-widget Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/warp-widget/README.md Install the warp-widget package using pnpm or npm. ```bash pnpm add @hyperlane-xyz/warp-widget # or npm install @hyperlane-xyz/warp-widget ``` -------------------------------- ### Basic Rebalancer Simulation Setup Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer-sim/README.md Load a scenario, initialize the simulation harness with an RPC endpoint and initial collateral, and run a simulation using a specified runner and configuration. ```typescript import { RebalancerSimulationHarness, ScenarioLoader, SimpleRunner, } from '@hyperlane-xyz/rebalancer-sim'; // Load scenario from JSON const scenario = ScenarioLoader.loadScenario('balanced-bidirectional'); // Create and initialize harness (deploys contracts on anvil) const harness = new RebalancerSimulationHarness({ anvilRpc: 'http://localhost:8545', initialCollateralBalance: BigInt(scenario.defaultInitialCollateral), }); await harness.initialize(); // Run simulation const result = await harness.runSimulation(scenario, new SimpleRunner(), { bridgeConfig: scenario.defaultBridgeConfig, timing: scenario.defaultTiming, strategyConfig: scenario.defaultStrategyConfig, }); console.log(`Completion: ${result.kpis.completionRate * 100}%`); console.log(`Avg Latency: ${result.kpis.averageLatency}ms`); console.log(`Rebalances: ${result.kpis.totalRebalances}`); ``` -------------------------------- ### Install Hyperlane Aleo SDK Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/aleo-sdk/README.md Install the SDK using NPM or pnpm. Node.js 18 or newer is required. ```bash # Install with NPM npm install @hyperlane-xyz/aleo-sdk # Or with pnpm pnpm add @hyperlane-xyz/aleo-sdk ``` -------------------------------- ### Install Hyperlane Cosmos Types Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cosmos-types/README.md Install the package using NPM or pnpm. ```bash # Install with NPM npm install @hyperlane-xyz/cosmos-types # Or with pnpm pnpm add @hyperlane-xyz/cosmos-types ``` -------------------------------- ### Install Hyperlane Radix SDK Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/radix-sdk/README.md Install the SDK using NPM or pnpm. Node.js 18 or newer is required. ```bash # Install with NPM npm install @hyperlane-xyz/radix-sdk # Or with pnpm pnpm add @hyperlane-xyz/radix-sdk ``` -------------------------------- ### Install cargo-expand Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md Installs the `cargo-expand` tool, which is useful for debugging macros by showing generated code. ```bash cargo install cargo-expand ``` -------------------------------- ### Install Hyperlane TRON SDK Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/tron-sdk/README.md Install the SDK using NPM or pnpm. Ensure you have Node.js 18 or newer. ```bash # Install with NPM npm install @hyperlane-xyz/tron-sdk # Or with pnpm pnpm add @hyperlane-xyz/tron-sdk ``` -------------------------------- ### Run Local Development Environment Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Start a local development environment with local chains and agents running. ```bash cd rust/main && cargo run --release --bin run-locally ``` -------------------------------- ### Install and Build Relayer Package Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/relayer/README.md Install dependencies and build the relayer package from the monorepo root. ```bash pnpm install ``` ```bash pnpm --filter @hyperlane-xyz/relayer build ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/ccip-server/README.md Copy the example environment file and edit it for your environment. For local development, use SQLite. For production, use a hosted SQL database and optionally override the registry URI. ```bash cp .env.example .env ``` ```env # Use SQLite file for dev DATABASE_URL="file:./dev.db" # Optional: override default registries (comma-separated) REGISTRY_URI="https://raw.githubusercontent.com/hyperlane-xyz/registry/main" ``` -------------------------------- ### Run Server in Production Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/ccip-server/README.md Deploy the server in production. This involves applying migrations without prompts and then starting the compiled server. ```bash # Apply migrations without prompts NODE_ENV=production \ DATABASE_URL="" \ npx prisma migrate deploy # Start the compiled server NODE_ENV=production pnpm start ``` -------------------------------- ### Install pnpm Dependencies Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/README.md Installs all project dependencies using pnpm within the monorepo. ```bash pnpm install ``` -------------------------------- ### Install Hyperlane Starknet Core Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/starknet/README.md Install the package using NPM or pnpm. Ensure Node.js 18 or newer is used. ```bash # Install with NPM npm install @hyperlane-xyz/starknet-core # Or with pnpm pnpm add @hyperlane-xyz/starknet-core ``` -------------------------------- ### Scenario File Format Example Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer-sim/README.md Example JSON structure for defining a rebalancer simulation scenario, including metadata, chains, transfers, and default configurations. ```json { "name": "extreme-drain-chain1", "description": "Tests rebalancer response when one chain is rapidly drained.", "expectedBehavior": "95% of transfers go TO chain1, draining collateral...", "duration": 10000, "chains": ["chain1", "chain2", "chain3"], "transfers": [...], "defaultInitialCollateral": "100000000000000000000", "defaultTiming": { "bridgeDeliveryDelay": 500, "rebalancerPollingFrequency": 1000, "userTransferInterval": 100 }, "defaultBridgeConfig": {}, "defaultStrategyConfig": {}, "expectations": { "minCompletionRate": 0.9, "shouldTriggerRebalancing": true } } ``` -------------------------------- ### Starting Rebalancer with Test Configuration Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer/README.md Command to start the Hyperlane Rebalancer in development mode with a specified test configuration file and Hyperlane key. ```bash # Start with test config HYP_KEY=your_test_key \ REBALANCER_CONFIG_FILE=./test-config.yaml \ pnpm --filter @hyperlane-xyz/rebalancer start:dev ``` -------------------------------- ### KeyFunder Configuration Example Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/keyfunder/README.md Example YAML configuration for the KeyFunder service. Defines roles, chain-specific balances, IGP claim thresholds, and fund sweeping parameters. ```yaml version: '1' # Roles define WHO gets funded (address defined once, reused across chains) roles: hyperlane-relayer: address: '0x74cae0ecc47b02ed9b9d32e000fd70b9417970c5' hyperlane-rebalancer: address: '0xdef456...' # Chains define HOW MUCH each role gets (balances reference role names) chains: ethereum: balances: hyperlane-relayer: '0.5' hyperlane-rebalancer: '0.4' igp: address: '0x6cA0B6D43F8e45C82e57eC5a5F2Bce4bF2b6F1f7' claimThreshold: '0.2' sweep: enabled: true address: '0x478be6076f31E9666123B9721D0B6631baD944AF' threshold: '0.3' targetMultiplier: 1.5 triggerMultiplier: 2.0 arbitrum: balances: hyperlane-relayer: '0.1' igp: address: '0x3b6044acd6767f017e99318AA6Ef93b7B06A5a22' claimThreshold: '0.1' metrics: jobName: 'keyfunder-mainnet3' labels: environment: 'mainnet3' chainsToSkip: [] ``` -------------------------------- ### Install Clippy Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md Installs `clippy` as a Rust toolchain component for linting and identifying code patterns. ```bash rustup component add clippy ``` -------------------------------- ### Install cargo-tree Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md Installs the `cargo-tree` extension for visualizing dependency trees. Useful for searching specific packages. ```bash cargo install cargo-tree ``` -------------------------------- ### Start Rebalancer Service in Daemon Mode Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer/README.md Run the rebalancer as a continuous service. Ensure environment variables for configuration, private key, and API keys are set. ```bash # Set environment variables export REBALANCER_CONFIG_FILE=/path/to/rebalancer-config.yaml export HYP_KEY=your_private_key export COINGECKO_API_KEY=your_api_key # Start the service pnpm --filter @hyperlane-xyz/rebalancer start # Or with direct node node dist/service.js ``` -------------------------------- ### Install New Packages for AltVM Features Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/2025-11-20-multi-vm-migration.md External consumers using AltVM features need to install the new provider-sdk and deploy-sdk packages. ```bash yarn add @hyperlane-xyz/provider-sdk@^0.3.0 yarn add @hyperlane-xyz/deploy-sdk@^0.3.0 ``` -------------------------------- ### Install Typos CLI Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/README.md Installs the typos-cli for spell checking. Use your package manager or cargo. ```bash # macOS brew install typos-cli # or via cargo cargo install typos-cli --locked ``` -------------------------------- ### Install Node Version Manager (nvm) Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/README.md Installs nvm to manage Node.js versions. Recommended for managing Node.js v24. ```bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash nvm install 24 nvm use 24 ``` -------------------------------- ### Install Hyperlane SDK with pnpm Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/README.md Install the Hyperlane SDK using pnpm. Note that this package uses ESM Modules. ```bash pnpm add @hyperlane-xyz/sdk ``` -------------------------------- ### Install Hyperlane SDK with NPM Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/README.md Install the Hyperlane SDK using NPM. Note that this package uses ESM Modules. ```bash npm install @hyperlane-xyz/sdk ``` -------------------------------- ### YAML Configuration Example Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/relayer/README.md Example of a YAML configuration file for the relayer service, specifying chains, whitelisted addresses, retry timeouts, and cache file paths. ```yaml chains: - ethereum - arbitrum - optimism whitelist: ethereum: - '0x1234...' arbitrum: - '0x5678...' retryTimeout: 1000 cacheFile: ./relayer-cache.json ``` -------------------------------- ### Run Hyperlane CLI from Source Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/README.md Clone the Hyperlane monorepo, install dependencies, build the project, and run the CLI from the local source code. ```bash git clone https://github.com/hyperlane-xyz/hyperlane-monorepo.git cd hyperlane-monorepo pnpm install && pnpm build cd typescript/cli pnpm hyperlane ``` -------------------------------- ### Start Fee-Quoting HTTP Server Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/offchain-fee-quoting.md Starts the fee-quoting HTTP server using a TypeScript script. Ensure the HYP_KEY environment variable is set and specify warp route IDs, registry, API keys, quote mode, and port. ```bash pnpm -C typescript/fee-quoting exec tsx scripts/run-server.ts \ --signer-key $HYP_KEY \ --warp-route-ids \ --registry http://localhost:8535 \ --api-keys test-key \ --quote-mode transient \ --port 3001 ``` -------------------------------- ### Example AI Agent Analysis Requests Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/operational-debugging.md These are example natural language prompts for an AI agent to analyze logs for specific operational issues. ```text "Check message 0xabc123... processing status" ``` ```text "Find CouldNotFetchMetadata errors in the last 2 hours" ``` ```text "Look for RPC errors affecting polygon in the last hour" ``` ```text "Show messages with 5+ retries stuck in queue" ``` ```text "Check validator issues preventing message confirmation" ``` ```text "Find relayer balance warnings on arbitrum" ``` ```text "Show Lander transaction submission errors" ``` ```text "Are there 503 RPC errors in the last 30 minutes?" ``` ```text "Debug EZETH/renzo-prod queue length > 0 alert on Linea" ``` ```text "Why are messages stuck with gas estimation errors?" ``` -------------------------------- ### Vanilla JS Usage Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/warp-widget/README.md Example of how to create and manage the Warp widget using Vanilla JavaScript. ```APIDOC ## createWarpWidget (Vanilla JS Function) ### Description The `createWarpWidget` function initializes the Warp bridge widget in a specified DOM container. It allows for configuration and provides methods to interact with the widget, such as listening for events and destroying the widget instance. ### Parameters #### `options` (object) - Required An object containing the configuration for the widget. ##### `container` (HTMLElement) - Required The DOM element where the widget will be mounted. ##### `config` (WarpWidgetConfig) - Optional Configuration object for the widget, including theme, defaults, and routes. ##### `width` (string) - Optional Specifies the width of the widget iframe. Defaults to '100%'. ##### `height` (string) - Optional Specifies the height of the widget iframe. Defaults to '600px'. ### Returns An object with the following methods: - `iframe`: The iframe element of the widget. - `destroy`: A function to remove the widget from the DOM. - `on`: A function to subscribe to widget events. ### Example ```ts import { createWarpWidget } from '@hyperlane-xyz/warp-widget'; const container = document.getElementById('widget-root'); if (!container) throw new Error('missing #widget-root'); const widget = createWarpWidget({ container, config: { theme: { accent: '3b82f6', mode: 'dark' }, defaults: { origin: 'ethereum', destination: 'base' }, }, }); widget.on('ready', (payload) => { console.log('Widget ready at', payload?.timestamp); }); // Cleanup widget.destroy(); ``` ``` -------------------------------- ### Funding Pseudocode Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/solidity/contracts/token/README.md Example pseudocode demonstrating how to fund a transfer, including quoting fees and approving tokens. ```APIDOC ### Funding Pseudocode This pseudocode illustrates the process of funding a cross-chain transfer, including fee quoting and token approvals. ```solidity // Quote the fees for the transfer Quotes[] memory quotes = tokenRouter.quoteTransferRemote(destination, recipient, amount); // Extract the fee for the native token uint256 nativeFee = quotes.extract(address(0)); // Get the address of the token router and the fee token address token = tokenRouter.token(); uint256 tokenFee = quotes.extract(token); // Approve the token router to spend the fee token IERC20(token).approve(tokenRouter, tokenFee); // Execute the remote transfer, including the native fee as gas tokenRouter.transferRemote{value: nativeFee}(destination, recipient, amount); ``` ``` -------------------------------- ### Run Server in Development Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/ccip-server/README.md Start the server in development mode with auto-reloading enabled. This command runs `tsx watch src/server.ts`. ```bash pnpm dev # runs `tsx watch src/server.ts` ``` -------------------------------- ### Build Mailbox Program Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/sealevel/programs/mailbox/README.md Builds the Mailbox program for the SBF architecture. Ensure you have the necessary build tools installed. ```bash cargo build-sbf --arch sbf ``` -------------------------------- ### React Usage Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/warp-widget/README.md Example of how to integrate the HyperlaneWarpWidget component into a React application. ```APIDOC ## HyperlaneWarpWidget (React Component) ### Description The `HyperlaneWarpWidget` React component allows you to embed the Warp bridge UI directly into your React application. It accepts configuration options for theme, default settings, and available routes, as well as an event handler. ### Props #### `config` (WarpWidgetConfig) - Optional Configuration object for the widget, including theme, defaults, and routes. #### `onEvent` ((event) => void) - Optional A callback function that is invoked when the widget emits an event. #### `width` (string) - Optional Specifies the width of the widget iframe. Defaults to '100%'. #### `height` (string) - Optional Specifies the height of the widget iframe. Defaults to '600px'. #### `className` (string) - Optional CSS class to apply to the widget container. #### `style` (CSSProperties) - Optional Inline styles to apply to the widget container. ### Example ```tsx import { HyperlaneWarpWidget } from '@hyperlane-xyz/warp-widget/react'; function App() { return ( console.log('Widget event:', event)} width="420px" height="600px" /> ); } ``` ``` -------------------------------- ### HTML Timeline Visualization Example Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer-sim/README.md Conceptual representation of the HTML timeline visualization generated by the simulator, showing chain activity and transfer flows. ```text Time → ═══════════════════════════════════════════════════════════════════ chain1 │ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ (balance curve) │ ──▶ T1 ──▶ T3 ←── R1 (rebalance from chain2) ───────┼─────────────────────────────────────────────────────────── chain2 │ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ │ ──▶ T2 R1 ──▶ ═══════════════════════════════════════════════════════════════════ ``` -------------------------------- ### Standalone Daemon (K8s Service) Setup Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/relayer/README.md Configure environment variables for running the relayer as a standalone daemon service, suitable for Kubernetes deployments. Ensure private keys and chain configurations are set. ```bash export HYP_KEY=your_private_key export RELAYER_CHAINS=ethereum,arbitrum export RELAYER_CACHE_FILE=/data/relayer-cache.json node dist/fs/service.js ``` -------------------------------- ### Install Hyperlane Widgets with npm or pnpm Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/widgets/README.md Install the Hyperlane Widgets package using either npm or pnpm. Ensure you have the peer dependencies installed. ```sh # Install with npm npm install @hyperlane-xyz/widgets # Or install with pnpm pnpm add @hyperlane-xyz/widgets ``` -------------------------------- ### Setup Inventory Signer Balances with Builder Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer/src/e2e/E2E_TEST_CONVENTIONS.md Use `withInventorySignerBalances` on the builder to set signer wallet balances. Presets are preferred for common scenarios, but inline configurations are accepted for one-off cases. Avoid directly calling `anvil_setBalance` on the inventory signer. ```typescript const context = await new TestRebalancerBuilder(deploymentManager, multiProvider) .withStrategy(buildInventoryMinAmountStrategyConfig(addresses)) .withInventoryConfig({ inventorySignerKey: ANVIL_USER_PRIVATE_KEY, nativeDeployedAddresses }) .withInventorySignerBalances('SIGNER_PARTIAL_ANVIL2') .withExecutionMode('execute') .build(); ``` ```typescript .withInventorySignerBalances({ anvil2: BigNumber.from('500000000000000000') }) ``` ```typescript const signer = new ethers.Wallet(ANVIL_USER_PRIVATE_KEY); await provider.send('anvil_setBalance', [signer.address, '0x...']); ``` -------------------------------- ### Build, Test, and Format All Packages Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Run these commands to build, test, lint, and format the entire Hyperlane monorepo. ```bash pnpm build ``` ```bash pnpm test ``` ```bash pnpm lint && pnpm format ``` -------------------------------- ### Generate and Open Documentation Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md Generate project documentation and open it in a web browser. This command is useful for exploring the codebase's API. ```bash cargo doc --open ``` -------------------------------- ### Display Core Deploy Help Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Show the help menu for the `hyperlane core deploy` command. ```bash hyperlane core deploy --help ``` -------------------------------- ### Run Notion MCP Server Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/mcp-server-setup.md Command to set up the Notion MCP server. It requires the base URL for the Notion MCP service. ```bash claude mcp add notion https://mcp.notion.com/mcp ``` -------------------------------- ### Launch Prisma Studio Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/ccip-server/README.md Optionally, launch Prisma Studio to browse and inspect the SQLite database. It runs on http://localhost:5555. ```bash npm run prisma:studio ``` -------------------------------- ### Run Server in Development Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/http-registry-server/README.md Run the server in development mode with hot-reloading and pretty-printed logs. Specify the registry path as an argument. ```bash # From typescript/http-registry-server pnpm dev -- --registry path/to/registry ``` -------------------------------- ### Build Solidity Contracts Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Use this command to specifically build the Solidity contracts. ```bash pnpm -C solidity build ``` -------------------------------- ### Generate Prisma Client and Run Migrations Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/ccip-server/README.md Generate the Prisma client and apply database migrations. This is necessary for database schema management. ```bash npx prisma generate npx prisma migrate dev --name init ``` -------------------------------- ### Install Hyperlane Utils with pnpm Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/utils/README.md Install the Hyperlane Utils package using pnpm. This package utilizes ESM Modules. ```bash pnpm add @hyperlane-xyz/utils ``` -------------------------------- ### Install Hyperlane Utils with NPM Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/utils/README.md Install the Hyperlane Utils package using NPM. This package utilizes ESM Modules. ```bash npm install @hyperlane-xyz/utils ``` -------------------------------- ### Initialize and Use Radix SDK Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/radix-sdk/README.md Initialize the SDK with a private key for signing transactions or without for queries. Use this to create and interact with mailboxes on a Radix chain. ```typescript import { RadixSDK, RadixSigningSDK } from "@hyperlane-xyz/radix-sdk"; const signingSdk = await RadixSigningSDK.fromPrivateKey( PRIV_KEY, { networkId: NetworkId.Stokenet, }, ); const mailboxAddress = await signingSdk.tx.createMailbox({ domain_id: 75898670 }); const mailbox = await signingSdk.query.getMailbox({ mailbox: mailboxAddress }); ... // performing queries without signer const sdk = new RadixSDK({ networkId: NetworkId.Stokenet, }) const mailbox = await signingSdk.query.getMailbox({ mailbox: mailboxAddress }); ``` -------------------------------- ### Install Hyperlane Core with pnpm Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/solidity/README.md Install the Hyperlane Core package using pnpm. This package utilizes ESM Modules. ```bash # Or with pnpm pnpm add @hyperlane-xyz/core ``` -------------------------------- ### Create MCP Credentials Directory Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/mcp-server-setup.md Before setting up MCP servers, create the necessary directory for credentials and add required keys. ```bash mkdir -p ~/.mcp # Add your Google Cloud service account key to ~/.mcp/claude-logging-key.json # Add your Grafana API key to ~/.mcp/grafana-service-account.key ``` -------------------------------- ### Install Hyperlane Core with NPM Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/solidity/README.md Install the Hyperlane Core package using NPM. This package utilizes ESM Modules. ```bash # Install with NPM npm install @hyperlane-xyz/core ``` -------------------------------- ### List MCP Servers and Verify Connection Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/mcp-server-setup.md After setting up servers, use this command to list them and verify their connection status. All servers should show '✓ Connected'. ```bash claude mcp list # All servers should show "✓ Connected" ``` -------------------------------- ### Install Rosetta 2 on Apple Silicon Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md If you are using a device with an Apple Silicon processor, you may need to install Rosetta 2. ```bash softwareupdate --install-rosetta --agree-to-license ``` -------------------------------- ### Display CLI Help Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Show the main help menu for the Hyperlane CLI. ```bash hyperlane --help ``` -------------------------------- ### Initialize Scraper Database Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/main/agents/scraper/README.md Run this command from the `rust` directory to initialize the scraper database schema. ```bash cargo run --package migration --bin init-db ``` -------------------------------- ### Install Hyperlane CLI Globally Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/README.md Install the Hyperlane CLI globally using NPM. This command also shows how to uninstall older versions. ```bash # Install with NPM npm install -g @hyperlane-xyz/cli # Or uninstall old versions npm uninstall -g @hyperlane-xyz/cli ``` -------------------------------- ### Run Google Cloud MCP Server Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/mcp-server-setup.md Use this command to set up and run the Google Cloud MCP server. Ensure your Google Cloud service account key is correctly placed. ```bash claude mcp add google-cloud-mcp -- docker run -i \ -e GOOGLE_APPLICATION_CREDENTIALS=/credentials/gcp-service-key.json \ -e GOOGLE_CLOUD_PROJECT=abacus-labs-dev \ -v ~/.mcp/gcp-service-key.json:/credentials/gcp-service-key.json \ us-east1-docker.pkg.dev/abacus-labs-dev/hyperlane/mcp-google-cloud:latest ``` -------------------------------- ### Generate Solidity Gas Snapshots Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Create gas snapshots for Solidity contracts. ```bash pnpm -C solidity gas ``` -------------------------------- ### Run Local Binary with Copied Environment Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/rust/README.md Execute a local binary using environment variables copied from a pod. Ensure `HYP_DB` and other necessary variables are set. ```bash env $(cat ./config/validator.fuji.env | grep -v "#" | xargs) ./target/debug/validator ``` -------------------------------- ### Run Grafana MCP Server Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/mcp-server-setup.md This command sets up the Grafana MCP server. It requires your Grafana URL and API key, which is read from a file. ```bash claude mcp add grafana -- docker run -i \ -e GRAFANA_URL=https://abacusworks.grafana.net/ \ -e GRAFANA_API_KEY=$(cat ~/.mcp/grafana-service-account.key) \ mcp/grafana -t stdio ``` -------------------------------- ### Display Warp Deploy Help Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Show the help menu for the `hyperlane warp deploy` command. ```bash hyperlane warp deploy --help ``` -------------------------------- ### Get All Validators for a Chain Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/operational-debugging.md Use `grep` to extract all validator entries for a specific chain from the `multisigIsm.ts` file. ```bash # Get all validators for a specific chain grep -A 20 "ethereum:" typescript/sdk/src/consts/multisigIsm.ts ``` -------------------------------- ### Deploy Offchain Lookup Server to Testnet Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/infra/helm/offchain-lookup-server/Readme.md Use this command to deploy the offchain-lookup-server to the testnet environment. Ensure `values.yaml` and `values-testnet.yaml` are correctly configured. ```shell helm upgrade --install offchain-lookup-server . -f values.yaml -f values-testnet.yaml --namespace testnet4 ``` -------------------------------- ### Changeset Style Guide Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Describes the preferred past-tense format for changeset descriptions, focusing on what changed rather than the action itself. ```text # Good The registry code is restructured by moving filesystem components to a dedicated directory. # Bad Restructures the registry code. ``` -------------------------------- ### Generate Scenarios Command Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/rebalancer-sim/README.md Command to generate scenario JSON files for simulations. This is typically a one-time setup step. ```bash pnpm generate-scenarios ``` -------------------------------- ### Deploy Offchain Lookup Server to Mainnet Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/infra/helm/offchain-lookup-server/Readme.md Use this command to deploy the offchain-lookup-server to the mainnet environment. Ensure `values.yaml` and `values-mainnet.yaml` are correctly configured. ```shell helm upgrade --install offchain-lookup-server . -f values.yaml -f values-mainnet.yaml --namespace mainnet3 ``` -------------------------------- ### Query Relayer Balance Warnings Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/operational-debugging.md This is an example of a prompt to ask Claude to check for relayer funding issues on a specific chain. ```text Is the relayer running out of funds on [CHAIN]? Check balance warnings. ``` -------------------------------- ### Run Solidity Tests Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Execute tests for Solidity smart contracts using either Hardhat or Forge. ```bash pnpm -C solidity test ``` -------------------------------- ### Format All Packages Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/AGENTS.md Apply code formatting to all packages in the monorepo. ```bash pnpm format ``` -------------------------------- ### Query Validator Inconsistency Alerts Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/operational-debugging.md This is an example of a prompt to ask Claude to check for validator inconsistencies affecting metadata for a specific origin chain. ```text Are there validator inconsistencies causing metadata delays for [ORIGIN_CHAIN]? ``` -------------------------------- ### Check Lander Transaction Submission Errors Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/operational-debugging.md This is an example of a prompt to ask Claude to investigate transaction submission failures caused by Lander issues. ```text Are there any Lander errors causing transaction submission failures? ``` -------------------------------- ### Run Hyperlane Explorer MCP Server Source: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/docs/ai-agents/mcp-server-setup.md Command to set up the Hyperlane Explorer MCP server. It requires the GraphQL endpoint and schema path. ```bash claude mcp add hyperlane-explorer -- docker run -i \ -e ENDPOINT=https://explorer4.hasura.app/v1/graphql \ -e SCHEMA=/usr/src/app/schema/hyperlane-schema.graphql \ us-east1-docker.pkg.dev/abacus-labs-dev/hyperlane/mcp-graphql:latest ```