Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dixitaniket committed Aug 1, 2023
1 parent dad2261 commit 63ae1eb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
12 changes: 6 additions & 6 deletions cosmwasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ pub struct RefMedianData {

### DeviationData

`RefData` is the struct that is returned when querying with `GetDeviationRef` or `GetDeviationRefBulk` where the
bulk variant returns `Vec<RefData>`
`RefDeviationData` is the struct that is returned when querying with `GetDeviationRef` or `GetDeviationRefBulk` where the
bulk variant returns `Vec<RefDeviationData>`

`RefData` is defined as:
`RefDeviationData` is defined as:

```rust
pub struct RefData {
// Rate of an asset relative to USD (deviation of assets when used with deviation queries)
pub rate: Uint64,
pub struct RefDeviationData {
// Deviation Rates of an asset relative to USD
pub rates: Vec<Uint64>,
// The resolve time of the request ID
pub resolve_time: Uint64,
// The request ID where the rate was derived from
Expand Down
12 changes: 6 additions & 6 deletions cosmwasm/contracts/price-feed/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub enum ExecuteMsg {
// Request ID of the results on Ojo
request_id: Uint64,
},
// Relays a vector of symbols and their corresponding rates
// Relays a vector of symbols and their corresponding median rates
RelayHistoricalMedian {
// A vector of symbols and their corresponding rates where:
// symbol_rate := (symbol, rate)
Expand All @@ -56,7 +56,7 @@ pub enum ExecuteMsg {
// Request ID of the results on Ojo
request_id: Uint64,
},
// Relays a vector of symbols and their corresponding rates
// Relays a vector of symbols and their corresponding deviation rates
RelayHistoricalDeviation {
symbol_rates: Vec<(String, Vec<Uint64>)>,
resolve_time: Uint64,
Expand All @@ -69,13 +69,13 @@ pub enum ExecuteMsg {
resolve_time: Uint64,
request_id: Uint64,
},
// Same as Relay but without the resolve_time guard
// Same as RelayHistoricalMedian but without the resolve_time guard
ForceRelayHistoricalMedian {
symbol_rates: Vec<(String, Vec<Uint64>)>,
resolve_time: Uint64,
request_id: Uint64,
},
// Relays a vector of symbols and their corresponding deviations
// Same as RelayHistoricalDeviation but without the resolve_time guard
ForceRelayHistoricalDeviation {
symbol_rates: Vec<(String, Vec<Uint64>)>,
resolve_time: Uint64,
Expand Down Expand Up @@ -133,14 +133,14 @@ pub enum QueryMsg {
symbols: Vec<String>,
},
#[returns(RefDeviationData)]
// Returns the deviation RefData of a given symbol
// Returns the deviation RefDeviationData of a given symbol
GetDeviationRef {
// Symbol to query
symbol: String,
},

#[returns(Vec < RefDeviationData >)]
// Returns the deviation RefData of the given symbols
// Returns the deviation RefDeviationData of the given symbols
GetDeviationRefBulk {
// Vector of Symbols to query
symbols: Vec<String>,
Expand Down
6 changes: 5 additions & 1 deletion cw-relayer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ each msg above has a forced version which ignores the resolve duration present i

#### Median Duration
- median duration determines how frequently median prices are posted to the contract
- if median duration is set to 0, then median prices are not posted to the contract
- if median duration is set to 0, then median prices are not posted to the contract

### Links to other supported implementations
- [Secret Network](https://github.com/ojo-network/contracts/tree/secret)
- [Evm](https://github.com/ojo-network/contracts/tree/evm)

0 comments on commit 63ae1eb

Please sign in to comment.