christine-braun

How to Claim a Gnosis Bridge Withdrawal With Ethereum AMB

Gnosis Bridge withdrawals are claimed programmatically on Ethereum by reading the home AMB message, collecting Bridge validators' signatures, and calling executeSignatures(message, signatures) on the Ethereum Arbitrary Message Bridge (AMB). Withdrawals do not execute there automatically.

  • Extract messageId and encodedData from UserRequestForSignature.
  • Wait for the validator threshold, then fetch packed signatures.
  • Submit the original message bytes and verify RelayedMessage status.

How Do You Claim a Gnosis Bridge Withdrawal on Ethereum?

To claim a Gnosis Chain bridge withdrawal, decode its AMB event, wait for signatures, execute on Ethereum, and verify the relay. Start with the withdrawal transaction hash, RPC access to both chains, and ETH for gas. gnosisbridge.org moves tokens and contract messages between those chains.

  1. Decode the withdrawal receipt. Fetch the Gnosis Chain receipt with ethers or viem and parse the home AMB's UserRequestForSignature log. Save its messageId and encodedData. Omnibridge withdrawals may originate in a token contract, so filter for the AMB emitter. GnosisScan can confirm the event fields. Use the event's encodedData as the message argument. Transaction input encodes the user's call, not the AMB message signed by validators. Reconstructing the message from that input, or decoding and re-encoding its fields, can change the bytes. The Ethereum AMB verifies signatures against the exact emitted bytes. Keep messageId separately to identify the relay; pass encodedData unchanged to both the signature helper and executeSignatures. The Gnosis Chain AMB reference identifies this field as the claim input.The Gnosis token bridge carries the AMB message for token withdrawals. For cross-chain token and message transfers, Gnosis Bridge moves assets and data between Ethereum and Gnosis Chain.
  2. Wait for signatures. Poll numMessagesSigned(keccak256(encodedData)) on the home AMB. Compare its count with requiredSignatures(), excluding the processed flag in the high bit. After the threshold is met, call the Gnosis Chain AMB helper's getSignatures(encodedData) for the packed signatures. A premature claim reverts.
  3. Execute on Ethereum. With an Ethereum signer funded for gas, call executeSignatures(encodedData, signatures) on the Ethereum AMB. Save the transaction hash for its receipt.
  4. Verify the claim. Wait for the Ethereum receipt and parse the AMB's RelayedMessage. Match its messageId to the Gnosis Chain event and require status true. That confirmed event completes the claim.

What Does a Failed RelayedMessage Mean?

A failed RelayedMessage means the target contract call returned status false after AMB execution. The message is consumed, so another executeSignatures call cannot fix it. For an Omnibridge withdrawal, call requestFailedMessageFix(messageId) on the Ethereum mediator to initiate recovery, then track the fix message. If the Ethereum transaction reverts without RelayedMessage, inspect its revert reason and signature readiness before retrying.