MCPcopy Create free account
hub / github.com/Py-Ec/solana-arbitrage-bot / init_program

Function init_program

program/programs/tmp/src/lib.rs:23–28  ·  view source on GitHub ↗
(ctx: Context<InitSwapState>)

Source from the content-addressed store, hash-verified

21 use super::*;
22
23 pub fn init_program(ctx: Context<InitSwapState>) -> Result<()> {
24 let swap_state = &mut ctx.accounts.swap_state;
25 swap_state.swap_input = 0;
26 swap_state.is_valid = false;
27 Ok(())
28 }
29
30 pub fn start_swap(ctx: Context<TokenAndSwapState>, swap_input: u64) -> Result<()> {
31 let swap_state = &mut ctx.accounts.swap_state;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected