git.delta.rocks / unique-network / refs/commits / 68bf2bb2d784

difftreelog

fix use config for xcm urls

Daniel Shiposha2022-10-14parent: #294182f.patch.diff
in: master

4 files changed

modifiedtests/src/config.tsdiffbeforeafterboth
19const config = {19const config = {
20 substrateUrl: process.env.substrateUrl || 'ws://127.0.0.1:9944',20 substrateUrl: process.env.substrateUrl || 'ws://127.0.0.1:9944',
21 frontierUrl: process.env.frontierUrl || 'http://127.0.0.1:9933',21 frontierUrl: process.env.frontierUrl || 'http://127.0.0.1:9933',
22 relayUrl: process.env.relayUrl || 'ws://127.0.0.1:9844',
23 acalaUrl: process.env.acalaUrl || 'ws://127.0.0.1:9946',
24 karuraUrl: process.env.acalaUrl || 'ws://127.0.0.1:9946',
25 moonbeamUrl: process.env.moonbeamUrl || 'ws://127.0.0.1:9947',
26 moonriverUrl: process.env.moonbeamUrl || 'ws://127.0.0.1:9947',
27 westmintUrl: process.env.westmintUrl || 'ws://127.0.0.1:9948',
22};28};
2329
24export default config;30export default config;
modifiedtests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth
15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import config from '../config';
18import {itSub, expect, describeXcm, usingPlaygrounds, usingWestmintPlaygrounds, usingRelayPlaygrounds} from '../util/playgrounds';19import {itSub, expect, describeXcm, usingPlaygrounds, usingWestmintPlaygrounds, usingRelayPlaygrounds} from '../util/playgrounds';
1920
20const STATEMINE_CHAIN = 1000;21const STATEMINE_CHAIN = 1000;
21const UNIQUE_CHAIN = 2095;22const UNIQUE_CHAIN = 2095;
22
23const RELAY_PORT = '9844';
24const STATEMINE_PORT = '9948';
2523
26const relayUrl = 'ws://127.0.0.1:' + RELAY_PORT;24const relayUrl = config.relayUrl;
27const statemineUrl = 'ws://127.0.0.1:' + STATEMINE_PORT;25const westmintUrl = config.westmintUrl;
2826
29const STATEMINE_PALLET_INSTANCE = 50;27const STATEMINE_PALLET_INSTANCE = 50;
30const ASSET_ID = 100;28const ASSET_ID = 100;
65 bob = privateKey('//Bob'); // funds donor63 bob = privateKey('//Bob'); // funds donor
66 });64 });
6765
68 await usingWestmintPlaygrounds(statemineUrl, async (helper) => {66 await usingWestmintPlaygrounds(westmintUrl, async (helper) => {
69 // 350.00 (three hundred fifty) DOT67 // 350.00 (three hundred fifty) DOT
70 const fundingAmount = 3_500_000_000_000n; 68 const fundingAmount = 3_500_000_000_000n;
7169
157 });155 });
158156
159 itSub('Should connect and send USDT from Westmint to Opal', async ({helper}) => {157 itSub('Should connect and send USDT from Westmint to Opal', async ({helper}) => {
160 await usingWestmintPlaygrounds(statemineUrl, async (helper) => {158 await usingWestmintPlaygrounds(westmintUrl, async (helper) => {
161 const dest = {159 const dest = {
162 V1: {160 V1: {
163 parents: 1,161 parents: 1,
286 balanceOpalFinal = await helper.balance.getSubstrate(alice.address);284 balanceOpalFinal = await helper.balance.getSubstrate(alice.address);
287 expect(balanceOpalAfter > balanceOpalFinal).to.be.true;285 expect(balanceOpalAfter > balanceOpalFinal).to.be.true;
288286
289 await usingWestmintPlaygrounds(statemineUrl, async (helper) => {287 await usingWestmintPlaygrounds(westmintUrl, async (helper) => {
290 await helper.wait.newBlocks(3);288 await helper.wait.newBlocks(3);
291 289
292 // The USDT token never paid fees. Its amount not changed from begin value.290 // The USDT token never paid fees. Its amount not changed from begin value.
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {blake2AsHex} from '@polkadot/util-crypto';18import {blake2AsHex} from '@polkadot/util-crypto';
19import config from '../config';
19import {XcmV2TraitsOutcome, XcmV2TraitsError} from '../interfaces';20import {XcmV2TraitsOutcome, XcmV2TraitsError} from '../interfaces';
20import {itSub, expect, describeXcm, usingPlaygrounds, usingKaruraPlaygrounds, usingRelayPlaygrounds, usingMoonriverPlaygrounds} from '../util/playgrounds';21import {itSub, expect, describeXcm, usingPlaygrounds, usingKaruraPlaygrounds, usingRelayPlaygrounds, usingMoonriverPlaygrounds} from '../util/playgrounds';
2122
22const QUARTZ_CHAIN = 2095;23const QUARTZ_CHAIN = 2095;
23const KARURA_CHAIN = 2000;24const KARURA_CHAIN = 2000;
24const MOONRIVER_CHAIN = 2023;25const MOONRIVER_CHAIN = 2023;
25
26const RELAY_PORT = 9844;
27const KARURA_PORT = 9946;
28const MOONRIVER_PORT = 9947;
2926
30const relayUrl = 'ws://127.0.0.1:' + RELAY_PORT;27const relayUrl = config.relayUrl;
31const karuraUrl = 'ws://127.0.0.1:' + KARURA_PORT;28const karuraUrl = config.karuraUrl;
32const moonriverUrl = 'ws://127.0.0.1:' + MOONRIVER_PORT;29const moonriverUrl = config.moonriverUrl;
3330
34const KARURA_DECIMALS = 12;31const KARURA_DECIMALS = 12;
3532
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {blake2AsHex} from '@polkadot/util-crypto';18import {blake2AsHex} from '@polkadot/util-crypto';
19import config from '../config';
19import {XcmV2TraitsError, XcmV2TraitsOutcome} from '../interfaces';20import {XcmV2TraitsError, XcmV2TraitsOutcome} from '../interfaces';
20import {itSub, expect, describeXcm, usingPlaygrounds, usingAcalaPlaygrounds, usingRelayPlaygrounds, usingMoonbeamPlaygrounds} from '../util/playgrounds';21import {itSub, expect, describeXcm, usingPlaygrounds, usingAcalaPlaygrounds, usingRelayPlaygrounds, usingMoonbeamPlaygrounds} from '../util/playgrounds';
2122
22const UNIQUE_CHAIN = 2037;23const UNIQUE_CHAIN = 2037;
23const ACALA_CHAIN = 2000;24const ACALA_CHAIN = 2000;
24const MOONBEAM_CHAIN = 2004;25const MOONBEAM_CHAIN = 2004;
25
26const RELAY_PORT = 9844;
27const ACALA_PORT = 9946;
28const MOONBEAM_PORT = 9947;
2926
30const relayUrl = 'ws://127.0.0.1:' + RELAY_PORT;27const relayUrl = config.relayUrl;
31const acalaUrl = 'ws://127.0.0.1:' + ACALA_PORT;28const acalaUrl = config.acalaUrl;
32const moonbeamUrl = 'ws://127.0.0.1:' + MOONBEAM_PORT;29const moonbeamUrl = config.moonbeamUrl;
3330
34const ACALA_DECIMALS = 12;31const ACALA_DECIMALS = 12;
3532