Skip to content

Commit

Permalink
Merge pull request #21 from bvotteler/feat-add-intr-ibtc-moonbeam
Browse files Browse the repository at this point in the history
Feat: Add xcm for INTR, IBTC from Interlay to Moonbeam
  • Loading branch information
bvotteler authored Nov 24, 2022
2 parents ae7d966 + fba7cb5 commit b0ad0bd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interlay/bridge",
"version": "0.1.4",
"version": "0.1.5",
"description": "polkawallet bridge sdk",
"main": "build/src/index.js",
"typings": "build/src/index.d.ts",
Expand Down
15 changes: 15 additions & 0 deletions src/adapters/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ export const interlayRoutersConfig: Omit<CrossChainRouterConfigs, "from">[] = [
token: "DOT",
xcm: { fee: { token: "DOT", amount: "0" }, weightLimit: DEST_WEIGHT },
},
{
to: "moonbeam",
token: "INTR",
// todo: determine fee amount - current value is a copied value / best guess
xcm: {
fee: { token: "INTR", amount: "93240000" },
weightLimit: DEST_WEIGHT,
},
},
{
to: "moonbeam",
token: "IBTC",
// todo: determine fee amount - current value is a copied value / best guess
xcm: { fee: { token: "IBTC", amount: "9" }, weightLimit: DEST_WEIGHT },
},
{
to: "statemint",
token: "USDT",
Expand Down
2 changes: 2 additions & 0 deletions src/adapters/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const moonbeamTokensConfig: Record<string, BasicToken> = {
ACA: { name: "ACA", symbol: "ACA", decimals: 12, ed: "100000000000" },
AUSD: { name: "AUSD", symbol: "AUSD", decimals: 12, ed: "100000000000" },
LDOT: { name: "LDOT", symbol: "LDOT", decimals: 10, ed: "500000000" },
INTR: { name: "INTR", symbol: "INTR", decimals: 10, ed: "1000000000" },
IBTC: { name: "IBTC", symbol: "IBTC", decimals: 8, ed: "100" },
};

export const moonriverTokensConfig: Record<string, BasicToken> = {
Expand Down
3 changes: 3 additions & 0 deletions src/bridge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,8 @@ describe("Bridge sdk usage", () => {

// interlay
printBidirectionalTxs("interlay", "statemint", "USDT");
// no adapter available for tx originating from moonbeam (yet?)
printTx("interlay", "moonbeam", "INTR");
printTx("interlay", "moonbeam", "IBTC");
});
});

0 comments on commit b0ad0bd

Please sign in to comment.