0.1.0
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# file: kb_executor_launchpad_orca_wavebreak/Cargo.toml
|
||||
# version: 2
|
||||
|
||||
[package]
|
||||
name = "kb_executor_launchpad_orca_wavebreak"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
kb_core = { path = "../kb_core" }
|
||||
kb_execution_api = { path = "../kb_execution_api" }
|
||||
kb_model = { path = "../kb_model" }
|
||||
kb_program_ids = { path = "../kb_program_ids" }
|
||||
serde_json.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
@@ -0,0 +1,15 @@
|
||||
<!-- file: kb_executor_launchpad_orca_wavebreak/README.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# kb_executor_launchpad_orca_wavebreak
|
||||
|
||||
Ce crate réserve l'exécuteur de la surface `launchpad_orca_wavebreak`.
|
||||
|
||||
## Rôle dans l'écosystème
|
||||
|
||||
Il construira les instructions ou plans d'exécution nécessaires pour appeler directement cette surface, sans dépendre du décodeur correspondant.
|
||||
|
||||
## Statut
|
||||
|
||||
Le crate est un squelette. Il ne doit pas envoyer de transaction tant que les builders, les simulations, les garde-fous et les tests dédiés ne sont pas validés.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// file: kb_executor_launchpad_orca_wavebreak/src/constants.rs
|
||||
// version: 1
|
||||
|
||||
/// Canonical tracing target for this crate.
|
||||
pub(crate) const TRACING_TARGET: &str = "kb_executor_launchpad_orca_wavebreak";
|
||||
@@ -0,0 +1,49 @@
|
||||
// file: kb_executor_launchpad_orca_wavebreak/src/executor.rs
|
||||
// version: 5
|
||||
|
||||
//! Executor scaffold for the `kb_executor_launchpad_orca_wavebreak` crate.
|
||||
|
||||
/// Initial executor implementation placeholder.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct LaunchpadOrcaWavebreakExecutor;
|
||||
|
||||
impl kb_execution_api::InstructionExecutor for crate::LaunchpadOrcaWavebreakExecutor {
|
||||
fn executor_name(&self) -> &'static str {
|
||||
return "kb_executor_launchpad_orca_wavebreak";
|
||||
}
|
||||
|
||||
fn executor_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[kb_program_ids::LAUNCHPAD_ORCA_WAVEBREAK_PROGRAM_ID];
|
||||
}
|
||||
|
||||
fn supports_request(
|
||||
&self,
|
||||
request: &kb_execution_api::ExecutionRequest,
|
||||
) -> kb_execution_api::ExecutionSupport {
|
||||
if kb_execution_api::InstructionExecutor::handles_program_id(self, &request.program_id) {
|
||||
return kb_execution_api::ExecutionSupport::Maybe;
|
||||
}
|
||||
return kb_execution_api::ExecutionSupport::No;
|
||||
}
|
||||
|
||||
fn build_plan(
|
||||
&self,
|
||||
_request: &kb_execution_api::ExecutionRequest,
|
||||
) -> kb_core::Result<kb_execution_api::ExecutionPlan> {
|
||||
let _target = crate::TRACING_TARGET;
|
||||
return std::result::Result::Ok(kb_execution_api::ExecutionPlan {
|
||||
executor_name: std::string::String::from("kb_executor_launchpad_orca_wavebreak"),
|
||||
instruction_count: 0,
|
||||
payload_json: match kb_execution_api::serialize_payload_json(
|
||||
&serde_json::json!({"status":"reserved_executor"}),
|
||||
) {
|
||||
std::result::Result::Ok(serialized) => serialized,
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// file: kb_executor_launchpad_orca_wavebreak/src/lib.rs
|
||||
// version: 2
|
||||
|
||||
//! Executor crate for `launchpad_orca_wavebreak`.
|
||||
#![warn(missing_docs)]
|
||||
#![deny(unreachable_pub)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
mod constants;
|
||||
|
||||
mod executor;
|
||||
|
||||
/// Canonical tracing target for this crate.
|
||||
pub(crate) use crate::constants::TRACING_TARGET;
|
||||
|
||||
/// Exposes the executor type implemented by this crate.
|
||||
pub use crate::executor::LaunchpadOrcaWavebreakExecutor;
|
||||
Reference in New Issue
Block a user