decodeClaims function
All SettledOrderRedeemed receipts in result.
Implementation
List<ClaimReceipt> decodeClaims(
PredictConfig cfg, DecodableTransactionResult result) {
return _decodeAll(result, cfg.packages.predictV1, 'order_events',
'SettledOrderRedeemed', order_events.SettledOrderRedeemed, (e) {
final payout = _big(e['payout_amount'] as Object);
return ClaimReceipt(
marketId: normalizeSuiAddress(e['expiry_market_id'] as String),
accountId: normalizeSuiAddress(e['account_id'] as String),
owner: normalizeSuiAddress(e['owner'] as String),
orderId: _big(e['order_id'] as Object),
positionRootId: _big(e['position_root_id'] as Object),
payout: fromRaw(payout, 6),
rawPayout: payout,
);
});
}