Comments (2)
I think we might be able to listen for the coin_spent
and coin_received
events from the bank module for this.
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
}
}
}
}
}
}
from ledger-subquery.
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.
from ledger-subquery.
Related Issues (20)
- Improve event filtering support
- Unexpected behavior in mainnet preview environment HOT 1
- Feature request: graphql API observability HOT 1
- Custom Promethues exporter for subquery Observability stack
- Feature request: Replace contract string fields with relationships
- CI Postgres plv8 image hosting
- Bug report: test_filtered_query function producing unwanted tests
- Set concrete CosmPy version
- Feature request: ExecuteContractMessage relates to Event HOT 1
- Bug report: flickering tests
- Exclude locally built files (in `subql/.yarn` folder) from Docker image (api.Dockerfile) HOT 1
- Remove uAgents as subrepo
- Add missing properties to cosmos block header HOT 2
- Bug report: Getting latest transactions is painfully slow HOT 1
- Genesis Processing: Integrating v2 processing
- Deploy 0.4 to preview environments
- Deploy 0.5 preview environments
- Bug report: Out of memory when fetching aggregates with most recent contract transactions
- Bug report: CW20 indexing also indexes NFTs
- Bug report: Contract binaries not downloaded with 'unittest discover' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ledger-subquery.