The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
const result = await signingClient.signAndBroadcast(
address,
[
{
typeUrl: "/cosmos.gov.v1beta1.MsgVote",
value: {
proposalId:895,
voter: i,
option:1,
//amount: { denom: "uatom", amount: 0, },
},
},
],
"auto"
)
// Output the result of the Tx
console.log("Transfer result:", result)
/ how to fix it
With signing client, chain id: cosmoshub-4 , height: 19756249
Error: Broadcasting transaction failed with code 11 (codespace: sdk). Log: out of gas in location: WriteFlat; gasWanted: 43121, gasUsed: 43494: out of gas
at SigningStargateClient.broadcastTx (d:\deskbokk\cosmjs-sandbox-master\node_modules\@cosmjs\stargate\src\stargateclient.ts:386:9)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runAll (d:\deskbokk\cosmjs-sandbox-master\投票.ts:64:24)
/ how to fix it