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/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."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).