Skip to content

Commit

Permalink
add PEAQ token transfers config for Peaq Substrate
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Jun 13, 2024
1 parent a7dc073 commit 778ed25
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ export const moonbaseAlpha = new EvmParachain({
id: '0xE5dE10C4b744bac6b783fAF8d9B9fDFF14Acc3c9',
metadataId: 0, // no metadata for ERC20 tokens
},
{
asset: agng,
id: '75066649112131892397889252914026143264',
},
],
ecosystem: Ecosystem.AlphanetRelay,
genesisHash:
Expand Down Expand Up @@ -922,6 +926,10 @@ export const moonbeam = new EvmParachain({
asset: para,
id: '32615670524745285411807346420584982855',
},
{
asset: peaq,
id: '314077021455772878282433861213184736939',
},
{
asset: pha,
id: '132685552157663328694213725410064821485',
Expand Down
16 changes: 16 additions & 0 deletions packages/config/src/configs/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder';
import {
agng,
alan,
ampe,
atom,
Expand Down Expand Up @@ -307,6 +308,21 @@ export const moonbaseAlphaConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: agng,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: peaqAlphanet,
destinationFee: {
amount: 0.01,
asset: agng,
balance: BalanceBuilder().substrate().system().account(),
},
fee: {
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
Expand Down
16 changes: 16 additions & 0 deletions packages/config/src/configs/moonbeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
neuro,
nodl,
para,
peaq,
pen,
pha,
pink,
Expand Down Expand Up @@ -844,6 +845,21 @@ export const moonbeamConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: peaq,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: peaqChain,
destinationFee: {
amount: 0.1,
asset: peaq,
balance: BalanceBuilder().substrate().system().account(),
},
fee: {
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: glmr,
balance: BalanceBuilder().substrate().system().account(),
Expand Down
12 changes: 12 additions & 0 deletions packages/config/src/configs/peaq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
AssetMinBuilder,
BalanceBuilder,
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { dai, glmr, peaq, usdcwh, usdtwh, wbtc, weth } from '../assets';
import { moonbeam, peaqChain } from '../chains';
Expand All @@ -10,6 +11,17 @@ import { ChainConfig } from '../types/ChainConfig';

export const peaqConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: peaq,
balance: BalanceBuilder().substrate().system().account(),
destination: moonbeam,
destinationFee: {
amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(),
asset: peaq,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
new AssetConfig({
asset: glmr,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down
12 changes: 12 additions & 0 deletions packages/config/src/configs/peaqAlphanet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
AssetMinBuilder,
BalanceBuilder,
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { agng, dev, ftmwh } from '../assets';
import { moonbaseAlpha, peaqAlphanet } from '../chains';
Expand All @@ -10,6 +11,17 @@ import { ChainConfig } from '../types/ChainConfig';

export const peaqAlphanetConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: agng,
balance: BalanceBuilder().substrate().system().account(),
destination: moonbaseAlpha,
destinationFee: {
amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(),
asset: agng,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down

0 comments on commit 778ed25

Please sign in to comment.