Overview
TheConnectOracle contract interacts with the Cosmos blockchain to fetch and
process price data for various currency pairs from the Connect Oracle.
Imports
Structs
Price
A struct to hold price information.uint256 price: The price value.uint256 timestamp: The timestamp of the price.uint64 height: The block height at which the price was recorded.uint64 nonce: A unique identifier for the price record.uint64 decimal: The decimal precision of the price.uint64 id: The ID of the price record.
Constructor
Functions
get_price
Fetches the price for a specific currency pair from the Cosmos blockchain.Parameters
Returns
get_prices
Fetches prices for multiple currency pairs from the Cosmos blockchain.Parameters
Returns
join
Concatenates an array of strings with a specified separator.Parameters
Returns
get_price_from_tokens
Parses a JSON string to extract price information and populate aPrice struct.