Skip to content

Commit

Permalink
Tinkernet integrations (#261)
Browse files Browse the repository at this point in the history
* tinkernet and stink initial configurations

* remove STINK integration

* add changeset

* remove commented code

* remove stink asset
  • Loading branch information
mmaurello authored Jun 11, 2024
1 parent 2ee7f8e commit ebab209
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-guests-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@moonbeam-network/xcm-config': patch
---

Tinkernet integration
6 changes: 6 additions & 0 deletions packages/config/src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ export const teer = new Asset({
originSymbol: 'TEER',
});

export const tnkr = new Asset({
key: 'tnkr',
originSymbol: 'TNKR',
});

export const tt1 = new Asset({
key: 'tt1',
originSymbol: 'TT1',
Expand Down Expand Up @@ -418,6 +423,7 @@ export const assetsList: Asset[] = [
soon,
sub,
teer,
tnkr,
tt1,
tur,
unit,
Expand Down
23 changes: 23 additions & 0 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
sdn,
sub,
teer,
tnkr,
tt1,
tur,
unit,
Expand Down Expand Up @@ -1093,6 +1094,10 @@ export const moonriver = new EvmParachain({
asset: teer,
id: '105075627293246237499203909093923548958',
},
{
asset: tnkr,
id: '138512078356357941985706694377215053953',
},
{
asset: tur,
id: '133300872918374599700079037156071917454',
Expand Down Expand Up @@ -1647,6 +1652,23 @@ export const subsocial = new Parachain({
ws: 'wss://para.subsocial.network',
});

export const tinkernet = new Parachain({
assetsData: [
{
asset: tnkr,
id: 0,
},
],
ecosystem: Ecosystem.Kusama,
genesisHash:
'0xd42e9606a995dfe433dc7955dc2a70f495f350f373daa200098ae84437816ad2',
key: 'tinkernet',
name: 'InvArch Tinkernet',
parachainId: 2125,
ss58Format: 117,
ws: 'wss://tinkernet-rpc.dwellir.com',
});

export const turing = new Parachain({
assetsData: [
{
Expand Down Expand Up @@ -1780,6 +1802,7 @@ export const chainsList: AnyChain[] = [
alphanetAssetHub,
polkadotAssetHub,
subsocial,
tinkernet,
turing,
turingAlphanet,
uniqueAlpha,
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 @@ -47,6 +47,7 @@ import { polkadotAssetHubConfig } from './polkadotAssetHub';
import { robonomicsConfig } from './robonomics';
import { shidenConfig } from './shiden';
import { subsocialConfig } from './subsocial';
import { tinkernetConfig } from './tinkernet';
import { turingConfig } from './turing';
import { turingAlphanetConfig } from './turingAlphanet';
import { uniqueAlphaConfig } from './uniqueAlpha';
Expand Down Expand Up @@ -100,6 +101,7 @@ export const chainsConfigList: ChainConfig[] = [
kusamaAssetHubConfig,
polkadotAssetHubConfig,
subsocialConfig,
tinkernetConfig,
turingConfig,
turingAlphanetConfig,
uniqueAlphaConfig,
Expand Down
17 changes: 17 additions & 0 deletions packages/config/src/configs/moonriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
rmrk,
sdn,
teer,
tnkr,
tur,
usdt,
vbnc,
Expand All @@ -43,6 +44,7 @@ import {
picasso,
robonomics,
shiden,
tinkernet,
turing,
} from '../chains';
import { AssetConfig } from '../types/AssetConfig';
Expand Down Expand Up @@ -415,6 +417,21 @@ export const moonriverConfig = new ChainConfig({
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: tnkr,
balance: BalanceBuilder().substrate().assets().account(),
contract: ContractBuilder().Xtokens().transfer(),
destination: tinkernet,
destinationFee: {
amount: 0.4,
asset: tnkr,
balance: BalanceBuilder().substrate().assets().account(),
},
fee: {
asset: movr,
balance: BalanceBuilder().substrate().system().account(),
},
}),
new AssetConfig({
asset: tur,
balance: BalanceBuilder().substrate().assets().account(),
Expand Down
26 changes: 26 additions & 0 deletions packages/config/src/configs/tinkernet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
BalanceBuilder,
ExtrinsicBuilder,
FeeBuilder,
} from '@moonbeam-network/xcm-builder';
import { tnkr } from '../assets';
import { moonriver, tinkernet } from '../chains';
import { AssetConfig } from '../types/AssetConfig';
import { ChainConfig } from '../types/ChainConfig';

export const tinkernetConfig = new ChainConfig({
assets: [
new AssetConfig({
asset: tnkr,
balance: BalanceBuilder().substrate().system().account(),
destination: moonriver,
destinationFee: {
amount: FeeBuilder().assetManager().assetTypeUnitsPerSecond(),
asset: tnkr,
balance: BalanceBuilder().substrate().system().account(),
},
extrinsic: ExtrinsicBuilder().xTokens().transfer(),
}),
],
chain: tinkernet,
});

0 comments on commit ebab209

Please sign in to comment.