Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func SetPriceFeeder ¶
func SetPriceFeeder(pf *coingecko.PriceFeed) func(GravityRelayer)
Types ¶
type BridgeValidators ¶
type BridgeValidators []types.BridgeValidator
func (BridgeValidators) GetPowers ¶
func (b BridgeValidators) GetPowers() []uint64
GetPowers returns only the power values for all members
func (BridgeValidators) HasDuplicates ¶
func (b BridgeValidators) HasDuplicates() bool
HasDuplicates returns true if there are duplicates in the set
type GravityRelayer ¶ added in v0.2.0
type GravityRelayer interface { Start(ctx context.Context) error FindLatestValset(ctx context.Context) (*gravitytypes.Valset, error) RelayBatches( ctx context.Context, currentValset gravitytypes.Valset, possibleBatches map[ethcmn.Address][]SubmittableBatch, ) error RelayValsets(ctx context.Context, currentValset gravitytypes.Valset) error // SetPriceFeeder sets the (optional) price feeder used when performing profitable // batch calculations. SetPriceFeeder(*coingecko.PriceFeed) }
func NewGravityRelayer ¶ added in v0.2.0
func NewGravityRelayer( logger zerolog.Logger, gravityQueryClient gravitytypes.QueryClient, gravityContract gravity.Contract, valsetRelayMode ValsetRelayMode, batchRelayEnabled bool, loopDuration time.Duration, pendingTxWait time.Duration, profitMultiplier float64, options ...func(GravityRelayer), ) GravityRelayer
type GravityValsetUpdatedEvents ¶ added in v0.2.0
type GravityValsetUpdatedEvents []*wrappers.GravityValsetUpdatedEvent
func (GravityValsetUpdatedEvents) Len ¶ added in v0.2.0
func (a GravityValsetUpdatedEvents) Len() int
func (GravityValsetUpdatedEvents) Less ¶ added in v0.2.0
func (a GravityValsetUpdatedEvents) Less(i, j int) bool
func (GravityValsetUpdatedEvents) Swap ¶ added in v0.2.0
func (a GravityValsetUpdatedEvents) Swap(i, j int)
type SubmittableBatch ¶
type SubmittableBatch struct { Batch types.OutgoingTxBatch Signatures []types.MsgConfirmBatch }
type ValsetRelayMode ¶ added in v0.2.5
type ValsetRelayMode int64
ValsetRelayMode defines an enumerated validator set relay mode.
const ( ValsetRelayModeNone ValsetRelayMode = iota ValsetRelayModeMinimum ValsetRelayModeAll )
Allowed validator set relay modes
func (ValsetRelayMode) String ¶ added in v0.2.5
func (d ValsetRelayMode) String() string
String gets the string representation of the validator set relay mode.
Click to show internal directories.
Click to hide internal directories.