0.5.1-pre.002
This commit is contained in:
49
ks-lib/src/executor/amm/aldrin_v1.rs
Normal file
49
ks-lib/src/executor/amm/aldrin_v1.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/aldrin_v1.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_aldrin_v1`.
|
||||
|
||||
/// Reserved executor for the `amm_aldrin_v1` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmAldrinV1Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmAldrinV1Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.aldrin_v1";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ALDRIN_V1_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_aldrin_v1"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.aldrin_v1".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/aldrin_v2.rs
Normal file
49
ks-lib/src/executor/amm/aldrin_v2.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/aldrin_v2.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_aldrin_v2`.
|
||||
|
||||
/// Reserved executor for the `amm_aldrin_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmAldrinV2Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmAldrinV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.aldrin_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ALDRIN_V2_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_aldrin_v2"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.aldrin_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/alphaq.rs
Normal file
49
ks-lib/src/executor/amm/alphaq.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/alphaq.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_alphaq`.
|
||||
|
||||
/// Reserved executor for the `amm_alphaq` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmAlphaqExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmAlphaqExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.alphaq";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ALPHAQ_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_alphaq"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.alphaq".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/believe.rs
Normal file
49
ks-lib/src/executor/amm/believe.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/believe.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_believe`.
|
||||
|
||||
/// Reserved executor for the `amm_believe` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmBelieveExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmBelieveExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.believe";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_BELIEVE_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_believe"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.believe".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/bonk_swap.rs
Normal file
49
ks-lib/src/executor/amm/bonk_swap.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/bonk_swap.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_bonk_swap`.
|
||||
|
||||
/// Reserved executor for the `amm_bonk_swap` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmBonkSwapExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmBonkSwapExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.bonk_swap";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_BONK_SWAP_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_bonk_swap"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.bonk_swap".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/fluxbeam.rs
Normal file
49
ks-lib/src/executor/amm/fluxbeam.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/fluxbeam.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_fluxbeam`.
|
||||
|
||||
/// Reserved executor for the `amm_fluxbeam` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmFluxbeamExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmFluxbeamExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.fluxbeam";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_FLUXBEAM_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_fluxbeam"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.fluxbeam".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/goon_fi.rs
Normal file
49
ks-lib/src/executor/amm/goon_fi.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/goon_fi.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_goon_fi`.
|
||||
|
||||
/// Reserved executor for the `amm_goon_fi` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmGoonFiExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmGoonFiExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.goon_fi";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_GOON_FI_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_goon_fi"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.goon_fi".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/goosefx_gamma.rs
Normal file
49
ks-lib/src/executor/amm/goosefx_gamma.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/goosefx_gamma.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_goosefx_gamma`.
|
||||
|
||||
/// Reserved executor for the `amm_goosefx_gamma` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmGoosefxGammaExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmGoosefxGammaExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.goosefx_gamma";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_GOOSEFX_GAMMA_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_goosefx_gamma"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.goosefx_gamma".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/goosefx_v2.rs
Normal file
49
ks-lib/src/executor/amm/goosefx_v2.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/goosefx_v2.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_goosefx_v2`.
|
||||
|
||||
/// Reserved executor for the `amm_goosefx_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmGoosefxV2Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmGoosefxV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.goosefx_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_GOOSEFX_V2_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_goosefx_v2"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.goosefx_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/guac_swap.rs
Normal file
49
ks-lib/src/executor/amm/guac_swap.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/guac_swap.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_guac_swap`.
|
||||
|
||||
/// Reserved executor for the `amm_guac_swap` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmGuacSwapExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmGuacSwapExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.guac_swap";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_GUAC_SWAP_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_guac_swap"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.guac_swap".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/lifinity_swap_v2.rs
Normal file
49
ks-lib/src/executor/amm/lifinity_swap_v2.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/lifinity_swap_v2.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_lifinity_swap_v2`.
|
||||
|
||||
/// Reserved executor for the `amm_lifinity_swap_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmLifinitySwapV2Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmLifinitySwapV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.lifinity_swap_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_LIFINITY_SWAP_V2_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_lifinity_swap_v2"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.lifinity_swap_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/metadao_v0_5.rs
Normal file
49
ks-lib/src/executor/amm/metadao_v0_5.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/metadao_v0_5.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_metadao_v0_5`.
|
||||
|
||||
/// Reserved executor for the `amm_metadao_v0_5` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmMetadaoV05Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmMetadaoV05Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.metadao_v0_5";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_METADAO_V0_5_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_metadao_v0_5"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.metadao_v0_5".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/meteora_damm_v1.rs
Normal file
49
ks-lib/src/executor/amm/meteora_damm_v1.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/meteora_damm_v1.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_meteora_damm_v1`.
|
||||
|
||||
/// Reserved executor for the `amm_meteora_damm_v1` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmMeteoraDammV1Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmMeteoraDammV1Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.meteora_damm_v1";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_METEORA_DAMM_V1_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_meteora_damm_v1"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.meteora_damm_v1".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/meteora_damm_v2.rs
Normal file
49
ks-lib/src/executor/amm/meteora_damm_v2.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/meteora_damm_v2.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_meteora_damm_v2`.
|
||||
|
||||
/// Reserved executor for the `amm_meteora_damm_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmMeteoraDammV2Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmMeteoraDammV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.meteora_damm_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_METEORA_DAMM_V2_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_meteora_damm_v2"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.meteora_damm_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/obric_v2.rs
Normal file
49
ks-lib/src/executor/amm/obric_v2.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/obric_v2.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_obric_v2`.
|
||||
|
||||
/// Reserved executor for the `amm_obric_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmObricV2Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmObricV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.obric_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_OBRIC_V2_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_obric_v2"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.obric_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/one_dex.rs
Normal file
49
ks-lib/src/executor/amm/one_dex.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/one_dex.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_one_dex`.
|
||||
|
||||
/// Reserved executor for the `amm_one_dex` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmOneDexExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmOneDexExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.one_dex";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ONE_DEX_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_one_dex"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.one_dex".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/pump_swap.rs
Normal file
49
ks-lib/src/executor/amm/pump_swap.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/pump_swap.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_pump_swap`.
|
||||
|
||||
/// Reserved executor for the `amm_pump_swap` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmPumpSwapExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmPumpSwapExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.pump_swap";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_PUMP_SWAP_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_pump_swap"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.pump_swap".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/raydium_lp_v4.rs
Normal file
49
ks-lib/src/executor/amm/raydium_lp_v4.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/raydium_lp_v4.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_raydium_lp_v4`.
|
||||
|
||||
/// Reserved executor for the `amm_raydium_lp_v4` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmRaydiumLpV4Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmRaydiumLpV4Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.raydium_lp_v4";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_RAYDIUM_LP_V4_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_raydium_lp_v4"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.raydium_lp_v4".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/solfi.rs
Normal file
49
ks-lib/src/executor/amm/solfi.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/solfi.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_solfi`.
|
||||
|
||||
/// Reserved executor for the `amm_solfi` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmSolfiExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmSolfiExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.solfi";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_SOLFI_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_solfi"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.solfi".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/solfi_v2.rs
Normal file
49
ks-lib/src/executor/amm/solfi_v2.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/solfi_v2.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_solfi_v2`.
|
||||
|
||||
/// Reserved executor for the `amm_solfi_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmSolfiV2Executor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmSolfiV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.solfi_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_SOLFI_V2_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_solfi_v2"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.solfi_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/vertigo.rs
Normal file
49
ks-lib/src/executor/amm/vertigo.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/vertigo.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_vertigo`.
|
||||
|
||||
/// Reserved executor for the `amm_vertigo` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmVertigoExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmVertigoExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.vertigo";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_VERTIGO_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_vertigo"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.vertigo".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/woofi.rs
Normal file
49
ks-lib/src/executor/amm/woofi.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/woofi.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_woofi`.
|
||||
|
||||
/// Reserved executor for the `amm_woofi` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmWoofiExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmWoofiExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.woofi";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_WOOFI_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_woofi"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.woofi".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/zero_fi.rs
Normal file
49
ks-lib/src/executor/amm/zero_fi.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/zero_fi.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_zero_fi`.
|
||||
|
||||
/// Reserved executor for the `amm_zero_fi` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmZeroFiExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmZeroFiExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.zero_fi";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ZERO_FI_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_zero_fi"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.zero_fi".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
49
ks-lib/src/executor/amm/zora.rs
Normal file
49
ks-lib/src/executor/amm/zora.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
// file: ks-lib/src/executor/amm/zora.rs
|
||||
// version: 4
|
||||
|
||||
//! Reserved executor for `amm_zora`.
|
||||
|
||||
/// Reserved executor for the `amm_zora` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExAmmZoraExecutor;
|
||||
|
||||
impl crate::ExApiInstructionExecutor for crate::ExAmmZoraExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb-lib.executor.amm.zora";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ZORA_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &crate::ExApiExecutionRequest,
|
||||
) -> crate::ExApiExecutionSupport {
|
||||
if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return crate::ExApiExecutionSupport::Maybe;
|
||||
}
|
||||
return crate::ExApiExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &crate::ExApiExecutionRequest,
|
||||
) -> ks_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"amm_zora"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
};
|
||||
return std::result::Result::Ok(crate::ExApiExecutionPlan {
|
||||
executor_name: "kb-lib.executor.amm.zora".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user