diff --git a/projects/sdk/src/lib/silo.ts b/projects/sdk/src/lib/silo.ts index 7a01d6fa49..f8f5016139 100644 --- a/projects/sdk/src/lib/silo.ts +++ b/projects/sdk/src/lib/silo.ts @@ -11,7 +11,12 @@ import { MAX_UINT256 } from "src/constants"; import { DepositBuilder } from "./silo/DepositBuilder"; import { DepositOperation } from "./silo/DepositOperation"; import { Withdraw } from "./silo/Withdraw"; -import { Deposit, TokenSiloBalance, DepositTokenPermitMessage, DepositTokensPermitMessage } from "./silo/types"; +import { + Deposit, + TokenSiloBalance, + DepositTokenPermitMessage, + DepositTokensPermitMessage +} from "./silo/types"; import { Transfer } from "./silo/Transfer"; import { Convert, ConvertDetails } from "./silo/Convert"; @@ -62,7 +67,9 @@ export class Silo { console.warn("Optimization: use `mow()` instead of `mowMultiple()` for a single token"); } - const notWhitelisted = _tokens.find((token) => Silo.sdk.tokens.isWhitelisted(token) === false); + const notWhitelisted = _tokens.find( + (token) => Silo.sdk.tokens.isWhitelisted(token) === false + ); if (notWhitelisted) throw new Error(`${notWhitelisted.symbol} is not whitelisted`); addrs = _tokens.map((t) => t.address); @@ -137,7 +144,11 @@ export class Silo { * @param destinationAddress The destination address for the transfer * @returns Promise of Transaction */ - async transfer(token: Token, amount: TokenValue, destinationAddress: string): Promise { + async transfer( + token: Token, + amount: TokenValue, + destinationAddress: string + ): Promise { return this.siloTransfer.transfer(token, amount, destinationAddress); } @@ -157,7 +168,13 @@ export class Silo { * @param fromAmount Amount to convert * @returns Promise of Transaction */ - async convert(fromToken: Token, toToken: Token, fromAmount: TokenValue, slippage: number = 0.1, overrides: PayableOverrides = {}) { + async convert( + fromToken: Token, + toToken: Token, + fromAmount: TokenValue, + slippage: number = 0.1, + overrides: PayableOverrides = {} + ) { return this.siloConvert.convert(fromToken, toToken, fromAmount, slippage, overrides); } @@ -194,7 +211,8 @@ export class Silo { Silo.sdk.contracts.beanstalk.getGerminatingStem(_token.address) ]); - if (!Silo.sdk.tokens.siloWhitelist.has(_token)) throw new Error(`${_token.address} is not whitelisted in the Silo`); + if (!Silo.sdk.tokens.siloWhitelist.has(_token)) + throw new Error(`${_token.address} is not whitelisted in the Silo`); /// SETUP const balance: TokenSiloBalance = utils.makeTokenSiloBalance(); @@ -237,9 +255,9 @@ export class Silo { deposited.forEach((deposit) => utils.applyDeposit(balance, _token, stemTip, { - stem: deposit.season, // FIXME - amount: deposit.amount, - bdv: deposit.bdv, + stem: deposit.stem, // FIXME + amount: deposit.depositedAmount, + bdv: deposit.depositedBDV, germinatingStem }) ); @@ -315,7 +333,7 @@ export class Silo { bdv: deposits[stem].bdv, germinatingStem }); - }; + } } utils.sortCrates(balance); @@ -353,14 +371,14 @@ export class Silo { if (!stemTip) throw new Error(`No stem tip found for ${token.address}`); // Filter dust crates - should help with crate balance too low errors - if (BigNumber.from(deposit.amount).toString() !== "1") { + if (BigNumber.from(deposit.depositedAmount).toString() !== "1") { utils.applyDeposit(balance, token, stemTip, { stem: deposit.stem || deposit.season, - amount: deposit.amount, - bdv: deposit.bdv, + amount: deposit.depositedAmount, + bdv: deposit.depositedBDV, germinatingStem }); - }; + } }); return utils.sortTokenMapByWhitelist(Silo.sdk.tokens.siloWhitelist, balances); @@ -395,7 +413,9 @@ export class Silo { */ async getStalk(_account?: string) { const account = await Silo.sdk.getAccount(_account); - return Silo.sdk.contracts.beanstalk.balanceOfStalk(account).then((v) => Silo.sdk.tokens.STALK.fromBlockchain(v)); + return Silo.sdk.contracts.beanstalk + .balanceOfStalk(account) + .then((v) => Silo.sdk.tokens.STALK.fromBlockchain(v)); } /** @@ -405,7 +425,9 @@ export class Silo { */ async getSeeds(_account?: string) { const account = await Silo.sdk.getAccount(_account); - return Silo.sdk.contracts.beanstalk.balanceOfLegacySeeds(account).then((v) => Silo.sdk.tokens.SEEDS.fromBlockchain(v)); + return Silo.sdk.contracts.beanstalk + .balanceOfLegacySeeds(account) + .then((v) => Silo.sdk.tokens.SEEDS.fromBlockchain(v)); } /** @@ -416,7 +438,9 @@ export class Silo { */ async getEarnedBeans(_account?: string) { const account = await Silo.sdk.getAccount(_account); - return Silo.sdk.contracts.beanstalk.balanceOfEarnedBeans(account).then((v) => Silo.sdk.tokens.BEAN.fromBlockchain(v)); + return Silo.sdk.contracts.beanstalk + .balanceOfEarnedBeans(account) + .then((v) => Silo.sdk.tokens.BEAN.fromBlockchain(v)); } /** @@ -424,7 +448,9 @@ export class Silo { */ async getEarnedStalk(_account?: string) { const account = await Silo.sdk.getAccount(_account); - return Silo.sdk.contracts.beanstalk.balanceOfEarnedStalk(account).then((v) => Silo.sdk.tokens.STALK.fromBlockchain(v)); + return Silo.sdk.contracts.beanstalk + .balanceOfEarnedStalk(account) + .then((v) => Silo.sdk.tokens.STALK.fromBlockchain(v)); } /** @@ -470,9 +496,9 @@ export class Silo { * TODO: Check if whitelisted? */ async getStemTips(tokens: Token[]) { - return Promise.all(tokens.map((token) => this.getStemTip(token).then((tip) => [token.address, tip] as const))).then( - (tips) => new Map(tips) - ); + return Promise.all( + tokens.map((token) => this.getStemTip(token).then((tip) => [token.address, tip] as const)) + ).then((tips) => new Map(tips)); } /** @@ -502,7 +528,8 @@ export class Silo { const deadline = _deadline || MAX_UINT256; const [domain, nonce] = await Promise.all([ permitUtils.getEIP712Domain(), - _nonce || Silo.sdk.contracts.beanstalk.depositPermitNonces(owner).then((nonce) => nonce.toString()) + _nonce || + Silo.sdk.contracts.beanstalk.depositPermitNonces(owner).then((nonce) => nonce.toString()) ]); return permitUtils.createTypedDepositTokenPermitData(domain, { @@ -540,13 +567,16 @@ export class Silo { _nonce?: string, _deadline?: string ): Promise> { - if (tokens.length !== values.length) throw new Error("Input mismatch: number of tokens does not equal number of values"); - if (tokens.length === 1) console.warn("Optimization: use permitDepositToken when permitting one Silo Token."); + if (tokens.length !== values.length) + throw new Error("Input mismatch: number of tokens does not equal number of values"); + if (tokens.length === 1) + console.warn("Optimization: use permitDepositToken when permitting one Silo Token."); const deadline = _deadline || MAX_UINT256; const [domain, nonce] = await Promise.all([ permitUtils.getEIP712Domain(), - _nonce || Silo.sdk.contracts.beanstalk.depositPermitNonces(owner).then((nonce) => nonce.toString()) + _nonce || + Silo.sdk.contracts.beanstalk.depositPermitNonces(owner).then((nonce) => nonce.toString()) ]); return permitUtils.createTypedDepositTokensPermitData(domain, { diff --git a/projects/sdk/src/queries/silo/getSiloBalance.graphql b/projects/sdk/src/queries/silo/getSiloBalance.graphql index 51404c3692..816db83579 100644 --- a/projects/sdk/src/queries/silo/getSiloBalance.graphql +++ b/projects/sdk/src/queries/silo/getSiloBalance.graphql @@ -4,18 +4,14 @@ query getSiloBalance($token: String, $account: ID!, $season: Int!) { deposited: deposits( orderBy: season orderDirection: asc - where: { - token: $token - #amount_gt: 0 - amount_gt: 0 - } + where: { token: $token, depositedAmount_gt: 0 } ) { season stem token #amount - amount - bdv + depositedAmount + depositedBDV } # Withdrawn withdrawn: withdraws( diff --git a/projects/sdk/src/queries/silo/getSiloBalances.graphql b/projects/sdk/src/queries/silo/getSiloBalances.graphql index 0a399271d2..83be5652c0 100644 --- a/projects/sdk/src/queries/silo/getSiloBalances.graphql +++ b/projects/sdk/src/queries/silo/getSiloBalances.graphql @@ -1,29 +1,30 @@ query getSiloBalances($account: ID!, $season: Int!) { farmer(id: $account) { # Deposited - deposited: deposits( - orderBy: season - orderDirection: asc - where: { - #amount_gt: 0 - amount_gt: 0 - } - ) { + deposited: deposits(orderBy: season, orderDirection: asc, where: { depositedAmount_gt: 0 }) { season stem token #amount - amount - bdv + depositedAmount + depositedBDV } # Withdrawn - withdrawn: withdraws(orderBy: withdrawSeason, orderDirection: asc, where: { claimableSeason_gt: $season, claimed: false }) { + withdrawn: withdraws( + orderBy: withdrawSeason + orderDirection: asc + where: { claimableSeason_gt: $season, claimed: false } + ) { season: withdrawSeason token amount } # Claimable - claimable: withdraws(orderBy: withdrawSeason, orderDirection: asc, where: { claimableSeason_lte: $season, claimed: false }) { + claimable: withdraws( + orderBy: withdrawSeason + orderDirection: asc + where: { claimableSeason_lte: $season, claimed: false } + ) { season: withdrawSeason token amount diff --git a/projects/sdk/src/queries/silo/getSiloWhitelist.graphql b/projects/sdk/src/queries/silo/getSiloWhitelist.graphql deleted file mode 100644 index 2d17493c2b..0000000000 --- a/projects/sdk/src/queries/silo/getSiloWhitelist.graphql +++ /dev/null @@ -1,7 +0,0 @@ -query getSiloWhitelist { - whitelistTokens { - token - stalk - seeds - } -} diff --git a/projects/ui/src/graph/graphql.schema.json b/projects/ui/src/graph/graphql.schema.json index 94333f469b..c31d22b43c 100644 --- a/projects/ui/src/graph/graphql.schema.json +++ b/projects/ui/src/graph/graphql.schema.json @@ -114676,6 +114676,176 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "version", + "description": null, + "args": [ + { + "name": "block", + "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "type": { + "kind": "INPUT_OBJECT", + "name": "Block_height", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subgraphError", + "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "_SubgraphErrorPolicy_", + "ofType": null + } + }, + "defaultValue": "deny", + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Version", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "versions", + "description": null, + "args": [ + { + "name": "block", + "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "type": { + "kind": "INPUT_OBJECT", + "name": "Block_height", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": "100", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderBy", + "description": null, + "type": { + "kind": "ENUM", + "name": "Version_orderBy", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderDirection", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "skip", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": "0", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subgraphError", + "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "_SubgraphErrorPolicy_", + "ofType": null + } + }, + "defaultValue": "deny", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "Version_filter", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Version", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "vote", "description": null, @@ -149184,6 +149354,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "network", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "space", "description": null, @@ -160198,7 +160380,7 @@ "deprecationReason": null }, { - "name": "wellOracle", + "name": "version", "description": null, "args": [ { @@ -160248,14 +160430,14 @@ ], "type": { "kind": "OBJECT", - "name": "WellOracle", + "name": "Version", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "wellOracles", + "name": "versions", "description": null, "args": [ { @@ -160287,7 +160469,7 @@ "description": null, "type": { "kind": "ENUM", - "name": "WellOracle_orderBy", + "name": "Version_orderBy", "ofType": null }, "defaultValue": null, @@ -160339,7 +160521,7 @@ "description": null, "type": { "kind": "INPUT_OBJECT", - "name": "WellOracle_filter", + "name": "Version_filter", "ofType": null }, "defaultValue": null, @@ -160358,7 +160540,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "WellOracle", + "name": "Version", "ofType": null } } @@ -160368,7 +160550,7 @@ "deprecationReason": null }, { - "name": "whitelistToken", + "name": "wellOracle", "description": null, "args": [ { @@ -160418,14 +160600,184 @@ ], "type": { "kind": "OBJECT", - "name": "WhitelistToken", + "name": "WellOracle", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "whitelistTokenDailySnapshot", + "name": "wellOracles", + "description": null, + "args": [ + { + "name": "block", + "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "type": { + "kind": "INPUT_OBJECT", + "name": "Block_height", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": "100", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderBy", + "description": null, + "type": { + "kind": "ENUM", + "name": "WellOracle_orderBy", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderDirection", + "description": null, + "type": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "skip", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": "0", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subgraphError", + "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "_SubgraphErrorPolicy_", + "ofType": null + } + }, + "defaultValue": "deny", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "WellOracle_filter", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "WellOracle", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "whitelistToken", + "description": null, + "args": [ + { + "name": "block", + "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "type": { + "kind": "INPUT_OBJECT", + "name": "Block_height", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subgraphError", + "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "_SubgraphErrorPolicy_", + "ofType": null + } + }, + "defaultValue": "deny", + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "WhitelistToken", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "whitelistTokenDailySnapshot", "description": null, "args": [ { @@ -165125,87 +165477,1101 @@ "deprecationReason": null }, { - "name": "priceCumulativeLast_not", + "name": "priceCumulativeLast_not", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeLast_not_contains", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeLast_not_contains_nocase", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun_contains", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun_contains_nocase", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun_not", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun_not_contains", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun_not_contains_nocase", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "BigInt", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TwaOracle_orderBy", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "cumulativeWellReserves", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cumulativeWellReservesBlock", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cumulativeWellReservesPrev", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cumulativeWellReservesPrevBlock", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cumulativeWellReservesPrevTime", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cumulativeWellReservesTime", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastBalances", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastSun", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastUpdated", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__crosses", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__deltaBeans", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__id", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__lastCross", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__lastPrice", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__lastSeason", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__liquidityUSD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__volume", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pool__volumeUSD", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeLast", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "priceCumulativeSun", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "User", + "description": null, + "fields": [ + { + "name": "about", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "avatar", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "cover", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "farcaster", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "github", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ipfs", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastVote", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lens", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposalsCount", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "twitter", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "votesCount", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UsersWhere", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "created", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created_gt", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created_gte", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created_lt", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "created_lte", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ipfs", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ipfs_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Validation", + "description": null, + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "params", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Any", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Version", + "description": null, + "fields": [ + { + "name": "chain", + "description": "Which blockchain is being indexed, i.e. 'ethereum', 'arbitrum', etc.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "= 'subgraph'", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subgraphName", + "description": "= 'beanstalk'", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "versionNumber", + "description": "Verison number of the subgraph", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "Version_filter", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "_change_block", + "description": "Filter for the block changed event.", + "type": { + "kind": "INPUT_OBJECT", + "name": "BlockChangedFilter", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "and", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "Version_filter", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_contains", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_contains_nocase", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_ends_with", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_ends_with_nocase", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_gt", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_gte", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_lt", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_lte", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_contains", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_contains_nocase", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_ends_with", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_ends_with_nocase", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_starts_with", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_not_starts_with_nocase", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_starts_with", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "chain_starts_with_nocase", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeLast_not_contains", + "name": "id", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeLast_not_contains_nocase", + "name": "id_gt", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeSun", + "name": "id_gte", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeSun_contains", + "name": "id_in", "description": null, "type": { "kind": "LIST", @@ -165215,7 +166581,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "BigInt", + "name": "ID", "ofType": null } } @@ -165225,67 +166591,43 @@ "deprecationReason": null }, { - "name": "priceCumulativeSun_contains_nocase", + "name": "id_lt", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeSun_not", + "name": "id_lte", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeSun_not_contains", + "name": "id_not", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeSun_not_contains_nocase", + "name": "id_not_in", "description": null, "type": { "kind": "LIST", @@ -165295,7 +166637,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "BigInt", + "name": "ID", "ofType": null } } @@ -165303,350 +166645,413 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "TwaOracle_orderBy", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "cumulativeWellReserves", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "cumulativeWellReservesBlock", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "cumulativeWellReservesPrev", - "description": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "cumulativeWellReservesPrevBlock", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "cumulativeWellReservesPrevTime", + "name": "or", "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "Version_filter", + "ofType": null + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "cumulativeWellReservesTime", + "name": "subgraphName", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "subgraphName_contains", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastBalances", + "name": "subgraphName_contains_nocase", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastSun", + "name": "subgraphName_ends_with", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastUpdated", + "name": "subgraphName_ends_with_nocase", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool", + "name": "subgraphName_gt", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__crosses", + "name": "subgraphName_gte", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__deltaBeans", + "name": "subgraphName_in", "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__id", + "name": "subgraphName_lt", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__lastCross", + "name": "subgraphName_lte", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__lastPrice", + "name": "subgraphName_not", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__lastSeason", + "name": "subgraphName_not_contains", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__liquidityUSD", + "name": "subgraphName_not_contains_nocase", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__volume", + "name": "subgraphName_not_ends_with", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "pool__volumeUSD", + "name": "subgraphName_not_ends_with_nocase", "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeLast", + "name": "subgraphName_not_in", "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "priceCumulativeSun", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "User", - "description": null, - "fields": [ - { - "name": "about", + "name": "subgraphName_not_starts_with", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "avatar", + "name": "subgraphName_not_starts_with_nocase", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "cover", + "name": "subgraphName_starts_with", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "created", + "name": "subgraphName_starts_with_nocase", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "farcaster", + "name": "versionNumber", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "github", + "name": "versionNumber_contains", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "versionNumber_contains_nocase", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "ipfs", + "name": "versionNumber_ends_with", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastVote", + "name": "versionNumber_ends_with_nocase", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lens", + "name": "versionNumber_gt", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "versionNumber_gte", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "proposalsCount", + "name": "versionNumber_in", "description": null, - "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "twitter", + "name": "versionNumber_lt", "description": null, - "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "votesCount", + "name": "versionNumber_lte", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UsersWhere", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "created", + "name": "versionNumber_not", "description": null, "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "defaultValue": null, @@ -165654,11 +167059,11 @@ "deprecationReason": null }, { - "name": "created_gt", + "name": "versionNumber_not_contains", "description": null, "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "defaultValue": null, @@ -165666,11 +167071,11 @@ "deprecationReason": null }, { - "name": "created_gte", + "name": "versionNumber_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "defaultValue": null, @@ -165678,27 +167083,23 @@ "deprecationReason": null }, { - "name": "created_in", + "name": "versionNumber_not_ends_with", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "created_lt", + "name": "versionNumber_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "defaultValue": null, @@ -165706,19 +167107,27 @@ "deprecationReason": null }, { - "name": "created_lte", + "name": "versionNumber_not_in", "description": null, "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "versionNumber_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -165730,23 +167139,19 @@ "deprecationReason": null }, { - "name": "id_in", + "name": "versionNumber_not_starts_with_nocase", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "ipfs", + "name": "versionNumber_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -165758,16 +167163,12 @@ "deprecationReason": null }, { - "name": "ipfs_in", + "name": "versionNumber_starts_with_nocase", "description": null, "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -165779,42 +167180,38 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "Validation", + "kind": "ENUM", + "name": "Version_orderBy", "description": null, - "fields": [ + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "name", + "name": "chain", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "params", + "name": "id", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subgraphName", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "versionNumber", "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Any", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], - "enumValues": null, "possibleTypes": null }, { @@ -177174,9 +178571,7 @@ "name": "derivedFrom", "description": "creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API.", "isRepeatable": false, - "locations": [ - "FIELD_DEFINITION" - ], + "locations": ["FIELD_DEFINITION"], "args": [ { "name": "field", @@ -177200,20 +178595,14 @@ "name": "entity", "description": "Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive.", "isRepeatable": false, - "locations": [ - "OBJECT" - ], + "locations": ["OBJECT"], "args": [] }, { "name": "include", "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { "name": "if", @@ -177237,11 +178626,7 @@ "name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", "isRepeatable": false, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { "name": "if", @@ -177265,9 +178650,7 @@ "name": "specifiedBy", "description": "Exposes a URL that specifies the behavior of this scalar.", "isRepeatable": false, - "locations": [ - "SCALAR" - ], + "locations": ["SCALAR"], "args": [ { "name": "url", @@ -177291,9 +178674,7 @@ "name": "subgraphId", "description": "Defined a Subgraph ID for an object type", "isRepeatable": false, - "locations": [ - "OBJECT" - ], + "locations": ["OBJECT"], "args": [ { "name": "id", @@ -177315,4 +178696,4 @@ } ] } -} \ No newline at end of file +} diff --git a/projects/ui/src/graph/schema-bean.graphql b/projects/ui/src/graph/schema-bean.graphql index ad31615352..7eab355036 100644 --- a/projects/ui/src/graph/schema-bean.graphql +++ b/projects/ui/src/graph/schema-bean.graphql @@ -2186,6 +2186,34 @@ type Query { subgraphError: _SubgraphErrorPolicy_! = deny where: TwaOracle_filter ): [TwaOracle!]! + version( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Version + versions( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + first: Int = 100 + orderBy: Version_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Version_filter + ): [Version!]! } type Subscription { @@ -2471,6 +2499,34 @@ type Subscription { subgraphError: _SubgraphErrorPolicy_! = deny where: TwaOracle_filter ): [TwaOracle!]! + version( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Version + versions( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + first: Int = 100 + orderBy: Version_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Version_filter + ): [Version!]! } "A string representation of microseconds UNIX timestamp (16 digits)\n" @@ -2713,6 +2769,102 @@ enum TwaOracle_orderBy { priceCumulativeSun } +type Version { + """Which blockchain is being indexed, i.e. 'ethereum', 'arbitrum', etc.""" + chain: String! + + """= 'subgraph'""" + id: ID! + + """= 'beanstalk'""" + subgraphName: String! + + """Verison number of the subgraph""" + versionNumber: String! +} + +input Version_filter { + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Version_filter] + chain: String + chain_contains: String + chain_contains_nocase: String + chain_ends_with: String + chain_ends_with_nocase: String + chain_gt: String + chain_gte: String + chain_in: [String!] + chain_lt: String + chain_lte: String + chain_not: String + chain_not_contains: String + chain_not_contains_nocase: String + chain_not_ends_with: String + chain_not_ends_with_nocase: String + chain_not_in: [String!] + chain_not_starts_with: String + chain_not_starts_with_nocase: String + chain_starts_with: String + chain_starts_with_nocase: String + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + or: [Version_filter] + subgraphName: String + subgraphName_contains: String + subgraphName_contains_nocase: String + subgraphName_ends_with: String + subgraphName_ends_with_nocase: String + subgraphName_gt: String + subgraphName_gte: String + subgraphName_in: [String!] + subgraphName_lt: String + subgraphName_lte: String + subgraphName_not: String + subgraphName_not_contains: String + subgraphName_not_contains_nocase: String + subgraphName_not_ends_with: String + subgraphName_not_ends_with_nocase: String + subgraphName_not_in: [String!] + subgraphName_not_starts_with: String + subgraphName_not_starts_with_nocase: String + subgraphName_starts_with: String + subgraphName_starts_with_nocase: String + versionNumber: String + versionNumber_contains: String + versionNumber_contains_nocase: String + versionNumber_ends_with: String + versionNumber_ends_with_nocase: String + versionNumber_gt: String + versionNumber_gte: String + versionNumber_in: [String!] + versionNumber_lt: String + versionNumber_lte: String + versionNumber_not: String + versionNumber_not_contains: String + versionNumber_not_contains_nocase: String + versionNumber_not_ends_with: String + versionNumber_not_ends_with_nocase: String + versionNumber_not_in: [String!] + versionNumber_not_starts_with: String + versionNumber_not_starts_with_nocase: String + versionNumber_starts_with: String + versionNumber_starts_with_nocase: String +} + +enum Version_orderBy { + chain + id + subgraphName + versionNumber +} + type _Block_ { """The hash of the block""" hash: Bytes diff --git a/projects/ui/src/graph/schema-beanft.graphql b/projects/ui/src/graph/schema-beanft.graphql index 881561451e..c7eb244532 100644 --- a/projects/ui/src/graph/schema-beanft.graphql +++ b/projects/ui/src/graph/schema-beanft.graphql @@ -186,6 +186,34 @@ type Query { subgraphError: _SubgraphErrorPolicy_! = deny where: CollectionData_filter ): [CollectionData!]! + version( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Version + versions( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + first: Int = 100 + orderBy: Version_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Version_filter + ): [Version!]! } type Subscription { @@ -247,11 +275,135 @@ type Subscription { subgraphError: _SubgraphErrorPolicy_! = deny where: CollectionData_filter ): [CollectionData!]! + version( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + id: ID! + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Version + versions( + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + first: Int = 100 + orderBy: Version_orderBy + orderDirection: OrderDirection + skip: Int = 0 + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + where: Version_filter + ): [Version!]! } "A string representation of microseconds UNIX timestamp (16 digits)\n" scalar Timestamp +type Version { + """Which blockchain is being indexed, i.e. 'ethereum', 'arbitrum', etc.""" + chain: String! + + """= 'subgraph'""" + id: ID! + + """= 'beanstalk'""" + subgraphName: String! + + """Verison number of the subgraph""" + versionNumber: String! +} + +input Version_filter { + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Version_filter] + chain: String + chain_contains: String + chain_contains_nocase: String + chain_ends_with: String + chain_ends_with_nocase: String + chain_gt: String + chain_gte: String + chain_in: [String!] + chain_lt: String + chain_lte: String + chain_not: String + chain_not_contains: String + chain_not_contains_nocase: String + chain_not_ends_with: String + chain_not_ends_with_nocase: String + chain_not_in: [String!] + chain_not_starts_with: String + chain_not_starts_with_nocase: String + chain_starts_with: String + chain_starts_with_nocase: String + id: ID + id_gt: ID + id_gte: ID + id_in: [ID!] + id_lt: ID + id_lte: ID + id_not: ID + id_not_in: [ID!] + or: [Version_filter] + subgraphName: String + subgraphName_contains: String + subgraphName_contains_nocase: String + subgraphName_ends_with: String + subgraphName_ends_with_nocase: String + subgraphName_gt: String + subgraphName_gte: String + subgraphName_in: [String!] + subgraphName_lt: String + subgraphName_lte: String + subgraphName_not: String + subgraphName_not_contains: String + subgraphName_not_contains_nocase: String + subgraphName_not_ends_with: String + subgraphName_not_ends_with_nocase: String + subgraphName_not_in: [String!] + subgraphName_not_starts_with: String + subgraphName_not_starts_with_nocase: String + subgraphName_starts_with: String + subgraphName_starts_with_nocase: String + versionNumber: String + versionNumber_contains: String + versionNumber_contains_nocase: String + versionNumber_ends_with: String + versionNumber_ends_with_nocase: String + versionNumber_gt: String + versionNumber_gte: String + versionNumber_in: [String!] + versionNumber_lt: String + versionNumber_lte: String + versionNumber_not: String + versionNumber_not_contains: String + versionNumber_not_contains_nocase: String + versionNumber_not_ends_with: String + versionNumber_not_ends_with_nocase: String + versionNumber_not_in: [String!] + versionNumber_not_starts_with: String + versionNumber_not_starts_with_nocase: String + versionNumber_starts_with: String + versionNumber_starts_with_nocase: String +} + +enum Version_orderBy { + chain + id + subgraphName + versionNumber +} + type _Block_ { """The hash of the block""" hash: Bytes diff --git a/projects/ui/src/graph/schema-snapshot1.graphql b/projects/ui/src/graph/schema-snapshot1.graphql index 4713b25db3..3ac84a2df7 100644 --- a/projects/ui/src/graph/schema-snapshot1.graphql +++ b/projects/ui/src/graph/schema-snapshot1.graphql @@ -393,6 +393,7 @@ input StatementsWhere { id_in: [String] ipfs: String ipfs_in: [String] + network: String space: String space_in: [String] } diff --git a/projects/ui/src/hooks/beanstalk/useDataFeedTokenPrices.ts b/projects/ui/src/hooks/beanstalk/useDataFeedTokenPrices.ts index cd85c78910..5d914ec5b1 100644 --- a/projects/ui/src/hooks/beanstalk/useDataFeedTokenPrices.ts +++ b/projects/ui/src/hooks/beanstalk/useDataFeedTokenPrices.ts @@ -86,9 +86,9 @@ export default function useDataFeedTokenPrices() { usdcPriceFeed.latestRoundData(), usdcPriceFeed.decimals(), usdOracle.getEthUsdPrice(), - usdOracle.getEthUsdTwap(0), + usdOracle.getEthUsdTwap(3600), usdOracle.getWstethUsdPrice(), - usdOracle.getWstethUsdTwap(0), + usdOracle.getWstethUsdTwap(3600), crv3Pool.get_virtual_price(), ]); diff --git a/projects/ui/src/util/wagmi/chains.ts b/projects/ui/src/util/wagmi/chains.ts index 0fbb7ef8c0..0eabe529c6 100644 --- a/projects/ui/src/util/wagmi/chains.ts +++ b/projects/ui/src/util/wagmi/chains.ts @@ -1,5 +1,40 @@ import { defineChain } from 'viem'; +// Define our own mainnet instead of using the default from viem b/c +// it defaults to the cloudflare-eth rpc instead of alchemy. +export const mainnet = defineChain({ + id: 1, + name: 'Ethereum', + nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, + rpcUrls: { + default: { + http: [ + `https://eth-mainnet.g.alchemy.com/v2/${import.meta.env.VITE_ALCHEMY_API_KEY}`, + ], + }, + }, + blockExplorers: { + default: { + name: 'Etherscan', + url: 'https://etherscan.io', + apiUrl: 'https://api.etherscan.io/api', + }, + }, + contracts: { + ensRegistry: { + address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', + }, + ensUniversalResolver: { + address: '0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da', + blockCreated: 16773775, + }, + multicall3: { + address: '0xca11bde05977b3631167028862be2a173976ca11', + blockCreated: 14353601, + }, + }, +}); + export const localFork = defineChain({ id: 1337, name: 'localhost:8545', diff --git a/projects/ui/src/util/wagmi/config.ts b/projects/ui/src/util/wagmi/config.ts index 3b0921aaaf..497282b0bc 100644 --- a/projects/ui/src/util/wagmi/config.ts +++ b/projects/ui/src/util/wagmi/config.ts @@ -1,8 +1,7 @@ import { http, createConfig } from 'wagmi'; -import { mainnet } from 'wagmi/chains'; -import { injected, safe, walletConnect } from 'wagmi/connectors'; +import { injected, walletConnect } from 'wagmi/connectors'; import { Chain, type Transport } from 'viem'; -import { localFork } from './chains'; +import { localFork, mainnet } from './chains'; const ALCHEMY_KEY = import.meta.env.VITE_ALCHEMY_API_KEY; @@ -38,7 +37,7 @@ export const config = createConfig({ walletConnect({ projectId: WALLET_CONNECT_PROJECT_ID, }), - safe(), + // safe(), ], });