Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miohtama/hackatom-2022
Foboar
https://github.com/miohtama/hackatom-2022
Last synced: 23 days ago
JSON representation
Foboar
- Host: GitHub
- URL: https://github.com/miohtama/hackatom-2022
- Owner: miohtama
- License: mit
- Created: 2022-07-29T06:23:06.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-29T15:47:33.000Z (over 2 years ago)
- Last Synced: 2024-11-11T12:45:36.476Z (3 months ago)
- Language: TypeScript
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)