Skip to content

native token mapping #9

Description

@gabririgo

src/services/oraclePool.ts

Comment on lines +43 to +51

/** Chain-native token symbol for user-facing strings. */
const NATIVE_TOKEN: Record<number, string> = {
  1: "ETH", 10: "ETH", 130: "ETH", 8453: "ETH", 42161: "ETH",
  56: "BNB", 137: "POL",
};

export function getNativeTokenSymbol(chainId: number): string {
  return NATIVE_TOKEN[chainId] || "ETH";
}

NATIVE_TOKEN/getNativeTokenSymbol() duplicates native-symbol maps that already exist elsewhere (e.g. src/services/execution.ts and ad-hoc maps in src/services/crosschain.ts, src/llm/client.ts, src/services/uniswapLP.ts). Consider centralizing this into a single exported helper/const to avoid symbol drift across features (especially as new chains/testnets get added).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions