Skip to content

Commit

Permalink
rename exchanger
Browse files Browse the repository at this point in the history
  • Loading branch information
stfnberat committed Mar 28, 2022
1 parent 5378b38 commit 9891493
Show file tree
Hide file tree
Showing 23 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/program-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
mod constraints;
pub mod error;
mod exchanger;
pub mod instruction;
mod parser;
pub mod processor;
mod spl_token;
pub mod state;
mod swappers;

#[cfg(not(feature = "no-entrypoint"))]
mod entrypoint;
Expand Down
2 changes: 1 addition & 1 deletion src/program-rust/src/parser/aldrin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::base::{validate_authority_pubkey, TokenAccount, TokenMint};
use crate::{
declare_validated_account_wrapper,
error::{ProtocolError, ProtocolResult},
swappers::aldrin::instruction::Side,
exchanger::aldrin::instruction::Side,
};
use arrayref::array_ref;
use solana_program::{account_info::AccountInfo, msg, pubkey::Pubkey};
Expand Down
2 changes: 1 addition & 1 deletion src/program-rust/src/parser/serum_dex.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::swappers::serum_dex::matching::Side as DexSide;
use crate::{
declare_validated_account_wrapper,
error::{ProtocolError, ProtocolResult},
exchanger::serum_dex::matching::Side as DexSide,
parser::base::TokenAccount,
};
use arrayref::{array_ref, array_refs};
Expand Down
31 changes: 14 additions & 17 deletions src/program-rust/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,43 @@
use std::cmp;

use crate::constraints::OWNER_KEY;
use crate::instruction::SwapOutSlimInstruction;
use crate::parser::aldrin::AldrinPoolArgs;
use crate::parser::crema::CremaSwapV1Args;
use crate::parser::cropper::CropperArgs;
use crate::spl_token;
use crate::state::Status;
use crate::swappers::{aldrin, crema, cropper, stable_swap};
use crate::{
constraints::OWNER_KEY,
error::ProtocolError,
exchanger::{
aldrin, crema, cropper, raydium,
serum_dex::{self, matching::Side as DexSide},
spl_token_swap, stable_swap,
},
instruction::{
ExchangerType, ProtocolInstruction, SwapInInstruction, SwapInstruction, SwapOutInstruction,
SwapOutSlimInstruction,
},
parser::{
aldrin::AldrinPoolArgs,
base::{SplTokenProgram, SwapInfoArgs, TokenAccount, UserArgs},
crema::CremaSwapV1Args,
cropper::CropperArgs,
raydium::{RaydiumSwapArgs, RaydiumSwapArgs2},
serum_dex::SerumDexArgs,
spl_token_swap::SplTokenSwapArgs,
stable_swap::StableSwapArgs,
},
state::SwapInfo,
swappers::{
raydium,
serum_dex::{self, matching::Side as DexSide},
spl_token_swap,
},
spl_token,
state::{Status, SwapInfo},
};
use arrayref::array_refs;
use solana_program::program_memory::{sol_memcmp, sol_memset};
use solana_program::pubkey::PUBKEY_BYTES;
use solana_program::{
account_info::AccountInfo,
entrypoint::ProgramResult,
log::sol_log_compute_units,
msg,
program::{invoke, invoke_signed},
program_error::ProgramError,
program_memory::{sol_memcmp, sol_memset},
program_option::COption,
program_pack::Pack,
pubkey::Pubkey,
pubkey::{Pubkey, PUBKEY_BYTES},
rent::Rent,
sysvar::Sysvar,
};
Expand Down

0 comments on commit 9891493

Please sign in to comment.