pub struct DcaAdapter;Expand description
Jupiter DCA protocol adapter (zero-sized, stored as a static).
Implementations§
Source§impl DcaAdapter
impl DcaAdapter
Sourcepub fn extract_order_pda(
accounts: &[AccountInfo],
instruction_name: &str,
) -> Result<String, Error>
pub fn extract_order_pda( accounts: &[AccountInfo], instruction_name: &str, ) -> Result<String, Error>
Extracts the order PDA from instruction accounts.
Prefers the named "dca" account; falls back to positional index per instruction variant.
Sourcepub fn extract_create_mints(
accounts: &[AccountInfo],
instruction_name: &str,
) -> Result<DcaCreateMints, Error>
pub fn extract_create_mints( accounts: &[AccountInfo], instruction_name: &str, ) -> Result<DcaCreateMints, Error>
Extracts input/output mint addresses from a DCA create instruction’s accounts.
Prefers named accounts; falls back to positional indexes that differ between OpenDca and OpenDcaV2.
Sourcepub fn parse_create_args(args: &Value) -> Result<DcaCreateArgs, Error>
pub fn parse_create_args(args: &Value) -> Result<DcaCreateArgs, Error>
Parses OpenDca/OpenDcaV2 instruction args into checked DcaCreateArgs.
Trait Implementations§
Source§impl Debug for DcaAdapter
impl Debug for DcaAdapter
Source§impl ProtocolAdapter for DcaAdapter
impl ProtocolAdapter for DcaAdapter
Source§fn classify_instruction(&self, ix: &RawInstruction) -> Option<EventType>
fn classify_instruction(&self, ix: &RawInstruction) -> Option<EventType>
Classifies a raw instruction into an
EventType, or None if unrecognised/irrelevant.Source§fn classify_and_resolve_event(
&self,
ev: &RawEvent,
_ctx: &ResolveContext,
) -> Option<Result<(EventType, CorrelationOutcome, EventPayload), Error>>
fn classify_and_resolve_event( &self, ev: &RawEvent, _ctx: &ResolveContext, ) -> Option<Result<(EventType, CorrelationOutcome, EventPayload), Error>>
Classifies and resolves a raw event into an
(EventType, CorrelationOutcome, EventPayload). Read moreAuto Trait Implementations§
impl Freeze for DcaAdapter
impl RefUnwindSafe for DcaAdapter
impl Send for DcaAdapter
impl Sync for DcaAdapter
impl Unpin for DcaAdapter
impl UnsafeUnpin for DcaAdapter
impl UnwindSafe for DcaAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more