Files
tycho-protocol-sdk/protocol-testing/entrypoint.sh
2025-09-11 10:59:00 +02:00

24 lines
620 B
Bash

#!/bin/bash
set -e
if [ "$#" -lt 1 ]; then
echo "Usage: $0 protocol1[=filter] [protocol2 ...] or \"$0 'protocol1[=filter] protocol2'\""
exit 1
fi
if [ "$#" -eq 1 ] && [[ "$1" == *" "* ]]; then
IFS=' ' read -r -a args <<< "$1"
else
args=("$@")
fi
for test in "${args[@]}"; do
protocol="${test%%=*}"
filter="${test#*=}"
if [[ "$test" == *"="* ]]; then
tycho-protocol-sdk --package-path "/app/substreams/$protocol" --db-url "$DATABASE_URL" --evm-path "/app/evm" --match-test "$filter"
else
tycho-protocol-sdk --package-path "/app/substreams/$protocol" --db-url "$DATABASE_URL" --evm-path "/app/evm"
fi
done