Skip to content
LogoLogo

tevm get-transaction

tevm get-transaction runs this operation: Get a transaction by hash. Reach for it when you need the operation from a terminal, CI job, or shell script.

Working example

The commands below were run with @tevm/cli@1.0.0-rc.151. They create their own local prerequisites or use the named public endpoint, so no hidden process is required.

npm install --global @tevm/cli@1.0.0-rc.151
tevm get-transaction --hash 0xf03306d59d6086655178a082e59a78eb097399af84fde1e5ae9f7ca8dc0be51a --rpc https://ethereum-rpc.publicnode.com --run --json

Output captured from the final command:

{
  "ok": true,
  "command": "get-transaction",
  "result": {
    "blockHash": "0xdf717cf689cfbddf84b8c6a9311e35376b298e5e207696f7429d3b11b8a54039",
    "blockNumber": "25629713",
    "blockTimestamp": "1785222395",
    "from": "0xbe07d37e54bb57fd2053036f44e6046f3bfb1954",
    "gas": "314950",
    "gasPrice": "5050533277",
    "maxFeePerGas": "6050533277",
    "maxPriorityFeePerGas": "5000000000",
    "hash": "0xf03306d59d6086655178a082e59a78eb097399af84fde1e5ae9f7ca8dc0be51a",
    "input": "0x0b1149ec000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000000007709e8783700000000000000000000000000000000000000000000000000005af3107a400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006a685501000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000eb7e4c719612e4c68909a938065a8f2dd037fc1900000000000000000000000000000000000000000000000002c68af0bb1400000000000000000000000000000000000000000000000000000000007709e878370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d5528764584d0a2afe49cfdaa1ef6252d35d2840000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000d721706581d97ecd202bbab5c71b5a85f0f78e69000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000be07d37e54bb57fd2053036f44e6046f3bfb1954",
    "nonce": 2490,
    "to": "0x734ab9de48f6bab1f2297a34d257cd757deba6aa",
    "transactionIndex": 0,
    "value": "200100000000000000",
    "type": "eip1559",
    "accessList": [],
    "chainId": 1,
    "v": "0",
    "r": "0x65cdc66b28b0aba75680d9a1a496194fa8e457d2b2506c4635b80cd87c1b426f",
    "s": "0x2802b5cb0b68d3501a22391b77ebc743dc78d41be6033fcc8d837314b1f0615a",
    "yParity": 0,
    "typeHex": "0x2"
  }
}

Arguments and flags

The command schema in packages/tevm-cli/src/commands/getTransaction.tsx exposes:

KindSyntaxDescription
Flag--hash [hash]Transaction hash to get information for (env: TEVM_HASH)
Flag-r, --runRun directly without interactive parameter editing (env: TEVM_RUN) (default: false)
Flag--rpc [rpc]RPC endpoint (env: TEVM_RPC)
Flag--jsonEmit the stable machine-readable JSON envelope (env: TEVM_JSON) (default: false)
Flag-h, --helpShow help

--json and --session <name> are global options accepted before routing. See the CLI overview for their environment-variable forms and execution model.

Neighbours

CLI overview · tevm get-storage-at · tevm load-state