Skip to content

@sei-js/precompiles: sei and seiTestnet chain exports missing from source, will be dropped on next release #314

Closed as not planned

Description

@monty-sei

Summary

The published v2.1.2 dist exports sei, seiTestnet, and seiDevnet chain definitions from @sei-js/precompiles, but these are not present in the current source. The dist is a stale artifact inherited from the @sei-js/evm rename and was never rebuilt from the new source. When the package is next built and published, these exports will silently disappear.

Details

packages/precompiles/src/viem/chain.ts currently only exports seiLocal:

export const seiLocal = defineChain({
  id: 713714,
  name: 'Sei Local',
  ...
});

But the published v2.1.2 dist (dist/types/viem/chain.d.ts) declares:

export declare const sei: { ... };      // mainnet, chain ID 1329
export declare const seiTestnet: { ... }; // testnet, chain ID 1328
export declare const seiDevnet: { ... };  // devnet, chain ID 713715
export declare const seiLocal: { ... };   // local, chain ID 713714

The rename commit (b888b94e) carried over a stale dist from @sei-js/evm which had these definitions. The source for @sei-js/evm also only had seiLocal — so these were already stale before the rename.

Impact

Any project importing chain config from @sei-js/precompiles:

import { sei, seiTestnet } from '@sei-js/precompiles';

works today against the published package but will break silently on the next release when the package is rebuilt from source.

Suggested fix

Add sei, seiTestnet, and seiDevnet back to packages/precompiles/src/viem/chain.ts explicitly, so the exports are intentional and version-controlled:

import { defineChain } from 'viem';

export const sei = defineChain({
  id: 1329,
  name: 'Sei Network',
  nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 },
  rpcUrls: {
    default: {
      http: ['https://evm-rpc.sei-apis.com'],
      webSocket: ['wss://evm-ws.sei-apis.com'],
    },
  },
  blockExplorers: {
    default: {
      name: 'Seiscan',
      url: 'https://seiscan.io',
    },
  },
});

export const seiTestnet = defineChain({
  id: 1328,
  name: 'Sei Testnet',
  testnet: true,
  nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 },
  rpcUrls: {
    default: {
      http: ['https://evm-rpc-testnet.sei-apis.com'],
      webSocket: ['wss://evm-ws-testnet.sei-apis.com'],
    },
  },
  blockExplorers: {
    default: {
      name: 'Seiscan',
      url: 'https://testnet.seiscan.io',
    },
  },
});

export const seiLocal = defineChain({ ... }); // existing

Note: the block explorer should reference Seiscan (seiscan.io), not Seitrace — the stale dist still has seitrace.com.

Activity

  1. self-assigned this
    on May 20, 2026
  2. github-actions commented on Aug 6, 2026

    @github-actions
    Contributor

    Thank you for opening this issue and taking the time to share your thoughts.
    We’d love to keep moving this forward, but we need a bit more information from you.
    Please add any additional details within the next 2 day(s) so we can continue collaborating on a solution together.
    If we don’t hear back, the issue will close automatically — but you’re always welcome to reopen it when you’re ready.

  3. alexander-sei commented on Aug 15, 2026

    @alexander-sei
    Collaborator

    Closing because the regression premise is incorrect. I verified npm releases 2.1.0–2.1.2 export only seiLocal; sei, seiTestnet, and seiDevnet were never published. Commit 441daea9 was on closed, unmerged #300. The valid API gap is being handled as a new feature with current Seiscan URLs and export tests.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions