Skip to content

Commit

Permalink
Add moonriver adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
samchuk-vlad committed Feb 9, 2024
1 parent 0bb3071 commit 4eef16c
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/adapters/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ import { BalanceAdapter, BalanceAdapterConfigs } from "../balance-adapter";
import { BaseCrossChainAdapter } from "../base-chain-adapter";
import { ChainId, chains } from "../configs";
import { ApiNotFound, InvalidAddress, TokenNotFound } from "../errors";
import { BalanceData, ExtendedToken, TransferParams } from "../types";
import {
createRouteConfigs,
getDestAccountInfo,
validateAddress,
} from "src/utils";
import {
BalanceData,
BasicToken,
ExtendedToken,
TransferParams,
} from "src/types";

export const moonbeamRouteConfigs = createRouteConfigs("moonbeam", [
{
Expand Down Expand Up @@ -110,6 +115,12 @@ const moonbeamTokensConfig: Record<string, ExtendedToken> = {
},
};

export const moonriverTokensConfig: Record<string, BasicToken> = {
MOVR: { name: "MOVR", symbol: "MOVR", decimals: 18, ed: "1000000000000000" },
KAR: { name: "KAR", symbol: "KAR", decimals: 12, ed: "0" },
KUSD: { name: "KUSD", symbol: "KUSD", decimals: 12, ed: "0" },
};

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
const createBalanceStorages = (api: AnyApi) => {
return {
Expand Down Expand Up @@ -266,3 +277,9 @@ export class MoonbeamAdapter extends MoonbeamBaseAdapter {
super(chains.moonbeam, moonbeamRouteConfigs, moonbeamTokensConfig);
}
}

export class MoonriverAdapter extends MoonbeamBaseAdapter {
constructor() {
super(chains.moonriver, [], moonriverTokensConfig);
}
}

0 comments on commit 4eef16c

Please sign in to comment.