Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miohtama/hackatom-2022

Foboar
https://github.com/miohtama/hackatom-2022

Last synced: 23 days ago
JSON representation

Foboar

Awesome Lists containing this project

README

        

# Modified Osmosis Token Swap Example

- [See the TheGraph hosted deployment](https://thegraph.com/hosted-service/subgraph/miohtama/hackatom-2022).
- [Read the instructions for setting up Osmosis JSON-RPC node](./osmosisd-management.md)
- [Read the instructions for setting up Beaker on macOS](./beaker.md)

# Example query

```graphql
{
tokenSwaps(first: 7, orderBy: blockNumber, orderDirection: desc) {
id
blockNumber
timestamp
sender
}
}
```

# Redeploy

To deploy on the TheGraph hosted service:

```shell
npm install -g @graphprotocol/graph-cli
graph codegen
graph build
graph deploy --product hosted-service miohtama/hackatom-2022
```

# Further reading

- [Uniswap v3 subgraph](https://github.com/Uniswap/v3-subgraph/blob/main/schema.graphql)

- [Building subgraphs on Cosmos](https://thegraph.com/docs/en/cookbook/cosmos/)

- [Cosmos subgraph examples](https://github.com/graphprotocol/example-subgraphs/tree/main/cosmos)

- [GAMM Swap event source code](https://github.com/osmosis-labs/osmosis/blob/fe98f6e4453cd32035d277c21ef2f3669b677bb2/x/gamm/keeper/swap.go#L171)