Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e170f4c
Add statemine like runtime for xcm tests
girazoki Jan 10, 2022
ef6ae21
Be able to receive both prefixes from statemine, while add an extrins…
girazoki Jan 10, 2022
32cdb42
Add statemine/statemint tests
girazoki Jan 10, 2022
a15613b
add statemine runtime test
girazoki Jan 10, 2022
9d44c8f
refactor
girazoki Jan 10, 2022
bf39e2e
More rust and typescript tests
girazoki Jan 11, 2022
aeef2b3
NPX
girazoki Jan 11, 2022
306bb0e
Document tests
girazoki Jan 11, 2022
6bc863c
editorconfig
girazoki Jan 11, 2022
01b0618
Merge remote-tracking branch 'upstream/master' into girazoki-avoid-st…
girazoki Jan 11, 2022
bdeaebf
Update benchmark
girazoki Jan 11, 2022
14c2599
Update weights
girazoki Jan 11, 2022
8b4dcbb
Update message
girazoki Jan 11, 2022
8aa9b70
Merge remote-tracking branch 'upstream/master' into girazoki-avoid-st…
girazoki Jan 12, 2022
c7112a7
Update estamite for assets transfer
girazoki Jan 13, 2022
1895e6c
Adapt test and package-lock to run all tests correctly
girazoki Jan 13, 2022
723dd97
Prettier
girazoki Jan 13, 2022
1b4e8e0
Merge remote-tracking branch 'upstream/master' into girazoki-avoid-st…
girazoki Jan 17, 2022
5ec2c1f
Update test with AssetDoesNotExist
girazoki Jan 17, 2022
2667fef
Update to 3 in alphanet
girazoki Jan 17, 2022
982b6ec
New storage item with mapping from assetType -> AssetId
girazoki Jan 18, 2022
fd2e0dc
Migration referencing units per second by assetType and not by assetId
girazoki Jan 18, 2022
34344aa
Add migrations
girazoki Jan 18, 2022
82f30eb
Add test for new migration
girazoki Jan 18, 2022
67b0aae
adapt traits to new storage item in pallet-asset-amanger
girazoki Jan 18, 2022
13852c4
Remove AsserId bound in FirstAssetTrader
girazoki Jan 18, 2022
5c82ee9
Update all tests to new design
girazoki Jan 18, 2022
c0fc100
Test third migration: migrate prefixes from previous statemine to new…
girazoki Jan 18, 2022
d2694d0
Integration tests change
girazoki Jan 18, 2022
e0cb77f
Update moonriver integration tests
girazoki Jan 18, 2022
e31d450
Merge remote-tracking branch 'upstream/master' into girazoki-avoid-st…
girazoki Jan 19, 2022
cdc8f42
Adapt moonbeam to migrations and statemint
girazoki Jan 19, 2022
42399ad
Make all migrations be independent from each other, and thus they can…
girazoki Jan 19, 2022
fff3b82
Define how we are going to pass statemine info to migration
girazoki Jan 19, 2022
94dbdfa
Update names of migrations
girazoki Jan 19, 2022
eccdb27
Include migration to all runtimes
girazoki Jan 19, 2022
555d0bf
Adapt tests to changes in set assets units per second plus statemint …
girazoki Jan 19, 2022
b23dcf7
Toml sort
girazoki Jan 19, 2022
437d089
Add statemine like to moonbeam
girazoki Jan 19, 2022
f7ef5c0
Prettier
girazoki Jan 19, 2022
a8e899c
EditorConfig
girazoki Jan 19, 2022
ee85d85
Fmt
girazoki Jan 19, 2022
c025e17
Editorconfig
girazoki Jan 19, 2022
c7cdf07
EditorCOnfig too
girazoki Jan 19, 2022
988eb26
Update benchmarks too
girazoki Jan 19, 2022
c7650bd
Editorconfig third try
girazoki Jan 19, 2022
90a2026
Update weights
girazoki Jan 19, 2022
8392853
Remove unused variable
girazoki Jan 19, 2022
9a97266
Remove silly comment
girazoki Jan 19, 2022
239964b
Tests for regular users cannot call root extrinsics
girazoki Jan 19, 2022
4b8faef
Add PR suggestions
girazoki Jan 20, 2022
08452c5
Documentation about migrations
girazoki Jan 20, 2022
5086d17
Merge remote-tracking branch 'upstream/master' into girazoki-avoid-st…
girazoki Jan 20, 2022
fc91d87
Comments in storage items
girazoki Jan 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adapt tests to changes in set assets units per second plus statemint …
…prefix change
  • Loading branch information
