v0.1.0-pre.014
This commit is contained in:
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/vault/carrot_defi.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_vault_carrot_defi`.
|
||||
//! Reserved executor for `vault_carrot_defi`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_vault_carrot_defi";
|
||||
/// Reserved executor for the `vault_carrot_defi` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExVaultCarrotDefiExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExVaultCarrotDefiExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_vault_carrot_defi";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::VAULT_CARROT_DEFI_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":"vault_carrot_defi"}),
|
||||
) {
|
||||
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_vault_carrot_defi".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/vault/hylo_stability_pool.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_vault_hylo_stability_pool`.
|
||||
//! Reserved executor for `vault_hylo_stability_pool`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_vault_hylo_stability_pool";
|
||||
/// Reserved executor for the `vault_hylo_stability_pool` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExVaultHyloStabilityPoolExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExVaultHyloStabilityPoolExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_vault_hylo_stability_pool";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::VAULT_HYLO_STABILITY_POOL_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":"vault_hylo_stability_pool"}),
|
||||
) {
|
||||
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_vault_hylo_stability_pool".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/vault/kamino.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_vault_kamino`.
|
||||
//! Reserved executor for `vault_kamino`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_vault_kamino";
|
||||
/// Reserved executor for the `vault_kamino` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExVaultKaminoExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExVaultKaminoExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_vault_kamino";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::VAULT_KAMINO_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":"vault_kamino"}),
|
||||
) {
|
||||
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_vault_kamino".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/vault/kamino_v2.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_vault_kamino_v2`.
|
||||
//! Reserved executor for `vault_kamino_v2`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_vault_kamino_v2";
|
||||
/// Reserved executor for the `vault_kamino_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExVaultKaminoV2Executor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExVaultKaminoV2Executor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_vault_kamino_v2";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::VAULT_KAMINO_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,
|
||||
) -> kb_core::Result<crate::ExApiExecutionPlan> {
|
||||
let payload_json = match crate::executor_api_serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor","surface":"vault_kamino_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_executor_vault_kamino_v2".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/vault/kamino_yvaults.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_vault_kamino_yvaults`.
|
||||
//! Reserved executor for `vault_kamino_yvaults`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_vault_kamino_yvaults";
|
||||
/// Reserved executor for the `vault_kamino_yvaults` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExVaultKaminoYvaultsExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExVaultKaminoYvaultsExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_vault_kamino_yvaults";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::VAULT_KAMINO_YVAULTS_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":"vault_kamino_yvaults"}),
|
||||
) {
|
||||
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_vault_kamino_yvaults".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,49 @@
|
||||
// file: kb-lib/src/executor/vault/meteora.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Migration boundary for legacy crate `kb_executor_vault_meteora`.
|
||||
//! Reserved executor for `vault_meteora`.
|
||||
|
||||
/// Legacy crate name retained for migration and compatibility tracking.
|
||||
const LEGACY_CRATE: &str = "kb_executor_vault_meteora";
|
||||
/// Reserved executor for the `vault_meteora` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct ExVaultMeteoraExecutor;
|
||||
|
||||
/// Current porting status.
|
||||
const MIGRATION_STATUS: &str = "source-preserved-pending-port";
|
||||
impl crate::ExApiInstructionExecutor for crate::ExVaultMeteoraExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_vault_meteora";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::VAULT_METEORA_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":"vault_meteora"}),
|
||||
) {
|
||||
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_vault_meteora".to_string(),
|
||||
instruction_count: 0,
|
||||
payload_json,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user