Goshen
  • Introduction
  • Get started
  • For Developers
    • Building on Goshen
    • Gas fee
    • L1/L2 differences
    • JSON RPC API
      • l2_getBatch
      • l2_getBatchIndex
      • l2_getBatchState
      • l2_getEnqueuedTxs
      • l2_getL2MMRProof
      • l2_getL2RelayMsgParams
      • l2_getPendingTxBatches
      • l2_globalInfo
      • l2_getState
      • l2_inputBatchNumber
      • l2_stateBatchNumber
      • debug_getReadStorageProofAtBlock
    • System contracts
    • Runing Goshen Node
  • Advanced Topics
    • L1/L2 Interoperability
      • Cross layer communication
      • Token Bridge
    • White Paper
  • other topics
    • Advantages and comparison
    • Roadmap
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Example
  1. For Developers
  2. JSON RPC API

l2_getEnqueuedTxs

Return the enqueued transactions.

Parameters

  • queueStart: uint64|QUANTITY - the start index of required enqueued transaction.

  • queueNum: uint64|QUANTITY - the number of required enqueued transaction.

Returns

Array - Array of object with the following fields:

  • queueIndex: QUANTITY - the index of transaction queue

  • from: Address - transaction sender

  • to: Address - the to address of transaction

  • timestamp: QUANTITY - the timestamp of this enqueued tx

  • rlpTx: byte array - the RLP encoded transaction

Example

Request

{
    "jsonrpc": "2.0",
    "method": "l2_getEnqueuedTxs",
    "id": 0,
    "params": [
        "0x21",
        "0x2"
    ]
}

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": [
        {
            "queueIndex": "0x21",
            "from": "0xc86cb1fdd29765dc1f2fe8029f7b36a823fa50e8",
            "to": "0xc86cb1fdd29765dc1f2fe8029f7b36a823fa50e8",
            "rlpTx": "0xf86e888000000000000020843b9aca00830dbba094c86cb1fdd29765dc1f2fe8029f7b36a823fa50e8808082aa3ca020b76c64c8edd382d748be8c4c8426d84c7d2f33c3dd06154f5c3bb75072cbeea01b535cf5a72ced1d3c8907d2479fd12efd6ebc8c13f4a793afd841411215a61a",
            "timestamp": "0x62e0daa9"
        },
        {
            "queueIndex": "0x22",
            "from": "0xc86cb1fdd29765dc1f2fe8029f7b36a823fa50e8",
            "to": "0xc86cb1fdd29765dc1f2fe8029f7b36a823fa50e8",
            "rlpTx": "0xf86e888000000000000021843b9aca00830dbba094c86cb1fdd29765dc1f2fe8029f7b36a823fa50e8808082aa3ca05a20ca7b91ec1490ed755807a5769f8c55860d7f158b30efc292900f181abd81a06c502491d51c07b43a8cd29b088163418867b540082df2df61c8466737be9478",
            "timestamp": "0x62e0daae"
        }
    ]
}
Previousl2_getBatchStateNextl2_getL2MMRProof

Last updated 2 years ago