diff --git a/packages/precompiles/src/viem/__tests__/chain.spec.ts b/packages/precompiles/src/viem/__tests__/chain.spec.ts index 1cfd54ce..ffb6c7b6 100644 --- a/packages/precompiles/src/viem/__tests__/chain.spec.ts +++ b/packages/precompiles/src/viem/__tests__/chain.spec.ts @@ -1,20 +1,58 @@ -import { seiLocal } from '../chain'; +import { seiLocal, seiMainnet, seiTestnet } from "../chain"; -describe('seiLocal chain', () => { - it('should be a valid chain definition', () => { - expect(seiLocal).toMatchObject({ - id: 713714, - name: 'Sei Local', - nativeCurrency: { - name: 'Sei', - symbol: 'SEI', - decimals: 18 - }, - rpcUrls: { - default: { - http: ['http://localhost:8545'] - } - } - }); - }); +describe("seiLocal chain", () => { + it("should be a valid chain definition", () => { + expect(seiLocal).toMatchObject({ + id: 713714, + name: "Sei Local", + nativeCurrency: { + name: "Sei", + symbol: "SEI", + decimals: 18, + }, + rpcUrls: { + default: { + http: ["http://localhost:8545"], + }, + }, + }); + }); +}); + +describe("seiTestnet chain", () => { + it("should be a valid chain definition", () => { + expect(seiTestnet).toMatchObject({ + id: 1328, + name: "Sei Testnet", + nativeCurrency: { + name: "Sei", + symbol: "SEI", + decimals: 18, + }, + rpcUrls: { + default: { + http: ["https://evm-rpc-testnet.sei-apis.com"], + }, + }, + }); + }); +}); + +describe("seiMainnet chain", () => { + it("should be a valid chain definition", () => { + expect(seiMainnet).toMatchObject({ + id: 1329, + name: "Sei Mainnet", + nativeCurrency: { + name: "Sei", + symbol: "SEI", + decimals: 18, + }, + rpcUrls: { + default: { + http: ["https://evm-rpc.sei-apis.com"], + }, + }, + }); + }); }); diff --git a/packages/precompiles/src/viem/chain.ts b/packages/precompiles/src/viem/chain.ts index ae0db9f2..e3f281f7 100644 --- a/packages/precompiles/src/viem/chain.ts +++ b/packages/precompiles/src/viem/chain.ts @@ -1,16 +1,38 @@ -import { defineChain } from 'viem'; +import { defineChain } from "viem"; /** * The Viem chain definition for the Sei local chain. * @category Chain */ export const seiLocal = defineChain({ - id: 713714, - name: 'Sei Local', - nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 }, - rpcUrls: { - default: { - http: ['http://localhost:8545'] - } - } + id: 713714, + name: "Sei Local", + nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 }, + rpcUrls: { + default: { + http: ["http://localhost:8545"], + }, + }, +}); + +export const seiTestnet = defineChain({ + id: 1328, + name: "Sei Testnet", + nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 }, + rpcUrls: { + default: { + http: ["https://evm-rpc-testnet.sei-apis.com"], + }, + }, +}); + +export const seiMainnet = defineChain({ + id: 1329, + name: "Sei Mainnet", + nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 }, + rpcUrls: { + default: { + http: ["https://evm-rpc.sei-apis.com"], + }, + }, });