CoreWriter action builder

build sendRawAction bytes for orders, transfers, staking. or decode a tx’s actions.

limit order

place an order. price and size are × 1e8

assetuint32
isBuybool
limitPxuint64
szuint64
reduceOnlybool
tifuint8
cloiduint128

tif: 1 = alo, 2 = gtc, 3 = ioc · cloid 0 = none · asset: perp index, spot = 10000 + spot index

send it

action bytes (sendRawAction's argument)
0x0100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000009184e72a00000000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000
calldata for 0x333333…3333 (to call it straight from a wallet)
0x17938e13000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e40100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000009184e72a00000000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
from your contract
bytes memory data = abi.encodePacked( uint8(1), // version uint24(1), // limit order abi.encode(uint32(0), true, uint64(10000000000000), uint64(100000), false, uint8(2), uint128(0)) ); ICoreWriter(0x3333333333333333333333333333333333333333).sendRawAction(data);
with cast
cast send 0x3333333333333333333333333333333333333333 "sendRawAction(bytes)" 0x0100000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000009184e72a00000000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000 --rpc-url https://rpc.hyperliquid.xyz/evm

before you rely on it

  • actions run on HyperCore after the evm block. if one fails on core, the evm tx still succeeds: check the account on core afterwards.
  • the sender (your contract) must already exist on HyperCore. an evm → core transfer in the same block doesn’t count yet.
  • orders and vault transfers land a few seconds later, on purpose.
  • each call burns ~25k gas on top of the normal cost.
  • order asset ids use exchange ids: perp index, spot = 10000 + spot index, hip-3 = 100000 + dex × 10000 + index.

about this tool

Build the bytes for CoreWriter (0x3333…3333) sendRawAction: limit orders, vault transfers, staking, spot send, sendAsset, api wallets, cancels and more, with the calldata, Solidity and a cast command. Paste a HyperEVM tx hash to decode every CoreWriter action it sent.

good to know

how is an action encoded?

one version byte (1), a 3-byte action id, then abi.encode of the action’s fields. the whole thing goes into sendRawAction(bytes) on 0x3333333333333333333333333333333333333333.

my evm tx succeeded but nothing happened on core. why?

actions run on core after the evm block, and a failed action doesn’t revert the evm tx. common causes: the sender has no core account yet, not enough balance on core, or a wrong asset id or price scale.

what units do orders use?

limit price and size are both × 1e8, regardless of the market’s decimals. tif is 1 = alo, 2 = gtc, 3 = ioc.