Subgraph Documentation
Sample Queries
Getting Started
Transactions
Subgraph Documentation
Subgraph Documentation
Sample Queries
Return Organization Data Based on EIN
{
ndaoEntities(where: { ein: "844661797"}) {
contractAddress:id
ein
totalEthReceived
entityManager
recognizedUsdcBalance
totalUsdcDonationsReceived
totalUsdcDonationFees
totalUsdcGrantsReceived
}
}
returns
returns
{
"data": {
"ndaoEntities": [
{
"contractAddress": "0x7ecc1d4936a973ec3b153c0c713e0f71c59abf53",
"ein": "844661797",
"totalEthReceived": "1000000000000000",
"entityManager": "0x0000000000000000000000000000000000000000",
"recognizedUsdcBalance": "15462642",
"totalUsdcDonationsReceived": "15462642",
"totalUsdcDonationFees": "235471",
"totalUsdcGrantsReceived": "205499497500"
}
]
}
}
Return Largest Endaoment Grantors
query biggestGrantors {
ndaoEntities (
orderBy: totalUsdcGrantedOut, orderDirection: desc, first: 5
) {
contractAddress:id
entityManager
totalUsdcReceived
totalUsdcGrantedOut
totalUsdcGrantedOutFees
}
}
returns
returns
{
"data": {
"ndaoEntities": [
{
"contractAddress": "0x244064a29c0a18dfbc387a9aebc76d425a59aa07",
"entityManager": "0x5755f00aa02a07ac8a0727ac09042e6750759e1a",
"totalUsdcReceived": "5851629709493",
"totalUsdcGrantedOut": "1000098990000",
"totalUsdcGrantedOutFees": "10102010000"
},
{
"contractAddress": "0x14dc37374aff6e1748451a5ab7f01d865b98214a",
"entityManager": "0x3e5f2a9c096499c1e90eef78790ad604a8619d88",
"totalUsdcReceived": "4520128047641",
"totalUsdcGrantedOut": "260003700000",
"totalUsdcGrantedOutFees": "2626300000"
},
{
"contractAddress": "0xe3377e1e45af99fef4c1c31aa242c09710415634",
"entityManager": "0x9f4633b29e89e10c869c8ce2197c63df06eb5355",
"totalUsdcReceived": "209032316433",
"totalUsdcGrantedOut": "206941986900",
"totalUsdcGrantedOutFees": "2090323100"
},
{
"contractAddress": "0x8fa2d80045c00cff6d83189c978c879da80e4e06",
"entityManager": "0x2c4b47668ea298ef4ef98956774ea590e130cefa",
"totalUsdcReceived": "2034484308842",
"totalUsdcGrantedOut": "198000000000",
"totalUsdcGrantedOutFees": "2000000000"
},
{
"contractAddress": "0xa78bfb0e4c75deda7514aff31808b34b0f355654",
"entityManager": "0x1b97ebfa8f9600840e08861459f6ccd25a95b8f5",
"totalUsdcReceived": "370640375734",
"totalUsdcGrantedOut": "99000000000",
"totalUsdcGrantedOutFees": "1000000000"
}
]
}
Return Summary of Endaoment Registry
query registrySummary {
registries {
entityFactories
swapWrappers
portfolios
address
owner
}
}
returns
returns
{
"data": {
"registries": [
{
"entityFactories": [
"0x10fd9348136dcea154f752fe0b6db45fc298a589"
],
"swapWrappers": [
"0xdf01af7e93453c081408921742043df8c8f8c039"
],
"portfolios": [
"0x7d7013c1e786c787a9aa6bdb8e9885dd4ee94bb8",
"0x1496c8eb81b8b7bbb15507837418135070bd95d0",
"0x9c73f76d6f4aee8ea62f77442b8c27702e5d25d0"
],
"address": "0x94106ca9c7e567109a1d39413052887d1f412183",
"owner": "0xd7d78cf2f7c5a1b2e44080814d2f54a41a151a37"
}
]
}
Return Summary of Portfolio Position
{
portfolioPosition(
id: "0x1496c8eb81b8b7bbb15507837418135070bd95d0|0x8fa2d80045c00cff6d83189c978c879da80e4e06"
) {
shares
portfolio
investedUsdc
entity {
id
}
}
}
returns
returns
{
"data": {
"portfolioPosition": {
"shares": "999999797327",
"portfolio": "0x1496c8eb81b8b7bbb15507837418135070bd95d0",
"investedUsdc": "1002506247814",
"entity": {
"id": "0x8fa2d80045c00cff6d83189c978c879da80e4e06"
}
}
}
}