@@ -390,7 +390,10 @@ stop-services test_dir:
390390# test_dir - Test directory where services are running
391391# runtime - Runtime name for smoldot chainspec path resolution
392392# mode - Connection mode: "ws" (WebSocket RPC node) or "smoldot" (light client)
393- run-test-authorize-and-store test_dir runtime mode = " ws":
393+ # ws_url - WebSocket URL (default: ws://localhost:10000, only used in ws mode)
394+ # seed - Account seed phrase or dev seed (default: //Alice, only used in ws mode)
395+ # ipfs_api_url - IPFS API URL (default: http://127.0.0.1:8080)
396+ run-test-authorize-and-store test_dir runtime mode = " ws" ws_url ="ws : //localhost :10000" seed ="//Alice " ipfs_api_url ="http ://127.0.0.1:8080":
394397 #!/usr/bin/env bash
395398 set -e
396399
@@ -399,34 +402,43 @@ run-test-authorize-and-store test_dir runtime mode="ws":
399402 SCRIPT_NAME=" authorize_and_store_papi_smoldot.js"
400403 elif [ " {{ mode }} " = " ws" ]; then
401404 echo " 🧪 Running authorize and store test (mode: ws, runtime: {{ runtime }} )..."
405+ echo " WS URL: {{ ws_url }} "
406+ echo " Seed: {{ seed }} "
407+ echo " IPFS API: {{ ipfs_api_url }} "
402408 SCRIPT_NAME=" authorize_and_store_papi.js"
403409 else
404410 echo " ❌ Error: Invalid mode '{{ mode }} '. Must be 'ws' or 'smoldot'"
405411 exit 1
406412 fi
407413
408- # Run the script with chainspec_path parameter only for smoldot mode
414+ # Run the script with parameters
409415 if [ " {{ mode }} " = " smoldot" ]; then
410416 if [ " {{ runtime }} " = " bulletin-westend-runtime" ]; then
411417 RELAY_CHAINSPEC_PATH=" {{ test_dir }} /bob/cfg/westend-local.json"
412418 PARACHAIN_CHAINSPEC_PATH=" {{ test_dir }} /bulletin-westend-collator-2/cfg/westend-local-2487.json"
413- node $SCRIPT_NAME " $RELAY_CHAINSPEC_PATH" " $PARACHAIN_CHAINSPEC_PATH"
419+ node $SCRIPT_NAME " $RELAY_CHAINSPEC_PATH" " $PARACHAIN_CHAINSPEC_PATH" " {{ ipfs_api_url }} "
414420 else
415421 CHAINSPEC_PATH=" {{ test_dir }} /bob/cfg/bulletin-polkadot-local.json"
416- node $SCRIPT_NAME " $CHAINSPEC_PATH"
422+ node $SCRIPT_NAME " $CHAINSPEC_PATH" " {{ ipfs_api_url }} "
417423 fi
418424 else
419- node $SCRIPT_NAME
425+ node $SCRIPT_NAME " {{ ws_url }} " " {{ seed }} " " {{ ipfs_api_url }} "
420426 fi
421427
422428# Run store-chunked-data test only (services must already be running via start-services)
423429# Parameters:
424430# test_dir - Test directory where services are running
425- run-test-store-chunked-data test_dir :
431+ # ws_url - WebSocket URL of the Bulletin chain node (default: ws://localhost:10000)
432+ # seed - Account seed phrase or dev seed (default: //Alice)
433+ # ipfs_api_url - IPFS API URL (default: http://127.0.0.1:8080)
434+ run-test-store-chunked-data test_dir ws_url ="ws : //localhost :10000" seed ="//Alice " ipfs_api_url ="http ://127.0.0.1:8080":
426435 #!/usr/bin/env bash
427436 set -e
428437 echo " 🧪 Running store chunked data test (test_dir: {{ test_dir }} )..."
429- node store_chunked_data.js
438+ echo " WS URL: {{ ws_url }} "
439+ echo " Seed: {{ seed }} "
440+ echo " IPFS API: {{ ipfs_api_url }} "
441+ node store_chunked_data.js " {{ ws_url }} " " {{ seed }} " " {{ ipfs_api_url }} "
430442
431443# Run store-big-data test only (services must already be running via start-services)
432444# Parameters:
@@ -446,11 +458,17 @@ run-test-store-big-data test_dir ws_url="ws://localhost:10000" seed="//Alice" ip
446458# Run authorize-preimage-and-store test only (services must already be running via start-services)
447459# Parameters:
448460# test_dir - Test directory where services are running
449- run-test-authorize-preimage-and-store test_dir :
461+ # ws_url - WebSocket URL of the Bulletin chain node (default: ws://localhost:10000)
462+ # seed - Account seed phrase or dev seed (default: //Alice)
463+ # ipfs_api_url - IPFS API URL (default: http://127.0.0.1:8080)
464+ run-test-authorize-preimage-and-store test_dir ws_url ="ws : //localhost :10000" seed ="//Alice " ipfs_api_url ="http ://127.0.0.1:8080":
450465 #!/usr/bin/env bash
451466 set -e
452467 echo " 🧪 Running authorize preimage and store test (test_dir: {{ test_dir }} )..."
453- node authorize_preimage_and_store_papi.js
468+ echo " WS URL: {{ ws_url }} "
469+ echo " Seed: {{ seed }} "
470+ echo " IPFS API: {{ ipfs_api_url }} "
471+ node authorize_preimage_and_store_papi.js " {{ ws_url }} " " {{ seed }} " " {{ ipfs_api_url }} "
454472
455473# ============================================================================
456474# Standalone recipes (with full setup/teardown) - kept for local dev convenience
@@ -479,20 +497,20 @@ run-authorize-and-store runtime mode="ws": npm-install
479497 just setup-services " $TEST_DIR" " {{ runtime }} "
480498
481499 set + e
482- # Run the script with chainspec_path parameter only for smoldot mode
500+ # Run the script with parameters
483501 if [ " {{ mode }} " = " smoldot" ]; then
484502 # Set chainspec path based on runtime
485503 if [ " {{ runtime }} " = " bulletin-westend-runtime" ]; then
486504 # Parachain: relay chain (required) + parachain spec (optional)
487505 RELAY_CHAINSPEC_PATH=" $TEST_DIR/bob/cfg/westend-local.json"
488506 PARACHAIN_CHAINSPEC_PATH=" $TEST_DIR/bulletin-westend-collator-2/cfg/westend-local-2487.json"
489- node $SCRIPT_NAME " $RELAY_CHAINSPEC_PATH" " $PARACHAIN_CHAINSPEC_PATH"
507+ node $SCRIPT_NAME " $RELAY_CHAINSPEC_PATH" " $PARACHAIN_CHAINSPEC_PATH" " http://127.0.0.1:8080"
490508 else # bulletin-polkadot-runtime (solochain)
491509 CHAINSPEC_PATH=" $TEST_DIR/bob/cfg/bulletin-polkadot-local.json"
492- node $SCRIPT_NAME " $CHAINSPEC_PATH"
510+ node $SCRIPT_NAME " $CHAINSPEC_PATH" " http://127.0.0.1:8080"
493511 fi
494512 else
495- node $SCRIPT_NAME
513+ node $SCRIPT_NAME " ws://localhost:10000" " //Alice" " http://127.0.0.1:8080"
496514 fi
497515 EXAMPLE_EXIT=$?
498516
@@ -510,7 +528,10 @@ run-authorize-and-store runtime mode="ws": npm-install
510528# Run store chunked data example with Docker IPFS
511529# Parameters:
512530# runtime - Runtime name (e.g., "bulletin-polkadot-runtime", "bulletin-westend-runtime")
513- run-store-chunked-data runtime : npm-install
531+ # ws_url - WebSocket URL (default: ws://localhost:10000)
532+ # seed - Account seed phrase or dev seed (default: //Alice)
533+ # ipfs_api_url - IPFS API URL (default: http://127.0.0.1:8080)
534+ run-store-chunked-data runtime ws_url ="ws : //localhost :10000" seed ="//Alice " ipfs_api_url ="http ://127.0.0.1:8080": npm-install
514535 #!/usr/bin/env bash
515536 set -e
516537
@@ -520,7 +541,7 @@ run-store-chunked-data runtime: npm-install
520541 just setup-services " $TEST_DIR" " {{ runtime }} "
521542
522543 set + e
523- node store_chunked_data.js
544+ node store_chunked_data.js " {{ ws_url }} " " {{ seed }} " " {{ ipfs_api_url }} "
524545 EXAMPLE_EXIT=$?
525546
526547 echo " "
@@ -565,7 +586,12 @@ run-store-big-data runtime ws_url="ws://localhost:10000" seed="//Alice" ipfs_api
565586 exit $EXAMPLE_EXIT
566587
567588# Run authorize preimage and store with PAPI example.
568- run-authorize-preimage-and-store-papi runtime : npm-install
589+ # Parameters:
590+ # runtime - Runtime name (e.g., "bulletin-polkadot-runtime", "bulletin-westend-runtime")
591+ # ws_url - WebSocket URL (default: ws://localhost:10000)
592+ # seed - Account seed phrase or dev seed (default: //Alice)
593+ # ipfs_api_url - IPFS API URL (default: http://127.0.0.1:8080)
594+ run-authorize-preimage-and-store-papi runtime ws_url ="ws : //localhost :10000" seed ="//Alice " ipfs_api_url ="http ://127.0.0.1:8080": npm-install
569595 #!/usr/bin/env bash
570596 set -e
571597
@@ -575,7 +601,7 @@ run-authorize-preimage-and-store-papi runtime: npm-install
575601 just setup-services " $TEST_DIR" " {{ runtime }} "
576602
577603 set + e
578- node authorize_preimage_and_store_papi.js
604+ node authorize_preimage_and_store_papi.js " {{ ws_url }} " " {{ seed }} " " {{ ipfs_api_url }} "
579605 EXAMPLE_EXIT=$?
580606
581607 echo " "
0 commit comments