Files
tycho-protocol-sdk/protocol-testing
TAMARA LIPOWSKI f9b4b5c223 fix: UniswapV2 test - use post-cancun created pool
- Also fix balance check: this should use the stop block not start block, since the start block is before the component was even created.
2025-09-29 09:29:44 -04:00
..
2025-09-03 08:55:29 -04:00
2025-09-16 11:31:19 +02:00
2025-09-03 08:55:29 -04:00

Protocol Testing

Rust-based integration testing framework for Tycho protocol implementations. See our full docs here.

How to Run Locally

# Setup Environment Variables
export RPC_URL=..
export SUBSTREAMS_API_TOKEN=..
export RUST_LOG=protocol_testing=info,tycho_client=error

# Build Substreams wasm for BalancerV2
cd substreams
cargo build --release --package ethereum-balancer-v2 --target wasm32-unknown-unknown
cd ../protocol-testing

# Run Postgres DB using Docker compose
docker compose -f ./docker-compose.yaml up -d db

# Run test
cargo run -- --package ethereum-balancer-v2 

How to Run with Docker

# Build the images, from the project root dir
docker buildx build -f protocol-testing/postgres.Dockerfile -t protocol-testing-db:latest --load .
docker buildx build -f protocol-testing/run.Dockerfile -t protocol-testing-test-runner:latest --load .

# Export necessary env vars
export RPC_URL=..
export SUBSTREAMS_API_TOKEN=..
export PROTOCOLS="ethereum-balancer-v2=weighted_legacy_creation ethereum-ekubo-v2"

# Start and show the test logs only
docker compose up -d && docker compose logs test-runner --follow

# Clean up
docker compose down