grpc

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MedianCheck

func MedianCheck(val1Client *client.OjoClient) error

MedianCheck waits for availability of all exchange rates from the denom accept list, records historical stamp data based on the oracle params, computes the median/median deviation and then compares that to the data in the median/median deviation gRPC query

func OracleParamChanges

func OracleParamChanges(
	historicStampPeriod uint64,
	maximumPriceStamps uint64,
	medianStampPeriod uint64,
) []proposal.ParamChange

func ParseProposalID

func ParseProposalID(response *sdk.TxResponse) (uint64, error)

ParseProposalID parses the proposalID from a tx response

func SleepUntilProposalEndTime

func SleepUntilProposalEndTime(ojoClient *client.OjoClient, proposalID uint64) error

SleepUntilProposalEndTime sleeps until the end of the voting period + 1 block

func SubmitAndPassLegacyProposal

func SubmitAndPassLegacyProposal(ojoClient *client.OjoClient, changes []proposal.ParamChange) error

SubmitAndPassProposal submits a proposal and votes yes on it

func SubmitAndPassProposal

func SubmitAndPassProposal(ojoClient *client.OjoClient, msgs []sdk.Msg, title, summary string) error

func VerifyProposalPassed

func VerifyProposalPassed(ojoClient *client.OjoClient, proposalID uint64) error

VerifyProposalPassed returns a non-nil error if the proposal did not pass

Types

type PriceStore

type PriceStore struct {
	// contains filtered or unexported fields
}

PriceStore is the in memory store for prices recorded by the price_listener with helper methods for calculating and verifying medians and median deviations

func NewPriceStore

func NewPriceStore() *PriceStore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL