Skip to content

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

@monty-sei

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions