Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Apr 27, 2024
2 parents f2c2ee2 + 696850d commit 411f53b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cumulus-pallet-xcmp-queue = { version = "0.7.0", default-features = false }
cumulus-primitives-core = { version = "0.7.0", default-features = false }
cumulus-primitives-timestamp = { version = "0.7.0", default-features = false }
cumulus-primitives-utility = { version = "0.7.3", default-features = false }
pallet-collator-selection = { version = "9.0.0", default-features = false }
pallet-collator-selection = { version = "9.0.2", default-features = false }
parachain-info = { version = "0.7.0", package = "staging-parachain-info", default-features = false }
parachains-common = { version = "7.0.0", default-features = false }
sp-timestamp = { version = "26.0.0", default-features = false }
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,23 @@
export PATH=/home/<username>/RegionX-Node/:$PATH
```
4. Run the test:
4. Run the tests:
- block production
```
zombienet-linux -p native test ./zombienet_tests/0001-smoke-test.zndsl
```
```
zombienet-linux -p native test ./zombienet_tests/0001-block-production.zndsl
```
- native fee payment
```
zombienet-linux -p native test ./zombienet_tests/0002-native-fee-payment.zndsl
```
- custom fee payment
```
zombienet-linux -p native test ./zombienet_tests/0003-custom-fee-payment.zndsl
```
9 changes: 4 additions & 5 deletions e2e_tests/custom-fee-payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const { submitExtrinsic } = require("./common");
const RELAY_ASSET_ID = 1;

async function run(nodeName, networkInfo, _jsArgs) {
console.log(nodeName);
const { wsUri: regionXUri } = networkInfo.nodesByName[nodeName];
const { wsUri: rococoUri } = networkInfo.nodesByName["rococo-validator01"];

Expand Down Expand Up @@ -42,7 +41,7 @@ async function run(nodeName, networkInfo, _jsArgs) {

const assetSetupCalls = [
regionXApi.tx.assetRegistry.registerAsset(assetMetadata, RELAY_ASSET_ID),
regionXApi.tx.assetRate.create(RELAY_ASSET_ID, 1000000000000000000n), // 1 on 1
regionXApi.tx.assetRate.create(RELAY_ASSET_ID, 1_000_000_000_000_000_000n), // 1 on 1
regionXApi.tx.tokens.setBalance(
alice.address,
RELAY_ASSET_ID,
Expand All @@ -51,9 +50,9 @@ async function run(nodeName, networkInfo, _jsArgs) {
),
];
const batchCall = regionXApi.tx.utility.batch(assetSetupCalls);
const sudo = regionXApi.tx.sudo.sudo(batchCall);
const sudoCall = regionXApi.tx.sudo.sudo(batchCall);

await submitExtrinsic(alice, sudo, {});
await submitExtrinsic(alice, sudoCall, {});

const receiverKeypair = new Keyring();
receiverKeypair.addFromAddress(alice.address);
Expand Down Expand Up @@ -92,7 +91,7 @@ async function run(nodeName, networkInfo, _jsArgs) {
);
await submitExtrinsic(alice, reserveTransfer, {});

// Try to pay for fees with relay asset.
// Try to pay for fees with relay chain asset.
const remarkCall = regionXApi.tx.system.remark("0x44");
await submitExtrinsic(alice, remarkCall, { assetId: RELAY_ASSET_ID });
}
Expand Down
2 changes: 1 addition & 1 deletion zombienet_tests/0001-block-production.zndsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Description: Block production smoke test
Network: ./0001-smoke-test.toml
Network: ./0001-block-production.toml
Creds: config

alice: is up
Expand Down

0 comments on commit 411f53b

Please sign in to comment.