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_getL2RelayMsgParams

Return the params to invoke relayMessage or replayMessage of L2 cross witness contract.

Parameters

  • msgIndex: uint64|QUANTITY - specified cross chain msg, enable hex-encoded and original string.

Returns

Object - A object with the following fields:

  • target: Address - to address of message

  • sender: Address - from address of message

  • message: byte array - message content

  • messageIndex: QUANTITY - the index of message

  • mmrSize: QUANTITY - the size of MMR tree

  • proof: Hash Array - refer MMR proof

Example

Request

{
    "jsonrpc": "2.0",
    "method": "l2_getL2RelayMsgParams",
    "id": 0,
    "params": [
        "0x1"
    ]
}

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
        "target": "0xbde0000000000000000000000000000000000bde",
        "sender": "0xd8a5a9b31c3c0232e196d518e89fd8bf83acad43",
        "message": "0x81de0dd5000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000005cea1d03017adc95367f0f884350249a563b36640000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000",
        "messageIndex": "0x1",
        "mmrSize": "0x2",
        "proof": [
            "0x9062ced55d652b9b31fc6be33fd715d41eb8046282babb685bc53bc4b2f2e693"
        ]
    }
}
Previousl2_getL2MMRProofNextl2_getPendingTxBatches

Last updated 2 years ago