@@ -148,3 +148,81 @@ jobs:
148148 echo "Indexer logs:"
149149 cat packages/indexer/indexer_output.log
150150 fi
151+
152+ # Full phantom-order flow: a locally-built simnode emits the order, real simplex IntentFillers
153+ # watch + submit USDC->cNGN bids, and the SDK aggregation reduces them to a snapshot — simulated
154+ # against an anvil fork of Base mainnet (needs eth_simulateV1 + the real gateway/tokens).
155+ phantom-filler-e2e :
156+ name : Phantom filler E2E (simnode + anvil)
157+ runs-on : arc-runner-set
158+ steps :
159+ - name : Checkout repository
160+ uses : actions/checkout@v4
161+ with :
162+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
163+ submodules : recursive
164+
165+ - name : Install system dependencies
166+ run : |
167+ sudo apt-get update
168+ sudo apt-get install -y clang netcat wget curl libssl-dev llvm libclang-dev libudev-dev make libprotobuf-dev protobuf-compiler pkg-config
169+ echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
170+
171+ - name : Install Rust toolchain
172+ uses : dtolnay/rust-toolchain@nightly
173+ with :
174+ toolchain : stable
175+
176+ - name : Add wasm toolchain
177+ run : rustup target add wasm32-unknown-unknown --toolchain nightly
178+
179+ - uses : webfactory/ssh-agent@v0.7.0
180+ with :
181+ ssh-private-key : ${{ secrets.SSH_KEY }}
182+
183+ - uses : Swatinem/rust-cache@v2
184+
185+ - name : Install Foundry (anvil)
186+ uses : foundry-rs/foundry-toolchain@v1
187+
188+ - name : Set up Node
189+ uses : actions/setup-node@v4
190+ with :
191+ node-version : " 22"
192+
193+ - name : Set up pnpm
194+ uses : pnpm/action-setup@v4
195+ with :
196+ version : 11
197+
198+ # Required by the sp1-recursion-gnark-ffi build script, which compiles a Go library.
199+ - name : Install Go
200+ uses : actions/setup-go@v5
201+ with :
202+ go-version : " 1.24"
203+
204+ - name : Build hyperbridge simnode
205+ run : cargo build -p hyperbridge
206+
207+ - name : Install + build SDK
208+ working-directory : sdk
209+ run : |
210+ pnpm install
211+ pnpm --filter "@hyperbridge/sdk" build:node
212+
213+ - name : Run phantom-filler E2E (anvil fork of Base + simnode)
214+ env :
215+ SIMNODE_URL : ws://127.0.0.1:9991
216+ ANVIL_URL : http://127.0.0.1:8545
217+ run : |
218+ anvil --fork-url "${{ secrets.BASE_MAINNET }}" --port 8545 --silent &
219+ ./target/debug/hyperbridge simnode --chain gargantua-1000 --rpc-port 9991 --port 40341 --tmp --rpc-methods=unsafe --rpc-cors=all --pool-type=single-state &
220+ ./scripts/wait_for_tcp_port_opening.sh localhost 8545
221+ ./scripts/wait_for_tcp_port_opening.sh localhost 9991
222+ cd sdk && pnpm --filter "@hyperbridge/simplex" test:phantom-filler-e2e
223+
224+ - name : Cleanup
225+ if : always()
226+ run : |
227+ pkill -f "hyperbridge simnode" || true
228+ pkill -f "anvil --fork-url" || true
0 commit comments