{"id":19319676,"url":"https://github.com/blockcoders/terra-subgraph","last_synced_at":"2026-01-05T11:05:26.576Z","repository":{"id":42969721,"uuid":"465880230","full_name":"blockcoders/terra-subgraph","owner":"blockcoders","description":"Terra Money subgraph 📊","archived":false,"fork":false,"pushed_at":"2022-03-25T17:55:19.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-26T11:02:03.817Z","etag":null,"topics":["blockchain","graph","subgraph","terra","terramoney","the-graph","thegraph"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockcoders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-03T20:51:49.000Z","updated_at":"2023-04-08T01:33:09.000Z","dependencies_parsed_at":"2022-09-09T13:11:21.575Z","dependency_job_id":null,"html_url":"https://github.com/blockcoders/terra-subgraph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockcoders%2Fterra-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockcoders%2Fterra-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockcoders%2Fterra-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockcoders%2Fterra-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockcoders","download_url":"https://codeload.github.com/blockcoders/terra-subgraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822787,"owners_count":20516169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","graph","subgraph","terra","terramoney","the-graph","thegraph"],"created_at":"2024-11-10T01:24:47.794Z","updated_at":"2026-01-05T11:05:21.544Z","avatar_url":"https://github.com/blockcoders.png","language":"TypeScript","readme":"# Terra Subgraph\n\n[Terra](https://www.terra.money/) is a public blockchain protocol deploying a suite of algorithmic decentralized stablecoins.\n\nThis subgraph dynamically tracks the current state of Terra contracts (LUNA, UST, wUST and wLUNA), and contains derived stats for things like historical data and USD prices.\n\n## Running Locally\n\nMake sure to update package.json settings to point to your own graph account.\n\n## Queries\n\nBelow are a few ways to show how to query the terra-subgraph for data. The queries show most of the information that is queryable, but there are many other filtering options that can be used, just check out the [querying api](https://thegraph.com/docs/graphql-api). These queries can be used locally or in The Graph Explorer playground.\n\n## Entity Overviews\n\n### Token\n\n- **id**: Token symbol (LUNA-UST)\n- **totalBurned**: Total amount of burned tokens\n- **totalUsersEver**: Total amount of created users that have sent, received or burned tokens\n\n### Transfer\n\n- **id**: Transaction hash\n- **timestamp**: Block timestamp of the event\n- **from**: User that represents the sender of the transaction\n- **to**: User that represents the receiver of the transaction\n- **amount**: Amount in wei sent by the \"from\" User\n\n### User\n\n- **id**: Represents the address of the user\n- **lunaBalance**: Balance of wLUNA tokens in wei\n- **ustBalance**: Balance of wUST tokens in wei\n- **txCount**: Increments by one every time the user makes a transaction\n\n### Approval\n\n- **id**: Transaction hash\n- **owner**: Address of the tokens's owner\n- **spender**: Address of the tokens's spender\n- **amount**: Amount of tokens to approve\n\n### Burn\n\n- **id**: Transaction hash\n- **timestamp**: Block timestamp of the event\n- **burner**: User that reprents the sender of the Burn transaction\n- **amount**: Amount of tokens to be burned\n\n### OwnershipTransferred\n\n- **id**: Transaction hash\n- **previousOwner**: Address of the previous owner\n- **newOwner**: Address of the new owner\n\n## Example Queries\n\n```\n{\n    users(first: 5) {\n        id\n        lunaBalance\n        ustBalance\n        txCount\n    }\n    tokens(first: 2) {\n        id\n        totalBurned\n        totalUsersEver\n    }\n    transfers(first: 10) {\n        id\n        timestamp\n        amount\n        from {\n            id\n            ustBalance\n            lunaBalance\n            txCount\n        }\n        to {\n            id\n            txCount\n            ustBalance\n            lunaBalance\n        }\n    }\n    approvals(first: 5) {\n        id\n        owner\n        spender\n        amount\n    }\n    burns(first: 5) {\n        id\n        timestamp\n        burner\n        amount\n    }\n    ownershipTransferreds(first: 5) {\n        id\n        previousOwner\n        newOwner\n    }\n}\n```\n\n## Change Log\n\nSee [Changelog](CHANGELOG.md) for more information.\n\n## Contributing\n\nContributions welcome! See [Contributing](CONTRIBUTING.md).\n\n## Collaborators\n\n- [**Fernando Sirni**](https://github.com/fersirni)\n- [**Jose Ramirez**](https://github.com/0xslipk)\n\n## License\n\nLicensed under the MIT - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockcoders%2Fterra-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockcoders%2Fterra-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockcoders%2Fterra-subgraph/lists"}