Skip to content

Commit

Permalink
-wip- initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Dec 26, 2023
1 parent d1a454c commit c821668
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export const alan = new Asset({
originSymbol: 'ALAN',
});

export const ampe = new Asset({
key: 'ampe',
originSymbol: 'AMPE',
});

export const astr = new Asset({
key: 'astr',
originSymbol: 'ASTR',
Expand Down Expand Up @@ -308,6 +313,7 @@ export const ztg = new Asset({
export const assetsList: Asset[] = [
aca,
alan,
ampe,
astr,
atom,
auq,
Expand Down
30 changes: 30 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import {
aca,
alan,
ampe,
aseed,
astr,
atom,
Expand Down Expand Up @@ -689,6 +690,10 @@ export const moonbaseAlpha = new EvmParachain({
id: '0x9133c5a22024118804089f1fB752b7B2ce2a6351',
metadataId: 0, // no metadata for ERC20 tokens
},
{
asset: ampe,
id: '170050401128744171791743427490841452054',
},
{
asset: atom,
id: '244316754493307480955066032215622931381',
Expand Down Expand Up @@ -1150,6 +1155,30 @@ export const parallelHeiko = new Parachain({
ws: 'wss://heiko-rpc.parallel.fi',
});

export const pendulumAlphanet = new Parachain({
assetsData: [
{
asset: ampe,
id: 'Native',
metadataId: 0,
},
{
asset: dev,
decimals: 18,
id: { XCM: 1 },
},
],
ecosystem: Ecosystem.AlphanetRelay,
genesisHash:
'0x3db2074093ab964732631d842b99d6612a6dc75a379738a660642b05ccad59c8',
isTestChain: true,
key: 'pendulum-alphanet',
name: 'Foucoco',
parachainId: 2124,
ss58Format: 49,
ws: 'wss://moonbeam-00.pendulumchain.tech:443',
});

export const phala = new Parachain({
assetsData: [
{
Expand Down Expand Up @@ -1418,6 +1447,7 @@ export const chainsList: AnyChain[] = [
originTrailAlphanet,
parallel,
parallelHeiko,
pendulumAlphanet,
phala,
picasso,
picassoAlphanet,
Expand Down
2 changes: 2 additions & 0 deletions packages/config/src/configs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { originTrailConfig } from './originTrail';
import { originTrailAlphanetConfig } from './originTrailAlphanet';
import { parallelConfig } from './parallel';
import { parallelHeikoConfig } from './parallelHeiko';
import { pendulumAlphanetConfig } from './pendulumAlphanet';
import { phalaConfig } from './phala';
import { picassoConfig } from './picasso';
import { picassoAlphanetConfig } from './picassoAlphanet';
Expand Down Expand Up @@ -80,6 +81,7 @@ export const chainsConfigList: ChainConfig[] = [
originTrailAlphanetConfig,
parallelConfig,
parallelHeikoConfig,
pendulumAlphanetConfig,
phalaConfig,
picassoConfig,
picassoAlphanetConfig,
Expand Down
28 changes: 28 additions & 0 deletions packages/config/src/configs/moonbaseAlpha.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { BalanceBuilder, ContractBuilder } from '@moonbeam-network/xcm-builder';
import {
alan,
ampe,
atom,
dev,
eq,
Expand All @@ -22,6 +23,7 @@ import {
moonbaseAlpha,
moonbaseBeta,
originTrailAlphanet,
pendulumAlphanet,
picassoAlphanet,
turingAlphanet,
} from '../chains';
Expand Down Expand Up @@ -63,6 +65,17 @@ export const moonbaseAlphaConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: pendulumAlphanet,
destinationFee: {
amount: 0.0000001, // TODO
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
Expand Down Expand Up @@ -104,6 +117,21 @@ export const moonbaseAlphaConfig = new ChainConfig({
// balance: BalanceBuilder().substrate().system().account(),
// },
// }),
new AssetConfig({
asset: ampe,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: pendulumAlphanet,
destinationFee: {
amount: 0.1, // TODO
asset: ampe,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: dev,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: eq,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down
41 changes: 41 additions & 0 deletions packages/config/src/configs/pendulumAlphanet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {
BalanceBuilder,
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { ampe, dev } from '../assets';
import { moonbaseAlpha, pendulumAlphanet } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

export const pendulumAlphanetConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: ampe,
balance: BalanceBuilder().substrate().system().account(),
destination: moonbaseAlpha,
destinationFee: {
amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(),
asset: ampe,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
new AssetConfig({
asset: dev,
balance: BalanceBuilder().substrate().tokens().accounts(),
destination: moonbaseAlpha,
destinationFee: {
amount: 0.01,
asset: dev,
balance: BalanceBuilder().substrate().tokens().accounts(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
fee: {
asset: ampe,
balance: BalanceBuilder().substrate().system().account(),
},
}),
],
chain: pendulumAlphanet,
});

0 comments on commit c821668

Please sign in to comment.