novasamatech/subquery-history

Custom assets transfers

Closed this issue · 0 comments

It is necessary to support transfers from Assets and Orml pallets. Currently we are saving as transfers balances.transfer and balances.transfer_keep_alive calls.

To support custom assets we also need:

  1. add optional assetId string field to Transfer entity
  2. handle as transfers:
    a) balances.transfer, balances.transfer_keep_alive, balances.transfer_all - assetId = nil;
    b) tokens.transfer, tokens.transfer_keep_alive, tokens.transfer_all, currencies.transfer, currencies.transfer_keep_alive, currencies.transfer_all - assetId = hex(scale(currencyId)), currencyId is extracted from call arguments;
    c) asset.transfer, asset.transfer_keep_alive - assetId is extracted from call arguments