Documentation
¶
Index ¶
- func ConvertPythPrice(rawPrice string, exponent int) (sdkmath.Int, error)
- func CreateUpdatePriceFeedsMsg(contractAddress string, senderAddress string, base64Data string, ...) (*wasmdtypes.MsgExecuteContract, error)
- type APIResponse
- type Binary
- type BinaryData
- type Metadata
- type Parsed
- type Price
- type PriceResponse
- type QueryClient
- type UpdatePriceFeeds
- type UpdatePriceFeedsMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPythPrice ¶
ConvertPythPrice converts the raw price using the exponent and returns a scaled osmomath.BigInt
func CreateUpdatePriceFeedsMsg ¶
func CreateUpdatePriceFeedsMsg(contractAddress string, senderAddress string, base64Data string, funds sdk.Coins) (*wasmdtypes.MsgExecuteContract, error)
CreateUpdatePriceFeedsMsg constructs and returns the MsgExecuteContract to execute the "updatePriceFeeds" method on the contract
Types ¶
type APIResponse ¶
type APIResponse struct {
Binary BinaryData `json:"binary"`
}
APIResponse represents the structure of the JSON response from the API.
type BinaryData ¶
BinaryData represents the "binary" field of the API response.
type PriceResponse ¶
type QueryClient ¶
type QueryClient interface {
LatestPrice(ctx context.Context, id string) (*PriceResponse, error)
QueryGetUpdatedFee(ctx context.Context, qc wasmdtypes.QueryClient, contractAddress string, hexData string) (sdk.Coins, error)
}
PythClient is the client API for Pyth service
func NewQueryClient ¶
func NewQueryClient(client *http.Client) QueryClient
NewQueryClient creates a new Pyth Query Client
type UpdatePriceFeeds ¶
type UpdatePriceFeeds struct {
Data []string `json:"data"`
}
UpdatePriceFeeds feeds holds the payload for the update_price_feeds endpoint
type UpdatePriceFeedsMsg ¶
type UpdatePriceFeedsMsg struct {
UpdatePriceFeeds UpdatePriceFeeds `json:"update_price_feeds"`
}
UpdatePriceFeedsMsg is the wrapper for UpdatePriceFeeds
Click to show internal directories.
Click to hide internal directories.