Skip to content

Check Transaction Action

This action allows an agent to verify whether a transaction has been confirmed on the blockchain.

The LLM invokes this tool when asked:

  • “Did my transaction 0xabc123 go through?”
  • “Check the status of this transfer.”
ArgumentTypeDescription
txHashstringThe 66-character (0x-prefixed) hexadecimal transaction hash.
import { AgentKit, CheckTransactionAction } from "@0xgasless/agent-sdk";
const agentKit = new AgentKit({ apiKey: "YOUR_API_KEY", chainId: 11155111 });
const action = new CheckTransactionAction();
const status = await action.invoke(agentKit, {
txHash: "0x..."
});
console.log(status);
// "Transaction 0x... has been confirmed in block 583429."

Unlike most actions, CheckTransactionAction does not send a transaction or query the OxGasClient wallet state.

It simply takes the chainId of the running AgentKit session and makes an RPC call (eth_getTransactionReceipt) to a public node. It waits until the receipt exists or times out, and formats the result back to the LLM (Success/Reverted/Not Found).