Skip to content

Commit

Permalink
chore: develop -> main (#368)
Browse files Browse the repository at this point in the history
* revert: cosmos submodule only (#362)

* revert: cosmos submodule only

* fix: rem

* fix: rem

* fix: update

* feat: add msg client

* fix: paths

* fix: try chaosnet ibc

* fix: path again

* fix: try hm

* fix: fixes to pass

* feat: eth protos (#366)

* fix: eth protos

* fix: client

* fix: fixes

* fix: try older nibiru

* fix: index

* fix: mainnet

* fix: import

* revert: build change

* chore: tests (#367)

* fix: all query tests

* chore: final tests

* fix: buf

* fix: fix

* fix: pull latest

* fix: build

* fix: build
  • Loading branch information
cgilbe27 authored Aug 9, 2024
1 parent fcdc4b7 commit c6d6570
Show file tree
Hide file tree
Showing 68 changed files with 1,778 additions and 1,625 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
permissions:
contents: write
issues: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-ts-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
env:
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }}
VALIDATOR_ADDRESS: ${{ secrets.VALIDATOR_ADDRESS }}
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
LCD_ENDPOINT: "http://127.0.0.1:1317"
GRPC_ENDPOINT: "127.0.0.1:9090"
TENDERMINT_RPC_ENDPOINT: "http://127.0.0.1:26657"
Expand Down
93 changes: 0 additions & 93 deletions QUERIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,99 +135,6 @@ liquidations(
limit: Int): [Liquidations]
```

## markPriceCandles

TODO docs

```graphql
markPriceCandles(
where: MarkPriceCandlesFilter
order: MarkPriceCandlesOrder
orderDesc: Boolean
limit: Int): [MarkPriceCandles]
```

#### In English

- The above code block means that there is a query function called `markPriceCandles` with four arguments, `where`, `order`, `orderDesc`, and `limit`, that returns `[MarkPriceCandles]`.
- The `[MarkPriceCandles]` type means that "list of `MarkPriceCandles` objects".

#### `MarkPriceCandles`

```graphql
type MarkPriceCandles {
pair: String
open: Int
close: Int
low: Int
high: Int
period: Float
periodStartTs: DateTime
}
```

ANKI `Boolean` in GraphQL means `true` or `false`.

The `where` parameter has options for filtering based on conditions for each field. The filter condition must match the type of the corresponding field. Examples include:

```graphql
where: { pairEq: "ubtc:unusd" }
where: { lowGt: 100 }
where: { periodStartTsLt: "2023-02-22" }
```

Every field, e.g. `pair`, `open`, `close`, `period`, has filter options. In the case of `MarkPriceCandles`, every field has methods for:

- `=` : `Eq` : equals
- `>` : `Gt` : greater than
- `<` : `Lt` : less than
- `>=` : `Gte` : greater than or equal
- `<=` : `Lte` : less than or equal

Except, `pair`, which only has the `pairEq` method.

### `order: MarkPriceCandlesOrder`

```graphql
markPriceCandles(
where: MarkPriceCandlesFilter
order: MarkPriceCandlesOrder
orderDesc: Boolean
limit: Int): [MarkPriceCandles]
```

```graphql
type MarkPriceCandlesOrder {
pair
open
close
low
high
period
period_start_ts
}
```

This means we can use one of these values with the `order` argument in the query like follows:

```graphql
order: pair
order: close
order: period_start_ts
```

## markPrices

TODO docs

```graphql
markPrices(
where: MarkPricesFilter
order: MarkPricesOrder
orderDesc: Boolean
limit: Int): [MarkPrices]
```

## oraclePrices

TODO docs
Expand Down
2 changes: 1 addition & 1 deletion nibiru
Submodule nibiru updated 204 files
Loading

1 comment on commit c6d6570

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: 95%
95.52% (897/939) 83.4% (206/247) 93.98% (297/316)

Please sign in to comment.