diff --git a/.github/workflows/ci.subgraph-basin.yaml b/.github/workflows/ci.subgraph-basin.yaml index 6e2db3440e..0127c2a782 100644 --- a/.github/workflows/ci.subgraph-basin.yaml +++ b/.github/workflows/ci.subgraph-basin.yaml @@ -44,7 +44,7 @@ jobs: run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" - name: Build Subgraph - run: yarn build + run: yarn build -- ethereum working-directory: projects/subgraph-basin test: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.subgraph-bean.yaml b/.github/workflows/ci.subgraph-bean.yaml index c0ab78945d..01958b5647 100644 --- a/.github/workflows/ci.subgraph-bean.yaml +++ b/.github/workflows/ci.subgraph-bean.yaml @@ -44,7 +44,7 @@ jobs: run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" - name: Build Subgraph - run: yarn build + run: yarn build -- ethereum working-directory: projects/subgraph-bean test: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.subgraph-beanft.yaml b/.github/workflows/ci.subgraph-beanft.yaml index e7de52fe4d..b3e78f3732 100644 --- a/.github/workflows/ci.subgraph-beanft.yaml +++ b/.github/workflows/ci.subgraph-beanft.yaml @@ -44,7 +44,7 @@ jobs: run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" - name: Build Subgraph - run: yarn build + run: yarn build -- ethereum working-directory: projects/subgraph-beanft test: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.subgraph-beanstalk.yaml b/.github/workflows/ci.subgraph-beanstalk.yaml index 8f55b30fc3..f46ed86026 100644 --- a/.github/workflows/ci.subgraph-beanstalk.yaml +++ b/.github/workflows/ci.subgraph-beanstalk.yaml @@ -44,7 +44,7 @@ jobs: run: echo "There are uncommitted changes - execute 'yarn codegen' locally and commit the generated files!" - name: Build Subgraph - run: yarn build + run: yarn build -- ethereum working-directory: projects/subgraph-beanstalk test: runs-on: ubuntu-latest diff --git a/projects/subgraph-basin/README.md b/projects/subgraph-basin/README.md index c6ea6f1565..3cb677593a 100644 --- a/projects/subgraph-basin/README.md +++ b/projects/subgraph-basin/README.md @@ -21,3 +21,7 @@ All currently used subgraphs live on a centralized host controlled by beanstalk ### Testing To test with Docker, the first time you will need to run `yarn run graph test -d`. This will build the `matchstick` Docker image. Then, you can use the `yarn testd` script to run all tests. Alternatively, use `yarn testd-named ...` to run specific tests. I have found running in Docker to be preferred since otherwise there can be issues with console output and some test cases fail silently. + +### Deploying + +When using graph cli commands, you will often need to specify which manifest file should be used. This is necessary to support multiple chains in the same codebase. The commands which need it will be evident - as they will fail when unable to find a `subgraph.yaml` file. In those commands, include `./manifest/${chain}.yaml` as the final argument to the command. See scripts inside `package.json` for examples. \ No newline at end of file diff --git a/projects/subgraph-basin/manifests/codegen-abis.yaml b/projects/subgraph-basin/manifests/codegen-abis.yaml new file mode 100644 index 0000000000..491eab9455 --- /dev/null +++ b/projects/subgraph-basin/manifests/codegen-abis.yaml @@ -0,0 +1,58 @@ +# This file exists solely for the purpose of facilitating all codegen in a shared location such that all ABIs +# or templates are expanded independently of being used in all chains. Most of the information here is irrelevant, +# the only important part is in the `abis` and `templates` sections. +# - For abis, its only the list of abis that is relevant. The name of the dataSource is also visible. +# - For templates, it is only the name of the template that is relevant. +specVersion: 0.0.4 +schema: + file: ../schema.graphql +dataSources: + - kind: ethereum/contract + name: Basin-ABIs + network: not_relevant + source: + address: "0xBA51AAAA95aeEFc1292515b36D86C51dC7877773" + abi: Aquifer + startBlock: 17977922 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Aquifer + abis: + - name: Aquifer + file: ../../subgraph-core/abis/Aquifer.json + - name: ERC20 + file: ../../subgraph-core/abis/ERC20.json + - name: Beanstalk + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + - name: Well + file: ../../subgraph-core/abis/Well.json + - name: CurvePrice + file: ../../subgraph-core/abis/CurvePrice.json + - name: BeanstalkPrice + file: ../../subgraph-core/abis/BeanstalkPrice.json + eventHandlers: + - event: BoreWell(address,address,address[],(address,bytes),(address,bytes)[],bytes) + handler: handleBoreWell + file: ../src/templates/AquiferHandler.ts +templates: + - kind: ethereum/contract + name: Well + network: not_relevant + source: + abi: Well + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Well + abis: + - name: Well + file: ../../subgraph-core/abis/Well.json + eventHandlers: + - event: Sync(uint256[],uint256,address) + handler: handleSync + file: ../src/WellHandler.ts diff --git a/projects/subgraph-basin/subgraph.yaml b/projects/subgraph-basin/manifests/ethereum.yaml similarity index 79% rename from projects/subgraph-basin/subgraph.yaml rename to projects/subgraph-basin/manifests/ethereum.yaml index b2e732a229..332c1b9393 100644 --- a/projects/subgraph-basin/subgraph.yaml +++ b/projects/subgraph-basin/manifests/ethereum.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.4 schema: - file: ./schema.graphql + file: ../schema.graphql dataSources: - kind: ethereum/contract name: Aquifer @@ -17,13 +17,13 @@ dataSources: - Aquifer abis: - name: Aquifer - file: ../subgraph-core/abis/Aquifer.json + file: ../../subgraph-core/abis/Aquifer.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: BoreWell(address,address,address[],(address,bytes),(address,bytes)[],bytes) handler: handleBoreWell - file: ./src/templates/AquiferHandler.ts + file: ../src/templates/AquiferHandler.ts - kind: ethereum/contract name: Beanstalk network: mainnet @@ -39,11 +39,11 @@ dataSources: - Beanstalk abis: - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json eventHandlers: - event: Sunrise(indexed uint256) handler: handleSunrise - file: ./src/BeanstalkHandler.ts + file: ../src/BeanstalkHandler.ts templates: - kind: ethereum/contract name: Well @@ -58,13 +58,13 @@ templates: - Well abis: - name: Well - file: ../subgraph-core/abis/Well.json + file: ../../subgraph-core/abis/Well.json - name: CurvePrice - file: ../subgraph-core/abis/CurvePrice.json + file: ../../subgraph-core/abis/CurvePrice.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: AddLiquidity(uint256[],uint256,address) handler: handleAddLiquidity @@ -78,7 +78,7 @@ templates: handler: handleShift - event: Sync(uint256[],uint256,address) handler: handleSync - file: ./src/WellHandler.ts + file: ../src/WellHandler.ts # features: # - grafting # graft: diff --git a/projects/subgraph-basin/matchstick-docker.yaml b/projects/subgraph-basin/matchstick-docker.yaml index fcd5b6dd5d..92f565e53f 100644 --- a/projects/subgraph-basin/matchstick-docker.yaml +++ b/projects/subgraph-basin/matchstick-docker.yaml @@ -3,4 +3,4 @@ # subgraph has some dependencies on other projects in the repo. testsFolder: repo-mounted/projects/subgraph-basin/tests libsFolder: repo-mounted/node_modules -manifestPath: repo-mounted/projects/subgraph-basin/subgraph.yaml +manifestPath: repo-mounted/projects/subgraph-basin/manifests/ethereum.yaml diff --git a/projects/subgraph-basin/matchstick.yaml b/projects/subgraph-basin/matchstick.yaml index 8851578cc6..551552dc01 100644 --- a/projects/subgraph-basin/matchstick.yaml +++ b/projects/subgraph-basin/matchstick.yaml @@ -1 +1,2 @@ libsFolder: ../../node_modules +manifestPath: ./manifests/ethereum.yaml diff --git a/projects/subgraph-basin/package.json b/projects/subgraph-basin/package.json index 93a659bed9..ab3094519a 100644 --- a/projects/subgraph-basin/package.json +++ b/projects/subgraph-basin/package.json @@ -8,17 +8,17 @@ "directory": "projects/subgraph-basin" }, "scripts": { - "codegen": "rm -rf ./generated && graph codegen", - "build": "yarn codegen && graph build", + "codegen": "rm -rf ./generated && graph codegen ./manifests/codegen-abis.yaml", + "build": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph build ./manifests/$1.yaml", "test": "graph test", "testd": "docker run -it --rm --mount type=bind,source=\"$(pwd)\"/matchstick-docker.yaml,target=/matchstick/matchstick.yaml --mount type=bind,source=\"$(pwd)\"/../../,target=/matchstick/repo-mounted/ matchstick", "testd-named": "../subgraph-core/tests/scripts/docker-run-named.sh", - "create-local": "graph create --node http://127.0.0.1:8020/ basin", - "remove-local": "graph remove --node http://127.0.0.1:8020/ basin", - "deploy-local": "yarn codegen && graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 basin" + "create-local": "echo Using manifest at ./manifests/$1.yaml && graph create --node http://127.0.0.1:8020/ basin_$1", + "remove-local": "echo Using manifest at ./manifests/$1.yaml && graph remove --node http://127.0.0.1:8020/ basin_$1", + "deploy-local": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 basin_$1 ./manifests/$1.yaml" }, "dependencies": { - "@graphprotocol/graph-cli": "0.69.0", + "@graphprotocol/graph-cli": "0.79.2", "@graphprotocol/graph-ts": "0.34.0" }, "devDependencies": { diff --git a/projects/subgraph-basin/src/BeanstalkHandler.ts b/projects/subgraph-basin/src/BeanstalkHandler.ts index 9410550e70..6f58e82738 100644 --- a/projects/subgraph-basin/src/BeanstalkHandler.ts +++ b/projects/subgraph-basin/src/BeanstalkHandler.ts @@ -1,6 +1,6 @@ import { Address } from "@graphprotocol/graph-ts"; import { AQUIFER } from "../../subgraph-core/utils/Constants"; -import { Sunrise } from "../generated/Beanstalk/Beanstalk"; +import { Sunrise } from "../generated/Basin-ABIs/Beanstalk"; import { loadOrCreateAquifer } from "./utils/Aquifer"; import { checkForSnapshot } from "./utils/Well"; diff --git a/projects/subgraph-basin/src/WellHandler.ts b/projects/subgraph-basin/src/WellHandler.ts index d2d84c4ce5..0f4bf9502b 100644 --- a/projects/subgraph-basin/src/WellHandler.ts +++ b/projects/subgraph-basin/src/WellHandler.ts @@ -1,4 +1,4 @@ -import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Shift, Swap, Sync, Transfer } from "../generated/templates/Well/Well"; +import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Shift, Swap, Sync, Transfer } from "../generated/Basin-ABIs/Well"; import { loadOrCreateAccount } from "./utils/Account"; import { deltaBigIntArray, emptyBigIntArray, ZERO_BI } from "../../subgraph-core/utils/Decimals"; import { recordAddLiquidityEvent, recordRemoveLiquidityEvent, recordRemoveLiquidityOneEvent, recordSyncEvent } from "./utils/Liquidity"; diff --git a/projects/subgraph-basin/src/templates/AquiferHandler.ts b/projects/subgraph-basin/src/templates/AquiferHandler.ts index 3c62f87071..bc0be55f9d 100644 --- a/projects/subgraph-basin/src/templates/AquiferHandler.ts +++ b/projects/subgraph-basin/src/templates/AquiferHandler.ts @@ -1,6 +1,6 @@ import { Address, Bytes, log } from "@graphprotocol/graph-ts"; -import { BoreWell } from "../../generated/Aquifer/Aquifer"; -import { ERC20 } from "../../generated/Aquifer/ERC20"; +import { BoreWell } from "../../generated/Basin-ABIs/Aquifer"; +import { ERC20 } from "../../generated/Basin-ABIs/ERC20"; import { Well } from "../../generated/templates"; import { loadOrCreateAquifer } from "../utils/Aquifer"; import { loadOrCreatePump } from "../utils/Pump"; diff --git a/projects/subgraph-basin/src/utils/BeanstalkPrice.ts b/projects/subgraph-basin/src/utils/BeanstalkPrice.ts index 320cdaf4ee..bbd525f66b 100644 --- a/projects/subgraph-basin/src/utils/BeanstalkPrice.ts +++ b/projects/subgraph-basin/src/utils/BeanstalkPrice.ts @@ -1,6 +1,6 @@ // Unfortunately this file must be copied across the various subgraph projects. This is due to the codegen import { Address, BigInt } from "@graphprotocol/graph-ts"; -import { BeanstalkPrice } from "../../generated/templates/Well/BeanstalkPrice"; +import { BeanstalkPrice } from "../../generated/Basin-ABIs/BeanstalkPrice"; import { BEANSTALK_PRICE_1, BEANSTALK_PRICE_2, PRICE_2_BLOCK } from "../../../subgraph-core/utils/Constants"; // Gets the BeanstalkPrice contract, bound to the appropriate instance of the contract. diff --git a/projects/subgraph-basin/src/utils/Liquidity.ts b/projects/subgraph-basin/src/utils/Liquidity.ts index ac2c618c67..ad20360ffd 100644 --- a/projects/subgraph-basin/src/utils/Liquidity.ts +++ b/projects/subgraph-basin/src/utils/Liquidity.ts @@ -1,6 +1,6 @@ import { BigInt } from "@graphprotocol/graph-ts"; import { Deposit, Withdraw } from "../../generated/schema"; -import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Sync } from "../../generated/templates/Well/Well"; +import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Sync } from "../../generated/Basin-ABIs/Well"; import { getBigDecimalArrayTotal } from "../../../subgraph-core/utils/Decimals"; import { getCalculatedReserveUSDValues, loadWell } from "./Well"; diff --git a/projects/subgraph-basin/src/utils/Pump.ts b/projects/subgraph-basin/src/utils/Pump.ts index 3ddf42dd49..d57b393642 100644 --- a/projects/subgraph-basin/src/utils/Pump.ts +++ b/projects/subgraph-basin/src/utils/Pump.ts @@ -1,5 +1,5 @@ import { Address } from "@graphprotocol/graph-ts"; -import { BoreWellPumpsStruct } from "../../generated/Aquifer/Aquifer"; +import { BoreWellPumpsStruct } from "../../generated/Basin-ABIs/Aquifer"; import { Pump } from "../../generated/schema"; export function loadOrCreatePump(pumpData: BoreWellPumpsStruct, wellAddress: Address): Pump { diff --git a/projects/subgraph-basin/src/utils/Swap.ts b/projects/subgraph-basin/src/utils/Swap.ts index a3fbef0bc0..90f8d695f5 100644 --- a/projects/subgraph-basin/src/utils/Swap.ts +++ b/projects/subgraph-basin/src/utils/Swap.ts @@ -1,4 +1,4 @@ -import { Shift, Swap } from "../../generated/templates/Well/Well"; +import { Shift, Swap } from "../../generated/Basin-ABIs/Well"; import { Swap as SwapEvent } from "../../generated/schema"; import { Address, BigInt } from "@graphprotocol/graph-ts"; diff --git a/projects/subgraph-basin/src/utils/Token.ts b/projects/subgraph-basin/src/utils/Token.ts index 0c8b95bc3b..04298d539a 100644 --- a/projects/subgraph-basin/src/utils/Token.ts +++ b/projects/subgraph-basin/src/utils/Token.ts @@ -1,7 +1,7 @@ import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts"; -import { ERC20 } from "../../generated/Aquifer/ERC20"; +import { ERC20 } from "../../generated/Basin-ABIs/ERC20"; import { Token } from "../../generated/schema"; -import { CurvePrice } from "../../generated/templates/Well/CurvePrice"; +import { CurvePrice } from "../../generated/Basin-ABIs/CurvePrice"; import { BEAN_ERC20, CURVE_PRICE } from "../../../subgraph-core/utils/Constants"; import { toDecimal, ZERO_BD, ZERO_BI } from "../../../subgraph-core/utils/Decimals"; import { getBeanstalkPrice } from "./BeanstalkPrice"; diff --git a/projects/subgraph-basin/src/utils/Well.ts b/projects/subgraph-basin/src/utils/Well.ts index abb750041c..6a5007ce4f 100644 --- a/projects/subgraph-basin/src/utils/Well.ts +++ b/projects/subgraph-basin/src/utils/Well.ts @@ -1,7 +1,7 @@ import { Address, BigDecimal, BigInt, Bytes, log } from "@graphprotocol/graph-ts"; -import { BoreWellWellFunctionStruct } from "../../generated/Aquifer/Aquifer"; +import { BoreWellWellFunctionStruct } from "../../generated/Basin-ABIs/Aquifer"; import { Well, WellDailySnapshot, WellFunction, WellHourlySnapshot } from "../../generated/schema"; -import { ERC20 } from "../../generated/templates/Well/ERC20"; +import { ERC20 } from "../../generated/Basin-ABIs/ERC20"; import { BEAN_ERC20 } from "../../../subgraph-core/utils/Constants"; import { dayFromTimestamp, hourFromTimestamp } from "../../../subgraph-core/utils/Dates"; import { diff --git a/projects/subgraph-basin/tests/helpers/Aquifer.ts b/projects/subgraph-basin/tests/helpers/Aquifer.ts index 6bfbb6f6f0..b51172292b 100644 --- a/projects/subgraph-basin/tests/helpers/Aquifer.ts +++ b/projects/subgraph-basin/tests/helpers/Aquifer.ts @@ -1,6 +1,6 @@ import { Address, Bytes, ethereum } from "@graphprotocol/graph-ts"; import { newMockEvent } from "matchstick-as/assembly/index"; -import { BoreWell } from "../../generated/Aquifer/Aquifer"; +import { BoreWell } from "../../generated/Basin-ABIs/Aquifer"; import { handleBoreWell } from "../../src/templates/AquiferHandler"; import { BEAN_ERC20, WETH } from "../../../subgraph-core/utils/Constants"; import { AQUIFER, IMPLEMENTATION, PUMP, WELL, WELL_DATA, WELL_FUNCTION } from "./Constants"; diff --git a/projects/subgraph-basin/tests/helpers/Well.ts b/projects/subgraph-basin/tests/helpers/Well.ts index 8d1f85193a..674c723473 100644 --- a/projects/subgraph-basin/tests/helpers/Well.ts +++ b/projects/subgraph-basin/tests/helpers/Well.ts @@ -1,6 +1,6 @@ import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; import { newMockEvent } from "matchstick-as/assembly/index"; -import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Shift, Swap, Sync } from "../../generated/templates/Well/Well"; +import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Shift, Swap, Sync } from "../../generated/Basin-ABIs/Well"; import { CURRENT_BLOCK_TIMESTAMP } from "./Constants"; export function createAddLiquidityEvent(well: Address, account: Address, lpAmountOut: BigInt, tokenAmountsIn: BigInt[]): AddLiquidity { diff --git a/projects/subgraph-bean/README.md b/projects/subgraph-bean/README.md index 272a96a7a1..080f10c896 100644 --- a/projects/subgraph-bean/README.md +++ b/projects/subgraph-bean/README.md @@ -23,3 +23,7 @@ All currently used subgraphs live on a centralized host controlled by beanstalk ### Testing To test with Docker, the first time you will need to run `yarn run graph test -d`. This will build the `matchstick` Docker image. Then, you can use the `yarn testd` script to run all tests. Alternatively, use `yarn testd-named ...` to run specific tests. I have found running in Docker to be preferred since otherwise there can be issues with console output and some test cases fail silently. + +### Deploying + +When using graph cli commands, you will often need to specify which manifest file should be used. This is necessary to support multiple chains in the same codebase. The commands which need it will be evident - as they will fail when unable to find a `subgraph.yaml` file. In those commands, include `./manifest/${chain}.yaml` as the final argument to the command. See scripts inside `package.json` for examples. \ No newline at end of file diff --git a/projects/subgraph-bean/manifests/codegen-abis.yaml b/projects/subgraph-bean/manifests/codegen-abis.yaml new file mode 100644 index 0000000000..5a690c0445 --- /dev/null +++ b/projects/subgraph-bean/manifests/codegen-abis.yaml @@ -0,0 +1,49 @@ +# This file exists solely for the purpose of facilitating all codegen in a shared location such that all ABIs +# or templates are expanded independently of being used in all chains. Most of the information here is irrelevant, +# the only important part is in the `abis` and `templates` sections. +# - For abis, its only the list of abis that is relevant. The name of the dataSource is also visible. +# - For templates, it is only the name of the template that is relevant. +specVersion: 0.0.4 +schema: + file: ../schema.graphql +dataSources: + - kind: ethereum/contract + name: Bean-ABIs + network: not_relevant + source: + address: "0xDC59ac4FeFa32293A95889Dc396682858d52e5Db" + abi: ERC20 + startBlock: 12974077 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - Bean + abis: + - name: ERC20 + file: ../../subgraph-core/abis/ERC20.json + - name: UniswapV2Pair + file: ../../subgraph-core/abis/UniswapV2Pair.json + - name: Bean3CRV + file: ../../subgraph-core/abis/Bean3CRV.json + - name: Well + file: ../../subgraph-core/abis/Well.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: Beanstalk + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + - name: BIP37 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP37.json + - name: SeedGauge + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + - name: BeanstalkPrice + file: ../../subgraph-core/abis/BeanstalkPrice.json + - name: CurvePrice + file: ../../subgraph-core/abis/CurvePrice.json + - name: CalculationsCurve + file: ../../subgraph-core/abis/CalculationsCurve.json + eventHandlers: + - event: Transfer(indexed address,indexed address,uint256) + handler: handleTransfer + file: ../src/BeanHandler.ts diff --git a/projects/subgraph-bean/subgraph.yaml b/projects/subgraph-bean/manifests/ethereum.yaml similarity index 76% rename from projects/subgraph-bean/subgraph.yaml rename to projects/subgraph-bean/manifests/ethereum.yaml index bfb57dbb3e..156bc5b6d2 100644 --- a/projects/subgraph-bean/subgraph.yaml +++ b/projects/subgraph-bean/manifests/ethereum.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.4 schema: - file: ./schema.graphql + file: ../schema.graphql dataSources: - kind: ethereum/contract name: BeanV1 @@ -17,15 +17,15 @@ dataSources: - Bean abis: - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: SeedGauge - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer - file: ./src/BeanHandler.ts + file: ../src/BeanHandler.ts - kind: ethereum/contract name: Bean network: mainnet @@ -41,15 +41,15 @@ dataSources: - Bean abis: - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: SeedGauge - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer - file: ./src/BeanHandler.ts + file: ../src/BeanHandler.ts - kind: ethereum/contract name: Bean3CRV network: mainnet @@ -65,17 +65,17 @@ dataSources: - Bean3CRV abis: - name: Bean3CRV - file: ../subgraph-core/abis/Bean3CRV.json + file: ../../subgraph-core/abis/Bean3CRV.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json - name: CurvePrice - file: ../subgraph-core/abis/CurvePrice.json + file: ../../subgraph-core/abis/CurvePrice.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: SeedGauge - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json eventHandlers: - event: TokenExchange(indexed address,int128,uint256,int128,uint256) handler: handleTokenExchange @@ -89,7 +89,7 @@ dataSources: handler: handleRemoveLiquidityImbalance - event: RemoveLiquidityOne(indexed address,uint256,uint256,uint256) handler: handleRemoveLiquidityOne - file: ./src/Bean3CRVHandler.ts + file: ../src/Bean3CRVHandler.ts - kind: ethereum/contract name: Beanstalk network: mainnet @@ -105,23 +105,23 @@ dataSources: - Beanstalk abis: - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: SeedGauge - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json - name: PreReplant - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json - name: CurvePrice - file: ../subgraph-core/abis/CurvePrice.json + file: ../../subgraph-core/abis/CurvePrice.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: Bean3CRV - file: ../subgraph-core/abis/Bean3CRV.json + file: ../../subgraph-core/abis/Bean3CRV.json - name: CalculationsCurve - file: ../subgraph-core/abis/CalculationsCurve.json + file: ../../subgraph-core/abis/CalculationsCurve.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: Sunrise(indexed uint256) handler: handleSunrise @@ -131,7 +131,7 @@ dataSources: handler: handleRewardMint - event: Chop(indexed address,indexed address,uint256,uint256) handler: handleChop - file: ./src/BeanstalkHandler.ts + file: ../src/BeanstalkHandler.ts - kind: ethereum/contract name: BeanUniswapV2Pair network: mainnet @@ -152,9 +152,9 @@ dataSources: - Transfer abis: - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: # - event: Burn(indexed address,uint256,uint256,indexed address) # handler: handleBurn @@ -164,7 +164,7 @@ dataSources: handler: handleSwap - event: Sync(uint112,uint112) handler: handleSync - file: ./src/UniswapV2Handler.ts + file: ../src/UniswapV2Handler.ts - kind: ethereum/contract name: Bean3CRV-V1 network: mainnet @@ -180,13 +180,13 @@ dataSources: - Bean3CRV abis: - name: Bean3CRV - file: ../subgraph-core/abis/Bean3CRV.json + file: ../../subgraph-core/abis/Bean3CRV.json - name: CalculationsCurve - file: ../subgraph-core/abis/CalculationsCurve.json + file: ../../subgraph-core/abis/CalculationsCurve.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json eventHandlers: - event: TokenExchange(indexed address,int128,uint256,int128,uint256) handler: handleTokenExchange @@ -200,7 +200,7 @@ dataSources: handler: handleRemoveLiquidityImbalance - event: RemoveLiquidityOne(indexed address,uint256,uint256,uint256) handler: handleRemoveLiquidityOne - file: ./src/Bean3CRVHandler_V1.ts + file: ../src/Bean3CRVHandler_V1.ts - kind: ethereum/contract name: BeanLUSD-V1 network: mainnet @@ -216,13 +216,13 @@ dataSources: - Bean3CRV abis: - name: Bean3CRV - file: ../subgraph-core/abis/Bean3CRV.json + file: ../../subgraph-core/abis/Bean3CRV.json - name: CalculationsCurve - file: ../subgraph-core/abis/CalculationsCurve.json + file: ../../subgraph-core/abis/CalculationsCurve.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json eventHandlers: - event: TokenExchange(indexed address,int128,uint256,int128,uint256) handler: handleTokenExchange @@ -236,7 +236,7 @@ dataSources: handler: handleRemoveLiquidityImbalance - event: RemoveLiquidityOne(indexed address,uint256,uint256,uint256) handler: handleRemoveLiquidityOne - file: ./src/Bean3CRVHandler_V1.ts + file: ../src/Bean3CRVHandler_V1.ts - kind: ethereum/contract name: BeanWETHCP2w network: mainnet @@ -252,15 +252,15 @@ dataSources: - Pool abis: - name: Well - file: ../subgraph-core/abis/Well.json + file: ../../subgraph-core/abis/Well.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: SeedGauge - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json eventHandlers: - event: AddLiquidity(uint256[],uint256,address) handler: handleAddLiquidity @@ -274,7 +274,7 @@ dataSources: handler: handleShift - event: Sync(uint256[],uint256,address) handler: handleSync - file: ./src/BeanWellHandler.ts + file: ../src/BeanWellHandler.ts - kind: ethereum/contract name: BEANwstETHCP2w network: mainnet @@ -290,15 +290,15 @@ dataSources: - Pool abis: - name: Well - file: ../subgraph-core/abis/Well.json + file: ../../subgraph-core/abis/Well.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: SeedGauge - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json eventHandlers: - event: AddLiquidity(uint256[],uint256,address) handler: handleAddLiquidity @@ -312,7 +312,7 @@ dataSources: handler: handleShift - event: Sync(uint256[],uint256,address) handler: handleSync - file: ./src/BeanWellHandler.ts + file: ../src/BeanWellHandler.ts - kind: ethereum/contract name: TWAPOracles network: mainnet @@ -333,17 +333,17 @@ dataSources: # This abi is chosen because it contains both MetapoolOracle and WellOracle events. # Indexing of this source should begin prior to BIP37 deployment. - name: BIP37 - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP37.json + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP37.json - name: Bean3CRV - file: ../subgraph-core/abis/Bean3CRV.json + file: ../../subgraph-core/abis/Bean3CRV.json - name: Well - file: ../subgraph-core/abis/Well.json + file: ../../subgraph-core/abis/Well.json eventHandlers: - event: MetapoolOracle(indexed uint32,int256,uint256[2]) handler: handleMetapoolOracle - event: WellOracle(indexed uint32,address,int256,bytes) handler: handleWellOracle - file: ./src/BeanstalkHandler.ts + file: ../src/BeanstalkHandler.ts - kind: ethereum/contract name: BlockHandler network: mainnet @@ -367,12 +367,12 @@ dataSources: - PoolDailySnapshot abis: - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json blockHandlers: - handler: handleBlock - file: ./src/BlockHandler.ts + file: ../src/BlockHandler.ts # features: # - grafting # graft: diff --git a/projects/subgraph-bean/matchstick-docker.yaml b/projects/subgraph-bean/matchstick-docker.yaml index aa83a54948..0c1f581267 100644 --- a/projects/subgraph-bean/matchstick-docker.yaml +++ b/projects/subgraph-bean/matchstick-docker.yaml @@ -3,4 +3,4 @@ # subgraph has some dependencies on other projects in the repo. testsFolder: repo-mounted/projects/subgraph-bean/tests libsFolder: repo-mounted/node_modules -manifestPath: repo-mounted/projects/subgraph-bean/subgraph.yaml +manifestPath: repo-mounted/projects/subgraph-bean/manifests/ethereum.yaml diff --git a/projects/subgraph-bean/matchstick.yaml b/projects/subgraph-bean/matchstick.yaml index 8851578cc6..551552dc01 100644 --- a/projects/subgraph-bean/matchstick.yaml +++ b/projects/subgraph-bean/matchstick.yaml @@ -1 +1,2 @@ libsFolder: ../../node_modules +manifestPath: ./manifests/ethereum.yaml diff --git a/projects/subgraph-bean/package.json b/projects/subgraph-bean/package.json index 7f945e3933..ced13f3a95 100644 --- a/projects/subgraph-bean/package.json +++ b/projects/subgraph-bean/package.json @@ -8,17 +8,17 @@ "directory": "projects/subgraph-bean" }, "scripts": { - "codegen": "graph codegen", - "build": "graph build", + "codegen": "rm -rf ./generated && graph codegen ./manifests/codegen-abis.yaml", + "build": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph build ./manifests/$1.yaml", "test": "graph test", "testd": "docker run -it --rm --mount type=bind,source=\"$(pwd)\"/matchstick-docker.yaml,target=/matchstick/matchstick.yaml --mount type=bind,source=\"$(pwd)\"/../../,target=/matchstick/repo-mounted/ matchstick", "testd-named": "../subgraph-core/tests/scripts/docker-run-named.sh", - "create-local": "graph create --node http://127.0.0.1:8020/ bean", - "remove-local": "graph remove --node http://127.0.0.1:8020/ bean", - "deploy-local": "graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 bean" + "create-local": "echo Using manifest at ./manifests/$1.yaml && graph create --node http://127.0.0.1:8020/ bean_$1", + "remove-local": "echo Using manifest at ./manifests/$1.yaml && graph remove --node http://127.0.0.1:8020/ bean_$1", + "deploy-local": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 bean_$1 ./manifests/$1.yaml" }, "dependencies": { - "@graphprotocol/graph-cli": "0.69.0", + "@graphprotocol/graph-cli": "0.79.2", "@graphprotocol/graph-ts": "0.34.0" }, "devDependencies": { diff --git a/projects/subgraph-bean/src/Bean3CRVHandler.ts b/projects/subgraph-bean/src/Bean3CRVHandler.ts index 8b89562185..b5e9418750 100644 --- a/projects/subgraph-bean/src/Bean3CRVHandler.ts +++ b/projects/subgraph-bean/src/Bean3CRVHandler.ts @@ -6,8 +6,8 @@ import { RemoveLiquidityOne, TokenExchange, TokenExchangeUnderlying -} from "../generated/Bean3CRV/Bean3CRV"; -import { CurvePrice } from "../generated/Bean3CRV/CurvePrice"; +} from "../generated/Bean-ABIs/Bean3CRV"; +import { CurvePrice } from "../generated/Bean-ABIs/CurvePrice"; import { updateBeanAfterPoolSwap } from "./utils/Bean"; import { CURVE_PRICE } from "../../subgraph-core/utils/Constants"; import { toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; diff --git a/projects/subgraph-bean/src/Bean3CRVHandler_V1.ts b/projects/subgraph-bean/src/Bean3CRVHandler_V1.ts index 8297092cd1..d13fe81df0 100644 --- a/projects/subgraph-bean/src/Bean3CRVHandler_V1.ts +++ b/projects/subgraph-bean/src/Bean3CRVHandler_V1.ts @@ -6,13 +6,13 @@ import { RemoveLiquidityOne, TokenExchange, TokenExchangeUnderlying -} from "../generated/Bean3CRV-V1/Bean3CRV"; +} from "../generated/Bean-ABIs/Bean3CRV"; import { calcLiquidityWeightedBeanPrice, getLastBeanPrice, loadBean, updateBeanSupplyPegPercent, updateBeanValues } from "./utils/Bean"; import { BEAN_ERC20_V1, BEAN_LUSD_V1, BEAN_WETH_V1 } from "../../subgraph-core/utils/Constants"; import { toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; import { loadOrCreatePool, setPoolReserves, updatePoolPrice, updatePoolValues } from "./utils/Pool"; -import { Bean3CRV } from "../generated/Bean3CRV-V1/Bean3CRV"; -import { ERC20 } from "../generated/Bean3CRV-V1/ERC20"; +import { Bean3CRV } from "../generated/Bean-ABIs/Bean3CRV"; +import { ERC20 } from "../generated/Bean-ABIs/ERC20"; import { checkBeanCross } from "./utils/Cross"; import { curveDeltaBUsingVPrice, curvePriceAndLp } from "./utils/price/CurvePrice"; import { manualTwa } from "./utils/price/TwaOracle"; diff --git a/projects/subgraph-bean/src/BeanHandler.ts b/projects/subgraph-bean/src/BeanHandler.ts index 3f46f0fe39..02c0cddb25 100644 --- a/projects/subgraph-bean/src/BeanHandler.ts +++ b/projects/subgraph-bean/src/BeanHandler.ts @@ -1,4 +1,4 @@ -import { Transfer } from "../generated/Bean/ERC20"; +import { Transfer } from "../generated/Bean-ABIs/ERC20"; import { loadBean, updateBeanSupplyPegPercent } from "./utils/Bean"; import { ADDRESS_ZERO, BEAN_ERC20_V1 } from "../../subgraph-core/utils/Constants"; diff --git a/projects/subgraph-bean/src/BeanWellHandler.ts b/projects/subgraph-bean/src/BeanWellHandler.ts index 0c7b91c0fc..d67a1a7262 100644 --- a/projects/subgraph-bean/src/BeanWellHandler.ts +++ b/projects/subgraph-bean/src/BeanWellHandler.ts @@ -1,7 +1,7 @@ import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts"; import { BEAN_ERC20 } from "../../subgraph-core/utils/Constants"; import { ZERO_BD, ZERO_BI, deltaBigIntArray, toDecimal } from "../../subgraph-core/utils/Decimals"; -import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Shift, Swap, Sync } from "../generated/BeanWETHCP2w/Well"; +import { AddLiquidity, RemoveLiquidity, RemoveLiquidityOneToken, Shift, Swap, Sync } from "../generated/Bean-ABIs/Well"; import { updateBeanAfterPoolSwap } from "./utils/Bean"; import { getPoolLiquidityUSD, loadOrCreatePool, setPoolReserves, updatePoolPrice, updatePoolValues } from "./utils/Pool"; import { BeanstalkPrice_try_price, getPoolPrice } from "./utils/price/BeanstalkPrice"; diff --git a/projects/subgraph-bean/src/BeanstalkHandler.ts b/projects/subgraph-bean/src/BeanstalkHandler.ts index ebc4cd1686..665ae61618 100644 --- a/projects/subgraph-bean/src/BeanstalkHandler.ts +++ b/projects/subgraph-bean/src/BeanstalkHandler.ts @@ -1,14 +1,14 @@ import { Address, BigInt } from "@graphprotocol/graph-ts"; -import { Chop, DewhitelistToken, Reward, Sunrise } from "../generated/Beanstalk/Beanstalk"; +import { Chop, DewhitelistToken, Reward, Sunrise } from "../generated/Bean-ABIs/Beanstalk"; import { getBeanTokenAddress, loadBean, updateBeanSeason, updateBeanSupplyPegPercent, updateBeanTwa, updateBeanValues } from "./utils/Bean"; import { loadOrCreatePool, updatePoolPrice, updatePoolSeason, updatePoolValues } from "./utils/Pool"; import { BEAN_3CRV, BEAN_ERC20, BEAN_ERC20_V1, BEAN_WETH_V1, CURVE_PRICE } from "../../subgraph-core/utils/Constants"; import { ZERO_BD, ZERO_BI, toDecimal } from "../../subgraph-core/utils/Decimals"; -import { CurvePrice } from "../generated/Beanstalk/CurvePrice"; +import { CurvePrice } from "../generated/Bean-ABIs/CurvePrice"; import { checkBeanCross } from "./utils/Cross"; import { calcUniswapV2Inst, setUniswapV2Twa } from "./utils/price/UniswapPrice"; import { calcCurveInst, setCurveTwa } from "./utils/price/CurvePrice"; -import { MetapoolOracle, WellOracle } from "../generated/TWAPOracles/BIP37"; +import { MetapoolOracle, WellOracle } from "../generated/Bean-ABIs/BIP37"; import { DeltaBPriceLiquidity } from "./utils/price/Types"; import { setRawWellReserves, setTwaLast } from "./utils/price/TwaOracle"; import { decodeCumulativeWellReserves, setWellTwa } from "./utils/price/WellPrice"; diff --git a/projects/subgraph-bean/src/UniswapV2Handler.ts b/projects/subgraph-bean/src/UniswapV2Handler.ts index 743670d283..272895ec6f 100644 --- a/projects/subgraph-bean/src/UniswapV2Handler.ts +++ b/projects/subgraph-bean/src/UniswapV2Handler.ts @@ -1,5 +1,5 @@ import { BigDecimal, BigInt, ethereum, Address, log } from "@graphprotocol/graph-ts"; -import { Swap, Sync } from "../generated/BeanUniswapV2Pair/UniswapV2Pair"; +import { Swap, Sync } from "../generated/Bean-ABIs/UniswapV2Pair"; import { getLastBeanPrice, calcLiquidityWeightedBeanPrice, loadBean, updateBeanSupplyPegPercent, updateBeanValues } from "./utils/Bean"; import { BEAN_ERC20_V1, BEAN_WETH_V1, WETH } from "../../subgraph-core/utils/Constants"; import { toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; diff --git a/projects/subgraph-bean/src/utils/LockedBeans.ts b/projects/subgraph-bean/src/utils/LockedBeans.ts index a0f2064081..34de6ed31a 100644 --- a/projects/subgraph-bean/src/utils/LockedBeans.ts +++ b/projects/subgraph-bean/src/utils/LockedBeans.ts @@ -10,10 +10,10 @@ import { UNRIPE_BEAN, UNRIPE_BEAN_3CRV } from "../../../subgraph-core/utils/Constants"; -import { SeedGauge } from "../../generated/Beanstalk/SeedGauge"; +import { SeedGauge } from "../../generated/Bean-ABIs/SeedGauge"; import { ONE_BI, ZERO_BD, ZERO_BI } from "../../../subgraph-core/utils/Decimals"; -import { ERC20 } from "../../generated/Beanstalk/ERC20"; -import { Beanstalk } from "../../generated/Beanstalk/Beanstalk"; +import { ERC20 } from "../../generated/Bean-ABIs/ERC20"; +import { Beanstalk } from "../../generated/Bean-ABIs/Beanstalk"; import { loadOrCreatePool } from "./Pool"; import { loadOrCreateTwaOracle } from "./price/TwaOracle"; diff --git a/projects/subgraph-bean/src/utils/price/BeanstalkPrice.ts b/projects/subgraph-bean/src/utils/price/BeanstalkPrice.ts index e74fd5c2ac..ade39fa4de 100644 --- a/projects/subgraph-bean/src/utils/price/BeanstalkPrice.ts +++ b/projects/subgraph-bean/src/utils/price/BeanstalkPrice.ts @@ -4,7 +4,7 @@ import { BeanstalkPrice, BeanstalkPrice__priceResultPPsStruct, BeanstalkPrice__priceResultPStruct -} from "../../../generated/Beanstalk/BeanstalkPrice"; +} from "../../../generated/Bean-ABIs/BeanstalkPrice"; import { loadBean } from "../Bean"; import { BEANSTALK_PRICE_1, BEANSTALK_PRICE_2, PRICE_1_BLOCK, PRICE_2_BLOCK } from "../../../../subgraph-core/utils/Constants"; import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; diff --git a/projects/subgraph-bean/src/utils/price/CurvePrice.ts b/projects/subgraph-bean/src/utils/price/CurvePrice.ts index dcc4d248a0..9cb5fb0d75 100644 --- a/projects/subgraph-bean/src/utils/price/CurvePrice.ts +++ b/projects/subgraph-bean/src/utils/price/CurvePrice.ts @@ -1,5 +1,5 @@ import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts"; -import { Bean3CRV } from "../../../generated/Bean3CRV-V1/Bean3CRV"; +import { Bean3CRV } from "../../../generated/Bean-ABIs/Bean3CRV"; import { BD_10, BI_10, ONE_BI, toDecimal, ZERO_BD, ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; import { BEAN_3CRV_V1, @@ -10,8 +10,8 @@ import { LUSD, LUSD_3POOL } from "../../../../subgraph-core/utils/Constants"; -import { CalculationsCurve } from "../../../generated/Bean3CRV-V1/CalculationsCurve"; -import { ERC20 } from "../../../generated/Bean3CRV-V1/ERC20"; +import { CalculationsCurve } from "../../../generated/Bean-ABIs/CalculationsCurve"; +import { ERC20 } from "../../../generated/Bean-ABIs/ERC20"; import { DeltaBAndPrice, DeltaBPriceLiquidity, TWAType } from "./Types"; import { Pool } from "../../../generated/schema"; import { getTWAPrices, loadOrCreateTwaOracle } from "./TwaOracle"; diff --git a/projects/subgraph-bean/src/utils/price/TwaOracle.ts b/projects/subgraph-bean/src/utils/price/TwaOracle.ts index 3eb4ba9ccc..d5729d7a20 100644 --- a/projects/subgraph-bean/src/utils/price/TwaOracle.ts +++ b/projects/subgraph-bean/src/utils/price/TwaOracle.ts @@ -6,7 +6,7 @@ import { WETH_USDC_PAIR } from "../../../../subgraph-core/utils/Constants"; import { curveCumulativePrices } from "./CurvePrice"; import { TWAType } from "./Types"; import { wellCumulativePrices, wellTwaReserves } from "./WellPrice"; -import { WellOracle } from "../../../generated/TWAPOracles/BIP37"; +import { WellOracle } from "../../../generated/Bean-ABIs/BIP37"; export function loadOrCreateTwaOracle(poolAddress: string): TwaOracle { let twaOracle = TwaOracle.load(poolAddress); diff --git a/projects/subgraph-bean/src/utils/price/UniswapPrice.ts b/projects/subgraph-bean/src/utils/price/UniswapPrice.ts index c01e3986f5..f305396ff1 100644 --- a/projects/subgraph-bean/src/utils/price/UniswapPrice.ts +++ b/projects/subgraph-bean/src/utils/price/UniswapPrice.ts @@ -2,9 +2,9 @@ import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts"; import { BD_10, BI_10, ONE_BI, pow, sqrt, toDecimal, ZERO_BD, ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; import { Pool, Token } from "../../../generated/schema"; import { loadOrCreateToken } from "../Token"; -import { UniswapV2Pair } from "../../../generated/BeanUniswapV2Pair/UniswapV2Pair"; +import { UniswapV2Pair } from "../../../generated/Bean-ABIs/UniswapV2Pair"; import { BEANSTALK, WETH, WETH_USDC_PAIR } from "../../../../subgraph-core/utils/Constants"; -import { PreReplant } from "../../../generated/Beanstalk/PreReplant"; +import { PreReplant } from "../../../generated/Bean-ABIs/PreReplant"; import { DeltaBAndPrice, DeltaBPriceLiquidity, TWAType } from "./Types"; import { setPoolTwa } from "../Pool"; import { getTWAPrices } from "./TwaOracle"; diff --git a/projects/subgraph-bean/tests/event-mocking/Beanstalk.ts b/projects/subgraph-bean/tests/event-mocking/Beanstalk.ts index 1a9404a159..f4e1419ffb 100644 --- a/projects/subgraph-bean/tests/event-mocking/Beanstalk.ts +++ b/projects/subgraph-bean/tests/event-mocking/Beanstalk.ts @@ -1,7 +1,7 @@ import { BigInt, ethereum, Address, Bytes } from "@graphprotocol/graph-ts"; -import { MetapoolOracle, WellOracle } from "../../generated/TWAPOracles/BIP37"; +import { MetapoolOracle, WellOracle } from "../../generated/Bean-ABIs/BIP37"; import { mockBeanstalkEvent } from "../../../subgraph-core/tests/event-mocking/Util"; -import { DewhitelistToken } from "../../generated/Beanstalk/Beanstalk"; +import { DewhitelistToken } from "../../generated/Bean-ABIs/Beanstalk"; export function createMetapoolOracleEvent( season: BigInt, diff --git a/projects/subgraph-bean/tests/event-mocking/Curve.ts b/projects/subgraph-bean/tests/event-mocking/Curve.ts index aaf57909c1..71fa6d67bf 100644 --- a/projects/subgraph-bean/tests/event-mocking/Curve.ts +++ b/projects/subgraph-bean/tests/event-mocking/Curve.ts @@ -1,7 +1,7 @@ import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; import { createMockedFunction } from "matchstick-as"; -import { TokenExchangeUnderlying } from "../../generated/Bean3CRV-V1/Bean3CRV"; +import { TokenExchangeUnderlying } from "../../generated/Bean-ABIs/Bean3CRV"; import { mockContractEvent } from "../../../subgraph-core/tests/event-mocking/Util"; import { BEAN_3CRV_V1 } from "../../../subgraph-core/utils/Constants"; diff --git a/projects/subgraph-bean/tests/l2sr.test.ts b/projects/subgraph-bean/tests/l2sr.test.ts index 540f50902b..6ff0134fe0 100644 --- a/projects/subgraph-bean/tests/l2sr.test.ts +++ b/projects/subgraph-bean/tests/l2sr.test.ts @@ -19,7 +19,7 @@ import { } from "./call-mocking/Beanstalk"; import { handleChop } from "../src/BeanstalkHandler"; import { mockBeanstalkEvent } from "../../subgraph-core/tests/event-mocking/Util"; -import { Chop } from "../generated/Beanstalk/Beanstalk"; +import { Chop } from "../generated/Bean-ABIs/Beanstalk"; import { loadOrCreatePool } from "../src/utils/Pool"; import { calcLockedBeans, LibLockedUnderlying_getPercentLockedUnderlying } from "../src/utils/LockedBeans"; import { mockERC20TokenSupply } from "../../subgraph-core/tests/event-mocking/Tokens"; diff --git a/projects/subgraph-beanft/manifests/codegen-abis.yaml b/projects/subgraph-beanft/manifests/codegen-abis.yaml new file mode 100644 index 0000000000..5a09f00b7c --- /dev/null +++ b/projects/subgraph-beanft/manifests/codegen-abis.yaml @@ -0,0 +1,36 @@ +# This file exists solely for the purpose of facilitating all codegen in a shared location such that all ABIs +# or templates are expanded independently of being used in all chains. Most of the information here is irrelevant, +# the only important part is in the `abis` and `templates` sections. +# - For abis, its only the list of abis that is relevant. The name of the dataSource is also visible. +# - For templates, it is only the name of the template that is relevant. +specVersion: 0.0.5 +schema: + file: ../schema.graphql +dataSources: + - kind: ethereum + name: BeaNFT-ABIs + network: not_relevant + source: + address: "0xa755A670Aaf1FeCeF2bea56115E65e03F7722A79" + abi: genesis + startBlock: 13323594 + mapping: + kind: ethereum/events + apiVersion: 0.0.7 + language: wasm/assemblyscript + entities: + - BeaNFTUser + - Collection + abis: + - name: genesis + file: ../abis/genesis.json + - name: winter + file: ../abis/winter.json + - name: barnraise + file: ../abis/barnraise.json + - name: basin + file: ../abis/basin.json + eventHandlers: + - event: Transfer(indexed address,indexed address,indexed uint256) + handler: handleTransferGenesis + file: ../src/mappings.ts diff --git a/projects/subgraph-beanft/subgraph.yaml b/projects/subgraph-beanft/manifests/ethereum.yaml similarity index 88% rename from projects/subgraph-beanft/subgraph.yaml rename to projects/subgraph-beanft/manifests/ethereum.yaml index 9bded0195b..54b3b8fa7f 100644 --- a/projects/subgraph-beanft/subgraph.yaml +++ b/projects/subgraph-beanft/manifests/ethereum.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.5 schema: - file: ./schema.graphql + file: ../schema.graphql dataSources: - kind: ethereum name: genesis @@ -18,11 +18,11 @@ dataSources: - Collection abis: - name: genesis - file: ./abis/genesis.json + file: ../abis/genesis.json eventHandlers: - event: Transfer(indexed address,indexed address,indexed uint256) handler: handleTransferGenesis - file: ./src/mappings.ts + file: ../src/mappings.ts - kind: ethereum name: winter network: mainnet @@ -39,11 +39,11 @@ dataSources: - Collection abis: - name: winter - file: ./abis/winter.json + file: ../abis/winter.json eventHandlers: - event: Transfer(indexed address,indexed address,indexed uint256) handler: handleTransferWinter - file: ./src/mappings.ts + file: ../src/mappings.ts - kind: ethereum name: barnraise network: mainnet @@ -60,13 +60,13 @@ dataSources: - Collection abis: - name: barnraise - file: ./abis/barnraise.json + file: ../abis/barnraise.json eventHandlers: - event: ConsecutiveTransfer(indexed uint256,uint256,indexed address,indexed address) handler: handleConsecutiveTransferBarnRaise - event: Transfer(indexed address,indexed address,indexed uint256) handler: handleTransferBarnRaise - file: ./src/mappings.ts + file: ../src/mappings.ts - kind: ethereum name: basin network: mainnet @@ -83,11 +83,10 @@ dataSources: - Collection abis: - name: basin - file: ./abis/basin.json + file: ../abis/basin.json eventHandlers: - event: ConsecutiveTransfer(indexed uint256,uint256,indexed address,indexed address) handler: handleConsecutiveTransferBasin - event: Transfer(indexed address,indexed address,indexed uint256) handler: handleTransferBasin - file: ./src/mappings.ts - + file: ../src/mappings.ts diff --git a/projects/subgraph-beanft/matchstick-docker.yaml b/projects/subgraph-beanft/matchstick-docker.yaml index 9501556193..5ced7f617c 100644 --- a/projects/subgraph-beanft/matchstick-docker.yaml +++ b/projects/subgraph-beanft/matchstick-docker.yaml @@ -3,4 +3,4 @@ # subgraph has some dependencies on other projects in the repo. testsFolder: repo-mounted/projects/subgraph-beanft/tests libsFolder: repo-mounted/node_modules -manifestPath: repo-mounted/projects/subgraph-beanft/subgraph.yaml +manifestPath: repo-mounted/projects/subgraph-beanft/manifests/ethereum.yaml diff --git a/projects/subgraph-beanft/matchstick.yaml b/projects/subgraph-beanft/matchstick.yaml index 8851578cc6..551552dc01 100644 --- a/projects/subgraph-beanft/matchstick.yaml +++ b/projects/subgraph-beanft/matchstick.yaml @@ -1 +1,2 @@ libsFolder: ../../node_modules +manifestPath: ./manifests/ethereum.yaml diff --git a/projects/subgraph-beanft/package.json b/projects/subgraph-beanft/package.json index 9b5e1b4f9f..4156afe82e 100644 --- a/projects/subgraph-beanft/package.json +++ b/projects/subgraph-beanft/package.json @@ -2,21 +2,21 @@ "name": "beanft", "license": "UNLICENSED", "scripts": { - "codegen": "rm -rf ./generated && graph codegen", - "build": "yarn codegen && graph build", + "codegen": "rm -rf ./generated && graph codegen ./manifests/codegen-abis.yaml", + "build": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph build ./manifests/$1.yaml", "test": "graph test", "testd": "docker run -it --rm --mount type=bind,source=\"$(pwd)\"/matchstick-docker.yaml,target=/matchstick/matchstick.yaml --mount type=bind,source=\"$(pwd)\"/../../,target=/matchstick/repo-mounted/ matchstick", "testd-named": "../subgraph-core/tests/scripts/docker-run-named.sh", - "create-local": "graph create --node http://localhost:8020/ beanft", - "remove-local": "graph remove --node http://localhost:8020/ beanft", - "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 beanft" + "create-local": "echo Using manifest at ./manifests/$1.yaml && graph create --node http://127.0.0.1:8020/ beanft_$1", + "remove-local": "echo Using manifest at ./manifests/$1.yaml && graph remove --node http://127.0.0.1:8020/ beanft_$1", + "deploy-local": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 beanft_$1 ./manifests/$1.yaml" }, "dependencies": { - "@graphprotocol/graph-cli": "0.69.0", - "@graphprotocol/graph-ts": "0.34.0", - "ethers": "^6.3.0" + "@graphprotocol/graph-cli": "0.79.2", + "@graphprotocol/graph-ts": "0.34.0" }, "devDependencies": { "matchstick-as": "^0.6.0" - } + }, + "private": true } diff --git a/projects/subgraph-beanft/src/mappings.ts b/projects/subgraph-beanft/src/mappings.ts index 22cf7e7bbc..9f482c302c 100644 --- a/projects/subgraph-beanft/src/mappings.ts +++ b/projects/subgraph-beanft/src/mappings.ts @@ -1,225 +1,226 @@ -import { log } from "@graphprotocol/graph-ts" -import { - ConsecutiveTransfer as ConsecutiveTransferEventBasin, - Transfer as TransferEventBasin -} from "../generated/basin/basin" +import { log } from "@graphprotocol/graph-ts"; +import { ConsecutiveTransfer as ConsecutiveTransferEventBasin, Transfer as TransferEventBasin } from "../generated/BeaNFT-ABIs/basin"; import { ConsecutiveTransfer as ConsecutiveTransferEventBarnRaise, Transfer as TransferEventBarnRaise -} from "../generated/barnraise/barnraise" -import { - Transfer as TransferEventGenesis -} from "../generated/genesis/genesis" -import { - Transfer as TransferEventWinter -} from "../generated/winter/winter" -import { - BeaNFTUser, CollectionData -} from "../generated/schema" +} from "../generated/BeaNFT-ABIs/barnraise"; +import { Transfer as TransferEventGenesis } from "../generated/BeaNFT-ABIs/genesis"; +import { Transfer as TransferEventWinter } from "../generated/BeaNFT-ABIs/winter"; +import { BeaNFTUser, CollectionData } from "../generated/schema"; -const zeroAddress = '0x0000000000000000000000000000000000000000' +const zeroAddress = "0x0000000000000000000000000000000000000000"; export function handleTransferGenesis(event: TransferEventGenesis): void { - log.info("GENESIS TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]) - let from = event.params.from.toHexString() - let to = event.params.to.toHexString() - let tokenId = event.params.tokenId.toI32() - transferHandler(from, to, tokenId, 'genesis') + log.info("GENESIS TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]); + let from = event.params.from.toHexString(); + let to = event.params.to.toHexString(); + let tokenId = event.params.tokenId.toI32(); + transferHandler(from, to, tokenId, "genesis"); } export function handleTransferWinter(event: TransferEventWinter): void { - log.info("WINTER TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]) - let from = event.params.from.toHexString() - let to = event.params.to.toHexString() - let tokenId = event.params.tokenId.toI32() - transferHandler(from, to, tokenId, 'winter') + log.info("WINTER TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]); + let from = event.params.from.toHexString(); + let to = event.params.to.toHexString(); + let tokenId = event.params.tokenId.toI32(); + transferHandler(from, to, tokenId, "winter"); } export function handleTransferBarnRaise(event: TransferEventBarnRaise): void { - log.info("BARN RAISE TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]) - let from = event.params.from.toHexString() - let to = event.params.to.toHexString() - let tokenId = event.params.tokenId.toI32() - transferHandler(from, to, tokenId, 'barnraise') + log.info("BARN RAISE TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]); + let from = event.params.from.toHexString(); + let to = event.params.to.toHexString(); + let tokenId = event.params.tokenId.toI32(); + transferHandler(from, to, tokenId, "barnraise"); } export function handleTransferBasin(event: TransferEventBasin): void { - log.info("BASIN TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]) - let from = event.params.from.toHexString() - let to = event.params.to.toHexString() - let tokenId = event.params.tokenId.toI32() - transferHandler(from, to, tokenId, 'basin') + log.info("BASIN TRANSFER! BEANFT: {}, RECEIVER: {}", [event.params.tokenId.toI32().toString(), event.params.to.toHexString()]); + let from = event.params.from.toHexString(); + let to = event.params.to.toHexString(); + let tokenId = event.params.tokenId.toI32(); + transferHandler(from, to, tokenId, "basin"); } export function handleConsecutiveTransferBarnRaise(event: ConsecutiveTransferEventBarnRaise): void { - log.info("BARN RAISE CONSECUTIVE TRANSFER! FROM BEANFT {} TO {}, RECEIVER: {}", [event.params.fromTokenId.toString(), event.params.toTokenId.toString(), event.params.to.toHexString()]) - let fromTokenId = event.params.fromTokenId.toI32() - let toTokenId = event.params.toTokenId.toI32() - let from = event.params.from.toHexString() - let to = event.params.to.toHexString() - consecutiveTransferHandler(fromTokenId, toTokenId, from, to, 'barnraise') + log.info("BARN RAISE CONSECUTIVE TRANSFER! FROM BEANFT {} TO {}, RECEIVER: {}", [ + event.params.fromTokenId.toString(), + event.params.toTokenId.toString(), + event.params.to.toHexString() + ]); + let fromTokenId = event.params.fromTokenId.toI32(); + let toTokenId = event.params.toTokenId.toI32(); + let from = event.params.from.toHexString(); + let to = event.params.to.toHexString(); + consecutiveTransferHandler(fromTokenId, toTokenId, from, to, "barnraise"); } export function handleConsecutiveTransferBasin(event: ConsecutiveTransferEventBasin): void { - log.info("BASIN CONSECUTIVE TRANSFER! FROM BEANFT {} TO {}, RECEIVER: {}", [event.params.fromTokenId.toString(), event.params.toTokenId.toString(), event.params.to.toHexString()]) - let fromTokenId = event.params.fromTokenId.toI32() - let toTokenId = event.params.toTokenId.toI32() - let from = event.params.from.toHexString() - let to = event.params.to.toHexString() - consecutiveTransferHandler(fromTokenId, toTokenId, from, to, 'basin') + log.info("BASIN CONSECUTIVE TRANSFER! FROM BEANFT {} TO {}, RECEIVER: {}", [ + event.params.fromTokenId.toString(), + event.params.toTokenId.toString(), + event.params.to.toHexString() + ]); + let fromTokenId = event.params.fromTokenId.toI32(); + let toTokenId = event.params.toTokenId.toI32(); + let from = event.params.from.toHexString(); + let to = event.params.to.toHexString(); + consecutiveTransferHandler(fromTokenId, toTokenId, from, to, "basin"); } -function transferHandler(from:string, to:string, tokenId:i32, mode:string): void { - let source = BeaNFTUser.load(from) - let destination = BeaNFTUser.load(to) - if (source) { // If source is true this means it is a user wallet, as we make sure to not add the zero address as an user - if (mode === 'genesis') { - let nftIndex = source.genesis!.indexOf(tokenId) - let genesisNew = source.genesis - genesisNew!.splice(nftIndex, 1) - source.genesis = genesisNew - } else if (mode === 'winter') { - let nftIndex = source.winter!.indexOf(tokenId) - let winterNew = source.winter - winterNew!.splice(nftIndex, 1) - source.winter = winterNew - } else if (mode === 'barnraise') { - let nftIndex = source.barnRaise!.indexOf(tokenId) - let barnRaiseNew = source.barnRaise - barnRaiseNew!.splice(nftIndex, 1) - source.barnRaise = barnRaiseNew - } else if (mode === 'basin') { - let nftIndex = source.basin!.indexOf(tokenId) - let basinNew = source.basin - basinNew!.splice(nftIndex, 1) - source.basin = basinNew +function transferHandler(from: string, to: string, tokenId: i32, mode: string): void { + let source = BeaNFTUser.load(from); + let destination = BeaNFTUser.load(to); + if (source) { + // If source is true this means it is a user wallet, as we make sure to not add the zero address as an user + if (mode === "genesis") { + let nftIndex = source.genesis!.indexOf(tokenId); + let genesisNew = source.genesis; + genesisNew!.splice(nftIndex, 1); + source.genesis = genesisNew; + } else if (mode === "winter") { + let nftIndex = source.winter!.indexOf(tokenId); + let winterNew = source.winter; + winterNew!.splice(nftIndex, 1); + source.winter = winterNew; + } else if (mode === "barnraise") { + let nftIndex = source.barnRaise!.indexOf(tokenId); + let barnRaiseNew = source.barnRaise; + barnRaiseNew!.splice(nftIndex, 1); + source.barnRaise = barnRaiseNew; + } else if (mode === "basin") { + let nftIndex = source.basin!.indexOf(tokenId); + let basinNew = source.basin; + basinNew!.splice(nftIndex, 1); + source.basin = basinNew; } else { - log.critical("TRANSFER HANDLER - MODE MISSING", []) + log.critical("TRANSFER HANDLER - MODE MISSING", []); } - source.save() + source.save(); } else if (from == zeroAddress) { - log.info("NEW {} COLLECTION MINT! ID: {}", [mode.toUpperCase(), tokenId.toString()]) - let collectionData = CollectionData.load(mode) + log.info("NEW {} COLLECTION MINT! ID: {}", [mode.toUpperCase(), tokenId.toString()]); + let collectionData = CollectionData.load(mode); if (!collectionData) { - collectionData = new CollectionData(mode) - collectionData.minted = new Array() + collectionData = new CollectionData(mode); + collectionData.minted = new Array(); } - let mintedData = collectionData.minted - mintedData!.push(tokenId) - collectionData.minted = mintedData - collectionData.save() + let mintedData = collectionData.minted; + mintedData!.push(tokenId); + collectionData.minted = mintedData; + collectionData.save(); } - if (destination) { // If true we have indexed the receiver as an user already, just update the arrays - if (mode === 'genesis') { - let genesisNew = destination.genesis - genesisNew!.push(tokenId) - destination.genesis = genesisNew - } else if (mode === 'winter') { - let winterNew = destination.winter - winterNew!.push(tokenId) - destination.winter = winterNew - } else if (mode === 'barnraise') { - let barnRaiseNew = destination.barnRaise - barnRaiseNew!.push(tokenId) - destination.barnRaise = barnRaiseNew - } else if (mode === 'basin') { - let basinNew = destination.basin - basinNew!.push(tokenId) - destination.basin = basinNew + if (destination) { + // If true we have indexed the receiver as an user already, just update the arrays + if (mode === "genesis") { + let genesisNew = destination.genesis; + genesisNew!.push(tokenId); + destination.genesis = genesisNew; + } else if (mode === "winter") { + let winterNew = destination.winter; + winterNew!.push(tokenId); + destination.winter = winterNew; + } else if (mode === "barnraise") { + let barnRaiseNew = destination.barnRaise; + barnRaiseNew!.push(tokenId); + destination.barnRaise = barnRaiseNew; + } else if (mode === "basin") { + let basinNew = destination.basin; + basinNew!.push(tokenId); + destination.basin = basinNew; } else { - log.critical("TRANSFER HANDLER - MODE MISSING", []) + log.critical("TRANSFER HANDLER - MODE MISSING", []); } - destination.save() - } else if (to !== zeroAddress) { // This is a new user, so initialize the arrays. This check also makes sure we don't index the zero address - destination = new BeaNFTUser(to) - destination.id = to - destination.genesis = new Array() - destination.winter = new Array() - destination.barnRaise = new Array() - destination.basin = new Array() - if (mode === 'genesis') { - let genesisNew = destination.genesis - genesisNew!.push(tokenId) - destination.genesis = genesisNew - } else if (mode === 'winter') { - let winterNew = destination.winter - winterNew!.push(tokenId) - destination.winter = winterNew - } else if (mode === 'barnraise') { - let barnRaiseNew = destination.barnRaise - barnRaiseNew!.push(tokenId) - destination.barnRaise = barnRaiseNew - } else if (mode === 'basin') { - let basinNew = destination.basin - basinNew!.push(tokenId) - destination.basin = basinNew + destination.save(); + } else if (to !== zeroAddress) { + // This is a new user, so initialize the arrays. This check also makes sure we don't index the zero address + destination = new BeaNFTUser(to); + destination.id = to; + destination.genesis = new Array(); + destination.winter = new Array(); + destination.barnRaise = new Array(); + destination.basin = new Array(); + if (mode === "genesis") { + let genesisNew = destination.genesis; + genesisNew!.push(tokenId); + destination.genesis = genesisNew; + } else if (mode === "winter") { + let winterNew = destination.winter; + winterNew!.push(tokenId); + destination.winter = winterNew; + } else if (mode === "barnraise") { + let barnRaiseNew = destination.barnRaise; + barnRaiseNew!.push(tokenId); + destination.barnRaise = barnRaiseNew; + } else if (mode === "basin") { + let basinNew = destination.basin; + basinNew!.push(tokenId); + destination.basin = basinNew; } else { - log.critical("TRANSFER HANDLER - MODE MISSING", []) + log.critical("TRANSFER HANDLER - MODE MISSING", []); } - destination.save() + destination.save(); } } -function consecutiveTransferHandler(fromTokenId:i32, toTokenId:i32, from:string, to:string, mode:string): void { - let totalNFTsSent = (toTokenId - fromTokenId) + 1 +function consecutiveTransferHandler(fromTokenId: i32, toTokenId: i32, from: string, to: string, mode: string): void { + let totalNFTsSent = toTokenId - fromTokenId + 1; for (let i = 0; i < totalNFTsSent; i++) { - let sender = BeaNFTUser.load(from) - let receiver = BeaNFTUser.load(to) - let tokenId = fromTokenId + i + let sender = BeaNFTUser.load(from); + let receiver = BeaNFTUser.load(to); + let tokenId = fromTokenId + i; if (sender) { - if (mode === 'barnraise') { - let nftIndex = sender.barnRaise!.indexOf(tokenId) - let barnRaiseNew = sender.barnRaise - barnRaiseNew!.splice(nftIndex, 1) - sender.barnRaise = barnRaiseNew - } else if (mode === 'basin') { - let nftIndex = sender.basin!.indexOf(tokenId) - let basinNew = sender.basin - basinNew!.splice(nftIndex, 1) - sender.basin = basinNew + if (mode === "barnraise") { + let nftIndex = sender.barnRaise!.indexOf(tokenId); + let barnRaiseNew = sender.barnRaise; + barnRaiseNew!.splice(nftIndex, 1); + sender.barnRaise = barnRaiseNew; + } else if (mode === "basin") { + let nftIndex = sender.basin!.indexOf(tokenId); + let basinNew = sender.basin; + basinNew!.splice(nftIndex, 1); + sender.basin = basinNew; } - sender.save() + sender.save(); } else if (from == zeroAddress) { - log.info("NEW {} COLLECTION MINT! ID: {}", [mode.toUpperCase(), tokenId.toString()]) - let collectionData = CollectionData.load(mode) + log.info("NEW {} COLLECTION MINT! ID: {}", [mode.toUpperCase(), tokenId.toString()]); + let collectionData = CollectionData.load(mode); if (!collectionData) { - collectionData = new CollectionData(mode) - collectionData.minted = new Array() + collectionData = new CollectionData(mode); + collectionData.minted = new Array(); } - let mintedData = collectionData.minted - mintedData!.push(tokenId) - collectionData.minted = mintedData - collectionData.save() + let mintedData = collectionData.minted; + mintedData!.push(tokenId); + collectionData.minted = mintedData; + collectionData.save(); } if (receiver) { - if (mode === 'barnraise') { - let barnRaiseNew = receiver.barnRaise - barnRaiseNew!.push(tokenId) - receiver.barnRaise = barnRaiseNew - } else if (mode === 'basin') { - let basinNew = receiver.basin - basinNew!.push(tokenId) - receiver.basin = basinNew + if (mode === "barnraise") { + let barnRaiseNew = receiver.barnRaise; + barnRaiseNew!.push(tokenId); + receiver.barnRaise = barnRaiseNew; + } else if (mode === "basin") { + let basinNew = receiver.basin; + basinNew!.push(tokenId); + receiver.basin = basinNew; } - receiver.save() - } - else if (to !== zeroAddress) { - receiver = new BeaNFTUser(to) - receiver.id = to - receiver.genesis = new Array() - receiver.winter = new Array() - receiver.barnRaise = new Array() - receiver.basin = new Array() - if (mode === 'barnraise') { - let barnRaiseNew = receiver.barnRaise - barnRaiseNew!.push(tokenId) - receiver.barnRaise = barnRaiseNew - } else if (mode === 'basin') { - let basinNew = receiver.basin - basinNew!.push(tokenId) - receiver.basin = basinNew + receiver.save(); + } else if (to !== zeroAddress) { + receiver = new BeaNFTUser(to); + receiver.id = to; + receiver.genesis = new Array(); + receiver.winter = new Array(); + receiver.barnRaise = new Array(); + receiver.basin = new Array(); + if (mode === "barnraise") { + let barnRaiseNew = receiver.barnRaise; + barnRaiseNew!.push(tokenId); + receiver.barnRaise = barnRaiseNew; + } else if (mode === "basin") { + let basinNew = receiver.basin; + basinNew!.push(tokenId); + receiver.basin = basinNew; } - receiver.save() + receiver.save(); } } } diff --git a/projects/subgraph-beanstalk/README.md b/projects/subgraph-beanstalk/README.md index 32bc5b4a25..c7bbaa04b6 100644 --- a/projects/subgraph-beanstalk/README.md +++ b/projects/subgraph-beanstalk/README.md @@ -23,3 +23,7 @@ All currently used subgraphs live on a centralized host controlled by beanstalk ### Testing To test with Docker, the first time you will need to run `yarn run graph test -d`. This will build the `matchstick` Docker image. Then, you can use the `yarn testd` script to run all tests. Alternatively, use `yarn testd-named ...` to run specific tests. I have found running in Docker to be preferred since otherwise there can be issues with console output and some test cases fail silently. + +### Deploying + +When using graph cli commands, you will often need to specify which manifest file should be used. This is necessary to support multiple chains in the same codebase. The commands which need it will be evident - as they will fail when unable to find a `subgraph.yaml` file. In those commands, include `./manifest/${chain}.yaml` as the final argument to the command. See scripts inside `package.json` for examples. diff --git a/projects/subgraph-beanstalk/manifests/codegen-abis.yaml b/projects/subgraph-beanstalk/manifests/codegen-abis.yaml new file mode 100644 index 0000000000..d8170253b6 --- /dev/null +++ b/projects/subgraph-beanstalk/manifests/codegen-abis.yaml @@ -0,0 +1,52 @@ +# This file exists solely for the purpose of facilitating all codegen in a shared location such that all ABIs +# or templates are expanded independently of being used in all chains. Most of the information here is irrelevant, +# the only important part is in the `abis` and `templates` sections. +# - For abis, its only the list of abis that is relevant. The name of the dataSource is also visible. +# - For templates, it is only the name of the template that is relevant. +specVersion: 0.0.4 +schema: + file: ../schema.graphql +dataSources: + # Silo V3 + - kind: ethereum/contract + name: Beanstalk-ABIs + network: not_relevant + source: + address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" + abi: SiloV3 + startBlock: 17636279 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Silo-V3 + abis: + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: Replanted + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + - name: MarketV2 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json + - name: SiloV3 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP36.json + - name: BasinBip + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP37.json + - name: SeedGauge + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + - name: UniswapV2Pair + file: ../../subgraph-core/abis/UniswapV2Pair.json + - name: ERC20 + file: ../../subgraph-core/abis/ERC20.json + - name: CurvePrice + file: ../../subgraph-core/abis/CurvePrice.json + - name: BeanstalkPrice + file: ../../subgraph-core/abis/BeanstalkPrice.json + - name: CurvePrice + file: ../../subgraph-core/abis/CurvePrice.json + - name: Fertilizer + file: ../../subgraph-core/abis/Fertilizer.json + eventHandlers: + - event: AddDeposit(indexed address,indexed address,int96,uint256,uint256) + handler: handleAddDeposit_V3 + file: ../src/SiloHandler.ts diff --git a/projects/subgraph-beanstalk/subgraph.yaml b/projects/subgraph-beanstalk/manifests/ethereum.yaml similarity index 74% rename from projects/subgraph-beanstalk/subgraph.yaml rename to projects/subgraph-beanstalk/manifests/ethereum.yaml index ed61fb7904..c7e93d94d5 100644 --- a/projects/subgraph-beanstalk/subgraph.yaml +++ b/projects/subgraph-beanstalk/manifests/ethereum.yaml @@ -1,6 +1,6 @@ specVersion: 0.0.4 schema: - file: ./schema.graphql + file: ../schema.graphql dataSources: # Historical Cache loading - kind: ethereum/contract @@ -8,7 +8,7 @@ dataSources: network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -17,18 +17,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadToken1_1 - file: ./src/yield_cache/window_1/LoadToken_1.ts + file: ../src/yield_cache/window_1/LoadToken_1.ts - kind: ethereum/contract name: TokenCacheWindow1_2 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -37,18 +37,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadToken1_2 - file: ./src/yield_cache/window_1/LoadToken_2.ts + file: ../src/yield_cache/window_1/LoadToken_2.ts - kind: ethereum/contract name: SiloCacheWindow1_1 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -57,18 +57,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo1_1 - file: ./src/yield_cache/window_1/LoadSilo_1.ts + file: ../src/yield_cache/window_1/LoadSilo_1.ts - kind: ethereum/contract name: SiloCacheWindow1_2 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -77,18 +77,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo1_2 - file: ./src/yield_cache/window_1/LoadSilo_2.ts + file: ../src/yield_cache/window_1/LoadSilo_2.ts - kind: ethereum/contract name: SiloCacheWindow1_3 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -97,19 +97,19 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo1_3 - file: ./src/yield_cache/window_1/LoadSilo_3.ts + file: ../src/yield_cache/window_1/LoadSilo_3.ts # Window 2 - kind: ethereum/contract name: TokenCacheWindow2_1 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -118,18 +118,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadToken2_1 - file: ./src/yield_cache/window_2/LoadToken_1.ts + file: ../src/yield_cache/window_2/LoadToken_1.ts - kind: ethereum/contract name: TokenCacheWindow2_2 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -138,18 +138,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadToken2_2 - file: ./src/yield_cache/window_2/LoadToken_2.ts + file: ../src/yield_cache/window_2/LoadToken_2.ts - kind: ethereum/contract name: SiloCacheWindow2_1 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -158,18 +158,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo2_1 - file: ./src/yield_cache/window_2/LoadSilo_1.ts + file: ../src/yield_cache/window_2/LoadSilo_1.ts - kind: ethereum/contract name: SiloCacheWindow2_2 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -178,18 +178,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo2_2 - file: ./src/yield_cache/window_2/LoadSilo_2.ts + file: ../src/yield_cache/window_2/LoadSilo_2.ts - kind: ethereum/contract name: SiloCacheWindow2_3 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -198,19 +198,19 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo2_3 - file: ./src/yield_cache/window_2/LoadSilo_3.ts + file: ../src/yield_cache/window_2/LoadSilo_3.ts # Window 3 - kind: ethereum/contract name: TokenCacheWindow3_1 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -219,18 +219,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadToken3_1 - file: ./src/yield_cache/window_3/LoadToken_1.ts + file: ../src/yield_cache/window_3/LoadToken_1.ts - kind: ethereum/contract name: TokenCacheWindow3_2 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -239,18 +239,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadToken3_2 - file: ./src/yield_cache/window_3/LoadToken_2.ts + file: ../src/yield_cache/window_3/LoadToken_2.ts - kind: ethereum/contract name: SiloCacheWindow3_1 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -259,18 +259,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo3_1 - file: ./src/yield_cache/window_3/LoadSilo_1.ts + file: ../src/yield_cache/window_3/LoadSilo_1.ts - kind: ethereum/contract name: SiloCacheWindow3_2 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -279,18 +279,18 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo3_2 - file: ./src/yield_cache/window_3/LoadSilo_2.ts + file: ../src/yield_cache/window_3/LoadSilo_2.ts - kind: ethereum/contract name: SiloCacheWindow3_3 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -299,19 +299,19 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleLoadSilo3_3 - file: ./src/yield_cache/window_3/LoadSilo_3.ts + file: ../src/yield_cache/window_3/LoadSilo_3.ts # Silo V3 - kind: ethereum/contract name: Silo-V3 network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: SiloV3 startBlock: 17636279 # Placeholder mapping: kind: ethereum/events @@ -320,12 +320,12 @@ dataSources: entities: - Silo-V3 abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP36.json + - name: SiloV3 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP36.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: AddDeposit(indexed address,indexed address,int96,uint256,uint256) handler: handleAddDeposit_V3 @@ -337,14 +337,14 @@ dataSources: handler: handleWhitelistToken_V3 - event: UpdatedStalkPerBdvPerSeason(indexed address,uint32,uint32) handler: handleUpdatedStalkPerBdvPerSeason - file: ./src/SiloHandler.ts + file: ../src/SiloHandler.ts # Silo V2 / Replanted - kind: ethereum/contract name: Silo-Replanted network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: MarketV2 startBlock: 15277986 mapping: kind: ethereum/events @@ -353,12 +353,12 @@ dataSources: entities: - Silo-Replanted abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json + - name: MarketV2 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: AddDeposit(indexed address,indexed address,uint32,uint256,uint256) handler: handleAddDeposit @@ -382,14 +382,14 @@ dataSources: handler: handleWhitelistToken - event: DewhitelistToken(indexed address) handler: handleDewhitelistToken - file: ./src/SiloHandler.ts + file: ../src/SiloHandler.ts # Field - Original - kind: ethereum/contract name: Field network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -398,16 +398,16 @@ dataSources: entities: - Field abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: CurvePrice - file: ../subgraph-core/abis/CurvePrice.json + file: ../../subgraph-core/abis/CurvePrice.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json eventHandlers: - event: WeatherChange(indexed uint256,uint256,int8) handler: handleWeatherChange @@ -425,13 +425,13 @@ dataSources: handler: handleSupplyNeutral - event: FundFundraiser(indexed address,indexed uint32,uint256) handler: handleFundFundraiser - file: ./src/FieldHandler.ts + file: ../src/FieldHandler.ts - kind: ethereum/contract name: Season network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -440,12 +440,14 @@ dataSources: entities: - Season abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: Replanted + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: Sunrise(indexed uint256) handler: handleSunrise @@ -453,13 +455,13 @@ dataSources: handler: handleSeasonSnapshot - event: Incentivization(indexed address,uint256) handler: handleIncentive - file: ./src/SeasonHandler.ts + file: ../src/SeasonHandler.ts - kind: ethereum/contract name: Marketplace network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -468,12 +470,12 @@ dataSources: entities: - Season abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: PodListingCreated(indexed address,uint256,uint256,uint256,uint24,uint256,bool) handler: handlePodListingCreated @@ -489,13 +491,13 @@ dataSources: handler: handlePodOrderFilled - event: PodOrderCancelled(indexed address,bytes32) handler: handlePodOrderCancelled - file: ./src/MarketplaceHandler.ts + file: ../src/MarketplaceHandler.ts - kind: ethereum/contract name: Marketplace-Replanted network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: Replanted startBlock: 15277986 mapping: kind: ethereum/events @@ -504,22 +506,22 @@ dataSources: entities: - Marketplace-Replanted abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + - name: Replanted + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: PodListingCreated(indexed address,uint256,uint256,uint256,uint24,uint256,uint8) handler: handlePodListingCreated_v1_1 - file: ./src/MarketplaceHandler.ts + file: ../src/MarketplaceHandler.ts - kind: ethereum/contract name: Diamond network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: PreReplant startBlock: 12974075 mapping: kind: ethereum/events @@ -528,12 +530,12 @@ dataSources: entities: - Diamond abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: DiamondCut((address,uint8,bytes4[])[],address,bytes) handler: handleDiamondCut - file: ./src/DiamondHandler.ts + file: ../src/DiamondHandler.ts - kind: ethereum/contract name: Bean network: mainnet @@ -549,13 +551,13 @@ dataSources: - Bean abis: - name: ERC20 - file: ../subgraph-core/abis/ERC20.json - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + file: ../../subgraph-core/abis/ERC20.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleLegacyTransfer - file: ./src/BeanHandler.ts + file: ../src/BeanHandler.ts - kind: ethereum/contract name: Bean-Replanted network: mainnet @@ -571,19 +573,19 @@ dataSources: - Bean abis: - name: ERC20 - file: ../subgraph-core/abis/ERC20.json - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json + file: ../../subgraph-core/abis/ERC20.json + - name: PreReplant + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Pre-Replant.json eventHandlers: - event: Transfer(indexed address,indexed address,uint256) handler: handleTransfer - file: ./src/BeanHandler.ts + file: ../src/BeanHandler.ts - kind: ethereum/contract name: Replant network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: MarketV2 startBlock: 15277986 mapping: kind: ethereum/events @@ -592,22 +594,22 @@ dataSources: entities: - Replant abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json + - name: MarketV2 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: Chop(indexed address,indexed address,uint256,uint256) handler: handleChop - file: ./src/ReplantHandler.ts + file: ../src/ReplantHandler.ts - kind: ethereum/contract name: Season-Replanted network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: BasinBip startBlock: 15277986 mapping: kind: ethereum/events @@ -616,16 +618,16 @@ dataSources: entities: - Season-Replanted abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP37.json + - name: BasinBip + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP37.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json - name: CurvePrice - file: ../subgraph-core/abis/CurvePrice.json + file: ../../subgraph-core/abis/CurvePrice.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json eventHandlers: - event: Reward(indexed uint32,uint256,uint256,uint256) handler: handleReward @@ -635,7 +637,7 @@ dataSources: handler: handleWellOracle - event: Soil(indexed uint32,uint256) handler: handleSoil - file: ./src/SeasonHandler.ts + file: ../src/SeasonHandler.ts - kind: ethereum/contract name: Fertilizer network: mainnet @@ -651,21 +653,21 @@ dataSources: - Fertilizer abis: - name: Fertilizer - file: ../subgraph-core/abis/Fertilizer.json - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json + file: ../../subgraph-core/abis/Fertilizer.json + - name: MarketV2 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json eventHandlers: - event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[]) handler: handleTransferBatch - event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256) handler: handleTransferSingle - file: ./src/FertilizerHandler.ts + file: ../src/FertilizerHandler.ts - kind: ethereum/contract name: Farm network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: MarketV2 startBlock: 15277986 mapping: kind: ethereum/events @@ -674,20 +676,20 @@ dataSources: entities: - Farm abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json + - name: MarketV2 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: InternalBalanceChanged(indexed address,indexed address,int256) handler: handleInternalBalanceChanged - file: ./src/FarmHandler.ts + file: ../src/FarmHandler.ts - kind: ethereum/contract name: Silo-Calls network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: Replanted startBlock: 15277986 mapping: kind: ethereum/events @@ -696,22 +698,22 @@ dataSources: entities: - Silo abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json + - name: Replanted + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-Replanted.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json callHandlers: - function: transferDeposit(address,address,uint32,uint256) handler: handleTransferDepositCall - function: transferDeposits(address,address,uint32[],uint256[]) handler: handleTransferDepositsCall - file: ./src/SiloHandler.ts + file: ../src/SiloHandler.ts - kind: ethereum/contract name: BIP29-PodMarketplace network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: MarketV2 startBlock: 15277986 mapping: kind: ethereum/events @@ -720,12 +722,12 @@ dataSources: entities: - PodMarketplaceV2 abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json + - name: MarketV2 + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP29.json - name: UniswapV2Pair - file: ../subgraph-core/abis/UniswapV2Pair.json + file: ../../subgraph-core/abis/UniswapV2Pair.json - name: ERC20 - file: ../subgraph-core/abis/ERC20.json + file: ../../subgraph-core/abis/ERC20.json eventHandlers: - event: PodListingCreated(indexed address,uint256,uint256,uint256,uint24,uint256,uint256,bytes,uint8,uint8) handler: handlePodListingCreated_v2 @@ -735,13 +737,13 @@ dataSources: handler: handlePodOrderCreated_v2 - event: PodOrderFilled(indexed address,indexed address,bytes32,uint256,uint256,uint256,uint256) handler: handlePodOrderFilled_v2 - file: ./src/MarketplaceHandler.ts + file: ../src/MarketplaceHandler.ts - kind: ethereum/contract name: BIP45-SeedGauge network: mainnet source: address: "0xC1E088fC1323b20BCBee9bd1B9fC9546db5624C5" - abi: Beanstalk + abi: SeedGauge startBlock: 19628074 mapping: kind: ethereum/events @@ -750,10 +752,10 @@ dataSources: entities: - SeedGauge abis: - - name: Beanstalk - file: ../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json + - name: SeedGauge + file: ../../subgraph-core/abis/Beanstalk/Beanstalk-BIP45.json - name: BeanstalkPrice - file: ../subgraph-core/abis/BeanstalkPrice.json + file: ../../subgraph-core/abis/BeanstalkPrice.json eventHandlers: - event: TemperatureChange(indexed uint256,uint256,int8) handler: handleTemperatureChange @@ -775,9 +777,9 @@ dataSources: handler: handleWhitelistToken_BIP45 - event: UpdateGaugeSettings(indexed address,bytes4,bytes4,uint64) handler: handleUpdateGaugeSettings - file: ./src/GaugeHandler.ts + file: ../src/GaugeHandler.ts # features: # - grafting # graft: -# base: QmWHi6hu2wXnyxBHHmQHwCQLoq5KkoTX2qLm8MdyVXTyTu -# block: 20216425 +# base: QmcZq7RVCbzixsh7PoHCVKXHsXnpigNo7JWvzj6rUsuvPd +# block: 19393254 diff --git a/projects/subgraph-beanstalk/matchstick-docker.yaml b/projects/subgraph-beanstalk/matchstick-docker.yaml index 23882d1244..20008a5227 100644 --- a/projects/subgraph-beanstalk/matchstick-docker.yaml +++ b/projects/subgraph-beanstalk/matchstick-docker.yaml @@ -3,4 +3,4 @@ # subgraph has some dependencies on other projects in the repo. testsFolder: repo-mounted/projects/subgraph-beanstalk/tests libsFolder: repo-mounted/node_modules -manifestPath: repo-mounted/projects/subgraph-beanstalk/subgraph.yaml +manifestPath: repo-mounted/projects/subgraph-beanstalk/manifests/ethereum.yaml diff --git a/projects/subgraph-beanstalk/matchstick.yaml b/projects/subgraph-beanstalk/matchstick.yaml index 8851578cc6..551552dc01 100644 --- a/projects/subgraph-beanstalk/matchstick.yaml +++ b/projects/subgraph-beanstalk/matchstick.yaml @@ -1 +1,2 @@ libsFolder: ../../node_modules +manifestPath: ./manifests/ethereum.yaml diff --git a/projects/subgraph-beanstalk/package.json b/projects/subgraph-beanstalk/package.json index ad960aa053..288b489ac7 100644 --- a/projects/subgraph-beanstalk/package.json +++ b/projects/subgraph-beanstalk/package.json @@ -8,17 +8,17 @@ "directory": "projects/subgraph-beanstalk" }, "scripts": { - "codegen": "graph codegen", - "build": "graph build", + "codegen": "rm -rf ./generated && graph codegen ./manifests/codegen-abis.yaml", + "build": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph build ./manifests/$1.yaml", "test": "graph test", "testd": "docker run -it --rm --mount type=bind,source=\"$(pwd)\"/matchstick-docker.yaml,target=/matchstick/matchstick.yaml --mount type=bind,source=\"$(pwd)\"/../../,target=/matchstick/repo-mounted/ matchstick", "testd-named": "../subgraph-core/tests/scripts/docker-run-named.sh", - "create-local": "graph create --node http://127.0.0.1:8020/ beanstalk", - "remove-local": "graph remove --node http://127.0.0.1:8020/ beanstalk", - "deploy-local": "graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 beanstalk" + "create-local": "echo Using manifest at ./manifests/$1.yaml && graph create --node http://127.0.0.1:8020/ beanstalk_$1", + "remove-local": "echo Using manifest at ./manifests/$1.yaml && graph remove --node http://127.0.0.1:8020/ beanstalk_$1", + "deploy-local": "echo Using manifest at ./manifests/$1.yaml && yarn codegen && graph deploy --node http://127.0.0.1:8020/ --ipfs http://127.0.0.1:5001 beanstalk_$1 ./manifests/$1.yaml" }, "dependencies": { - "@graphprotocol/graph-cli": "0.69.0", + "@graphprotocol/graph-cli": "0.79.2", "@graphprotocol/graph-ts": "0.34.0" }, "devDependencies": { diff --git a/projects/subgraph-beanstalk/schema.graphql b/projects/subgraph-beanstalk/schema.graphql index aa8d569dbb..ee657640a4 100644 --- a/projects/subgraph-beanstalk/schema.graphql +++ b/projects/subgraph-beanstalk/schema.graphql @@ -328,7 +328,7 @@ type SiloYield @entity { "Sortable int field for season" season: Int! "Window used for vAPY calc" - window: EmaWindow! + emaWindow: EmaWindow! "Beta used for EMA" beta: BigDecimal! "u used for EMA" @@ -600,7 +600,7 @@ type Farmer @entity { plots: [Plot!]! @derivedFrom(field: "farmer") listings: [PodListing!]! @derivedFrom(field: "farmer") orders: [PodOrder!]! @derivedFrom(field: "farmer") - fills: [PodFill!]! @derivedFrom(field: "to") + fills: [PodFill!]! @derivedFrom(field: "toFarmer") fertilizers: [FertilizerBalance!]! @derivedFrom(field: "farmer") } @@ -1151,9 +1151,9 @@ type PodFill @entity { "Associated order, if any" order: PodOrder "Account that is sending pods" - from: String! # These are already referenced via the listing and order entities. + fromFarmer: String! # These are already referenced via the listing and order entities. "Account that is receiving pods" - to: Farmer! + toFarmer: Farmer! "Number of pods filled" amount: BigInt! "Where these pods were in line when filled" @@ -1212,7 +1212,7 @@ type FertilizerYield @entity { "Current season" season: Int! "Bean EMA Window" - window: EmaWindow! + emaWindow: EmaWindow! "Current humidity" humidity: BigDecimal! "Current outstanding fert" @@ -1296,9 +1296,9 @@ type PodTransfer implements FieldEvent @entity(immutable: true) { " The protocol this transaction belongs to " protocol: Beanstalk! " Address that received the pods " - to: String! + toFarmer: String! " Address that sent the pods " - from: String! + fromFarmer: String! " Index of the pods sent" index: BigInt! " Total pods being sent" @@ -1586,9 +1586,9 @@ type PodListingFilled implements MarketplaceEvent @entity(immutable: true) { " Historical ID for joins" historyID: String! "Account selling pods" - from: String! + fromFarmer: String! "Account buying pods" - to: String! + toFarmer: String! "Where these pods were in line when filled" placeInLine: BigInt! "Index of the plot transferred" @@ -1675,9 +1675,9 @@ type PodOrderFilled implements MarketplaceEvent @entity(immutable: true) { " Historical ID for joins" historyID: String! "Account selling pods" - from: String! + fromFarmer: String! "Account buying pods" - to: String! + toFarmer: String! "Where these pods were in line when filled" placeInLine: BigInt! "Index of the plot transferred" diff --git a/projects/subgraph-beanstalk/src/BeanHandler.ts b/projects/subgraph-beanstalk/src/BeanHandler.ts index aa673f042b..7c77aa0ed8 100644 --- a/projects/subgraph-beanstalk/src/BeanHandler.ts +++ b/projects/subgraph-beanstalk/src/BeanHandler.ts @@ -1,6 +1,6 @@ import { BigDecimal, BigInt, log } from "@graphprotocol/graph-ts"; -import { Transfer as LegacyTransfer } from "../generated/Bean/ERC20"; -import { Transfer } from "../generated/Bean-Replanted/ERC20"; +import { Transfer as LegacyTransfer } from "../generated/Beanstalk-ABIs/ERC20"; +import { Transfer } from "../generated/Beanstalk-ABIs/ERC20"; import { ADDRESS_ZERO, BEANSTALK } from "../../subgraph-core/utils/Constants"; import { loadSeason } from "./utils/Season"; import { toDecimal, ZERO_BI } from "../../subgraph-core/utils/Decimals"; diff --git a/projects/subgraph-beanstalk/src/DiamondHandler.ts b/projects/subgraph-beanstalk/src/DiamondHandler.ts index 374d3ad7b1..338e18afac 100644 --- a/projects/subgraph-beanstalk/src/DiamondHandler.ts +++ b/projects/subgraph-beanstalk/src/DiamondHandler.ts @@ -1,4 +1,4 @@ -import { DiamondCut } from "../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "./utils/Beanstalk"; export function handleDiamondCut(event: DiamondCut): void { diff --git a/projects/subgraph-beanstalk/src/FarmHandler.ts b/projects/subgraph-beanstalk/src/FarmHandler.ts index 003f893fca..4ca457deb7 100644 --- a/projects/subgraph-beanstalk/src/FarmHandler.ts +++ b/projects/subgraph-beanstalk/src/FarmHandler.ts @@ -1,5 +1,5 @@ import { Address, BigInt } from "@graphprotocol/graph-ts"; -import { InternalBalanceChanged } from "../generated/Farm/Beanstalk"; +import { InternalBalanceChanged } from "../generated/Beanstalk-ABIs/MarketV2"; import { loadBeanstalk } from "./utils/Beanstalk"; import { BEANSTALK } from "../../subgraph-core/utils/Constants"; import { loadSiloAsset, loadSiloAssetDailySnapshot, loadSiloAssetHourlySnapshot } from "./utils/SiloEntities"; diff --git a/projects/subgraph-beanstalk/src/FertilizerHandler.ts b/projects/subgraph-beanstalk/src/FertilizerHandler.ts index 981e00a5f4..3d442411e8 100644 --- a/projects/subgraph-beanstalk/src/FertilizerHandler.ts +++ b/projects/subgraph-beanstalk/src/FertilizerHandler.ts @@ -1,5 +1,5 @@ import { Address, BigInt, log } from "@graphprotocol/graph-ts"; -import { TransferSingle, TransferBatch } from "../generated/Fertilizer/Fertilizer"; +import { TransferSingle, TransferBatch } from "../generated/Beanstalk-ABIs/Fertilizer"; import { ADDRESS_ZERO, FERTILIZER } from "../../subgraph-core/utils/Constants"; import { loadFertilizer, loadFertilizerBalance, loadFertilizerToken } from "./utils/Fertilizer"; import { loadFarmer } from "./utils/Farmer"; diff --git a/projects/subgraph-beanstalk/src/FieldHandler.ts b/projects/subgraph-beanstalk/src/FieldHandler.ts index 5c16d48342..4f024e9d66 100644 --- a/projects/subgraph-beanstalk/src/FieldHandler.ts +++ b/projects/subgraph-beanstalk/src/FieldHandler.ts @@ -8,7 +8,7 @@ import { SupplyIncrease, SupplyNeutral, WeatherChange -} from "../generated/Field/Beanstalk"; +} from "../generated/Beanstalk-ABIs/PreReplant"; import { Harvest as HarvestEntity } from "../generated/schema"; import { BEANSTALK, BEANSTALK_FARMS } from "../../subgraph-core/utils/Constants"; import { BI_10, ZERO_BI } from "../../subgraph-core/utils/Decimals"; diff --git a/projects/subgraph-beanstalk/src/GaugeHandler.ts b/projects/subgraph-beanstalk/src/GaugeHandler.ts index 1ddb53077b..c887572ce0 100644 --- a/projects/subgraph-beanstalk/src/GaugeHandler.ts +++ b/projects/subgraph-beanstalk/src/GaugeHandler.ts @@ -9,7 +9,7 @@ import { WhitelistToken, TotalGerminatingStalkChanged, TotalStalkChangedFromGermination -} from "../generated/BIP45-SeedGauge/Beanstalk"; +} from "../generated/Beanstalk-ABIs/SeedGauge"; import { handleRateChange } from "./utils/Field"; import { loadSilo, @@ -17,7 +17,8 @@ import { loadSiloDailySnapshot, loadWhitelistTokenSetting, loadWhitelistTokenDailySnapshot, - loadWhitelistTokenHourlySnapshot + loadWhitelistTokenHourlySnapshot, + addToSiloWhitelist } from "./utils/SiloEntities"; import { deleteGerminating, loadGerminating, loadOrCreateGerminating } from "./utils/Germinating"; import { BI_10, ZERO_BI } from "../../subgraph-core/utils/Decimals"; @@ -180,6 +181,8 @@ export function handleTotalStalkChangedFromGermination(event: TotalStalkChangedF // WHITELIST / GAUGE CONFIGURATION SETTINGS // export function handleWhitelistToken_BIP45(event: WhitelistToken): void { + addToSiloWhitelist(event.address, event.params.token); + let siloSettings = loadWhitelistTokenSetting(event.params.token); siloSettings.selector = event.params.selector; diff --git a/projects/subgraph-beanstalk/src/MarketplaceHandler.ts b/projects/subgraph-beanstalk/src/MarketplaceHandler.ts index f6f0d11348..05e3fdb7e5 100644 --- a/projects/subgraph-beanstalk/src/MarketplaceHandler.ts +++ b/projects/subgraph-beanstalk/src/MarketplaceHandler.ts @@ -6,14 +6,14 @@ import { PodOrderCancelled, PodOrderCreated as PodOrderCreated_v1, PodOrderFilled as PodOrderFilled_v1 -} from "../generated/Field/Beanstalk"; -import { PodListingCreated as PodListingCreated_v1_1 } from "../generated/Marketplace-Replanted/Beanstalk"; +} from "../generated/Beanstalk-ABIs/PreReplant"; +import { PodListingCreated as PodListingCreated_v1_1 } from "../generated/Beanstalk-ABIs/Replanted"; import { PodListingCreated as PodListingCreated_v2, PodListingFilled as PodListingFilled_v2, PodOrderCreated as PodOrderCreated_v2, PodOrderFilled as PodOrderFilled_v2 -} from "../generated/BIP29-PodMarketplace/Beanstalk"; +} from "../generated/Beanstalk-ABIs/MarketV2"; import { Plot, @@ -455,8 +455,8 @@ function podListingFilled(params: MarketFillParams): void { let fill = loadPodFill(params.event.address, params.index, params.event.transaction.hash.toHexString()); fill.createdAt = params.event.block.timestamp; fill.listing = listing.id; - fill.from = params.from.toHexString(); - fill.to = params.to.toHexString(); + fill.fromFarmer = params.from.toHexString(); + fill.toFarmer = params.to.toHexString(); fill.amount = params.amount; fill.placeInLine = params.index.plus(params.start).minus(getHarvestableIndex(params.event.address)); fill.index = params.index; @@ -476,8 +476,8 @@ function podListingFilled(params: MarketFillParams): void { rawEvent.logIndex = params.event.logIndex.toI32(); rawEvent.protocol = params.event.address.toHexString(); rawEvent.historyID = originalHistoryID; - rawEvent.from = params.from.toHexString(); - rawEvent.to = params.to.toHexString(); + rawEvent.fromFarmer = params.from.toHexString(); + rawEvent.toFarmer = params.to.toHexString(); rawEvent.placeInLine = fill.placeInLine; rawEvent.index = params.index; rawEvent.start = params.start; @@ -550,8 +550,8 @@ function podOrderFilled(params: MarketFillParams): void { fill.createdAt = params.event.block.timestamp; fill.order = order.id; - fill.from = params.from.toHexString(); - fill.to = params.to.toHexString(); + fill.fromFarmer = params.from.toHexString(); + fill.toFarmer = params.to.toHexString(); fill.amount = params.amount; fill.placeInLine = params.index.plus(params.start).minus(getHarvestableIndex(params.event.address)); fill.index = params.index; @@ -574,8 +574,8 @@ function podOrderFilled(params: MarketFillParams): void { rawEvent.logIndex = params.event.logIndex.toI32(); rawEvent.protocol = params.event.address.toHexString(); rawEvent.historyID = order.historyID; - rawEvent.from = params.from.toHexString(); - rawEvent.to = params.to.toHexString(); + rawEvent.fromFarmer = params.from.toHexString(); + rawEvent.toFarmer = params.to.toHexString(); rawEvent.placeInLine = params.index.plus(params.start).minus(getHarvestableIndex(params.event.address)); rawEvent.index = params.index; rawEvent.start = params.start; diff --git a/projects/subgraph-beanstalk/src/ReplantHandler.ts b/projects/subgraph-beanstalk/src/ReplantHandler.ts index 776355ff53..56f90b3393 100644 --- a/projects/subgraph-beanstalk/src/ReplantHandler.ts +++ b/projects/subgraph-beanstalk/src/ReplantHandler.ts @@ -1,5 +1,5 @@ import { Chop as ChopEntity } from "../generated/schema"; -import { Chop } from "../generated/Replant/Beanstalk"; +import { Chop } from "../generated/Beanstalk-ABIs/MarketV2"; export function handleChop(event: Chop): void { let id = "chop-" + event.transaction.hash.toHexString() + "-" + event.transactionLogIndex.toString(); diff --git a/projects/subgraph-beanstalk/src/SeasonHandler.ts b/projects/subgraph-beanstalk/src/SeasonHandler.ts index 2713041219..bb4efee92e 100644 --- a/projects/subgraph-beanstalk/src/SeasonHandler.ts +++ b/projects/subgraph-beanstalk/src/SeasonHandler.ts @@ -1,13 +1,13 @@ import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts"; -import { MetapoolOracle, Reward, Soil, Incentivization, WellOracle } from "../generated/Season-Replanted/Beanstalk"; -import { CurvePrice } from "../generated/Season-Replanted/CurvePrice"; -import { SeasonSnapshot, Sunrise, Beanstalk } from "../generated/Season/Beanstalk"; +import { MetapoolOracle, Reward, Soil, WellOracle } from "../generated/Beanstalk-ABIs/BasinBip"; +import { CurvePrice } from "../generated/Beanstalk-ABIs/CurvePrice"; +import { SeasonSnapshot, Sunrise, Incentivization, PreReplant } from "../generated/Beanstalk-ABIs/PreReplant"; import { Incentive } from "../generated/schema"; import { updateHarvestablePlots } from "./FieldHandler"; import { loadBeanstalk } from "./utils/Beanstalk"; import { Reward as RewardEntity, MetapoolOracle as MetapoolOracleEntity, WellOracle as WellOracleEntity } from "../generated/schema"; -import { BEANSTALK, BEANSTALK_PRICE_1, BEAN_ERC20, CURVE_PRICE, GAUGE_BIP45_BLOCK } from "../../subgraph-core/utils/Constants"; -import { ONE_BI, toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; +import { BEANSTALK, BEAN_ERC20, CURVE_PRICE, GAUGE_BIP45_BLOCK } from "../../subgraph-core/utils/Constants"; +import { toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; import { loadField, loadFieldDaily, loadFieldHourly } from "./utils/Field"; import { loadPodMarketplace, @@ -25,7 +25,6 @@ import { loadSiloAssetDailySnapshot, loadSiloAssetHourlySnapshot } from "./utils/SiloEntities"; -import { BeanstalkPrice } from "../generated/Season-Replanted/BeanstalkPrice"; import { BeanstalkPrice_try_price, getBeanstalkPrice } from "./utils/BeanstalkPrice"; export function handleSunrise(event: Sunrise): void { @@ -239,7 +238,7 @@ export function handleIncentive(event: Incentivization): void { // Update market cap for season let beanstalk = loadBeanstalk(event.address); - let beanstalk_contract = Beanstalk.bind(BEANSTALK); + let beanstalk_contract = PreReplant.bind(BEANSTALK); let season = loadSeason(event.address, BigInt.fromI32(beanstalk.lastSeason)); season.marketCap = season.price.times(toDecimal(season.beans)); diff --git a/projects/subgraph-beanstalk/src/SiloHandler.ts b/projects/subgraph-beanstalk/src/SiloHandler.ts index 74e6da7103..b41680780a 100644 --- a/projects/subgraph-beanstalk/src/SiloHandler.ts +++ b/projects/subgraph-beanstalk/src/SiloHandler.ts @@ -11,15 +11,15 @@ import { Plant, WhitelistToken, DewhitelistToken -} from "../generated/Silo-Replanted/Beanstalk"; +} from "../generated/Beanstalk-ABIs/MarketV2"; import { AddDeposit as AddDeposit_V3, RemoveDeposit as RemoveDeposit_V3, RemoveDeposits as RemoveDeposits_V3, UpdatedStalkPerBdvPerSeason, WhitelistToken as WhitelistToken_V3 -} from "../generated/Silo-V3/Beanstalk"; -import { Beanstalk, TransferDepositCall, TransferDepositsCall } from "../generated/Silo-Calls/Beanstalk"; +} from "../generated/Beanstalk-ABIs/SiloV3"; +import { Replanted, TransferDepositCall, TransferDepositsCall } from "../generated/Beanstalk-ABIs/Replanted"; import { ZERO_BI } from "../../subgraph-core/utils/Decimals"; import { loadFarmer } from "./utils/Farmer"; import { @@ -34,7 +34,8 @@ import { loadSiloDepositV3, loadWhitelistTokenSetting, loadWhitelistTokenHourlySnapshot, - loadWhitelistTokenDailySnapshot + loadWhitelistTokenDailySnapshot, + addToSiloWhitelist } from "./utils/SiloEntities"; import { AddDeposit as AddDepositEntity, @@ -45,7 +46,7 @@ import { StalkChange } from "../generated/schema"; import { loadBeanstalk } from "./utils/Beanstalk"; -import { BEANSTALK, BEAN_ERC20, UNRIPE_BEAN, UNRIPE_BEAN_3CRV } from "../../subgraph-core/utils/Constants"; +import { BEANSTALK, BEAN_ERC20 } from "../../subgraph-core/utils/Constants"; import { getCurrentSeason } from "./utils/Season"; /** @@ -882,7 +883,7 @@ export function updateStalkWithCalls(season: i32, timestamp: BigInt, blockNumber // This should be run at sunrise for the previous season to update any farmers stalk/seed/roots balances from silo transfers. let beanstalk = loadBeanstalk(BEANSTALK); - let beanstalk_call = Beanstalk.bind(BEANSTALK); + let beanstalk_call = Replanted.bind(BEANSTALK); for (let i = 0; i < beanstalk.farmersToUpdate.length; i++) { let account = Address.fromString(beanstalk.farmersToUpdate[i]); @@ -903,11 +904,7 @@ export function updateStalkWithCalls(season: i32, timestamp: BigInt, blockNumber } export function handleWhitelistToken(event: WhitelistToken): void { - let silo = loadSilo(event.address); - let currentList = silo.whitelistedTokens; - currentList.push(event.params.token.toHexString()); - silo.whitelistedTokens = currentList; - silo.save(); + addToSiloWhitelist(event.address, event.params.token); let setting = loadWhitelistTokenSetting(event.params.token); setting.selector = event.params.selector; @@ -933,12 +930,7 @@ export function handleWhitelistToken(event: WhitelistToken): void { } export function handleWhitelistToken_V3(event: WhitelistToken_V3): void { - let silo = loadSilo(event.address); - let currentList = silo.whitelistedTokens; - - currentList.push(event.params.token.toHexString()); - silo.whitelistedTokens = currentList; - silo.save(); + addToSiloWhitelist(event.address, event.params.token); let setting = loadWhitelistTokenSetting(event.params.token); setting.selector = event.params.selector; diff --git a/projects/subgraph-beanstalk/src/YieldHandler.ts b/projects/subgraph-beanstalk/src/YieldHandler.ts index 56bba2de5b..5ec8ca83c4 100644 --- a/projects/subgraph-beanstalk/src/YieldHandler.ts +++ b/projects/subgraph-beanstalk/src/YieldHandler.ts @@ -1,7 +1,7 @@ import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts"; -import { Beanstalk } from "../generated/Season-Replanted/Beanstalk"; +import { BasinBip } from "../generated/Beanstalk-ABIs/BasinBip"; import { BEANSTALK, BEAN_ERC20, FERTILIZER } from "../../subgraph-core/utils/Constants"; -import { ONE_BD, toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; +import { toDecimal, ZERO_BD, ZERO_BI } from "../../subgraph-core/utils/Decimals"; import { loadFertilizer } from "./utils/Fertilizer"; import { loadFertilizerYield } from "./utils/FertilizerYield"; import { @@ -403,7 +403,7 @@ export function calculateGaugeVAPYs( } if (gaugeLpPoints.length > 1) { - for (let j = 0; j < gaugeLpDepositedBdvCopy.length; ++i) { + for (let j = 0; j < gaugeLpDepositedBdvCopy.length; ++j) { gaugeLpPointsCopy[j] = updateGaugePoints( gaugeLpPointsCopy[j], currentPercentLpBdv[j], @@ -458,7 +458,7 @@ function updateFertAPY(t: i32, timestamp: BigInt, window: i32): void { let siloYield = loadSiloYield(t, window); let fertilizerYield = loadFertilizerYield(t, window); let fertilizer = loadFertilizer(FERTILIZER); - let beanstalk = Beanstalk.bind(BEANSTALK); + let beanstalk = BasinBip.bind(BEANSTALK); if (t < 6534) { let currentFertHumidity = beanstalk.try_getCurrentHumidity(); fertilizerYield.humidity = BigDecimal.fromString(currentFertHumidity.reverted ? "500" : currentFertHumidity.value.toString()).div( diff --git a/projects/subgraph-beanstalk/src/utils/BeanstalkPrice.ts b/projects/subgraph-beanstalk/src/utils/BeanstalkPrice.ts index dde78e9c95..32c07e9ac8 100644 --- a/projects/subgraph-beanstalk/src/utils/BeanstalkPrice.ts +++ b/projects/subgraph-beanstalk/src/utils/BeanstalkPrice.ts @@ -4,8 +4,8 @@ import { BeanstalkPrice, BeanstalkPrice__priceResultPPsStruct, BeanstalkPrice__priceResultPStruct -} from "../../generated/Field/BeanstalkPrice"; -import { BEANSTALK_PRICE_1, BEANSTALK_PRICE_2, PRICE_1_BLOCK, PRICE_2_BLOCK } from "../../../subgraph-core/utils/Constants"; +} from "../../generated/Beanstalk-ABIs/BeanstalkPrice"; +import { BEANSTALK_PRICE_1, BEANSTALK_PRICE_2, PRICE_2_BLOCK } from "../../../subgraph-core/utils/Constants"; import { ZERO_BI } from "../../../subgraph-core/utils/Decimals"; import { loadSilo } from "./SiloEntities"; diff --git a/projects/subgraph-beanstalk/src/utils/Fertilizer.ts b/projects/subgraph-beanstalk/src/utils/Fertilizer.ts index cbc05f32da..9e3df51e65 100644 --- a/projects/subgraph-beanstalk/src/utils/Fertilizer.ts +++ b/projects/subgraph-beanstalk/src/utils/Fertilizer.ts @@ -1,8 +1,8 @@ import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts"; import { Farmer, Fertilizer, FertilizerBalance, FertilizerToken } from "../../generated/schema"; -import { ZERO_BD, ZERO_BI } from "../../../subgraph-core/utils/Decimals"; -import { BEANSTALK, INITIAL_HUMIDITY } from "../../../subgraph-core/utils/Constants"; -import { Beanstalk } from "../../generated/Fertilizer/Beanstalk"; +import { ZERO_BI } from "../../../subgraph-core/utils/Decimals"; +import { BEANSTALK } from "../../../subgraph-core/utils/Constants"; +import { MarketV2 } from "../../generated/Beanstalk-ABIs/MarketV2"; export function loadFertilizer(fertilizerAddress: Address): Fertilizer { let fertilizer = Fertilizer.load(fertilizerAddress.toHexString()); @@ -17,7 +17,7 @@ export function loadFertilizer(fertilizerAddress: Address): Fertilizer { export function loadFertilizerToken(fertilizer: Fertilizer, id: BigInt, blockNumber: BigInt): FertilizerToken { let fertilizerToken = FertilizerToken.load(id.toString()); if (fertilizerToken == null) { - let beanstalk = Beanstalk.bind(BEANSTALK); + let beanstalk = MarketV2.bind(BEANSTALK); fertilizerToken = new FertilizerToken(id.toString()); fertilizerToken.fertilizer = fertilizer.id; if (blockNumber.gt(BigInt.fromString("15278963"))) { diff --git a/projects/subgraph-beanstalk/src/utils/FertilizerYield.ts b/projects/subgraph-beanstalk/src/utils/FertilizerYield.ts index b6a836d472..46e067067f 100644 --- a/projects/subgraph-beanstalk/src/utils/FertilizerYield.ts +++ b/projects/subgraph-beanstalk/src/utils/FertilizerYield.ts @@ -14,11 +14,11 @@ export function loadFertilizerYield(season: i32, window: i32): FertilizerYield { fertilizerYield.createdAt = ZERO_BI; if (window == 24) { - fertilizerYield.window = "ROLLING_24_HOUR"; + fertilizerYield.emaWindow = "ROLLING_24_HOUR"; } else if (window == 168) { - fertilizerYield.window = "ROLLING_7_DAY"; + fertilizerYield.emaWindow = "ROLLING_7_DAY"; } else if (window == 720) { - fertilizerYield.window = "ROLLING_30_DAY"; + fertilizerYield.emaWindow = "ROLLING_30_DAY"; } fertilizerYield.save(); diff --git a/projects/subgraph-beanstalk/src/utils/Field.ts b/projects/subgraph-beanstalk/src/utils/Field.ts index beb409477f..5fffd2728d 100644 --- a/projects/subgraph-beanstalk/src/utils/Field.ts +++ b/projects/subgraph-beanstalk/src/utils/Field.ts @@ -2,10 +2,9 @@ import { Address, BigInt, BigDecimal, ethereum } from "@graphprotocol/graph-ts"; import { Field, FieldDailySnapshot, FieldHourlySnapshot } from "../../generated/schema"; import { dayFromTimestamp } from "./Dates"; import { BI_MAX, ONE_BD, toDecimal, ZERO_BD, ZERO_BI } from "../../../subgraph-core/utils/Decimals"; -import { BEANSTALK, BEANSTALK_PRICE_1, CURVE_PRICE } from "../../../subgraph-core/utils/Constants"; +import { BEANSTALK, CURVE_PRICE } from "../../../subgraph-core/utils/Constants"; import { loadSeason } from "./Season"; -import { CurvePrice } from "../../generated/Field/CurvePrice"; -import { BeanstalkPrice } from "../../generated/Field/BeanstalkPrice"; +import { CurvePrice } from "../../generated/Beanstalk-ABIs/CurvePrice"; import { BeanstalkPrice_try_price } from "./BeanstalkPrice"; // This function is for handling both the WeatherChange and TemperatureChange events. diff --git a/projects/subgraph-beanstalk/src/utils/PodFill.ts b/projects/subgraph-beanstalk/src/utils/PodFill.ts index 6f1f3bcad6..c882ab7f57 100644 --- a/projects/subgraph-beanstalk/src/utils/PodFill.ts +++ b/projects/subgraph-beanstalk/src/utils/PodFill.ts @@ -9,8 +9,8 @@ export function loadPodFill(diamondAddress: Address, index: BigInt, hash: String fill = new PodFill(id); fill.podMarketplace = diamondAddress.toHexString(); fill.createdAt = ZERO_BI; - fill.from = ""; - fill.to = ""; + fill.fromFarmer = ""; + fill.toFarmer = ""; fill.placeInLine = ZERO_BI; fill.amount = ZERO_BI; fill.index = ZERO_BI; diff --git a/projects/subgraph-beanstalk/src/utils/PodMarketplace.ts b/projects/subgraph-beanstalk/src/utils/PodMarketplace.ts index 9489441d47..d039d6a02b 100644 --- a/projects/subgraph-beanstalk/src/utils/PodMarketplace.ts +++ b/projects/subgraph-beanstalk/src/utils/PodMarketplace.ts @@ -3,7 +3,7 @@ import { PodMarketplace, PodMarketplaceHourlySnapshot, PodMarketplaceDailySnapsh import { dayFromTimestamp } from "./Dates"; import { ZERO_BI } from "../../../subgraph-core/utils/Decimals"; import { loadField } from "./Field"; -import { expirePodListingIfExists, loadPodListing } from "./PodListing"; +import { expirePodListingIfExists } from "./PodListing"; export enum MarketplaceAction { CREATED, diff --git a/projects/subgraph-beanstalk/src/utils/PodTransfer.ts b/projects/subgraph-beanstalk/src/utils/PodTransfer.ts index 6288fdd895..edc24d3e0b 100644 --- a/projects/subgraph-beanstalk/src/utils/PodTransfer.ts +++ b/projects/subgraph-beanstalk/src/utils/PodTransfer.ts @@ -1,4 +1,4 @@ -import { PlotTransfer } from "../../generated/Field/Beanstalk"; +import { PlotTransfer } from "../../generated/Beanstalk-ABIs/PreReplant"; import { PodTransfer } from "../../generated/schema"; export function savePodTransfer(event: PlotTransfer): void { @@ -7,8 +7,8 @@ export function savePodTransfer(event: PlotTransfer): void { transfer.hash = event.transaction.hash.toHexString(); transfer.logIndex = event.transactionLogIndex.toI32(); transfer.protocol = event.address.toHexString(); - transfer.to = event.params.to.toHexString(); - transfer.from = event.params.from.toHexString(); + transfer.toFarmer = event.params.to.toHexString(); + transfer.fromFarmer = event.params.from.toHexString(); transfer.index = event.params.id; transfer.pods = event.params.pods; transfer.blockNumber = event.block.number; diff --git a/projects/subgraph-beanstalk/src/utils/SiloEntities.ts b/projects/subgraph-beanstalk/src/utils/SiloEntities.ts index baf767563e..f3178e1f7e 100644 --- a/projects/subgraph-beanstalk/src/utils/SiloEntities.ts +++ b/projects/subgraph-beanstalk/src/utils/SiloEntities.ts @@ -182,6 +182,14 @@ export function loadSiloAssetDailySnapshot(account: Address, token: Address, tim /* ===== Whitelist Token Settings Entities ===== */ +export function addToSiloWhitelist(siloAddress: Address, token: Address): void { + let silo = loadSilo(siloAddress); + let currentList = silo.whitelistedTokens; + currentList.push(token.toHexString()); + silo.whitelistedTokens = currentList; + silo.save(); +} + export function loadWhitelistTokenSetting(token: Address): WhitelistTokenSetting { let setting = WhitelistTokenSetting.load(token); if (setting == null) { @@ -336,11 +344,11 @@ export function loadSiloYield(season: i32, window: i32): SiloYield { siloYield.createdAt = ZERO_BI; if (window == 24) { - siloYield.window = "ROLLING_24_HOUR"; + siloYield.emaWindow = "ROLLING_24_HOUR"; } else if (window == 168) { - siloYield.window = "ROLLING_7_DAY"; + siloYield.emaWindow = "ROLLING_7_DAY"; } else if (window == 720) { - siloYield.window = "ROLLING_30_DAY"; + siloYield.emaWindow = "ROLLING_30_DAY"; } siloYield.save(); } diff --git a/projects/subgraph-beanstalk/src/utils/Token.ts b/projects/subgraph-beanstalk/src/utils/Token.ts index dfe5cf94f2..d85f3fb315 100644 --- a/projects/subgraph-beanstalk/src/utils/Token.ts +++ b/projects/subgraph-beanstalk/src/utils/Token.ts @@ -1,5 +1,5 @@ import { Address } from "@graphprotocol/graph-ts"; -import { ERC20 } from "../../generated/Bean/ERC20"; +import { ERC20 } from "../../generated/Beanstalk-ABIs/ERC20"; import { Token } from "../../generated/schema"; import { ZERO_BD, ZERO_BI } from "./Decimals"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_1.ts b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_1.ts index c8c063c217..4579daa4be 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_1.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_1.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_24_HOUR_10_000 } from "./HistoricSilo_10_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_2.ts b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_2.ts index 9389ffaf3e..dae3a046c6 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_2.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_2.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_24_HOUR_15_000 } from "./HistoricSilo_15_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_3.ts b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_3.ts index 35a9596a99..607d193fd6 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_3.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadSilo_3.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_24_HOUR_20_000 } from "./HistoricSilo_20_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_1.ts b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_1.ts index ddd12a32c6..e997119726 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_1.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_1.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadTokenCache } from "../CacheLoader"; import { TOKEN_YIELD_24_HOUR_12_000 } from "./HistoricToken_12_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_2.ts b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_2.ts index 3551897987..a76315ec93 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_2.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_1/LoadToken_2.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadTokenCache } from "../CacheLoader"; import { TOKEN_YIELD_24_HOUR_20_000 } from "./HistoricToken_20_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_1.ts b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_1.ts index bd182e644d..e46610d6ff 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_1.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_1.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_7_DAY_10_000 } from "./HistoricSilo_10_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_2.ts b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_2.ts index 242931194b..448a714f8b 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_2.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_2.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_7_DAY_15_000 } from "./HistoricSilo_15_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_3.ts b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_3.ts index a58e41704a..5ada4329f0 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_3.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadSilo_3.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_7_DAY_20_000 } from "./HistoricSilo_20_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_1.ts b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_1.ts index 7b76198607..9af4d83f9a 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_1.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_1.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadTokenCache } from "../CacheLoader"; import { TOKEN_YIELD_7_DAY_12_000 } from "./HistoricToken_12_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_2.ts b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_2.ts index ac720913fc..ffae89e7c2 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_2.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_2/LoadToken_2.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadTokenCache } from "../CacheLoader"; import { TOKEN_YIELD_7_DAY_20_000 } from "./HistoricToken_20_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_1.ts b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_1.ts index 5f39d23ea8..19f13a4f28 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_1.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_1.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_30_DAY_10_000 } from "./HistoricSilo_10_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_2.ts b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_2.ts index aa965cc942..6c50058e54 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_2.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_2.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_30_DAY_15_000 } from "./HistoricSilo_15_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_3.ts b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_3.ts index be4fd15b63..e9252a6867 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_3.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadSilo_3.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadSiloCache } from "../CacheLoader"; import { SILO_YIELD_30_DAY_20_000 } from "./HistoricSilo_20_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_1.ts b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_1.ts index 1e40aae691..f9133bbb3f 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_1.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_1.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadTokenCache } from "../CacheLoader"; import { TOKEN_YIELD_30_DAY_12_000 } from "./HistoricToken_12_000"; diff --git a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_2.ts b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_2.ts index 53b350bd40..306b9e2977 100644 --- a/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_2.ts +++ b/projects/subgraph-beanstalk/src/yield_cache/window_3/LoadToken_2.ts @@ -1,5 +1,5 @@ import { ZERO_BI } from "../../../../subgraph-core/utils/Decimals"; -import { DiamondCut } from "../../../generated/Diamond/Beanstalk"; +import { DiamondCut } from "../../../generated/Beanstalk-ABIs/PreReplant"; import { loadBeanstalk } from "../../utils/Beanstalk"; import { loadTokenCache } from "../CacheLoader"; import { TOKEN_YIELD_30_DAY_20_000 } from "./HistoricToken_20_000"; diff --git a/projects/subgraph-beanstalk/tests/YieldHandler.test.ts b/projects/subgraph-beanstalk/tests/YieldHandler.test.ts index ab5c04b392..17273f331c 100644 --- a/projects/subgraph-beanstalk/tests/YieldHandler.test.ts +++ b/projects/subgraph-beanstalk/tests/YieldHandler.test.ts @@ -238,5 +238,36 @@ describe("APY Calculations", () => { assert.assertTrue(BigDecimal_isClose(zeroGsResult.beanAPY, BigDecimal.fromString("0.221606859225904494"), desiredPrecision)); assert.assertTrue(BigDecimal_isClose(zeroGsResult.stalkAPY, BigDecimal.fromString("0.222879524712790346"), desiredPrecision)); }); + + test("Token yields - multiple gauge LP, one with no GP", () => { + // 0 is beanweth, 1 is beanwsteth + const apy = YieldHandler.calculateGaugeVAPYs( + [0, 1], + BigDecimal.fromString("100"), + // [BigDecimal.fromString("1"), BigDecimal.fromString("499")], + [BigDecimal.fromString("0"), BigDecimal.fromString("509")], + [BigDecimal.fromString("152986"), BigDecimal.fromString("2917")], + BigDecimal.fromString("45143199"), + [BigDecimal.fromString("20"), BigDecimal.fromString("80")], + BigDecimal.fromString("1"), + BigDecimal.fromString("5588356"), + BigDecimal.fromString("172360290"), + BigDecimal.fromString("4320"), + ZERO_BI, + [ZERO_BD, ZERO_BD], + [ + [ZERO_BD, ZERO_BD], + [ZERO_BD, ZERO_BD] + ], + [ZERO_BD, ZERO_BD], + [null, null] + ); + + for (let i = 0; i < apy.length; ++i) { + log.info(`bean apy: {}`, [(apy[i][0] as BigDecimal).toString()]); + log.info(`stalk apy: {}`, [(apy[i][1] as BigDecimal).toString()]); + } + // Not adding any asserts for now as part of the multi-lp implementation is still incomplete + }); }); }); diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Farm.ts b/projects/subgraph-beanstalk/tests/event-mocking/Farm.ts deleted file mode 100644 index 8fe2598fc9..0000000000 --- a/projects/subgraph-beanstalk/tests/event-mocking/Farm.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Address, BigInt, Bytes, ethereum } from "@graphprotocol/graph-ts"; -import { newMockEvent } from "matchstick-as/assembly/index"; - -import { AddDeposit, RemoveDeposit, RemoveDeposits } from "../../generated/Silo-Replanted/Beanstalk"; -import { handleAddDeposit } from "../../src/SiloHandler"; -import { BEAN_DECIMALS } from "../../src/utils/Constants"; - -export function createInternalBalanceChangedEvent(account: string, token: string, delta: BigInt): void { } diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Fertilizer.ts b/projects/subgraph-beanstalk/tests/event-mocking/Fertilizer.ts deleted file mode 100644 index fc287bd734..0000000000 --- a/projects/subgraph-beanstalk/tests/event-mocking/Fertilizer.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Address, BigInt, Bytes, ethereum } from "@graphprotocol/graph-ts"; -import { newMockEvent } from "matchstick-as/assembly/index"; - -import { AddDeposit, RemoveDeposit, RemoveDeposits } from "../../generated/Silo-Replanted/Beanstalk"; -import { handleAddDeposit } from "../../src/SiloHandler"; -import { BEAN_DECIMALS } from "../../src/utils/Constants"; - -export function createTransferBatchEvent(): void { } -export function createTransferSingle(): void { } diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Field.ts b/projects/subgraph-beanstalk/tests/event-mocking/Field.ts index 41091d27fd..f1726f9c9e 100644 --- a/projects/subgraph-beanstalk/tests/event-mocking/Field.ts +++ b/projects/subgraph-beanstalk/tests/event-mocking/Field.ts @@ -1,6 +1,6 @@ import { Address, BigInt, Bytes, ethereum } from "@graphprotocol/graph-ts"; -import { Sow, PlotTransfer, Harvest } from "../../generated/Field/Beanstalk"; -import { TemperatureChange } from "../../generated/BIP45-SeedGauge/Beanstalk"; +import { Sow, PlotTransfer, Harvest } from "../../generated/Beanstalk-ABIs/PreReplant"; +import { TemperatureChange } from "../../generated/Beanstalk-ABIs/SeedGauge"; import { mockBeanstalkEvent } from "../../../subgraph-core/tests/event-mocking/Util"; export function createWeatherChangeEvent(season: BigInt, caseID: BigInt, change: i32): void {} diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Marketplace.ts b/projects/subgraph-beanstalk/tests/event-mocking/Marketplace.ts index 030e7c42e6..c770d2947f 100644 --- a/projects/subgraph-beanstalk/tests/event-mocking/Marketplace.ts +++ b/projects/subgraph-beanstalk/tests/event-mocking/Marketplace.ts @@ -7,14 +7,14 @@ import { PodOrderCancelled, PodOrderCreated as PodOrderCreated_v1, PodOrderFilled as PodOrderFilled_v1 -} from "../../generated/Field/Beanstalk"; -import { PodListingCreated as PodListingCreated_v1_1 } from "../../generated/Marketplace-Replanted/Beanstalk"; +} from "../../generated/Beanstalk-ABIs/PreReplant"; +import { PodListingCreated as PodListingCreated_v1_1 } from "../../generated/Beanstalk-ABIs/Replanted"; import { PodListingCreated as PodListingCreated_v2, PodListingFilled as PodListingFilled_v2, PodOrderCreated as PodOrderCreated_v2, PodOrderFilled as PodOrderFilled_v2 -} from "../../generated/BIP29-PodMarketplace/Beanstalk"; +} from "../../generated/Beanstalk-ABIs/MarketV2"; import { mockBeanstalkEvent } from "../../../subgraph-core/tests/event-mocking/Util"; /** ===== Marketplace V1 Events ===== */ diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Season.ts b/projects/subgraph-beanstalk/tests/event-mocking/Season.ts index 0b197f8f32..8dd8a86cdf 100644 --- a/projects/subgraph-beanstalk/tests/event-mocking/Season.ts +++ b/projects/subgraph-beanstalk/tests/event-mocking/Season.ts @@ -1,5 +1,5 @@ import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; -import { Incentivization } from "../../generated/Season-Replanted/Beanstalk"; +import { Incentivization } from "../../generated/Beanstalk-ABIs/PreReplant"; import { mockBeanstalkEvent } from "../../../subgraph-core/tests/event-mocking/Util"; diff --git a/projects/subgraph-beanstalk/tests/event-mocking/SeedGauge.ts b/projects/subgraph-beanstalk/tests/event-mocking/SeedGauge.ts index 6458a22c71..e9a80ae257 100644 --- a/projects/subgraph-beanstalk/tests/event-mocking/SeedGauge.ts +++ b/projects/subgraph-beanstalk/tests/event-mocking/SeedGauge.ts @@ -8,7 +8,7 @@ import { UpdateGaugeSettings, TotalGerminatingStalkChanged, TotalStalkChangedFromGermination -} from "../../generated/BIP45-SeedGauge/Beanstalk"; +} from "../../generated/Beanstalk-ABIs/SeedGauge"; import { mockBeanstalkEvent } from "../../../subgraph-core/tests/event-mocking/Util"; export function createBeanToMaxLpGpPerBdvRatioChangeEvent( diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Silo.ts b/projects/subgraph-beanstalk/tests/event-mocking/Silo.ts index affed21f7a..1364d8bbf0 100644 --- a/projects/subgraph-beanstalk/tests/event-mocking/Silo.ts +++ b/projects/subgraph-beanstalk/tests/event-mocking/Silo.ts @@ -11,7 +11,7 @@ import { SeedsBalanceChanged, StalkBalanceChanged, Plant -} from "../../generated/Silo-Replanted/Beanstalk"; +} from "../../generated/Beanstalk-ABIs/MarketV2"; import { handleAddDeposit } from "../../src/SiloHandler"; import { BEAN_DECIMALS } from "../../../subgraph-core/utils/Constants"; diff --git a/projects/subgraph-beanstalk/tests/event-mocking/Whitelist.ts b/projects/subgraph-beanstalk/tests/event-mocking/Whitelist.ts index 37d30a5ee6..cbc4944afb 100644 --- a/projects/subgraph-beanstalk/tests/event-mocking/Whitelist.ts +++ b/projects/subgraph-beanstalk/tests/event-mocking/Whitelist.ts @@ -1,11 +1,10 @@ import { Address, BigInt, Bytes, ethereum } from "@graphprotocol/graph-ts"; -import { WhitelistToken as WhitelistToken_V2, DewhitelistToken } from "../../generated/Silo-Replanted/Beanstalk"; -import { WhitelistToken as WhitelistToken_V3 } from "../../generated/Silo-V3/Beanstalk"; -import { WhitelistToken as WhitelistToken_V4 } from "../../generated/BIP45-SeedGauge/Beanstalk"; +import { WhitelistToken as WhitelistToken_V2, DewhitelistToken } from "../../generated/Beanstalk-ABIs/MarketV2"; +import { WhitelistToken as WhitelistToken_V3 } from "../../generated/Beanstalk-ABIs/SiloV3"; +import { WhitelistToken as WhitelistToken_V4 } from "../../generated/Beanstalk-ABIs/SeedGauge"; import { mockBeanstalkEvent } from "../../../subgraph-core/tests/event-mocking/Util"; - export function createWhitelistTokenV2Event(token: string, selector: string, seeds: BigInt, stalk: BigInt): WhitelistToken_V2 { let event = changetype(mockBeanstalkEvent()); event.parameters = new Array(); diff --git a/projects/subgraph-beanstalk/tests/utils/Marketplace.ts b/projects/subgraph-beanstalk/tests/utils/Marketplace.ts index d6bfb69abe..19ef5f0ac3 100644 --- a/projects/subgraph-beanstalk/tests/utils/Marketplace.ts +++ b/projects/subgraph-beanstalk/tests/utils/Marketplace.ts @@ -32,7 +32,7 @@ import { PodListingFilled as PodListingFilled_v2, PodOrderCreated as PodOrderCreated_v2, PodOrderFilled as PodOrderFilled_v2 -} from "../../generated/BIP29-PodMarketplace/Beanstalk"; +} from "../../generated/Beanstalk-ABIs/MarketV2"; import { BEANSTALK } from "../../../subgraph-core/utils/Constants"; import { transferPlot } from "./Field"; import { @@ -42,8 +42,8 @@ import { PodListingFilled as PodListingFilled_v1, PodOrderCreated as PodOrderCreated_v1, PodOrderFilled as PodOrderFilled_v1 -} from "../../generated/Field/Beanstalk"; -import { PodListingCreated as PodListingCreated_v1_1 } from "../../generated/Marketplace-Replanted/Beanstalk"; +} from "../../generated/Beanstalk-ABIs/PreReplant"; +import { PodListingCreated as PodListingCreated_v1_1 } from "../../generated/Beanstalk-ABIs/Replanted"; const pricingFunction = Bytes.fromHexString( "0x0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000000000000000000000000000000000000000012c000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010101010101010101010101010000" @@ -70,8 +70,8 @@ export function fillListing_v1( // Assert PodFill const podFillId = getPodFillId(event.params.index, event); assert.fieldEquals("PodFill", podFillId, "listing", event.params.from.toHexString() + "-" + event.params.index.toString()); - assert.fieldEquals("PodFill", podFillId, "from", event.params.from.toHexString()); - assert.fieldEquals("PodFill", podFillId, "to", event.params.to.toHexString()); + assert.fieldEquals("PodFill", podFillId, "fromFarmer", event.params.from.toHexString()); + assert.fieldEquals("PodFill", podFillId, "toFarmer", event.params.to.toHexString()); assert.fieldEquals("PodFill", podFillId, "amount", event.params.amount.toString()); assert.fieldEquals("PodFill", podFillId, "index", event.params.index.toString()); assert.fieldEquals("PodFill", podFillId, "start", event.params.start.toString()); @@ -97,8 +97,8 @@ export function fillListing_v2( // Assert PodFill const podFillId = getPodFillId(event.params.index, event); assert.fieldEquals("PodFill", podFillId, "listing", event.params.from.toHexString() + "-" + event.params.index.toString()); - assert.fieldEquals("PodFill", podFillId, "from", event.params.from.toHexString()); - assert.fieldEquals("PodFill", podFillId, "to", event.params.to.toHexString()); + assert.fieldEquals("PodFill", podFillId, "fromFarmer", event.params.from.toHexString()); + assert.fieldEquals("PodFill", podFillId, "toFarmer", event.params.to.toHexString()); assert.fieldEquals("PodFill", podFillId, "amount", event.params.amount.toString()); assert.fieldEquals("PodFill", podFillId, "index", event.params.index.toString()); assert.fieldEquals("PodFill", podFillId, "start", event.params.start.toString()); @@ -125,8 +125,8 @@ export function fillOrder_v1( // Assert PodFill const podFillId = getPodFillId(index, event); assert.fieldEquals("PodFill", podFillId, "order", event.params.id.toHexString()); - assert.fieldEquals("PodFill", podFillId, "from", event.params.from.toHexString()); - assert.fieldEquals("PodFill", podFillId, "to", event.params.to.toHexString()); + assert.fieldEquals("PodFill", podFillId, "fromFarmer", event.params.from.toHexString()); + assert.fieldEquals("PodFill", podFillId, "toFarmer", event.params.to.toHexString()); assert.fieldEquals("PodFill", podFillId, "amount", event.params.amount.toString()); assert.fieldEquals("PodFill", podFillId, "index", event.params.index.toString()); assert.fieldEquals("PodFill", podFillId, "start", event.params.start.toString()); @@ -153,8 +153,8 @@ export function fillOrder_v2( // Assert PodFill const podFillId = getPodFillId(index, event); assert.fieldEquals("PodFill", podFillId, "order", event.params.id.toHexString()); - assert.fieldEquals("PodFill", podFillId, "from", event.params.from.toHexString()); - assert.fieldEquals("PodFill", podFillId, "to", event.params.to.toHexString()); + assert.fieldEquals("PodFill", podFillId, "fromFarmer", event.params.from.toHexString()); + assert.fieldEquals("PodFill", podFillId, "toFarmer", event.params.to.toHexString()); assert.fieldEquals("PodFill", podFillId, "amount", event.params.amount.toString()); assert.fieldEquals("PodFill", podFillId, "index", event.params.index.toString()); assert.fieldEquals("PodFill", podFillId, "start", event.params.start.toString()); diff --git a/projects/subgraph-core/abis/Beanstalk/Beanstalk-BIP42.json b/projects/subgraph-core/abis/Beanstalk/Beanstalk-BIP42.json deleted file mode 100644 index 52deb8c280..0000000000 --- a/projects/subgraph-core/abis/Beanstalk/Beanstalk-BIP42.json +++ /dev/null @@ -1,8272 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "underlyingToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "merkleRoot", - "type": "bytes32" - } - ], - "name": "AddUnripeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "underlying", - "type": "int256" - } - ], - "name": "ChangeUnderlying", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "underlying", - "type": "uint256" - } - ], - "name": "Chop", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Pick", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "underlyingToken", - "type": "address" - } - ], - "name": "SwitchUnderlyingToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supply", - "type": "uint256" - } - ], - "name": "_getPenalizedUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "redeem", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "addMigratedUnderlying", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "address", - "name": "underlyingToken", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - } - ], - "name": "addUnripeToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfPenalizedUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "underlying", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "underlying", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "chop", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getLockedBeans", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLockedBeansUnderlyingUnripeBean", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLockedBeansUnderlyingUnripeBeanEth", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "getPenalizedUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "redeem", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "getPenalty", - "outputs": [ - { - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "getPercentPenalty", - "outputs": [ - { - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "getRecapFundedPercent", - "outputs": [ - { - "internalType": "uint256", - "name": "percent", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRecapPaidPercent", - "outputs": [ - { - "internalType": "uint256", - "name": "percent", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "getTotalUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "underlying", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "getUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "underlyingAmount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "getUnderlyingPerUnripeToken", - "outputs": [ - { - "internalType": "uint256", - "name": "underlyingPerToken", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "getUnderlyingToken", - "outputs": [ - { - "internalType": "address", - "name": "underlyingToken", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - } - ], - "name": "isUnripe", - "outputs": [ - { - "internalType": "bool", - "name": "unripe", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "pick", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "picked", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "unripeToken", - "type": "address" - }, - { - "internalType": "address", - "name": "newUnderlyingToken", - "type": "address" - } - ], - "name": "switchUnderlyingToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "bpf", - "type": "uint128" - } - ], - "name": "SetFertilizer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfBatchFertilizer", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "lastBpf", - "type": "uint128" - } - ], - "internalType": "struct IFertilizer.Balance[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfFertilized", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "balanceOfFertilizer", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "lastBpf", - "type": "uint128" - } - ], - "internalType": "struct IFertilizer.Balance", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - } - ], - "name": "balanceOfUnfertilized", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "beansPerFertilizer", - "outputs": [ - { - "internalType": "uint128", - "name": "bpf", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "claimFertilized", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getActiveFertilizer", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentHumidity", - "outputs": [ - { - "internalType": "uint128", - "name": "humidity", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getEndBpf", - "outputs": [ - { - "internalType": "uint128", - "name": "endBpf", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - } - ], - "name": "getFertilizer", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFertilizers", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "endBpf", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "supply", - "type": "uint256" - } - ], - "internalType": "struct FertilizerFacet.Supply[]", - "name": "fertilizers", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFirst", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "_s", - "type": "uint128" - } - ], - "name": "getHumidity", - "outputs": [ - { - "internalType": "uint128", - "name": "humidity", - "type": "uint128" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "getLast", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wethAmountIn", - "type": "uint256" - } - ], - "name": "getMintFertilizerOut", - "outputs": [ - { - "internalType": "uint256", - "name": "fertilizerAmountOut", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "id", - "type": "uint128" - } - ], - "name": "getNext", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isFertilizing", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wethAmountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFertilizerOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minLPTokensOut", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "mintFertilizer", - "outputs": [ - { - "internalType": "uint256", - "name": "fertilizerAmountOut", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "payFertilizer", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "remainingRecapitalization", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalFertilizedBeans", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalFertilizerBeans", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalUnfertilizedBeans", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "Pause", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timePassed", - "type": "uint256" - } - ], - "name": "Unpause", - "type": "event" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "claimOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ownerCandidate", - "outputs": [ - { - "internalType": "address", - "name": "ownerCandidate_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_functionSelector", - "type": "bytes4" - } - ], - "name": "facetAddress", - "outputs": [ - { - "internalType": "address", - "name": "facetAddress_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facetAddresses", - "outputs": [ - { - "internalType": "address[]", - "name": "facetAddresses_", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_facet", - "type": "address" - } - ], - "name": "facetFunctionSelectors", - "outputs": [ - { - "internalType": "bytes4[]", - "name": "facetFunctionSelectors_", - "type": "bytes4[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facets", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IDiamondLoupe.Facet[]", - "name": "facets_", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "indexed": false, - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "_diamondCut", - "type": "tuple[]" - }, - { - "indexed": false, - "internalType": "address", - "name": "_init", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "DiamondCut", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "_diamondCut", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "_init", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "diamondCut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC1155", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "batchTransferERC1155", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Permit", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permitERC20", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC4494", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "sig", - "type": "bytes" - } - ], - "name": "permitERC721", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC1155", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferERC1155", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC721", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "transferERC721", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "delta", - "type": "int256" - } - ], - "name": "InternalBalanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenApproval", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approveToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseTokenAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "getAllBalance", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "internalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "externalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalBalance", - "type": "uint256" - } - ], - "internalType": "struct TokenFacet.Balance", - "name": "b", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "getAllBalances", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "internalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "externalBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalBalance", - "type": "uint256" - } - ], - "internalType": "struct TokenFacet.Balance[]", - "name": "balances", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "getBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "getBalances", - "outputs": [ - { - "internalType": "uint256[]", - "name": "balances", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "getExternalBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "getExternalBalances", - "outputs": [ - { - "internalType": "uint256[]", - "name": "balances", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "getInternalBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "getInternalBalances", - "outputs": [ - { - "internalType": "uint256[]", - "name": "balances", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseTokenAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155BatchReceived", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC1155Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permitToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "tokenAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tokenPermitDomainSeparator", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "tokenPermitNonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "transferInternalTokenFrom", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "transferToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "unwrapEth", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "wrapEth", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "clipboard", - "type": "bytes" - } - ], - "internalType": "struct AdvancedFarmCall[]", - "name": "data", - "type": "tuple[]" - } - ], - "name": "advancedFarm", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "farm", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "clipboard", - "type": "bytes" - } - ], - "internalType": "struct AdvancedPipeCall[]", - "name": "pipes", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "advancedPipe", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct PipeCall", - "name": "p", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "etherPipe", - "outputs": [ - { - "internalType": "bytes", - "name": "result", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct PipeCall[]", - "name": "pipes", - "type": "tuple[]" - } - ], - "name": "multiPipe", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct PipeCall", - "name": "p", - "type": "tuple" - } - ], - "name": "pipe", - "outputs": [ - { - "internalType": "bytes", - "name": "result", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct PipeCall", - "name": "p", - "type": "tuple" - } - ], - "name": "readPipe", - "outputs": [ - { - "internalType": "bytes", - "name": "result", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "registry", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "addLiquidity", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "registry", - "type": "address" - }, - { - "internalType": "address", - "name": "fromToken", - "type": "address" - }, - { - "internalType": "address", - "name": "toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "exchange", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "fromToken", - "type": "address" - }, - { - "internalType": "address", - "name": "toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "exchangeUnderlying", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "registry", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "minAmountsOut", - "type": "uint256[]" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "removeLiquidity", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "registry", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "amountsOut", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "maxAmountIn", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "removeLiquidityImbalance", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - }, - { - "internalType": "address", - "name": "registry", - "type": "address" - }, - { - "internalType": "address", - "name": "toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minAmountOut", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "fromMode", - "type": "uint8" - }, - { - "internalType": "enum LibTransfer.To", - "name": "toMode", - "type": "uint8" - } - ], - "name": "removeLiquidityOneToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint32", - "name": "id", - "type": "uint32" - } - ], - "name": "CompleteFundraiser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint32", - "name": "id", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "CreateFundraiser", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint32", - "name": "id", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "FundFundraiser", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "createFundraiser", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "id", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "fund", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "id", - "type": "uint32" - } - ], - "name": "fundingToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "id", - "type": "uint32" - } - ], - "name": "fundraiser", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "payee", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "total", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "remaining", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - } - ], - "internalType": "struct Storage.Fundraiser", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "numberOfFundraisers", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "id", - "type": "uint32" - } - ], - "name": "remainingFunding", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "id", - "type": "uint32" - } - ], - "name": "totalFunding", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "plots", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "PodListingCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "beans", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "pods", - "type": "uint256" - } - ], - "name": "Sow", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "plots", - "type": "uint256[]" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "harvest", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "harvestableIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxTemperature", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "plot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "podIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "remainingPods", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minTemperature", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "sow", - "outputs": [ - { - "internalType": "uint256", - "name": "pods", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minTemperature", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minSoil", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "sowWithMin", - "outputs": [ - { - "internalType": "uint256", - "name": "pods", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "temperature", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalHarvestable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalHarvested", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalPods", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSoil", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalUnharvestable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "yield", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "pods", - "type": "uint256" - } - ], - "name": "PlotTransfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "pods", - "type": "uint256" - } - ], - "name": "PodApproval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "maxHarvestableIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "enum LibPolynomial.PriceType", - "name": "pricingType", - "type": "uint8" - } - ], - "name": "PodListingCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "costInBeans", - "type": "uint256" - } - ], - "name": "PodListingFilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "PodOrderCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "enum LibPolynomial.PriceType", - "name": "priceType", - "type": "uint8" - } - ], - "name": "PodOrderCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "costInBeans", - "type": "uint256" - } - ], - "name": "PodOrderFilled", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowancePods", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approvePods", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "cancelPodListing", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "cancelPodOrder", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "cancelPodOrderV2", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxHarvestableIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "createPodListing", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxHarvestableIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "createPodListingV2", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "beanAmount", - "type": "uint256" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "createPodOrder", - "outputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "beanAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "createPodOrderV2", - "outputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxHarvestableIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "internalType": "struct Listing.PodListing", - "name": "l", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "beanAmount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "fillPodListing", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxHarvestableIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "internalType": "struct Listing.PodListing", - "name": "l", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "beanAmount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "fillPodListingV2", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - } - ], - "internalType": "struct Order.PodOrder", - "name": "o", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "fillPodOrder", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - } - ], - "internalType": "struct Order.PodOrder", - "name": "o", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "fillPodOrderV2", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "placeInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountPodsFromOrder", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - } - ], - "name": "getAmountBeansToFillOrderV2", - "outputs": [ - { - "internalType": "uint256", - "name": "beanAmount", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "placeInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "podListingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fillBeanAmount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - } - ], - "name": "getAmountPodsFromFillListingV2", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "podListing", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint24", - "name": "pricePerPod", - "type": "uint24" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - } - ], - "name": "podOrder", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "name": "podOrderById", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "maxPlaceInLine", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minFillAmount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "pricingFunction", - "type": "bytes" - } - ], - "name": "podOrderV2", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "transferPlot", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfGrownStalkUpToStemsDeployment", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfLegacySeeds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "getDepositLegacy", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "uint32[][]", - "name": "seasons", - "type": "uint32[][]" - }, - { - "internalType": "uint256[][]", - "name": "amounts", - "type": "uint256[][]" - }, - { - "internalType": "uint256", - "name": "stalkDiff", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "seedsDiff", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "proof", - "type": "bytes32[]" - } - ], - "name": "mowAndMigrate", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "mowAndMigrateNoDeposits", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "totalMigratedBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "int96", - "name": "stem", - "type": "int96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bdv", - "type": "uint256" - } - ], - "name": "RemoveDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "int96[]", - "name": "stems", - "type": "int96[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "bdvs", - "type": "uint256[]" - } - ], - "name": "RemoveDeposits", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "enrootDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96[]", - "name": "stems", - "type": "int96[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "name": "enrootDeposits", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "name": "getAmountOut", - "outputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - } - ], - "name": "getMaxAmountIn", - "outputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "fromToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "toToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fromAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "toAmount", - "type": "uint256" - } - ], - "name": "Convert", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "convertData", - "type": "bytes" - }, - { - "internalType": "int96[]", - "name": "stems", - "type": "int96[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "name": "convert", - "outputs": [ - { - "internalType": "int96", - "name": "toStem", - "type": "int96" - }, - { - "internalType": "uint256", - "name": "fromAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "fromBdv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toBdv", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "beanToBDV", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "curveToBDV", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "unripeBeanToBDV", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "unripeLPToBDV", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "wellBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "DepositApproval", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approveDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseDepositAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "depositAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "depositPermitDomainSeparator", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "depositPermitNonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseDepositAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permitDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permitDeposits", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "dewhitelistToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getSiloTokens", - "outputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getWhitelistStatus", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bool", - "name": "isWhitelisted", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isWhitelistedLp", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isWhitelistedWell", - "type": "bool" - } - ], - "internalType": "struct Storage.WhitelistStatus", - "name": "_whitelistStatuses", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getWhitelistStatuses", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bool", - "name": "isWhitelisted", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isWhitelistedLp", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isWhitelistedWell", - "type": "bool" - } - ], - "internalType": "struct Storage.WhitelistStatus[]", - "name": "_whitelistStatuses", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getWhitelistedLpTokens", - "outputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getWhitelistedTokens", - "outputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getWhitelistedWellLpTokens", - "outputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "gaugePointSelector", - "type": "bytes4" - }, - { - "internalType": "bytes4", - "name": "liquidityWeightSelector", - "type": "bytes4" - }, - { - "internalType": "uint64", - "name": "optimalPercentDepositedBdv", - "type": "uint64" - } - ], - "name": "updateGaugeForToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint32", - "name": "stalkEarnedPerSeason", - "type": "uint32" - } - ], - "name": "updateStalkPerBdvPerSeasonForToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "selector", - "type": "bytes4" - }, - { - "internalType": "uint32", - "name": "stalkIssuedPerBdv", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "stalkEarnedPerSeason", - "type": "uint32" - }, - { - "internalType": "bytes4", - "name": "gaugePointSelector", - "type": "bytes4" - }, - { - "internalType": "bytes4", - "name": "liquidityWeightSelector", - "type": "bytes4" - }, - { - "internalType": "uint128", - "name": "gaugePoints", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "optimalPercentDepositedBdv", - "type": "uint64" - } - ], - "name": "whitelistToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "selector", - "type": "bytes4" - }, - { - "internalType": "uint32", - "name": "stalkIssuedPerBdv", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "stalkEarnedPerSeason", - "type": "uint32" - }, - { - "internalType": "bytes1", - "name": "encodeType", - "type": "bytes1" - }, - { - "internalType": "bytes4", - "name": "gaugePointSelector", - "type": "bytes4" - }, - { - "internalType": "bytes4", - "name": "liquidityWeightSelector", - "type": "bytes4" - }, - { - "internalType": "uint128", - "name": "gaugePoints", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "optimalPercentDepositedBdv", - "type": "uint64" - } - ], - "name": "whitelistTokenWithEncodeType", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "depositId", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "depositIds", - "type": "uint256[]" - } - ], - "name": "balanceOfBatch", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "balanceOfDepositedBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "depositedBdv", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfEarnedBeans", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfEarnedStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfFinishedGerminatingStalkAndRoots", - "outputs": [ - { - "internalType": "uint256", - "name": "gStalk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gRoots", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfGerminatingStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "balanceOfGrownStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfPlenty", - "outputs": [ - { - "internalType": "uint256", - "name": "plenty", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfRainRoots", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfRoots", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfSop", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "lastRain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "lastSop", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "roots", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "plentyPerRoot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "plenty", - "type": "uint256" - } - ], - "internalType": "struct SiloGettersFacet.AccountSeasonOfPlenty", - "name": "sop", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOfYoungAndMatureGerminatingStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "matureGerminatingStalk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "youngGerminatingStalk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "bdv", - "outputs": [ - { - "internalType": "uint256", - "name": "_bdv", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - } - ], - "name": "getDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - } - ], - "name": "getDepositId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getEvenGerminating", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "getGerminatingRootsForSeason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "getGerminatingStalkAndRootsForSeason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "getGerminatingStalkForSeason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getGerminatingStem", - "outputs": [ - { - "internalType": "int96", - "name": "germinatingStem", - "type": "int96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "getGerminatingStems", - "outputs": [ - { - "internalType": "int96[]", - "name": "germinatingStems", - "type": "int96[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getGerminatingTotalDeposited", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getGerminatingTotalDepositedBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "_bdv", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getLastMowedStem", - "outputs": [ - { - "internalType": "int96", - "name": "lastStem", - "type": "int96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getLegacySeedsPerToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getMowStatus", - "outputs": [ - { - "components": [ - { - "internalType": "int96", - "name": "lastStem", - "type": "int96" - }, - { - "internalType": "uint128", - "name": "bdv", - "type": "uint128" - } - ], - "internalType": "struct Account.MowStatus", - "name": "mowStatus", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getOddGerminating", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTotalDeposited", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTotalDepositedBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTotalGerminatingAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTotalGerminatingBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalGerminatingStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getYoungAndMatureGerminatingTotalStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "matureGerminatingStalk", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "youngGerminatingStalk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - } - ], - "name": "grownStalkForDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "grownStalk", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastSeasonOfPlenty", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "lastUpdate", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "migrationNeeded", - "outputs": [ - { - "internalType": "bool", - "name": "hasMigrated", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "seasonToStem", - "outputs": [ - { - "internalType": "int96", - "name": "stem", - "type": "int96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stemStartSeason", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "stemTipForToken", - "outputs": [ - { - "internalType": "int96", - "name": "_stemTip", - "type": "int96" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "tokenSettings", - "outputs": [ - { - "components": [ - { - "internalType": "bytes4", - "name": "selector", - "type": "bytes4" - }, - { - "internalType": "uint32", - "name": "stalkEarnedPerSeason", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "stalkIssuedPerBdv", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "milestoneSeason", - "type": "uint32" - }, - { - "internalType": "int96", - "name": "milestoneStem", - "type": "int96" - }, - { - "internalType": "bytes1", - "name": "encodeType", - "type": "bytes1" - }, - { - "internalType": "int24", - "name": "deltaStalkEarnedPerSeason", - "type": "int24" - }, - { - "internalType": "bytes4", - "name": "gpSelector", - "type": "bytes4" - }, - { - "internalType": "bytes4", - "name": "lwSelector", - "type": "bytes4" - }, - { - "internalType": "uint128", - "name": "gaugePoints", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "optimalPercentDepositedBdv", - "type": "uint64" - } - ], - "internalType": "struct Storage.SiloSettings", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalEarnedBeans", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalRoots", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalStalk", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "int96", - "name": "stem", - "type": "int96" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bdv", - "type": "uint256" - } - ], - "name": "AddDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "plenty", - "type": "uint256" - } - ], - "name": "ClaimPlenty", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "beans", - "type": "uint256" - } - ], - "name": "Plant", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "delta", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaRoots", - "type": "int256" - } - ], - "name": "StalkBalanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "ids", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - } - ], - "name": "TransferBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "TransferSingle", - "type": "event" - }, - { - "inputs": [], - "name": "claimPlenty", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.From", - "name": "mode", - "type": "uint8" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_bdv", - "type": "uint256" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "mow", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - } - ], - "name": "mowMultiple", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "plant", - "outputs": [ - { - "internalType": "uint256", - "name": "beans", - "type": "uint256" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256[]", - "name": "depositIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "safeBatchTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "depositId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "_bdv", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96[]", - "name": "stem", - "type": "int96[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "name": "transferDeposits", - "outputs": [ - { - "internalType": "uint256[]", - "name": "bdvs", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96", - "name": "stem", - "type": "int96" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "withdrawDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "int96[]", - "name": "stems", - "type": "int96[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "withdrawDeposits", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "claimWithdrawal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint32[]", - "name": "seasons", - "type": "uint32[]" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "claimWithdrawals", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTotalWithdrawn", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "getWithdrawal", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "DewhitelistToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes4", - "name": "gpSelector", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "bytes4", - "name": "lwSelector", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "optimalPercentDepositedBdv", - "type": "uint64" - } - ], - "name": "UpdateGaugeSettings", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "stalkEarnedPerSeason", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "season", - "type": "uint32" - } - ], - "name": "UpdatedStalkPerBdvPerSeason", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes4", - "name": "selector", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "stalkEarnedPerSeason", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stalkIssuedPerBdv", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes4", - "name": "gpSelector", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "bytes4", - "name": "lwSelector", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "gaugePoints", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "optimalPercentDepositedBdv", - "type": "uint64" - } - ], - "name": "WhitelistToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "season", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "gaugePoints", - "type": "uint256" - } - ], - "name": "GaugePointChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newStalkPerBdvPerSeason", - "type": "uint256" - } - ], - "name": "UpdateAverageStalkPerBdvPerSeason", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "season", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "RemoveWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32[]", - "name": "seasons", - "type": "uint32[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "RemoveWithdrawals", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "delta", - "type": "int256" - } - ], - "name": "SeedsBalanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaGerminatingStalk", - "type": "int256" - }, - { - "indexed": false, - "internalType": "enum LibGerminate.Germinate", - "name": "germinationState", - "type": "uint8" - } - ], - "name": "FarmerGerminatingStalkBalanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "germinationSeason", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaAmount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaBdv", - "type": "int256" - } - ], - "name": "TotalGerminatingBalanceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "germinationSeason", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaGerminatingStalk", - "type": "int256" - } - ], - "name": "TotalGerminatingStalkChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "int256", - "name": "deltaStalk", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaRoots", - "type": "int256" - } - ], - "name": "TotalStalkChangedFromGermination", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelisted", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelistedLp", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelistedWell", - "type": "bool" - } - ], - "name": "AddWhitelistStatus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "RemoveWhitelistStatus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelisted", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelistedLp", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isWhitelistedWell", - "type": "bool" - } - ], - "name": "UpdateWhitelistStatus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint32", - "name": "season", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "well", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "deltaB", - "type": "int256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "cumulativeReserves", - "type": "bytes" - } - ], - "name": "WellOracle", - "type": "event" - }, - { - "inputs": [], - "name": "maxWeight", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "currentGaugePoints", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "optimalPercentDepositedBdv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "percentOfDepositedBdv", - "type": "uint256" - } - ], - "name": "defaultGaugePointFunction", - "outputs": [ - { - "internalType": "uint256", - "name": "newGaugePoints", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "abovePeg", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "currentGaugePoints", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "optimalPercentDepositedBdv", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "percentOfDepositedBdv", - "type": "uint256" - } - ], - "name": "calcGaugePointsWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAverageGrownStalkPerBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAverageGrownStalkPerBdvPerSeason", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBeanEthGaugePointsPerBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBeanGaugePointsPerBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBeanToMaxLpGpPerBdvRatio", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBeanToMaxLpGpPerBdvRatioScaled", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDeltaPodDemand", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getGaugePoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getGaugePointsPerBdvForToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "well", - "type": "address" - } - ], - "name": "getGaugePointsPerBdvForWell", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getGaugePointsWithParams", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGrownStalkIssuedPerGp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGrownStalkIssuedPerSeason", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLargestLiqWell", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLiquidityToSupplyRatio", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPodRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSeedGauge", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "averageGrownStalkPerBdvPerSeason", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "beanToMaxLpGpPerBdvRatio", - "type": "uint128" - } - ], - "internalType": "struct Storage.SeedGauge", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSopWell", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBdv", - "outputs": [ - { - "internalType": "uint256", - "name": "totalBdv", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalUsdLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "totalLiquidity", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalWeightedUsdLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "totalWeightedLiquidity", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "well", - "type": "address" - } - ], - "name": "getTwaLiquidityForWell", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "well", - "type": "address" - } - ], - "name": "getWeightedTwaLiquidityForWell", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_season", - "type": "uint32" - } - ], - "name": "plentyPerRoot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - } - ], - "name": "poolDeltaB", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rain", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "deprecated", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pods", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "roots", - "type": "uint256" - } - ], - "internalType": "struct Storage.Rain", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "season", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sunriseBlock", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "time", - "outputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "current", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "lastSop", - "type": "uint32" - }, - { - "internalType": "uint8", - "name": "withdrawSeasons", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "lastSopSeason", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "rainStart", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "raining", - "type": "bool" - }, - { - "internalType": "bool", - "name": "fertilizing", - "type": "bool" - }, - { - "internalType": "uint32", - "name": "sunriseBlock", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "abovePeg", - "type": "bool" - }, - { - "internalType": "uint16", - "name": "stemStartSeason", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "stemScaleSeason", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "period", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "internalType": "struct Storage.Season", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalDeltaB", - "outputs": [ - { - "internalType": "int256", - "name": "deltaB", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "weather", - "outputs": [ - { - "components": [ - { - "internalType": "uint256[2]", - "name": "deprecated", - "type": "uint256[2]" - }, - { - "internalType": "uint128", - "name": "lastDSoil", - "type": "uint128" - }, - { - "internalType": "uint32", - "name": "lastSowTime", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "thisSowTime", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "t", - "type": "uint32" - } - ], - "internalType": "struct Storage.Weather", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "well", - "type": "address" - } - ], - "name": "wellOracleSnapshot", - "outputs": [ - { - "internalType": "bytes", - "name": "snapshot", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "season", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "caseId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int80", - "name": "absChange", - "type": "int80" - } - ], - "name": "BeanToMaxLpGpPerBdvRatioChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint32", - "name": "season", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "toField", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "toSilo", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "toFertilizer", - "type": "uint256" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "season", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "well", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "toField", - "type": "uint256" - } - ], - "name": "SeasonOfPlenty", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint32", - "name": "season", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "soil", - "type": "uint256" - } - ], - "name": "Soil", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "season", - "type": "uint256" - } - ], - "name": "Sunrise", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "season", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "caseId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int8", - "name": "absChange", - "type": "int8" - } - ], - "name": "TemperatureChange", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "enum LibTransfer.To", - "name": "mode", - "type": "uint8" - } - ], - "name": "gm", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "seasonTime", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sunrise", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/projects/ui/src/components/Analytics/Silo/APY.graphql b/projects/ui/src/components/Analytics/Silo/APY.graphql index cc914d47f4..e98fb4b8ee 100644 --- a/projects/ui/src/components/Analytics/Silo/APY.graphql +++ b/projects/ui/src/components/Analytics/Silo/APY.graphql @@ -5,7 +5,7 @@ query SeasonalAPY( $token: Bytes ) { seasons: tokenYields( - where: { season_lte: $season_lte, season_gt: $season_gt, token: $token, siloYield_: {window: ROLLING_30_DAY} } + where: { season_lte: $season_lte, season_gt: $season_gt, token: $token, siloYield_: {emaWindow: ROLLING_30_DAY} } first: $first orderBy: season orderDirection: desc diff --git a/projects/ui/src/components/Market/PodsV2/MarketEvents.graphql b/projects/ui/src/components/Market/PodsV2/MarketEvents.graphql index 9740e60f30..b757174d45 100644 --- a/projects/ui/src/components/Market/PodsV2/MarketEvents.graphql +++ b/projects/ui/src/components/Market/PodsV2/MarketEvents.graphql @@ -35,8 +35,8 @@ query MarketEvents( } ... on PodListingFilled { id - from - to + fromFarmer + toFarmer amount index # of Listing that sold placeInLine @@ -65,8 +65,8 @@ query MarketEvents( } ... on PodOrderFilled { id - from - to + fromFarmer + toFarmer historyID amount placeInLine diff --git a/projects/ui/src/graph/graphql.schema.json b/projects/ui/src/graph/graphql.schema.json index c89b7f4da9..44d20282a0 100644 --- a/projects/ui/src/graph/graphql.schema.json +++ b/projects/ui/src/graph/graphql.schema.json @@ -26718,6 +26718,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "emaWindow", + "description": "Bean EMA Window", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "humidity", "description": "Current humidity", @@ -26797,22 +26813,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "window", - "description": "Bean EMA Window", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, @@ -27190,6 +27190,70 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "emaWindow", + "description": null, + "type": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emaWindow_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emaWindow_not", + "description": null, + "type": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emaWindow_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "humidity", "description": null, @@ -27765,70 +27829,6 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "window", - "description": null, - "type": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "window_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "window_not", - "description": null, - "type": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "window_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "interfaces": null, @@ -27862,37 +27862,37 @@ "deprecationReason": null }, { - "name": "humidity", + "name": "emaWindow", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "humidity", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "outstandingFert", + "name": "id", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "season", + "name": "outstandingFert", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "simpleAPY", + "name": "season", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "window", + "name": "simpleAPY", "description": null, "isDeprecated": false, "deprecationReason": null @@ -44781,6 +44781,440 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "Leaderboard", + "description": null, + "fields": [ + { + "name": "lastVote", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposalsCount", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "space", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "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": "LeaderboardsWhere", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "proposal_count", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_gt", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_gte", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_lt", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_lte", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_not", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "proposal_count_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "space", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "space_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "space_not", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "space_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user_not", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_gt", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_gte", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_lt", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_lte", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_not", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "vote_count_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "MarketStatus", @@ -51621,7 +52055,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": "Account that is sending pods", "args": [], "type": { @@ -51741,7 +52175,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": "Account that is receiving pods", "args": [], "type": { @@ -52133,7 +52567,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "type": { "kind": "SCALAR", @@ -52145,7 +52579,7 @@ "deprecationReason": null }, { - "name": "from_contains", + "name": "fromFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -52157,7 +52591,7 @@ "deprecationReason": null }, { - "name": "from_contains_nocase", + "name": "fromFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -52169,7 +52603,7 @@ "deprecationReason": null }, { - "name": "from_ends_with", + "name": "fromFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -52181,7 +52615,7 @@ "deprecationReason": null }, { - "name": "from_ends_with_nocase", + "name": "fromFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -52193,7 +52627,7 @@ "deprecationReason": null }, { - "name": "from_gt", + "name": "fromFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -52205,7 +52639,7 @@ "deprecationReason": null }, { - "name": "from_gte", + "name": "fromFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -52217,7 +52651,7 @@ "deprecationReason": null }, { - "name": "from_in", + "name": "fromFarmer_in", "description": null, "type": { "kind": "LIST", @@ -52237,7 +52671,7 @@ "deprecationReason": null }, { - "name": "from_lt", + "name": "fromFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -52249,7 +52683,7 @@ "deprecationReason": null }, { - "name": "from_lte", + "name": "fromFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -52261,7 +52695,7 @@ "deprecationReason": null }, { - "name": "from_not", + "name": "fromFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -52273,7 +52707,7 @@ "deprecationReason": null }, { - "name": "from_not_contains", + "name": "fromFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -52285,7 +52719,7 @@ "deprecationReason": null }, { - "name": "from_not_contains_nocase", + "name": "fromFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -52297,7 +52731,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with", + "name": "fromFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -52309,7 +52743,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with_nocase", + "name": "fromFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -52321,7 +52755,7 @@ "deprecationReason": null }, { - "name": "from_not_in", + "name": "fromFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -52341,7 +52775,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with", + "name": "fromFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -52353,7 +52787,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with_nocase", + "name": "fromFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -52365,7 +52799,7 @@ "deprecationReason": null }, { - "name": "from_starts_with", + "name": "fromFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -52377,7 +52811,7 @@ "deprecationReason": null }, { - "name": "from_starts_with_nocase", + "name": "fromFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53657,7 +54091,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "type": { "kind": "SCALAR", @@ -53669,7 +54103,7 @@ "deprecationReason": null }, { - "name": "to_", + "name": "toFarmer_", "description": null, "type": { "kind": "INPUT_OBJECT", @@ -53681,7 +54115,7 @@ "deprecationReason": null }, { - "name": "to_contains", + "name": "toFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -53693,7 +54127,7 @@ "deprecationReason": null }, { - "name": "to_contains_nocase", + "name": "toFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53705,7 +54139,7 @@ "deprecationReason": null }, { - "name": "to_ends_with", + "name": "toFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -53717,7 +54151,7 @@ "deprecationReason": null }, { - "name": "to_ends_with_nocase", + "name": "toFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53729,7 +54163,7 @@ "deprecationReason": null }, { - "name": "to_gt", + "name": "toFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -53741,7 +54175,7 @@ "deprecationReason": null }, { - "name": "to_gte", + "name": "toFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -53753,7 +54187,7 @@ "deprecationReason": null }, { - "name": "to_in", + "name": "toFarmer_in", "description": null, "type": { "kind": "LIST", @@ -53773,7 +54207,7 @@ "deprecationReason": null }, { - "name": "to_lt", + "name": "toFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -53785,7 +54219,7 @@ "deprecationReason": null }, { - "name": "to_lte", + "name": "toFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -53797,7 +54231,7 @@ "deprecationReason": null }, { - "name": "to_not", + "name": "toFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -53809,7 +54243,7 @@ "deprecationReason": null }, { - "name": "to_not_contains", + "name": "toFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -53821,7 +54255,7 @@ "deprecationReason": null }, { - "name": "to_not_contains_nocase", + "name": "toFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53833,7 +54267,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with", + "name": "toFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -53845,7 +54279,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with_nocase", + "name": "toFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53857,7 +54291,7 @@ "deprecationReason": null }, { - "name": "to_not_in", + "name": "toFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -53877,7 +54311,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with", + "name": "toFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -53889,7 +54323,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with_nocase", + "name": "toFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53901,7 +54335,7 @@ "deprecationReason": null }, { - "name": "to_starts_with", + "name": "toFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -53913,7 +54347,7 @@ "deprecationReason": null }, { - "name": "to_starts_with_nocase", + "name": "toFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -53956,7 +54390,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -54292,13 +54726,13 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "to__id", + "name": "toFarmer__id", "description": null, "isDeprecated": false, "deprecationReason": null @@ -59961,7 +60395,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": "Account selling pods", "args": [], "type": { @@ -60105,7 +60539,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": "Account buying pods", "args": [], "type": { @@ -60615,7 +61049,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "type": { "kind": "SCALAR", @@ -60627,7 +61061,7 @@ "deprecationReason": null }, { - "name": "from_contains", + "name": "fromFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -60639,7 +61073,7 @@ "deprecationReason": null }, { - "name": "from_contains_nocase", + "name": "fromFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -60651,7 +61085,7 @@ "deprecationReason": null }, { - "name": "from_ends_with", + "name": "fromFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -60663,7 +61097,7 @@ "deprecationReason": null }, { - "name": "from_ends_with_nocase", + "name": "fromFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -60675,7 +61109,7 @@ "deprecationReason": null }, { - "name": "from_gt", + "name": "fromFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -60687,7 +61121,7 @@ "deprecationReason": null }, { - "name": "from_gte", + "name": "fromFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -60699,7 +61133,7 @@ "deprecationReason": null }, { - "name": "from_in", + "name": "fromFarmer_in", "description": null, "type": { "kind": "LIST", @@ -60719,7 +61153,7 @@ "deprecationReason": null }, { - "name": "from_lt", + "name": "fromFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -60731,7 +61165,7 @@ "deprecationReason": null }, { - "name": "from_lte", + "name": "fromFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -60743,7 +61177,7 @@ "deprecationReason": null }, { - "name": "from_not", + "name": "fromFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -60755,7 +61189,7 @@ "deprecationReason": null }, { - "name": "from_not_contains", + "name": "fromFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -60767,7 +61201,7 @@ "deprecationReason": null }, { - "name": "from_not_contains_nocase", + "name": "fromFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -60779,7 +61213,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with", + "name": "fromFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -60791,7 +61225,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with_nocase", + "name": "fromFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -60803,7 +61237,7 @@ "deprecationReason": null }, { - "name": "from_not_in", + "name": "fromFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -60823,7 +61257,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with", + "name": "fromFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -60835,7 +61269,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with_nocase", + "name": "fromFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -60847,7 +61281,7 @@ "deprecationReason": null }, { - "name": "from_starts_with", + "name": "fromFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -60859,7 +61293,7 @@ "deprecationReason": null }, { - "name": "from_starts_with_nocase", + "name": "fromFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62227,7 +62661,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "type": { "kind": "SCALAR", @@ -62239,7 +62673,7 @@ "deprecationReason": null }, { - "name": "to_contains", + "name": "toFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -62251,7 +62685,7 @@ "deprecationReason": null }, { - "name": "to_contains_nocase", + "name": "toFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62263,7 +62697,7 @@ "deprecationReason": null }, { - "name": "to_ends_with", + "name": "toFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -62275,7 +62709,7 @@ "deprecationReason": null }, { - "name": "to_ends_with_nocase", + "name": "toFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62287,7 +62721,7 @@ "deprecationReason": null }, { - "name": "to_gt", + "name": "toFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -62299,7 +62733,7 @@ "deprecationReason": null }, { - "name": "to_gte", + "name": "toFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -62311,7 +62745,7 @@ "deprecationReason": null }, { - "name": "to_in", + "name": "toFarmer_in", "description": null, "type": { "kind": "LIST", @@ -62331,7 +62765,7 @@ "deprecationReason": null }, { - "name": "to_lt", + "name": "toFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -62343,7 +62777,7 @@ "deprecationReason": null }, { - "name": "to_lte", + "name": "toFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -62355,7 +62789,7 @@ "deprecationReason": null }, { - "name": "to_not", + "name": "toFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -62367,7 +62801,7 @@ "deprecationReason": null }, { - "name": "to_not_contains", + "name": "toFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -62379,7 +62813,7 @@ "deprecationReason": null }, { - "name": "to_not_contains_nocase", + "name": "toFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62391,7 +62825,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with", + "name": "toFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -62403,7 +62837,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with_nocase", + "name": "toFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62415,7 +62849,7 @@ "deprecationReason": null }, { - "name": "to_not_in", + "name": "toFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -62435,7 +62869,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with", + "name": "toFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -62447,7 +62881,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with_nocase", + "name": "toFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62459,7 +62893,7 @@ "deprecationReason": null }, { - "name": "to_starts_with", + "name": "toFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -62471,7 +62905,7 @@ "deprecationReason": null }, { - "name": "to_starts_with_nocase", + "name": "toFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -62520,7 +62954,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -62622,7 +63056,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -66324,7 +66758,7 @@ "deprecationReason": null }, { - "name": "fill__from", + "name": "fill__fromFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -83046,7 +83480,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": "Account selling pods", "args": [], "type": { @@ -83190,7 +83624,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": "Account buying pods", "args": [], "type": { @@ -83700,7 +84134,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "type": { "kind": "SCALAR", @@ -83712,7 +84146,7 @@ "deprecationReason": null }, { - "name": "from_contains", + "name": "fromFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -83724,7 +84158,7 @@ "deprecationReason": null }, { - "name": "from_contains_nocase", + "name": "fromFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -83736,7 +84170,7 @@ "deprecationReason": null }, { - "name": "from_ends_with", + "name": "fromFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -83748,7 +84182,7 @@ "deprecationReason": null }, { - "name": "from_ends_with_nocase", + "name": "fromFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -83760,7 +84194,7 @@ "deprecationReason": null }, { - "name": "from_gt", + "name": "fromFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -83772,7 +84206,7 @@ "deprecationReason": null }, { - "name": "from_gte", + "name": "fromFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -83784,7 +84218,7 @@ "deprecationReason": null }, { - "name": "from_in", + "name": "fromFarmer_in", "description": null, "type": { "kind": "LIST", @@ -83804,7 +84238,7 @@ "deprecationReason": null }, { - "name": "from_lt", + "name": "fromFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -83816,7 +84250,7 @@ "deprecationReason": null }, { - "name": "from_lte", + "name": "fromFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -83828,7 +84262,7 @@ "deprecationReason": null }, { - "name": "from_not", + "name": "fromFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -83840,7 +84274,7 @@ "deprecationReason": null }, { - "name": "from_not_contains", + "name": "fromFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -83852,7 +84286,7 @@ "deprecationReason": null }, { - "name": "from_not_contains_nocase", + "name": "fromFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -83864,7 +84298,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with", + "name": "fromFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -83876,7 +84310,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with_nocase", + "name": "fromFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -83888,7 +84322,7 @@ "deprecationReason": null }, { - "name": "from_not_in", + "name": "fromFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -83908,7 +84342,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with", + "name": "fromFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -83920,7 +84354,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with_nocase", + "name": "fromFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -83932,7 +84366,7 @@ "deprecationReason": null }, { - "name": "from_starts_with", + "name": "fromFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -83944,7 +84378,7 @@ "deprecationReason": null }, { - "name": "from_starts_with_nocase", + "name": "fromFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85312,7 +85746,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "type": { "kind": "SCALAR", @@ -85324,7 +85758,7 @@ "deprecationReason": null }, { - "name": "to_contains", + "name": "toFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -85336,7 +85770,7 @@ "deprecationReason": null }, { - "name": "to_contains_nocase", + "name": "toFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85348,7 +85782,7 @@ "deprecationReason": null }, { - "name": "to_ends_with", + "name": "toFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -85360,7 +85794,7 @@ "deprecationReason": null }, { - "name": "to_ends_with_nocase", + "name": "toFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85372,7 +85806,7 @@ "deprecationReason": null }, { - "name": "to_gt", + "name": "toFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -85384,7 +85818,7 @@ "deprecationReason": null }, { - "name": "to_gte", + "name": "toFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -85396,7 +85830,7 @@ "deprecationReason": null }, { - "name": "to_in", + "name": "toFarmer_in", "description": null, "type": { "kind": "LIST", @@ -85416,7 +85850,7 @@ "deprecationReason": null }, { - "name": "to_lt", + "name": "toFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -85428,7 +85862,7 @@ "deprecationReason": null }, { - "name": "to_lte", + "name": "toFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -85440,7 +85874,7 @@ "deprecationReason": null }, { - "name": "to_not", + "name": "toFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -85452,7 +85886,7 @@ "deprecationReason": null }, { - "name": "to_not_contains", + "name": "toFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -85464,7 +85898,7 @@ "deprecationReason": null }, { - "name": "to_not_contains_nocase", + "name": "toFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85476,7 +85910,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with", + "name": "toFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -85488,7 +85922,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with_nocase", + "name": "toFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85500,7 +85934,7 @@ "deprecationReason": null }, { - "name": "to_not_in", + "name": "toFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -85520,7 +85954,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with", + "name": "toFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -85532,7 +85966,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with_nocase", + "name": "toFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85544,7 +85978,7 @@ "deprecationReason": null }, { - "name": "to_starts_with", + "name": "toFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -85556,7 +85990,7 @@ "deprecationReason": null }, { - "name": "to_starts_with_nocase", + "name": "toFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -85605,7 +86039,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -85707,7 +86141,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -88511,7 +88945,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": " Address that sent the pods ", "args": [], "type": { @@ -88623,7 +89057,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": " Address that received the pods ", "args": [], "type": { @@ -88909,7 +89343,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "type": { "kind": "SCALAR", @@ -88921,7 +89355,7 @@ "deprecationReason": null }, { - "name": "from_contains", + "name": "fromFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -88933,7 +89367,7 @@ "deprecationReason": null }, { - "name": "from_contains_nocase", + "name": "fromFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -88945,7 +89379,7 @@ "deprecationReason": null }, { - "name": "from_ends_with", + "name": "fromFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -88957,7 +89391,7 @@ "deprecationReason": null }, { - "name": "from_ends_with_nocase", + "name": "fromFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -88969,7 +89403,7 @@ "deprecationReason": null }, { - "name": "from_gt", + "name": "fromFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -88981,7 +89415,7 @@ "deprecationReason": null }, { - "name": "from_gte", + "name": "fromFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -88993,7 +89427,7 @@ "deprecationReason": null }, { - "name": "from_in", + "name": "fromFarmer_in", "description": null, "type": { "kind": "LIST", @@ -89013,7 +89447,7 @@ "deprecationReason": null }, { - "name": "from_lt", + "name": "fromFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -89025,7 +89459,7 @@ "deprecationReason": null }, { - "name": "from_lte", + "name": "fromFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -89037,7 +89471,7 @@ "deprecationReason": null }, { - "name": "from_not", + "name": "fromFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -89049,7 +89483,7 @@ "deprecationReason": null }, { - "name": "from_not_contains", + "name": "fromFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -89061,7 +89495,7 @@ "deprecationReason": null }, { - "name": "from_not_contains_nocase", + "name": "fromFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -89073,7 +89507,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with", + "name": "fromFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -89085,7 +89519,7 @@ "deprecationReason": null }, { - "name": "from_not_ends_with_nocase", + "name": "fromFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -89097,7 +89531,7 @@ "deprecationReason": null }, { - "name": "from_not_in", + "name": "fromFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -89117,7 +89551,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with", + "name": "fromFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -89129,7 +89563,7 @@ "deprecationReason": null }, { - "name": "from_not_starts_with_nocase", + "name": "fromFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -89141,7 +89575,7 @@ "deprecationReason": null }, { - "name": "from_starts_with", + "name": "fromFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -89153,7 +89587,7 @@ "deprecationReason": null }, { - "name": "from_starts_with_nocase", + "name": "fromFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90153,7 +90587,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "type": { "kind": "SCALAR", @@ -90165,7 +90599,7 @@ "deprecationReason": null }, { - "name": "to_contains", + "name": "toFarmer_contains", "description": null, "type": { "kind": "SCALAR", @@ -90177,7 +90611,7 @@ "deprecationReason": null }, { - "name": "to_contains_nocase", + "name": "toFarmer_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90189,7 +90623,7 @@ "deprecationReason": null }, { - "name": "to_ends_with", + "name": "toFarmer_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -90201,7 +90635,7 @@ "deprecationReason": null }, { - "name": "to_ends_with_nocase", + "name": "toFarmer_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90213,7 +90647,7 @@ "deprecationReason": null }, { - "name": "to_gt", + "name": "toFarmer_gt", "description": null, "type": { "kind": "SCALAR", @@ -90225,7 +90659,7 @@ "deprecationReason": null }, { - "name": "to_gte", + "name": "toFarmer_gte", "description": null, "type": { "kind": "SCALAR", @@ -90237,7 +90671,7 @@ "deprecationReason": null }, { - "name": "to_in", + "name": "toFarmer_in", "description": null, "type": { "kind": "LIST", @@ -90257,7 +90691,7 @@ "deprecationReason": null }, { - "name": "to_lt", + "name": "toFarmer_lt", "description": null, "type": { "kind": "SCALAR", @@ -90269,7 +90703,7 @@ "deprecationReason": null }, { - "name": "to_lte", + "name": "toFarmer_lte", "description": null, "type": { "kind": "SCALAR", @@ -90281,7 +90715,7 @@ "deprecationReason": null }, { - "name": "to_not", + "name": "toFarmer_not", "description": null, "type": { "kind": "SCALAR", @@ -90293,7 +90727,7 @@ "deprecationReason": null }, { - "name": "to_not_contains", + "name": "toFarmer_not_contains", "description": null, "type": { "kind": "SCALAR", @@ -90305,7 +90739,7 @@ "deprecationReason": null }, { - "name": "to_not_contains_nocase", + "name": "toFarmer_not_contains_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90317,7 +90751,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with", + "name": "toFarmer_not_ends_with", "description": null, "type": { "kind": "SCALAR", @@ -90329,7 +90763,7 @@ "deprecationReason": null }, { - "name": "to_not_ends_with_nocase", + "name": "toFarmer_not_ends_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90341,7 +90775,7 @@ "deprecationReason": null }, { - "name": "to_not_in", + "name": "toFarmer_not_in", "description": null, "type": { "kind": "LIST", @@ -90361,7 +90795,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with", + "name": "toFarmer_not_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -90373,7 +90807,7 @@ "deprecationReason": null }, { - "name": "to_not_starts_with_nocase", + "name": "toFarmer_not_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90385,7 +90819,7 @@ "deprecationReason": null }, { - "name": "to_starts_with", + "name": "toFarmer_starts_with", "description": null, "type": { "kind": "SCALAR", @@ -90397,7 +90831,7 @@ "deprecationReason": null }, { - "name": "to_starts_with_nocase", + "name": "toFarmer_starts_with_nocase", "description": null, "type": { "kind": "SCALAR", @@ -90434,7 +90868,7 @@ "deprecationReason": null }, { - "name": "from", + "name": "fromFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -90524,7 +90958,7 @@ "deprecationReason": null }, { - "name": "to", + "name": "toFarmer", "description": null, "isDeprecated": false, "deprecationReason": null @@ -106702,6 +107136,91 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "leaderboards", + "description": null, + "args": [ + { + "name": "first", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": "20", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "orderBy", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "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": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": "0", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "where", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "LeaderboardsWhere", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Leaderboard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "marketplaceEvent", "description": null, @@ -142208,6 +142727,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "emaWindow", + "description": "Window used for vAPY calc", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": "Season of data points - EMA window", @@ -142364,22 +142899,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "window", - "description": "Window used for vAPY calc", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, @@ -142757,6 +143276,70 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "emaWindow", + "description": null, + "type": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emaWindow_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emaWindow_not", + "description": null, + "type": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emaWindow_not_in", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EmaWindow", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -143240,70 +143823,6 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "window", - "description": null, - "type": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "window_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "window_not", - "description": null, - "type": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "window_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "EmaWindow", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "interfaces": null, @@ -143337,37 +143856,37 @@ "deprecationReason": null }, { - "name": "id", + "name": "emaWindow", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "season", + "name": "id", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "tokenAPYS", + "name": "season", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "u", + "name": "tokenAPYS", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "whitelistedTokens", + "name": "u", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "window", + "name": "whitelistedTokens", "description": null, "isDeprecated": false, "deprecationReason": null @@ -162041,25 +162560,25 @@ "deprecationReason": null }, { - "name": "siloYield__id", + "name": "siloYield__emaWindow", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "siloYield__season", + "name": "siloYield__id", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "siloYield__u", + "name": "siloYield__season", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "siloYield__window", + "name": "siloYield__u", "description": null, "isDeprecated": false, "deprecationReason": null @@ -164979,13 +165498,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -165042,6 +165557,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "lastVote", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lens", "description": null, @@ -165066,6 +165593,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "proposalsCount", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "twitter", "description": null, @@ -165077,6 +165616,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "votesCount", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, diff --git a/projects/ui/src/graph/queries/LatestAPY.graphql b/projects/ui/src/graph/queries/LatestAPY.graphql index 638e5adbba..4372b06cfc 100644 --- a/projects/ui/src/graph/queries/LatestAPY.graphql +++ b/projects/ui/src/graph/queries/LatestAPY.graphql @@ -1,5 +1,5 @@ query LatestAPY { - day: siloYields(first: 1, orderBy: season, orderDirection: desc, where: {window: ROLLING_24_HOUR}) { + day: siloYields(first: 1, orderBy: season, orderDirection: desc, where: {emaWindow: ROLLING_24_HOUR}) { id season beansPerSeasonEMA @@ -9,7 +9,7 @@ query LatestAPY { stalkAPY } } - week: siloYields(first: 1, orderBy: season, orderDirection: desc, where: {window: ROLLING_7_DAY}) { + week: siloYields(first: 1, orderBy: season, orderDirection: desc, where: {emaWindow: ROLLING_7_DAY}) { id season beansPerSeasonEMA @@ -19,7 +19,7 @@ query LatestAPY { stalkAPY } } - month: siloYields(first: 1, orderBy: season, orderDirection: desc, where: {window: ROLLING_30_DAY}) { + month: siloYields(first: 1, orderBy: season, orderDirection: desc, where: {emaWindow: ROLLING_30_DAY}) { id season beansPerSeasonEMA diff --git a/projects/ui/src/graph/schema-beanstalk.graphql b/projects/ui/src/graph/schema-beanstalk.graphql index 7ff74429fc..12cb3ba333 100644 --- a/projects/ui/src/graph/schema-beanstalk.graphql +++ b/projects/ui/src/graph/schema-beanstalk.graphql @@ -1124,6 +1124,9 @@ type FertilizerYield { """BPF delta""" deltaBpf: BigDecimal! + """Bean EMA Window""" + emaWindow: EmaWindow! + """Current humidity""" humidity: BigDecimal! @@ -1138,9 +1141,6 @@ type FertilizerYield { """Simplified APY for new Fert""" simpleAPY: BigDecimal! - - """Bean EMA Window""" - window: EmaWindow! } input FertilizerYield_filter { @@ -1171,6 +1171,10 @@ input FertilizerYield_filter { deltaBpf_lte: BigDecimal deltaBpf_not: BigDecimal deltaBpf_not_in: [BigDecimal!] + emaWindow: EmaWindow + emaWindow_in: [EmaWindow!] + emaWindow_not: EmaWindow + emaWindow_not_in: [EmaWindow!] humidity: BigDecimal humidity_gt: BigDecimal humidity_gte: BigDecimal @@ -1212,22 +1216,18 @@ input FertilizerYield_filter { simpleAPY_lte: BigDecimal simpleAPY_not: BigDecimal simpleAPY_not_in: [BigDecimal!] - window: EmaWindow - window_in: [EmaWindow!] - window_not: EmaWindow - window_not_in: [EmaWindow!] } enum FertilizerYield_orderBy { beansPerSeasonEMA createdAt deltaBpf + emaWindow humidity id outstandingFert season simpleAPY - window } input Fertilizer_filter { @@ -3371,7 +3371,7 @@ type PodFill { createdAt: BigInt! """Account that is sending pods""" - from: String! + fromFarmer: String! """Beanstalk address - Order/Listing index - transaction hash""" id: ID! @@ -3395,7 +3395,7 @@ type PodFill { start: BigInt! """Account that is receiving pods""" - to: Farmer! + toFarmer: Farmer! } input PodFill_filter { @@ -3426,26 +3426,26 @@ input PodFill_filter { createdAt_lte: BigInt createdAt_not: BigInt createdAt_not_in: [BigInt!] - from: String - from_contains: String - from_contains_nocase: String - from_ends_with: String - from_ends_with_nocase: String - from_gt: String - from_gte: String - from_in: [String!] - from_lt: String - from_lte: String - from_not: String - from_not_contains: String - from_not_contains_nocase: String - from_not_ends_with: String - from_not_ends_with_nocase: String - from_not_in: [String!] - from_not_starts_with: String - from_not_starts_with_nocase: String - from_starts_with: String - from_starts_with_nocase: String + fromFarmer: String + fromFarmer_contains: String + fromFarmer_contains_nocase: String + fromFarmer_ends_with: String + fromFarmer_ends_with_nocase: String + fromFarmer_gt: String + fromFarmer_gte: String + fromFarmer_in: [String!] + fromFarmer_lt: String + fromFarmer_lte: String + fromFarmer_not: String + fromFarmer_not_contains: String + fromFarmer_not_contains_nocase: String + fromFarmer_not_ends_with: String + fromFarmer_not_ends_with_nocase: String + fromFarmer_not_in: [String!] + fromFarmer_not_starts_with: String + fromFarmer_not_starts_with_nocase: String + fromFarmer_starts_with: String + fromFarmer_starts_with_nocase: String id: ID id_gt: ID id_gte: ID @@ -3542,34 +3542,34 @@ input PodFill_filter { start_lte: BigInt start_not: BigInt start_not_in: [BigInt!] - to: String - to_: Farmer_filter - to_contains: String - to_contains_nocase: String - to_ends_with: String - to_ends_with_nocase: String - to_gt: String - to_gte: String - to_in: [String!] - to_lt: String - to_lte: String - to_not: String - to_not_contains: String - to_not_contains_nocase: String - to_not_ends_with: String - to_not_ends_with_nocase: String - to_not_in: [String!] - to_not_starts_with: String - to_not_starts_with_nocase: String - to_starts_with: String - to_starts_with_nocase: String + toFarmer: String + toFarmer_: Farmer_filter + toFarmer_contains: String + toFarmer_contains_nocase: String + toFarmer_ends_with: String + toFarmer_ends_with_nocase: String + toFarmer_gt: String + toFarmer_gte: String + toFarmer_in: [String!] + toFarmer_lt: String + toFarmer_lte: String + toFarmer_not: String + toFarmer_not_contains: String + toFarmer_not_contains_nocase: String + toFarmer_not_ends_with: String + toFarmer_not_ends_with_nocase: String + toFarmer_not_in: [String!] + toFarmer_not_starts_with: String + toFarmer_not_starts_with_nocase: String + toFarmer_starts_with: String + toFarmer_starts_with_nocase: String } enum PodFill_orderBy { amount costInBeans createdAt - from + fromFarmer id index listing @@ -3625,8 +3625,8 @@ enum PodFill_orderBy { podMarketplace__podVolume podMarketplace__season start - to - to__id + toFarmer + toFarmer__id } type PodListing { @@ -4197,7 +4197,7 @@ type PodListingFilled implements MarketplaceEvent { createdAt: BigInt! """Account selling pods""" - from: String! + fromFarmer: String! """ Transaction hash of the transaction that emitted this event """ hash: String! @@ -4225,7 +4225,7 @@ type PodListingFilled implements MarketplaceEvent { start: BigInt! """Account buying pods""" - to: String! + toFarmer: String! } input PodListingFilled_filter { @@ -4264,26 +4264,26 @@ input PodListingFilled_filter { createdAt_lte: BigInt createdAt_not: BigInt createdAt_not_in: [BigInt!] - from: String - from_contains: String - from_contains_nocase: String - from_ends_with: String - from_ends_with_nocase: String - from_gt: String - from_gte: String - from_in: [String!] - from_lt: String - from_lte: String - from_not: String - from_not_contains: String - from_not_contains_nocase: String - from_not_ends_with: String - from_not_ends_with_nocase: String - from_not_in: [String!] - from_not_starts_with: String - from_not_starts_with_nocase: String - from_starts_with: String - from_starts_with_nocase: String + fromFarmer: String + fromFarmer_contains: String + fromFarmer_contains_nocase: String + fromFarmer_ends_with: String + fromFarmer_ends_with_nocase: String + fromFarmer_gt: String + fromFarmer_gte: String + fromFarmer_in: [String!] + fromFarmer_lt: String + fromFarmer_lte: String + fromFarmer_not: String + fromFarmer_not_contains: String + fromFarmer_not_contains_nocase: String + fromFarmer_not_ends_with: String + fromFarmer_not_ends_with_nocase: String + fromFarmer_not_in: [String!] + fromFarmer_not_starts_with: String + fromFarmer_not_starts_with_nocase: String + fromFarmer_starts_with: String + fromFarmer_starts_with_nocase: String hash: String hash_contains: String hash_contains_nocase: String @@ -4386,26 +4386,26 @@ input PodListingFilled_filter { start_lte: BigInt start_not: BigInt start_not_in: [BigInt!] - to: String - to_contains: String - to_contains_nocase: String - to_ends_with: String - to_ends_with_nocase: String - to_gt: String - to_gte: String - to_in: [String!] - to_lt: String - to_lte: String - to_not: String - to_not_contains: String - to_not_contains_nocase: String - to_not_ends_with: String - to_not_ends_with_nocase: String - to_not_in: [String!] - to_not_starts_with: String - to_not_starts_with_nocase: String - to_starts_with: String - to_starts_with_nocase: String + toFarmer: String + toFarmer_contains: String + toFarmer_contains_nocase: String + toFarmer_ends_with: String + toFarmer_ends_with_nocase: String + toFarmer_gt: String + toFarmer_gte: String + toFarmer_in: [String!] + toFarmer_lt: String + toFarmer_lte: String + toFarmer_not: String + toFarmer_not_contains: String + toFarmer_not_contains_nocase: String + toFarmer_not_ends_with: String + toFarmer_not_ends_with_nocase: String + toFarmer_not_in: [String!] + toFarmer_not_starts_with: String + toFarmer_not_starts_with_nocase: String + toFarmer_starts_with: String + toFarmer_starts_with_nocase: String } enum PodListingFilled_orderBy { @@ -4413,7 +4413,7 @@ enum PodListingFilled_orderBy { blockNumber costInBeans createdAt - from + fromFarmer hash historyID id @@ -4430,7 +4430,7 @@ enum PodListingFilled_orderBy { protocol__slug protocol__subgraphVersion start - to + toFarmer } input PodListing_filter { @@ -4716,7 +4716,7 @@ enum PodListing_orderBy { fill__amount fill__costInBeans fill__createdAt - fill__from + fill__fromFarmer fill__id fill__index fill__placeInLine @@ -6292,7 +6292,7 @@ type PodOrderFilled implements MarketplaceEvent { createdAt: BigInt! """Account selling pods""" - from: String! + fromFarmer: String! """ Transaction hash of the transaction that emitted this event """ hash: String! @@ -6320,7 +6320,7 @@ type PodOrderFilled implements MarketplaceEvent { start: BigInt! """Account buying pods""" - to: String! + toFarmer: String! } input PodOrderFilled_filter { @@ -6359,26 +6359,26 @@ input PodOrderFilled_filter { createdAt_lte: BigInt createdAt_not: BigInt createdAt_not_in: [BigInt!] - from: String - from_contains: String - from_contains_nocase: String - from_ends_with: String - from_ends_with_nocase: String - from_gt: String - from_gte: String - from_in: [String!] - from_lt: String - from_lte: String - from_not: String - from_not_contains: String - from_not_contains_nocase: String - from_not_ends_with: String - from_not_ends_with_nocase: String - from_not_in: [String!] - from_not_starts_with: String - from_not_starts_with_nocase: String - from_starts_with: String - from_starts_with_nocase: String + fromFarmer: String + fromFarmer_contains: String + fromFarmer_contains_nocase: String + fromFarmer_ends_with: String + fromFarmer_ends_with_nocase: String + fromFarmer_gt: String + fromFarmer_gte: String + fromFarmer_in: [String!] + fromFarmer_lt: String + fromFarmer_lte: String + fromFarmer_not: String + fromFarmer_not_contains: String + fromFarmer_not_contains_nocase: String + fromFarmer_not_ends_with: String + fromFarmer_not_ends_with_nocase: String + fromFarmer_not_in: [String!] + fromFarmer_not_starts_with: String + fromFarmer_not_starts_with_nocase: String + fromFarmer_starts_with: String + fromFarmer_starts_with_nocase: String hash: String hash_contains: String hash_contains_nocase: String @@ -6481,26 +6481,26 @@ input PodOrderFilled_filter { start_lte: BigInt start_not: BigInt start_not_in: [BigInt!] - to: String - to_contains: String - to_contains_nocase: String - to_ends_with: String - to_ends_with_nocase: String - to_gt: String - to_gte: String - to_in: [String!] - to_lt: String - to_lte: String - to_not: String - to_not_contains: String - to_not_contains_nocase: String - to_not_ends_with: String - to_not_ends_with_nocase: String - to_not_in: [String!] - to_not_starts_with: String - to_not_starts_with_nocase: String - to_starts_with: String - to_starts_with_nocase: String + toFarmer: String + toFarmer_contains: String + toFarmer_contains_nocase: String + toFarmer_ends_with: String + toFarmer_ends_with_nocase: String + toFarmer_gt: String + toFarmer_gte: String + toFarmer_in: [String!] + toFarmer_lt: String + toFarmer_lte: String + toFarmer_not: String + toFarmer_not_contains: String + toFarmer_not_contains_nocase: String + toFarmer_not_ends_with: String + toFarmer_not_ends_with_nocase: String + toFarmer_not_in: [String!] + toFarmer_not_starts_with: String + toFarmer_not_starts_with_nocase: String + toFarmer_starts_with: String + toFarmer_starts_with_nocase: String } enum PodOrderFilled_orderBy { @@ -6508,7 +6508,7 @@ enum PodOrderFilled_orderBy { blockNumber costInBeans createdAt - from + fromFarmer hash historyID id @@ -6525,7 +6525,7 @@ enum PodOrderFilled_orderBy { protocol__slug protocol__subgraphVersion start - to + toFarmer } input PodOrder_filter { @@ -6761,7 +6761,7 @@ type PodTransfer implements FieldEvent { createdAt: BigInt! """ Address that sent the pods """ - from: String! + fromFarmer: String! """ Transaction hash of the transaction that emitted this event """ hash: String! @@ -6783,7 +6783,7 @@ type PodTransfer implements FieldEvent { protocol: Beanstalk! """ Address that received the pods """ - to: String! + toFarmer: String! } input PodTransfer_filter { @@ -6806,26 +6806,26 @@ input PodTransfer_filter { createdAt_lte: BigInt createdAt_not: BigInt createdAt_not_in: [BigInt!] - from: String - from_contains: String - from_contains_nocase: String - from_ends_with: String - from_ends_with_nocase: String - from_gt: String - from_gte: String - from_in: [String!] - from_lt: String - from_lte: String - from_not: String - from_not_contains: String - from_not_contains_nocase: String - from_not_ends_with: String - from_not_ends_with_nocase: String - from_not_in: [String!] - from_not_starts_with: String - from_not_starts_with_nocase: String - from_starts_with: String - from_starts_with_nocase: String + fromFarmer: String + fromFarmer_contains: String + fromFarmer_contains_nocase: String + fromFarmer_ends_with: String + fromFarmer_ends_with_nocase: String + fromFarmer_gt: String + fromFarmer_gte: String + fromFarmer_in: [String!] + fromFarmer_lt: String + fromFarmer_lte: String + fromFarmer_not: String + fromFarmer_not_contains: String + fromFarmer_not_contains_nocase: String + fromFarmer_not_ends_with: String + fromFarmer_not_ends_with_nocase: String + fromFarmer_not_in: [String!] + fromFarmer_not_starts_with: String + fromFarmer_not_starts_with_nocase: String + fromFarmer_starts_with: String + fromFarmer_starts_with_nocase: String hash: String hash_contains: String hash_contains_nocase: String @@ -6900,32 +6900,32 @@ input PodTransfer_filter { protocol_not_starts_with_nocase: String protocol_starts_with: String protocol_starts_with_nocase: String - to: String - to_contains: String - to_contains_nocase: String - to_ends_with: String - to_ends_with_nocase: String - to_gt: String - to_gte: String - to_in: [String!] - to_lt: String - to_lte: String - to_not: String - to_not_contains: String - to_not_contains_nocase: String - to_not_ends_with: String - to_not_ends_with_nocase: String - to_not_in: [String!] - to_not_starts_with: String - to_not_starts_with_nocase: String - to_starts_with: String - to_starts_with_nocase: String + toFarmer: String + toFarmer_contains: String + toFarmer_contains_nocase: String + toFarmer_ends_with: String + toFarmer_ends_with_nocase: String + toFarmer_gt: String + toFarmer_gte: String + toFarmer_in: [String!] + toFarmer_lt: String + toFarmer_lte: String + toFarmer_not: String + toFarmer_not_contains: String + toFarmer_not_contains_nocase: String + toFarmer_not_ends_with: String + toFarmer_not_ends_with_nocase: String + toFarmer_not_in: [String!] + toFarmer_not_starts_with: String + toFarmer_not_starts_with_nocase: String + toFarmer_starts_with: String + toFarmer_starts_with_nocase: String } enum PodTransfer_orderBy { blockNumber createdAt - from + fromFarmer hash id index @@ -6940,7 +6940,7 @@ enum PodTransfer_orderBy { protocol__schemaVersion protocol__slug protocol__subgraphVersion - to + toFarmer } type Query { @@ -10858,6 +10858,9 @@ type SiloYield { """Unix timestamp of update""" createdAt: BigInt! + """Window used for vAPY calc""" + emaWindow: EmaWindow! + """Season of data points - EMA window""" id: ID! @@ -10872,9 +10875,6 @@ type SiloYield { """Current whitelisted silo tokens""" whitelistedTokens: [String!]! - - """Window used for vAPY calc""" - window: EmaWindow! } input SiloYield_filter { @@ -10905,6 +10905,10 @@ input SiloYield_filter { createdAt_lte: BigInt createdAt_not: BigInt createdAt_not_in: [BigInt!] + emaWindow: EmaWindow + emaWindow_in: [EmaWindow!] + emaWindow_not: EmaWindow + emaWindow_not_in: [EmaWindow!] id: ID id_gt: ID id_gte: ID @@ -10937,22 +10941,18 @@ input SiloYield_filter { whitelistedTokens_not: [String!] whitelistedTokens_not_contains: [String!] whitelistedTokens_not_contains_nocase: [String!] - window: EmaWindow - window_in: [EmaWindow!] - window_not: EmaWindow - window_not_in: [EmaWindow!] } enum SiloYield_orderBy { beansPerSeasonEMA beta createdAt + emaWindow id season tokenAPYS u whitelistedTokens - window } input Silo_filter { @@ -12907,10 +12907,10 @@ enum TokenYield_orderBy { siloYield__beansPerSeasonEMA siloYield__beta siloYield__createdAt + siloYield__emaWindow siloYield__id siloYield__season siloYield__u - siloYield__window stalkAPY token } diff --git a/projects/ui/src/graph/schema-snapshot1.graphql b/projects/ui/src/graph/schema-snapshot1.graphql index f13316c534..4713b25db3 100644 --- a/projects/ui/src/graph/schema-snapshot1.graphql +++ b/projects/ui/src/graph/schema-snapshot1.graphql @@ -69,6 +69,41 @@ type Item { spacesCount: Int } +type Leaderboard { + lastVote: Int + proposalsCount: Int + space: String + user: String + votesCount: Int +} + +input LeaderboardsWhere { + proposal_count: Int + proposal_count_gt: [Int] + proposal_count_gte: [Int] + proposal_count_in: [Int] + proposal_count_lt: [Int] + proposal_count_lte: [Int] + proposal_count_not: Int + proposal_count_not_in: [Int] + space: String + space_in: [String] + space_not: String + space_not_in: [String] + user: String + user_in: [String] + user_not: String + user_not_in: [String] + vote_count: Int + vote_count_gt: [Int] + vote_count_gte: [Int] + vote_count_in: [Int] + vote_count_lt: [Int] + vote_count_lte: [Int] + vote_count_not: Int + vote_count_not_in: [Int] +} + type Message { address: String id: String @@ -205,6 +240,7 @@ input ProposalWhere { type Query { aliases(first: Int! = 20, orderBy: String, orderDirection: OrderDirection, skip: Int! = 0, where: AliasWhere): [Alias] follows(first: Int! = 20, orderBy: String, orderDirection: OrderDirection, skip: Int! = 0, where: FollowWhere): [Follow] + leaderboards(first: Int! = 20, orderBy: String, orderDirection: OrderDirection, skip: Int! = 0, where: LeaderboardsWhere): [Leaderboard] messages(first: Int! = 20, orderBy: String, orderDirection: OrderDirection, skip: Int! = 0, where: MessageWhere): [Message] networks: [Item] plugins: [Item] @@ -412,14 +448,17 @@ type User { about: String avatar: String cover: String - created: Int! + created: Int farcaster: String github: String id: String! ipfs: String + lastVote: Int lens: String name: String + proposalsCount: Int twitter: String + votesCount: Int } input UsersWhere { diff --git a/yarn.lock b/yarn.lock index d31ff45ffa..7dff752053 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5384,9 +5384,9 @@ __metadata: languageName: node linkType: hard -"@graphprotocol/graph-cli@npm:0.69.0": - version: 0.69.0 - resolution: "@graphprotocol/graph-cli@npm:0.69.0" +"@graphprotocol/graph-cli@npm:0.79.2": + version: 0.79.2 + resolution: "@graphprotocol/graph-cli@npm:0.79.2" dependencies: "@float-capital/float-subgraph-uncrashable": "npm:^0.0.0-alpha.4" "@oclif/core": "npm:2.8.6" @@ -5408,6 +5408,7 @@ __metadata: ipfs-http-client: "npm:55.0.0" jayson: "npm:4.0.0" js-yaml: "npm:3.14.1" + open: "npm:8.4.2" prettier: "npm:3.0.3" semver: "npm:7.4.0" sync-request: "npm:6.1.0" @@ -5417,7 +5418,7 @@ __metadata: yaml: "npm:1.10.2" bin: graph: bin/run - checksum: 10/55c1dcc2396530171ade4dde5444395f0a78755292237a67fdd5122b3390bcbc547bf5509427950ccdfb41ed22de7455aecb4573a4faa643c793633ee8535765 + checksum: 10/433468c6a747a74f5f3c8e51ee3e287fd7b828fbb39e51ddda3a98d4991e66a015727d87e1308682bda299a62b872c31562a1b09b62ffa3c76d134d67671f822 languageName: node linkType: hard @@ -14663,13 +14664,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:18.15.13": - version: 18.15.13 - resolution: "@types/node@npm:18.15.13" - checksum: 10/b9bbe923573797ef7c5fd2641a6793489e25d9369c32aeadcaa5c7c175c85b42eb12d6fe173f6781ab6f42eaa1ebd9576a419eeaa2a1ec810094adb8adaa9a54 - languageName: node - linkType: hard - "@types/node@npm:18.19.17, @types/node@npm:^18.16.3": version: 18.19.17 resolution: "@types/node@npm:18.19.17" @@ -17313,13 +17307,6 @@ __metadata: languageName: node linkType: hard -"aes-js@npm:4.0.0-beta.5": - version: 4.0.0-beta.5 - resolution: "aes-js@npm:4.0.0-beta.5" - checksum: 10/8f745da2e8fb38e91297a8ec13c2febe3219f8383303cd4ed4660ca67190242ccfd5fdc2f0d1642fd1ea934818fb871cd4cc28d3f28e812e3dc6c3d0f1f97c24 - languageName: node - linkType: hard - "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -18982,9 +18969,8 @@ __metadata: version: 0.0.0-use.local resolution: "beanft@workspace:projects/subgraph-beanft" dependencies: - "@graphprotocol/graph-cli": "npm:0.69.0" + "@graphprotocol/graph-cli": "npm:0.79.2" "@graphprotocol/graph-ts": "npm:0.34.0" - ethers: "npm:^6.3.0" matchstick-as: "npm:^0.6.0" languageName: unknown linkType: soft @@ -24986,21 +24972,6 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^6.3.0": - version: 6.8.1 - resolution: "ethers@npm:6.8.1" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.0" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:18.15.13" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.4.0" - ws: "npm:8.5.0" - checksum: 10/22d17fb038fd48aa23d4c43f4b0a8c20aa1c74676724adb94b52f363f42044b7d14dfa086dd2f881f172f79fcb7108ff161e672e323dcebef9d9ed4d373f072f - languageName: node - linkType: hard - "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -35973,6 +35944,17 @@ __metadata: languageName: node linkType: hard +"open@npm:8.4.2": + version: 8.4.2 + resolution: "open@npm:8.4.2" + dependencies: + define-lazy-prop: "npm:^2.0.0" + is-docker: "npm:^2.1.1" + is-wsl: "npm:^2.2.0" + checksum: 10/acd81a1d19879c818acb3af2d2e8e9d81d17b5367561e623248133deb7dd3aefaed527531df2677d3e6aaf0199f84df57b6b2262babff8bf46ea0029aac536c9 + languageName: node + linkType: hard + "open@npm:^7.0.3": version: 7.4.2 resolution: "open@npm:7.4.2" @@ -41774,7 +41756,7 @@ __metadata: version: 0.0.0-use.local resolution: "subgraph-basin@workspace:projects/subgraph-basin" dependencies: - "@graphprotocol/graph-cli": "npm:0.69.0" + "@graphprotocol/graph-cli": "npm:0.79.2" "@graphprotocol/graph-ts": "npm:0.34.0" matchstick-as: "npm:^0.6.0" languageName: unknown @@ -41784,7 +41766,7 @@ __metadata: version: 0.0.0-use.local resolution: "subgraph-bean@workspace:projects/subgraph-bean" dependencies: - "@graphprotocol/graph-cli": "npm:0.69.0" + "@graphprotocol/graph-cli": "npm:0.79.2" "@graphprotocol/graph-ts": "npm:0.34.0" matchstick-as: "npm:^0.6.0" languageName: unknown @@ -41794,7 +41776,7 @@ __metadata: version: 0.0.0-use.local resolution: "subgraph-beanstalk@workspace:projects/subgraph-beanstalk" dependencies: - "@graphprotocol/graph-cli": "npm:0.69.0" + "@graphprotocol/graph-cli": "npm:0.79.2" "@graphprotocol/graph-ts": "npm:0.34.0" matchstick-as: "npm:^0.6.0" languageName: unknown @@ -42876,13 +42858,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.4.0, tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:~2.4.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 10/d8379e68b36caf082c1905ec25d17df8261e1d68ddc1abfd6c91158a064f6e4402039ae7c02cf4c81d12e3a2a2c7cd8ea2f57b233eb80136a2e3e7279daf2911 - languageName: node - linkType: hard - "tslib@npm:2.6.2, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" @@ -42890,6 +42865,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:~2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 10/d8379e68b36caf082c1905ec25d17df8261e1d68ddc1abfd6c91158a064f6e4402039ae7c02cf4c81d12e3a2a2c7cd8ea2f57b233eb80136a2e3e7279daf2911 + languageName: node + linkType: hard + "tslib@npm:^2.0.1, tslib@npm:^2.3.0": version: 2.4.1 resolution: "tslib@npm:2.4.1" @@ -45438,21 +45420,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.5.0": - version: 8.5.0 - resolution: "ws@npm:8.5.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10/f0ee700970a0bf925b1ec213ca3691e84fb8b435a91461fe3caf52f58c6cec57c99ed5890fbf6978824c932641932019aafc55d864cad38ac32577496efd5d3a - languageName: node - linkType: hard - "ws@npm:^7.4.5, ws@npm:^7.4.6, ws@npm:^7.5.1": version: 7.5.9 resolution: "ws@npm:7.5.9"