You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: general-service/README.md
+53-12Lines changed: 53 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# IPO Service
1
+
# General Service
2
2
3
-
Aggregates IPO bid transaction data. Given a set of bidder identities, returns their bid transactions for all currently active IPOs with parsed bid data (price, quantity).
3
+
General-purpose aggregation service. Currently provides IPO bid transaction aggregation and batch identity balance lookups.
1. Fetches active IPO contract indices from qubic-http (`GetActiveIpos`), cached with configurable TTL.
52
87
2. Derives smart contract addresses from contract indices (contract index in lower 32 bits of the 256-bit public key, remaining bits zeroed).
53
88
3. Gets current epoch tick bounds from status-service (`GetTickIntervals`), cached with configurable TTL.
54
89
4. For each identity, queries archive-query-service (`GetTransactionsForIdentity`) with destination = SC address, tick range = current epoch, amount = 0.
55
90
5. Filters results by `input_size == 10` and `amount == 0` to isolate IPO bid transactions.
56
91
6. Parses `input_data` (base64) as `ContractIPOBid`: price (int64 LE, 8 bytes) + quantity (uint16 LE, 2 bytes).
57
92
93
+
### Identity Balances
94
+
95
+
1. For each identity, concurrently fetches the balance from qubic-http (`GetBalance`).
96
+
2. Returns all balance fields (current balance, transfer ticks, amounts, transfer counts).
97
+
58
98
## Upstream Dependencies
59
99
60
100
| Service | Method | Purpose |
61
101
|---------|--------|---------|
62
102
| qubic-http |`GetActiveIpos`| Active IPO contract indices |
63
103
| qubic-http |`GetTickInfo`| Current epoch for tick range |
104
+
| qubic-http |`GetBalance`| Identity balance data |
0 commit comments