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"
        ]
    }
}

Last updated