v0.4.8-pre.011

This commit is contained in:
2026-08-07 07:14:49 +02:00
parent 3167297283
commit dcc1d382d9
38 changed files with 1358 additions and 129 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-onchain-transport/src/execution_rpc.rs
// version: 9
// version: 10
//! Typed Solana JSON-RPC adapters used by execution orchestration.
@@ -443,6 +443,7 @@ impl crate::SimulateTransactionResult {
units_consumed: self.units_consumed,
estimated_fee_lamports,
logs: self.logs.clone(),
return_data: self.return_data.clone(),
error,
};
}
@@ -2346,7 +2347,10 @@ mod tests {
last_valid_block_height: 101,
},
),
return_data: std::option::Option::None,
return_data: std::option::Option::Some(serde_json::json!({
"programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
"data": ["AQ==", "base64"]
})),
inner_instructions: std::option::Option::None,
accounts: std::option::Option::None,
};
@@ -2370,6 +2374,14 @@ mod tests {
assert_eq!(execution.estimated_fee_lamports, std::option::Option::Some(5000));
assert_eq!(execution.replacement_last_valid_block_height, std::option::Option::Some(101));
assert!(execution.replacement_blockhash.is_some());
assert_eq!(
execution
.return_data
.as_ref()
.and_then(|value| return value.get("programId"))
.and_then(serde_json::Value::as_str),
std::option::Option::Some("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb")
);
assert!(execution.error.is_some());
}