Skip to content

Commit ea0b14b

Browse files
authored
Feat: Linea sepolia (#1202)
1 parent 85a3e6e commit ea0b14b

File tree

4 files changed

+66
-1
lines changed

4 files changed

+66
-1
lines changed

.changeset/beige-plants-retire.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@moralisweb3/common-evm-utils': patch
3+
'@moralisweb3/evm-api': patch
4+
'moralis': patch
5+
---
6+
7+
Add support for linea-sepolia

packages/common/evmUtils/src/data/chaindata.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,53 @@ export const chainList: EvmChainListDataEntry[] = [
750750
},
751751
],
752752
},
753+
{
754+
name: 'Linea Sepolia',
755+
title: 'Linea Sepolia Testnet',
756+
chain: 'ETH',
757+
rpc: [
758+
'https://rpc.sepolia.linea.build',
759+
'wss://rpc.sepolia.linea.build',
760+
'https://linea-sepolia.infura.io/v3/${INFURA_API_KEY}',
761+
'wss://linea-sepolia.infura.io/ws/v3/${INFURA_API_KEY}',
762+
],
763+
faucets: [],
764+
nativeCurrency: {
765+
name: 'Linea Ether',
766+
symbol: 'ETH',
767+
decimals: 18,
768+
},
769+
infoURL: 'https://linea.build',
770+
shortName: 'linea-sepolia',
771+
chainId: 59141,
772+
networkId: 59141,
773+
slip44: 1,
774+
icon: 'linea',
775+
parent: {
776+
type: 'L2',
777+
chain: 'eip155-5',
778+
bridges: [
779+
{
780+
url: 'https://bridge.linea.build/',
781+
},
782+
],
783+
},
784+
explorers: [
785+
{
786+
name: 'Etherscan',
787+
url: 'https://sepolia.lineascan.build',
788+
standard: 'EIP3091',
789+
icon: 'linea',
790+
},
791+
{
792+
name: 'Blockscout',
793+
url: 'https://explorer.sepolia.linea.build',
794+
standard: 'EIP3091',
795+
icon: 'linea',
796+
},
797+
],
798+
status: 'active',
799+
},
753800
{
754801
name: 'Linea',
755802
title: 'Linea Mainnet',

packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ describe('EvmChain', () => {
127127
expect(EvmChain.MOONBEAM.apiHex).toBe('0x504');
128128
expect(EvmChain.MOONRIVER.apiHex).toBe('0x505');
129129
expect(EvmChain.MOONBASE.apiHex).toBe('0x507');
130+
expect(EvmChain.LINEA_SEPOLIA.apiHex).toBe('0xe705');
130131
});
131132

132133
describe('metadata', () => {

packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@ export class EvmChain implements EvmChainable {
286286
public static get MOONBASE() {
287287
return EvmChain.create(1287);
288288
}
289+
/**
290+
* Returns LINEA SEPOLIA chain
291+
*
292+
* @example EvmChain.LINEA_SEPOLIA
293+
*/
294+
public static get LINEA_SEPOLIA() {
295+
return EvmChain.create(59141);
296+
}
289297

290298
/**
291299
* Create a new instance of EvmChain from any valid address input.
@@ -372,6 +380,7 @@ export class EvmChain implements EvmChainable {
372380
EvmChain.MOONBEAM,
373381
EvmChain.MOONRIVER,
374382
EvmChain.MOONBASE,
383+
EvmChain.LINEA_SEPOLIA,
375384
];
376385
}
377386

@@ -487,7 +496,8 @@ export class EvmChain implements EvmChainable {
487496
| '0xe708'
488497
| '0x504'
489498
| '0x505'
490-
| '0x507';
499+
| '0x507'
500+
| '0xe705';
491501
}
492502

493503
/**

0 commit comments

Comments
 (0)