diff --git a/.changeset/clean-dolphins-peel.md b/.changeset/clean-dolphins-peel.md new file mode 100644 index 0000000000..084cfb0d28 --- /dev/null +++ b/.changeset/clean-dolphins-peel.md @@ -0,0 +1,7 @@ +--- +'@moralisweb3/common-evm-utils': patch +'@moralisweb3/evm-api': patch +'moralis': patch +--- + +Add support for moonriver diff --git a/packages/common/evmUtils/src/data/chaindata.ts b/packages/common/evmUtils/src/data/chaindata.ts index e8864cbb63..d6d1e9f168 100644 --- a/packages/common/evmUtils/src/data/chaindata.ts +++ b/packages/common/evmUtils/src/data/chaindata.ts @@ -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', diff --git a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts index bbfa0e0a1a..a5fbf5f999 100644 --- a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts +++ b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.test.ts @@ -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', () => { diff --git a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts index e73bb2c0db..d81d40acf1 100644 --- a/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts +++ b/packages/common/evmUtils/src/dataTypes/EvmChain/EvmChain.ts @@ -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 @@ -354,6 +362,7 @@ export class EvmChain implements EvmChainable { EvmChain.POLYGON_AMOY, EvmChain.LINEA, EvmChain.MOONBEAM, + EvmChain.MOONRIVER, ]; } @@ -467,7 +476,8 @@ export class EvmChain implements EvmChainable { | '0x4268' | '0x13882' | '0xe708' - | '0x504'; + | '0x504' + | '0x505'; } /**