Check Transaction Action
This action allows an agent to verify whether a transaction has been confirmed on the blockchain.
LLM Usage
Section titled “LLM Usage”The LLM invokes this tool when asked:
- “Did my transaction 0xabc123 go through?”
- “Check the status of this transfer.”
Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
txHash | string | The 66-character (0x-prefixed) hexadecimal transaction hash. |
Direct Invocation
Section titled “Direct Invocation”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."How it works
Section titled “How it works”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).