import { toCapsSnakeCase } from "./utils"; import * as base from "@wormhole-foundation/sdk-base"; const { chains, chainToChainId } = base.chain; console.log( `// SPDX-License-Identifier: Apache 2 pragma solidity ^0.8.0; // This file is auto-generated by gen/chains.ts. // In the wormhole wire format, 0 indicates that a message is for any destination chain uint16 constant CHAIN_ID_UNSET = 0;`); for (const chain of chains) console.log(`uint16 constant CHAIN_ID_${toCapsSnakeCase(chain)} = ${chainToChainId(chain)};`);