corewire

Test Bed live

CoreSim

CoreSim 0xCDE81dd736ed24d13AcB47d9Aac1CFa6be01488f takes the same placeOrder call as CoreRouter, with no binding and no funds. The house simulator answers through the same onCoreResult callback with simulated = true. The simulator address is fixed at deploy: 0x25d023635c1c993b62e0F70398B8bB76E73201dA.

How fills are simulated

When an intent lands, the simulator fetches Hyperliquid's l2Book for the asset and walks it: a buy takes asks up to the limit, a sell takes bids down to it. Ioc fills what it can and rejects when nothing is available at the limit; Gtc rests the remainder; Alo is rejected if it would cross. Fees and queue position are not modelled.

Fork kit and fork tests

/sdk/CoreWireForkKit.sol holds MockEL1Read and MockElysiumCoreWriter, written to Kinetiq's documented model (bind, registrar, agent, intents, callbacks) with our function names. An adapter will map them to Kinetiq's names when the ABI is published.

The two-chain fork test runs CoreProbe on a HyperEVM fork against Kinetiq's StakingAccountant, opens a real retryable ticket on Elysium's inbox, and replays the payload into an Elysium fork from the aliased sender:

forge test --match-contract TwoChainFork -vv
forge test --match-contract KntqBurnFork -vv   # the burn against the live v4 pool
forge test                                     # unit, fuzz and invariant tests