Skip to content

Commit 4300de7

Browse files
committed
Update all XCM message constructions from V3 to V5
1 parent 195327a commit 4300de7

10 files changed

Lines changed: 29341 additions & 21507 deletions

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"description": "Astar Portal is the hub of a multi-chain, one-stop platform for managing assets and dApp Staking - build2earn protocol.",
55
"productName": "Astar Portal - Astar & Shiden Network",
66
"author": "Astar Network",
7-
"private": false,
87
"license": "GPL-3.0-only",
98
"scripts": {
109
"dev": "quasar dev",

src/v2/repositories/implementations/XcmRepository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export class XcmRepository implements IXcmRepository {
128128
throw `Parachain id for ${to.name} is not defined`;
129129
}
130130

131-
const version = 'V3';
131+
const version = 'V5';
132132
// the target parachain connected to the current relaychain
133133
const destination = {
134134
[version]: {
@@ -210,7 +210,7 @@ export class XcmRepository implements IXcmRepository {
210210
};
211211

212212
const assets = {
213-
V3: {
213+
V5: {
214214
fun: {
215215
Fungible: new BN(amount),
216216
},
@@ -219,7 +219,7 @@ export class XcmRepository implements IXcmRepository {
219219
};
220220

221221
const destination = {
222-
V3: {
222+
V5: {
223223
interior: {
224224
X1: {
225225
AccountId32: {

src/v2/repositories/implementations/xcm/AcalaXcmRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class AcalaXcmRepository extends XcmRepository {
4747
const tokenData = this.getTokenData(token);
4848

4949
const destination = {
50-
V3: {
50+
V5: {
5151
parents: '1',
5252
interior: {
5353
X2: [

src/v2/repositories/implementations/xcm/AstarXcmRepository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class AstarXcmRepository extends XcmRepository {
5050
};
5151

5252
const assets = {
53-
V3: {
53+
V5: {
5454
fun: {
5555
Fungible: new BN(amount),
5656
},
@@ -73,7 +73,7 @@ export class AstarXcmRepository extends XcmRepository {
7373
};
7474

7575
const destination = {
76-
V3: {
76+
V5: {
7777
interior: {
7878
X2: [
7979
{
@@ -97,7 +97,7 @@ export class AstarXcmRepository extends XcmRepository {
9797
if (feeAssetInformation.feeAssetIsRequired) {
9898
// we need to use another token for the fee
9999
const fee = {
100-
V3: {
100+
V5: {
101101
fun: {
102102
Fungible: new BN(feeAssetInformation.feeAmount),
103103
},

src/v2/repositories/implementations/xcm/BifrostXcmRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class BifrostXcmRepository extends XcmRepository {
5858
throw `Token name for ${token.originAssetId} is not defined`;
5959
}
6060

61-
const version = 'V3';
61+
const version = 'V5';
6262

6363
const AccountId32 = {
6464
id: decodeAddress(recipientAddress),

src/v2/repositories/implementations/xcm/HydrationXcmRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class HydrationXcmRepository extends XcmRepository {
4343
throw `Token name for ${token.originAssetId} is not defined`;
4444
}
4545

46-
const version = 'V3';
46+
const version = 'V5';
4747

4848
const AccountId32 = {
4949
id: decodeAddress(recipientAddress),

src/v2/repositories/implementations/xcm/InterlayXcmRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class InterlayXcmRepository extends XcmRepository {
3535
const tokenData = { Token: token.originAssetId };
3636

3737
const destination = {
38-
V3: {
38+
V5: {
3939
parents: '1',
4040
interior: {
4141
X2: [

src/v2/repositories/implementations/xcm/PendulumXcmRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class PendulumXcmRepository extends XcmRepository {
4040
throw `Token name for ${token.originAssetId} is not defined`;
4141
}
4242

43-
const version = 'V3';
43+
const version = 'V5';
4444

4545
const AccountId32 = {
4646
id: decodeAddress(recipientAddress),

src/v2/repositories/implementations/xcm/StatemintXcmRepository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class StatemintXcmRepository extends XcmRepository {
3535
throw `Parachain id for ${to.name} is not defined`;
3636
}
3737

38-
const version = 'V3';
38+
const version = 'V5';
3939
const destination = {
4040
[version]: {
4141
interior: {

0 commit comments

Comments
 (0)