-
Notifications
You must be signed in to change notification settings - Fork 10
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
Account Balance Tracking #17
Comments
I think we might be able to listen for the I did some brief querying to see what kinds of messages correspond to these events and there seems to be a variety. Here's the query I used: query coinReceivedEvents {
events(
first: 10
filter: {
type: { equalTo: "coin_received" }
transaction: {
messages: {
some: {
typeUrl: {
notIn: [
"/cosmos.bank.v1beta1.MsgSend"
"/cosmos.bank.v1beta1.MsgMultiSend"
]
}
}
}
}
}
) {
nodes {
#id
type
#attributes
transaction {
messages {
nodes {
typeUrl
json
}
}
}
}
}
}
query coinSpentEvents {
events(
first: 10
filter: {
type: { equalTo: "coin_spent" }
transaction: {
messages: {
some: {
typeUrl: {
notIn: [
"/cosmos.bank.v1beta1.MsgSend"
"/cosmos.bank.v1beta1.MsgMultiSend"
]
}
}
}
}
}
) {
nodes {
#id
type
#attributes
transaction {
messages {
nodes {
typeUrl
json
}
}
}
}
}
}
|
I think we will need to process the genesis for the respective network to get the starting point which we can use together with the accumulated offset to calculate current balances. |
Acceptance Criteria
To add the ability for a user to query a specific address account balance. For the first version of this task only native balances should be captured.
Below is an illustrative schema for the problem
Potential strategy
Create
updateNativeBalance
function:to all cases where balances may changein handlers forcoin_spent
andcoin_received
eventsIterate to increase coverage of balance changesBlocked on
The text was updated successfully, but these errors were encountered: