Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(web3): add wallet stub and tools

Steven Enamakelf064319893dc
diff --git a/crates/openhuman-core/src/web3/wallet/stub.rs b/crates/openhuman-core/src/web3/wallet/stub.rs
index 351828a807..5cc287f95d 100644
--- a/crates/openhuman-core/src/web3/wallet/stub.rs
+++ b/crates/openhuman-core/src/web3/wallet/stub.rs
@@ -133,6 +133,7 @@ pub struct ExecutionResult {
/// Disabled: no transfer can be prepared with the wallet compiled out.
pub async fn prepare_transfer(
_params: PrepareTransferParams,
+ _owner: Option<()>,
) -> Result<Outcome<PreparedTransaction>, String> {
log::debug!(
"[wallet-stub] prepare_transfer requested (web3 disabled) — returning disabled error"
@@ -143,6 +144,7 @@ pub async fn prepare_transfer(
/// Disabled: no prepared transfer can be executed with the wallet compiled out.
pub async fn execute_prepared(
_params: ExecutePreparedParams,
+ _owner: Option<()>,
) -> Result<Outcome<ExecutionResult>, String> {
log::debug!(
"[wallet-stub] execute_prepared requested (web3 disabled) — returning disabled error"
diff --git a/crates/openhuman-core/src/web3/wallet/tools.rs b/crates/openhuman-core/src/web3/wallet/tools.rs
index 163af396f4..be4bf5369e 100644
--- a/crates/openhuman-core/src/web3/wallet/tools.rs
+++ b/crates/openhuman-core/src/web3/wallet/tools.rs
@@ -87,7 +87,13 @@ impl WalletModuleTool {
return Ok(ToolResult::error(format!("invalid arguments: {error}")))
}
};
- outcome_value(crate::web3::wallet::prepare_transfer(params).await)
+ outcome_value(
+ crate::web3::wallet::prepare_transfer(
+ params,
+ crate::modules::web3_service::owner_of(chat),
+ )
+ .await,
+ )
}
"wallet_tx_status" | "wallet_tx_receipt" | "wallet_lookup_tx" => {
let query: TxQuery = match serde_json::from_value(args) {