Files
pezkuwi-sdk/bizinikiwi/pezframe/staking-async/runtimes/papi-tests/justfile
T
pezkuwichain 1c0e57d984 feat: Rebrand Polkadot/Substrate references to PezkuwiChain
This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
2025-12-14 00:04:10 +03:00

134 lines
4.4 KiB
Makefile

# PAPI Tests Development Workflow
# Install dependencies (descriptors needs to be generated and installed the 1st time only via `setup`)
install:
echo "🔄 Install bun dependencies"
bun install
# Generate fresh metadata and descriptors, then install all dependencies
setup:
#!/usr/bin/env bash
set -euo pipefail
echo "🧹 Killing any existing zombienet or chain processes..."
just killall
just install || echo "🚧 Generate and installed missing descriptors..."
just build-and-generate-chains
# Start zombienet and wait for ws endpoints to be ready
zombienet --provider native -l text spawn zn-s.toml 2>&1 &
CHAINS_PID=$!
echo "⏳ Waiting for chains to be ready (ws endpoints on 9944, 9945 and 9946)..."
for port in 9944 9945 9946; do
for i in {1..24}; do
if nc -z localhost $port; then
echo "✅ Port $port is open."
break
fi
sleep 10
if [ $i -eq 24 ]; then
echo "❌ Timeout waiting for port $port"
kill $CHAINS_PID || true
pkill -f zombienet || true
exit 1
fi
done
done
just generate-descriptors
echo "🧹 Cleaning up chain processes..."
kill $CHAINS_PID || true
just killall
echo "✅ Setup complete! You can now run tests or development commands."
# Clean generated files and dependencies
clean:
#!/usr/bin/env bash
set -euo pipefail
rm -rf .papi node_modules bun.lockb
echo "🧹 Cleaned .papi, node_modules, and lockfile"
# Generate descriptors from running chains (assumes chains are already running)
generate-descriptors:
#!/usr/bin/env bash
set -euo pipefail
echo "📋 Generating PAPI descriptors from ws endpoints..."
npx papi add -w ws://localhost:9946 parachain
npx papi add -w ws://localhost:9945 rc
npx papi
bun install --only-missing
echo "📋 Descriptors generated and dependencies updated"
# Run tests
test:
bun test
# Build and generate chain specs (shared logic)
build-and-generate-chains:
#!/usr/bin/env bash
set -euo pipefail
echo "🔧 Building chain-spec-builder and runtimes..."
LOG="runtime::multiblock-election=info,runtime::staking=info"
RUST_LOG=${LOG} cargo build --release -p pallet-staking-async-rc-runtime -p pallet-staking-async-parachain-runtime -p staging-chain-spec-builder
echo "✅ Removing any old chain-spec file"
rm -f ./parachain.json
rm -f ./rc.json
echo "✅ Creating parachain chain specs"
RUST_LOG=${LOG} ../../../../../target/release/chain-spec-builder \
create \
-t development \
--runtime ../../../../../target/release/wbuild/pallet-staking-async-parachain-runtime/pallet_staking_async_parachain_runtime.compact.compressed.wasm \
--relay-chain rococo-local \
--para-id 1100 \
named-preset fake-dot
mv ./chain_spec.json ./parachain.json
echo "✅ Creating rc chain specs"
RUST_LOG=${LOG} ../../../../../target/release/chain-spec-builder \
create \
-t development \
--runtime ../../../../../target/release/wbuild/pallet-staking-async-rc-runtime/fast_runtime_binary.rs.wasm \
named-preset fake-s
mv ./chain_spec.json ./rc.json
# Run a specific runtime preset, or print presets if none is given
run preset='':
#!/usr/bin/env bash
if [ -z "{{preset}}" ]; then
echo "⚠️ Please specify a preset."
just presets
else
bun run src/index.ts run --para-preset {{preset}}
fi
# Show available presets
presets:
@echo "Available parachain presets:"
@echo " fake-dev - 4 pages, small number of fake validators and nominators"
@echo " fake-dot - 32 pages, large number of fake validators and nominators"
@echo " fake-ksm - 16 pages, large number of fake validators and nominators"
@echo " real-s - 4 pages, alice and bob as validators, 500 fake nominators"
@echo " real-m - 4 pages, alice, bob, dave, eve as validators, 2000 fake nominators"
# Full development setup (clean + setup)
reset: clean setup
# Show help
help:
just --list
# kill all relevant processes. This is useful in case you see weird errors, most likely it is
# because you have other old stale ones running.
killall:
#!/usr/bin/env bash
set -euo pipefail
pkill -f zombienet || true
pkill -f chain-spec-builder || true
pkill -f polkadot || true
pkill -f polkadot-parachain || true