precompilisium
Reference

Write simulator

CoreWriter's sendRawAction on Elysium: recorded, decoded and priced, never traded.

01
version
000001
action id
abi.encode(asset, isBuy, limitPx, sz, reduceOnly, tif, cloid)
params, 7 words

Encoding

The same as HyperEVM: one version byte 0x01, a 3-byte action id, then abi.encode of the parameters. Action 1 is a limit order (uint32 asset, bool isBuy, uint64 limitPx, uint64 sz, bool reduceOnly, uint8 tif, uint128 cloid) with price and size at 1e8 times the human value and tif 1 ALO, 2 GTC, 3 IOC. Action 10 cancels by order id, 11 by client order id. Other actions are recorded raw.

Events

RawAction(user, data)The same event HyperEVM's CoreWriter emits
ActionRecorded(id, sender, actionId, params)Every action, numbered
LimitOrder, CancelDecoded parameters
ActionPriced(id, crosses, avgPx, filled, slipBps)Priced in the same transaction against the posted top five levels
ActionSimulated(id, outcome, px, filledSz, hcHeight)Posted later by the keeper, the way native callbacks will arrive

Results and atomicity

There is no atomicity between Elysium and HyperCore, on HyperEVM or with the native writer. Contracts should treat an order as sent, not filled, and wait for the result event. After the upgrade the simulator can forward intents to ElysiumCoreWriter under Kinetiq's bind and agent model.