MCPcopy Create free account
hub / github.com/clockwork-xyz/examples / handler

Function handler

orca_dca/programs/orca_dca/src/instructions/dca_update.rs:28–40  ·  view source on GitHub ↗
(ctx: Context<DcaUpdate<'info>>, amount_in: Option<u64>, minimum_amount_out: Option<u64>)

Source from the content-addressed store, hash-verified

26}
27
28pub fn handler<'info>(ctx: Context<DcaUpdate<'info>>, amount_in: Option<u64>, minimum_amount_out: Option<u64>) -> Result<()> {
29 let dca = &mut ctx.accounts.dca;
30
31 if let Some(ai) = amount_in {
32 dca.amount_in = ai;
33 }
34
35 if let Some(mao) = minimum_amount_out {
36 dca.minimum_amount_out = mao;
37 }
38
39 Ok(())
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected