Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
Events implements IEvents interface
func (*Events) ListenMarketUpdates ¶ added in v0.1.1
func (e *Events) ListenMarketUpdates() (*MarketUpdateSubscription, error)
func (*Events) ListenOrders ¶ added in v0.1.0
func (e *Events) ListenOrders() (*OrderSubscription, error)
func (*Events) ListenTrades ¶
func (e *Events) ListenTrades() (*TradeSubscription, error)
type IEvents ¶
type IEvents interface { // ListenTrades is used to listen to all 'OrderSettled' contract events and return them as models.Trade struct and // return errors on ErrChan chanel ListenTrades() (*TradeSubscription, error) // ListenOrders is used to listen to all 'OrderCommitted' contract events and return them as models.Order struct and // return errors on ErrChan chanel ListenOrders() (*OrderSubscription, error) // ListenMarketUpdates is used to listen to all 'MarketUpdated' contract events and return them as models.MarketUpdate // struct and return errors on ErrChan chanel ListenMarketUpdates() (*MarketUpdateSubscription, error) }
IEvents is an interface that is used to work with contract event listeners
func NewEvents ¶
func NewEvents( client *ethclient.Client, core *coreGoerli.CoreGoerli, spotMarket *spotMarketGoerli.SpotMarketGoerli, perpsMarket *perpsMarketGoerli.PerpsMarketGoerli, ) IEvents
NewEvents is used to create new Events instance that implements IEvents interface
type MarketUpdateSubscription ¶ added in v0.1.1
type MarketUpdateSubscription struct { MarketUpdatesChan chan *models.MarketUpdate // contains filtered or unexported fields }
MarketUpdateSubscription is a struct for listening to all 'MarketUpdated' contract events and return them as models.MarketUpdate struct
type OrderSubscription ¶ added in v0.1.0
type OrderSubscription struct { OrdersChan chan *models.Order // contains filtered or unexported fields }
OrderSubscription is a struct for listening to all 'OrderCommitted' contract events and return them as models.Order struct
type TradeSubscription ¶
type TradeSubscription struct { TradesChan chan *models.Trade // contains filtered or unexported fields }
TradeSubscription is a struct for listening to all 'OrderSettled' contract events and return them as models.Trade struct
Click to show internal directories.
Click to hide internal directories.