difftreelog
fix set correct shiden/astar values for our chain
in: master
5 files changed
tests/src/util/playgrounds/unique.xcm.tsdiffbeforeafterboth--- a/tests/src/util/playgrounds/unique.xcm.ts
+++ b/tests/src/util/playgrounds/unique.xcm.ts
@@ -240,19 +240,19 @@
}
export class AssetsGroup<T extends ChainHelperBase> extends HelperGroup<T> {
- async create(signer: TSigner, assetId: number, admin: string, minimalBalance: bigint) {
+ async create(signer: TSigner, assetId: number | bigint, admin: string, minimalBalance: bigint) {
await this.helper.executeExtrinsic(signer, 'api.tx.assets.create', [assetId, admin, minimalBalance], true);
}
- async setMetadata(signer: TSigner, assetId: number, name: string, symbol: string, decimals: number) {
+ async setMetadata(signer: TSigner, assetId: number | bigint, name: string, symbol: string, decimals: number) {
await this.helper.executeExtrinsic(signer, 'api.tx.assets.setMetadata', [assetId, name, symbol, decimals], true);
}
- async mint(signer: TSigner, assetId: number, beneficiary: string, amount: bigint) {
+ async mint(signer: TSigner, assetId: number | bigint, beneficiary: string, amount: bigint) {
await this.helper.executeExtrinsic(signer, 'api.tx.assets.mint', [assetId, beneficiary, amount], true);
}
- async account(assetId: string | number, address: string) {
+ async account(assetId: string | number | bigint, address: string) {
const accountAsset = (
await this.helper.callRpc('api.query.assets.account', [assetId, address])
).toJSON()! as any;
tests/src/xcm/lowLevelXcmQuartz.test.tsdiffbeforeafterboth--- a/tests/src/xcm/lowLevelXcmQuartz.test.ts
+++ b/tests/src/xcm/lowLevelXcmQuartz.test.ts
@@ -222,14 +222,12 @@
let alice: IKeyringPair;
let randomAccount: IKeyringPair;
- const QTZ_ASSET_ID_ON_SHIDEN = 1;
- const QTZ_MINIMAL_BALANCE_ON_SHIDEN = 1n;
+ const QTZ_ASSET_ID_ON_SHIDEN = 18_446_744_073_709_551_633n; // The value is taken from the live Shiden
+ const QTZ_MINIMAL_BALANCE_ON_SHIDEN = 1n; // The value is taken from the live Shiden
// Quartz -> Shiden
const shidenInitialBalance = 1n * (10n ** SHIDEN_DECIMALS); // 1 SHD, existential deposit required to actually create the account on Shiden
- const unitsPerSecond = 228_000_000_000n; // This is Phala's value. What will be ours?
-
-
+ const unitsPerSecond = 500_451_000_000_000_000_000n; // The value is taken from the live Shiden
before(async () => {
await usingPlaygrounds(async (helper, privateKey) => {
@@ -245,7 +243,6 @@
await usingShidenPlaygrounds(shidenUrl, async (helper) => {
if(!(await helper.callRpc('api.query.assets.asset', [QTZ_ASSET_ID_ON_SHIDEN])).toJSON()) {
console.log('1. Create foreign asset and metadata');
- // TODO update metadata with values from production
await helper.assets.create(
alice,
QTZ_ASSET_ID_ON_SHIDEN,
@@ -256,8 +253,8 @@
await helper.assets.setMetadata(
alice,
QTZ_ASSET_ID_ON_SHIDEN,
- 'Cross chain QTZ',
- 'xcQTZ',
+ 'Quartz',
+ 'QTZ',
Number(QTZ_DECIMALS),
);
tests/src/xcm/lowLevelXcmUnique.test.tsdiffbeforeafterboth--- a/tests/src/xcm/lowLevelXcmUnique.test.ts
+++ b/tests/src/xcm/lowLevelXcmUnique.test.ts
@@ -288,12 +288,12 @@
let alice: IKeyringPair;
let randomAccount: IKeyringPair;
- const UNQ_ASSET_ID_ON_ASTAR = 1;
- const UNQ_MINIMAL_BALANCE_ON_ASTAR = 1n;
+ const UNQ_ASSET_ID_ON_ASTAR = 18_446_744_073_709_551_631n; // The value is taken from the live Astar
+ const UNQ_MINIMAL_BALANCE_ON_ASTAR = 1n; // The value is taken from the live Astar
// Unique -> Astar
const astarInitialBalance = 1n * (10n ** ASTAR_DECIMALS); // 1 ASTR, existential deposit required to actually create the account on Astar.
- const unitsPerSecond = 228_000_000_000n; // This is Phala's value. What will be ours?
+ const unitsPerSecond = 9_451_000_000_000_000_000n; // The value is taken from the live Astar
before(async () => {
await usingPlaygrounds(async (helper, privateKey) => {
@@ -309,7 +309,6 @@
await usingAstarPlaygrounds(astarUrl, async (helper) => {
if(!(await helper.callRpc('api.query.assets.asset', [UNQ_ASSET_ID_ON_ASTAR])).toJSON()) {
console.log('1. Create foreign asset and metadata');
- // TODO update metadata with values from production
await helper.assets.create(
alice,
UNQ_ASSET_ID_ON_ASTAR,
@@ -320,8 +319,8 @@
await helper.assets.setMetadata(
alice,
UNQ_ASSET_ID_ON_ASTAR,
- 'Cross chain UNQ',
- 'xcUNQ',
+ 'Unique Network',
+ 'UNQ',
Number(UNQ_DECIMALS),
);
tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth--- a/tests/src/xcm/xcmQuartz.test.ts
+++ b/tests/src/xcm/xcmQuartz.test.ts
@@ -1283,12 +1283,12 @@
let alice: IKeyringPair;
let sender: IKeyringPair;
- const QTZ_ASSET_ID_ON_SHIDEN = 1;
- const QTZ_MINIMAL_BALANCE_ON_SHIDEN = 1n;
+ const QTZ_ASSET_ID_ON_SHIDEN = 18_446_744_073_709_551_633n; // The value is taken from the live Shiden
+ const QTZ_MINIMAL_BALANCE_ON_SHIDEN = 1n; // The value is taken from the live Shiden
// Quartz -> Shiden
const shidenInitialBalance = 1n * (10n ** SHIDEN_DECIMALS); // 1 SHD, existential deposit required to actually create the account on Shiden
- const unitsPerSecond = 228_000_000_000n; // This is Phala's value. What will be ours?
+ const unitsPerSecond = 500_451_000_000_000_000_000n; // The value is taken from the live Shiden
const qtzToShidenTransferred = 10n * (10n ** QTZ_DECIMALS); // 10 QTZ
const qtzToShidenArrived = 9_999_999_999_088_000_000n; // 9.999 ... QTZ, Shiden takes a commision in foreign tokens
@@ -1311,7 +1311,6 @@
await usingShidenPlaygrounds(shidenUrl, async (helper) => {
if(!(await helper.callRpc('api.query.assets.asset', [QTZ_ASSET_ID_ON_SHIDEN])).toJSON()) {
console.log('1. Create foreign asset and metadata');
- // TODO update metadata with values from production
await helper.assets.create(
alice,
QTZ_ASSET_ID_ON_SHIDEN,
@@ -1322,8 +1321,8 @@
await helper.assets.setMetadata(
alice,
QTZ_ASSET_ID_ON_SHIDEN,
- 'Cross chain QTZ',
- 'xcQTZ',
+ 'Quartz',
+ 'QTZ',
Number(QTZ_DECIMALS),
);
tests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth1511 let alice: IKeyringPair;1511 let alice: IKeyringPair;1512 let randomAccount: IKeyringPair;1512 let randomAccount: IKeyringPair;151315131514 const UNQ_ASSET_ID_ON_ASTAR = 1;1514 const UNQ_ASSET_ID_ON_ASTAR = 18_446_744_073_709_551_631n; // The value is taken from the live Astar1515 const UNQ_MINIMAL_BALANCE_ON_ASTAR = 1n;1515 const UNQ_MINIMAL_BALANCE_ON_ASTAR = 1n; // The value is taken from the live Astar151615161517 // Unique -> Astar1517 // Unique -> Astar1518 const astarInitialBalance = 1n * (10n ** ASTAR_DECIMALS); // 1 ASTR, existential deposit required to actually create the account on Astar.1518 const astarInitialBalance = 1n * (10n ** ASTAR_DECIMALS); // 1 ASTR, existential deposit required to actually create the account on Astar.1519 const unitsPerSecond = 228_000_000_000n; // This is Phala's value. What will be ours?1519 const unitsPerSecond = 9_451_000_000_000_000_000n; // The value is taken from the live Astar1520 const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ1520 const unqToAstarTransferred = 10n * (10n ** UNQ_DECIMALS); // 10 UNQ1521 const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Astar takes a commision in foreign tokens1521 const unqToAstarArrived = 9_999_999_999_088_000_000n; // 9.999 ... UNQ, Astar takes a commision in foreign tokens152215221539 await usingAstarPlaygrounds(astarUrl, async (helper) => {1539 await usingAstarPlaygrounds(astarUrl, async (helper) => {1540 if(!(await helper.callRpc('api.query.assets.asset', [UNQ_ASSET_ID_ON_ASTAR])).toJSON()) {1540 if(!(await helper.callRpc('api.query.assets.asset', [UNQ_ASSET_ID_ON_ASTAR])).toJSON()) {1541 console.log('1. Create foreign asset and metadata');1541 console.log('1. Create foreign asset and metadata');1542 // TODO update metadata with values from production1543 await helper.assets.create(1542 await helper.assets.create(1544 alice,1543 alice,1545 UNQ_ASSET_ID_ON_ASTAR,1544 UNQ_ASSET_ID_ON_ASTAR,1550 await helper.assets.setMetadata(1549 await helper.assets.setMetadata(1551 alice,1550 alice,1552 UNQ_ASSET_ID_ON_ASTAR,1551 UNQ_ASSET_ID_ON_ASTAR,1553 'Cross chain UNQ',1552 'Unique Network',1554 'xcUNQ',1553 'UNQ',1555 Number(UNQ_DECIMALS),1554 Number(UNQ_DECIMALS),1556 );1555 );15571556