Skip to content

Commit 1294f1d

Browse files
authored
Merge pull request #1198 from MoralisWeb3/feat/moonriver-chain
Feat: Moonriver chain
2 parents 773606d + b73971c commit 1294f1d

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

.changeset/clean-dolphins-peel.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 moonriver

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,35 @@ export const chainList: EvmChainListDataEntry[] = [
426426
},
427427
],
428428
},
429+
{
430+
name: 'Moonriver',
431+
chain: 'MOON',
432+
rpc: [
433+
'https://rpc.api.moonriver.moonbeam.network',
434+
'wss://wss.api.moonriver.moonbeam.network',
435+
'https://moonriver-rpc.publicnode.com',
436+
'wss://moonriver-rpc.publicnode.com',
437+
'https://moonriver.drpc.org',
438+
'wss://moonriver.drpc.org',
439+
],
440+
faucets: [],
441+
nativeCurrency: {
442+
name: 'Moonriver',
443+
symbol: 'MOVR',
444+
decimals: 18,
445+
},
446+
infoURL: 'https://moonbeam.network/networks/moonriver/',
447+
shortName: 'mriver',
448+
chainId: 1285,
449+
networkId: 1285,
450+
explorers: [
451+
{
452+
name: 'moonscan',
453+
url: 'https://moonriver.moonscan.io',
454+
standard: 'none',
455+
},
456+
],
457+
},
429458
{
430459
name: 'Fantom Testnet',
431460
chain: 'FTM',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ describe('EvmChain', () => {
125125
expect(EvmChain.POLYGON_AMOY.apiHex).toBe('0x13882');
126126
expect(EvmChain.LINEA.apiHex).toBe('0xe708');
127127
expect(EvmChain.MOONBEAM.apiHex).toBe('0x504');
128+
expect(EvmChain.MOONRIVER.apiHex).toBe('0x505');
128129
});
129130

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

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,14 @@ export class EvmChain implements EvmChainable {
261261
public static get LINEA() {
262262
return EvmChain.create(59144);
263263
}
264+
/**
265+
* Returns MOONRIVER chain
266+
*
267+
* @example EvmChain.MOONRIVER
268+
*/
269+
public static get MOONRIVER() {
270+
return EvmChain.create(1285);
271+
}
264272

265273
/**
266274
* Returns MOONBEAM chain
@@ -354,6 +362,7 @@ export class EvmChain implements EvmChainable {
354362
EvmChain.POLYGON_AMOY,
355363
EvmChain.LINEA,
356364
EvmChain.MOONBEAM,
365+
EvmChain.MOONRIVER,
357366
];
358367
}
359368

@@ -467,7 +476,8 @@ export class EvmChain implements EvmChainable {
467476
| '0x4268'
468477
| '0x13882'
469478
| '0xe708'
470-
| '0x504';
479+
| '0x504'
480+
| '0x505';
471481
}
472482

473483
/**

0 commit comments

Comments
 (0)