Skip to content

Commit

Permalink
Support GLMR transfers in interlay (#147)
Browse files Browse the repository at this point in the history
* support GLMR transfers in interlay

* add changeset
  • Loading branch information
mmaurello authored Oct 20, 2023
1 parent cd5da97 commit ea6cd77
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/twenty-frogs-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moonbeam-network/xcm-config': patch
---

Support GLMR transfers in interlay
4 changes: 4 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ export const hydraDX = new Parachain({

export const interlay = new Parachain({
assetsData: [
{
asset: glmr,
id: { ForeignAsset: 10 },
},
{
asset: intr,
decimals: 10,
Expand Down
13 changes: 12 additions & 1 deletion packages/config/src/configs/interlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { ibtc, intr } from '../assets';
import { glmr, ibtc, intr } from '../assets';
import { interlay, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -36,6 +36,17 @@ export const interlayConfig = new ChainConfig({
balance: BalanceBuilder().substrate().tokens().accounts(),
},
}),
new AssetConfig({
asset: glmr,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.001,
asset: glmr,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
],
chain: interlay,
});
11 changes: 11 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: interlay,
destinationFee: {
amount: 0.05,
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
Expand Down

0 comments on commit ea6cd77

Please sign in to comment.