Overview
src/utils/soroban.rs has build_transaction_xdr, build_and_sign_transaction, and build_deploy_transaction_xdr all returning mock strings like "mock_transaction_xdr_...". The contract invocation (invoke_contract) and deployment simulation literally cannot work against a real Soroban node. ledger_key_to_xdr_base64 also has a comment saying 'in production use proper stellar-xdr encoding.'
Resolution
Use the already-imported stellar-xdr crate properly. Build a Transaction with a OperationBody::InvokeHostFunction wrapping a HostFunction::InvokeContract(InvokeContractArgs). Populate source_account from the wallet's public key decoded via stellar_strkey. Set fee, seq_num (fetched from Horizon's /accounts/{id} endpoint), and time_bounds. Serialize to XDR base64 with WriteXdr::to_xdr_base64. For signing: derive a SigningKey from the decoded secret key (already used in wallet.rs), sign the TransactionSignaturePayload (network passphrase hash + transaction hash), and attach the decorated signature to a TransactionEnvelope. Replace the mock build_deploy_transaction_xdr similarly using HostFunction::UploadContractWasm(wasm_bytes). Remove the upload_wasm subprocess call to stellar CLI and do it natively. This is the single most critical gap — without it, starforge contract invoke, starforge deploy --execute, and starforge deploy --simulate all silently produce garbage.
Overview
src/utils/soroban.rshasbuild_transaction_xdr,build_and_sign_transaction, andbuild_deploy_transaction_xdrall returning mock strings like"mock_transaction_xdr_...". The contract invocation (invoke_contract) and deployment simulation literally cannot work against a real Soroban node.ledger_key_to_xdr_base64also has a comment saying 'in production use proper stellar-xdr encoding.'Resolution
Use the already-imported
stellar-xdrcrate properly. Build aTransactionwith aOperationBody::InvokeHostFunctionwrapping aHostFunction::InvokeContract(InvokeContractArgs). Populatesource_accountfrom the wallet's public key decoded viastellar_strkey. Setfee,seq_num(fetched from Horizon's/accounts/{id}endpoint), andtime_bounds. Serialize to XDR base64 withWriteXdr::to_xdr_base64. For signing: derive aSigningKeyfrom the decoded secret key (already used inwallet.rs), sign theTransactionSignaturePayload(network passphrase hash + transaction hash), and attach the decorated signature to aTransactionEnvelope. Replace the mockbuild_deploy_transaction_xdrsimilarly usingHostFunction::UploadContractWasm(wasm_bytes). Remove theupload_wasmsubprocess call tostellarCLI and do it natively. This is the single most critical gap — without it,starforge contract invoke,starforge deploy --execute, andstarforge deploy --simulateall silently produce garbage.