GMP Redeem Tracing
Step-by-step guide for tracing GMP (Generic Message Passing) redemption transactions on the Ethereum blockchain.
Step 1: Filter Transactions
Filter RedeemForBtc calls on the AssetRouter contract:
Contract: 0x964677F337d6528d659b1892D0045B8B27183fc0
Event Signature: 0x8784acf2b096380844b252c1cc85752ea2dcccf0fd55ed7a440e0ccd3b56b908
Step 2: Find MessageSent Event
Open the transaction and navigate to the “Logs” tab. Find the MessageSent event and copy the data.
Step 3: Decode the Data
Open Etherscan’s input data decoder .
Paste the data as Input Data, and use this ABI as Input ABI:
[{
"inputs": [
{
"internalType": "bytes32",
"name": "pathId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "sender",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "recipient",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "destinationCaller",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "body",
"type": "bytes"
}
],
"name": "MessageV1",
"outputs": [],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "toChainID",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "fromToken",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "redeemer",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "scriptpubkey",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "redeem",
"outputs": [],
"stateMutability": "view",
"type": "function"
}]Click “Decode”.
Step 4: Decode the Body
Copy the body field from the decoded MessageV1 result to the Input Data field and click “Decode” again.
Step 5: Extract Bitcoin Address
In the result you can see toChainID, fromToken, redeemer, scriptpubkey, and amount. The scriptpubkey can be converted to a Bitcoin address.