Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Chopsticks tests with papi and local nodes #6572

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This folder serves as a reference documentation for chopstick tests and the Parity-owned ecosystems.
It provides a working set of configuration files together with the WASM BLOBs, specifically for the Westend ecosystem.
For additional resources and original Acala configuration files, including documentation, refer to the [Acala repository](https://github.com/AcalaNetwork/chopsticks/tree/master/configs) or [Papermoon chopsticks overview](https://papermoonio.github.io/polkadot-ecosystem-docs-draft/dev-tools/chopsticks/overview/#using-a-configuration-file)

Config files, especially `wasm-override:` fields there, assume that there is a `wasms` folder within the same parent directory, and it contains pre-built WASM BLOBs of the
ecosystem under tests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
endpoint: wss://asset-hub-polkadot-rpc.dwellir.com
mock-signature-host: true
block: ${env.WESTEND_ASSET_HUB_BLOCK_NUMBER}
db: ./db.sqlite
runtime-log-level: 5
wasm-override: wasms/asset_hub_westend_runtime.compact.compressed.wasm

import-storage:
System:
Account:
-
-
- 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
- providers: 1
data:
free: 1000000000000000
-
-
- 5Eg2fntQqFi3EvFWAf71G66Ecjjah26bmFzoANAeHFgj9Lia
- providers: 1
data:
free: 1000000000000000
-
-
- 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty # Bob
- providers: 1
data:
free: 1000000000000000
# Assets:
# Account:
# - [[1984, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], { balance: 1000000000 }]
# - [[1984, 5Eg2fntQqFi3EvFWAf71G66Ecjjah26bmFzoANAeHFgj9Lia], { balance: 1000000000 }]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
endpoint: wss://bridge-hub-polkadot-rpc.dwellir.com
mock-signature-host: true
block: ${env.WESTEND_BRIDGE_HUB_BLOCK_NUMBER}
db: ./db.sqlite
runtime-log-level: 5
wasm-override: wasms/bridge_hub_westend_runtime.compact.compressed.wasm

import-storage:
System:
Account:
-
-
- 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY # Alice
- providers: 1
data:
free: 1000000000000000
-
-
- 5Eg2fntQqFi3EvFWAf71G66Ecjjah26bmFzoANAeHFgj9Lia
- providers: 1
data:
free: 1000000000000000
-
-
- 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty # Bob
- providers: 1
data:
free: 1000000000000000
# Assets:
# Account:
# - [[1984, 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY], { balance: 1000000000 }]
# - [[1984, 5Eg2fntQqFi3EvFWAf71G66Ecjjah26bmFzoANAeHFgj9Lia], { balance: 1000000000 }]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
endpoint:
- wss://westend-rpc.dwellir.com
mock-signature-host: true
block: ${env.WESTEND_BLOCK_NUMBER}
db: ./db.sqlite
runtime-log-level: 5
wasm-override: wasms/westend_runtime.compact.compressed.wasm

import-storage:
XcmPallet:
SafeXcmVersion: 5
System:
Account:
-
-
- 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
- providers: 1
data:
free: '10000000000000000000'
ParasDisputes:
$removePrefix: ['disputes']
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# v5-sac-test

To install dependencies:

```bash
bun add polkadot-api
# now you need to switch to another terminal window where you executed bunx command, make sure that chains are running and copy Asset Hub's port in the command below (usually the port is 8001).
bun papi add wnd_ah -w ws://localhost:8001
bun add @polkadot-labs/hdkd
```

To run the test:

```bash
bun test ./index.ts
# note: the test may time out during the first run. Single retry usually helps.
```

This project was created using `bun init` in bun v1.1.34. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
Loading
Loading