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/agentkit";
const agentkit = await Agentkit.configureWithWallet({
apiKey: "YOUR_API_KEY",
privateKey: process.env.PRIVATE_KEY as `0x${string}`,
chainID: 43114,
});
const action = new CheckTransactionAction();
const status = await agentkit.run(action, {
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).