v0.1.0-pre.014
This commit is contained in:
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/clmm/byreal.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_clmm_byreal`.
|
||||
//! Reserved executor for `clmm_byreal`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_clmm_byreal";
|
||||
/// Reserved executor for the `clmm_byreal` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExClmmByrealExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExClmmByrealExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_clmm_byreal";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::CLMM_BYREAL_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"clmm_byreal"}),
|
||||
) {
|
||||
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_executor_clmm_byreal".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/clmm/fusion.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_clmm_fusion`.
|
||||
//! Reserved executor for `clmm_fusion`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_clmm_fusion";
|
||||
/// Reserved executor for the `clmm_fusion` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExClmmFusionExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExClmmFusionExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_clmm_fusion";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::CLMM_FUSION_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"clmm_fusion"}),
|
||||
) {
|
||||
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_executor_clmm_fusion".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/clmm/orca_whirlpool.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_clmm_orca_whirlpool`.
|
||||
//! Reserved executor for `clmm_orca_whirlpool`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_clmm_orca_whirlpool";
|
||||
/// Reserved executor for the `clmm_orca_whirlpool` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExClmmOrcaWhirlpoolExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExClmmOrcaWhirlpoolExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_clmm_orca_whirlpool";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::CLMM_ORCA_WHIRLPOOL_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"clmm_orca_whirlpool"}),
|
||||
) {
|
||||
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_executor_clmm_orca_whirlpool".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/clmm/pancake_swap.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_clmm_pancake_swap`.
|
||||
//! Reserved executor for `clmm_pancake_swap`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_clmm_pancake_swap";
|
||||
/// Reserved executor for the `clmm_pancake_swap` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExClmmPancakeSwapExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExClmmPancakeSwapExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_clmm_pancake_swap";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::CLMM_PANCAKE_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"clmm_pancake_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_executor_clmm_pancake_swap".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/clmm/raydium.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_clmm_raydium`.
|
||||
//! Reserved executor for `clmm_raydium`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_clmm_raydium";
|
||||
/// Reserved executor for the `clmm_raydium` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExClmmRaydiumExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExClmmRaydiumExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_clmm_raydium";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::CLMM_RAYDIUM_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"clmm_raydium"}),
|
||||
) {
|
||||
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_executor_clmm_raydium".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/clmm/stabble.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_clmm_stabble`.
|
||||
//! Reserved executor for `clmm_stabble`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_clmm_stabble";
|
||||
/// Reserved executor for the `clmm_stabble` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExClmmStabbleExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExClmmStabbleExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_clmm_stabble";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::CLMM_STABBLE_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"clmm_stabble"}),
|
||||
) {
|
||||
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_executor_clmm_stabble".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user