Skip to main content

Module direct_fill

Module direct_fill 

Source
Expand description

Caller-supplied direct-fill templates: one instruction the server rewrites per probe.

Split from the crate root because the wire shape, its parse errors and its round-trip tests are one subject, and lib.rs is long enough that adding a ninth unrelated block to it makes every one of them harder to find.

Structs§

DirectFillTemplate
One instruction the caller serialized, with the slots the server rewrites per probe and the offset it writes the amount at. Matches hops of mode originals trading inputMint → outputMint and is priced against each such hop’s realized fill.
TakerSlots
The account slots a probe rewrites, as indices into instruction.accounts.
TemplateAccount
TemplateInstruction
The template’s single instruction, sent verbatim except the role slots’ addresses and the amount bytes.

Enums§

ParseDirectFillTemplateError
Why a supplied template could not be used.

Constants§

AMOUNT_WIDTH
The width of the little-endian amount a template’s amountOffset addresses.