Documentation ¶
Index ¶
- type AccountCreatedSubscription
- type AccountLiquidatedSubscription
- type AccountPermissionGrantedSubscription
- type AccountPermissionRevokedSubscription
- type Events
- func (e *Events) ListenAccountCreated() (*AccountCreatedSubscription, error)
- func (e *Events) ListenAccountLiquidated() (*AccountLiquidatedSubscription, error)
- func (e *Events) ListenAccountPermissionGranted() (*AccountPermissionGrantedSubscription, error)
- func (e *Events) ListenAccountPermissionRevoked() (*AccountPermissionRevokedSubscription, error)
- func (e *Events) ListenLiquidations() (*LiquidationSubscription, error)
- func (e *Events) ListenMarketUpdates() (*MarketUpdateSubscription, error)
- func (e *Events) ListenMarketUpdatesBig() (*MarketUpdateSubscriptionBig, error)
- func (e *Events) ListenOrders() (*OrderSubscription, error)
- func (e *Events) ListenTrades() (*TradeSubscription, error)
- type IEvents
- type LiquidationSubscription
- type MarketUpdateSubscription
- type MarketUpdateSubscriptionBig
- type OrderSubscription
- type TradeSubscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCreatedSubscription ¶ added in v0.1.19
type AccountCreatedSubscription struct { NewAccountChan chan *models.Account // contains filtered or unexported fields }
AccountCreatedSubscription is a struct for listening to all 'AccountCreated' contract events and return them as models.Account struct
type AccountLiquidatedSubscription ¶ added in v0.1.19
type AccountLiquidatedSubscription struct { AccountLiquidated chan *models.AccountLiquidated // contains filtered or unexported fields }
AccountLiquidatedSubscription is a struct for listening to all 'AccountLiquidated' contract events and return them as models.AccountLiquidated struct
type AccountPermissionGrantedSubscription ¶ added in v0.1.19
type AccountPermissionGrantedSubscription struct { PermissionChangeChan chan *models.PermissionChanged // contains filtered or unexported fields }
AccountPermissionGrantedSubscription is a struct for listening to all 'PermissionGranted' contract events and return them as models.PermissionChanged struct
type AccountPermissionRevokedSubscription ¶ added in v0.1.19
type AccountPermissionRevokedSubscription struct { PermissionChangeChan chan *models.PermissionChanged // contains filtered or unexported fields }
AccountPermissionRevokedSubscription is a struct for listening to all 'PermissionRevoked' contract events and return them as models.PermissionChanged struct
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
Events implements IEvents interface
func (*Events) ListenAccountCreated ¶ added in v0.1.19
func (e *Events) ListenAccountCreated() (*AccountCreatedSubscription, error)
func (*Events) ListenAccountLiquidated ¶ added in v0.1.19
func (e *Events) ListenAccountLiquidated() (*AccountLiquidatedSubscription, error)
func (*Events) ListenAccountPermissionGranted ¶ added in v0.1.19
func (e *Events) ListenAccountPermissionGranted() (*AccountPermissionGrantedSubscription, error)
func (*Events) ListenAccountPermissionRevoked ¶ added in v0.1.19
func (e *Events) ListenAccountPermissionRevoked() (*AccountPermissionRevokedSubscription, error)
func (*Events) ListenLiquidations ¶ added in v0.1.3
func (e *Events) ListenLiquidations() (*LiquidationSubscription, error)
func (*Events) ListenMarketUpdates ¶ added in v0.1.1
func (e *Events) ListenMarketUpdates() (*MarketUpdateSubscription, error)
func (*Events) ListenMarketUpdatesBig ¶ added in v0.1.9
func (e *Events) ListenMarketUpdatesBig() (*MarketUpdateSubscriptionBig, 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) // ListenMarketUpdatesBig is used to listen to all 'MarketUpdated' contract events and return them as models.MarketUpdateBig // struct and return errors on ErrChan chanel ListenMarketUpdatesBig() (*MarketUpdateSubscriptionBig, error) // ListenLiquidations is used to listen to all 'PositionLiquidated' contract events and return them as models.Liquidation // struct and return errors on ErrChan chanel ListenLiquidations() (*LiquidationSubscription, error) // ListenAccountCreated is used to listen to all 'AccountCreated' contract events and return them as models.Account // struct and return errors on ErrChan chanel ListenAccountCreated() (*AccountCreatedSubscription, error) // ListenAccountLiquidated is used to listen to all 'AccountLiquidated' contract events and return them as models.AccountLiquidated // struct and return errors on ErrChan chanel ListenAccountLiquidated() (*AccountLiquidatedSubscription, error) // ListenAccountPermissionRevoked is used to listen to all 'PermissionRevoked' contract events and return them as models.PermissionChanged // struct and return errors on ErrChan chanel ListenAccountPermissionRevoked() (*AccountPermissionRevokedSubscription, error) // ListenAccountPermissionGranted is used to listen to all 'PermissionGranted' contract events and return them as models.PermissionChanged // struct and return errors on ErrChan chanel ListenAccountPermissionGranted() (*AccountPermissionGrantedSubscription, error) }
IEvents is an interface that is used to work with contract event listeners
func NewEvents ¶
func NewEvents( client *ethclient.Client, core *core.Core, perpsMarket *perpsMarket.PerpsMarket, ) IEvents
NewEvents is used to create new Events instance that implements IEvents interface
type LiquidationSubscription ¶ added in v0.1.3
type LiquidationSubscription struct { LiquidationsChan chan *models.Liquidation // contains filtered or unexported fields }
LiquidationSubscription is a struct for listening to all 'PositionLiquidated' contract events and return them as models.Liquidation struct
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 MarketUpdateSubscriptionBig ¶ added in v0.1.9
type MarketUpdateSubscriptionBig struct { MarketUpdatesChan chan *models.MarketUpdateBig // contains filtered or unexported fields }
MarketUpdateSubscriptionBig is a struct for listening to all 'MarketUpdated' contract events and return them as models.MarketUpdateBig 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