pub struct CreateSelfOrder {
pub program_id: Pubkey,
pub authority: Pubkey,
pub created_by: Pubkey,
pub state_pda: Pubkey,
pub order_pda: Pubkey,
pub intent_bytes: [u8; 213],
}Expand description
Builder for a CreateSelfOrder instruction.
Allocates an order PDA for an order owned by the settlement state PDA, so the fees that accumulate in the buffer accounts can be sold through a regular settlement.
Similar to CreateOrder,
but the instruction is gated by the
SelfOrderAuthority, and doesn’t need
the owner’s signature. The program forces intent.owner to be the state
PDA. The order this function created is a normal order and settles through
the standard BeginSettle/FinalizeSettle flow.
The only enforced parameters are created_on_chain (should be true) and
the owner (should be the state PDA).
created_by funds the new order PDA’s rent and will get the rent back when
executing ReclaimOrder.
Wire format: [discriminator=10, ..intent bytes],
1 + EncodedOrderIntent::SIZE bytes. Required accounts:
[authority (S), created_by (W,S), state_pda (R), order_pda (W), system_program (R)].
Fields§
§program_id: Pubkey§created_by: Pubkey§state_pda: Pubkey§order_pda: Pubkey§intent_bytes: [u8; 213]