Skip to content

Commit

Permalink
Merge pull request #1198 from MoralisWeb3/feat/moonriver-chain
Browse files Browse the repository at this point in the history
Feat: Moonriver chain
  • Loading branch information
Kayconfig authored Apr 22, 2024
2 parents 773606d + b73971c commit 1294f1d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/clean-dolphins-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@moralisweb3/common-evm-utils': patch
'@moralisweb3/evm-api': patch
'moralis': patch
---

Add support for moonriver
29 changes: 29 additions & 0 deletions packages/common/evmUtils/src/data/chaindata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,35 @@ export const chainList: EvmChainListDataEntry[] = [
},
],
},
{
name: 'Moonriver',
chain: 'MOON',
rpc: [
'https://rpc.api.moonriver.moonbeam.network',
'wss://wss.api.moonriver.moonbeam.network',
'https://moonriver-rpc.publicnode.com',
'wss://moonriver-rpc.publicnode.com',
'https://moonriver.drpc.org',
'wss://moonriver.drpc.org',
],
faucets: [],
nativeCurrency: {
name: 'Moonriver',
symbol: 'MOVR',
decimals: 18,
},
infoURL: 'https://moonbeam.network/networks/moonriver/',
shortName: 'mriver',
chainId: 1285,
networkId: 1285,
explorers: [
{
name: 'moonscan',
url: 'https://moonriver.moonscan.io',
standard: 'none',
},
],
},
{
name: 'Fantom Testnet',
chain: 'FTM',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ describe('EvmChain', () => {
expect(EvmChain.POLYGON_AMOY.apiHex).toBe('0x13882');
expect(EvmChain.LINEA.apiHex).toBe('0xe708');
expect(EvmChain.MOONBEAM.apiHex).toBe('0x504');
expect(EvmChain.MOONRIVER.apiHex).toBe('0x505');
});

describe('metadata', () => {
Expand Down
12 changes: 11 additions & 1 deletion packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ export class EvmChain implements EvmChainable {
public static get LINEA() {
return EvmChain.create(59144);
}
/**
* Returns MOONRIVER chain
*
* @example EvmChain.MOONRIVER
*/
public static get MOONRIVER() {
return EvmChain.create(1285);
}

/**
* Returns MOONBEAM chain
Expand Down Expand Up @@ -354,6 +362,7 @@ export class EvmChain implements EvmChainable {
EvmChain.POLYGON_AMOY,
EvmChain.LINEA,
EvmChain.MOONBEAM,
EvmChain.MOONRIVER,
];
}

Expand Down Expand Up @@ -467,7 +476,8 @@ export class EvmChain implements EvmChainable {
| '0x4268'
| '0x13882'
| '0xe708'
| '0x504';
| '0x504'
| '0x505';
}

/**
Expand Down

1 comment on commit 1294f1d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test coverage

Title Lines Statements Branches Functions
api-utils Coverage: 20%
20.6% (61/296) 20.48% (17/83) 19.04% (12/63)
auth Coverage: 89%
92.45% (98/106) 83.33% (20/24) 86.66% (26/30)
evm-api Coverage: 83%
84.9% (90/106) 66.66% (6/9) 77.77% (56/72)
common-aptos-utils Coverage: 4%
4.56% (151/3306) 4.49% (25/556) 5.53% (45/813)
common-evm-utils Coverage: 59%
59.58% (1896/3182) 20% (172/860) 40.28% (452/1122)
sol-api Coverage: 97%
97.56% (40/41) 66.66% (6/9) 93.75% (15/16)
common-sol-utils Coverage: 64%
65.42% (229/350) 41.86% (18/43) 50.89% (57/112)
common-streams-utils Coverage: 90%
90.73% (1204/1327) 73.63% (363/493) 82.07% (444/541)
streams Coverage: 91%
90.54% (603/666) 72.34% (68/94) 90.97% (131/144)

Please sign in to comment.