Skip to content

Commit

Permalink
axlUSDC integration between Pendulum and Moonbeam
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Sep 3, 2024
1 parent e5cf68d commit 8101be5
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-donkeys-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moonbeam-network/xcm-config': patch
---

Integrate axlUSDC Pendulum - Moonbeam
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export const aseed = new Asset({
originSymbol: 'aSEED',
});

export const axlusdc = new Asset({
key: 'axlusdc',
originSymbol: 'axlUSDC',
});

export const betaDEV = new Asset({
key: 'beta-dev',
originSymbol: 'betaDEV',
Expand Down Expand Up @@ -389,6 +394,7 @@ export const assetsList: Asset[] = [
astr,
atom,
auq,
axlusdc,
bnc,
bncs,
cfg,
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 @@ -14,6 +14,7 @@ import {
astr,
atom,
auq,
axlusdc,
betaDEV,
bnc,
bncs,
Expand Down Expand Up @@ -904,6 +905,12 @@ export const moonbeam = new EvmParachain({
asset: aseed,
id: '110021739665376159354538090254163045594',
},
{
address: '0xCa01a1D0993565291051daFF390892518ACfAD3A',
asset: axlusdc,
id: '0xCa01a1D0993565291051daFF390892518ACfAD3A',
metadataId: 0,
},
{
address: '0xFFffffFf7cC06abdF7201b350A1265c62C8601d2',
asset: bnc,
Expand Down Expand Up @@ -1567,6 +1574,10 @@ export const pendulum = new Parachain({
decimals: 18,
id: { XCM: 6 },
},
{
asset: axlusdc,
id: { XCM: 12 },
},
],
ecosystem: Ecosystem.Polkadot,
genesisHash:
Expand Down
12 changes: 12 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
apillon,
aseed,
astr,
axlusdc,
bnc,
bncs,
cfg,
Expand Down Expand Up @@ -950,6 +951,17 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: axlusdc,
balance: BalanceBuilder().evm().erc20(),
contract: ContractBuilder().Xtokens().transfer(),
destination: pendulum,
destinationFee: {
amount: 0.02,
asset: axlusdc,
balance: BalanceBuilder().evm().erc20(),
},
}),
],
chain: moonbeam,
});
17 changes: 16 additions & 1 deletion packages/config/src/configs/pendulum.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 { glmr, pen } from '../assets';
import { axlusdc, glmr, pen } from '../assets';
import { moonbeam, pendulum } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';
Expand Down Expand Up @@ -36,6 +36,21 @@ export const pendulumConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: axlusdc,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbeam,
destinationFee: {
amount: 0.04,
asset: glmr,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transferMultiCurrencies(),
fee: {
asset: pen,
balance: BalanceBuilder().substrate().system().account(),
},
}),
],
chain: pendulum,
});

0 comments on commit 8101be5

Please sign in to comment.