Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTRN-303 add basic slinky bindings docs #176

Closed
wants to merge 4 commits into from

Conversation

quasisamurai
Copy link
Contributor

@quasisamurai quasisamurai commented May 30, 2024

TASK

This PR implements some basic docs for bindings, related to Oracle & MarketMap modules

Using `neutron-sdk` you can query these modules via contracts

### Oracle
For example usage of these queries in contract, check our related [dev-contract](https://github.com/neutron-org/neutron-dev-contracts/blob/727aa94dff53373e34226d31d5bdcfc66e3a1aaf/contracts/oracle/src/contract.rs#L53)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's do not refer to dev-contract in the docs.

We usually refer to simple and easily readable contracts in neutron-sdk repo

@@ -0,0 +1,210 @@
# Overview
We have integrated the [Slinky](https://skip-protocol-docs.netlify.app/slinky/overview) modules (Oracle & MarketMap) into the Neutron and added WASM bindings to facilitate their usage. This integration enhances our blockchain with reliable, real-time price feeds and market data.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Weird link, why not https://docs.skip.money/slinky/overview?

### Market Map
For more detailed descriptions, refer to the [MarketMap README](https://github.com/skip-mev/slinky/blob/main/x/marketmap/README.md).

For example usage of these queries in contract, check our related [dev-contract](https://github.com/neutron-org/neutron-dev-contracts/blob/feat/sdk-50/contracts/marketmap/src/contract.rs#L52)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same about dev-contracts

Copy link
Contributor

@sotnikov-s sotnikov-s left a comment

Choose a reason for hiding this comment

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

please attach a link to the task and add some description to the PR

Using `neutron-sdk` you can query these modules via contracts

### Oracle
For example usage of these queries in contract, check our related [example contract](https://github.com/neutron-org/neutron-sdk/tree/d9abe67f0f62d4ea42d1943af53189ec6674d29e/contracts/marketmaphttps://github.com/neutron-org/neutron-sdk/tree/d9abe67f0f62d4ea42d1943af53189ec6674d29e/contracts/marketmap)
Copy link
Contributor

Choose a reason for hiding this comment

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

broken link

}
```

#### GetAllCurrencyPairs
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it's better to move the messages from the overview page to the Messages page just like it's done in other module sections

@@ -0,0 +1,210 @@
# Overview
We have integrated the [Slinky](https://docs.skip.money/slinky/overview) modules (Oracle & MarketMap) into the Neutron and added WASM bindings to facilitate their usage. This integration enhances our blockchain with reliable, real-time price feeds and market data.
Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to have a link to the neutron-sdk file with bindings defined to ease navigation. if we add links, users will be able to quickly find the actual definition of requests and responses and investigate them and different auxiliary structs/types

@pr0n00gler pr0n00gler changed the base branch from main to feat/neutron-v4 June 12, 2024 11:49
…y-bindings

# Conflicts:
#	docs/neutron/modules/3rdparty/skip/slinky/overview.md
#	sidebars.js
Comment on lines -287 to +297
],
},
{
label: "Cosmos Hub",
{
label: 'Slinky',
type: 'category',
items: [
'neutron/modules/3rdparty/skip/slinky/overview',
]
}
],
},
{
label: "Cosmos Hub",
Copy link
Contributor

Choose a reason for hiding this comment

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

something's wrong here. did you run yarn start and took a look at the result version after last changes?
image
image

Copy link
Contributor

Choose a reason for hiding this comment

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

and the bindings pages are not included in the sidebars.js

Comment on lines -287 to +297
],
},
{
label: "Cosmos Hub",
{
label: 'Slinky',
type: 'category',
items: [
'neutron/modules/3rdparty/skip/slinky/overview',
]
}
],
},
{
label: "Cosmos Hub",
Copy link
Contributor

Choose a reason for hiding this comment

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

and the bindings pages are not included in the sidebars.js

Comment on lines +5 to +11
```rust
pub enum OracleQuery {
GetAllCurrencyPairs {},
GetPrice { currency_pair: CurrencyPair },
GetPrices { currency_pair_ids: Vec<String> },
}
```
Copy link
Contributor

Choose a reason for hiding this comment

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

there is a number of unformatted snippets. please apply formatting:

image

```rust
GetPrice { currency_pair: CurrencyPair }
```
resp:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
resp:
Response:

@pr0n00gler pr0n00gler closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants