Terra is a public blockchain protocol deploying a suite of algorithmic decentralized stablecoins.
This 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.
Make sure to update package.json settings to point to your own graph account.
Below 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. These queries can be used locally or in The Graph Explorer playground.
- id: Token symbol (LUNA-UST)
- totalBurned: Total amount of burned tokens
- totalUsersEver: Total amount of created users that have sent, received or burned tokens
- id: Transaction hash
- timestamp: Block timestamp of the event
- from: User that represents the sender of the transaction
- to: User that represents the receiver of the transaction
- amount: Amount in wei sent by the "from" User
- id: Represents the address of the user
- lunaBalance: Balance of wLUNA tokens in wei
- ustBalance: Balance of wUST tokens in wei
- txCount: Increments by one every time the user makes a transaction
- id: Transaction hash
- owner: Address of the tokens's owner
- spender: Address of the tokens's spender
- amount: Amount of tokens to approve
- id: Transaction hash
- timestamp: Block timestamp of the event
- burner: User that reprents the sender of the Burn transaction
- amount: Amount of tokens to be burned
- id: Transaction hash
- previousOwner: Address of the previous owner
- newOwner: Address of the new owner
{
users(first: 5) {
id
lunaBalance
ustBalance
txCount
}
tokens(first: 2) {
id
totalBurned
totalUsersEver
}
transfers(first: 10) {
id
timestamp
amount
from {
id
ustBalance
lunaBalance
txCount
}
to {
id
txCount
ustBalance
lunaBalance
}
}
approvals(first: 5) {
id
owner
spender
amount
}
burns(first: 5) {
id
timestamp
burner
amount
}
ownershipTransferreds(first: 5) {
id
previousOwner
newOwner
}
}
See Changelog for more information.
Contributions welcome! See Contributing.
Licensed under the MIT - see the LICENSE file for details.