Skip to content

Commit 69f4c6f

Browse files
authored
fix scroll graph url and positions and assets query (DefiLlama#15384)
1 parent 76ab253 commit 69f4c6f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

projects/contango-v2/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async function vaultTvl(api, contango, graphUrl) {
134134
const assets = await cachedGraphQuery(cacheKey, graphUrl, graphQueries.asset, {
135135
api,
136136
useBlock: true,
137-
fetchById: true,
137+
fetchById: false,
138138
safeBlockLimit: 3000,
139139
})
140140

@@ -150,13 +150,13 @@ const abis = {
150150

151151
const graphQueries = {
152152
position: `
153-
query MyQuery($lastId: ID, $block: Int) {
153+
query MyQuery($lastId: BigInt, $block: Int) {
154154
positions(
155155
block: {number: $block}
156-
where: {and: [{id_gt: $lastId}, {quantity_not: "0"}]}
157-
first: 1000
156+
where: {and: [{number_gt: $lastId}, {quantity_not: "0"}]}
157+
first: 10000
158158
) {
159-
id
159+
id: number
160160
instrument {
161161
base {
162162
id
@@ -168,8 +168,8 @@ query MyQuery($lastId: ID, $block: Int) {
168168
}
169169
}`,
170170
asset: `
171-
query MyQuery($lastId: ID, $block: Int) {
172-
assets(block: {number: $block}, where: {id_gt: $lastId} first: 1000) {
171+
query MyQuery($block: Int) {
172+
assets(block: {number: $block}, first: 10000) {
173173
id
174174
}
175175
}`,

0 commit comments

Comments
 (0)