Get status of the OmniBridge deposit

How to get programatically the status of the deposit made through the OmniBridge

This page is mostly for the application developers, if you sent tokens through the OmniBridge and would like to get the status whether the tokens were sent successfully or not, please use AMB Live Monitoring application instead.

First of all, the Arbitrary Message Bridge contract (0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e) which is used by the OmniBridge, emits the UserRequestForAffirmation event as part of the a deposit request made by user.
event UserRequestForAffirmation(bytes32 indexed messageId, bytes encodedData);

For example, here is the event in the OmniBridge transaction:, the topic 0x482515ce3d9494a37ce83f18b72b363449458435fafdd7a53ddea7460fe01b58.

It is obvious from the event definition and from the example that the Id of the AMB message is trackable as part of the event. The event from the example shows the message Id: 0x000500004ac82b41bd819dd871590b510316f2385cb196fb0000000000000402.

On another side of the bridge if the message was executed successfully the AMB contract (0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59) emits the AffirmationCompleted event.
event AffirmationCompleted(
    address indexed sender,
    address indexed executor,
    bytes32 indexed messageId,
    bool status

Here is the event corresponding to the requests from the example:

The topic of the event is 0xe194ef610f9150a2db4110b3db5116fd623175dca3528d7ae7046a1042f84fe7. And the message Id is represented as a separate topic in the event.

That's why it is possible to use different ways to filter out the corresponding transaction if the message Id of the OmniBridge deposit is known (it always can be received from the deposit transaction).

For example, you can use the BlockScout API for this: Example of the request to the BlockScout:

It will return the JSON with the transaction hash which causes the emit of the event AffirmationCompleted with the message Id:

  "message": "OK",
  "result": [
      "address": "0x75df5af045d91108662d8080fd1fefad6aa0bb59",
      "blockNumber": "0xbc8133",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "gasPrice": "0x3b9aca00",
      "gasUsed": "0x2d572",
      "logIndex": "0x8",
      "timeStamp": "0x5f7ab6dd",
      "topics": [
      "transactionHash": "0x092f1c8a02f305e5bfb671b923710cdd150c5b0e41df048c75b790538a25025b",
      "transactionIndex": "0x5"
  "status": "1"

Last updated