diff --git a/.changeset/beige-plants-retire.md b/.changeset/beige-plants-retire.md new file mode 100644 index 0000000000..6a9882b706 --- /dev/null +++ b/.changeset/beige-plants-retire.md @@ -0,0 +1,7 @@ +--- +'@moralisweb3/common-evm-utils': patch +'@moralisweb3/evm-api': patch +'moralis': patch +--- + +Add support for linea-sepolia diff --git a/packages/common/evmUtils/src/data/chaindata.ts b/packages/common/evmUtils/src/data/chaindata.ts index 181aa2ca1e..6cec07e719 100644 --- a/packages/common/evmUtils/src/data/chaindata.ts +++ b/packages/common/evmUtils/src/data/chaindata.ts @@ -750,6 +750,53 @@ export const chainList: EvmChainListDataEntry[] = [ }, ], }, + { + name: 'Linea Sepolia', + title: 'Linea Sepolia Testnet', + chain: 'ETH', + rpc: [ + 'https://rpc.sepolia.linea.build', + 'wss://rpc.sepolia.linea.build', + 'https://linea-sepolia.infura.io/v3/${INFURA_API_KEY}', + 'wss://linea-sepolia.infura.io/ws/v3/${INFURA_API_KEY}', + ], + faucets: [], + nativeCurrency: { + name: 'Linea Ether', + symbol: 'ETH', + decimals: 18, + }, + infoURL: 'https://linea.build', + shortName: 'linea-sepolia', + chainId: 59141, + networkId: 59141, + slip44: 1, + icon: 'linea', + parent: { + type: 'L2', + chain: 'eip155-5', + bridges: [ + { + url: 'https://bridge.linea.build/', + }, + ], + }, + explorers: [ + { + name: 'Etherscan', + url: 'https://sepolia.lineascan.build', + standard: 'EIP3091', + icon: 'linea', + }, + { + name: 'Blockscout', + url: 'https://explorer.sepolia.linea.build', + standard: 'EIP3091', + icon: 'linea', + }, + ], + status: 'active', + }, { name: 'Linea', title: 'Linea Mainnet', diff --git a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts index 3996d1cfe3..b35e9d0ac4 100644 --- a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts +++ b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts @@ -127,6 +127,7 @@ describe('EvmChain', () => { expect(EvmChain.MOONBEAM.apiHex).toBe('0x504'); expect(EvmChain.MOONRIVER.apiHex).toBe('0x505'); expect(EvmChain.MOONBASE.apiHex).toBe('0x507'); + expect(EvmChain.LINEA_SEPOLIA.apiHex).toBe('0xe705'); }); describe('metadata', () => { diff --git a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts index ca95f56ff3..b1722fa698 100644 --- a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts +++ b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts @@ -286,6 +286,14 @@ export class EvmChain implements EvmChainable { public static get MOONBASE() { return EvmChain.create(1287); } + /** + * Returns LINEA SEPOLIA chain + * + * @example EvmChain.LINEA_SEPOLIA + */ + public static get LINEA_SEPOLIA() { + return EvmChain.create(59141); + } /** * Create a new instance of EvmChain from any valid address input. @@ -372,6 +380,7 @@ export class EvmChain implements EvmChainable { EvmChain.MOONBEAM, EvmChain.MOONRIVER, EvmChain.MOONBASE, + EvmChain.LINEA_SEPOLIA, ]; } @@ -487,7 +496,8 @@ export class EvmChain implements EvmChainable { | '0xe708' | '0x504' | '0x505' - | '0x507'; + | '0x507' + | '0xe705'; } /**