@somnia-chain/markets-sdk / index / UnsignedCall
Interface: UnsignedCall
Defined in: packages/sdk/src/writer.ts:155
One unsigned call, ready for any signer: spread into viem's sendTransaction,
wrap as an ERC-4337 UserOp call field, or hand to a relayer.
Deliberately minimal, following BridgeTransaction in the /chains bridge
module: no nonce, no fees, no gas — those are the signer's job, and pinning
them here would stale the moment the call is cached. description is a human
label for a confirmation UI.
chainId names the chain the call must be executed on. An exchange that
spans several chains hands back calls for markets on any of them, and an
Executor bound to another chain refuses a call whose chainId is
not its own. Note value is a bigint, so JSON.stringify throws on it —
convert it yourself if the call crosses a serialization boundary.
Properties
chainId
chainId:
number
Defined in: packages/sdk/src/writer.ts:157
Numeric chain id the call must be sent on.
to
to:
`0x${string}`
Defined in: packages/sdk/src/writer.ts:159
Contract to call.
data
data:
`0x${string}`
Defined in: packages/sdk/src/writer.ts:161
ABI-encoded calldata.
value
value:
bigint
Defined in: packages/sdk/src/writer.ts:163
Native value to attach, in wei. 0n unless the call pays native.
description
description:
string
Defined in: packages/sdk/src/writer.ts:165
What this call does, for a UI to label a confirmation with.
functionName?
optionalfunctionName?:string
Defined in: packages/sdk/src/writer.ts:172
The contract function the calldata encodes ("approve", "placeOrder", …),
for error messages: an executor names it in the revert it raises for THIS
call. Set on every call the SDK builds; optional so a call assembled by
hand still executes.