Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
62c3163
add phantom order support for passive price and liquidity indexing
dharjeezy Jun 19, 2026
e26564e
generate phantom order in pallet hook, governance config, remove solv…
dharjeezy Jun 22, 2026
4460afb
update simnode indexer
dharjeezy Jun 22, 2026
6eb80a1
simulate bid
dharjeezy Jun 22, 2026
f00dad3
merge main into dami/phantom-order
dharjeezy Jun 22, 2026
eb273ac
expand PhantomOrderRegistered event with token pair fields and implem…
dharjeezy Jun 23, 2026
3d34405
doc schemas
dharjeezy Jun 23, 2026
d23b75d
use SDK exposed abis and functions
dharjeezy Jun 23, 2026
ce46fcb
rev
dharjeezy Jun 23, 2026
b1a15c9
use zero output
dharjeezy Jun 23, 2026
dac3c5d
use static session address, zero output amount, hour-long bid window,…
dharjeezy Jun 23, 2026
3795ea7
update yield vault addresses
dharjeezy Jun 23, 2026
300996a
address concerns
dharjeezy Jun 24, 2026
ea3fb60
use sdk cleanly in the indexer
dharjeezy Jun 24, 2026
faf67dd
address review issues flagged
dharjeezy Jun 24, 2026
73f1828
use config-driven token slot overrides for simulateBid, drop in-memor…
dharjeezy Jun 24, 2026
1ecb810
[indexer]: add cNGN token slot overrides for Base mainnet
dharjeezy Jun 24, 2026
cf0553c
[indexer]: wire phantom order handlers into the substrate manifest te…
dharjeezy Jun 24, 2026
11d0578
address review issues and regression
dharjeezy Jun 25, 2026
02180c8
test changes
dharjeezy Jun 25, 2026
120a494
further review changes
dharjeezy Jun 25, 2026
a9ea624
fmt
dharjeezy Jun 25, 2026
685dbc6
Merge branch 'main' of github.com:polytope-labs/hyperbridge into dami…
dharjeezy Jun 25, 2026
4f7cc96
[phantom]: fix _orders slot for post-#988 layout and emit PhantomBidW…
Wizdave97 Jun 25, 2026
48af8e8
[phantom]: enforce phantom bid window < interval in governance setters
Wizdave97 Jun 25, 2026
670c92e
[indexer]: generate intent-gateway-v2-addresses from config and gitig…
Wizdave97 Jun 25, 2026
af0d78b
fix test related issue
dharjeezy Jun 25, 2026
57ca444
Merge remote-tracking branch 'origin/dami/phantom-order' into dami/ph…
dharjeezy Jun 25, 2026
c51cfc1
[indexer]: liquidity-weight the phantom order median price by solver …
Wizdave97 Jun 25, 2026
135e57f
Merge remote-tracking branch 'origin/dami/phantom-order' into dami/ph…
dharjeezy Jun 25, 2026
3495ef1
[indexer]: update pnpm-lock for @hyperbridge/sdk workspace dependency
Wizdave97 Jun 25, 2026
6a6bdc9
Merge branch 'main' of github.com:polytope-labs/hyperbridge into dami…
dharjeezy Jun 26, 2026
2b97c65
[indexer]: self-contained rate snapshots, per-snapshot LP liquidity, …
Wizdave97 Jun 26, 2026
aabf692
[indexer]: remove intentGatewayV2 config field and its codegen generator
Wizdave97 Jun 26, 2026
4aa48ca
[indexer]: resolve phantom gateway via INTENT_GATEWAY_V3_ADDRESSES; d…
Wizdave97 Jun 26, 2026
e5bda6c
[simplex]: use utility.batch for bid-with-retraction; revert enqueueR…
Wizdave97 Jun 26, 2026
9a62926
[runtime]: set phantom bid window default to 5 blocks (gargantua), 25…
Wizdave97 Jun 26, 2026
fb421c2
[indexer]: extract phantom aggregation + add multi-filler E2E (simnod…
Wizdave97 Jun 26, 2026
08e379b
[indexer]: fix ordersStorageSlot to left-pad the token key to 32 bytes
Wizdave97 Jun 26, 2026
d16fd4f
[simplex]: run real IntentFillers in the phantom E2E (USDC->cNGN, 1 U…
Wizdave97 Jun 26, 2026
1c73b33
[sdk]: move phantom aggregation into the SDK; assert it in the simple…
Wizdave97 Jun 26, 2026
1c73d8d
[simplex]: fix phantom E2E bid window to satisfy window < interval guard
Wizdave97 Jun 26, 2026
3d39a66
[simplex]: fix FX phantom quote (overfill cap), log quotes, wire E2E …
Wizdave97 Jun 26, 2026
e94cb63
[sdk]: export HexString from intents-helpers; drop FX phantom overfil…
Wizdave97 Jun 26, 2026
ac3b9bb
[indexer]: remove unused simnode docker-compose and the moved helper …
Wizdave97 Jun 26, 2026
8fc66db
[sdk]: port phantom-aggregation helper unit tests into the SDK
Wizdave97 Jun 26, 2026
35afa66
[indexer]: add chain to PhantomOrderLpBalance (field + id)
Wizdave97 Jun 26, 2026
7011783
[sdk]: sweep LP liquidity across every configured token and chain
Wizdave97 Jun 26, 2026
4543728
[sdk]: skip zero balances in the LP liquidity sweep
Wizdave97 Jun 26, 2026
374894f
[pallet]: vivid note that phantom standard_amount must be exactly one…
Wizdave97 Jun 26, 2026
ac1ddde
[simtests]: remove phantom_orders sim test
Wizdave97 Jun 26, 2026
bd8b991
[simplex]: bump version to 0.6.1
Wizdave97 Jun 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/test-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,81 @@ jobs:
echo "Indexer logs:"
cat packages/indexer/indexer_output.log
fi

# Full phantom-order flow: a locally-built simnode emits the order, real simplex IntentFillers
# watch + submit USDC->cNGN bids, and the SDK aggregation reduces them to a snapshot — simulated
# against an anvil fork of Base mainnet (needs eth_simulateV1 + the real gateway/tokens).
phantom-filler-e2e:
name: Phantom filler E2E (simnode + anvil)
runs-on: arc-runner-set
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
submodules: recursive

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang netcat wget curl libssl-dev llvm libclang-dev libudev-dev make libprotobuf-dev protobuf-compiler pkg-config
echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: stable

- name: Add wasm toolchain
run: rustup target add wasm32-unknown-unknown --toolchain nightly

- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- uses: Swatinem/rust-cache@v2

- name: Install Foundry (anvil)
uses: foundry-rs/foundry-toolchain@v1

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11

# Required by the sp1-recursion-gnark-ffi build script, which compiles a Go library.
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.24"

- name: Build hyperbridge simnode
run: cargo build -p hyperbridge

- name: Install + build SDK
working-directory: sdk
run: |
pnpm install
pnpm --filter "@hyperbridge/sdk" build:node

- name: Run phantom-filler E2E (anvil fork of Base + simnode)
env:
SIMNODE_URL: ws://127.0.0.1:9991
ANVIL_URL: http://127.0.0.1:8545
run: |
anvil --fork-url "${{ secrets.BASE_MAINNET }}" --port 8545 --silent &
./target/debug/hyperbridge simnode --chain gargantua-1000 --rpc-port 9991 --port 40341 --tmp --rpc-methods=unsafe --rpc-cors=all --pool-type=single-state &
./scripts/wait_for_tcp_port_opening.sh localhost 8545
./scripts/wait_for_tcp_port_opening.sh localhost 9991
cd sdk && pnpm --filter "@hyperbridge/simplex" test:phantom-filler-e2e

- name: Cleanup
if: always()
run: |
pkill -f "hyperbridge simnode" || true
pkill -f "anvil --fork-url" || true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ parachain/simtests/hyperbridge-main-binary
**/config.mainnet.toml
evm/script/UpdateConsensusClient.s.sol
evm/script/update-consensus-client.sh

# Generated by indexer codegen (generate-chain-yamls.ts) — not committed
sdk/packages/indexer/src/token-slot-overrides.ts
sdk/packages/indexer/src/yield-vault-addresses.ts
43 changes: 42 additions & 1 deletion modules/pallets/intents-coprocessor/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use frame_support::{
BoundedVec,
};
use frame_system::RawOrigin;
use ismp::host::StateMachine;
use ismp::{consensus::StateMachineId, host::StateMachine};
use primitive_types::{H160, H256, U256};
use sp_runtime::traits::ConstU32;

Expand Down Expand Up @@ -186,5 +186,46 @@ mod benchmarks {
Ok(())
}

#[benchmark]
fn set_phantom_order_config() -> Result<(), BenchmarkError> {
let origin =
T::GovernanceOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
let config = types::PhantomOrderConfiguration {
chain: StateMachineId {
state_id: StateMachine::Evm(8453),
consensus_state_id: *b"ETH0",
},
token_pairs: vec![types::PhantomTokenPair {
token_a: H160::repeat_byte(0x01),
token_b: H160::repeat_byte(0x02),
standard_amount: 1_000_000_000_000_000_000u128,
}]
.try_into()
.expect("one pair fits in BoundedVec<_, 10>"),
interval_blocks: 10,
};

#[extrinsic_call]
_(origin as T::RuntimeOrigin, config);

assert!(PhantomOrderConfig::<T>::get().is_some());
Ok(())
}

#[benchmark]
fn set_phantom_bid_window() -> Result<(), BenchmarkError> {
let origin =
T::GovernanceOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
let window: u32 = 100;

#[extrinsic_call]
_(origin as T::RuntimeOrigin, window);

// Verify the window was stored
assert_eq!(PhantomBidWindow::<T>::get(), window);

Ok(())
}

impl_benchmark_test_suite!(Pallet, crate::tests::new_test_ext(), crate::tests::Test);
}
Loading
Loading