-
Notifications
You must be signed in to change notification settings - Fork 99
/
constants.go
47 lines (44 loc) · 1.5 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package events
const (
// Cosmos event attribute values for the subtype attribute for different indexer events.
// Keep these constants in sync with:
// https://github.com/dydxprotocol/indexer/blob/master/services/ender/src/lib/types.ts.
// Ender uses these to maintain a mapping between event type and event proto.
SubtypeOrderFill = "order_fill"
SubtypeSubaccountUpdate = "subaccount_update"
SubtypeTransfer = "transfer"
SubtypeMarket = "market"
SubtypeFundingValues = "funding_values"
SubtypeStatefulOrder = "stateful_order"
SubtypeAsset = "asset"
SubtypePerpetualMarket = "perpetual_market"
SubtypeLiquidityTier = "liquidity_tier"
SubtypeUpdatePerpetual = "update_perpetual"
SubtypeUpdateClobPair = "update_clob_pair"
)
const (
// Indexer event versions.
OrderFillEventVersion uint32 = 1
SubaccountUpdateEventVersion uint32 = 1
TransferEventVersion uint32 = 1
MarketEventVersion uint32 = 1
FundingValuesEventVersion uint32 = 1
StatefulOrderEventVersion uint32 = 1
AssetEventVersion uint32 = 1
PerpetualMarketEventVersion uint32 = 1
LiquidityTierEventVersion uint32 = 1
UpdatePerpetualEventVersion uint32 = 1
UpdateClobPairEventVersion uint32 = 1
)
var OnChainEventSubtypes = []string{
SubtypeOrderFill,
SubtypeSubaccountUpdate,
SubtypeTransfer,
SubtypeMarket,
SubtypeFundingValues,
SubtypeStatefulOrder,
SubtypeAsset,
SubtypePerpetualMarket,
SubtypeLiquidityTier,
SubtypeUpdatePerpetual,
}