Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDOT Acala intergration with Moonbeam #170

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/fifty-dragons-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@moonbeam-network/xcm-config': patch
'@moonbeam-network/xcm-sdk': patch
---

Acala LDOT integration with Moonbeam
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ export const ksm = new Asset({
originSymbol: 'KSM',
});

export const ldot = new Asset({
key: 'ldot',
originSymbol: 'LDOT',
});

export const lit = new Asset({
key: 'lit',
originSymbol: 'LIT',
Expand Down Expand Up @@ -322,6 +327,7 @@ export const assetsList: Asset[] = [
kint,
kma,
ksm,
ldot,
lit,
mgx,
movr,
Expand Down
11 changes: 11 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
kint,
kma,
ksm,
ldot,
lit,
mgx,
movr,
Expand Down Expand Up @@ -84,6 +85,12 @@ export const acala = new Parachain({
metadataId: { ForeignAssetId: 0 },
minId: { ForeignAssetId: 0 },
},
{
asset: ldot,
id: { Token: ldot.originSymbol },
metadataId: { NativeAssetId: { Token: ldot.originSymbol } },
minId: { NativeAssetId: { Token: ldot.originSymbol } },
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down Expand Up @@ -840,6 +847,10 @@ export const moonbeam = new EvmParachain({
asset: intr,
id: '101170542313601871197860408087030232491',
},
{
asset: ldot,
id: '225719522181998468294117309041779353812',
},
{
asset: nodl,
id: '309163521958167876851250718453738106865',
Expand Down
18 changes: 17 additions & 1 deletion packages/config/src/configs/acala.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { aca, aseed, glmr } from '../assets';
import { aca, aseed, glmr, ldot } from '../assets';
import { acala, moonbeam } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -54,6 +54,22 @@ export const acalaConfig = new ChainConfig({
},
min: AssetMinBuilder().assetRegistry().assetMetadatas(),
}),
new AssetConfig({
asset: ldot,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.005,
asset: ldot,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
fee: {
asset: aca,
balance: BalanceBuilder().substrate().system().account(),
},
min: AssetMinBuilder().assetRegistry().assetMetadatas(),
}),
],
chain: acala,
});
16 changes: 16 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
hdx,
ibtc,
intr,
ldot,
nodl,
otp,
para,
Expand Down Expand Up @@ -291,6 +292,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: ldot,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: acala,
destinationFee: {
amount: 0.001,
asset: ldot,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: nodl,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down
Loading