From 7c80e45dd1283c50f6d106f0f45dae500efdf8e9 Mon Sep 17 00:00:00 2001 From: haycarlitos Date: Tue, 22 Aug 2023 07:42:41 -0600 Subject: [PATCH] added laChain and laTestnet --- packages/chains/README.md | 2 ++ packages/chains/src/index.ts | 2 ++ packages/chains/src/lachain.ts | 36 ++++++++++++++++++++++++++++++++ packages/chains/src/latestnet.ts | 30 ++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 packages/chains/src/lachain.ts create mode 100644 packages/chains/src/latestnet.ts diff --git a/packages/chains/README.md b/packages/chains/README.md index 23ddd6f4..6bc3df34 100644 --- a/packages/chains/README.md +++ b/packages/chains/README.md @@ -61,6 +61,8 @@ const { chains, provider } = configureChains( - `hardhat` - `iotex` - `iotexTestnet` +- `lachain` +- `latestnet` - `localhost` - `mainnet` - `mantle` diff --git a/packages/chains/src/index.ts b/packages/chains/src/index.ts index 297e07ff..e5d4cdbb 100644 --- a/packages/chains/src/index.ts +++ b/packages/chains/src/index.ts @@ -61,6 +61,8 @@ export { harmonyOne } from './harmonyOne' export { haqqMainnet } from './haqqMainnet' export { haqqTestedge2 } from './haqqTestedge2' export { klaytn } from './klaytn' +export { lachain } from './lachain' +export { latestnet } from './latestnet' export { linea } from './linea' export { lineaTestnet } from './lineaTestnet' export { localhost } from './localhost' diff --git a/packages/chains/src/lachain.ts b/packages/chains/src/lachain.ts new file mode 100644 index 00000000..3a2908c7 --- /dev/null +++ b/packages/chains/src/lachain.ts @@ -0,0 +1,36 @@ +import { Chain } from './types' + +export const lachain = { + id: 274, + name: 'LaChain', + network: 'lachain', + nativeCurrency: { + decimals: 18, + name: 'LaCoin', + symbol: 'LAC', + }, + rpcUrls: { + public: { + http: [ + 'https://rpc1.mainnet.lachain.network', + 'https://rpc2.mainnet.lachain.network', + ], + }, + default: { + http: [ + 'https://rpc1.mainnet.lachain.network', + 'https://rpc2.mainnet.lachain.network', + ], + }, + }, + blockExplorers: { + etherscan: { + name: 'LaChain Explorer', + url: 'https://explorer.lachain.network', + }, + default: { + name: 'LaChain Explorer', + url: 'https://explorer.lachain.network', + }, + }, +} as const satisfies Chain diff --git a/packages/chains/src/latestnet.ts b/packages/chains/src/latestnet.ts new file mode 100644 index 00000000..0c6053e5 --- /dev/null +++ b/packages/chains/src/latestnet.ts @@ -0,0 +1,30 @@ +import { Chain } from './types' + +export const latestnet = { + id: 418, + name: 'LaTestnet', + network: 'latestnet', + nativeCurrency: { + decimals: 18, + name: 'LaTest Coin', + symbol: 'TLA', + }, + rpcUrls: { + public: { + http: ['https://rpc.testnet.lachain.network'], + }, + default: { + http: ['https://rpc.testnet.lachain.network'], + }, + }, + blockExplorers: { + etherscan: { + name: 'LaTestnet Explorer', + url: 'https://testexplorer.lachain.network', + }, + default: { + name: 'LaTestnet Explorer', + url: 'https://testexplorer.lachain.network', + }, + }, +} as const satisfies Chain