-
Notifications
You must be signed in to change notification settings - Fork 83
/
perpetual_market_create.go
34 lines (32 loc) · 1.05 KB
/
perpetual_market_create.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
package events
import (
v1 "github.com/dydxprotocol/v4-chain/protocol/indexer/protocol/v1"
"github.com/dydxprotocol/v4-chain/protocol/x/clob/types"
)
// NewPerpetualMarketCreateEvent creates a PerpetualMarketCreateEvent
// representing creation of a perpetual market.
func NewPerpetualMarketCreateEvent(
id uint32,
clobPairId uint32,
ticker string,
marketId uint32,
status types.ClobPair_Status,
quantumConversionExponent int32,
atomicResolution int32,
subticksPerTick uint32,
stepBaseQuantums uint64,
liquidityTier uint32,
) *PerpetualMarketCreateEventV1 {
return &PerpetualMarketCreateEventV1{
Id: id,
ClobPairId: clobPairId,
Ticker: ticker,
MarketId: marketId,
Status: v1.ConvertToClobPairStatus(status),
QuantumConversionExponent: quantumConversionExponent,
AtomicResolution: atomicResolution,
SubticksPerTick: subticksPerTick,
StepBaseQuantums: stepBaseQuantums,
LiquidityTier: liquidityTier,
}
}