girazoki committed Jan 19, 2022
commit 555d0bf80a77e17ac1cd3debc23c9f6d86aaba92
2 changes: 1 addition & 1 deletion tests/para-tests-no-ci/test-xcm-para.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async function registerAssetToParachain(
const { events } = await createBlockWithExtrinsicParachain(
parachainApi,
sudoKeyring,
parachainApi.tx.sudo.sudo(parachainApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0))
parachainApi.tx.sudo.sudo(parachainApi.tx.assetManager.setAssetUnitsPerSecond(assetLocation, 0))
);
return { events, assetId };
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test-asset-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describeDevMoonbeam("XCM - asset manager - register asset", (context) => {
const { events } = await createBlockWithExtrinsic(
context,
alith,
parachainOne.tx.sudo.sudo(parachainOne.tx.assetManager.setAssetUnitsPerSecond(assetId, 0))
parachainOne.tx.sudo.sudo(parachainOne.tx.assetManager.setAssetUnitsPerSecond(sourceLocation, 0))
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
expect(events[4].method.toString()).to.eq("ExtrinsicSuccess");
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test-mock-dmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describeDevMoonbeam("Mock XCM - receive downward transfer", (context) => {
context,
alith,
context.polkadotApi.tx.sudo.sudo(
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0)
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(sourceLocation, 0)
)
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
Expand Down
13 changes: 7 additions & 6 deletions tests/tests/test-mock-hrmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const assetMetadata = {

const sourceLocation = { XCM: { parents: 1, interior: { X1: { Parachain: foreign_para_id } } } };
const statemintLocation = {
XCM: { parents: 1, interior: { X2: [{ Parachain: statemint_para_id }, { GeneralIndex: 0 }] } },
XCM: { parents: 1, interior: { X3: [{ Parachain: statemint_para_id }, { PalletInstance: statemint_assets_pallet_instance }, { GeneralIndex: 0 }] } },
};

describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
Expand Down Expand Up @@ -64,7 +64,7 @@ describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
context,
alith,
context.polkadotApi.tx.sudo.sudo(
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0)
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(sourceLocation, 0)
)
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
Expand Down Expand Up @@ -103,6 +103,7 @@ describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
alith = keyringEth.addFromUri(ALITH_PRIV_KEY, null, "ethereum");

// registerAsset
// We register statemine with the new prefix
const { events: eventsRegister } = await createBlockWithExtrinsic(
context,
alith,
Expand All @@ -128,7 +129,7 @@ describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
context,
alith,
context.polkadotApi.tx.sudo.sudo(
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0)
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(statemintLocation, 0)
)
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
Expand All @@ -141,7 +142,7 @@ describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase());
});

it("Should receive a 10 Statemine tokens to Alith with prefix 1", async function () {
it("Should receive a 10 Statemine tokens to Alith with old prefix", async function () {
// We are going to test that, using the prefix prior to
// https://github.com/paritytech/cumulus/pull/831
// we can receive the tokens on the assetId registed with the old prefix
Expand Down Expand Up @@ -254,7 +255,7 @@ describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
context,
alith,
context.polkadotApi.tx.sudo.sudo(
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0)
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(statemintLocation, 0)
)
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
Expand All @@ -267,7 +268,7 @@ describeDevMoonbeam("Mock XCM - receive horiontal transfer", (context) => {
expect(registeredAsset.owner.toHex()).to.eq(palletId.toLowerCase());
});

it("Should receive a 10 Statemine tokens to Alith with prefix 2", async function () {
it("Should receive a 10 Statemine tokens to Alith with new prefix", async function () {
// We are going to test that, using the prefix after
// https://github.com/paritytech/cumulus/pull/831
// we can receive the tokens on the assetId registed with the old prefix
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/test-pallet-maintenance-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ describeDevMoonbeam(
context,
sudoAccount,
context.polkadotApi.tx.sudo.sudo(
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0)
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(sourceLocation, 0)
)
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
Expand Down Expand Up @@ -577,7 +577,7 @@ describeDevMoonbeam(
context,
sudoAccount,
context.polkadotApi.tx.sudo.sudo(
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(assetId, 0)
context.polkadotApi.tx.assetManager.setAssetUnitsPerSecond(sourceLocation, 0)
)
);
expect(events[1].method.toString()).to.eq("UnitsPerSecondChanged");
Expand Down