From 5aa0759a49691c20d0ba40ebd1fbf2c8dc7275c3 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Fri, 8 Dec 2023 14:20:25 +0530 Subject: [PATCH 1/3] fix: fix issue of xcm testing chopstick --- chopsticks/config.json | 5 +++-- chopsticks/main.star | 9 +++++++-- package_io/polkadot_js_app.star | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/chopsticks/config.json b/chopsticks/config.json index 688b506..1bf3c29 100644 --- a/chopsticks/config.json +++ b/chopsticks/config.json @@ -1,7 +1,8 @@ { "parachain": "acala", "xcm": { - "relaychain": "polakdot", + "relaychain": "polkadot", "parachains": ["acala", "moonbeam"] - } + }, + "explorer": true } \ No newline at end of file diff --git a/chopsticks/main.star b/chopsticks/main.star index 568ce09..a87b48c 100644 --- a/chopsticks/main.star +++ b/chopsticks/main.star @@ -2,6 +2,8 @@ This package contains code for spawning the chopstick network. """ +explorer = import_module("github.com/hugobyte/polkadot-kurtosis-package/package_io/polkadot_js_app.star") + def run(plan, args): service_details = {} if args["parachain"] != None: @@ -14,6 +16,9 @@ def run(plan, args): else: fail("xcm needs atleast two parachains") + if args["explorer"] == True: + explorer.run_pokadot_js_app(plan, "ws://127.0.0.1:8000") + return service_details @@ -35,7 +40,7 @@ def run_chopsticks_parachain(plan, para_chain): # public_ports={ # "TCP": PortSpec(number=8000) # }, - entrypoint=["/bin/sh", "-c", "yarn add @acala-network/chopsticks@latest && npx @acala-network/chopsticks --config=%s --port=8000 --allow-unresolved-imports=true" % (para_chain)] + entrypoint=["/bin/sh", "-c", "yarn add @acala-network/chopsticks@beta && npx @acala-network/chopsticks --config=%s --port=8000 --allow-unresolved-imports=true" % (para_chain)] ) service_details = plan.add_service(name="chopstick-%s" % para_chain, config=service_config) @@ -70,7 +75,7 @@ def run_chopsticks_xcm(plan, relay_chain, para_chains): image="node:latest", ports=ports, public_ports=public_ports, - entrypoint=["/bin/sh", "-c", "yarn add @acala-network/chopsticks@latest && %s" % (exec_cmd)] + entrypoint=["/bin/sh", "-c", "yarn add @acala-network/chopsticks@beta && %s" % (exec_cmd)] ) service_details = plan.add_service(name="chopstick-xcm", config=service_config) diff --git a/package_io/polkadot_js_app.star b/package_io/polkadot_js_app.star index 40b0022..689c219 100644 --- a/package_io/polkadot_js_app.star +++ b/package_io/polkadot_js_app.star @@ -21,5 +21,5 @@ def run_pokadot_js_app(plan, ws_url): "WS_URL": ws_url, } ) - service_details = plan.add_service(name="polkadot-js", config=service_config) + service_details = plan.add_service(name="explorer", config=service_config) return service_details \ No newline at end of file From 515facbe702db585fc874fb4a5806011ae51d82e Mon Sep 17 00:00:00 2001 From: abhiyana Date: Mon, 11 Dec 2023 12:45:07 +0530 Subject: [PATCH 2/3] fix: fix issue chopstick xcm not running for moonbeam --- chopsticks/config.json | 3 +-- chopsticks/main.star | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/chopsticks/config.json b/chopsticks/config.json index 1bf3c29..35b0e48 100644 --- a/chopsticks/config.json +++ b/chopsticks/config.json @@ -3,6 +3,5 @@ "xcm": { "relaychain": "polkadot", "parachains": ["acala", "moonbeam"] - }, - "explorer": true + } } \ No newline at end of file diff --git a/chopsticks/main.star b/chopsticks/main.star index a87b48c..47e0ba7 100644 --- a/chopsticks/main.star +++ b/chopsticks/main.star @@ -2,7 +2,7 @@ This package contains code for spawning the chopstick network. """ -explorer = import_module("github.com/hugobyte/polkadot-kurtosis-package/package_io/polkadot_js_app.star") +# explorer = import_module("github.com/hugobyte/polkadot-kurtosis-package/package_io/polkadot_js_app.star") def run(plan, args): service_details = {} @@ -16,8 +16,8 @@ def run(plan, args): else: fail("xcm needs atleast two parachains") - if args["explorer"] == True: - explorer.run_pokadot_js_app(plan, "ws://127.0.0.1:8000") + # if args["explorer"] == True: + # explorer.run_pokadot_js_app(plan, "ws://127.0.0.1:8000") return service_details From 57cba3083a9346450b1e72dd9bc6c6da52f17db9 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Mon, 11 Dec 2023 12:49:40 +0530 Subject: [PATCH 3/3] refactor: format config.json --- chopsticks/config.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chopsticks/config.json b/chopsticks/config.json index 35b0e48..7672915 100644 --- a/chopsticks/config.json +++ b/chopsticks/config.json @@ -2,6 +2,9 @@ "parachain": "acala", "xcm": { "relaychain": "polkadot", - "parachains": ["acala", "moonbeam"] + "parachains": [ + "acala", + "moonbeam" + ] } } \ No newline at end of file