Skip to content

Verifying a contribution has been flagged ​

To verify that a contribution has been successfully flagged and the flagger's balance has been updated accordingly, perform any of the following steps:

  1. Check the response to submitting the contribution flag: a 200 response means that every contribution of the transaction is flagged, and rewarded is the number of tokens added to the balance.

  2. Retrieve the contribution by its ID again:

    http
    GET /data/api/v1/contribution-management/contribution/203.0.113.9

    A flagged contribution is not active, so this request does not return it. If no other active contribution covers the same id, the response is 404 with code 60.

    When retrieving contributions, a flagged contribution is returned with fraudStatus set to Flagged, flagger set to the identifier of the flagging peer, and flagTimestamp set.

  3. Retrieve the peer’s token balance:

    http
    GET /data/api/v1/wallet-management/balance
    json5
    {
      status: {
        code: integer($int32),
        name: 'string'
      },
      data: {
        tokenId: {
          definitionId: 'credit#admin',
          accountId: 'admin@peerId'
        },
        balance: integer($int64)
      }
    }
    json5
    {
      status: {
        code: 0,
        name: 'Ok'
      },
      data: {
        tokenId: {
          definitionId: 'credit#admin',
          accountId: 'admin@test'
        },
        balance: 510
      }
    }

    If a contribution has been flagged successfully, the peer’s balance is updated in accordance with the declared reward amounts.