diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e3e29e4550..ee2b5c9cd6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Node.js & TypeScript", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bookworm", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04", // Features to add to the dev container. More info: https://containers.dev/features. "features": { // If having issues with Nix then consult: @@ -19,21 +19,26 @@ "ghcr.io/lukewiwa/features/shellcheck:0": {}, "ghcr.io/devcontainers-contrib/features/curl-apt-get:1": {}, "ghcr.io/devcontainers/features/docker-in-docker:2": {}, - "ghcr.io/devcontainers-contrib/features/act:1": {} + "ghcr.io/devcontainers-contrib/features/act:1": {}, + "ghcr.io/devcontainers/features/node:1": {}, + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {} }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. // 1. using nix to create a reproduciable build // 2. install foundry for people don't want to use nix // 3. if you want to use nix further, do "nix develop" - "postCreateCommand": "./tasks/fix-devcontainer.sh && nix develop . -c bash <(echo \"yarn install && yarn build\") && curl -L https://foundry.paradigm.xyz | bash & foundryup" - + "postCreateCommand": [ + "curl -L https://foundry.paradigm.xyz | bash", + "source /home/vscode/.bashrc && foundryup", + "yarn global add npm-run-all", + "yarn install && yarn build", + "sudo apt-get install libpq5", // for subgraph's matchstick + "./tasks/fix-devcontainer.sh && yarn shell . -c bash <(echo \"yarn install && yarn build\")" + ] // Configure tool-specific properties. // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" -} +} \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/subgraph-bug-report.md b/.github/ISSUE_TEMPLATE/subgraph-bug-report.md index 78c9f2dc53..c7482ed731 100644 --- a/.github/ISSUE_TEMPLATE/subgraph-bug-report.md +++ b/.github/ISSUE_TEMPLATE/subgraph-bug-report.md @@ -10,10 +10,10 @@ assignees: 0xdavinchee **Describe the bug:** A clear and concise description of what the bug is. What is the data you are having issues with? -**Subgraph endpoint:** [e.g. https://thegraph.com/hosted-service/subgraph/superfluid-finance/protocol-v1-goerli] +**Subgraph endpoint:** [e.g. https://thegraph.com/hosted-service/subgraph/superfluid-finance/protocol-v1-polygon-mainnet] **Query:** -e.g. +e.g. ``` query MyQuery { streams(first: 10) { diff --git a/.github/actions/setup-workflow-base/action.yml b/.github/actions/setup-workflow-base/action.yml new file mode 100644 index 0000000000..73c4f97682 --- /dev/null +++ b/.github/actions/setup-workflow-base/action.yml @@ -0,0 +1,52 @@ +name: Setup Workflow Base +description: > + This sets up the base for a workflow, where: + + - nix is installed, + - cache is looked up, + - and nix dev shell is setup if cache is missed. + +inputs: + package-name: + description: Name of the package where input files are from + required: true + cache-key-prefix: + description: Cache key prefix to attach to the calculated input files hash + required: true + dev-shell-name: + description: Default shell to be used + +outputs: + cache-hit: + value: ${{ steps.cache.outputs.cache-hit }} + +runs: + using: composite + steps: + - uses: DeterminateSystems/nix-installer-action@v13 + + - name: Load the half-board nix module + id: hb + run: | + ./tasks/mk-cache-key.sh ./packages/${{ inputs.package-name }} > cache.json + jq . cache.json + key_prefix="${{ inputs.cache-key-prefix }}" + path=$(jq '.outputs | join("\n")' cache.json) + hash=$(jq -r .hash cache.json) + echo "path=$path" >> "$GITHUB_OUTPUT" + echo "key=${key_prefix}${hash}" >> "$GITHUB_OUTPUT" + shell: nix develop .#mk-cache-key -c bash -xe {0} + + - name: Lookup cache + id: cache + uses: actions/cache@v4 + with: + path: ${{ fromJSON(steps.hb.outputs.path) }} + key: ${{ steps.hb.outputs.key }} + + - name: Initialize nix dev shell + if: steps.cache.outputs.cache-hit != 'true' + run: | + node --version + yarn --version + shell: nix develop .#${{ inputs.dev-shell-name }} -c bash -xe {0} diff --git a/.github/workflows/call.check-query-schema-against-subgraph.yml b/.github/workflows/call.check-query-schema-against-subgraph.yml index 333fa48455..b5b45fb748 100644 --- a/.github/workflows/call.check-query-schema-against-subgraph.yml +++ b/.github/workflows/call.check-query-schema-against-subgraph.yml @@ -18,14 +18,12 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: "Install dependencies" run: yarn install --frozen-lockfile diff --git a/.github/workflows/call.deploy-dry-run.yml b/.github/workflows/call.deploy-dry-run.yml index 0ec83e44b7..0d497cfb3f 100644 --- a/.github/workflows/call.deploy-dry-run.yml +++ b/.github/workflows/call.deploy-dry-run.yml @@ -21,7 +21,7 @@ jobs: ethereum-contracts-working-directory: ./packages/ethereum-contracts steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install and Build run: | diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index c97e28b380..36656db577 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -5,29 +5,35 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; superfluid, graph, or satsuma" + description: "Where to deploy subgraph to; superfluid, goldsky, or graph" type: string deployment_env: required: true type: string - description: 'The subgraph deployment env: v1, dev, feature' + description: "The subgraph deployment env: v1, dev, feature" network: required: true type: string - description: 'The network you want to deploy to (matic, xdai, eth-mainnet, etc.) or `all` for all networks.' + description: "The network you want to deploy to (matic, xdai, eth-mainnet, etc.) or `all` for all networks." secrets: SUBGRAPH_URL_TEMPLATE: - description: 'Subgraph endpoint url template' + description: "Subgraph endpoint url template" required: false SATSUMA_DEPLOY_KEY: - description: 'Satsuma deploy key' + description: "Satsuma deploy key" required: false THE_GRAPH_ACCESS_TOKEN: - description: 'The Graph (hosted service) access token for deploying subgraphs' + description: "The Graph access token for deploying subgraphs" + required: false + GOLDSKY_API_KEY: + description: "Goldsky API key for deploying subgraphs" + required: false + AIRSTACK_API_KEY: + description: "Airstack API key for deploying subgraphs" required: false SUPERFLUID_IPFS_API: - description: 'Superfluid IPFS API endpoint' + description: "Superfluid IPFS API endpoint" required: false jobs: @@ -49,19 +55,45 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} + determine-networks: + name: Determine Networks + runs-on: ubuntu-latest + outputs: + networks: ${{ steps.determine.outputs.networks }} + steps: + - uses: actions/checkout@v4 + + - name: "Determine vendors for the network" + id: determine + run: | + networks=$(jq -r --arg vendor "${{ inputs.vendor }}" --arg network "${{ inputs.network }}" ' + if $network == "all" then + .[$vendor] | @json + else + [$network] | @json + end' packages/subgraph/tasks/vendorNetworkMap.json) + if [ -z "$networks" ] || [ "$networks" == "null" ]; then + echo "Unsupported vendor or network: ${{ inputs.vendor }} / ${{ inputs.network }}" + exit 1 + fi + echo "networks=$networks" >> "$GITHUB_OUTPUT" + deploy-subgraph: name: Build and Deploy Subgraph runs-on: ubuntu-latest - env: - subgraph-working-directory: ./packages/subgraph + needs: determine-networks + strategy: + matrix: + network: ${{ fromJson(needs.determine-networks.outputs.networks) }} + fail-fast: false defaults: run: - shell: nix develop -c bash {0} + shell: nix develop .#ci-default -c bash {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v19 with: @@ -74,55 +106,20 @@ jobs: run: yarn build working-directory: ./packages/ethereum-contracts - - name: "Get ABI" - run: node scripts/getAbi.js - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Prepare subgraph manifest" - # This step is required for generating a preliminary subgraph.yaml - # and addresses.ts file for the yarn codegen step below - # using a mock.json networks file. - run: ./tasks/prepare-manifest.sh mock - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Generate meta.ignore.ts file" - # Collects metadata like the git branch and commit hash - run: "yarn generate-sf-meta" - working-directory: ${{ env.subgraph-working-directory }} - env: - COMMIT_HASH: ${{ github.sha }} - CONFIGURATION: ${{ inputs.deployment_env }} - - - name: "Generate AssemblyScript types" - run: "yarn codegen" - working-directory: ${{ env.subgraph-working-directory }} - - - name: Get Hosted Service Networks from metadata - run: npx ts-node ./scripts/getHostedServiceNetworks.ts - working-directory: ${{ env.subgraph-working-directory }} - - # - name: Ensure deployment_env property is passed - # run: | - # if [ "${{ inputs.deployment_env }}" == "" ];then - # echo "You must pass in the deployment_env at a minimum." - # exit 1 - # fi - - # If tagged, get subgraph tag name that starts with subgraph@. Outputs $GIT_TAG_NAME - - uses: olegtarasov/get-tag@v2.1.2 - id: "getSubgraphTag" - with: - tagRegex: "subgraph@(.*)" - - # Version is the git tag or revision + # Version is from subgraph@ git tag if exists, else short git commit revision - name: "Deploy to a node" run: | shortRev=$(git rev-parse --short ${{ github.sha }}) - versionLabel="${GIT_TAG_NAME:-$shortRev}" - ./tasks/deploy.sh -o ${{ inputs.vendor }} -n ${{ inputs.network }} -r ${{ inputs.deployment_env }} -v $versionLabel - working-directory: ${{ env.subgraph-working-directory }} + versionTag=$(git tag --contains ${{ github.sha }} | grep "^subgraph@" | sed 's/^subgraph@//') + versionLabel="${versionTag:-$shortRev}" + ./tasks/deploy.sh -o ${{ inputs.vendor }} -n ${{ matrix.network }} -r ${{ inputs.deployment_env }} -v $versionLabel + working-directory: ./packages/subgraph env: SUBGRAPH_URL_TEMPLATE: ${{ secrets.SUBGRAPH_URL_TEMPLATE }} SUPERFLUID_IPFS_API: ${{ secrets.SUPERFLUID_IPFS_API }} THE_GRAPH_ACCESS_TOKEN: ${{ secrets.THE_GRAPH_ACCESS_TOKEN }} SATSUMA_DEPLOY_KEY: ${{ secrets.SATSUMA_DEPLOY_KEY }} + GOLDSKY_API_KEY: ${{ secrets.GOLDSKY_API_KEY }} + AIRSTACK_API_KEY: ${{ secrets.AIRSTACK_API_KEY }} + COMMIT_HASH: ${{ github.sha }} + CONFIGURATION: ${{ inputs.deployment_env }} diff --git a/.github/workflows/call.test-automation-contracts.yml b/.github/workflows/call.test-automation-contracts.yml index 48f7912927..04bf4d4023 100644 --- a/.github/workflows/call.test-automation-contracts.yml +++ b/.github/workflows/call.test-automation-contracts.yml @@ -9,35 +9,44 @@ jobs: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18, 20] - defaults: run: - shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: automation-contracts + cache-key-prefix: automation-contracts- + dev-shell-name: ci-default - - name: Install, lint and build + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | yarn install --frozen-lockfile + solc --version + forge --version + + - name: Lint and build + if: steps.base.outputs.cache-hit != 'true' + run: | yarn lint yarn build - name: Test automation-contracts-scheduler + if: steps.base.outputs.cache-hit != 'true' run: | - echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn workspace scheduler test + env: + FOUNDRY_PROFILE: ci - name: Test automation-contracts-autowrap + if: steps.base.outputs.cache-hit != 'true' run: | - echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn workspace autowrap test + env: + FOUNDRY_PROFILE: ci diff --git a/.github/workflows/call.test-ethereum-contracts.yml b/.github/workflows/call.test-ethereum-contracts.yml index c16f36276e..edfa2eea18 100644 --- a/.github/workflows/call.test-ethereum-contracts.yml +++ b/.github/workflows/call.test-ethereum-contracts.yml @@ -8,7 +8,7 @@ on: type: boolean jobs: - # Ahhhhhhhhhh, it is silly, but the only way to preparing conditional matrix. + # When this scrip is written, it is the only way to preparing conditional matrix: # Ref: https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional matrix-prep: name: Preparing Conditional Strategy Matrix @@ -19,16 +19,17 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v3 + - name: Check out code into the Go module directory + uses: actions/checkout@v4 - - id: set-matrix - run: | - if [ "${{ inputs.run-coverage-tests }}" == "true" ];then - echo "matrix={\"node-version\": [20]}" >> "$GITHUB_OUTPUT" - else - echo "matrix={\"node-version\": [18, 20]}" >> "$GITHUB_OUTPUT" - fi + - name: Set matrix variable + id: set-matrix + run: | + if [ "${{ inputs.run-coverage-tests }}" == "true" ];then + echo "matrix={\"node-version\": [22]}" >> "$GITHUB_OUTPUT" + else + echo "matrix={\"node-version\": [18, 20, 22]}" >> "$GITHUB_OUTPUT" + fi test-ethereum-contracts: name: Test ethereum-contracts @@ -39,60 +40,69 @@ jobs: strategy: matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + fail-fast: false + + env: + DEV_SHELL_NAME: ci-node${{ matrix.node-version }} defaults: run: - shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Initialize devShell + - name: Set cache key prefix + id: set-cache-key-prefix run: | - node --version - yarn --version - solc --version + if [ "${{ inputs.run-coverage-tests }}" == false ]; then + v=ethereum-contracts-${{ env.DEV_SHELL_NAME }}-test- + else + v=ethereum-contracts-${{ env.DEV_SHELL_NAME }}-coverage- + fi + echo "cache_key_prefix=$v" >> "$GITHUB_OUTPUT" + shell: bash + + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base + with: + package-name: ethereum-contracts + cache-key-prefix: ${{ steps.set-cache-key-prefix.outputs.cache_key_prefix }} + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: Yarn Install + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | yarn install --frozen-lockfile + solc --version + forge --version npx tsc --version npx hardhat --version - name: Lint and build + if: steps.base.outputs.cache-hit != 'true' run: | yarn lint yarn build - ######################################## - ## Test Suite - ######################################## - name: Run test suite - if: inputs.run-coverage-tests == false + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == false run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn test cat testing-benchmark.json working-directory: ./packages/ethereum-contracts env: HARDHAT_TEST_JOBS: 4 - HARDHAT_RUN_PARALLEL: true + HARDHAT_RUN_PARALLEL: 1 - ######################################## - ## Coverage Test - ######################################## - name: Run coverage test - if: inputs.run-coverage-tests == true + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == true run: | echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV yarn test-coverage working-directory: ./packages/ethereum-contracts # NOTE: currently coverage report is not working properly in parallel mode. @@ -104,16 +114,16 @@ jobs: NODE_OPTIONS: --max_old_space_size=4096 IS_COVERAGE_TEST: true HARDHAT_TEST_JOBS: 2 - HARDHAT_RUN_PARALLEL: false + HARDHAT_RUN_PARALLEL: 0 - name: Clean up and merge coverage artifacts - if: inputs.run-coverage-tests == true + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == true run: ./tasks/coverage-cleanup.sh working-directory: ./packages/ethereum-contracts - name: Create coverage artifact if: inputs.run-coverage-tests == true - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ethereum-contracts-coverage path: | diff --git a/.github/workflows/call.test-hot-fuzz.yml b/.github/workflows/call.test-hot-fuzz.yml index 0ec668d44e..9d97f04036 100644 --- a/.github/workflows/call.test-hot-fuzz.yml +++ b/.github/workflows/call.test-hot-fuzz.yml @@ -14,23 +14,28 @@ jobs: shell: nix develop .#ci-hot-fuzz -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: hot-fuzz + cache-key-prefix: hot-fuzz- + dev-shell-name: ci-hot-fuzz - - name: Initialize devShell + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | - set -xe + yarn install + solc --version + forge --version slither --version echidna --version - - name: Run Yarn Install - run: yarn install - - name: Run tests - run: | - cd packages/hot-fuzz - echo "testLimit: 1000" >> echidna.yaml - ./hot-fuzz contracts/superfluid-tests/SuperHotFuzz.yaml + if: steps.base.outputs.cache-hit != 'true' + run: ./hot-fuzz contracts/superfluid-tests/SuperHotFuzz.yaml + working-directory: packages/hot-fuzz + env: + ECHIDNA_TEST_LIMIT: 20000 diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index 0d55f56848..acace6743b 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -3,104 +3,110 @@ name: Reusable Workflow | Run Unit and Integration Tests on Local Subgraph on: workflow_call: +env: + DEV_SHELL_NAME: ci-node22 + ethereum-contracts-working-directory: ./packages/ethereum-contracts + sdk-core-working-directory: ./packages/sdk-core + subgraph-working-directory: ./packages/subgraph + jobs: subgraph-unit-tests: name: Run subgraph unit tests runs-on: ubuntu-latest - env: - subgraph-working-directory: ./packages/subgraph - defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Initialize devShell - run: | - set -ex - node --version - yarn --version + package-name: subgraph + cache-key-prefix: subgraph-${{ env.DEV_SHELL_NAME }}-unit-tests- + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: "Install dependencies" + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | - set -ex yarn install --frozen-lockfile npx tsc --version + npx graph --version - - name: "Build contracts" - run: yarn build - working-directory: ./packages/ethereum-contracts - - - name: "Build" - run: npx ts-node scripts/buildNetworkConfig.ts polygon-mainnet - working-directory: ${{ env.subgraph-working-directory }} + - name: Build ethereum contracts + if: steps.base.outputs.cache-hit != 'true' + run: | + yarn lint + yarn build + working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Run unit tests" + - name: Run unit tests + if: steps.base.outputs.cache-hit != 'true' run: yarn matchstick working-directory: ${{ env.subgraph-working-directory }} - subgraph-end-to-end-integration: + subgraph-integration-tests: name: Run subgraph integration tests runs-on: ubuntu-latest - env: - subgraph-working-directory: ./packages/subgraph - sdk-core-working-directory: ./packages/sdk-core - defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: subgraph + cache-key-prefix: subgraph-${{ env.DEV_SHELL_NAME }}-integration-tests- + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: "Install dependencies" + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: yarn install --frozen-lockfile - - name: "Build contracts" + - name: Build contracts + if: steps.base.outputs.cache-hit != 'true' run: yarn build - working-directory: ./packages/ethereum-contracts + working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Start hardhat node" - run: | - ./tasks/startHardhatNode.sh start - working-directory: ${{ env.sdk-core-working-directory }} - - - name: "Build SDK-Core" + - name: Build SDK core + if: steps.base.outputs.cache-hit != 'true' # build sdk-core because subgraph tests use sdk-core run: yarn build working-directory: ${{ env.sdk-core-working-directory }} - - name: "Deploy Framework and Tokens" + - name: Start hardhat node + if: steps.base.outputs.cache-hit != 'true' + run: ./tasks/startHardhatNode.sh start + working-directory: ${{ env.sdk-core-working-directory }} + + - name: Deploy framework and tokens + if: steps.base.outputs.cache-hit != 'true' run: npx hardhat run dev-scripts/run-deploy-contracts-and-token.js --network localhost - working-directory: ./packages/ethereum-contracts + working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Prepare files for local testing" + - name: Prepare files for local testing + if: steps.base.outputs.cache-hit != 'true' run: yarn prepare-local working-directory: ${{ env.subgraph-working-directory }} - - name: "Run setup-graph-node" + - name: Setup graph node + if: steps.base.outputs.cache-hit != 'true' run: | - chmod +x ./tasks/setup-graph-node.sh - ./tasks/setup-graph-node.sh - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Docker compose" - run: docker-compose up & + ./tasks/setup-graph-node.sh & + # wait for it to warm up + sleep 15 working-directory: ${{ env.subgraph-working-directory }} - - name: "Run subgraph integration test suite" + - name: Run subgraph integration test suite + if: steps.base.outputs.cache-hit != 'true' run: yarn test --network localhost working-directory: ${{ env.subgraph-working-directory }} diff --git a/.github/workflows/call.test-sdk-core.yml b/.github/workflows/call.test-sdk-core.yml index 8b22ff0107..f777ee0a91 100644 --- a/.github/workflows/call.test-sdk-core.yml +++ b/.github/workflows/call.test-sdk-core.yml @@ -14,73 +14,127 @@ on: type: boolean jobs: + # When this scrip is written, it is the only way to preparing conditional matrix: + # Ref: https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional + matrix-prep: + name: Preparing Conditional Strategy Matrix + + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: Set matrix variable + id: set-matrix + run: | + if [ "${{ inputs.run-coverage-tests }}" == "true" ];then + echo "matrix={\"node-version\": [22]}" >> "$GITHUB_OUTPUT" + else + echo "matrix={\"node-version\": [18, 20, 22]}" >> "$GITHUB_OUTPUT" + fi + test-sdk-core: name: Test SDK-Core + needs: [matrix-prep] + runs-on: ubuntu-latest + strategy: + matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + fail-fast: false + env: + DEV_SHELL_NAME: ci-node${{ matrix.node-version }} ethereum-contracts-working-directory: ./packages/ethereum-contracts subgraph-working-directory: ./packages/subgraph sdk-core-working-directory: ./packages/sdk-core defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#${{ env.DEV_SHELL_NAME }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: recursive - - uses: cachix/install-nix-action@v19 + - name: Set cache key prefix + id: set-cache-key-prefix + run: | + if [ "${{ inputs.run-coverage-tests }}" == false ]; then + v=sdk-core-${{ env.DEV_SHELL_NAME }}-test- + else + v=sdk-core-${{ env.DEV_SHELL_NAME }}-coverage- + fi + echo "cache_key_prefix=$v" >> "$GITHUB_OUTPUT" + shell: bash + + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: sdk-core + cache-key-prefix: ${{ steps.set-cache-key-prefix.outputs.cache_key_prefix }} + dev-shell-name: ${{ env.DEV_SHELL_NAME }} - - name: "Install dependencies" - run: yarn install --frozen-lockfile + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' + run: | + yarn install --frozen-lockfile + npx tsc --version + npx hardhat --version - - name: "Build contracts" - run: yarn build + - name: Build contracts + if: steps.base.outputs.cache-hit != 'true' + run: | + yarn build working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Start hardhat node" + - name: Build SDK Core + if: steps.base.outputs.cache-hit != 'true' + # build sdk-core because of auto linking to dependency run: | - ./tasks/startHardhatNode.sh start + yarn lint + yarn build working-directory: ${{ env.sdk-core-working-directory }} - - name: "Build SDK-Core" - # build sdk-core because of auto linking to dependency - run: yarn build + - name: Start hardhat node + if: steps.base.outputs.cache-hit != 'true' + run: ./tasks/startHardhatNode.sh start working-directory: ${{ env.sdk-core-working-directory }} - - name: "Deploy Framework and Tokens" + - name: Deploy framework and tokens + if: steps.base.outputs.cache-hit != 'true' run: npx hardhat run dev-scripts/run-deploy-contracts-and-token.js --network localhost working-directory: ${{ env.ethereum-contracts-working-directory }} - - name: "Prepare files for local testing" + - name: Prepare files for local testing + if: steps.base.outputs.cache-hit != 'true' run: yarn prepare-local working-directory: ${{ env.subgraph-working-directory }} - - name: "Run setup-graph-node" + - name: Setup graph node + if: steps.base.outputs.cache-hit != 'true' run: | - chmod +x ./tasks/setup-graph-node.sh - ./tasks/setup-graph-node.sh - working-directory: ${{ env.subgraph-working-directory }} - - - name: "Docker compose" - run: docker-compose up & + ./tasks/setup-graph-node.sh & + # wait for it to warm up + sleep 15 working-directory: ${{ env.subgraph-working-directory }} - - name: "Build and deploy local subgraph" + - name: Build and deploy local subgraph + if: steps.base.outputs.cache-hit != 'true' run: | yarn build-and-deploy-local - # artificial slow down to give the subgraph time to sync - sleep 30 + # wait for it to sync + sleep 15 working-directory: ${{ env.subgraph-working-directory }} - - name: "Run test suite" - if: inputs.run-coverage-tests == false + - name: Run test suite + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == false run: | - yarn generate-graphql-schema:${{ inputs.subgraph-release }} + yarn get-graphql-schema:${{ inputs.subgraph-release }} ./tasks/setupTestEnvironment.sh npx hardhat test --network localhost working-directory: ${{ env.sdk-core-working-directory }} @@ -88,8 +142,8 @@ jobs: SUBGRAPH_RELEASE_TAG: ${{ inputs.subgraph-release }} SUBGRAPH_ENDPOINT: ${{ inputs.subgraph-endpoint }} - - name: "Run coverage test" - if: inputs.run-coverage-tests == true + - name: Run coverage test + if: steps.base.outputs.cache-hit != 'true' && inputs.run-coverage-tests == true run: | yarn workspace @superfluid-finance/sdk-core test-coverage working-directory: ${{ env.sdk-core-working-directory }} @@ -97,9 +151,9 @@ jobs: SUBGRAPH_RELEASE_TAG: ${{ inputs.subgraph-release }} SUBGRAPH_ENDPOINT: ${{ inputs.subgraph-endpoint }} - - name: "Create coverage artifact" + - name: Create coverage artifact if: inputs.run-coverage-tests == true - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sdk-core-coverage path: | diff --git a/.github/workflows/call.test-solidity-semantic-money.yml b/.github/workflows/call.test-solidity-semantic-money.yml index 145ea81ce2..cceec6a41d 100644 --- a/.github/workflows/call.test-solidity-semantic-money.yml +++ b/.github/workflows/call.test-solidity-semantic-money.yml @@ -11,28 +11,32 @@ jobs: defaults: run: - shell: nix develop . -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + submodules: recursive - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + package-name: solidity-semantic-money + cache-key-prefix: solidity-semantic-money- + dev-shell-name: ci-default - - name: Initialize Nix DevShell + - name: Install dependencies + if: steps.base.outputs.cache-hit != 'true' run: | + yarn install --frozen-lockfile + solc --version forge --version - - name: Initialize Node Modules - run: | - yarn install - - - name: Build & Test + - name: Build and test + if: steps.base.outputs.cache-hit != 'true' run: | - cd packages/solidity-semantic-money - # use native compiler provided through the nix devShell - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV make build-src test-all + working-directory: packages/solidity-semantic-money env: FOUNDRY_FUZZ_RUNS: 4200 # yea, baby diff --git a/.github/workflows/call.test-spec-haskell.yml b/.github/workflows/call.test-spec-haskell.yml index 71203101b9..907ddd3676 100644 --- a/.github/workflows/call.test-spec-haskell.yml +++ b/.github/workflows/call.test-spec-haskell.yml @@ -12,49 +12,48 @@ jobs: strategy: matrix: include: - - compiler-name: ghc-9.2 - dev-shell-type: ci-spec-ghc92 - compiler-name: ghc-9.4 - dev-shell-type: ci-spec-ghc94 + dev-shell-name: ci-spec-ghc94 fail-fast: false defaults: run: - shell: nix develop .#${{ matrix.dev-shell-type }} -c bash -xe {0} + shell: nix develop .#${{ matrix.dev-shell-name }} -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 + - name: Setup workflow base + id: base + uses: ./.github/actions/setup-workflow-base with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Initialize devShell - run: | - set -xe - cabal --version - ghc --version + package-name: spec-haskell + cache-key-prefix: spec-haskell-${{ matrix.compiler-name }}- + dev-shell-name: ${{ matrix.dev-shell-name }} - name: Run cabal update + if: steps.base.outputs.cache-hit != 'true' run: | cabal v2-update + cabal --version + ghc --version - name: Run lint - run: | - cd packages/spec-haskell - make lint + if: steps.base.outputs.cache-hit != 'true' + run: make lint + working-directory: packages/spec-haskell - name: Run build - run: | - cd packages/spec-haskell - make build + if: steps.base.outputs.cache-hit != 'true' + run: make build + working-directory: packages/spec-haskell - name: Run tests - run: | - cd packages/spec-haskell - make test + if: steps.base.outputs.cache-hit != 'true' + run: make test + working-directory: packages/spec-haskell - name: Make haddock docs - run: | - cd packages/spec-haskell - make docs-haddock + if: steps.base.outputs.cache-hit != 'true' + run: make docs-haddock + working-directory: packages/spec-haskell diff --git a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml index ce6a48d32f..063b1065be 100644 --- a/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml +++ b/.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml @@ -19,9 +19,7 @@ jobs: strategy: matrix: version: [ - v0.3.2, - v0.4.0, - v0.5.0, + v0.5.9, v0.6.0 latest ] @@ -32,14 +30,12 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: "Install dependencies" run: yarn install --frozen-lockfile @@ -66,14 +62,11 @@ jobs: run: yarn prepare-local working-directory: ./packages/subgraph - - name: "Run setup-graph-node" - run: | - chmod +x ./tasks/setup-graph-node.sh - ./tasks/setup-graph-node.sh - working-directory: ./packages/subgraph - - name: "Docker compose" - run: docker-compose up & + run: | + ./tasks/setup-graph-node.sh & + # wait for it to sync + sleep 15 working-directory: ./packages/subgraph - name: "Prepare and Deploy Local Subgraph" diff --git a/.github/workflows/call.upload-coverage-reports.yml b/.github/workflows/call.upload-coverage-reports.yml index 21a59df2de..fca4edbaee 100644 --- a/.github/workflows/call.upload-coverage-reports.yml +++ b/.github/workflows/call.upload-coverage-reports.yml @@ -2,7 +2,9 @@ name: Reusable Workflow | Upload Coverage Reports on: workflow_call: - + secrets: + codecov_token: + required: true jobs: upload-coverage-reports: @@ -11,32 +13,32 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download ethereum-contracts-coverage - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ethereum-contracts-coverage path: packages/ethereum-contracts/coverage - name: Upload ethereum-contracts-coverage to codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4.3.0 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.codecov_token }} files: packages/ethereum-contracts/coverage/lcov.info name: ethereum-contracts-coverage flags: ethereum-contracts fail_ci_if_error: true - name: Download sdk-core-coverage - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: sdk-core-coverage path: packages/sdk-core/coverage - name: Upload sdk-core-coverage to codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4.2.0 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.codecov_token }} files: packages/sdk-core/coverage/lcov.info name: sdk-core-coverage flags: sdk-core - fail_ci_if_error: true \ No newline at end of file + fail_ci_if_error: true diff --git a/.github/workflows/cd.feature.create-pr-artifact.yml b/.github/workflows/cd.feature.create-pr-artifact.yml index 079f490e1f..0104786319 100644 --- a/.github/workflows/cd.feature.create-pr-artifact.yml +++ b/.github/workflows/cd.feature.create-pr-artifact.yml @@ -12,16 +12,14 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} if: ${{ !github.event.pull_request.draft }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Show context env: @@ -41,8 +39,8 @@ jobs: echo " .locked" ${{ github.event.pull_request.locked }} echo " .draft" ${{ github.event.pull_request.draft }} - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin - name: Install dependencies if: env.PUBLISH_PR_ARTIFACT == 1 @@ -78,7 +76,7 @@ jobs: done - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: pr-packages path: bin diff --git a/.github/workflows/cd.packages-stable.create-release-drafts.yml b/.github/workflows/cd.packages-stable.create-release-drafts.yml index 3d6c99e7b6..6a8d5f5e49 100644 --- a/.github/workflows/cd.packages-stable.create-release-drafts.yml +++ b/.github/workflows/cd.packages-stable.create-release-drafts.yml @@ -22,7 +22,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -52,7 +52,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -92,7 +92,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -123,14 +123,33 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPMJS_TOKEN: ${{ secrets.NPMJS_TOKEN }} + check-sdk-core-version: + name: Checking if SDK-Core should be published + + runs-on: ubuntu-latest + + outputs: + publish_sdk_core: ${{ env.SHOULD_PUBLISH_SDK_CORE }} + sdk_core_new_version: ${{ env.SDK_CORE_NEW_VERSION }} + + steps: + - uses: actions/checkout@v4 + + - name: Check package versions + run: ./tasks/check-package-version.sh sdk-core SHOULD_PUBLISH_SDK_CORE SDK_CORE_NEW_VERSION >> "$GITHUB_ENV" + test-sdk-core-query-schema-against-deployed-v1-subgraphs: uses: ./.github/workflows/call.check-query-schema-against-subgraph.yml + needs: check-sdk-core-version + if: needs.check-sdk-core-version.outputs.publish_sdk_core == 1 name: Test SDK-Core Query Schema and Queries Against Deployed V1 Subgraphs with: subgraph-release: v1 test-sdk-core-with-v1-release-subgraph: uses: ./.github/workflows/call.test-sdk-core.yml + needs: check-sdk-core-version + if: needs.check-sdk-core-version.outputs.publish_sdk_core == 1 name: Build and Test SDK-Core (Release branch) with: subgraph-release: v1 @@ -144,14 +163,13 @@ jobs: needs: [ - test-sdk-core-query-schema-against-deployed-v1-subgraphs, - test-sdk-core-with-v1-release-subgraph, + check-sdk-core-version, ] permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -159,17 +177,14 @@ jobs: node-version: 18.x registry-url: https://registry.npmjs.org/ - - name: Check package versions - run: ./tasks/check-package-version.sh sdk-core SHOULD_PUBLISH_SDK_CORE SDK_CORE_NEW_VERSION >> "$GITHUB_ENV" - - name: Create sdk-core stable release draft - if: env.SHOULD_PUBLISH_SDK_CORE == 1 + if: needs.check-sdk-core-version.outputs.publish_sdk_core == 1 uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: - tag_name: sdk-core@v${{ env.SDK_CORE_NEW_VERSION }} - release_name: sdk-core@v${{ env.SDK_CORE_NEW_VERSION }} + tag_name: sdk-core@v${{ needs.check-sdk-core-version.outputs.sdk_core_new_version }} + release_name: sdk-core@v${{ needs.check-sdk-core-version.outputs.sdk_core_new_version }} body_path: .github/RELEASE_TEMPLATE/release-notes.md draft: true @@ -181,7 +196,7 @@ jobs: permissions: write-all steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 diff --git a/.github/workflows/ci.canary.yml b/.github/workflows/ci.canary.yml index 064fc0466a..2100b04dc6 100644 --- a/.github/workflows/ci.canary.yml +++ b/.github/workflows/ci.canary.yml @@ -4,12 +4,13 @@ on: push: branches: ["dev"] paths: + - ".github/workflows/ci.canary.yml" + - ".github/workflows/call.*.yml" - "package.json" + - "yarn.lock" - "packages/**" - # - "**.md" commented-out because README updates should go to the packages - - ".github/workflows/ci.canary.yml" - "codecov.yml" - - ".github/workflows/call.test-local-subgraph.yml" + # - "**.md" are commented out because docs updates should go into the packages jobs: check: @@ -17,36 +18,24 @@ jobs: runs-on: ubuntu-latest + defaults: + run: + shell: nix develop .#ci-minimum -c bash -xe {0} + outputs: build_subgraph: ${{ env.BUILD_SUBGRAPH }} steps: - - uses: actions/checkout@v3 - - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev - - essential-build-and-test: - name: Build and test essential packages of dev branch - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18, 20] + - uses: actions/checkout@v4 - defaults: - run: - shell: nix develop .#ci-node${{ matrix.node-version }} -c bash -xe {0} - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive + - uses: DeterminateSystems/nix-installer-action@v13 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - name: Initialize nix dev shell + run: | + node --version + yarn --version + shellcheck --version + actionlint --version - name: Show contexts env: @@ -60,34 +49,71 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} - - name: Install, lint, build, and test + - name: Run global lint run: | - yarn install --frozen-lockfile - yarn lint - echo "FOUNDRY_PROFILE=ci" >> $GITHUB_ENV - echo "FOUNDRY_SOLC_VERSION=$SOLC" >> $GITHUB_ENV - yarn build - yarn test - env: - POLYGON_MAINNET_PROVIDER_URL: ${{ secrets.POLYGON_MAINNET_PROVIDER_URL }} - SUBGRAPH_RELEASE_TAG: dev + npm run lint:shellcheck + npm run lint:actionlint + + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin + + test-spec-haskell: + uses: ./.github/workflows/call.test-spec-haskell.yml + name: Build and Test Spec Haskell (Canary Branch) + needs: [check] + + test-solidity-semantic-money: + name: Build and Test Solidity Semantic Money (Canary Branch) + uses: ./.github/workflows/call.test-solidity-semantic-money.yml + needs: [check] + + test-ethereum-contracts: + name: Test ethereum-contracts (Canary Branch) + uses: ./.github/workflows/call.test-ethereum-contracts.yml + needs: [check] + with: + run-coverage-tests: false + + coverage-ethereum-contracts: + name: Coverage test ethereum-contracts (Canary Branch) + uses: ./.github/workflows/call.test-ethereum-contracts.yml + needs: [check] + with: + run-coverage-tests: true test-hot-fuzz: uses: ./.github/workflows/call.test-hot-fuzz.yml name: Hot Fuzz (Development Branch) - - test-subgraph: - uses: ./.github/workflows/call.test-local-subgraph.yml - name: Build and Test Subgraph (Development Branch) + needs: [check] test-sdk-core: uses: ./.github/workflows/call.test-sdk-core.yml name: Build and Test SDK-Core (Development Branch) + needs: [check] with: subgraph-release: local subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test run-coverage-tests: false + coverage-sdk-core: + uses: ./.github/workflows/call.test-sdk-core.yml + name: Build and Test SDK-Core Coverage (Canary Branch) + needs: [check] + with: + subgraph-release: local + subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test + run-coverage-tests: true + + test-subgraph: + uses: ./.github/workflows/call.test-local-subgraph.yml + name: Build and Test Subgraph (Development Branch) + needs: [check] + + test-automation-contracts: + uses: ./.github/workflows/call.test-automation-contracts.yml + name: Build and Test Automation Contracts (Canary Branch) + needs: [check] + # deploy subgraph if changes are made, we can call this every time, but we won't actually do any deployments # if the IPFS hash generated stays the same (no mapping logic changes) deploy-subgraph-changes: @@ -102,49 +128,26 @@ jobs: secrets: THE_GRAPH_ACCESS_TOKEN: ${{ secrets.THE_GRAPH_ACCESS_TOKEN }} - test-solidity-semantic-money: - name: Build and Test Solidity Semantic Money (Canary Branch) - uses: ./.github/workflows/call.test-solidity-semantic-money.yml - - test-spec-haskell: - uses: ./.github/workflows/call.test-spec-haskell.yml - name: Build and Test Spec Haskell (Canary Branch) - - test-automation-contracts: - uses: ./.github/workflows/call.test-automation-contracts.yml - name: Build and Test Automation Contracts (Canary Branch) - - coverage-ethereum-contracts: - name: Coverage test ethereum-contracts (Canary Branch) - uses: ./.github/workflows/call.test-ethereum-contracts.yml - with: - run-coverage-tests: true - - coverage-sdk-core: - uses: ./.github/workflows/call.test-sdk-core.yml - name: Build and Test SDK-Core Coverage (Canary Branch) - with: - subgraph-release: local - subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test - run-coverage-tests: true - upload-coverage-reports: name: Upload Coverage Reports (Feature Branch) uses: ./.github/workflows/call.upload-coverage-reports.yml needs: [coverage-ethereum-contracts, coverage-sdk-core] + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} all-packages-tested: name: All packages tested (Dev Branch) runs-on: ubuntu-latest # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs if: ${{ always() }} - needs: [ essential-build-and-test - , test-spec-haskell + + needs: [ test-spec-haskell , test-solidity-semantic-money + , test-ethereum-contracts, coverage-ethereum-contracts , test-hot-fuzz + , test-sdk-core, coverage-sdk-core , test-subgraph - , coverage-ethereum-contracts - , coverage-sdk-core + , test-automation-contracts ] steps: - name: Test Results @@ -160,12 +163,15 @@ jobs: echo "Passed." fi } - check_result essential-build-and-test ${{ needs.essential-build-and-test.result }} check_result spec-haskell ${{ needs.test-spec-haskell.result }} + check_result solidity-semantic-money ${{ needs.test-solidity-semantic-money.result }} + check_result test-ethereum-contracts ${{ needs.test-ethereum-contracts.result }} + check_result coverage-ethereum-contracts ${{ needs.coverage-ethereum-contracts.result }} check_result hot-fuzz ${{ needs.test-hot-fuzz.result }} + check_result test-sdk-core ${{ needs.test-sdk-core.result }} + check_result coverage-sdk-core ${{ needs.coverage-sdk-core.result }} check_result subgraph ${{ needs.test-subgraph.result }} - check_result ethereum-contracts-coverage ${{ needs.coverage-ethereum-contracts.result }} - check_result sdk-core-coverage ${{ needs.coverage-sdk-core.result }} + check_result automation-contracts ${{ needs.test-automation-contracts.result }} publish-npm-packages: name: Publish canary packages to registries @@ -178,14 +184,12 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Install dependencies run: yarn install --frozen-lockfile @@ -222,19 +226,17 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Install dependencies run: yarn install --frozen-lockfile @@ -274,6 +276,8 @@ jobs: upgrade-contracts: name: Upgrade ethereum-contracts on canary testnet (protocol release version "canary") + if: false # disable this for now + needs: [all-packages-tested] runs-on: ubuntu-latest @@ -281,18 +285,16 @@ jobs: strategy: fail-fast: false matrix: - network: [avalanche-fuji] + network: [optimism-sepolia] defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | @@ -307,5 +309,5 @@ jobs: tasks/etherscan-verify-framework.sh ${{ matrix.network }} addresses.vars env: RELEASE_VERSION: canary - AVALANCHE_FUJI_MNEMONIC: ${{ secrets.BUILD_AGENT_MNEMONIC }} - AVALANCHE_FUJI_PROVIDER_URL: ${{ secrets.AVALANCHE_FUJI_PROVIDER_URL }} + OPTIMISM_SEPOLIA_MNEMONIC: ${{ secrets.BUILD_AGENT_MNEMONIC }} + OPTIMISM_SEPOLIA_PROVIDER_URL: ${{ secrets.OPTIMISM_SEPOLIA_PROVIDER_URL }} diff --git a/.github/workflows/ci.feature.yml b/.github/workflows/ci.feature.yml index 91c45e49fc..cc0042a0be 100644 --- a/.github/workflows/ci.feature.yml +++ b/.github/workflows/ci.feature.yml @@ -12,12 +12,20 @@ on: merge_group: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check: name: Checking what packages need to be built runs-on: ubuntu-latest + defaults: + run: + shell: nix develop .#ci-minimum -c bash -xe {0} + outputs: build_solidity_semantic_money: ${{ env.BUILD_SOLIDITY_SEMANTIC_MONEY }} build_ethereum_contracts: ${{ env.BUILD_ETHEREUM_CONTRACTS }} @@ -28,6 +36,17 @@ jobs: build_automation_contracts: ${{ env.BUILD_AUTOMATION_CONTRACTS }} steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@v13 + + - name: Initialize nix dev shell + run: | + node --version + yarn --version + shellcheck --version + actionlint --version + - name: Show contexts env: HEAD_REF: ${{ github.head_ref }} @@ -40,10 +59,25 @@ jobs: echo github.head_ref: "$HEAD_REF" echo github.base_ref: ${{ github.base_ref }} - - uses: actions/checkout@v3 + - name: Run global lint + run: | + npm run lint:shellcheck + npm run lint:actionlint + + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin + + test-spec-haskell: + name: Test Spec Haskell (Feature Branch) + uses: ./.github/workflows/call.test-spec-haskell.yml + needs: [check] + if: needs.check.outputs.build_spec_haskell - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev + test-solidity-semantic-money: + name: Test Solidity Semantic Money Library (Feature Branch) + uses: ./.github/workflows/call.test-solidity-semantic-money.yml + needs: [ check ] + if: needs.check.outputs.build_solidity_semantic_money test-ethereum-contracts: name: Test ethereum-contracts (Feature Branch) @@ -54,7 +88,7 @@ jobs: run-coverage-tests: false coverage-ethereum-contracts: - name: Coverage test ethereum-contracts (Feature Branch) + name: Coverage Test ethereum-contracts (Feature Branch) uses: ./.github/workflows/call.test-ethereum-contracts.yml needs: [check] if: needs.check.outputs.build_ethereum_contracts @@ -67,29 +101,9 @@ jobs: needs: [ check ] if: needs.check.outputs.build_hot_fuzz - test-solidity-semantic-money: - name: Test Solidity Semantic Money Library (Feature Branch) - uses: ./.github/workflows/call.test-solidity-semantic-money.yml - needs: [ check ] - if: needs.check.outputs.build_solidity_semantic_money - - #test automations: - test-automation-contracts: - name: Test Automation Contracts (Feature Branch) - uses: ./.github/workflows/call.test-automation-contracts.yml - needs: [ check ] - if: needs.check.outputs.build_automation_contracts - - # subgraph integration test - test-subgraph: - name: Test Subgraph (Feature Branch) - uses: ./.github/workflows/call.test-local-subgraph.yml - needs: [check] - if: needs.check.outputs.build_subgraph - # sdk-core integration test + local subgraph w/ local sdk-core test-sdk-core: - name: Test SDK-Core (Feature Branch) + name: Test sdk-core (Feature Branch) uses: ./.github/workflows/call.test-sdk-core.yml needs: [check] if: needs.check.outputs.build_sdk_core @@ -99,7 +113,7 @@ jobs: run-coverage-tests: false coverage-sdk-core: - name: Test SDK-Core (Feature Branch) + name: Coverage Test sdk-core (Feature Branch) uses: ./.github/workflows/call.test-sdk-core.yml needs: [check] if: needs.check.outputs.build_sdk_core @@ -108,16 +122,24 @@ jobs: subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test run-coverage-tests: true - test-spec-haskell: - name: Test Spec Haskell (Feature Branch) - uses: ./.github/workflows/call.test-spec-haskell.yml + test-subgraph: + name: Test Subgraph (Feature Branch) + uses: ./.github/workflows/call.test-local-subgraph.yml needs: [check] - if: needs.check.outputs.build_spec_haskell + if: needs.check.outputs.build_subgraph + + test-automation-contracts: + name: Test Automation Contracts (Feature Branch) + uses: ./.github/workflows/call.test-automation-contracts.yml + needs: [check] + if: needs.check.outputs.build_automation_contracts upload-coverage-reports: name: Upload Coverage Reports (Feature Branch) uses: ./.github/workflows/call.upload-coverage-reports.yml needs: [coverage-ethereum-contracts, coverage-sdk-core] + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} # Note: # @@ -147,18 +169,19 @@ jobs: local package_name="$1" local result="$2" if [ "$result" == "skipped" ];then - echo "Skipped $package_name package." + echo "Skipped job: $package_name." else - echo "Checking if $package_name package test passes..." + echo "Checking if the job \"$package_name\" passes..." test "$result" == "success" echo "Passed." fi } check_result spec-haskell ${{ needs.test-spec-haskell.result }} check_result solidity-semantic-money ${{ needs.test-solidity-semantic-money.result }} - check_result ethereum-contracts ${{ needs.test-ethereum-contracts.result }} - check_result ethereum-contracts-coverage ${{ needs.coverage-ethereum-contracts.result }} + check_result test-ethereum-contracts ${{ needs.test-ethereum-contracts.result }} + check_result coverage-ethereum-contracts ${{ needs.coverage-ethereum-contracts.result }} check_result hot-fuzz ${{ needs.test-hot-fuzz.result }} - check_result sdk-core ${{ needs.test-sdk-core.result }} + check_result test-sdk-core ${{ needs.test-sdk-core.result }} + check_result coverage-sdk-core ${{ needs.coverage-sdk-core.result }} check_result subgraph ${{ needs.test-subgraph.result }} check_result automation-contracts ${{ needs.test-automation-contracts.result }} diff --git a/.github/workflows/daily-slack-message.yml b/.github/workflows/daily-slack-message.yml index e9d409c650..74edb93e1d 100644 --- a/.github/workflows/daily-slack-message.yml +++ b/.github/workflows/daily-slack-message.yml @@ -9,7 +9,7 @@ jobs: send-slack-message: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -32,4 +32,5 @@ jobs: BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }} CELOSCAN_API_KEY: ${{ secrets.CELOSCAN_API_KEY }} GNOSISSCAN_API_KEY: ${{ secrets.GNOSISSCAN_API_KEY}} - ZKEVM_POLYGONSCAN_API_KEY: ${{ secrets.ZKEVM_POLYGONSCAN_API_KEY }} \ No newline at end of file + BASESCAN_API_KEY: ${{ secrets.BASESCAN_API_KEY}} + SCROLLSCAN_API_KEY: ${{ secrets.SCROLLSCAN_API_KEY}} diff --git a/.github/workflows/handler.changelog-reminder.yml b/.github/workflows/handler.changelog-reminder.yml index 05e86527a9..fa751eae46 100644 --- a/.github/workflows/handler.changelog-reminder.yml +++ b/.github/workflows/handler.changelog-reminder.yml @@ -17,11 +17,11 @@ jobs: build_spec_haskell: ${{ env.BUILD_SPEC_HASKELL }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + + - name: Create build set + run: tasks/create-build-set.sh ${{ github.sha }} dev origin - - name: Check changeset - run: tasks/check-changeset.sh ${{ github.sha }} dev - create-reminder: name: Create Changelog reminder in PR discussion @@ -45,4 +45,4 @@ jobs: Reminder to update the CHANGELOG.md for any of the modified packages in this PR. - [ ] CHANGELOG.md modified - [ ] Double check before merge - reactions: white_check_mark \ No newline at end of file + reactions: white_check_mark diff --git a/.github/workflows/handler.deploy-production-subgraphs.yml b/.github/workflows/handler.deploy-production-subgraphs.yml index 4d1d4df7af..0d9561e995 100644 --- a/.github/workflows/handler.deploy-production-subgraphs.yml +++ b/.github/workflows/handler.deploy-production-subgraphs.yml @@ -12,13 +12,22 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; one of `superfluid`, `graph`, or `satsuma`" - type: string + description: "Where to deploy subgraph to; one of `superfluid`, `goldsky`, `graph` or `airstack`" + default: "superfluid" + type: choice + options: + - superfluid + - goldsky + - graph deployment_env: required: true - type: string - default: v1 description: 'The subgraph deployment env: v1, dev, feature.' + type: choice + default: v1 + options: + - v1 + - dev + - feature network: required: true type: string @@ -36,13 +45,12 @@ jobs: subgraph-release: '' subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test - deploy-subgraph: + deploy-subgraphs: + if: ${{ success() }} uses: ./.github/workflows/call.deploy-subgraph.yml - needs: [ - build-and-test-local-subgraph - , build-and-test-local-subgraph-against-previous-sdk-core-releases - ] - name: Deploy The Graph + # build-and-test-local-subgraph-against-previous-sdk-core-releases is currently not "needed" here because it fails. + needs: [build-and-test-local-subgraph] + name: Deploy graph to ${{ github.event.inputs.vendor }} vendor with: deployment_env: ${{ github.event.inputs.deployment_env }} network: ${{ github.event.inputs.network }} @@ -52,3 +60,5 @@ jobs: SATSUMA_DEPLOY_KEY: ${{ secrets.SATSUMA_DEPLOY_KEY }} SUBGRAPH_URL_TEMPLATE: ${{ secrets.SUBGRAPH_URL_TEMPLATE }} SUPERFLUID_IPFS_API: ${{ secrets.SUPERFLUID_IPFS_API }} + GOLDSKY_API_KEY: ${{ secrets.GOLDSKY_API_KEY }} + AIRSTACK_API_KEY: ${{ secrets.AIRSTACK_API_KEY }} diff --git a/.github/workflows/handler.deploy-to-mainnet.yml b/.github/workflows/handler.deploy-to-mainnet.yml index 8c55838d25..165fde5fd3 100644 --- a/.github/workflows/handler.deploy-to-mainnet.yml +++ b/.github/workflows/handler.deploy-to-mainnet.yml @@ -28,19 +28,17 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | diff --git a/.github/workflows/handler.deploy-to-testnets.yml b/.github/workflows/handler.deploy-to-testnets.yml index 43dd5c5b76..5586897a6d 100644 --- a/.github/workflows/handler.deploy-to-testnets.yml +++ b/.github/workflows/handler.deploy-to-testnets.yml @@ -28,22 +28,22 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} - + shell: nix develop .#ci-default -c bash -xe {0} + strategy: fail-fast: false matrix: - network: [eth-goerli, eth-sepolia, polygon-mumbai, optimism-goerli, arbitrum-goerli, avalanche-fuji, base-goerli, polygon-zkevm-testnet] + network: [eth-sepolia, optimism-sepolia, avalanche-fuji, scroll-sepolia] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # if only_network is set, skip all steps until the value matches one of the entries in matrix.network - name: Check only_network if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} run: echo "DO_SKIP=1" >> "$GITHUB_ENV" - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v27 if: env.DO_SKIP != 1 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/handler.list-super-token.yml b/.github/workflows/handler.list-super-token.yml index 94d0f6742d..5cbe04f8f8 100644 --- a/.github/workflows/handler.list-super-token.yml +++ b/.github/workflows/handler.list-super-token.yml @@ -35,14 +35,12 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | @@ -58,17 +56,3 @@ jobs: --network ${{ github.event.inputs.network }} \ ops-scripts/resolver-list-super-token.js \ : ${{ github.event.inputs.token_address }} - - # workaround for OG networks with a Resolver not emitting events - - name: Trigger Transfer Event - if: > - github.event.inputs.network == 'polygon-mainnet' || - github.event.inputs.network == 'xdai-mainnet' || - github.event.inputs.network == 'polygon-mumbai' || - github.event.inputs.network == 'eth-goerli' - run: | - cd packages/ethereum-contracts - npx truffle exec \ - --network ${{ github.event.inputs.network }} \ - ops-scripts/tmp-trigger-token-transfer.js \ - : ${{ github.event.inputs.token_address }} diff --git a/.github/workflows/handler.publish-pr-packages.yml b/.github/workflows/handler.publish-pr-packages.yml index 5027e5c9a8..65ec96bc8f 100644 --- a/.github/workflows/handler.publish-pr-packages.yml +++ b/.github/workflows/handler.publish-pr-packages.yml @@ -17,7 +17,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js 18.x uses: actions/setup-node@v3 @@ -39,7 +39,7 @@ jobs: - name: Download artifact continue-on-error: true id: download_artifact - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v4 with: workflow: ${{ github.event.workflow_run.workflow_id }} workflow_conclusion: success diff --git a/.github/workflows/handler.publish-release-packages.yml b/.github/workflows/handler.publish-release-packages.yml index 2c63a1cf97..1bf9aa1c9e 100644 --- a/.github/workflows/handler.publish-release-packages.yml +++ b/.github/workflows/handler.publish-release-packages.yml @@ -14,19 +14,17 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Parse Tag env: @@ -58,7 +56,7 @@ jobs: id: publish-sdk-core if: env.PUBLISH_SDK_CORE == 1 run: | - yarn --cwd packages/sdk-core generate-graphql-schema:v1 + yarn --cwd packages/sdk-core get-graphql-schema:v1 yarn --cwd packages/ethereum-contracts build yarn --cwd packages/sdk-core build tasks/npm-publish.sh packages/sdk-core/ latest @@ -103,7 +101,7 @@ jobs: if: env.PUBLISH_SDK_REDUX == 1 run: | yarn --cwd packages/ethereum-contracts build - yarn --cwd packages/sdk-core generate-graphql-schema:v1 + yarn --cwd packages/sdk-core get-graphql-schema:v1 yarn --cwd packages/sdk-core build yarn --cwd packages/sdk-redux build tasks/npm-publish.sh packages/sdk-redux/ latest diff --git a/.github/workflows/handler.run-ethereum-contracts-script.yml b/.github/workflows/handler.run-ethereum-contracts-script.yml index b6571f914a..6b0309606a 100644 --- a/.github/workflows/handler.run-ethereum-contracts-script.yml +++ b/.github/workflows/handler.run-ethereum-contracts-script.yml @@ -30,19 +30,17 @@ jobs: defaults: run: - shell: nix develop -c bash -xe {0} - + shell: nix develop .#ci-default -c bash -xe {0} + env: RELEASE_VERSION: ${{ github.event.inputs.release_version }} RESOLVER_ADMIN_TYPE: ${{ github.event.inputs.admin_type }} GOVERNANCE_ADMIN_TYPE: ${{ github.event.inputs.admin_type }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v19 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/nix-installer-action@v13 - name: Build run: | diff --git a/.github/workflows/handler.update-evm-contracts-docs.yml b/.github/workflows/handler.update-evm-contracts-docs.yml index 478cc4de4b..cadcb3bbad 100644 --- a/.github/workflows/handler.update-evm-contracts-docs.yml +++ b/.github/workflows/handler.update-evm-contracts-docs.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Show contexts env: @@ -33,7 +33,7 @@ jobs: run: | yarn install --frozen-lockfile - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: superfluid-finance/build-scripts path: build-scripts diff --git a/.github/workflows/handler.verify-contracts.yml b/.github/workflows/handler.verify-contracts.yml index 2a1b393fd4..5f63de52ca 100644 --- a/.github/workflows/handler.verify-contracts.yml +++ b/.github/workflows/handler.verify-contracts.yml @@ -24,20 +24,20 @@ jobs: strategy: fail-fast: false matrix: - network: [eth-goerli, eth-sepolia, polygon-mumbai, optimism-goerli, arbitrum-goerli, avalanche-fuji, base-goerli, polygon-mainnet, optimism-mainnet, arbitrum-one, avalanche-c, bsc-mainnet, celo-mainnet] + network: [eth-sepolia, optimism-sepolia, avalanche-fuji, polygon-mainnet, xdai-mainnet, optimism-mainnet, arbitrum-one, avalanche-c, bsc-mainnet, eth-mainnet, celo-mainnet, base-mainnnet, scroll-mainnet] defaults: run: - shell: nix develop -c bash -xe {0} + shell: nix develop .#ci-default -c bash -xe {0} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check only_network if: ${{ github.event.inputs.only_network != '' && github.event.inputs.only_network != matrix.network }} run: echo "DO_SKIP=1" >> "$GITHUB_ENV" - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v27 if: env.DO_SKIP != 1 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 4d8f8a3f64..7e7b9ffd7d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,10 @@ package-lock.json .DS_Store .idea - .vscode/ *-workspace .npmrc + +# echidna litters +crytic-export +corpus diff --git a/.husky/pre-commit b/.husky/pre-commit index 025779ed2b..f9d8543080 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,27 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" +#!/usr/bin/env bash -yarn pre-commit +maybe_run() { + exec=$1 + shift + if which "$exec" &>/dev/null; then + "$@" + else + echo "⚠️ Please install $exec!" + fi +} + +# always lint these +npm run lint:syncpack +maybe_run shellcheck npm run lint:shellcheck +maybe_run actionlint npm run lint:actionlint + +# only lint the workspace if there is staged files +for i in $(jq -r '.workspaces.packages | .[]' package.json); do + if [ -n "$(git diff --name-only HEAD -- "$i")" ]; then ( + echo "= Linting workspace $i" + cd "$i" || exit 3 + npm run lint + ) else { + echo "= Skipping workspace $i: no changed files." + } fi +done diff --git a/.syncpackrc.yml b/.syncpackrc.yml new file mode 100644 index 0000000000..e253709112 --- /dev/null +++ b/.syncpackrc.yml @@ -0,0 +1,23 @@ +indent: " " # four spaces +dependencyTypes: ["!peer", "!resolutions"] # let us take care of the peer dependency resolutions by hand +sortAz: ["!scripts"] # we prefer to sort scripts by-hand, because sometimes it uses run-s pattern +semverGroups: + # Note: rule priority is top (high) to bottom (low) + - label: Use looser ranges for metadata local packages + dependencies: + # Note: - Metadata updates often include new network configuration, which we do not want to force a new SDK + # version in order for the client to be able to use. + # - Probably this is better set in peerDependencies, instaed. However, that might be a breaking change to + # the current developers of SDK. + - "@superfluid-finance/metadata" + range: "^" + - label: Use exact version for prod dependencies + dependencyTypes: ["prod"] + range: "" + - label: Use looser range by default + range: "^" +versionGroups: + - label: Pin stack-trace to the same version, since newer version starts to use ES module + dependencies: + - "stack-trace" + pinVersion: "0.0.10" diff --git a/.yarn/releases/yarn-1.22.19.cjs b/.yarn/releases/yarn-1.22.22.cjs similarity index 99% rename from .yarn/releases/yarn-1.22.19.cjs rename to .yarn/releases/yarn-1.22.22.cjs index 0fefc25827..3ff8687a11 100755 --- a/.yarn/releases/yarn-1.22.19.cjs +++ b/.yarn/releases/yarn-1.22.22.cjs @@ -1411,7 +1411,7 @@ function _load_glob() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(46)); + return _os = _interopRequireDefault(__webpack_require__(42)); } var _path; @@ -1441,7 +1441,7 @@ function _load_promise2() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _fsNormalized; @@ -1471,7 +1471,7 @@ const readdir = exports.readdir = (0, (_promise2 || _load_promise2()).promisify) const rename = exports.rename = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.rename); const access = exports.access = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.access); const stat = exports.stat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.stat); -const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(145)); +const mkdirp = exports.mkdirp = (0, (_promise2 || _load_promise2()).promisify)(__webpack_require__(146)); const exists = exports.exists = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.exists, true); const lstat = exports.lstat = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.lstat); const chmod = exports.chmod = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.chmod); @@ -1487,7 +1487,7 @@ const CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; const fsSymlink = (0, (_promise2 || _load_promise2()).promisify)((_fs || _load_fs()).default.symlink); const invariant = __webpack_require__(9); -const stripBOM = __webpack_require__(160); +const stripBOM = __webpack_require__(161); const noop = () => {}; @@ -1582,12 +1582,12 @@ exports.OneTimePasswordError = OneTimePasswordError; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; }); /* unused harmony export SafeSubscriber */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(322); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(323); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(324); /** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */ @@ -1838,7 +1838,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getPathKey = getPathKey; -const os = __webpack_require__(46); +const os = __webpack_require__(42); const path = __webpack_require__(0); const userHome = __webpack_require__(67).default; @@ -2106,10 +2106,10 @@ module.exports = require("crypto"); "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(323); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(932); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(118); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(325); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(186); /** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */ @@ -2374,7 +2374,7 @@ module.exports = safer // Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var Stream = __webpack_require__(23).Stream; var util = __webpack_require__(3); @@ -2958,20 +2958,19 @@ class Lockfile { invariant(remote, 'Package is missing a remote'); const remoteKey = keyForRemote(remote); - const seenPattern = remoteKey && seen.get(remoteKey); + const pkgName = getName(pattern); + + const seenKey = remoteKey ? `${remoteKey}#${pkgName}` : null; + const seenPattern = seenKey ? seen.get(seenKey) : null; + if (seenPattern) { // no point in duplicating it lockfile[pattern] = seenPattern; - - // if we're relying on our name being inferred and two of the patterns have - // different inferred names then we need to set it - if (!seenPattern.name && getName(pattern) !== pkg.name) { - seenPattern.name = pkg.name; - } continue; } + const obj = implodeEntry(pattern, { - name: pkg.name, + name: pkgName, version: pkg.version, uid: pkg._uid, resolved: remote.resolved, @@ -2986,8 +2985,8 @@ class Lockfile { lockfile[pattern] = obj; - if (remoteKey) { - seen.set(remoteKey, obj); + if (seenKey) { + seen.set(seenKey, obj); } } @@ -3029,8 +3028,8 @@ exports.default = _assign2.default || function (target) { /* 21 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(133)('wks'); -var uid = __webpack_require__(137); +var store = __webpack_require__(134)('wks'); +var uid = __webpack_require__(138); var Symbol = __webpack_require__(17).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; @@ -4392,7 +4391,7 @@ module.exports = require("url"); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(444); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(57); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(48); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(441); @@ -4559,7 +4558,7 @@ module.exports = { var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var PrivateKey = __webpack_require__(33); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var crypto = __webpack_require__(11); var algs = __webpack_require__(32); var asn1 = __webpack_require__(66); @@ -4861,7 +4860,7 @@ function publicFromPrivateECDSA(curveName, priv) { assert.string(curveName, 'curveName'); assert.buffer(priv); if (ec === undefined) - ec = __webpack_require__(139); + ec = __webpack_require__(140); if (jsbn === undefined) jsbn = __webpack_require__(81).BigInteger; var params = algs.curves[curveName]; @@ -4929,6 +4928,241 @@ function opensshCipherInfo(cipher) { /* 27 */ /***/ (function(module, exports, __webpack_require__) { +"use strict"; + +const escapeStringRegexp = __webpack_require__(382); +const ansiStyles = __webpack_require__(474); +const stdoutColor = __webpack_require__(566).stdout; + +const template = __webpack_require__(567); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + // Copyright 2017 Joyent, Inc. module.exports = Key; @@ -4936,9 +5170,9 @@ module.exports = Key; var assert = __webpack_require__(16); var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); -var DiffieHellman = __webpack_require__(325).DiffieHellman; +var DiffieHellman = __webpack_require__(326).DiffieHellman; var errs = __webpack_require__(74); var utils = __webpack_require__(26); var PrivateKey = __webpack_require__(33); @@ -4956,13 +5190,13 @@ var KeyParseError = errs.KeyParseError; var formats = {}; formats['auto'] = __webpack_require__(455); formats['pem'] = __webpack_require__(86); -formats['pkcs1'] = __webpack_require__(327); -formats['pkcs8'] = __webpack_require__(157); +formats['pkcs1'] = __webpack_require__(328); +formats['pkcs8'] = __webpack_require__(158); formats['rfc4253'] = __webpack_require__(103); formats['ssh'] = __webpack_require__(456); formats['ssh-private'] = __webpack_require__(193); formats['openssh'] = formats['ssh-private']; -formats['dnssec'] = __webpack_require__(326); +formats['dnssec'] = __webpack_require__(327); function Key(opts) { assert.object(opts, 'options'); @@ -5207,13 +5441,13 @@ Key._oldVersionDetect = function (obj) { /***/ }), -/* 28 */ +/* 29 */ /***/ (function(module, exports) { module.exports = require("assert"); /***/ }), -/* 29 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5255,241 +5489,6 @@ function nullify(obj = {}) { return obj; } -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const escapeStringRegexp = __webpack_require__(382); -const ansiStyles = __webpack_require__(474); -const stdoutColor = __webpack_require__(566).stdout; - -const template = __webpack_require__(567); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = stdoutColor ? stdoutColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript - - /***/ }), /* 31 */ /***/ (function(module, exports) { @@ -5684,12 +5683,12 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); -var dhe = __webpack_require__(325); +var dhe = __webpack_require__(326); var generateECDSA = dhe.generateECDSA; var generateED25519 = dhe.generateED25519; var edCompat; @@ -5701,7 +5700,7 @@ try { /* Just continue through, and bail out if we try to use it. */ } -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; @@ -5710,13 +5709,13 @@ var KeyEncryptedError = errs.KeyEncryptedError; var formats = {}; formats['auto'] = __webpack_require__(455); formats['pem'] = __webpack_require__(86); -formats['pkcs1'] = __webpack_require__(327); -formats['pkcs8'] = __webpack_require__(157); +formats['pkcs1'] = __webpack_require__(328); +formats['pkcs8'] = __webpack_require__(158); formats['rfc4253'] = __webpack_require__(103); formats['ssh-private'] = __webpack_require__(193); formats['openssh'] = formats['ssh-private']; formats['ssh'] = formats['ssh-private']; -formats['dnssec'] = __webpack_require__(326); +formats['dnssec'] = __webpack_require__(327); function PrivateKey(opts) { assert.object(opts, 'options'); @@ -6149,7 +6148,7 @@ function _load_fs() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _yarnVersion; @@ -7512,7 +7511,7 @@ module.exports = function (it) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(25); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(190); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(422); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(322); /** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ @@ -24833,7 +24832,7 @@ function normalizePattern(pattern) { } }.call(this)); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 39 */ @@ -24862,8 +24861,8 @@ function emptyScheduled(scheduler) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncAction__ = __webpack_require__(149); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncAction__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */ @@ -24884,10 +24883,16 @@ var isArray = Array.isArray || (function (x) { return x && typeof x.length === ' /***/ }), /* 42 */ +/***/ (function(module, exports) { + +module.exports = require("os"); + +/***/ }), +/* 43 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(72); -var createDesc = __webpack_require__(132); +var createDesc = __webpack_require__(133); module.exports = __webpack_require__(52) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { @@ -24897,7 +24902,7 @@ module.exports = __webpack_require__(52) ? function (object, key, value) { /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24963,7 +24968,7 @@ module.exports.extend = extend; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -24971,7 +24976,7 @@ module.exports.extend = extend; /*eslint-disable max-len*/ -var common = __webpack_require__(43); +var common = __webpack_require__(44); var YAMLException = __webpack_require__(55); var Type = __webpack_require__(10); @@ -25078,7 +25083,7 @@ module.exports = Schema; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { /* eslint-disable node/no-deprecated-api */ @@ -25145,12 +25150,6 @@ SafeBuffer.allocUnsafeSlow = function (size) { } -/***/ }), -/* 46 */ -/***/ (function(module, exports) { - -module.exports = require("os"); - /***/ }), /* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -25277,7 +25276,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; /* global child_process$spawnOpts */ -const child = __webpack_require__(331); +const os = __webpack_require__(42); +const child = __webpack_require__(332); const fs = __webpack_require__(4); const path = __webpack_require__(0); @@ -25330,8 +25330,9 @@ function forkp(program, args, opts) { reject(error); }); - proc.on('close', exitCode => { - resolve(exitCode); + proc.on('close', (exitCode, signal) => { + const finalExitCode = typeof exitCode !== `undefined` && exitCode !== null ? exitCode : 128 + os.constants.signals[signal]; + resolve(finalExitCode); }); }); } @@ -25347,8 +25348,9 @@ function spawnp(program, args, opts) { reject(error); }); - proc.on('close', exitCode => { - resolve(exitCode); + proc.on('close', (exitCode, signal) => { + const finalExitCode = typeof exitCode !== `undefined` && exitCode !== null ? exitCode : 128 + os.constants.signals[signal]; + resolve(finalExitCode); }); }); } @@ -25622,12 +25624,12 @@ module.exports = YAMLException; -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ include: [ - __webpack_require__(143) + __webpack_require__(144) ], implicit: [ __webpack_require__(299), @@ -25795,7 +25797,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var global = __webpack_require__(17); var core = __webpack_require__(31); var ctx = __webpack_require__(70); -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); var has = __webpack_require__(71); var PROTOTYPE = 'prototype'; @@ -25962,7 +25964,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_operators_debounce__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_operators_debounceTime__ = __webpack_require__(851); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_operators_debounceTime__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__ = __webpack_require__(146); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__ = __webpack_require__(147); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_operators_delay__ = __webpack_require__(852); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_operators_delay__["a"]; }); @@ -25988,7 +25990,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_operators_exhaustMap__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_operators_expand__ = __webpack_require__(862); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_operators_expand__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__ = __webpack_require__(148); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__internal_operators_finalize__ = __webpack_require__(863); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_operators_finalize__["a"]; }); @@ -26016,9 +26018,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_42__internal_operators_max__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__internal_operators_merge__ = __webpack_require__(872); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_43__internal_operators_merge__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__ = __webpack_require__(315); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__ = __webpack_require__(316); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__ = __webpack_require__(149); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_operators_mergeMapTo__ = __webpack_require__(873); @@ -26059,13 +26061,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return __WEBPACK_IMPORTED_MODULE_63__internal_operators_retry__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__internal_operators_retryWhen__ = __webpack_require__(888); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return __WEBPACK_IMPORTED_MODULE_64__internal_operators_retryWhen__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__ = __webpack_require__(316); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__ = __webpack_require__(317); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__internal_operators_sample__ = __webpack_require__(889); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_66__internal_operators_sample__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__internal_operators_sampleTime__ = __webpack_require__(890); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return __WEBPACK_IMPORTED_MODULE_67__internal_operators_sampleTime__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__ = __webpack_require__(317); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__ = __webpack_require__(318); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__internal_operators_sequenceEqual__ = __webpack_require__(891); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return __WEBPACK_IMPORTED_MODULE_69__internal_operators_sequenceEqual__["a"]; }); @@ -26089,13 +26091,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return __WEBPACK_IMPORTED_MODULE_78__internal_operators_subscribeOn__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__internal_operators_switchAll__ = __webpack_require__(901); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return __WEBPACK_IMPORTED_MODULE_79__internal_operators_switchAll__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__ = __webpack_require__(319); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__internal_operators_switchMapTo__ = __webpack_require__(902); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return __WEBPACK_IMPORTED_MODULE_81__internal_operators_switchMapTo__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__ = __webpack_require__(319); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__ = __webpack_require__(320); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__ = __webpack_require__(320); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__ = __webpack_require__(321); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__internal_operators_takeUntil__ = __webpack_require__(903); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return __WEBPACK_IMPORTED_MODULE_84__internal_operators_takeUntil__["a"]; }); @@ -26256,7 +26258,7 @@ module.exports = require("buffer"); "use strict"; -const Buffer = __webpack_require__(45).Buffer +const Buffer = __webpack_require__(46).Buffer const crypto = __webpack_require__(11) const Transform = __webpack_require__(23).Transform @@ -26683,7 +26685,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const path = __webpack_require__(0); -const home = exports.home = __webpack_require__(46).homedir(); +const home = exports.home = __webpack_require__(42).homedir(); const userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; @@ -26785,7 +26787,7 @@ exports.f = __webpack_require__(52) ? Object.defineProperty : function definePro -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = Schema.DEFAULT = new Schema({ @@ -26905,7 +26907,7 @@ var crypto = __webpack_require__(11); var errs = __webpack_require__(74); var utils = __webpack_require__(26); var asn1 = __webpack_require__(66); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var SignatureParseError = errs.SignatureParseError; @@ -29627,7 +29629,7 @@ exports.hostedGitFragmentToGitUrl = hostedGitFragmentToGitUrl; var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } var _npmResolver; @@ -29645,7 +29647,7 @@ function _load_yarnResolver() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _tarballResolver; @@ -29776,7 +29778,7 @@ for (const key in registries) { */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var runAsync = __webpack_require__(182); var { filter, flatMap, share, take, takeUntil } = __webpack_require__(63); var Choices = __webpack_require__(686); @@ -32275,7 +32277,7 @@ function regExpEscape (s) { /* 83 */ /***/ (function(module, exports, __webpack_require__) { -var wrappy = __webpack_require__(161) +var wrappy = __webpack_require__(162) module.exports = wrappy(once) module.exports.strict = wrappy(onceStrict) @@ -32412,11 +32414,11 @@ var crypto = __webpack_require__(11); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var pkcs1 = __webpack_require__(327); -var pkcs8 = __webpack_require__(157); +var pkcs1 = __webpack_require__(328); +var pkcs8 = __webpack_require__(158); var sshpriv = __webpack_require__(193); var rfc4253 = __webpack_require__(103); @@ -33199,7 +33201,7 @@ Object.defineProperty(exports, "__esModule", { var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -33334,8 +33336,8 @@ module.exports = function (it, tag, stat) { /* 96 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(133)('keys'); -var uid = __webpack_require__(137); +var shared = __webpack_require__(134)('keys'); +var uid = __webpack_require__(138); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; @@ -33412,16 +33414,16 @@ module.exports = function (it) { module.exports = glob var fs = __webpack_require__(4) -var rp = __webpack_require__(140) +var rp = __webpack_require__(141) var minimatch = __webpack_require__(82) var Minimatch = minimatch.Minimatch var inherits = __webpack_require__(61) var EE = __webpack_require__(77).EventEmitter var path = __webpack_require__(0) -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var isAbsolute = __webpack_require__(101) var globSync = __webpack_require__(269) -var common = __webpack_require__(141) +var common = __webpack_require__(142) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -34173,7 +34175,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ @@ -34260,9 +34262,9 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); function algToKeyType(alg) { assert.string(alg); @@ -34525,7 +34527,7 @@ function _load_invariant() { var _stripBom; function _load_stripBom() { - return _stripBom = _interopRequireDefault(__webpack_require__(160)); + return _stripBom = _interopRequireDefault(__webpack_require__(161)); } var _constants; @@ -34543,7 +34545,7 @@ function _load_errors() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -35201,7 +35203,7 @@ function _load_isCi() { var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(46)); + return _os = _interopRequireDefault(__webpack_require__(42)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -35509,7 +35511,7 @@ function _load_index() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _exoticResolver; @@ -35782,7 +35784,7 @@ Object.defineProperty(exports, "__esModule", { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -36364,7 +36366,7 @@ function _load_fixCmdWinSlashes() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -37468,6 +37470,34 @@ module.exports = uuid; /***/ }), /* 121 */ +/***/ (function(module, exports) { + +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + + +/***/ }), +/* 122 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37983,7 +38013,7 @@ function setFlags(commander) { } /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38020,7 +38050,7 @@ function _load_semver() { var _validate; function _load_validate() { - return _validate = __webpack_require__(125); + return _validate = __webpack_require__(126); } var _lockfile; @@ -38564,7 +38594,7 @@ class PackageRequest { exports.default = PackageRequest; /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38597,7 +38627,7 @@ class BaseResolver { exports.default = BaseResolver; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38817,7 +38847,7 @@ class GitResolver extends (_exoticResolver || _load_exoticResolver()).default { exports.default = GitResolver; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39068,7 +39098,7 @@ function cleanDependencies(info, isRoot, reporter, warn) { } /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() @@ -39097,7 +39127,7 @@ module.exports = function (it) { /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys @@ -39107,7 +39137,7 @@ module.exports = ( /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(17).document; @@ -39115,7 +39145,7 @@ module.exports = document && document.documentElement; /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39123,7 +39153,7 @@ module.exports = document && document.documentElement; var LIBRARY = __webpack_require__(93); var $export = __webpack_require__(60); var redefine = __webpack_require__(248); -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); var Iterators = __webpack_require__(54); var $iterCreate = __webpack_require__(239); var setToStringTag = __webpack_require__(95); @@ -39191,7 +39221,7 @@ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -39204,7 +39234,7 @@ module.exports = function (exec) { /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(35); @@ -39222,7 +39252,7 @@ module.exports = function (C, x) { /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { @@ -39236,7 +39266,7 @@ module.exports = function (bitmap, value) { /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(31); @@ -39254,7 +39284,7 @@ var store = global[SHARED] || (global[SHARED] = {}); /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) @@ -39269,12 +39299,12 @@ module.exports = function (O, D) { /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(70); var invoke = __webpack_require__(236); -var html = __webpack_require__(128); +var html = __webpack_require__(129); var cel = __webpack_require__(92); var global = __webpack_require__(17); var process = global.process; @@ -39359,7 +39389,7 @@ module.exports = { /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength @@ -39371,7 +39401,7 @@ module.exports = function (it) { /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports) { var id = 0; @@ -39382,7 +39412,7 @@ module.exports = function (key) { /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { @@ -39613,7 +39643,7 @@ function coerce(val) { /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { // Basic Javascript Elliptic Curve implementation @@ -40180,7 +40210,7 @@ module.exports = exports /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { module.exports = realpath @@ -40252,7 +40282,7 @@ function unmonkeypatch () { /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -40498,7 +40528,7 @@ function childrenIgnored (self, path) { /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { @@ -40510,7 +40540,7 @@ module.exports = function(det, rec, confidence, name, lang) { /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40524,18 +40554,18 @@ module.exports = function(det, rec, confidence, name, lang) { -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ include: [ - __webpack_require__(144) + __webpack_require__(145) ] }); /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40550,7 +40580,7 @@ module.exports = new Schema({ -var Schema = __webpack_require__(44); +var Schema = __webpack_require__(45); module.exports = new Schema({ @@ -40567,7 +40597,7 @@ module.exports = new Schema({ /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(0); @@ -40671,7 +40701,7 @@ mkdirP.sync = function sync (p, opts, made) { /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40720,7 +40750,7 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40773,7 +40803,7 @@ var FilterSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40889,7 +40919,7 @@ var MergeMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -40993,7 +41023,7 @@ var AsyncAction = /*@__PURE__*/ (function (_super) { /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41061,7 +41091,7 @@ var AsyncScheduler = /*@__PURE__*/ (function (_super) { /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41081,7 +41111,7 @@ var $$iterator = iterator; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41099,7 +41129,7 @@ var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41117,7 +41147,7 @@ var EmptyError = EmptyErrorImpl; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41130,7 +41160,7 @@ function isFunction(x) { /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2016 Joyent, Inc. @@ -41141,14 +41171,14 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var errs = __webpack_require__(74); var util = __webpack_require__(3); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var formats = {}; formats['openssh'] = __webpack_require__(940); @@ -41514,7 +41544,7 @@ Certificate._oldVersionDetect = function (obj) { /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -41526,8 +41556,8 @@ var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var crypto = __webpack_require__(11); var errs = __webpack_require__(74); -var Key = __webpack_require__(27); -var Certificate = __webpack_require__(155); +var Key = __webpack_require__(28); +var Certificate = __webpack_require__(156); var utils = __webpack_require__(26); var FingerprintFormatError = errs.FingerprintFormatError; @@ -41682,7 +41712,7 @@ Fingerprint._oldVersionDetect = function (obj) { /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -41702,7 +41732,7 @@ var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); @@ -42300,7 +42330,7 @@ function writePkcs8EdDSAPrivate(key, der) { /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -42310,7 +42340,7 @@ module.exports = Identity; var assert = __webpack_require__(16); var algs = __webpack_require__(32); var crypto = __webpack_require__(11); -var Fingerprint = __webpack_require__(156); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var errs = __webpack_require__(74); var util = __webpack_require__(3); @@ -42595,7 +42625,7 @@ Identity._oldVersionDetect = function (obj) { /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -42750,7 +42780,7 @@ SSHBuffer.prototype.write = function (buf) { /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -42771,7 +42801,7 @@ module.exports = x => { /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports) { // Returns a wrapper function that returns a wrapped callback @@ -42810,7 +42840,7 @@ function wrappy (fn, cb) { /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -42903,7 +42933,7 @@ function _load_index3() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -43948,34 +43978,6 @@ function extractWorkspaces(manifest) { return undefined; } -/***/ }), -/* 163 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - /***/ }), /* 164 */ /***/ (function(module, exports) { @@ -45165,7 +45167,7 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(246); -var enumBugKeys = __webpack_require__(127); +var enumBugKeys = __webpack_require__(128); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); @@ -45283,7 +45285,7 @@ module.exports = eos; // Copyright 2012 Joyent, Inc. All rights reserved. var assert = __webpack_require__(16); -var sshpk = __webpack_require__(328); +var sshpk = __webpack_require__(329); var util = __webpack_require__(3); var HASH_ALGOS = { @@ -45400,7 +45402,7 @@ module.exports = { "use strict"; -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var figures = __webpack_require__(267); /** @@ -45446,7 +45448,7 @@ module.exports = Separator; var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); /** * The paginator keeps track of a pointer index in a list and returns @@ -45793,7 +45795,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_Subject__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__ = __webpack_require__(419); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(308); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(309); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(184); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__["a"]; }); @@ -45816,7 +45818,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(185); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_Notification__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(325); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(192); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__["a"]; }); @@ -45824,9 +45826,9 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__ = __webpack_require__(930); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__ = __webpack_require__(153); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(154); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(190); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__["a"]; }); @@ -45838,11 +45840,11 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return __WEBPACK_IMPORTED_MODULE_26__internal_observable_bindCallback__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__ = __webpack_require__(824); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(309); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(310); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(187); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(310); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(311); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__ = __webpack_require__(39); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["a"]; }); @@ -45864,7 +45866,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_39__internal_observable_merge__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__ = __webpack_require__(425); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__ = __webpack_require__(311); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__ = __webpack_require__(312); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__internal_observable_onErrorResumeNext__ = __webpack_require__(834); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return __WEBPACK_IMPORTED_MODULE_42__internal_observable_onErrorResumeNext__["a"]; }); @@ -45874,13 +45876,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_44__internal_observable_race__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_observable_range__ = __webpack_require__(836); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_observable_range__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__ = __webpack_require__(313); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__ = __webpack_require__(314); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__internal_observable_timer__ = __webpack_require__(427); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return __WEBPACK_IMPORTED_MODULE_47__internal_observable_timer__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__internal_observable_using__ = __webpack_require__(837); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return __WEBPACK_IMPORTED_MODULE_48__internal_observable_using__["a"]; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__ = __webpack_require__(314); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__ = __webpack_require__(315); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["b"]; }); @@ -46008,8 +46010,8 @@ var AsyncSubject = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notification; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_empty__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_of__ = __webpack_require__(311); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_throwError__ = __webpack_require__(313); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_of__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_throwError__ = __webpack_require__(314); /** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */ @@ -46116,7 +46118,7 @@ var config = { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concat; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(311); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(312); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__from__ = __webpack_require__(62); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_concatAll__ = __webpack_require__(429); /** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */ @@ -46143,10 +46145,10 @@ function concat() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = reduce; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scan__ = __webpack_require__(317); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLast__ = __webpack_require__(320); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__ = __webpack_require__(146); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(324); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scan__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLast__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(325); /** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */ @@ -46172,7 +46174,7 @@ function reduce(accumulator, seed) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throwIfEmpty; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tap__ = __webpack_require__(435); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__(154); /** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */ @@ -46259,11 +46261,11 @@ var algs = __webpack_require__(32); var utils = __webpack_require__(26); var crypto = __webpack_require__(11); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); var rfc4253 = __webpack_require__(103); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); var errors = __webpack_require__(74); var bcrypt; @@ -46515,10 +46517,10 @@ function write(key, options) { var chownr = __webpack_require__(568) var tar = __webpack_require__(460) var pump = __webpack_require__(781) -var mkdirp = __webpack_require__(145) +var mkdirp = __webpack_require__(146) var fs = __webpack_require__(4) var path = __webpack_require__(0) -var os = __webpack_require__(46) +var os = __webpack_require__(42) var win32 = os.platform() === 'win32' @@ -46863,7 +46865,7 @@ function mkdirfix (name, opts, cb) { /* 195 */ /***/ (function(module, exports) { -module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.19","packageManager":"yarn@1.22.17","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} +module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.22.22","packageManager":"yarn@1.22.17","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","js-yaml":"^3.13.1","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","punycode":"1.4.1","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","string-replace-loader":"^2.1.1","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} /***/ }), /* 196 */ @@ -47569,7 +47571,7 @@ function _load_lockfile() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _normalizePattern; @@ -48374,7 +48376,7 @@ function _load_errors() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _misc; @@ -50008,7 +50010,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const readline = __webpack_require__(198); -var _require = __webpack_require__(30); +var _require = __webpack_require__(27); const supportsColor = _require.supportsColor; @@ -50295,7 +50297,7 @@ function _load_minimatch() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _normalizePattern2; @@ -50575,7 +50577,7 @@ function _load_errors() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _exoticResolver; @@ -50674,7 +50676,7 @@ function _load_npmRegistry() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _fs; @@ -51029,7 +51031,7 @@ const futimes = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()) const write = (0, (_promise || _load_promise()).promisify)((_fs || _load_fs()).default.write); -const unlink = exports.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(307)); +const unlink = exports.unlink = (0, (_promise || _load_promise()).promisify)(__webpack_require__(308)); /** * Unlinks the destination to force a recreation. This is needed on case-insensitive file systems @@ -51209,7 +51211,7 @@ function _load_fs2() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _misc; @@ -51787,7 +51789,7 @@ function _load_resolveRelative() { var _validate; function _load_validate() { - return _validate = _interopRequireDefault(__webpack_require__(125)); + return _validate = _interopRequireDefault(__webpack_require__(126)); } var _fix; @@ -52595,7 +52597,7 @@ module.exports = function (it, Constructor, name, forbiddenField) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(98); -var toLength = __webpack_require__(136); +var toLength = __webpack_require__(137); var toAbsoluteIndex = __webpack_require__(251); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { @@ -52625,7 +52627,7 @@ var ctx = __webpack_require__(70); var call = __webpack_require__(238); var isArrayIter = __webpack_require__(237); var anObject = __webpack_require__(35); -var toLength = __webpack_require__(136); +var toLength = __webpack_require__(137); var getIterFn = __webpack_require__(254); var BREAK = {}; var RETURN = {}; @@ -52718,12 +52720,12 @@ module.exports = function (iterator, fn, value, entries) { "use strict"; var create = __webpack_require__(243); -var descriptor = __webpack_require__(132); +var descriptor = __webpack_require__(133); var setToStringTag = __webpack_require__(95); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(42)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; }); +__webpack_require__(43)(IteratorPrototype, __webpack_require__(21)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); @@ -52773,7 +52775,7 @@ module.exports = function (done, value) { /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(17); -var macrotask = __webpack_require__(135).set; +var macrotask = __webpack_require__(136).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; @@ -52850,7 +52852,7 @@ module.exports = function () { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(35); var dPs = __webpack_require__(244); -var enumBugKeys = __webpack_require__(127); +var enumBugKeys = __webpack_require__(128); var IE_PROTO = __webpack_require__(96)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; @@ -52864,7 +52866,7 @@ var createDict = function () { var gt = '>'; var iframeDocument; iframe.style.display = 'none'; - __webpack_require__(128).appendChild(iframe); + __webpack_require__(129).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -52955,7 +52957,7 @@ module.exports = function (object, names) { /* 247 */ /***/ (function(module, exports, __webpack_require__) { -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); module.exports = function (target, src, safe) { for (var key in src) { if (safe && target[key]) target[key] = src[key]; @@ -52968,7 +52970,7 @@ module.exports = function (target, src, safe) { /* 248 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(42); +module.exports = __webpack_require__(43); /***/ }), @@ -53060,7 +53062,7 @@ module.exports = navigator && navigator.userAgent || ''; /* 254 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(126); +var classof = __webpack_require__(127); var ITERATOR = __webpack_require__(21)('iterator'); var Iterators = __webpack_require__(54); module.exports = __webpack_require__(31).getIteratorMethod = function (it) { @@ -53085,7 +53087,7 @@ var toIObject = __webpack_require__(98); // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(129)(Array, 'Array', function (iterated, kind) { +module.exports = __webpack_require__(130)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind @@ -53126,19 +53128,19 @@ addToUnscopables('entries'); var LIBRARY = __webpack_require__(93); var global = __webpack_require__(17); var ctx = __webpack_require__(70); -var classof = __webpack_require__(126); +var classof = __webpack_require__(127); var $export = __webpack_require__(60); var isObject = __webpack_require__(53); var aFunction = __webpack_require__(68); var anInstance = __webpack_require__(232); var forOf = __webpack_require__(234); -var speciesConstructor = __webpack_require__(134); -var task = __webpack_require__(135).set; +var speciesConstructor = __webpack_require__(135); +var task = __webpack_require__(136).set; var microtask = __webpack_require__(242)(); var newPromiseCapabilityModule = __webpack_require__(94); -var perform = __webpack_require__(130); +var perform = __webpack_require__(131); var userAgent = __webpack_require__(253); -var promiseResolve = __webpack_require__(131); +var promiseResolve = __webpack_require__(132); var PROMISE = 'Promise'; var TypeError = global.TypeError; var process = global.process; @@ -53419,7 +53421,7 @@ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(240)(functio var $at = __webpack_require__(250)(true); // 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(129)(String, 'String', function (iterated) { +__webpack_require__(130)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() @@ -53444,8 +53446,8 @@ __webpack_require__(129)(String, 'String', function (iterated) { var $export = __webpack_require__(60); var core = __webpack_require__(31); var global = __webpack_require__(17); -var speciesConstructor = __webpack_require__(134); -var promiseResolve = __webpack_require__(131); +var speciesConstructor = __webpack_require__(135); +var promiseResolve = __webpack_require__(132); $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { var C = speciesConstructor(this, core.Promise || global.Promise); @@ -53470,7 +53472,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { // https://github.com/tc39/proposal-promise-try var $export = __webpack_require__(60); var newPromiseCapability = __webpack_require__(94); -var perform = __webpack_require__(130); +var perform = __webpack_require__(131); $export($export.S, 'Promise', { 'try': function (callbackfn) { var promiseCapability = newPromiseCapability.f(this); @@ -53486,7 +53488,7 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) { __webpack_require__(255); var global = __webpack_require__(17); -var hide = __webpack_require__(42); +var hide = __webpack_require__(43); var Iterators = __webpack_require__(54); var TO_STRING_TAG = __webpack_require__(21)('toStringTag'); @@ -53515,7 +53517,7 @@ for (var i = 0; i < DOMIterables.length; i++) { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(138); +exports = module.exports = __webpack_require__(139); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -53739,7 +53741,7 @@ var util = __webpack_require__(3); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(138); +exports = module.exports = __webpack_require__(139); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -53754,7 +53756,7 @@ exports.useColors = useColors; exports.colors = [ 6, 2, 3, 4, 5, 1 ]; try { - var supportsColor = __webpack_require__(330); + var supportsColor = __webpack_require__(331); if (supportsColor && supportsColor.level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, @@ -61223,15 +61225,15 @@ module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(4) -var rp = __webpack_require__(140) +var rp = __webpack_require__(141) var minimatch = __webpack_require__(82) var Minimatch = minimatch.Minimatch var Glob = __webpack_require__(99).Glob var util = __webpack_require__(3) var path = __webpack_require__(0) -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var isAbsolute = __webpack_require__(101) -var common = __webpack_require__(141) +var common = __webpack_require__(142) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -62109,7 +62111,7 @@ module.exports = function (flag, argv) { /* 274 */ /***/ (function(module, exports, __webpack_require__) { -var wrappy = __webpack_require__(161) +var wrappy = __webpack_require__(162) var reqs = Object.create(null) var once = __webpack_require__(83) @@ -62340,10 +62342,10 @@ function deprecated(name) { module.exports.Type = __webpack_require__(10); -module.exports.Schema = __webpack_require__(44); +module.exports.Schema = __webpack_require__(45); module.exports.FAILSAFE_SCHEMA = __webpack_require__(100); -module.exports.JSON_SCHEMA = __webpack_require__(144); -module.exports.CORE_SCHEMA = __webpack_require__(143); +module.exports.JSON_SCHEMA = __webpack_require__(145); +module.exports.CORE_SCHEMA = __webpack_require__(144); module.exports.DEFAULT_SAFE_SCHEMA = __webpack_require__(56); module.exports.DEFAULT_FULL_SCHEMA = __webpack_require__(73); module.exports.load = loader.load; @@ -62375,7 +62377,7 @@ module.exports.addConstructor = deprecated('addConstructor'); /*eslint-disable no-use-before-define*/ -var common = __webpack_require__(43); +var common = __webpack_require__(44); var YAMLException = __webpack_require__(55); var DEFAULT_FULL_SCHEMA = __webpack_require__(73); var DEFAULT_SAFE_SCHEMA = __webpack_require__(56); @@ -63209,7 +63211,7 @@ module.exports.safeDump = safeDump; /*eslint-disable max-len,no-use-before-define*/ -var common = __webpack_require__(43); +var common = __webpack_require__(44); var YAMLException = __webpack_require__(55); var Mark = __webpack_require__(283); var DEFAULT_SAFE_SCHEMA = __webpack_require__(56); @@ -64840,7 +64842,7 @@ module.exports.safeLoad = safeLoad; -var common = __webpack_require__(43); +var common = __webpack_require__(44); function Mark(name, buffer, position, line, column) { @@ -65109,7 +65111,7 @@ module.exports = new Type('tag:yaml.org,2002:bool', { "use strict"; -var common = __webpack_require__(43); +var common = __webpack_require__(44); var Type = __webpack_require__(10); var YAML_FLOAT_PATTERN = new RegExp( @@ -65232,7 +65234,7 @@ module.exports = new Type('tag:yaml.org,2002:float', { "use strict"; -var common = __webpack_require__(43); +var common = __webpack_require__(44); var Type = __webpack_require__(10); function isHexCode(c) { @@ -66675,12 +66677,551 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /* 305 */ /***/ (function(module, exports, __webpack_require__) { +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + true + ) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return punycode; + }.call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) + +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; var jsonSafeStringify = __webpack_require__(745) var crypto = __webpack_require__(11) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer var defer = typeof setImmediate === 'undefined' ? process.nextTick @@ -66745,7 +67286,7 @@ exports.defer = defer /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; @@ -66804,13 +67345,13 @@ module.exports = core; /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { module.exports = rimraf rimraf.sync = rimrafSync -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var path = __webpack_require__(0) var fs = __webpack_require__(4) var glob = __webpack_require__(99) @@ -67174,7 +67715,7 @@ function rmkidsSync (p, options) { /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67306,7 +67847,7 @@ var ReplayEvent = /*@__PURE__*/ (function () { /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67423,7 +67964,7 @@ var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67453,7 +67994,7 @@ function defer(observableFactory) { /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67461,7 +68002,7 @@ function defer(observableFactory) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fromArray__ = __webpack_require__(85); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scalar__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scalar__ = __webpack_require__(313); /** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */ @@ -67492,7 +68033,7 @@ function of() { /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67513,7 +68054,7 @@ function scalar(value) { /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67537,7 +68078,7 @@ function dispatch(_a) { /***/ }), -/* 314 */ +/* 315 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67550,7 +68091,7 @@ function dispatch(_a) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__ = __webpack_require__(152); /** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */ @@ -67772,12 +68313,12 @@ var ZipBufferIterator = /*@__PURE__*/ (function (_super) { /***/ }), -/* 315 */ +/* 316 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(149); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */ @@ -67792,7 +68333,7 @@ function mergeAll(concurrent) { /***/ }), -/* 316 */ +/* 317 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67860,7 +68401,7 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 317 */ +/* 318 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67941,7 +68482,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 318 */ +/* 319 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68031,14 +68572,14 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 319 */ +/* 320 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = take; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(153); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_empty__ = __webpack_require__(39); /** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */ @@ -68092,14 +68633,14 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 320 */ +/* 321 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = takeLast; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(153); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_empty__ = __webpack_require__(39); /** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */ @@ -68168,7 +68709,7 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 321 */ +/* 322 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68183,7 +68724,7 @@ var $$rxSubscriber = rxSubscriber; /***/ }), -/* 322 */ +/* 323 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68210,7 +68751,7 @@ function canReportError(observer) { /***/ }), -/* 323 */ +/* 324 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68223,7 +68764,7 @@ function hostReportError(err) { /***/ }), -/* 324 */ +/* 325 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68254,7 +68795,7 @@ function pipeFromArray(fns) { /***/ }), -/* 325 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -68272,7 +68813,7 @@ var algs = __webpack_require__(32); var utils = __webpack_require__(26); var nacl; -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); @@ -68305,7 +68846,7 @@ function DiffieHellman(key) { if (ecdh === undefined) ecdh = __webpack_require__(381); if (ec === undefined) - ec = __webpack_require__(139); + ec = __webpack_require__(140); if (jsbn === undefined) jsbn = __webpack_require__(81).BigInteger; @@ -68636,7 +69177,7 @@ function generateECDSA(curve) { if (ecdh === undefined) ecdh = __webpack_require__(381); if (ec === undefined) - ec = __webpack_require__(139); + ec = __webpack_require__(140); if (jsbn === undefined) jsbn = __webpack_require__(81).BigInteger; @@ -68674,7 +69215,7 @@ function generateECDSA(curve) { /***/ }), -/* 326 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -68686,11 +69227,11 @@ module.exports = { var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var utils = __webpack_require__(26); -var SSHBuffer = __webpack_require__(159); -var Dhe = __webpack_require__(325); +var SSHBuffer = __webpack_require__(160); +var Dhe = __webpack_require__(326); var supportedAlgos = { 'rsa-sha1' : 5, @@ -68967,7 +69508,7 @@ function write(key, options) { /***/ }), -/* 327 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -68985,11 +69526,11 @@ var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); -var pkcs8 = __webpack_require__(157); +var pkcs8 = __webpack_require__(158); var readECDSACurve = pkcs8.readECDSACurve; function read(buf, options) { @@ -69346,17 +69887,17 @@ function writePkcs1EdDSAPublic(der, key) { /***/ }), -/* 328 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. -var Key = __webpack_require__(27); -var Fingerprint = __webpack_require__(156); +var Key = __webpack_require__(28); +var Fingerprint = __webpack_require__(157); var Signature = __webpack_require__(75); var PrivateKey = __webpack_require__(33); -var Certificate = __webpack_require__(155); -var Identity = __webpack_require__(158); +var Certificate = __webpack_require__(156); +var Identity = __webpack_require__(159); var errs = __webpack_require__(74); module.exports = { @@ -69391,7 +69932,7 @@ module.exports = { /***/ }), -/* 329 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69402,7 +69943,7 @@ module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), /***/ }), -/* 330 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69492,17 +70033,11 @@ if (supportLevel === 0 && 'FORCE_COLOR' in process.env) { module.exports = process && support(supportLevel); -/***/ }), -/* 331 */ -/***/ (function(module, exports) { - -module.exports = require("child_process"); - /***/ }), /* 332 */ /***/ (function(module, exports) { -module.exports = require("punycode"); +module.exports = require("child_process"); /***/ }), /* 333 */ @@ -69596,7 +70131,7 @@ function _load_generateLockEntry() { var _global; function _load_global() { - return _global = _interopRequireWildcard(__webpack_require__(121)); + return _global = _interopRequireWildcard(__webpack_require__(122)); } var _help; @@ -69789,7 +70324,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -const chalk = __webpack_require__(30); +const chalk = __webpack_require__(27); const getDocsLink = name => `${(_constants || _load_constants()).YARN_DOCS}${name || ''}`; @@ -69943,7 +70478,7 @@ function loadRcFile(fileText, filePath) { let values = _parse.object; - if (filePath.match(/\.yml$/) && typeof values.yarnPath === 'string') { + if (filePath.match(/\.yml$/) && values && typeof values.yarnPath === 'string') { values = { 'yarn-path': values.yarnPath }; } @@ -70066,7 +70601,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.isOffline = isOffline; -const os = __webpack_require__(46); +const os = __webpack_require__(42); const IGNORE_INTERFACES = ['lo0', 'awdl0', 'bridge0']; const LOCAL_IPS = ['127.0.0.1', '::1']; @@ -70126,7 +70661,7 @@ function isOffline() { */ var EventEmitter = __webpack_require__(77).EventEmitter; -var spawn = __webpack_require__(331).spawn; +var spawn = __webpack_require__(332).spawn; var path = __webpack_require__(0); var dirname = path.dirname; var basename = path.basename; @@ -73242,7 +73777,7 @@ function _load_fs() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -74394,7 +74929,7 @@ function _load_normalizePattern() { var _validate; function _load_validate() { - return _validate = __webpack_require__(125); + return _validate = __webpack_require__(126); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -75027,7 +75562,7 @@ function _load_fs() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -75673,7 +76208,7 @@ function _load_index() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _normalizePattern2; @@ -75703,7 +76238,7 @@ function _load_lockfile() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } var _workspaceLayout; @@ -77291,7 +77826,7 @@ function _load_network() { var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(29)); + return _map = _interopRequireDefault(__webpack_require__(30)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -80293,7 +80828,7 @@ module.exports = Duplexify var crypto = __webpack_require__(11); var BigInteger = __webpack_require__(81).BigInteger; -var ECPointFp = __webpack_require__(139).ECPointFp; +var ECPointFp = __webpack_require__(140).ECPointFp; var Buffer = __webpack_require__(15).Buffer; exports.ECCurves = __webpack_require__(606); @@ -80489,7 +81024,7 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { process.on('exit', function() { debug(queue) - __webpack_require__(28).equal(queue.length, 0) + __webpack_require__(29).equal(queue.length, 0) }) } @@ -81632,7 +82167,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) { * `input` type prompt */ -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -82305,7 +82840,7 @@ MuteStream.prototype.close = proxy('close') "use strict"; const url = __webpack_require__(24); -const punycode = __webpack_require__(332); +const punycode = __webpack_require__(305); const queryString = __webpack_require__(786); const prependHttp = __webpack_require__(777); const sortKeys = __webpack_require__(934); @@ -82790,7 +83325,7 @@ var Stream = __webpack_require__(410); /**/ -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); @@ -84063,7 +84598,7 @@ var Stream = __webpack_require__(410); /**/ -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; var OurUint8Array = global.Uint8Array || function () {}; function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); @@ -84969,7 +85504,7 @@ exports.permuteDomain = permuteDomain; -var punycode = __webpack_require__(332); +var punycode = __webpack_require__(305); module.exports.getPublicSuffix = function getPublicSuffix(domain) { /*! @@ -85266,7 +85801,7 @@ var BehaviorSubject = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(186); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(323); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(324); /** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */ @@ -85367,7 +85902,7 @@ var SubjectSubscription = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__operators_refCount__ = __webpack_require__(316); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__operators_refCount__ = __webpack_require__(317); /** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */ @@ -85521,7 +86056,7 @@ var RefCountSubscriber = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = merge; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(49); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(315); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(316); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fromArray__ = __webpack_require__(85); /** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */ @@ -85806,7 +86341,7 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeAll__ = __webpack_require__(315); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeAll__ = __webpack_require__(316); /** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */ function concatAll() { @@ -85821,7 +86356,7 @@ function concatAll() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = concatMap; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(149); /** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */ function concatMap(project, resultSelector) { @@ -86260,7 +86795,7 @@ var ObserveOnMessage = /*@__PURE__*/ (function () { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(192); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(155); /** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */ @@ -86654,7 +87189,7 @@ function isPromise(value) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArrayLike__ = __webpack_require__(442); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isPromise__ = __webpack_require__(445); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isObject__ = __webpack_require__(444); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(152); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(118); /** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */ @@ -86728,7 +87263,7 @@ var subscribeToArray = function (array) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToIterable; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(152); /** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */ var subscribeToIterable = function (iterable) { @@ -86787,7 +87322,7 @@ var subscribeToObservable = function (obj) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToPromise; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hostReportError__ = __webpack_require__(323); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hostReportError__ = __webpack_require__(324); /** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */ var subscribeToPromise = function (promise) { @@ -86812,7 +87347,7 @@ var subscribeToPromise = function (promise) { // Note: since nyc uses this module to output coverage, any lines // that are in the direct sync flow of nyc's outputCoverage are // ignored, since we can never get coverage for them. -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) var signals = __webpack_require__(933) var EE = __webpack_require__(77) @@ -87107,13 +87642,13 @@ module.exports = { var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); var ssh = __webpack_require__(456); var rfc4253 = __webpack_require__(103); -var dnssec = __webpack_require__(326); +var dnssec = __webpack_require__(327); var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; @@ -87221,7 +87756,7 @@ var assert = __webpack_require__(16); var Buffer = __webpack_require__(15).Buffer; var rfc4253 = __webpack_require__(103); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var sshpriv = __webpack_require__(193); @@ -87346,13 +87881,13 @@ var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var Signature = __webpack_require__(75); -var Certificate = __webpack_require__(155); -var pkcs8 = __webpack_require__(157); +var Certificate = __webpack_require__(156); +var pkcs8 = __webpack_require__(158); /* * This file is based on RFC5280 (X.509). @@ -88092,7 +88627,7 @@ function writeBitField(setBits, bitIndex) { /**/ -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; /**/ var isEncoding = Buffer.isEncoding || function (encoding) { @@ -89706,7 +90241,7 @@ Object.defineProperty(module, 'exports', { get: assembleStyles }); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 475 */ @@ -90186,7 +90721,7 @@ for (var e in errors) { // Copyright 2011 Mark Cavage All rights reserved. -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var Buffer = __webpack_require__(15).Buffer; var ASN1 = __webpack_require__(204); @@ -90454,7 +90989,7 @@ module.exports = Reader; // Copyright 2011 Mark Cavage All rights reserved. -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var Buffer = __webpack_require__(15).Buffer; var ASN1 = __webpack_require__(204); var errors = __webpack_require__(203); @@ -91891,7 +92426,7 @@ function _load_fs() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -92132,7 +92667,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const chalk = __webpack_require__(30); +const chalk = __webpack_require__(27); function hasWrapper(flags, args) { return false; @@ -92258,7 +92793,7 @@ function _load_index() { var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } var _hostedGitResolver; @@ -92288,7 +92823,7 @@ function _load_gistResolver2() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _fileResolver; @@ -92306,7 +92841,7 @@ function _load_packageResolver() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _packageReference; @@ -93264,7 +93799,7 @@ function _load_fs() { var _validate; function _load_validate() { - return _validate = _interopRequireWildcard(__webpack_require__(125)); + return _validate = _interopRequireWildcard(__webpack_require__(126)); } var _constants; @@ -93845,7 +94380,7 @@ exports.hasWrapper = hasWrapper; var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _lockfile; @@ -94034,7 +94569,7 @@ function _load_buildSubCommands() { var _validate; function _load_validate() { - return _validate = __webpack_require__(125); + return _validate = __webpack_require__(126); } var _tag; @@ -94273,7 +94808,7 @@ const V2_NAMES = ['berry', 'stable', 'canary', 'v2', '2']; const isLocalFile = version => version.match(/^\.{0,2}[\\/]/) || path.isAbsolute(version); const isV2Version = version => (0, (_semver || _load_semver()).satisfiesWithPrereleases)(version, '>=2.0.0'); -const chalk = __webpack_require__(30); +const chalk = __webpack_require__(27); const invariant = __webpack_require__(9); const path = __webpack_require__(0); const semver = __webpack_require__(22); @@ -94330,7 +94865,7 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).def bundleUrl = 'https://nightly.yarnpkg.com/latest.js'; bundleVersion = 'nightly'; } else if (V2_NAMES.includes(range) || isLocalFile(range) || isV2Version(range)) { - const normalizedRange = range === `canary` ? `canary` : `stable`; + const normalizedRange = isV2Version(range) ? range : range === `canary` ? `canary` : `stable`; if (process.env.COREPACK_ROOT) { yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, [path.join(process.env.COREPACK_ROOT, 'dist/corepack.js'), `yarn@${normalizedRange}`, `set`, `version`, normalizedRange], { @@ -95026,7 +95561,7 @@ function _load_link() { var _global; function _load_global() { - return _global = __webpack_require__(121); + return _global = __webpack_require__(122); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -96008,7 +96543,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const invariant = __webpack_require__(9); const path = __webpack_require__(0); -const os = __webpack_require__(46); +const os = __webpack_require__(42); const semver = __webpack_require__(22); function hasWrapper(commander, args) { @@ -96247,6 +96782,28 @@ let main = exports.main = (() => { reporter.initPeakMemoryCounter(); const config = new (_config || _load_config()).default(reporter); + + if (!process.env.COREPACK_ROOT && !process.env.SKIP_YARN_COREPACK_CHECK) { + const packageManager = findPackageManager((_commander || _load_commander()).default.cwd); + if (packageManager !== null) { + if (!packageManager.match(/^yarn@[01]\./)) { + reporter.error(`This project's package.json defines ${chalk.gray('"packageManager": "yarn@')}${chalk.yellow(`${packageManager.replace(/^yarn@/, ``).replace(/\+.*/, ``)}`)}${chalk.gray(`"`)}. However the current global version of Yarn is ${chalk.yellow((_yarnVersion || _load_yarnVersion()).version)}.`); + + process.stderr.write(`\n`); + process.stderr.write(`Presence of the ${chalk.gray(`"packageManager"` + // eslint-disable-next-line max-len + )} field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.\n`); + + process.stderr.write(`Corepack must currently be enabled by running ${chalk.magenta(`corepack enable` + // $FlowIgnore + )} in your terminal. For more information, check out ${chalk.blueBright(`https://yarnpkg.com/corepack`)}.\n`); + + exit(1); + return; + } + } + } + const outputWrapperEnabled = (0, (_conversion || _load_conversion()).boolifyWithDefault)(process.env.YARN_WRAP_OUTPUT, true); const shouldWrapOutput = outputWrapperEnabled && !(_commander || _load_commander()).default.json && command.hasWrapper((_commander || _load_commander()).default, (_commander || _load_commander()).default.args) && !(commandName === 'init' && (_commander || _load_commander()).default[`2`]); @@ -96477,68 +97034,6 @@ let main = exports.main = (() => { }); }; - function onUnexpectedError(err) { - function indent(str) { - return '\n ' + str.trim().split('\n').join('\n '); - } - - const log = []; - log.push(`Arguments: ${indent(process.argv.join(' '))}`); - log.push(`PATH: ${indent(process.env.PATH || 'undefined')}`); - log.push(`Yarn version: ${indent((_yarnVersion || _load_yarnVersion()).version)}`); - log.push(`Node version: ${indent(process.versions.node)}`); - log.push(`Platform: ${indent(process.platform + ' ' + process.arch)}`); - - log.push(`Trace: ${indent(err.stack)}`); - - // add manifests - for (var _iterator3 = (_index2 || _load_index2()).registryNames, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - const registryName = _ref4; - - const possibleLoc = (_path || _load_path()).default.join(config.cwd, (_index2 || _load_index2()).registries[registryName].filename); - const manifest = (_fs || _load_fs()).default.existsSync(possibleLoc) ? (_fs || _load_fs()).default.readFileSync(possibleLoc, 'utf8') : 'No manifest'; - log.push(`${registryName} manifest: ${indent(manifest)}`); - } - - // lockfile - const lockLoc = (_path || _load_path()).default.join(config.lockfileFolder || config.cwd, // lockfileFolder might not be set at this point - (_constants || _load_constants()).LOCKFILE_FILENAME); - const lockfile = (_fs || _load_fs()).default.existsSync(lockLoc) ? (_fs || _load_fs()).default.readFileSync(lockLoc, 'utf8') : 'No lockfile'; - log.push(`Lockfile: ${indent(lockfile)}`); - - const errorReportLoc = writeErrorReport(log); - - reporter.error(reporter.lang('unexpectedError', err.message)); - - if (errorReportLoc) { - reporter.info(reporter.lang('bugReport', errorReportLoc)); - } - } - - function writeErrorReport(log) { - const errorReportLoc = config.enableMetaFolder ? (_path || _load_path()).default.join(config.cwd, (_constants || _load_constants()).META_FOLDER, 'yarn-error.log') : (_path || _load_path()).default.join(config.cwd, 'yarn-error.log'); - - try { - (_fs || _load_fs()).default.writeFileSync(errorReportLoc, log.join('\n\n') + '\n'); - } catch (err) { - reporter.error(reporter.lang('fileWriteError', errorReportLoc, err.message)); - return undefined; - } - - return errorReportLoc; - } - const cwd = command.shouldRunInCurrentCwd ? (_commander || _load_commander()).default.cwd : findProjectRoot((_commander || _load_commander()).default.cwd); const folderOptionKeys = ['linkFolder', 'globalFolder', 'preferredCacheFolder', 'cacheFolder', 'modulesFolder']; @@ -96626,7 +97121,7 @@ let main = exports.main = (() => { if (err instanceof (_errors || _load_errors()).MessageError) { reporter.error(err.message); } else { - onUnexpectedError(err); + reporter.error(err.stack); } if (command.getDocsInfo) { @@ -96647,7 +97142,7 @@ let main = exports.main = (() => { })(); let start = (() => { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const rc = (0, (_rc || _load_rc()).getRcConfigForCwd)(process.cwd(), process.argv.slice(2)); const yarnPath = rc['yarn-path'] || rc['yarnPath']; @@ -96692,7 +97187,7 @@ let start = (() => { }); return function start() { - return _ref5.apply(this, arguments); + return _ref4.apply(this, arguments); }; })(); @@ -96799,7 +97294,7 @@ function _load_errors() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _rc; @@ -96842,6 +97337,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const chalk = __webpack_require__(27); + process.stdout.prependListener('error', err => { // swallow err only if downstream consumer process closed pipe early if (err.code === 'EPIPE' || err.code === 'ERR_STREAM_DESTROYED') { @@ -96850,6 +97347,29 @@ process.stdout.prependListener('error', err => { throw err; }); +function findPackageManager(base) { + let prev = null; + let dir = base; + + do { + const p = (_path || _load_path()).default.join(dir, (_constants || _load_constants()).NODE_PACKAGE_JSON); + + let data; + try { + data = JSON.parse((_fs || _load_fs()).default.readFileSync(p, `utf8`)); + } catch (err) {} + + if (data && typeof data.packageManager === `string`) { + return data.packageManager; + } + + prev = dir; + dir = (_path || _load_path()).default.dirname(dir); + } while (dir !== prev); + + return null; +} + function findProjectRoot(base) { let prev = null; let dir = base; @@ -96876,7 +97396,7 @@ if (__webpack_require__.c[__webpack_require__.s] === module) { } exports.default = start; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 518 */ @@ -96994,7 +97514,7 @@ function _load_lockfile() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _pack; @@ -97589,7 +98109,7 @@ function _load_extends() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _misc; @@ -98753,7 +99273,7 @@ function _load_asyncToGenerator() { var _config; function _load_config() { - return _config = _interopRequireDefault(__webpack_require__(162)); + return _config = _interopRequireDefault(__webpack_require__(163)); } var _executeLifecycleScript; @@ -99855,8 +100375,8 @@ var _require = __webpack_require__(3); const inspect = _require.inspect; const readline = __webpack_require__(198); -const chalk = __webpack_require__(30); -const stripAnsi = __webpack_require__(329); +const chalk = __webpack_require__(27); +const stripAnsi = __webpack_require__(330); const read = __webpack_require__(790); const tty = __webpack_require__(104); @@ -101275,13 +101795,13 @@ function _load_extends() { var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(122)); + return _packageRequest = _interopRequireDefault(__webpack_require__(123)); } var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } var _workspaceLayout; @@ -101541,7 +102061,7 @@ function _load_exoticResolver() { var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(124)); + return _gitResolver = _interopRequireDefault(__webpack_require__(125)); } var _guessName; @@ -101691,7 +102211,7 @@ Object.defineProperty(exports, "__esModule", { var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(123)); + return _baseResolver = _interopRequireDefault(__webpack_require__(124)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -103817,7 +104337,7 @@ module.exports = { "default": __webpack_require__(591), __esModule: true }; var DuplexStream = __webpack_require__(791) , util = __webpack_require__(3) - , Buffer = __webpack_require__(45).Buffer + , Buffer = __webpack_require__(46).Buffer function BufferList (callback) { @@ -104502,7 +105022,7 @@ module.exports = (flag, argv) => { "use strict"; -const os = __webpack_require__(46); +const os = __webpack_require__(42); const hasFlag = __webpack_require__(565); const env = process.env; @@ -106619,7 +107139,7 @@ THE SOFTWARE. -var os = __webpack_require__(46); +var os = __webpack_require__(42); var hasFlag = __webpack_require__(587); var env = process.env; @@ -107871,7 +108391,7 @@ module.exports = function(conf) { // Requires ec.js, jsbn.js, and jsbn2.js var BigInteger = __webpack_require__(81).BigInteger -var ECCurveFp = __webpack_require__(139).ECCurveFp +var ECCurveFp = __webpack_require__(140).ECCurveFp // ---------------- @@ -108914,7 +109434,7 @@ function toRegex(pattern, contains, isNegated) { * extsprintf.js: extended POSIX-style sprintf */ -var mod_assert = __webpack_require__(28); +var mod_assert = __webpack_require__(29); var mod_util = __webpack_require__(3); /* @@ -115129,7 +115649,7 @@ var assert = __webpack_require__(16); var crypto = __webpack_require__(11); var http = __webpack_require__(87); var util = __webpack_require__(3); -var sshpk = __webpack_require__(328); +var sshpk = __webpack_require__(329); var jsprim = __webpack_require__(746); var utils = __webpack_require__(175); @@ -115534,7 +116054,7 @@ module.exports = { var assert = __webpack_require__(16); var crypto = __webpack_require__(11); -var sshpk = __webpack_require__(328); +var sshpk = __webpack_require__(329); var utils = __webpack_require__(175); var HASH_ALGOS = utils.HASH_ALGOS; @@ -115870,7 +116390,7 @@ module.exports = class Choice { "use strict"; -var assert = __webpack_require__(28); +var assert = __webpack_require__(29); var _ = __webpack_require__(38); var Separator = __webpack_require__(176); var Choice = __webpack_require__(685); @@ -115996,7 +116516,7 @@ module.exports = class Choices { */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var cliCursor = __webpack_require__(375); var figures = __webpack_require__(267); var { map, takeUntil } = __webpack_require__(63); @@ -116256,7 +116776,7 @@ module.exports = CheckboxPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { take, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -116362,7 +116882,7 @@ module.exports = ConfirmPrompt; * `editor` type prompt */ -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var editAsync = __webpack_require__(709).editAsync; var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -116470,7 +116990,7 @@ module.exports = EditorPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var Separator = __webpack_require__(176); @@ -116744,7 +117264,7 @@ module.exports = ExpandPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var figures = __webpack_require__(267); var cliCursor = __webpack_require__(375); var runAsync = __webpack_require__(182); @@ -116967,7 +117487,7 @@ module.exports = NumberPrompt; * `password` type prompt */ -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var observe = __webpack_require__(80); @@ -117084,7 +117604,7 @@ module.exports = PasswordPrompt; */ var _ = __webpack_require__(38); -var chalk = __webpack_require__(30); +var chalk = __webpack_require__(27); var { map, takeUntil } = __webpack_require__(63); var Base = __webpack_require__(79); var Separator = __webpack_require__(176); @@ -117506,7 +118026,7 @@ module.exports = PromptUI; var _ = __webpack_require__(38); var util = __webpack_require__(394); var cliWidth = __webpack_require__(574); -var stripAnsi = __webpack_require__(329); +var stripAnsi = __webpack_require__(330); var stringWidth = __webpack_require__(728); function height(content) { @@ -117680,7 +118200,7 @@ exports.fetchAsyncQuestionProperty = function(question, prop, answers) { /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** @@ -117827,7 +118347,7 @@ util.inherits(module.exports.ISO_2022_CN, ISO_2022); /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** * Binary search implementation (recursive) @@ -118335,7 +118855,7 @@ util.inherits(module.exports.gb_18030, mbcs); /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** * This class recognizes single-byte encodings. Because the encoding scheme is so @@ -119250,7 +119770,7 @@ util.inherits(module.exports.ISO_8859_7, sbcs); "use strict"; var util = __webpack_require__(3), - Match = __webpack_require__ (142); + Match = __webpack_require__ (143); /** * This class matches UTF-16 and UTF-32, both big- and little-endian. The @@ -119367,7 +119887,7 @@ util.inherits(module.exports.UTF_32LE, UTF_32); /***/ (function(module, exports, __webpack_require__) { -var Match = __webpack_require__ (142); +var Match = __webpack_require__ (143); /** * Charset recognizer for UTF-8 @@ -119807,7 +120327,7 @@ exports.RemoveFileError = RemoveFileError; */ Object.defineProperty(exports, "__esModule", { value: true }); var chardet_1 = __webpack_require__(704); -var child_process_1 = __webpack_require__(331); +var child_process_1 = __webpack_require__(332); var fs_1 = __webpack_require__(4); var iconv_lite_1 = __webpack_require__(726); var tmp_1 = __webpack_require__(954); @@ -122759,7 +123279,7 @@ IconvLiteDecoderStream.prototype.collect = function(cb) { "use strict"; -const stripAnsi = __webpack_require__(329); +const stripAnsi = __webpack_require__(330); const isFullwidthCodePoint = __webpack_require__(736); module.exports = str => { @@ -126102,7 +126622,7 @@ function constant(value) { module.exports = baseClone; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(121)(module))) /***/ }), /* 749 */ @@ -128180,7 +128700,7 @@ module.exports = (to, from) => { "use strict"; -const mkdirp = __webpack_require__(145) +const mkdirp = __webpack_require__(146) module.exports = function (dir, opts) { return new Promise((resolve, reject) => { @@ -131673,7 +132193,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -var Buffer = __webpack_require__(45).Buffer; +var Buffer = __webpack_require__(46).Buffer; var util = __webpack_require__(3); function copyBuffer(src, target, offset) { @@ -132108,7 +132628,7 @@ module.exports = HarWrapper; var extend = __webpack_require__(266) var cookies = __webpack_require__(412) -var helpers = __webpack_require__(305) +var helpers = __webpack_require__(306) var paramsHaveRequestBody = helpers.paramsHaveRequestBody @@ -132256,7 +132776,7 @@ Object.defineProperty(request, 'debug', { var caseless = __webpack_require__(228) var uuid = __webpack_require__(120) -var helpers = __webpack_require__(305) +var helpers = __webpack_require__(306) var md5 = helpers.md5 var toBase64 = helpers.toBase64 @@ -132825,7 +133345,7 @@ exports.header = function (uri, method, opts) { var uuid = __webpack_require__(120) var CombinedStream = __webpack_require__(379) var isstream = __webpack_require__(399) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer function Multipart (request) { this.request = request @@ -132947,7 +133467,7 @@ var caseless = __webpack_require__(228) var uuid = __webpack_require__(120) var oauth = __webpack_require__(768) var crypto = __webpack_require__(11) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer function OAuth (request) { this.request = request @@ -133535,7 +134055,7 @@ var VERSION = __webpack_require__(812).version; var punycode; try { - punycode = __webpack_require__(332); + punycode = __webpack_require__(305); } catch(e) { console.warn("cookie: can't load punycode; won't use punycode for domain normalization"); } @@ -135128,7 +135648,7 @@ var FormData = __webpack_require__(617) var extend = __webpack_require__(266) var isstream = __webpack_require__(399) var isTypedArray = __webpack_require__(742).strict -var helpers = __webpack_require__(305) +var helpers = __webpack_require__(306) var cookies = __webpack_require__(412) var getProxyFromURI = __webpack_require__(802) var Querystring = __webpack_require__(807).Querystring @@ -135140,7 +135660,7 @@ var Multipart = __webpack_require__(805).Multipart var Redirect = __webpack_require__(808).Redirect var Tunnel = __webpack_require__(809).Tunnel var now = __webpack_require__(776) -var Buffer = __webpack_require__(45).Buffer +var Buffer = __webpack_require__(46).Buffer var safeStringify = helpers.safeStringify var isReadStream = helpers.isReadStream @@ -136662,7 +137182,7 @@ module.exports = Request /* 814 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(306); +var core = __webpack_require__(307); var async = __webpack_require__(815); async.core = core; async.isCore = function isCore(x) { return core[x]; }; @@ -136676,7 +137196,7 @@ module.exports = async; /* 815 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(306); +var core = __webpack_require__(307); var fs = __webpack_require__(4); var path = __webpack_require__(0); var caller = __webpack_require__(417); @@ -136894,7 +137414,7 @@ module.exports = {"assert":true,"async_hooks":">= 8","buffer_ieee754":"< 0.9.7", /* 817 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(306); +var core = __webpack_require__(307); var fs = __webpack_require__(4); var path = __webpack_require__(0); var caller = __webpack_require__(417); @@ -137376,7 +137896,7 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(184); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(323); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isArray__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isScheduler__ = __webpack_require__(49); /** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */ @@ -137495,7 +138015,7 @@ function dispatchError(state) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncSubject__ = __webpack_require__(184); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_map__ = __webpack_require__(47); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(322); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_canReportError__ = __webpack_require__(323); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_isArray__ = __webpack_require__(41); /** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */ @@ -137710,7 +138230,7 @@ var ForkJoinSubscriber = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = fromEvent; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */ @@ -137785,7 +138305,7 @@ function isEventTarget(sourceObj) { /* harmony export (immutable) */ __webpack_exports__["a"] = fromEventPattern; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(155); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_map__ = __webpack_require__(47); /** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */ @@ -137829,7 +138349,7 @@ function fromEventPattern(addHandler, removeHandler, resultSelector) { /* harmony export (immutable) */ __webpack_exports__["a"] = fromIterable; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__symbol_iterator__ = __webpack_require__(152); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToIterable__ = __webpack_require__(448); /** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */ @@ -138101,7 +138621,7 @@ function dispatch(state) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = iif; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defer__ = __webpack_require__(310); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defer__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__empty__ = __webpack_require__(39); /** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */ @@ -138958,7 +139478,7 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combineAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_combineLatest__ = __webpack_require__(309); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_combineLatest__ = __webpack_require__(310); /** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */ function combineAll(project) { @@ -138974,7 +139494,7 @@ function combineAll(project) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = combineLatest; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_combineLatest__ = __webpack_require__(309); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_combineLatest__ = __webpack_require__(310); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_from__ = __webpack_require__(62); /** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */ @@ -139644,11 +140164,11 @@ function distinctUntilKeyChanged(key, compare) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = elementAt; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_ArgumentOutOfRangeError__ = __webpack_require__(152); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_ArgumentOutOfRangeError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throwIfEmpty__ = __webpack_require__(189); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(146); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__take__ = __webpack_require__(319); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__take__ = __webpack_require__(320); /** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */ @@ -139676,7 +140196,7 @@ function elementAt(index, defaultValue) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = endWith; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_fromArray__ = __webpack_require__(85); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(313); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(187); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); @@ -140104,10 +140624,10 @@ function findIndex(predicate, thisArg) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = first; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(153); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__take__ = __webpack_require__(319); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(146); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__take__ = __webpack_require__(320); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultIfEmpty__ = __webpack_require__(147); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__throwIfEmpty__ = __webpack_require__(189); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -140209,11 +140729,11 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = last; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(153); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__takeLast__ = __webpack_require__(320); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_EmptyError__ = __webpack_require__(154); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__takeLast__ = __webpack_require__(321); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__throwIfEmpty__ = __webpack_require__(189); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__defaultIfEmpty__ = __webpack_require__(146); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__defaultIfEmpty__ = __webpack_require__(147); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -140359,7 +140879,7 @@ function merge() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = mergeMapTo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(148); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(149); /** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */ function mergeMapTo(innerObservable, resultSelector, concurrent) { @@ -140648,7 +141168,7 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = partition; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_not__ = __webpack_require__(931); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(147); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__filter__ = __webpack_require__(148); /** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */ @@ -140761,7 +141281,7 @@ function publishLast() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = publishReplay; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(308); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(309); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__multicast__ = __webpack_require__(117); /** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */ @@ -141353,7 +141873,7 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = share; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__multicast__ = __webpack_require__(117); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__refCount__ = __webpack_require__(316); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__refCount__ = __webpack_require__(317); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subject__ = __webpack_require__(36); /** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */ @@ -141374,7 +141894,7 @@ function share() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = shareReplay; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(308); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ReplaySubject__ = __webpack_require__(309); /** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */ function shareReplay(bufferSize, windowTime, scheduler) { @@ -141430,7 +141950,7 @@ function shareReplayOperator(bufferSize, windowTime, scheduler) { /* harmony export (immutable) */ __webpack_exports__["a"] = single; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_EmptyError__ = __webpack_require__(153); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_EmptyError__ = __webpack_require__(154); /** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */ @@ -141550,7 +142070,7 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) { /* harmony export (immutable) */ __webpack_exports__["a"] = skipLast; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(152); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(153); /** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */ @@ -141721,7 +142241,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = startWith; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_fromArray__ = __webpack_require__(85); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(312); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_scalar__ = __webpack_require__(313); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_empty__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_concat__ = __webpack_require__(187); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isScheduler__ = __webpack_require__(49); @@ -141795,7 +142315,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = switchAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(319); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(119); /** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */ @@ -141812,7 +142332,7 @@ function switchAll() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = switchMapTo; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__switchMap__ = __webpack_require__(319); /** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */ function switchMapTo(innerObservable, resultSelector) { @@ -142028,8 +142548,8 @@ function dispatchNext(arg) { /* harmony export (immutable) */ __webpack_exports__["a"] = timeInterval; /* unused harmony export TimeInterval */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scan__ = __webpack_require__(317); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_defer__ = __webpack_require__(310); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scan__ = __webpack_require__(318); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_defer__ = __webpack_require__(311); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__map__ = __webpack_require__(47); /** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */ @@ -142072,7 +142592,7 @@ var TimeInterval = /*@__PURE__*/ (function () { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scheduler_async__ = __webpack_require__(40); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_TimeoutError__ = __webpack_require__(440); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__timeoutWith__ = __webpack_require__(437); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_throwError__ = __webpack_require__(313); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_throwError__ = __webpack_require__(314); /** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */ @@ -142818,7 +143338,7 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = zip; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(314); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(315); /** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */ function zip() { @@ -142839,7 +143359,7 @@ function zip() { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = zipAll; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(314); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_zip__ = __webpack_require__(315); /** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */ function zipAll(project) { @@ -142883,7 +143403,7 @@ var Action = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationFrameAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(149); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(150); /** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */ @@ -142931,7 +143451,7 @@ var AnimationFrameAction = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AnimationFrameScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */ @@ -142975,7 +143495,7 @@ var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsapAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_Immediate__ = __webpack_require__(927); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncAction__ = __webpack_require__(149); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncAction__ = __webpack_require__(150); /** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */ @@ -143024,7 +143544,7 @@ var AsapAction = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsapScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */ @@ -143067,7 +143587,7 @@ var AsapScheduler = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return QueueAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(149); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(150); /** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */ @@ -143118,7 +143638,7 @@ var QueueAction = /*@__PURE__*/ (function (_super) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return QueueScheduler; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */ @@ -143141,8 +143661,8 @@ var QueueScheduler = /*@__PURE__*/ (function (_super) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VirtualTimeScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return VirtualAction; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(149); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncScheduler__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncAction__ = __webpack_require__(150); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__AsyncScheduler__ = __webpack_require__(151); /** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */ @@ -143318,7 +143838,7 @@ function isInteropObservable(input) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = isIterable; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(151); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(152); /** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */ function isIterable(input) { @@ -143367,7 +143887,7 @@ function not(pred, thisArg) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = toSubscriber; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__ = __webpack_require__(321); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__symbol_rxSubscriber__ = __webpack_require__(322); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(420); /** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */ @@ -144157,17 +144677,17 @@ module.exports = { }; var assert = __webpack_require__(16); -var SSHBuffer = __webpack_require__(159); +var SSHBuffer = __webpack_require__(160); var crypto = __webpack_require__(11); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var rfc4253 = __webpack_require__(103); var Signature = __webpack_require__(75); var utils = __webpack_require__(26); -var Certificate = __webpack_require__(155); +var Certificate = __webpack_require__(156); function verify(cert, key) { /* @@ -144487,12 +145007,12 @@ var asn1 = __webpack_require__(66); var Buffer = __webpack_require__(15).Buffer; var algs = __webpack_require__(32); var utils = __webpack_require__(26); -var Key = __webpack_require__(27); +var Key = __webpack_require__(28); var PrivateKey = __webpack_require__(33); var pem = __webpack_require__(86); -var Identity = __webpack_require__(158); +var Identity = __webpack_require__(159); var Signature = __webpack_require__(75); -var Certificate = __webpack_require__(155); +var Certificate = __webpack_require__(156); function read(buf, options) { if (typeof (buf) !== 'string') { @@ -145359,7 +145879,7 @@ function deprecated(source, name) { var Promise = __webpack_require__(339) -var assert = __webpack_require__(28) +var assert = __webpack_require__(29) module.exports = thenify @@ -146182,9 +146702,9 @@ var net = __webpack_require__(164) , http = __webpack_require__(87) , https = __webpack_require__(196) , events = __webpack_require__(77) - , assert = __webpack_require__(28) + , assert = __webpack_require__(29) , util = __webpack_require__(3) - , Buffer = __webpack_require__(45).Buffer + , Buffer = __webpack_require__(46).Buffer ; exports.httpOverHttp = httpOverHttp @@ -147140,7 +147660,7 @@ WError.prototype.cause = function we_cause(c) * extsprintf.js: extended POSIX-style sprintf */ -var mod_assert = __webpack_require__(28); +var mod_assert = __webpack_require__(29); var mod_util = __webpack_require__(3); /* diff --git a/.yarnrc b/.yarnrc index c2acf2d321..8e395ab893 100644 --- a/.yarnrc +++ b/.yarnrc @@ -3,4 +3,4 @@ lastUpdateCheck 1628516485956 -yarn-path ".yarn/releases/yarn-1.22.19.cjs" +yarn-path ".yarn/releases/yarn-1.22.22.cjs" diff --git a/CODEOWNERS b/CODEOWNERS index 7ec621e0df..4e752f38c6 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,8 +11,8 @@ # Packages # /packages/spec-haskell/ @hellwolf -/packages/ethereum-contracts/ @hellwolf @0xdavinchee -/packages/metadata @hellwolf @d10r @ngmachado @0xdavinchee @kasparkallas @vmichalik @philipandersson +/packages/ethereum-contracts/ @hellwolf @0xdavinchee @d10r +/packages/metadata @hellwolf @d10r @ngmachado @0xdavinchee @kasparkallas @vmichalik /packages/js-sdk/ @hellwolf @kasparkallas @0xdavinchee /packages/subgraph/ @0xdavinchee @kasparkallas @hellwolf /packages/sdk-core/ @0xdavinchee @kasparkallas @hellwolf diff --git a/README.md b/README.md index c55fc4f721..d7a2a27f42 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -

Welcome to superfluid protocol-monorepo 👋

+
+

Welcome to superfluid protocol-monorepo 👋

@@ -27,6 +28,7 @@

+
> Contracts and resources for the Superfluid Protocol @@ -165,7 +167,7 @@ Thanks goes to these wonderful people ([🐸](https://allcontributors.org/docs/e - + diff --git a/default.nix b/default.nix new file mode 100644 index 0000000000..2403bf9a78 --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +{ + halfBoardModule = { + includedFiles = [ + # development tooling defined in nix + ./flake.nix + ./flake.lock + # managing the npm dependencies with yarna + ./package.json + ./.yarnrc + ./yarn.lock + ]; + }; +} diff --git a/flake.lock b/flake.lock index aa88fc48ec..6c8994fd15 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -28,11 +28,11 @@ ] }, "locked": { - "lastModified": 1705309865, - "narHash": "sha256-HkTSsjmR3DE1xKr1M0bBWKyTl4f616166Przd2mwNxw=", + "lastModified": 1722676286, + "narHash": "sha256-wEDJdvwRZF2ErQ33nQ0Lqn/48XrPbaadv56/bM2MSZU=", "owner": "shazow", "repo": "foundry.nix", - "rev": "883243b30a4b8dbb1b515b79b750e2caf7df1a79", + "rev": "d84c83b1c1722c8742b3d2d84c9386814d75384e", "type": "github" }, "original": { @@ -42,13 +42,37 @@ "type": "github" } }, + "mk-cache-key": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1718047354, + "narHash": "sha256-WGlodS+Ju1rH5CNuDeNDuRMEXAk4A3IZIimIGNMdoxk=", + "owner": "hellwolf", + "repo": "mk-cache-key.nix", + "rev": "82f25a577f25fcb9eed94b3a04330ccf4a102cba", + "type": "github" + }, + "original": { + "owner": "hellwolf", + "ref": "master", + "repo": "mk-cache-key.nix", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1705883077, - "narHash": "sha256-ByzHHX3KxpU1+V0erFy8jpujTufimh6KaS/Iv3AciHk=", + "lastModified": 1723019560, + "narHash": "sha256-O/kxmybNecC3Efr6ITOdtCzFv90/B2Iiedavj5aRWt0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5f5210aa20e343b7e35f40c033000db0ef80d7b9", + "rev": "f5129fb42b9c262318130a97b47516946da3e7d7", "type": "github" }, "original": { @@ -62,6 +86,7 @@ "inputs": { "flake-utils": "flake-utils", "foundry": "foundry", + "mk-cache-key": "mk-cache-key", "nixpkgs": "nixpkgs", "solc": "solc" } @@ -73,14 +98,15 @@ ], "nixpkgs": [ "nixpkgs" - ] + ], + "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1700417764, - "narHash": "sha256-ssdwqKWkYUd/Nr6P9veR4D/PrtlwGJkPoUQoEgVJVpo=", + "lastModified": 1723108822, + "narHash": "sha256-0SToQBucC4haDvgiG+JyL566ylCLl8s3SKaBT9m/nVo=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "80d2e38e98e589872b0dc3770f838c4be847305e", + "rev": "d1f30906719dfcbd69a90996aa98d8e5322e5705", "type": "github" }, "original": { @@ -89,6 +115,18 @@ "type": "github" } }, + "solc-macos-amd64-list-json": { + "flake": false, + "locked": { + "narHash": "sha256-Prwz95BgMHcWd72VwVbcH17LsV9f24K2QMcUiWUQZzI=", + "type": "file", + "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + }, + "original": { + "type": "file", + "url": "https://github.com/ethereum/solc-bin/raw/f743ca7/macosx-amd64/list.json" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 892465c130..79fd972816 100644 --- a/flake.nix +++ b/flake.nix @@ -14,15 +14,20 @@ inputs.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; }; + mk-cache-key = { + url = "github:hellwolf/mk-cache-key.nix/master"; + inputs.flake-utils.follows = "flake-utils"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, flake-utils, foundry, solc } : + outputs = { self, nixpkgs, flake-utils, foundry, solc, mk-cache-key } : flake-utils.lib.eachDefaultSystem (system: let minDevSolcVer = "solc_0_8_11"; # minimum solidity version used for external development - solcVer = "solc_0_8_19"; + solcVer = "solc_0_8_26"; ghcVer92 = "ghc928"; - ghcVer94 = "ghc945"; + ghcVer94 = "ghc948"; pkgs = import nixpkgs { inherit system; @@ -32,17 +37,21 @@ ]; }; + mk-cache-key-pkg = mk-cache-key.packages.${system}.default; + # ghc ecosystem ghc = pkgs.haskell.compiler.${ghcVer94}; ghcPkgs = pkgs.haskell.packages.${ghcVer94}; # common dev inputs commonDevInputs = with pkgs; [ + mk-cache-key-pkg gnumake # for shell script linting shellcheck # used by some scripts jq + yq # test utilities lcov actionlint @@ -64,9 +73,17 @@ ]; node18DevInputs = nodeDevInputsWith pkgs.nodejs_18; node20DevInputs = nodeDevInputsWith pkgs.nodejs_20; + node22DevInputs = nodeDevInputsWith pkgs.nodejs_22; + defaultNodeDevInputs = node22DevInputs; + + # CI inputs + ciInputs = with pkgs; [ + # codecov requries gnupg binary + gnupg + ]; # minimem development shell - minimumDevInputs = commonDevInputs ++ ethDevInputs ++ node18DevInputs; + minimumDevInputs = commonDevInputs ++ ethDevInputs ++ defaultNodeDevInputs; # additional tooling for whitehat hackers whitehatInputs = with pkgs; [ @@ -85,7 +102,7 @@ hlint stylish-haskell # sage math - # sage # TODO: https://github.com/NixOS/nixpkgs/issues/282383#issuecomment-1902660815 + sage # testing tooling gnuplot # yellowpaper pipeline tooling @@ -103,10 +120,13 @@ # mkShell wrapper, to expose additional environment variables mkShell = o : pkgs.mkShell ({ SOLC = pkgs.lib.getExe pkgs.${solcVer}; + FOUNDRY_OFFLINE = "true"; + FOUNDRY_SOLC_VERSION = pkgs.lib.getExe pkgs.${solcVer}; } // o); - - # ci-spec-with-ghc - ci-spec-with-ghc = ghcVer : mkShell { + mkShellForNodeCI = nodeDevInputs : mkShell { + buildInputs = ciInputs ++ commonDevInputs ++ ethDevInputs ++ nodeDevInputs; + }; + mkShellForSpecCI = ghcVer : mkShell { buildInputs = with pkgs; [ cabal-install haskell.compiler.${ghcVer} @@ -131,17 +151,26 @@ ++ whitehatInputs ++ specInputs; }; + # CI shells - devShells.ci-node18 = mkShell { - buildInputs = commonDevInputs ++ ethDevInputs ++ node18DevInputs; + devShells.mk-cache-key = mkShell { + buildInputs = [ mk-cache-key-pkg ]; }; - devShells.ci-node20 = mkShell { - buildInputs = commonDevInputs ++ ethDevInputs ++ node20DevInputs; + + devShells.ci-minimum = mkShell { + buildInputs = with pkgs; ciInputs ++ [ actionlint shellcheck ]; }; - devShells.ci-spec-ghc92 = ci-spec-with-ghc ghcVer92; - devShells.ci-spec-ghc94 = ci-spec-with-ghc ghcVer94; + + devShells.ci-default = mkShellForNodeCI defaultNodeDevInputs; + devShells.ci-node18 = mkShellForNodeCI node18DevInputs; + devShells.ci-node20 = mkShellForNodeCI node20DevInputs; + devShells.ci-node22 = mkShellForNodeCI node22DevInputs; + + devShells.ci-spec-ghc92 = mkShellForSpecCI ghcVer92; + devShells.ci-spec-ghc94 = mkShellForSpecCI ghcVer94; + devShells.ci-hot-fuzz = mkShell { - buildInputs = with pkgs; commonDevInputs ++ ethDevInputs ++ [ + buildInputs = with pkgs; ciInputs ++ commonDevInputs ++ ethDevInputs ++ [ slither-analyzer echidna ]; diff --git a/funding.json b/funding.json new file mode 100644 index 0000000000..e1ffac1bcb --- /dev/null +++ b/funding.json @@ -0,0 +1,5 @@ +{ + "opRetro": { + "projectId": "0x3ecbf66c1b21342b26acb0f7d4c6b8bbbef168ffafff3f425de3503fd8dfa535" + } +} diff --git a/lib/forge-std b/lib/forge-std index f73c73d201..07263d193d 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit f73c73d2018eb6a111f35e4dae7b4f27401e9421 +Subproject commit 07263d193d621c4b2b0ce8b4d54af58f6957d97d diff --git a/package.json b/package.json index facf1010fd..b2305f51f9 100644 --- a/package.json +++ b/package.json @@ -1,82 +1,88 @@ { "name": "@superfluid-finance/protocol-monorepo", "description": "Superfluid Protocol monorepo", - "repository": { - "type": "git", - "url": "github:superfluid-finance/protocol-monorepo" - }, - "private": true, - "npmClient": "yarn", - "license": "MIT", - "scripts": { - "prepare": "yarn git:submodule:init", - "git:submodule:init": "git submodule update --init --recursive", - "git:submodule:update": "git submodule update --recursive", - "git:submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive", - "git:submodule:deinit": "git submodule deinit --all --force", - "lint": "run-s lint:*", - "lint:shellcheck": "tasks/shellcheck-all-tasks.sh", - "lint:workspaces": "yarn workspaces run lint", - "lint:actionlint": "actionlint .github/workflows/*.yml", - "build": "yarn build-essentials #synonym of build-essentials", - "build-essentials": "set -ex;for i in metadata ethereum-contracts js-sdk sdk-core sdk-redux;do yarn workspace @superfluid-finance/$i build;done", - "build-for-contracts-dev": "set -ex;for i in metadata ethereum-contracts js-sdk;do yarn workspace @superfluid-finance/$i build;done", - "clean": "rm -rf node_modules; rm -rf packages/*/node_modules; yarn workspace @superfluid-finance/ethereum-contracts clean", - "test": "set -ex;for i in ethereum-contracts;do yarn workspace @superfluid-finance/$i test;done", - "manage-versions": "lerna version --exact --no-git-tag-version --preid rc", - "check-updates": "run-s check-updates:*", - "check-updates:root": "ncu --target minor --dep dev -u", - "check-updates:workspaces": "yarn workspaces run check-updates -u", - "show-versions": "lerna ls --long", - "postinstall": "husky install", - "pre-commit": "yarn lint:shellcheck && yarn workspaces run pre-commit", - "shell": "nix develop", - "shell:spec": "nix develop .#spec", - "shell:whitehat": "nix develop .#whitehat", - "shell:full": "nix develop .#full" - }, + "version": "0.0.0", "devDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", - "@nomiclabs/hardhat-ethers": "^2.2.3", + "@nomicfoundation/hardhat-ethers": "^3.0.7", "@nomiclabs/hardhat-etherscan": "^3.1.7", "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin/test-helpers": "^0.5.16", "@truffle/hdwallet-provider": "^2.1.15", "@typechain/ethers-v5": "^11.1.2", - "@typechain/hardhat": "^8.0.3", - "@types/lodash": "^4.14.202", - "@types/mocha": "^10.0.6", - "@typescript-eslint/eslint-plugin": "^6.18.1", - "@typescript-eslint/parser": "^6.18.1", + "@typechain/hardhat": "^9.1.0", + "@types/lodash": "^4.17.7", + "@types/mocha": "^10.0.7", + "@typescript-eslint/eslint-plugin": "^8.3.0", + "@typescript-eslint/parser": "^8.3.0", "cloc": "^2.11.0", "copyfiles": "^2.4.1", - "dotenv": "^16.3.1", - "eslint": "^8.56.0", + "dotenv": "^16.4.5", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-prettier": "^5.1.2", - "hardhat": "^2.19.4", - "hardhat-deploy": "^0.11.37", - "husky": "^8.0.3", - "lerna": "^7.3.0", - "node-jq": "^4.2.2", - "nodemon": "^3.0.2", + "eslint-plugin-prettier": "^5.2.1", + "hardhat": "^2.22.9", + "hardhat-deploy": "^0.12.4", + "husky": "^9.1.5", + "lerna": "^8.1.8", + "node-jq": "^6.0.1", + "nodemon": "^3.1.4", "npm-run-all": "^4.1.5", - "nyc": "^15.1.0", - "prettier": "^3.1.1", - "prettier-eslint": "^15.0.1", - "solhint": "3.6.2", - "syncpack": "^10.9.3", + "nyc": "^17.0.0", + "prettier": "^3.3.3", + "prettier-eslint": "^16.3.0", + "solhint": "^5.0.3", + "syncpack": "^13.0.0", "truffle": "^5.11.5", "ts-node": "^10.9.2", "typechain": "^8.3.2", - "typedoc": "^0.25.6", - "typescript": "^5.3.3", - "web3": "^1.10.2" + "typedoc": "^0.26.6", + "typescript": "^5.5.4", + "web3": "^1.10.4" }, + "license": "MIT", + "npmClient": "yarn", + "private": true, + "repository": "github:superfluid-finance/protocol-monorepo", "resolutions": { - "mocha": "^10.2.0" + "cross-fetch": "^4.0.0" + }, + "scripts": { + "prepare": "husky && npm run git-submodule:init", + "lint": "run-s -l lint:*", + "lint:syncpack": "syncpack lint", + "lint:shellcheck": "tasks/shellcheck-all-tasks.sh", + "lint:actionlint": "actionlint .github/workflows/*.yml", + "lint:workspaces": "yarn workspaces run lint", + "build": "npm run build-essentials #synonym of build-essentials", + "build-essentials": "run-s -l build-essentials:*", + "build-essentials:metadata": "yarn workspace @superfluid-finance/metadata build", + "build-essentials:solidity-semantic-money": "yarn workspace @superfluid-finance/solidity-semantic-money build", + "build-essentials:ethereum-contracts": "yarn workspace @superfluid-finance/ethereum-contracts build", + "build-essentials:js-sdk": "yarn workspace @superfluid-finance/js-sdk build", + "build-essentials:sdk-core": "yarn workspace @superfluid-finance/sdk-core build", + "build-essentials:sdk-redux": "yarn workspace @superfluid-finance/sdk-redux build", + "build-for-contracts-dev": "run-s -l build-for-contracts-dev:*", + "build-for-contracts-dev:metadata": "yarn workspace @superfluid-finance/metadata build", + "build-for-contracts-dev:ethereum-contracts": "yarn workspace @superfluid-finance/ethereum-contracts build", + "build-for-contracts-dev:js-sdk": "yarn workspace @superfluid-finance/js-sdk build", + "clean": "rm -rf node_modules; rm -rf packages/*/node_modules; yarn workspace @superfluid-finance/ethereum-contracts clean", + "test": "set -ex;for i in ethereum-contracts;do yarn workspace @superfluid-finance/$i test;done", + "show-versions": "lerna ls --long", + "git-submodule:init": "git submodule update --init --recursive", + "git-submodule:update": "git submodule update --recursive", + "git-submodule:sync": "git submodule update --remote --recursive;git submodule sync --recursive", + "git-submodule:deinit": "git submodule deinit --all --force", + "check-updates": "run-s -l check-updates:*", + "check-updates:root": "ncu --target minor --dep dev", + "check-updates:workspaces": "yarn workspaces run check-updates", + "shell": "nix develop", + "shell:spec": "nix develop .#spec", + "shell:whitehat": "nix develop .#whitehat", + "shell:full": "nix develop .#full", + "manage-versions": "lerna version --no-git-tag-version --preid rc" }, "workspaces": { "packages": [ @@ -95,6 +101,5 @@ "**/webpack", "**/webpack/**" ] - }, - "version": "0.0.0" + } } diff --git a/packages/automation-contracts/autowrap/.env-example b/packages/automation-contracts/autowrap/.env-example deleted file mode 100644 index 78050eaeb6..0000000000 --- a/packages/automation-contracts/autowrap/.env-example +++ /dev/null @@ -1,13 +0,0 @@ -# .env-example - -GOERLI_PRIVATE_KEY= -MUMBAI_PRIVATE_KEY= -POLYGON_PRIVATE_KEY= -BSC_PRIVATE_KEY= - -GOERLI_URL= -MUMBAI_URL= -POLYGON_URL= -BSC_URL= - -ETHERSCAN_API_KEY = diff --git a/packages/automation-contracts/autowrap/.env.example b/packages/automation-contracts/autowrap/.env.example new file mode 100644 index 0000000000..6caf6fef41 --- /dev/null +++ b/packages/automation-contracts/autowrap/.env.example @@ -0,0 +1,11 @@ +# .env-example + +PRIVATE_KEY= + +MUMBAI_URL= +POLYGON_URL= +BSC_URL= +OPSEPOLIA_URL= +BASE_URL=https://mainnet.base.org + +ETHERSCAN_API_KEY= \ No newline at end of file diff --git a/packages/automation-contracts/autowrap/README.md b/packages/automation-contracts/autowrap/README.md index 6e9485b871..dc05add73d 100644 --- a/packages/automation-contracts/autowrap/README.md +++ b/packages/automation-contracts/autowrap/README.md @@ -20,8 +20,6 @@ When your Super Token balance reaches a certain lower threshold, Auto Wrap steps PRIVATE_KEY= -GOERLI_PRIVATE_KEY= -MUMBAI_PRIVATE_KEY= POLYGON_PRIVATE_KEY= BSC_PRIVATE_KEY= @@ -59,8 +57,7 @@ npx hardhat addStrategy --manager --strategy #### Testnets | | FlowScheduler | VestingScheduler | |----------|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------| -| Goerli | [0xA6134E107FCAEAab6140CB8fb92Dbf5bd9EF6C86](https://goerli.etherscan.io/address/0xA6134E107FCAEAab6140CB8fb92Dbf5bd9EF6C86#code) | [0xb61f8A2CbBd1be5FE437509b51dc2B9BA710c47b](https://goerli.etherscan.io/address/0xb61f8A2CbBd1be5FE437509b51dc2B9BA710c47b#code) | -| Mumbai | [0xF18825d412C061aEfEFB4dF46a1c077636dA50bf](https://mumbai.polygonscan.com/address/0xF18825d412C061aEfEFB4dF46a1c077636dA50bf#code) | [0xD4fCe2a08fd2fA7495BEd900F2fb6c6deDBf8632](https://mumbai.polygonscan.com/address/0xD4fCe2a08fd2fA7495BEd900F2fb6c6deDBf8632#code) | +| OP Sepolia | [0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68](https://sepolia-optimism.etherscan.io/address/0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68) | [0x27444c0235a4D921F3106475faeba0B5e7ABDD7a](https://sepolia-optimism.etherscan.io/address/0x27444c0235a4D921F3106475faeba0B5e7ABDD7a) | #### Mainnets | | FlowScheduler | VestingScheduler | diff --git a/packages/automation-contracts/scheduler/audit/generate_diffs.sh b/packages/automation-contracts/scheduler/audit/generate_diffs.sh new file mode 100755 index 0000000000..e257ba3be9 --- /dev/null +++ b/packages/automation-contracts/scheduler/audit/generate_diffs.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +git diff -U9999 --no-index --minimal --ignore-cr-at-eol --ignore-space-at-eol ./../contracts/interface/IVestingScheduler.sol ./../contracts/interface/IVestingSchedulerV2.sol > diff_IVestingScheduler_vs_IVestingSchedulerV2.txt +git diff -U9999 --no-index --minimal --ignore-cr-at-eol --ignore-space-at-eol ./../contracts/VestingScheduler.sol ./../contracts/VestingSchedulerV2.sol > diff_VestingScheduler_vs_VestingSchedulerV2.txt \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol b/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol index 2f7cf24435..263a967ccd 100644 --- a/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/FlowScheduler.sol @@ -19,7 +19,7 @@ contract FlowScheduler is IFlowScheduler, SuperAppBase { using CFAv1Library for CFAv1Library.InitData; CFAv1Library.InitData public cfaV1; //initialize cfaV1 variable - constructor(ISuperfluid host, string memory registrationKey) { + constructor(ISuperfluid host) { // Initialize CFA Library cfaV1 = CFAv1Library.InitData( host, @@ -40,7 +40,7 @@ contract FlowScheduler is IFlowScheduler, SuperAppBase { SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP | SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; - host.registerAppWithKey(configWord, registrationKey); + host.registerApp(configWord); } /// @dev IFlowScheduler.createFlowSchedule implementation. diff --git a/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol b/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol index 5bb4ee2e5f..9f6fd0c6c9 100644 --- a/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/VestingScheduler.sol @@ -18,7 +18,7 @@ contract VestingScheduler is IVestingScheduler, SuperAppBase { uint32 public constant START_DATE_VALID_AFTER = 3 days; uint32 public constant END_DATE_VALID_BEFORE = 1 days; - constructor(ISuperfluid host, string memory registrationKey) { + constructor(ISuperfluid host) { cfaV1 = CFAv1Library.InitData( host, IConstantFlowAgreementV1( @@ -37,7 +37,7 @@ contract VestingScheduler is IVestingScheduler, SuperAppBase { SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP | SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; - host.registerAppWithKey(configWord, registrationKey); + host.registerApp(configWord); } /// @dev IVestingScheduler.createVestingSchedule implementation. @@ -254,4 +254,4 @@ contract VestingScheduler is IVestingScheduler, SuperAppBase { (,int96 flowRate,,) = cfaV1.cfa.getFlow(superToken, sender, receiver); return flowRate != 0; } -} +} \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol b/packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol new file mode 100644 index 0000000000..8163826012 --- /dev/null +++ b/packages/automation-contracts/scheduler/contracts/VestingSchedulerV2.sol @@ -0,0 +1,718 @@ +// SPDX-License-Identifier: AGPLv3 +// solhint-disable not-rely-on-time +pragma solidity ^0.8.0; +import { + ISuperfluid, ISuperToken, SuperAppDefinitions, IConstantFlowAgreementV1 +} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; +import { SuperAppBase } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperAppBase.sol"; +import { CFAv1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/CFAv1Library.sol"; +import { IVestingSchedulerV2 } from "./interface/IVestingSchedulerV2.sol"; +import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; +import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; + +contract VestingSchedulerV2 is IVestingSchedulerV2, SuperAppBase { + using CFAv1Library for CFAv1Library.InitData; + CFAv1Library.InitData public cfaV1; + mapping(bytes32 => VestingSchedule) public vestingSchedules; // id = keccak(supertoken, sender, receiver) + + uint32 public constant MIN_VESTING_DURATION = 7 days; + uint32 public constant START_DATE_VALID_AFTER = 3 days; + uint32 public constant END_DATE_VALID_BEFORE = 1 days; + + struct ScheduleAggregate { + ISuperToken superToken; + address sender; + address receiver; + bytes32 id; + VestingSchedule schedule; + } + + constructor(ISuperfluid host) { + cfaV1 = CFAv1Library.InitData( + host, + IConstantFlowAgreementV1( + address( + host.getAgreementClass( + keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1") + ) + ) + ) + ); + // Superfluid SuperApp registration. This is a dumb SuperApp, only for front-end tx batch calls. + uint256 configWord = SuperAppDefinitions.APP_LEVEL_FINAL | + SuperAppDefinitions.BEFORE_AGREEMENT_CREATED_NOOP | + SuperAppDefinitions.AFTER_AGREEMENT_CREATED_NOOP | + SuperAppDefinitions.BEFORE_AGREEMENT_UPDATED_NOOP | + SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP | + SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | + SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; + host.registerApp(configWord); + } + + /// @dev IVestingScheduler.createVestingSchedule implementation. + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: _normalizeStartDate(startDate), + claimValidityDate: claimValidityDate, + cliffDate: cliffDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: 0 + }) + ); + } + + /// @dev IVestingScheduler.createVestingSchedule implementation. + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate + ) external { + _validateAndCreateVestingSchedule( + ScheduleCreationParams({ + superToken: superToken, + sender: msg.sender, + receiver: receiver, + startDate: _normalizeStartDate(startDate), + claimValidityDate: claimValidityDate, + cliffDate: cliffDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: 0 + }) + ); + } + + /// @dev IVestingScheduler.createVestingSchedule implementation. + /// @dev Note: VestingScheduler (V1) compatible function + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: _normalizeStartDate(startDate), + claimValidityDate: 0, + cliffDate: cliffDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: 0 + }) + ); + } + + /// @dev IVestingScheduler.createVestingScheduleFromAmountAndDuration implementation. + /// @dev Note: creating from amount and duration is the preferred way + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + mapCreateVestingScheduleParams( + superToken, + sender, + receiver, + totalAmount, + totalDuration, + _normalizeStartDate(startDate), + cliffPeriod, + claimPeriod + ) + ); + } + + /// @dev IVestingScheduler.createVestingScheduleFromAmountAndDuration implementation. + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) external { + _validateAndCreateVestingSchedule( + mapCreateVestingScheduleParams( + superToken, + msg.sender, + receiver, + totalAmount, + totalDuration, + _normalizeStartDate(startDate), + cliffPeriod, + claimPeriod + ) + ); + } + + /// @dev IVestingScheduler.mapCreateVestingScheduleParams implementation. + function mapCreateVestingScheduleParams( + ISuperToken superToken, + address sender, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) public pure override returns (ScheduleCreationParams memory params) { + uint32 claimValidityDate = claimPeriod != 0 + ? startDate + claimPeriod + : 0; + + uint32 endDate = startDate + totalDuration; + int96 flowRate = SafeCast.toInt96( + SafeCast.toInt256(totalAmount / totalDuration) + ); + uint96 remainderAmount = SafeCast.toUint96( + totalAmount - (SafeCast.toUint256(flowRate) * totalDuration) + ); + + if (cliffPeriod == 0) { + params = ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: startDate, + claimValidityDate: claimValidityDate, + cliffDate: 0, + flowRate: flowRate, + cliffAmount: 0, + endDate: endDate, + remainderAmount: remainderAmount + }); + } else { + uint256 cliffAmount = SafeMath.mul( + cliffPeriod, + SafeCast.toUint256(flowRate) + ); + params = ScheduleCreationParams({ + superToken: superToken, + sender: sender, + receiver: receiver, + startDate: startDate, + claimValidityDate: claimValidityDate, + cliffDate: startDate + cliffPeriod, + flowRate: flowRate, + cliffAmount: cliffAmount, + endDate: endDate, + remainderAmount: remainderAmount + }); + } + } + + function _validateAndCreateVestingSchedule( + ScheduleCreationParams memory params + ) private { + // Note: Vesting Scheduler V2 doesn't allow start date to be in the past. + // V1 did but didn't allow cliff and flow to be in the past though. + if (params.startDate < block.timestamp) revert TimeWindowInvalid(); + if (params.endDate <= END_DATE_VALID_BEFORE) revert TimeWindowInvalid(); + + if (params.receiver == address(0) || params.receiver == params.sender) revert AccountInvalid(); + if (address(params.superToken) == address(0)) revert ZeroAddress(); + if (params.flowRate <= 0) revert FlowRateInvalid(); + if (params.cliffDate != 0 && params.startDate > params.cliffDate) revert TimeWindowInvalid(); + if (params.cliffDate == 0 && params.cliffAmount != 0) revert CliffInvalid(); + + uint32 cliffAndFlowDate = params.cliffDate == 0 ? params.startDate : params.cliffDate; + // Note: Vesting Scheduler V2 allows cliff and flow to be in the schedule creation block, V1 didn't. + if (cliffAndFlowDate < block.timestamp || + cliffAndFlowDate >= params.endDate || + cliffAndFlowDate + START_DATE_VALID_AFTER >= params.endDate - END_DATE_VALID_BEFORE || + params.endDate - cliffAndFlowDate < MIN_VESTING_DURATION + ) revert TimeWindowInvalid(); + + // Note : claimable schedule created with a claim validity date equal to 0 is considered regular schedule + if (params.claimValidityDate != 0 && params.claimValidityDate < cliffAndFlowDate) + revert TimeWindowInvalid(); + + bytes32 id = _getId(address(params.superToken), params.sender, params.receiver); + if (vestingSchedules[id].endDate != 0) revert ScheduleAlreadyExists(); + + vestingSchedules[id] = VestingSchedule({ + cliffAndFlowDate: cliffAndFlowDate, + endDate: params.endDate, + flowRate: params.flowRate, + cliffAmount: params.cliffAmount, + remainderAmount: params.remainderAmount, + claimValidityDate: params.claimValidityDate + }); + + emit VestingScheduleCreated( + params.superToken, + params.sender, + params.receiver, + params.startDate, + params.cliffDate, + params.flowRate, + params.endDate, + params.cliffAmount, + params.claimValidityDate, + params.remainderAmount + ); + } + + /// @dev IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = _validateAndCreateAndExecuteVestingScheduleFromAmountAndDuration( + superToken, + receiver, + totalAmount, + totalDuration, + ctx + ); + } + + /// @dev IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration + ) external { + _validateAndCreateAndExecuteVestingScheduleFromAmountAndDuration( + superToken, + receiver, + totalAmount, + totalDuration, + bytes("") + ); + } + + /// @dev IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + function _validateAndCreateAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + bytes memory ctx + ) private returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + + _validateAndCreateVestingSchedule( + mapCreateVestingScheduleParams( + superToken, + sender, + receiver, + totalAmount, + totalDuration, + _normalizeStartDate(0), + 0, // cliffPeriod + 0 // claimValidityDate + ) + ); + + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + + _validateBeforeCliffAndFlow(agg.schedule, /* disableClaimCheck: */ false); + assert(_executeCliffAndFlow(agg)); + } + + /// @dev IVestingScheduler.updateVestingSchedule implementation. + function updateVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 endDate, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + if (endDate <= block.timestamp) revert TimeWindowInvalid(); + + // Note: Claimable schedules that have not been claimed cannot be updated + + // Only allow an update if 1. vesting exists 2. executeCliffAndFlow() has been called + if (schedule.cliffAndFlowDate != 0 || schedule.endDate == 0) revert ScheduleNotFlowing(); + + vestingSchedules[agg.id].endDate = endDate; + // Note: Nullify the remainder amount when complexity of updates is introduced. + vestingSchedules[agg.id].remainderAmount = 0; + + emit VestingScheduleUpdated( + superToken, + sender, + receiver, + schedule.endDate, + endDate, + 0 // remainderAmount + ); + } + + /// @dev IVestingScheduler.deleteVestingSchedule implementation. + function deleteVestingSchedule( + ISuperToken superToken, + address receiver, + bytes memory ctx + ) external returns (bytes memory newCtx) { + newCtx = ctx; + address sender = _getSender(ctx); + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + if (schedule.endDate != 0) { + delete vestingSchedules[agg.id]; + emit VestingScheduleDeleted(superToken, sender, receiver); + } else { + revert ScheduleDoesNotExist(); + } + } + + /// @dev IVestingScheduler.executeCliffAndFlow implementation. + function executeCliffAndFlow( + ISuperToken superToken, + address sender, + address receiver + ) external returns (bool success) { + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + if (schedule.claimValidityDate != 0) { + _validateAndClaim(agg); + _validateBeforeCliffAndFlow(schedule, /* disableClaimCheck: */ true); + if (block.timestamp >= _gteDateToExecuteEndVesting(schedule)) { + _validateBeforeEndVesting(schedule, /* disableClaimCheck: */ true); + success = _executeVestingAsSingleTransfer(agg); + } else { + success = _executeCliffAndFlow(agg); + } + } else { + _validateBeforeCliffAndFlow(schedule, /* disableClaimCheck: */ false); + success = _executeCliffAndFlow(agg); + } + } + + function _validateBeforeCliffAndFlow( + VestingSchedule memory schedule, + bool disableClaimCheck + ) private view { + if (schedule.cliffAndFlowDate == 0) + revert AlreadyExecuted(); + + if (!disableClaimCheck && schedule.claimValidityDate != 0) + revert ScheduleNotClaimed(); + + // Ensure that that the claming date is after the cliff/flow date and before the claim validity date + if (schedule.cliffAndFlowDate > block.timestamp || + _lteDateToExecuteCliffAndFlow(schedule) < block.timestamp) + revert TimeWindowInvalid(); + } + + function _lteDateToExecuteCliffAndFlow( + VestingSchedule memory schedule + ) private pure returns (uint32) { + if (schedule.cliffAndFlowDate == 0) + revert AlreadyExecuted(); + + if (schedule.claimValidityDate != 0) { + return schedule.claimValidityDate; + } else { + return schedule.cliffAndFlowDate + START_DATE_VALID_AFTER; + } + } + + function _validateAndClaim( + ScheduleAggregate memory agg + ) private { + VestingSchedule memory schedule = agg.schedule; + + // Ensure that the caller is the sender or the receiver if the vesting schedule requires claiming. + if (msg.sender != agg.sender && msg.sender != agg.receiver) + revert CannotClaimScheduleOnBehalf(); + + if (schedule.claimValidityDate < block.timestamp) + revert TimeWindowInvalid(); + + delete vestingSchedules[agg.id].claimValidityDate; + emit VestingClaimed(agg.superToken, agg.sender, agg.receiver, msg.sender); + } + + /// @dev IVestingScheduler.executeCliffAndFlow implementation. + function _executeCliffAndFlow( + ScheduleAggregate memory agg + ) private returns (bool success) { + VestingSchedule memory schedule = agg.schedule; + + // Invalidate configuration straight away -- avoid any chance of re-execution or re-entry. + delete vestingSchedules[agg.id].cliffAndFlowDate; + delete vestingSchedules[agg.id].cliffAmount; + + // Compensate for the fact that flow will almost always be executed slightly later than scheduled. + uint256 flowDelayCompensation = + (block.timestamp - schedule.cliffAndFlowDate) * uint96(schedule.flowRate); + + // If there's cliff or compensation then transfer that amount. + if (schedule.cliffAmount != 0 || flowDelayCompensation != 0) { + // Note: Super Tokens revert, not return false, i.e. we expect always true here. + assert( + agg.superToken.transferFrom( + agg.sender, agg.receiver, schedule.cliffAmount + flowDelayCompensation)); + } + // Create a flow according to the vesting schedule configuration. + cfaV1.createFlowByOperator(agg.sender, agg.receiver, agg.superToken, schedule.flowRate); + emit VestingCliffAndFlowExecuted( + agg.superToken, + agg.sender, + agg.receiver, + schedule.cliffAndFlowDate, + schedule.flowRate, + schedule.cliffAmount, + flowDelayCompensation + ); + + return true; + } + + function _executeVestingAsSingleTransfer( + ScheduleAggregate memory agg + ) private returns (bool success) { + VestingSchedule memory schedule = agg.schedule; + + delete vestingSchedules[agg.id]; + + uint256 totalVestedAmount = _getTotalVestedAmount(schedule); + + // Note: Super Tokens revert, not return false, i.e. we expect always true here. + assert(agg.superToken.transferFrom(agg.sender, agg.receiver, totalVestedAmount)); + + emit VestingCliffAndFlowExecuted( + agg.superToken, + agg.sender, + agg.receiver, + schedule.cliffAndFlowDate, + 0, // flow rate + schedule.cliffAmount, + totalVestedAmount - schedule.cliffAmount // flow delay compensation + ); + + emit VestingEndExecuted( + agg.superToken, + agg.sender, + agg.receiver, + schedule.endDate, + 0, // Early end compensation + false // Did end fail + ); + + return true; + } + + function _getTotalVestedAmount( + VestingSchedule memory schedule + ) private pure returns (uint256) { + return + schedule.cliffAmount + + schedule.remainderAmount + + (schedule.endDate - schedule.cliffAndFlowDate) * SafeCast.toUint256(schedule.flowRate); + } + + /// @dev IVestingScheduler.executeEndVesting implementation. + function executeEndVesting( + ISuperToken superToken, + address sender, + address receiver + ) external returns (bool success) { + ScheduleAggregate memory agg = _getVestingScheduleAggregate(superToken, sender, receiver); + VestingSchedule memory schedule = agg.schedule; + + _validateBeforeEndVesting(schedule, /* disableClaimCheck: */ false); + + // Invalidate configuration straight away -- avoid any chance of re-execution or re-entry. + delete vestingSchedules[agg.id]; + + // If vesting is not running, we can't do anything, just emit failing event. + if (_isFlowOngoing(superToken, sender, receiver)) { + // delete first the stream and unlock deposit amount. + cfaV1.deleteFlowByOperator(sender, receiver, superToken); + + uint256 earlyEndCompensation = schedule.endDate >= block.timestamp + ? (schedule.endDate - block.timestamp) * uint96(schedule.flowRate) + schedule.remainderAmount + : 0; + + // Note: we consider the compensation as failed if the stream is still ongoing after the end date. + bool didCompensationFail = schedule.endDate < block.timestamp; + if (earlyEndCompensation != 0) { + // Note: Super Tokens revert, not return false, i.e. we expect always true here. + assert(superToken.transferFrom(sender, receiver, earlyEndCompensation)); + } + + emit VestingEndExecuted( + superToken, + sender, + receiver, + schedule.endDate, + earlyEndCompensation, + didCompensationFail + ); + } else { + emit VestingEndFailed( + superToken, + sender, + receiver, + schedule.endDate + ); + } + + return true; + } + + function _validateBeforeEndVesting( + VestingSchedule memory schedule, + bool disableClaimCheck + ) private view { + if (schedule.endDate == 0) + revert AlreadyExecuted(); + + if (!disableClaimCheck && schedule.claimValidityDate != 0) + revert ScheduleNotClaimed(); + + if (_gteDateToExecuteEndVesting(schedule) > block.timestamp) + revert TimeWindowInvalid(); + } + + function _gteDateToExecuteEndVesting( + VestingSchedule memory schedule + ) private pure returns (uint32) { + if (schedule.endDate == 0) + revert AlreadyExecuted(); + + return schedule.endDate - END_DATE_VALID_BEFORE; + } + + /// @dev IVestingScheduler.getVestingSchedule implementation. + function getVestingSchedule( + address superToken, address sender, address receiver + ) external view returns (VestingSchedule memory) { + return vestingSchedules[_getId(address(superToken), sender, receiver)]; + } + + function _getVestingScheduleAggregate( + ISuperToken superToken, address sender, address receiver + ) private view returns (ScheduleAggregate memory) { + bytes32 id = _getId(address(superToken), sender, receiver); + return ScheduleAggregate({ + superToken: superToken, + sender: sender, + receiver: receiver, + id: id, + schedule: vestingSchedules[id] + }); + } + + function _normalizeStartDate(uint32 startDate) private view returns (uint32) { + // Default to current block timestamp if no start date is provided. + if (startDate == 0) { + return uint32(block.timestamp); + } + return startDate; + } + + /// @dev IVestingScheduler.getMaximumNeededTokenAllowance implementation. + function getMaximumNeededTokenAllowance( + VestingSchedule memory schedule + ) external pure override returns (uint256) { + uint256 maxFlowDelayCompensationAmount = + schedule.cliffAndFlowDate == 0 + ? 0 + : START_DATE_VALID_AFTER * SafeCast.toUint256(schedule.flowRate); + uint256 maxEarlyEndCompensationAmount = + schedule.endDate == 0 + ? 0 + : END_DATE_VALID_BEFORE * SafeCast.toUint256(schedule.flowRate); + + if (schedule.claimValidityDate == 0) { + return + schedule.cliffAmount + + schedule.remainderAmount + + maxFlowDelayCompensationAmount + + maxEarlyEndCompensationAmount; + } else if (schedule.claimValidityDate >= _gteDateToExecuteEndVesting(schedule)) { + return _getTotalVestedAmount(schedule); + } else { + return schedule.cliffAmount + + schedule.remainderAmount + + (schedule.claimValidityDate - schedule.cliffAndFlowDate) * SafeCast.toUint256(schedule.flowRate) + + maxEarlyEndCompensationAmount; + } + } + + /// @dev get sender of transaction from Superfluid Context or transaction itself. + function _getSender(bytes memory ctx) private view returns (address sender) { + if (ctx.length != 0) { + if (msg.sender != address(cfaV1.host)) revert HostInvalid(); + sender = cfaV1.host.decodeCtx(ctx).msgSender; + } else { + sender = msg.sender; + } + // This is an invariant and should never happen. + assert(sender != address(0)); + } + + /// @dev get flowRate of stream + function _isFlowOngoing(ISuperToken superToken, address sender, address receiver) private view returns (bool) { + (,int96 flowRate,,) = cfaV1.cfa.getFlow(superToken, sender, receiver); + return flowRate != 0; + } + + function _getId( + address superToken, address sender, address receiver + ) private pure returns (bytes32) { + return keccak256(abi.encodePacked(superToken, sender, receiver)); + } +} diff --git a/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol b/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol index 7e9dc37616..9cb5b20802 100644 --- a/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol +++ b/packages/automation-contracts/scheduler/contracts/interface/IVestingScheduler.sol @@ -203,4 +203,4 @@ interface IVestingScheduler { external view returns (VestingSchedule memory); -} +} \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol b/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol new file mode 100644 index 0000000000..65561080c9 --- /dev/null +++ b/packages/automation-contracts/scheduler/contracts/interface/IVestingSchedulerV2.sol @@ -0,0 +1,387 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.0; + +import { + ISuperToken +} from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; + +interface IVestingSchedulerV2 { + error TimeWindowInvalid(); + error AccountInvalid(); + error ZeroAddress(); + error HostInvalid(); + error FlowRateInvalid(); + error CliffInvalid(); + error ScheduleAlreadyExists(); + error ScheduleDoesNotExist(); + error ScheduleNotFlowing(); + error CannotClaimScheduleOnBehalf(); + error AlreadyExecuted(); + error ScheduleNotClaimed(); + + /** + * @dev Vesting configuration provided by user. + * @param cliffAndFlowDate Date of flow start and cliff execution (if a cliff was specified) + * @param endDate End date of the vesting + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param flowRate For the stream + * @param cliffAmount Amount to be transferred at the cliff + * @param remainderAmount Amount transferred during early end to achieve an accurate "total vested amount" + */ + struct VestingSchedule { + uint32 cliffAndFlowDate; + uint32 endDate; + int96 flowRate; + + uint256 cliffAmount; + + uint96 remainderAmount; + uint32 claimValidityDate; + } + + /** + * @dev Parameters used to create vesting schedules + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param startDate Timestamp when the vesting should start + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param flowRate The flowRate for the stream + * @param cliffAmount The amount to be transferred at the cliff + * @param endDate The timestamp when the stream should stop. + * @param remainderAmount Amount transferred during early end to achieve an accurate "total vested amount" + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + struct ScheduleCreationParams { + ISuperToken superToken; + address sender; + address receiver; + uint32 startDate; + uint32 claimValidityDate; + uint32 cliffDate; + int96 flowRate; + uint256 cliffAmount; + uint32 endDate; + uint96 remainderAmount; + } + + /** + * @dev Event emitted on creation of a new vesting schedule + * @param superToken SuperToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param startDate Timestamp when the vesting starts + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param cliffDate Timestamp of the cliff + * @param flowRate The flowRate for the stream + * @param endDate The timestamp when the stream should stop + * @param cliffAmount The amount to be transferred at the cliff + * @param remainderAmount Amount transferred during early end to achieve an accurate "total vested amount" + */ + event VestingScheduleCreated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint32 endDate, + uint256 cliffAmount, + uint32 claimValidityDate, + uint96 remainderAmount + ); + + /** + * @dev Creates a new vesting schedule + * @dev If a non-zero cliffDate is set, the startDate has no effect other than being logged in an event. + * @dev If cliffDate is set to zero, the startDate becomes the cliff (transfer cliffAmount and start stream). + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param startDate Timestamp when the vesting should start + * @param cliffDate Timestamp of cliff exectution - if 0, startDate acts as cliff + * @param flowRate The flowRate for the stream + * @param cliffAmount The amount to be transferred at the cliff + * @param endDate The timestamp when the stream should stop. + * @param claimValidityDate Date before which the claimable schedule must be claimed + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createVestingSchedule overload for more details. + */ + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createVestingSchedule overload for more details. + */ + function createVestingSchedule( + ISuperToken superToken, + address receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate, + uint32 claimValidityDate + ) external; + + /** + * @dev Creates a new vesting schedule + * @dev The function makes it more intuitive to create a vesting schedule compared to the original function. + * @dev The function calculates the endDate, cliffDate, cliffAmount, flowRate, etc, based on the input arguments. + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param totalAmount The total amount to be vested + * @param totalDuration The total duration of the vestingß + * @param startDate Timestamp when the vesting should start + * @param cliffPeriod The cliff period of the vesting + * @param claimPeriod The claim availability period + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createVestingScheduleFromAmountAndDuration overload for more details. + */ + function createVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) external; + + /** + * @dev Returns all relevant information related to a new vesting schedule creation + * @dev based on the amounts and durations. + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param totalAmount The total amount to be vested + * @param totalDuration The total duration of the vestingß + * @param startDate Timestamp when the vesting should start + * @param cliffPeriod The cliff period of the vesting + * @param claimPeriod The claim availability period + */ + function mapCreateVestingScheduleParams( + ISuperToken superToken, + address sender, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + uint32 startDate, + uint32 cliffPeriod, + uint32 claimPeriod + ) external returns (ScheduleCreationParams memory params); + + /** + * @dev Creates a new vesting schedule + * @dev The function calculates the endDate, cliffDate, cliffAmount, flowRate, etc, based on the input arguments. + * @dev The function creates the vesting schedule with start date set to current timestamp, + * @dev and executes the start (i.e. creation of the flow) immediately. + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param totalAmount The total amount to be vested + * @param totalDuration The total duration of the vesting + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration, + bytes memory ctx + ) external returns (bytes memory newCtx); + + /** + * @dev See IVestingScheduler.createAndExecuteVestingScheduleFromAmountAndDuration. + */ + function createAndExecuteVestingScheduleFromAmountAndDuration( + ISuperToken superToken, + address receiver, + uint256 totalAmount, + uint32 totalDuration + ) external; + + /** + * @dev Event emitted on update of a vesting schedule + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param oldEndDate Old timestamp when the stream should stop + * @param endDate New timestamp when the stream should stop + */ + event VestingScheduleUpdated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 oldEndDate, + uint32 endDate, + uint96 remainderAmount + ); + + /** + * @dev Updates the end date for a vesting schedule which already reached the cliff + * @notice When updating, there's no restriction to the end date other than not being in the past + * @param superToken SuperToken to be vested + * @param receiver Vesting receiver + * @param endDate The timestamp when the stream should stop + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function updateVestingSchedule(ISuperToken superToken, address receiver, uint32 endDate, bytes memory ctx) + external + returns (bytes memory newCtx); + + /** + * @dev Event emitted on deletion of a vesting schedule + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + */ + event VestingScheduleDeleted(ISuperToken indexed superToken, address indexed sender, address indexed receiver); + + /** + * @dev Event emitted on end of a vesting that failed because there was no running stream + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param endDate The timestamp when the stream should stop + */ + event VestingEndFailed( + ISuperToken indexed superToken, address indexed sender, address indexed receiver, uint32 endDate + ); + + /** + * @dev Deletes a vesting schedule + * @param superToken The superToken to be vested + * @param receiver Vesting receiver + * @param ctx Superfluid context used when batching operations. (or bytes(0) if not SF batching) + */ + function deleteVestingSchedule(ISuperToken superToken, address receiver, bytes memory ctx) + external + returns (bytes memory newCtx); + + /** + * @dev Emitted when the cliff of a scheduled vesting is executed + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param cliffAndFlowDate The timestamp when the stream should start + * @param flowRate The flowRate for the stream + * @param cliffAmount The amount you would like to transfer at the startDate when you start streaming + * @param flowDelayCompensation Adjusted amount transferred to receiver. (elapse time from config and tx timestamp) + */ + event VestingCliffAndFlowExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 cliffAndFlowDate, + int96 flowRate, + uint256 cliffAmount, + uint256 flowDelayCompensation + ); + + /** + * @dev Emitted when a claimable vesting schedule is claimed + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param claimer Account that claimed the vesting (can only be sender or receiver) + */ + event VestingClaimed( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + address claimer + ); + + /** + * @dev Executes a cliff (transfer and stream start) + * @notice Intended to be invoked by a backend service + * @param superToken SuperToken to be streamed + * @param sender Account who will be send the stream + * @param receiver Account who will be receiving the stream + */ + function executeCliffAndFlow(ISuperToken superToken, address sender, address receiver) + external + returns (bool success); + + /** + * @dev Emitted when the end of a scheduled vesting is executed + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + * @param endDate The timestamp when the stream should stop + * @param earlyEndCompensation adjusted close amount transferred to receiver. + * @param didCompensationFail adjusted close amount transfer fail. + */ + event VestingEndExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 endDate, + uint256 earlyEndCompensation, + bool didCompensationFail + ); + + /** + * @dev Executes the end of a vesting (stop stream) + * @notice Intended to be invoked by a backend service + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + */ + function executeEndVesting(ISuperToken superToken, address sender, address receiver) + external + returns (bool success); + + /** + * @dev Gets data currently stored for a vesting schedule + * @param superToken The superToken to be vested + * @param sender Vesting sender + * @param receiver Vesting receiver + */ + function getVestingSchedule(address superToken, address sender, address receiver) + external + view + returns (VestingSchedule memory); + + /** + * @dev Estimates the maximum possible ERC-20 token allowance needed for the vesting schedule + * @dev to work properly under all circumstances. + * @param vestingSchedule A vesting schedule (doesn't have to exist) + */ + function getMaximumNeededTokenAllowance( + VestingSchedule memory vestingSchedule + ) external returns (uint256); +} diff --git a/packages/automation-contracts/scheduler/deploy/deploy.js b/packages/automation-contracts/scheduler/deploy/deploy.js index 718fd771d9..a094182a33 100644 --- a/packages/automation-contracts/scheduler/deploy/deploy.js +++ b/packages/automation-contracts/scheduler/deploy/deploy.js @@ -15,7 +15,6 @@ module.exports = async function ({ deployments, getNamedAccounts }) { const chainId = await hre.getChainId(); const host = metadata.networks.filter((item) => item.chainId == chainId)[0] .contractsV1.host; - const registrationKey = ""; if (host === undefined) { console.log("Host contract not found for this network"); return; @@ -24,41 +23,79 @@ module.exports = async function ({ deployments, getNamedAccounts }) { const { deploy } = deployments; const { deployer } = await getNamedAccounts(); + console.log(`network: ${hre.network.name}`); console.log(`chainId: ${chainId}`); console.log(`rpc: ${hre.network.config.url}`); console.log(`host: ${host}`); - const FlowScheduler = await deploy("FlowScheduler", { - from: deployer, - args: [host, registrationKey], - log: true, - skipIfAlreadyDeployed: false, - }); - const VestingScheduler = await deploy("VestingScheduler", { - from: deployer, - args: [host, registrationKey], - log: true, - skipIfAlreadyDeployed: false, - }); + const deployFlowScheduler = process.env.DEPLOY_FLOW_SCHEDULER?.toLowerCase() === "true"; + const deployVestingScheduler = process.env.DEPLOY_VESTING_SCHEDULER?.toLowerCase() === "true"; + const deployVestingSchedulerV2 = process.env.DEPLOY_VESTING_SCHEDULER_V2?.toLowerCase() === "true"; + console.log(`deployFlowScheduler: ${deployFlowScheduler}`); + console.log(`deployVestingScheduler: ${deployVestingScheduler}`); + console.log(`deployVestingSchedulerV2: ${deployVestingSchedulerV2}`); + + if (deployFlowScheduler) { + console.log("Deploying FlowScheduler..."); + const FlowScheduler = await deploy("FlowScheduler", { + from: deployer, + args: [host], + log: true, + skipIfAlreadyDeployed: false + }); - // wait for 15 seconds to allow etherscan to indexed the contracts - await sleep(15000); + // wait for 15 seconds to allow etherscan to indexed the contracts + await sleep(15000); - try { + console.log("Verifying FlowScheduler..."); await hre.run("verify:verify", { address: FlowScheduler.address, - constructorArguments: [host, registrationKey], + constructorArguments: [host], contract: "contracts/FlowScheduler.sol:FlowScheduler", }); + } + + if (deployVestingScheduler) { + console.log("Deploying VestingScheduler..."); + const VestingScheduler = await deploy("VestingScheduler", { + from: deployer, + args: [host], + log: true, + skipIfAlreadyDeployed: false + }); + + // wait for 15 seconds to allow etherscan to indexed the contracts + await sleep(15000); + console.log("Verifying VestingScheduler..."); await hre.run("verify:verify", { address: VestingScheduler.address, - constructorArguments: [host, registrationKey], + constructorArguments: [host], contract: "contracts/VestingScheduler.sol:VestingScheduler", }); - } catch (err) { - console.error(err); } + + if (deployVestingSchedulerV2) { + console.log("Deploying VestingSchedulerV2..."); + const VestingSchedulerV2 = await deploy("VestingSchedulerV2", { + from: deployer, + args: [host], + log: true, + skipIfAlreadyDeployed: false, + }); + + // wait for 15 seconds to allow etherscan to indexed the contracts + await sleep(15000); + + console.log("Verifying VestingSchedulerV2..."); + await hre.run("verify:verify", { + address: VestingSchedulerV2.address, + constructorArguments: [host], + contract: "contracts/VestingSchedulerV2.sol:VestingSchedulerV2", + }); + } + + console.log("Finished."); }; diff --git a/packages/automation-contracts/scheduler/foundry.toml b/packages/automation-contracts/scheduler/foundry.toml index 0883dafcba..6b3a7ebf3a 100644 --- a/packages/automation-contracts/scheduler/foundry.toml +++ b/packages/automation-contracts/scheduler/foundry.toml @@ -2,13 +2,14 @@ root = '../../../' libs = ['lib'] src = 'packages/automation-contracts/scheduler' -solc_version = "0.8.19" +solc_version = "0.8.23" remappings = [ '@superfluid-finance/solidity-semantic-money/src/=packages/solidity-semantic-money/src/', '@superfluid-finance/ethereum-contracts/=packages/ethereum-contracts/', '@openzeppelin/=node_modules/@openzeppelin/', 'ds-test/=lib/forge-std/lib/ds-test/src/', 'forge-std/=lib/forge-std/src/'] +out = 'packages/automation-contracts/scheduler/out/default' [profile.ci] offline = true diff --git a/packages/automation-contracts/scheduler/hardhat.config.js b/packages/automation-contracts/scheduler/hardhat.config.js index 09f773db12..8336b37f79 100644 --- a/packages/automation-contracts/scheduler/hardhat.config.js +++ b/packages/automation-contracts/scheduler/hardhat.config.js @@ -12,41 +12,56 @@ require("hardhat/config"); */ module.exports = { solidity: { - version: "0.8.19", + version: "0.8.23", settings: { optimizer: { enabled: true, runs: 200, - } - } + }, + }, }, networks: { localhost: { url: "http://127.0.0.1:8545/", chainId: 31337, }, - goerli: { - url: process.env.GOERLI_URL || "", - accounts: - process.env.GOERLI_PRIVATE_KEY !== undefined ? [process.env.GOERLI_PRIVATE_KEY] : [], - }, - mumbai: { - url: process.env.MUMBAI_URL || "", - accounts: - process.env.MUMBAI_PRIVATE_KEY !== undefined ? [process.env.MUMBAI_PRIVATE_KEY] : [], - }, polygon: { url: process.env.POLYGON_URL || "", accounts: - process.env.POLYGON_PRIVATE_KEY !== undefined ? [process.env.POLYGON_PRIVATE_KEY] : [], + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], }, bsc: { url: process.env.BSC_URL || "", accounts: - process.env.BSC_PRIVATE_KEY !== undefined ? [process.env.BSC_PRIVATE_KEY] : [], + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + optimism: { + url: "https://mainnet.optimism.io", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + opsepolia: { + url: process.env.OPSEPOLIA_URL || "", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + }, + "base-mainnet": { + url: process.env.BASE_URL || "", + accounts: + process.env.PRIVATE_KEY !== undefined + ? [process.env.PRIVATE_KEY] + : [], + gasPrice: 1000000000, }, }, - namedAccounts: { deployer: { default: 0, @@ -54,5 +69,23 @@ module.exports = { }, etherscan: { apiKey: process.env.ETHERSCAN_API_KEY, + customChains: [ + { + network: "opsepolia", + chainId: 11155420, + urls: { + apiURL: "https://api-sepolia-optimistic.etherscan.io/api", + browserURL: "https://sepolia-optimism.etherscan.io/", + }, + }, + { + network: "base-mainnet", + chainId: 8453, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org/", + }, + }, + ], }, }; diff --git a/packages/automation-contracts/scheduler/package.json b/packages/automation-contracts/scheduler/package.json index a153137d61..7063595882 100644 --- a/packages/automation-contracts/scheduler/package.json +++ b/packages/automation-contracts/scheduler/package.json @@ -1,20 +1,19 @@ { "name": "scheduler", - "version": "0.0.1", "description": "Open contracts that allow scheduling streams and vestings onchain", + "version": "1.2.0", + "devDependencies": { + "@openzeppelin/contracts": "^4.9.6", + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "@superfluid-finance/metadata": "^1.5.0" + }, "license": "MIT", "scripts": { "test": "forge test", "build": "forge build", + "deploy": "npx hardhat deploy --network", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor" - }, - "dependencies": { - "@openzeppelin/contracts": "4.9.3", - "@superfluid-finance/ethereum-contracts": "1.9.0", - "@superfluid-finance/metadata": "1.1.23" } } diff --git a/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol b/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol index 881bd0dd9c..10c63dabc2 100644 --- a/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol +++ b/packages/automation-contracts/scheduler/test/FlowScheduler.t.sol @@ -57,7 +57,7 @@ contract FlowSchedulerTest is FoundrySuperfluidTester { function setUp() override public virtual { super.setUp(); - flowScheduler = new FlowScheduler(sf.host, ""); + flowScheduler = new FlowScheduler(sf.host); } function getHashID( diff --git a/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol b/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol index eec76dd1ea..ae98f43848 100644 --- a/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol +++ b/packages/automation-contracts/scheduler/test/FlowSchedulerResolver.t.sol @@ -26,7 +26,7 @@ contract FlowSchedulerResolverTest is FoundrySuperfluidTester { function setUp() override public virtual { super.setUp(); - flowScheduler = new FlowScheduler(sf.host, ""); + flowScheduler = new FlowScheduler(sf.host); flowSchedulerResolver = new FlowSchedulerResolver(address(flowScheduler)); createPayload = abi.encodeCall( FlowScheduler.executeCreateFlow, ( diff --git a/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol b/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol index c1c1853b21..756523c954 100644 --- a/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol +++ b/packages/automation-contracts/scheduler/test/VestingScheduler.t.sol @@ -79,7 +79,7 @@ contract VestingSchedulerTests is FoundrySuperfluidTester { uint256 internal _expectedTotalSupply = 0; constructor() FoundrySuperfluidTester(3) { - vestingScheduler = new VestingScheduler(sf.host, ""); + vestingScheduler = new VestingScheduler(sf.host); } /// SETUP AND HELPERS @@ -561,4 +561,4 @@ contract VestingSchedulerTests is FoundrySuperfluidTester { success = vestingScheduler.executeEndVesting(superToken, alice, bob); assertTrue(success, "executeCloseVesting should return true"); } -} +} \ No newline at end of file diff --git a/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol new file mode 100644 index 0000000000..1dd9086899 --- /dev/null +++ b/packages/automation-contracts/scheduler/test/VestingSchedulerV2.t.sol @@ -0,0 +1,2283 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.0; + +import { ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol"; +import { FlowOperatorDefinitions } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; +import { IVestingSchedulerV2 } from "./../contracts/interface/IVestingSchedulerV2.sol"; +import { VestingSchedulerV2 } from "./../contracts/VestingSchedulerV2.sol"; +import { FoundrySuperfluidTester } from "@superfluid-finance/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol"; +import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; +import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol"; +import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import "forge-std/console.sol"; + +/// @title VestingSchedulerTests +/// @notice Look at me , I am the captain now - Elvijs +contract VestingSchedulerV2Tests is FoundrySuperfluidTester { + using SuperTokenV1Library for ISuperToken; + + event VestingScheduleCreated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint32 endDate, + uint256 cliffAmount, + uint32 claimValidityDate, + uint96 remainderAmount + ); + + event VestingScheduleUpdated( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 oldEndDate, + uint32 endDate, + uint96 remainderAmount + ); + + event VestingScheduleDeleted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver + ); + + event VestingCliffAndFlowExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 cliffAndFlowDate, + int96 flowRate, + uint256 cliffAmount, + uint256 flowDelayCompensation + ); + + event VestingEndExecuted( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 endDate, + uint256 earlyEndCompensation, + bool didCompensationFail + ); + + event VestingEndFailed( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + uint32 endDate + ); + + event VestingClaimed( + ISuperToken indexed superToken, + address indexed sender, + address indexed receiver, + address claimer + ); + + event Transfer(address indexed from, address indexed to, uint256 value); + + /// @dev This is required by solidity for using the SuperTokenV1Library in the tester + VestingSchedulerV2 public vestingScheduler; + + /// @dev Constants for Testing + uint256 immutable BLOCK_TIMESTAMP = 100; + uint32 immutable START_DATE = uint32(BLOCK_TIMESTAMP + 1); + uint32 immutable CLIFF_DATE = uint32(BLOCK_TIMESTAMP + 10 days); + int96 constant FLOW_RATE = 1000000000; + uint256 constant CLIFF_TRANSFER_AMOUNT = 1 ether; + uint32 immutable CLAIM_VALIDITY_DATE = uint32(BLOCK_TIMESTAMP + 15 days); + uint32 immutable END_DATE = uint32(BLOCK_TIMESTAMP + 20 days); + bytes constant EMPTY_CTX = ""; + uint256 internal _expectedTotalSupply = 0; + + constructor() FoundrySuperfluidTester(3) { + vestingScheduler = new VestingSchedulerV2(sf.host); + } + + /// SETUP AND HELPERS + function setUp() override public virtual { + super.setUp(); + vm.warp(BLOCK_TIMESTAMP); + } + + function _setACL_AUTHORIZE_FULL_CONTROL(address user, int96 flowRate) private { + vm.startPrank(user); + sf.host.callAgreement( + sf.cfa, + abi.encodeCall( + sf.cfa.updateFlowOperatorPermissions, + ( + superToken, + address(vestingScheduler), + FlowOperatorDefinitions.AUTHORIZE_FULL_CONTROL, + flowRate, + new bytes(0) + ) + ), + new bytes(0) + ); + vm.stopPrank(); + } + + function _arrangeAllowances(address sender, int96 flowRate) private { + // ## Superfluid ACL allowance and permissions + _setACL_AUTHORIZE_FULL_CONTROL(sender, flowRate); + + // ## ERC-20 allowance for cliff and compensation transfers + vm.startPrank(sender); + superToken.approve(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + } + + function _createVestingScheduleWithDefaultData(address sender, address receiver) private { + vm.startPrank(sender); + vestingScheduler.createVestingSchedule( + superToken, + receiver, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + vm.stopPrank(); + } + + function _createClaimableVestingScheduleWithDefaultData(address sender, address receiver) private { + vm.startPrank(sender); + vestingScheduler.createVestingSchedule( + superToken, + receiver, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + } + + function _createClaimableVestingScheduleWithClaimDateAfterEndDate(address sender, address receiver, uint256 delayAfterEndDate) private { + vm.startPrank(sender); + vestingScheduler.createVestingSchedule( + superToken, + receiver, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + END_DATE + uint32(delayAfterEndDate), + EMPTY_CTX + ); + vm.stopPrank(); + } + + function assertAreScheduleCreationParamsEqual( + IVestingSchedulerV2.ScheduleCreationParams memory params1, + IVestingSchedulerV2.ScheduleCreationParams memory params2 + ) internal pure { + require(params1.superToken == params2.superToken, "SuperToken mismatch"); + require(params1.receiver == params2.receiver, "Receiver mismatch"); + require(params1.startDate == params2.startDate, "StartDate mismatch"); + require(params1.claimValidityDate == params2.claimValidityDate, "ClaimValidityDate mismatch"); + require(params1.cliffDate == params2.cliffDate, "CliffDate mismatch"); + require(params1.flowRate == params2.flowRate, "FlowRate mismatch"); + require(params1.cliffAmount == params2.cliffAmount, "CliffAmount mismatch"); + require(params1.endDate == params2.endDate, "EndDate mismatch"); + require(params1.remainderAmount == params2.remainderAmount, "RemainderAmount mismatch"); + } + + function testAssertScheduleDoesNotExist( + address superToken, + address sender, + address receiver + ) public { + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(superToken, sender, receiver); + VestingSchedulerV2.VestingSchedule memory deletedSchedule; + + assertEq(schedule.cliffAndFlowDate, deletedSchedule.cliffAndFlowDate, "cliffAndFlowDate mismatch"); + assertEq(schedule.endDate, deletedSchedule.endDate, "endDate mismatch"); + assertEq(schedule.flowRate, deletedSchedule.flowRate, "flowRate mismatch"); + assertEq(schedule.cliffAmount, deletedSchedule.cliffAmount, "cliffAmount mismatch"); + assertEq(schedule.remainderAmount, deletedSchedule.remainderAmount, "remainderAmount mismatch"); + assertEq(schedule.claimValidityDate, deletedSchedule.claimValidityDate, "claimValidityDate mismatch"); + } + + function _getExpectedSchedule( + uint32 startDate, + uint32 cliffDate, + int96 flowRate, + uint256 cliffAmount, + uint32 endDate + ) public view returns (IVestingSchedulerV2.VestingSchedule memory expectedSchedule) { + if (startDate == 0) { + startDate = uint32(block.timestamp); + } + + uint32 cliffAndFlowDate = cliffDate == 0 ? startDate : cliffDate; + + expectedSchedule = IVestingSchedulerV2.VestingSchedule({ + cliffAndFlowDate: cliffAndFlowDate, + endDate: endDate, + claimValidityDate: 0, + flowRate: flowRate, + cliffAmount: cliffAmount, + remainderAmount: 0 + }); + } + + function _getExpectedScheduleFromAmountAndDuration( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod + ) public view returns (IVestingSchedulerV2.VestingSchedule memory expectedSchedule) { + if (startDate == 0) { + startDate = uint32(block.timestamp); + } + + int96 flowRate = SafeCast.toInt96(SafeCast.toInt256(totalAmount / totalDuration)); + + uint32 cliffDate; + uint32 cliffAndFlowDate; + uint256 cliffAmount; + if (cliffPeriod > 0) { + cliffDate = startDate + cliffPeriod; + cliffAmount = cliffPeriod * SafeCast.toUint256(flowRate); + cliffAndFlowDate = cliffDate; + } else { + cliffDate = 0; + cliffAmount = 0; + cliffAndFlowDate = startDate; + } + + uint32 endDate = startDate + totalDuration; + + uint96 remainderAmount = SafeCast.toUint96(totalAmount - SafeCast.toUint256(flowRate) * totalDuration); + + expectedSchedule = IVestingSchedulerV2.VestingSchedule({ + cliffAndFlowDate: cliffAndFlowDate, + endDate: endDate, + flowRate: flowRate, + cliffAmount: cliffAmount, + remainderAmount: remainderAmount, + claimValidityDate: claimPeriod == 0 ? 0 : startDate + claimPeriod + }); + } + + /// TESTS + + function testCreateVestingSchedule() public { + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + _createVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function testCannotCreateVestingScheduleWithWrongData() public { + vm.startPrank(alice); + // revert with superToken = 0 + vm.expectRevert(IVestingSchedulerV2.ZeroAddress.selector); + vestingScheduler.createVestingSchedule( + ISuperToken(address(0)), + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with receivers = sender + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + alice, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with receivers = address(0) + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + address(0), + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with flowRate = 0 + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + 0, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with cliffDate = 0 but cliffAmount != 0 + vm.expectRevert(IVestingSchedulerV2.CliffInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + 0, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with startDate < block.timestamp && cliffDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + uint32(block.timestamp - 1), + 0, + FLOW_RATE, + 0, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with endDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + 0, + 0, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate < block.timestamp + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + uint32(block.timestamp) - 1, + FLOW_RATE, + 0, + END_DATE, + 0, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate >= endDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + 0, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate + startDateValidFor >= endDate - endDateValidBefore + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + 0, + EMPTY_CTX + ); + + // revert with startDate > cliffDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + CLIFF_DATE + 1, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + + + // revert with vesting duration < 7 days + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE + 2 days, + 0, + EMPTY_CTX + ); + } + + function testCannotCreateVestingScheduleIfDataExist() public { + _createVestingScheduleWithDefaultData(alice, bob); + vm.expectRevert(IVestingSchedulerV2.ScheduleAlreadyExists.selector); + _createVestingScheduleWithDefaultData(alice, bob); + } + + function testUpdateVestingSchedule() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + vm.startPrank(alice); + vestingScheduler.updateVestingSchedule(superToken, bob, END_DATE + 1000, EMPTY_CTX); + //assert storage data + IVestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == 0 , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE + 1000 , "schedule.endDate"); + } + + function test_updateVestingSchedule_invalidEndDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + vm.startPrank(alice); + + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, uint32(initialTimestamp - 1), EMPTY_CTX); + + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, uint32(initialTimestamp), EMPTY_CTX); + + + } + + function testCannotUpdateVestingScheduleIfNotRunning() public { + _createVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + vm.expectRevert(IVestingSchedulerV2.ScheduleNotFlowing.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, END_DATE, EMPTY_CTX); + } + + function testCannotUpdateVestingScheduleIfDataDontExist() public { + vm.startPrank(alice); + vm.expectRevert(IVestingSchedulerV2.ScheduleNotFlowing.selector); + vestingScheduler.updateVestingSchedule(superToken, bob, END_DATE, EMPTY_CTX); + } + + function testDeleteVestingSchedule() public { + _createVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + vm.expectEmit(true, true, true, true); + emit VestingScheduleDeleted(superToken, alice, bob); + vestingScheduler.deleteVestingSchedule(superToken, bob, EMPTY_CTX); + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function testCannotDeleteVestingScheduleIfDataDontExist() public { + vm.startPrank(alice); + vm.expectRevert(IVestingSchedulerV2.ScheduleDoesNotExist.selector); + vestingScheduler.deleteVestingSchedule( + superToken, + bob, + EMPTY_CTX + ); + } + + function testExecuteCliffAndFlowWithCliffAmount() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + + vm.expectRevert(IVestingSchedulerV2.AlreadyExecuted.selector); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + + } + + function testExecuteCliffAndFlowWithoutCliffAmountOrAdjustment() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + 0, + END_DATE, + 0, + EMPTY_CTX + ); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + vm.startPrank(admin); + vm.warp(CLIFF_DATE); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, 0, 0 + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.warp(END_DATE); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted(superToken, alice, bob, END_DATE, 0, false); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE); + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + } + + function testExecuteCliffAndFlowWithUpdatedEndDate() public { + uint32 NEW_END_DATE = END_DATE - 1000; + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.stopPrank(); + vm.prank(alice); + vm.expectEmit(true, true, true, true); + emit VestingScheduleUpdated(superToken, alice, bob, END_DATE, NEW_END_DATE, 0); + vestingScheduler.updateVestingSchedule(superToken, bob, NEW_END_DATE, EMPTY_CTX); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = NEW_END_DATE > block.timestamp ? NEW_END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, NEW_END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (NEW_END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + } + + function testExecuteCliffAndFlowRevertClosingTransfer() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.stopPrank(); + vm.startPrank(alice); + superToken.transferAll(eve); + vm.stopPrank(); + vm.startPrank(admin); + uint256 earlyEndTimestamp = block.timestamp + 10 days - 3600; + vm.warp(earlyEndTimestamp); + + vm.expectRevert(); + vestingScheduler.executeEndVesting(superToken, alice, bob); + + uint256 finalTimestamp = END_DATE + 1; + vm.warp(finalTimestamp); + + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, 0, true + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + } + + function testCannotExecuteEndVestingBeforeTime() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.executeEndVesting(superToken, alice, bob); + } + + function testCannotExecuteCliffAndFlowBeforeTime() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + } + + function testCannotExecuteEndWithoutStreamRunning() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.startPrank(admin); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + vm.stopPrank(); + vm.startPrank(alice); + superToken.deleteFlow(alice, bob); + vm.stopPrank(); + vm.startPrank(admin); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + emit VestingEndFailed( + superToken, alice, bob, END_DATE + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + } + + // # Vesting Scheduler V2 tests + + function testCreateAndExecuteImmediately() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + + // # Create schedule + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + uint32 startAndCliffDate = uint32(block.timestamp); + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startAndCliffDate, startAndCliffDate, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, 0, 0); + + vestingScheduler.createVestingSchedule( + superToken, + bob, + startAndCliffDate, + startAndCliffDate, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + 0, + EMPTY_CTX + ); + // --- + + // # Execute start + vm.expectEmit(); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT); + + vm.expectEmit(); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, startAndCliffDate, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, uint256(0) + ); + vm.stopPrank(); + + vm.startPrank(admin); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + + assertTrue(success, "executeVesting should return true"); + // --- + + // # Execute end + uint256 finalTimestamp = END_DATE - 3600; + vm.warp(finalTimestamp); + + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + + vm.expectEmit(); + emit Transfer(alice, bob, adjustedAmountClosing); + + vm.expectEmit(); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + vm.startPrank(admin); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + vm.stopPrank(); + assertTrue(success, "executeCloseVesting should return true"); + + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE - startAndCliffDate) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + // --- + } + + function test_createScheduleFromAmountAndDuration_reverts() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 0, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 604800, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with cliff and start in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with overflow."); + vm.expectRevert("SafeCast: value doesn't fit in 96 bits"); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + type(uint256).max, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with underflow/overflow."); + vm.expectRevert(); // todo: the right error + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + type(uint32).max, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with start date in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 604800, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + } + + function testNewFunctionScheduleCreationWithoutCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 105_840_000; // a value perfectly divisible by a week + uint32 vestingDuration = 1 weeks; + int96 expectedFlowRate = 175; // totalVestedAmount / vestingDuration + uint32 expectedEndDate = startDate + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, 0, expectedFlowRate, expectedEndDate, 0, 0, 0); + + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + 0, // claimPeriod + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + 0 // claimPeriod + ); + } + vm.stopPrank(); + } + + function testNewFunctionScheduleCreationWithCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 103_680_000; // a value perfectly divisible + uint32 vestingDuration = 1 weeks + 1 days; + uint32 cliffPeriod = 1 days; + + int96 expectedFlowRate = 150; // (totalVestedAmount - cliffAmount) / (vestingDuration - cliffPeriod) + uint256 expectedCliffAmount = 12960000; + uint32 expectedCliffDate = startDate + cliffPeriod; + uint32 expectedEndDate = startDate + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, expectedCliffDate, expectedFlowRate, expectedEndDate, expectedCliffAmount, 0, 0); + + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + 0, + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + 0 + ); + } + vm.stopPrank(); + } + + struct BigTestData { + uint256 beforeSenderBalance; + uint256 beforeReceiverBalance; + uint256 afterSenderBalance; + uint256 afterReceiverBalance; + uint32 expectedCliffDate; + uint32 expectedStartDate; + address claimer; + IVestingSchedulerV2.VestingSchedule expectedSchedule; + } + + // Claimable Vesting Schedules tests + function test_createScheduleFromAmountAndDuration_executeCliffAndFlow_executeEndVesting_withClaim( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 9125 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + claimPeriod = SafeCast.toUint32(bound(claimPeriod, 1, 9125 days)); + vm.assume(claimPeriod > (cliffPeriod > 0 ? startDate + cliffPeriod : startDate)); + vm.assume(claimPeriod < totalDuration - vestingScheduler.END_DATE_VALID_BEFORE()); + + BigTestData memory $; + + $.beforeSenderBalance = superToken.balanceOf(alice); + $.beforeReceiverBalance = superToken.balanceOf(bob); + + totalAmount = bound(totalAmount, 1, $.beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + assertTrue(vestingScheduler.getVestingSchedule(address(superToken), alice, bob).endDate == 0, "Schedule should not exist"); + + // Arrange + $.expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + claimPeriod + ); + $.expectedCliffDate = cliffPeriod == 0 ? 0 : $.expectedSchedule.cliffAndFlowDate; + $.expectedStartDate = startDate == 0 ? uint32(block.timestamp) : startDate; + + // Assume we're not getting liquidated at the end: + vm.assume($.beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256($.expectedSchedule.flowRate)); + + console.log("Total amount: %s", totalAmount); + console.log("Total duration: %s", totalDuration); + console.log("Cliff period: %s", cliffPeriod); + console.log("Claim period: %s", claimPeriod); + console.log("Start date: %s", startDate); + console.log("Randomizer: %s", randomizer); + console.log("Expected start date: %s", $.expectedStartDate); + console.log("Expected claim date: %s", $.expectedSchedule.claimValidityDate); + console.log("Expected cliff date: %s", $.expectedCliffDate); + console.log("Expected cliff & flow date: %s", $.expectedSchedule.cliffAndFlowDate); + console.log("Expected end date: %s", $.expectedSchedule.endDate); + console.log("Expected flow rate: %s", SafeCast.toUint256($.expectedSchedule.flowRate)); + console.log("Expected cliff amount: %s", $.expectedSchedule.cliffAmount); + console.log("Expected remainder amount: %s", $.expectedSchedule.remainderAmount); + console.log("Sender balance: %s", $.beforeSenderBalance); + + // Arrange allowance + assertTrue(superToken.allowance(alice, address(vestingScheduler)) == 0, "Let's start without any allowance"); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + superToken.setFlowPermissions( + address(vestingScheduler), + true, // allowCreate + false, // allowUpdate + true, // allowDelete, + $.expectedSchedule.flowRate + ); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance($.expectedSchedule)); + vm.stopPrank(); + + // Intermediary `mapCreateVestingScheduleParams` test + assertAreScheduleCreationParamsEqual( + IVestingSchedulerV2.ScheduleCreationParams( + superToken, + alice, + bob, + $.expectedStartDate, + $.expectedSchedule.claimValidityDate, + $.expectedCliffDate, + $.expectedSchedule.flowRate, + $.expectedSchedule.cliffAmount, + $.expectedSchedule.endDate, + $.expectedSchedule.remainderAmount + ), + vestingScheduler.mapCreateVestingScheduleParams(superToken, alice, bob, totalAmount, totalDuration, $.expectedStartDate, cliffPeriod, claimPeriod)); + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, $.expectedStartDate, $.expectedCliffDate, $.expectedSchedule.flowRate, $.expectedSchedule.endDate, $.expectedSchedule.cliffAmount, $.expectedSchedule.claimValidityDate, $.expectedSchedule.remainderAmount); + + // Act + vm.startPrank(alice); + if (randomizer % 3 == 0) { + console.log("Using the overload without superfluid context."); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod + ); + } else { + console.log("Using the overload with superfluid context."); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + } + vm.stopPrank(); + + // Assert + IVestingSchedulerV2.VestingSchedule memory actualSchedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(actualSchedule.cliffAndFlowDate, $.expectedSchedule.cliffAndFlowDate, "schedule created: cliffAndFlowDate not expected"); + assertEq(actualSchedule.flowRate, $.expectedSchedule.flowRate, "schedule created: flowRate not expected"); + assertEq(actualSchedule.cliffAmount, $.expectedSchedule.cliffAmount, "schedule created: cliffAmount not expected"); + assertEq(actualSchedule.endDate, $.expectedSchedule.endDate, "schedule created: endDate not expected"); + assertEq(actualSchedule.remainderAmount, $.expectedSchedule.remainderAmount, "schedule created: remainderAmount not expected"); + assertEq(actualSchedule.claimValidityDate, $.expectedSchedule.claimValidityDate, "schedule created: claimValidityDate not expected"); + + // Act + console.log("Executing cliff and flow."); + uint32 randomFlowDelay = ($.expectedSchedule.claimValidityDate - $.expectedSchedule.cliffAndFlowDate); + vm.warp($.expectedSchedule.cliffAndFlowDate + randomFlowDelay); + + $.claimer = randomizer % 2 == 0 ? bob : alice; + + vm.prank($.claimer); + vm.expectEmit(); + emit VestingClaimed( + superToken, alice, bob, $.claimer + ); + vm.expectEmit(); + emit VestingCliffAndFlowExecuted(superToken, alice, bob, $.expectedSchedule.cliffAndFlowDate, $.expectedSchedule.flowRate, $.expectedSchedule.cliffAmount, randomFlowDelay * SafeCast.toUint256($.expectedSchedule.flowRate)); + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + vm.stopPrank(); + + // Assert + actualSchedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(actualSchedule.cliffAndFlowDate, 0, "schedule started: cliffAndFlowDate not expected"); + assertEq(actualSchedule.cliffAmount, 0, "schedule started: cliffAmount not expected"); + assertEq(actualSchedule.flowRate, $.expectedSchedule.flowRate, "schedule started: flowRate not expected"); + assertEq(actualSchedule.endDate, $.expectedSchedule.endDate, "schedule started: endDate not expected"); + assertEq(actualSchedule.remainderAmount, $.expectedSchedule.remainderAmount, "schedule started: remainderAmount not expected"); + + if (randomizer % 7 != 0) { + // # Test end execution on time. + + console.log("Executing end vesting early."); + uint32 randomEarlyEndTime = (vestingScheduler.END_DATE_VALID_BEFORE() - (vestingScheduler.END_DATE_VALID_BEFORE() / randomizer)); + vm.warp($.expectedSchedule.endDate - randomEarlyEndTime); + vm.expectEmit(); + uint256 earlyEndCompensation = randomEarlyEndTime * SafeCast.toUint256($.expectedSchedule.flowRate) + $.expectedSchedule.remainderAmount; + emit VestingEndExecuted(superToken, alice, bob, $.expectedSchedule.endDate, earlyEndCompensation, false); + + // Act + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + + // Assert + $.afterSenderBalance = superToken.balanceOf(alice); + $.afterReceiverBalance = superToken.balanceOf(bob); + + assertEq($.afterSenderBalance, $.beforeSenderBalance - totalAmount, "Sender balance should decrease by totalAmount"); + assertEq($.afterReceiverBalance, $.beforeReceiverBalance + totalAmount, "Receiver balance should increase by totalAmount"); + } else { + // # Test end execution delayed. + + console.log("Executing end vesting late."); + uint32 randomLateEndDelay = (totalDuration / randomizer); + vm.warp($.expectedSchedule.endDate + randomLateEndDelay); // There is some chance of overflow here. + + if (randomizer % 13 == 0) { + vm.startPrank(alice); + superToken.deleteFlow(alice, bob); + vm.stopPrank(); + + vm.expectEmit(); + emit VestingEndFailed(superToken, alice, bob, $.expectedSchedule.endDate); + } else { + vm.expectEmit(); + emit VestingEndExecuted(superToken, alice, bob, $.expectedSchedule.endDate, 0, true); + } + + // Act + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + + // Assert + $.afterSenderBalance = superToken.balanceOf(alice); + $.afterReceiverBalance = superToken.balanceOf(bob); + + assertLt($.afterSenderBalance, $.beforeSenderBalance - totalAmount + $.expectedSchedule.remainderAmount, "Sender balance should decrease by at least totalAmount"); + assertGt($.afterReceiverBalance, $.beforeReceiverBalance + totalAmount - $.expectedSchedule.remainderAmount, "Receiver balance should increase by at least totalAmount"); + } + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + + vm.warp(type(uint32).max); + assertEq($.afterSenderBalance, superToken.balanceOf(alice), "After the schedule has ended, the sender's balance should never change."); + } + + function test_createScheduleFromAmountAndDuration_executeCliffAndFlow_executeEndVesting_withClaim_withSingleTransfer( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 9125 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + claimPeriod = SafeCast.toUint32(bound(claimPeriod, 1, 9125 days)); + vm.assume(claimPeriod > (startDate + totalDuration - vestingScheduler.END_DATE_VALID_BEFORE())); + + BigTestData memory $; + + $.beforeSenderBalance = superToken.balanceOf(alice); + $.beforeReceiverBalance = superToken.balanceOf(bob); + + totalAmount = bound(totalAmount, 1, $.beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + assertTrue(vestingScheduler.getVestingSchedule(address(superToken), alice, bob).endDate == 0, "Schedule should not exist"); + + // Arrange + $.expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + claimPeriod + ); + $.expectedCliffDate = cliffPeriod == 0 ? 0 : $.expectedSchedule.cliffAndFlowDate; + $.expectedStartDate = startDate == 0 ? uint32(block.timestamp) : startDate; + + // Assume we're not getting liquidated at the end: + vm.assume($.beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256($.expectedSchedule.flowRate)); + + console.log("Total amount: %s", totalAmount); + console.log("Total duration: %s", totalDuration); + console.log("Cliff period: %s", cliffPeriod); + console.log("Claim period: %s", claimPeriod); + console.log("Start date: %s", startDate); + console.log("Randomizer: %s", randomizer); + console.log("Expected start date: %s", $.expectedStartDate); + console.log("Expected claim date: %s", $.expectedSchedule.claimValidityDate); + console.log("Expected cliff date: %s", $.expectedCliffDate); + console.log("Expected cliff & flow date: %s", $.expectedSchedule.cliffAndFlowDate); + console.log("Expected end date: %s", $.expectedSchedule.endDate); + console.log("Expected flow rate: %s", SafeCast.toUint256($.expectedSchedule.flowRate)); + console.log("Expected cliff amount: %s", $.expectedSchedule.cliffAmount); + console.log("Expected remainder amount: %s", $.expectedSchedule.remainderAmount); + console.log("Sender balance: %s", $.beforeSenderBalance); + + // Arrange allowance + assertTrue(superToken.allowance(alice, address(vestingScheduler)) == 0, "Let's start without any allowance"); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance($.expectedSchedule)); + vm.stopPrank(); + + // Intermediary `mapCreateVestingScheduleParams` test + assertAreScheduleCreationParamsEqual( + IVestingSchedulerV2.ScheduleCreationParams( + superToken, + alice, + bob, + $.expectedStartDate, + $.expectedSchedule.claimValidityDate, + $.expectedCliffDate, + $.expectedSchedule.flowRate, + $.expectedSchedule.cliffAmount, + $.expectedSchedule.endDate, + $.expectedSchedule.remainderAmount + ), + vestingScheduler.mapCreateVestingScheduleParams(superToken, alice, bob, totalAmount, totalDuration, $.expectedStartDate, cliffPeriod, claimPeriod)); + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, $.expectedStartDate, $.expectedCliffDate, $.expectedSchedule.flowRate, $.expectedSchedule.endDate, $.expectedSchedule.cliffAmount, $.expectedSchedule.claimValidityDate, $.expectedSchedule.remainderAmount); + + // Act + vm.startPrank(alice); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + vm.stopPrank(); + + // Assert + IVestingSchedulerV2.VestingSchedule memory actualSchedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(actualSchedule.cliffAndFlowDate, $.expectedSchedule.cliffAndFlowDate, "schedule created: cliffAndFlowDate not expected"); + assertEq(actualSchedule.flowRate, $.expectedSchedule.flowRate, "schedule created: flowRate not expected"); + assertEq(actualSchedule.cliffAmount, $.expectedSchedule.cliffAmount, "schedule created: cliffAmount not expected"); + assertEq(actualSchedule.endDate, $.expectedSchedule.endDate, "schedule created: endDate not expected"); + assertEq(actualSchedule.remainderAmount, $.expectedSchedule.remainderAmount, "schedule created: remainderAmount not expected"); + assertEq(actualSchedule.claimValidityDate, $.expectedSchedule.claimValidityDate, "schedule created: claimValidityDate not expected"); + + // Act + console.log("Executing cliff and flow."); + vm.warp($.expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE() + + /* random delay: */ ($.expectedSchedule.claimValidityDate - ($.expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE())) / randomizer + ); + + $.claimer = randomizer % 2 == 0 ? bob : alice; + + vm.prank($.claimer); + + vm.expectEmit(); + emit VestingClaimed( + superToken, alice, bob, $.claimer + ); + vm.expectEmit(); + emit VestingCliffAndFlowExecuted(superToken, alice, bob, $.expectedSchedule.cliffAndFlowDate, 0, $.expectedSchedule.cliffAmount, totalAmount - $.expectedSchedule.cliffAmount); + + vm.expectEmit(); + emit VestingEndExecuted(superToken, alice, bob, $.expectedSchedule.endDate, 0, false); + + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + vm.stopPrank(); + + $.afterSenderBalance = superToken.balanceOf(alice); + $.afterReceiverBalance = superToken.balanceOf(bob); + + assertEq($.afterSenderBalance, $.beforeSenderBalance - totalAmount, "Sender balance should decrease by totalAmount"); + assertEq($.afterReceiverBalance, $.beforeReceiverBalance + totalAmount, "Receiver balance should increase by totalAmount"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + + vm.warp(type(uint32).max); + assertEq($.afterSenderBalance, superToken.balanceOf(alice), "After the schedule has ended, the sender's balance should never change."); + } + + function test_createClaimableVestingSchedule() public { + + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, CLAIM_VALIDITY_DATE, 0); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.claimValidityDate == CLAIM_VALIDITY_DATE, "schedule.claimValidityDate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function test_createClaimableVestingSchedule_claimValidity() public { + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, CLAIM_VALIDITY_DATE, 0); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.claimValidityDate == CLAIM_VALIDITY_DATE, "schedule.claimValidityDate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function test_createClaimableVestingSchedule_noCtx() public { + vm.expectEmit(true, true, true, true); + emit VestingScheduleCreated( + superToken, alice, bob, START_DATE, CLIFF_DATE, FLOW_RATE, END_DATE, CLIFF_TRANSFER_AMOUNT, CLAIM_VALIDITY_DATE, 0); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE + ); + vm.stopPrank(); + + vm.startPrank(alice); + //assert storage data + VestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertTrue(schedule.cliffAndFlowDate == CLIFF_DATE , "schedule.cliffAndFlowDate"); + assertTrue(schedule.endDate == END_DATE , "schedule.endDate"); + assertTrue(schedule.flowRate == FLOW_RATE , "schedule.flowRate"); + assertTrue(schedule.claimValidityDate == CLAIM_VALIDITY_DATE, "schedule.flowRate"); + assertTrue(schedule.cliffAmount == CLIFF_TRANSFER_AMOUNT , "schedule.cliffAmount"); + } + + function test_createClaimableVestingSchedule_wrongData() public { + vm.startPrank(alice); + // revert with superToken = 0 + vm.expectRevert(IVestingSchedulerV2.ZeroAddress.selector); + vestingScheduler.createVestingSchedule( + ISuperToken(address(0)), + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with receivers = sender + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + alice, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with receivers = address(0) + vm.expectRevert(IVestingSchedulerV2.AccountInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + address(0), + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with flowRate = 0 + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + 0, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffDate = 0 but cliffAmount != 0 + vm.expectRevert(IVestingSchedulerV2.CliffInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + 0, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with startDate < block.timestamp && cliffDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + uint32(block.timestamp - 1), + 0, + FLOW_RATE, + 0, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with endDate = 0 + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + 0, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate < block.timestamp + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + 0, + uint32(block.timestamp) - 1, + FLOW_RATE, + 0, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate >= endDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with cliffAndFlowDate + startDateValidFor >= endDate - endDateValidBefore + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with startDate > cliffDate + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + CLIFF_DATE + 1, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + + // revert with vesting duration < 7 days + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + CLIFF_DATE + 2 days, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + + // revert with invalid claim validity date (before schedule/cliff start) + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLIFF_DATE - 1, + EMPTY_CTX + ); + } + + function test_createClaimableVestingSchedule_dataExists() public { + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + vm.expectRevert(IVestingSchedulerV2.ScheduleAlreadyExists.selector); + + vm.startPrank(alice); + vestingScheduler.createVestingSchedule( + superToken, + bob, + START_DATE, + CLIFF_DATE, + FLOW_RATE, + CLIFF_TRANSFER_AMOUNT, + END_DATE, + CLAIM_VALIDITY_DATE, + EMPTY_CTX + ); + vm.stopPrank(); + + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withoutCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 105_840_000; // a value perfectly divisible by a week + uint32 vestingDuration = 1 weeks; + uint32 claimPeriod = 1 days; + int96 expectedFlowRate = 175; // totalVestedAmount / vestingDuration + uint32 expectedEndDate = startDate + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, 0, expectedFlowRate, expectedEndDate, 0, startDate + claimPeriod, 0); + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + claimPeriod, + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + 0, // cliffPeriod + claimPeriod + ); + } + vm.stopPrank(); + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withoutCliff_noStartDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint256 totalVestedAmount = 105_840_000; // a value perfectly divisible by a week + uint32 vestingDuration = 1 weeks; + uint32 claimPeriod = 2 days; + int96 expectedFlowRate = 175; // totalVestedAmount / vestingDuration + uint32 expectedEndDate = uint32(block.timestamp) + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated( + superToken, + alice, + bob, + uint32(block.timestamp), + 0, + expectedFlowRate, + expectedEndDate, + 0, + uint32(block.timestamp) + claimPeriod, + 0 + ); + + vm.startPrank(alice); + + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + 0, + 0, + claimPeriod + ); + vm.stopPrank(); + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withCliff(uint8 randomizer) public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint32 startDate = uint32(block.timestamp); + uint256 totalVestedAmount = 103_680_000; // a value perfectly divisible + uint32 vestingDuration = 1 weeks + 1 days; + uint32 cliffPeriod = 1 days; + uint32 claimPeriod = cliffPeriod + 1 days; + + int96 expectedFlowRate = 150; // (totalVestedAmount - cliffAmount) / (vestingDuration - cliffPeriod) + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, startDate, startDate + cliffPeriod, expectedFlowRate, startDate + vestingDuration, 12960000, startDate + claimPeriod, 0); + + vm.startPrank(alice); + bool useCtx = randomizer % 2 == 0; + if (useCtx) { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + } else { + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + startDate, + cliffPeriod, + claimPeriod + ); + } + vm.stopPrank(); + } + + function test_createClaimableVestingScheduleFromAmountAndDuration_withCliff_noStartDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + vm.stopPrank(); + + uint256 totalVestedAmount = 103_680_000; // a value perfectly divisible + uint32 vestingDuration = 1 weeks + 1 days; + uint32 cliffPeriod = 1 days; + + int96 expectedFlowRate = 150; // (totalVestedAmount - cliffAmount) / (vestingDuration - cliffPeriod) + uint256 expectedCliffAmount = 12960000; + uint32 expectedCliffDate = uint32(block.timestamp) + cliffPeriod; + uint32 claimPeriod = expectedCliffDate + 1 days; + uint32 expectedEndDate = uint32(block.timestamp) + vestingDuration; + + vm.expectEmit(); + emit VestingScheduleCreated(superToken, alice, bob, uint32(block.timestamp), expectedCliffDate, expectedFlowRate, expectedEndDate, expectedCliffAmount, uint32(block.timestamp) + claimPeriod, 0); + + vm.startPrank(alice); + + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalVestedAmount, + vestingDuration, + 0, + cliffPeriod, + claimPeriod + ); + + vm.stopPrank(); + } + + function test_createClaimableScheduleFromAmountAndDuration_wrongData() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.expectRevert(IVestingSchedulerV2.FlowRateInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 0, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 604800, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with cliff and start in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 0, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with overflow."); + vm.expectRevert("SafeCast: value doesn't fit in 96 bits"); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + type(uint256).max, // amount + 1209600, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with underflow/overflow."); + vm.expectRevert(); // todo: the right error + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + type(uint32).max, // duration + uint32(block.timestamp), // startDate + 0, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + + console.log("Revert with start date in history."); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + 1 ether, // amount + 1209600, // duration + uint32(block.timestamp - 1), // startDate + 604800, // cliffPeriod + 15 days, // claimPeriod + EMPTY_CTX + ); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_receiverClaim() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + + vm.prank(bob); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertTrue(success, "executeVesting should return true"); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function test_executeCliffAndFlow_claimAfterEndDate(uint256 delayAfterEndDate, uint256 claimDate, uint8 randomizer) public { + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + + uint256 totalExpectedAmount = CLIFF_TRANSFER_AMOUNT + + (END_DATE - CLIFF_DATE) * + SafeCast.toUint256(FLOW_RATE); + + delayAfterEndDate = bound(delayAfterEndDate, 1, 1e8); + claimDate = bound(claimDate, END_DATE - vestingScheduler.END_DATE_VALID_BEFORE(), END_DATE + delayAfterEndDate); + + _createClaimableVestingScheduleWithClaimDateAfterEndDate(alice, bob, delayAfterEndDate); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.warp(claimDate); + + address claimer = randomizer % 2 == 0 ? bob : alice; + vm.expectEmit(true, true, true, false); + emit VestingClaimed( + superToken, alice, bob, claimer + ); + + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, totalExpectedAmount); + + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, 0, CLIFF_TRANSFER_AMOUNT, totalExpectedAmount - CLIFF_TRANSFER_AMOUNT + ); + + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, 0, false + ); + + IVestingSchedulerV2.VestingSchedule memory schedule = vestingScheduler.getVestingSchedule(address(superToken), alice, bob); + assertEq(vestingScheduler.getMaximumNeededTokenAllowance(schedule), totalExpectedAmount); + + vm.prank(claimer); + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + + assertEq(superToken.balanceOf(alice), aliceInitialBalance - totalExpectedAmount); + assertEq(superToken.balanceOf(bob), bobInitialBalance + totalExpectedAmount); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_senderClaim() public { + uint256 aliceInitialBalance = superToken.balanceOf(alice); + uint256 bobInitialBalance = superToken.balanceOf(bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.startPrank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + uint256 flowDelayCompensation = (block.timestamp - CLIFF_DATE) * uint96(FLOW_RATE); + vm.expectEmit(true, true, true, true); + emit Transfer(alice, bob, CLIFF_TRANSFER_AMOUNT + flowDelayCompensation); + vm.expectEmit(true, true, true, true); + emit VestingCliffAndFlowExecuted( + superToken, alice, bob, CLIFF_DATE, FLOW_RATE, CLIFF_TRANSFER_AMOUNT, flowDelayCompensation + ); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + vm.stopPrank(); + assertTrue(success, "executeVesting should return true"); + uint256 finalTimestamp = block.timestamp + 10 days - 3600; + vm.warp(finalTimestamp); + vm.expectEmit(true, true, true, true); + uint256 timeDiffToEndDate = END_DATE > block.timestamp ? END_DATE - block.timestamp : 0; + uint256 adjustedAmountClosing = timeDiffToEndDate * uint96(FLOW_RATE); + emit Transfer(alice, bob, adjustedAmountClosing); + vm.expectEmit(true, true, true, true); + emit VestingEndExecuted( + superToken, alice, bob, END_DATE, adjustedAmountClosing, false + ); + success = vestingScheduler.executeEndVesting(superToken, alice, bob); + assertTrue(success, "executeCloseVesting should return true"); + uint256 aliceFinalBalance = superToken.balanceOf(alice); + uint256 bobFinalBalance = superToken.balanceOf(bob); + uint256 aliceShouldStream = (END_DATE-CLIFF_DATE) * uint96(FLOW_RATE) + CLIFF_TRANSFER_AMOUNT ; + assertEq(aliceInitialBalance - aliceFinalBalance, aliceShouldStream, "(sender) wrong final balance"); + assertEq(bobFinalBalance, bobInitialBalance + aliceShouldStream, "(receiver) wrong final balance"); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_cannotClaimOnBehalf(address _claimer) public { + vm.assume(_claimer != address(0) && _claimer != alice && _claimer != bob); + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 initialTimestamp = block.timestamp + 10 days + 1800; + vm.warp(initialTimestamp); + vm.prank(_claimer); + vm.expectRevert(IVestingSchedulerV2.CannotClaimScheduleOnBehalf.selector); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_claimBeforeStart() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + uint256 startTimestamp = vestingScheduler.getVestingSchedule(address(superToken), alice, bob).cliffAndFlowDate; + vm.warp(startTimestamp - 1); + + vm.prank(bob); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + } + + function test_executeCliffAndFlow_claimableScheduleWithCliffAmount_claimAfterValidityDate() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.warp(CLAIM_VALIDITY_DATE + 1); + vm.prank(bob); + vm.expectRevert(IVestingSchedulerV2.TimeWindowInvalid.selector); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + } + + function test_executeCliffAndFlow_cannotReexecute() public { + _setACL_AUTHORIZE_FULL_CONTROL(alice, FLOW_RATE); + _createClaimableVestingScheduleWithDefaultData(alice, bob); + vm.prank(alice); + superToken.increaseAllowance(address(vestingScheduler), type(uint256).max); + + vm.warp(CLAIM_VALIDITY_DATE - 1); + vm.startPrank(bob); + bool success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, true); + vm.expectRevert(IVestingSchedulerV2.AlreadyExecuted.selector); + success = vestingScheduler.executeCliffAndFlow(superToken, alice, bob); + assertEq(success, false); + vm.stopPrank(); + } + + function test_getMaximumNeededTokenAllowance_should_end_with_zero_if_extreme_ranges_are_used( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 18250 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + uint256 beforeSenderBalance = superToken.balanceOf(alice); + + totalAmount = bound(totalAmount, 1, beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + // Arrange + IVestingSchedulerV2.VestingSchedule memory expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + 0 + ); + + // Assume we're not getting liquidated at the end: + vm.assume(beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256(expectedSchedule.flowRate)); + + // Arrange allowance + vm.assume(superToken.allowance(alice, address(vestingScheduler)) == 0); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + superToken.setFlowPermissions( + address(vestingScheduler), + true, // allowCreate + false, // allowUpdate + true, // allowDelete, + expectedSchedule.flowRate + ); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(expectedSchedule)); + vm.stopPrank(); + + // Act + vm.startPrank(alice); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + 0, + EMPTY_CTX + ); + vm.stopPrank(); + + // Act + vm.warp(expectedSchedule.cliffAndFlowDate + (vestingScheduler.START_DATE_VALID_AFTER())); + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + + if (randomizer % 2 == 0) { + // Let's set the allowance again half-way through. + vm.startPrank(alice); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(vestingScheduler.getVestingSchedule(address(superToken), alice, bob))); + vm.stopPrank(); + } + + // Act + vm.warp(expectedSchedule.endDate - (vestingScheduler.END_DATE_VALID_BEFORE())); + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + + // Assert + assertEq(superToken.allowance(alice, address(vestingScheduler)), 0, "No allowance should be left"); + (,,,int96 flowRateAllowance) = superToken.getFlowPermissions(alice, address(vestingScheduler)); + assertEq(flowRateAllowance, 0, "No flow rate allowance should be left"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } + + function test_getMaximumNeededTokenAllowance_with_claim_should_end_with_zero_if_extreme_ranges_are_used( + uint256 totalAmount, + uint32 totalDuration, + uint32 cliffPeriod, + uint32 startDate, + uint32 claimPeriod, + uint8 randomizer + ) public { + // Assume + randomizer = SafeCast.toUint8(bound(randomizer, 1, type(uint8).max)); + + if (startDate != 0) { + startDate = SafeCast.toUint32(bound(startDate, block.timestamp, 2524600800)); + } + + claimPeriod = SafeCast.toUint32(bound(claimPeriod, 1, 18250 days)); + vm.assume(claimPeriod >= cliffPeriod); + + totalDuration = SafeCast.toUint32(bound(totalDuration, vestingScheduler.MIN_VESTING_DURATION(), 18250 days)); + vm.assume(cliffPeriod <= totalDuration - vestingScheduler.MIN_VESTING_DURATION()); + + uint256 beforeSenderBalance = superToken.balanceOf(alice); + + totalAmount = bound(totalAmount, 1, beforeSenderBalance); + vm.assume(totalAmount >= totalDuration); + vm.assume(totalAmount / totalDuration <= SafeCast.toUint256(type(int96).max)); + + // Arrange + IVestingSchedulerV2.VestingSchedule memory expectedSchedule = _getExpectedScheduleFromAmountAndDuration( + totalAmount, + totalDuration, + cliffPeriod, + startDate, + claimPeriod + ); + + // Assume we're not getting liquidated at the end: + vm.assume(beforeSenderBalance >= totalAmount + vestingScheduler.END_DATE_VALID_BEFORE() * SafeCast.toUint256(expectedSchedule.flowRate)); + + // Arrange allowance + vm.assume(superToken.allowance(alice, address(vestingScheduler)) == 0); + + vm.startPrank(alice); + superToken.revokeFlowPermissions(address(vestingScheduler)); + bool willThereBeFullTransfer = expectedSchedule.claimValidityDate >= expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE(); + if (!willThereBeFullTransfer) { + // No flow needed in this case. + superToken.setFlowPermissions( + address(vestingScheduler), + true, // allowCreate + false, // allowUpdate + true, // allowDelete, + expectedSchedule.flowRate + ); + } + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(expectedSchedule)); + vm.stopPrank(); + + // Act + vm.startPrank(alice); + vestingScheduler.createVestingScheduleFromAmountAndDuration( + superToken, + bob, + totalAmount, + totalDuration, + startDate, + cliffPeriod, + claimPeriod, + EMPTY_CTX + ); + vm.stopPrank(); + + // Act + vm.warp(expectedSchedule.claimValidityDate); + vm.startPrank(randomizer % 3 == 0 ? alice : bob); // Both sender and receiver can execute + assertTrue(vestingScheduler.executeCliffAndFlow(superToken, alice, bob)); + vm.stopPrank(); + + if (randomizer % 2 == 0) { + // Let's set the allowance again half-way through. + vm.startPrank(alice); + superToken.approve(address(vestingScheduler), vestingScheduler.getMaximumNeededTokenAllowance(vestingScheduler.getVestingSchedule(address(superToken), alice, bob))); + vm.stopPrank(); + } + + // Act + if (!willThereBeFullTransfer) { + vm.warp(expectedSchedule.endDate - vestingScheduler.END_DATE_VALID_BEFORE()); + assertTrue(vestingScheduler.executeEndVesting(superToken, alice, bob)); + } + + // Assert + assertEq(superToken.allowance(alice, address(vestingScheduler)), 0, "No allowance should be left"); + (,,,int96 flowRateAllowance) = superToken.getFlowPermissions(alice, address(vestingScheduler)); + assertEq(flowRateAllowance, 0, "No flow rate allowance should be left"); + + testAssertScheduleDoesNotExist(address(superToken), alice, bob); + } +} diff --git a/packages/ethereum-contracts/.env.template b/packages/ethereum-contracts/.env.template index eb2de0bb10..3d272227f2 100644 --- a/packages/ethereum-contracts/.env.template +++ b/packages/ethereum-contracts/.env.template @@ -11,8 +11,8 @@ # _GAS_PRICE # Example for the Görli Ethereum testnet: -ETH_GOERLI_PROVIDER_URL=https://goerli.infura.io/v3/ -ETH_GOERLI_MNEMONIC="rigid cradle south ..." +ETH_MAINNET_PROVIDER_URL=https://mainnet.infura.io/v3/ +ETH_MAINNET_MNEMONIC="rigid cradle south ..." # Fallback mnemonic for all networks - used if no network specific mnemonic is set @@ -25,7 +25,7 @@ DEFAULT_MNEMONIC="rigid cradle south ..." # A few scripts do subgraph queries, for those an endpoint must be configured -#ETH_GOERLI_SUBGRAPH_ENDPOINT=... +#ETH_MAINNET_SUBGRAPH_ENDPOINT=... # # Alternatively, you can also provide an endpoint template #SUBGRAPH_ENDPOINT_TEMPLATE=https://{{NETWORK}}.subgraph.mydomain.xyz diff --git a/packages/ethereum-contracts/.eslintrc.ts.json b/packages/ethereum-contracts/.eslintrc.ts.json index 04b71f8510..1328ba6cde 100644 --- a/packages/ethereum-contracts/.eslintrc.ts.json +++ b/packages/ethereum-contracts/.eslintrc.ts.json @@ -21,6 +21,8 @@ "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/no-unused-expressions": "off", "eslint-comments/disable-enable-pair": [ "error", { diff --git a/packages/ethereum-contracts/.solcover.js b/packages/ethereum-contracts/.solcover.js index b78b382805..9c1c98fa12 100644 --- a/packages/ethereum-contracts/.solcover.js +++ b/packages/ethereum-contracts/.solcover.js @@ -9,7 +9,7 @@ module.exports = { // we skip the coverage for the SuperAppBase contracts because // we override the functions in child contracts "apps/SuperAppBase.sol", - "apps/SuperAppBaseFlow.sol", + "apps/CFASuperAppBase.sol", "apps/SuperfluidLoaderLibrary.sol", // we skip the coverage for these contracts because they are diff --git a/packages/ethereum-contracts/.solhint.json b/packages/ethereum-contracts/.solhint.json index 9cbc0f0f15..86c3f4d7b6 100644 --- a/packages/ethereum-contracts/.solhint.json +++ b/packages/ethereum-contracts/.solhint.json @@ -3,14 +3,14 @@ "rules": { "no-inline-assembly": "off", "func-named-parameters": "off", + "gas-custom-errors": "off", + "one-contract-per-file": "off", + "explicit-types": ["off"], "func-name-mixedcase": "error", "func-param-name-mixedcase": "error", "modifier-name-mixedcase": "error", "const-name-snakecase": "error", "immutable-vars-naming": ["off", { "immutablesAsConstants" : false }], - "explicit-types": ["off"], - "custom-errors": "off", - "one-contract-per-file": "off", "reason-string": ["error", { "maxLength": 64 }], "compiler-version": ["off"], "constructor-syntax": "error", diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 7e479b8956..4d231830ab 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -3,7 +3,86 @@ All notable changes to the ethereum-contracts will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## [Unreleased] + +### Changed + +* `IUserDefinedMacro`: added a method `postCheck()` which allows to verify state changes after running the macro. + +## [v1.11.0] + +### Breaking + +- FlowNFTs are being deprecated. The hooks aren't invoked anymore by CFA and GDA. + +## [v1.10.0] + +### Breaking + +- ISuperfuidPool self-transfer is not allowed. +- FoundrySuperfluidTester is test with forge-std@v1.9.1, which may break with 1.7.x and prio forge-std lib. +- Removing SafeGasLibrary, in favor of CallbackUtils. + +### Added + +- `batchCall` now supports 4 additional operation types: + - `OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO` + - `OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO` + - `OPERATION_TYPE_SIMPLE_FORWARD_CALL` + - `OPERATION_TYPE_ERC2771_FORWARD_CALL` + The latter 2 allow to add arbitrary contract calls to batch call. +- Solidity library CallbackUtils for dealing with EIP-150 1/64-rule for callbacks. + +### Changed + +- increase SuperApp callback gas limit on some chains, to be queried with `host.CALLBACK_GAS_LIMIT()` +- Remove try/catch in PoolNFT callbacks. +- upgrade flake locked foundry: 0.2.0 (20b3da1 2024-07-02T00:18:52.435480726Z). +- relax pragram solidity with "^0.8.23". +- bump solc to 0.8.26. +- Faster SuperAppMockAux._burnGas implementation. +- foundry test reorg: + - rename '.prop.sol' to '.prop.t.sol'; + - mark mock-contract files with 't.sol' to be skipped by foundry build automatically; + - move some mock contracts to test/foundry if they are only used for foundry tests. + +## Fixes + +- Fix a few types and build warnings. +- Make testTokenURIIsExpected work with non via-ir pipeline. + +## [v1.9.1] - 2024-03-19 + +### Breaking + +- The abstract base contract`SuperAppBaseFlow` was renamed to `CFASuperAppBase` and doesn't self-register in the constructor anymore. +This allows the contract to be used with a SuperApp factory pattern and by logic contracts in the context of the proxy pattern. +Note: this will NOT break any deployed contracts, only affects undeployed Super Apps in case the ethereum-contracts dependency is updated. +- `UniversalIndexData`, `PoolMemberData` and `FlowDistributionData` structs moved from `IGeneralDistributionAgreementV1.sol` to `GeneralDistributionAgreementV1.sol` +- `PoolIndexData`, `MemberData` structs moved from `ISuperfluidPool.sol` to `SuperfluidPool.sol` + +### Added + +- New utility: MacroForwarder - a trusted forwarder extensible with permission-less macro contracts. +- New protocol contract view functions: + - `gdaV1.getFlow` + - `gdaV1.getAccountFlowInfo` + - `pool.poolOperatorGetIndex` + - `pool.getTotalAmountReceivedByMember` +- New SuperTokenV1Library functions: + - `getGDAFlowInfo` + - `getGDANetFlowInfo` + - `getPoolAdjustmentFlowRate` + - `getTotalAmountReceivedByMember` + +### Changed + +- bump solc to 0.8.23 +- `superTokenV1Library.getNetFlowInfo` sums CFA and GDA net flow info + +### Fixes + +- FlowNFT hooks can't revert with outofgas anymore ### Added @@ -45,6 +124,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Fixes - [`dev-scripts/deploy-test-framework.js`](dev-scripts/deploy-test-framework.js) compatible with both ethers-v5 and ethers-v6 now +- `distribute` and `distributeWithCtx` API made consistent ## [v1.8.1] - 2023-08-28 diff --git a/packages/ethereum-contracts/README.md b/packages/ethereum-contracts/README.md index 29612c3401..c13774902d 100644 --- a/packages/ethereum-contracts/README.md +++ b/packages/ethereum-contracts/README.md @@ -35,7 +35,7 @@ If you're building a smart contract that uses Superfluid protocol, or even your ### Installation Prerequisites: -- [node.js v16+](https://nodejs.org/en/download) +- [node.js v18+](https://nodejs.org/en/download). The project recommends 22, and is tested with node 18,20,22. - [yarn](https://classic.yarnpkg.com/en/docs/install) - [forge](https://book.getfoundry.sh/getting-started/installation) @@ -147,7 +147,7 @@ function _assertFlowOperatorData(AssertFlowOperatorData memory data) internal { } ``` -It is also recommended to create an pass structs to the helper functions to make the test code more readable. For example: +It is also recommended to create and pass structs to the helper functions to make the test code more readable. For example: ```solidity // this is easier to understand what is going on before reading the _assertFlowOperatorData function @@ -250,7 +250,7 @@ If you want contribute to Superfluid protocol contracts instead of just interfac ### Setup Development Environment -Prerequisites: You need node.js v16+ and yarn installed. +Prerequisites: You need node.js v18+ and yarn installed. First, check out this repository and cd into it. ```sh @@ -271,7 +271,7 @@ cd packages/ethereum-contracts/ ``` Then prepare an `.env` file (see `.env.template`). -The most important config items are RPC endpoint (`_PROVIDER_URL`) and a sender account (`_MNEMONIC`), __ being a network specific prefix - e.g. `GOERLI_PROVIDER_URL`. +The most important config items are RPC endpoint (`_PROVIDER_URL`) and a sender account (`_MNEMONIC`), __ being a network specific prefix - e.g. `OPTIMISM_MAINNET_PROVIDER_URL`. If you provide an actual mnemonic, the key derived at `m/44'/60'/0'/0/0` will be used. You can instead also set private keys (hex format) for `_MNEMONIC`. In order to get an overview of available config items, look for instances of `process.env` in [truffle-config.js](truffle-config.js) and in files in the [scripts](scripts) folder. diff --git a/packages/ethereum-contracts/audits/2023-12 Trail of Bits - Changes Since Audit.md b/packages/ethereum-contracts/audits/2023-12 Trail of Bits - Changes Since Audit.md index 430ef2d5e0..e8335c985e 100644 --- a/packages/ethereum-contracts/audits/2023-12 Trail of Bits - Changes Since Audit.md +++ b/packages/ethereum-contracts/audits/2023-12 Trail of Bits - Changes Since Audit.md @@ -10,4 +10,19 @@ Use `git diff 4ece1a3f4aff8b5a9cbf37118d261023960c0f0f.. packages/ethereum-contr - `PoolConnectionUpdated` event only emitted if the connection was changed ### SuperfluidPool -The method for obtaining timestamps and checking member connections is updated to use Superfluid framework methods instead of Ethereum's native functionalities. \ No newline at end of file +The method for obtaining timestamps and checking member connections is updated to use Superfluid framework methods instead of Ethereum's native functionalities. + +### SuperfluidPoolPlaceholder +- A contract to be used on the first deployment (upgrade case) of the GDA to prevent circular dependency between GDA and SuperfluidPool + +### SuperfluidGovernanceBase +- `updatePoolBeaconLogic` added for updating the pool beacon logic + +### Superfluid +- `updatePoolBeaconLogic` added for updating the pool beacon logic (to be called via Governance) + +### SafeGasLibrary +- `gasleft() <= gasLeftBefore / 63` => `gasleft() <= gasLeftBefore / 64` per the recommendation from the audit + +### NFT Contracts +- Agreements passed to the constructor due to issues that we ran into during the deployment process \ No newline at end of file diff --git a/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol b/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol index 0cc2968d1e..aae9e32c0d 100644 --- a/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol +++ b/packages/ethereum-contracts/contracts/agreements/AgreementBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { ISuperAgreement } from "../interfaces/superfluid/ISuperAgreement.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol b/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol index c2bb52491a..6d7324c214 100644 --- a/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol +++ b/packages/ethereum-contracts/contracts/agreements/AgreementLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol index d383e8ca97..bf225b729b 100644 --- a/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/ConstantFlowAgreementV1.sol @@ -1,23 +1,20 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidGovernance, ISuperApp, - ISuperToken, ISuperfluidToken, IConstantFlowAgreementV1, FlowOperatorDefinitions, SuperAppDefinitions, ContextDefinitions, - SuperfluidGovernanceConfigs, - IConstantOutflowNFT + SuperfluidGovernanceConfigs } from "../interfaces/superfluid/ISuperfluid.sol"; import { AgreementBase } from "./AgreementBase.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { AgreementLibrary } from "./AgreementLibrary.sol"; -import { SafeGasLibrary } from "../libs/SafeGasLibrary.sol"; import { SolvencyHelperLibrary } from "../libs/SolvencyHelperLibrary.sol"; /** @@ -432,100 +429,6 @@ contract ConstantFlowAgreementV1 is if (flowParams.flowRate <= 0) revert CFA_INVALID_FLOW_RATE(); } - - /** - * @notice Checks whether or not the NFT hook can be called. - * @dev A staticcall, so `CONSTANT_OUTFLOW_NFT` must be a view otherwise the assumption is that it reverts - * @param token the super token that is being streamed - * @return constantOutflowNFTAddress the address returned by low level call - */ - function _canCallNFTHook( - ISuperfluidToken token - ) internal view returns (address constantOutflowNFTAddress) { - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory data) = address(token).staticcall( - abi.encodeWithSelector(ISuperToken.CONSTANT_OUTFLOW_NFT.selector) - ); - - if (success) { - // @note We are aware this may revert if a Custom SuperToken's - // CONSTANT_OUTFLOW_NFT does not return data that can be - // decoded to an address. This would mean it was intentionally - // done by the creator of the Custom SuperToken logic and is - // fully expected to revert in that case as the author desired. - constantOutflowNFTAddress = abi.decode(data, (address)); - } - } - - function _handleOnCreateHook( - _StackVars_createOrUpdateFlow memory flowVars - ) internal { - uint256 gasLeftBefore = gasleft(); - - address constantOutflowNFTAddress = _canCallNFTHook(flowVars.token); - - if (constantOutflowNFTAddress != address(0)) { - try - IConstantOutflowNFT(constantOutflowNFTAddress).onCreate( - flowVars.token, - flowVars.sender, - flowVars.receiver - ) - // solhint-disable-next-line no-empty-blocks - { - - } catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - } - } - - function _handleOnUpdateHook( - _StackVars_createOrUpdateFlow memory flowVars - ) internal { - uint256 gasLeftBefore = gasleft(); - - address constantOutflowNFTAddress = _canCallNFTHook(flowVars.token); - - if (constantOutflowNFTAddress != address(0)) { - try - IConstantOutflowNFT(constantOutflowNFTAddress).onUpdate( - flowVars.token, - flowVars.sender, - flowVars.receiver - ) - // solhint-disable-next-line no-empty-blocks - { - - } catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - } - } - - function _handleOnDeleteHook( - _StackVars_createOrUpdateFlow memory flowVars - ) internal { - uint256 gasLeftBefore = gasleft(); - - address constantOutflowNFTAddress = _canCallNFTHook(flowVars.token); - - if (constantOutflowNFTAddress != address(0)) { - try - IConstantOutflowNFT(constantOutflowNFTAddress).onDelete( - flowVars.token, - flowVars.sender, - flowVars.receiver - ) - // solhint-disable-next-line no-empty-blocks - { - - } catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - } - } - function _createFlow( _StackVars_createOrUpdateFlow memory flowVars, bytes calldata ctx, @@ -551,8 +454,6 @@ contract ConstantFlowAgreementV1 is } _requireAvailableBalance(flowVars.token, flowVars.sender, currentContext); - - _handleOnCreateHook(flowVars); } function _updateFlow( @@ -581,8 +482,6 @@ contract ConstantFlowAgreementV1 is } _requireAvailableBalance(flowVars.token, flowVars.sender, currentContext); - - _handleOnUpdateHook(flowVars); } function _deleteFlow( @@ -693,8 +592,6 @@ contract ConstantFlowAgreementV1 is newCtx, currentContext); } } - - _handleOnDeleteHook(flowVars); } /************************************************************************** diff --git a/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol index dabefd3432..6bd8a6740b 100644 --- a/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/InstantDistributionAgreementV1.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol index 19be6f0955..846967aec7 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol @@ -1,9 +1,8 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable not-rely-on-time -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; -import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; import { ISuperfluid, ISuperfluidGovernance } from "../../interfaces/superfluid/ISuperfluid.sol"; import { @@ -15,23 +14,23 @@ import { FlowRate } from "@superfluid-finance/solidity-semantic-money/src/SemanticMoney.sol"; import { TokenMonad } from "@superfluid-finance/solidity-semantic-money/src/TokenMonad.sol"; -import { SuperfluidPool } from "./SuperfluidPool.sol"; +import { poolIndexDataToPDPoolIndex, SuperfluidPool } from "./SuperfluidPool.sol"; import { SuperfluidPoolDeployerLibrary } from "./SuperfluidPoolDeployerLibrary.sol"; import { IGeneralDistributionAgreementV1, PoolConfig } from "../../interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; +import { SuperfluidUpgradeableBeacon } from "../../upgradability/SuperfluidUpgradeableBeacon.sol"; import { ISuperfluidToken } from "../../interfaces/superfluid/ISuperfluidToken.sol"; -import { IConstantOutflowNFT } from "../../interfaces/superfluid/IConstantOutflowNFT.sol"; import { ISuperToken } from "../../interfaces/superfluid/ISuperToken.sol"; import { IPoolAdminNFT } from "../../interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPool.sol"; import { SlotsBitmapLibrary } from "../../libs/SlotsBitmapLibrary.sol"; import { SolvencyHelperLibrary } from "../../libs/SolvencyHelperLibrary.sol"; -import { SafeGasLibrary } from "../../libs/SafeGasLibrary.sol"; import { AgreementBase } from "../AgreementBase.sol"; import { AgreementLibrary } from "../AgreementLibrary.sol"; + /** * @title General Distribution Agreement * @author Superfluid @@ -80,6 +79,25 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi using SafeCast for int256; using SemanticMoney for BasicParticle; + struct UniversalIndexData { + int96 flowRate; + uint32 settledAt; + uint256 totalBuffer; + bool isPool; + int256 settledValue; + } + + struct PoolMemberData { + address pool; + uint32 poolID; // the slot id in the pool's subs bitmap + } + + struct FlowDistributionData { + uint32 lastUpdated; + int96 flowRate; + uint256 buffer; // stored as uint96 + } + address public constant SLOTS_BITMAP_LIBRARY_ADDRESS = address(SlotsBitmapLibrary); address public constant SUPERFLUID_POOL_DEPLOYER_ADDRESS = address(SuperfluidPoolDeployerLibrary); @@ -94,11 +112,9 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi bytes32 private constant SUPERTOKEN_MINIMUM_DEPOSIT_KEY = keccak256("org.superfluid-finance.superfluid.superTokenMinimumDeposit"); - IBeacon public superfluidPoolBeacon; + SuperfluidUpgradeableBeacon public immutable superfluidPoolBeacon; - constructor(ISuperfluid host) AgreementBase(address(host)) { } - - function initialize(IBeacon superfluidPoolBeacon_) external initializer { + constructor(ISuperfluid host, SuperfluidUpgradeableBeacon superfluidPoolBeacon_) AgreementBase(address(host)) { superfluidPoolBeacon = superfluidPoolBeacon_; } @@ -131,6 +147,7 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi rtb += fromPools; buf = uint256(universalIndexData.totalBuffer.toInt256()); // upcasting to uint256 is safe + owedBuffer = 0; } /// @dev ISuperAgreement.realtimeBalanceOf implementation @@ -171,6 +188,32 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi return data.flowRate; } + /// @inheritdoc IGeneralDistributionAgreementV1 + function getFlow(ISuperfluidToken token, address from, ISuperfluidPool to) + external + view + override + returns (uint256 lastUpdated, int96 flowRate, uint256 deposit) + { + (, FlowDistributionData memory data) = _getFlowDistributionData(token, _getFlowDistributionHash(from, to)); + lastUpdated = data.lastUpdated; + flowRate = data.flowRate; + deposit = data.buffer; + } + + /// @inheritdoc IGeneralDistributionAgreementV1 + function getAccountFlowInfo(ISuperfluidToken token, address account) + external + view + override + returns (uint256 timestamp, int96 flowRate, uint256 deposit) + { + UniversalIndexData memory universalIndexData = _getUIndexData(abi.encode(token), account); + timestamp = universalIndexData.settledAt; + flowRate = universalIndexData.flowRate; + deposit = universalIndexData.totalBuffer; + } + /// @inheritdoc IGeneralDistributionAgreementV1 function estimateFlowDistributionActualFlowRate( ISuperfluidToken token, @@ -243,12 +286,7 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi IPoolAdminNFT poolAdminNFT = IPoolAdminNFT(_getPoolAdminNFTAddress(token)); if (address(poolAdminNFT) != address(0)) { - uint256 gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolAdminNFT.mint(address(pool)) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } + poolAdminNFT.mint(address(pool)); } emit PoolCreated(token, admin, pool); @@ -334,7 +372,7 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi _clearPoolConnectionsBitmap(token, msgSender, poolMemberData.poolID); } - + emit PoolConnectionUpdated(token, pool, msgSender, doConnect, currentContext.userData); } } @@ -429,6 +467,16 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi FlowRate oldFlowRate; } + // solhint-disable-next-line contract-name-camelcase + struct _StackVars_Liquidation { + ISuperfluidToken token; + int256 availableBalance; + address sender; + bytes32 distributionFlowHash; + int256 signedTotalGDADeposit; + address liquidator; + } + /// @inheritdoc IGeneralDistributionAgreementV1 function distributeFlow( ISuperfluidToken token, @@ -483,7 +531,7 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi // liquidation case, requestedFlowRate == 0 (int256 availableBalance,,) = token.realtimeBalanceOf(from, flowVars.currentContext.timestamp); // StackVarsLiquidation used to handle good ol' stack too deep - StackVarsLiquidation memory liquidationData; + _StackVars_Liquidation memory liquidationData; { liquidationData.token = token; liquidationData.sender = from; @@ -516,44 +564,6 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi } } - // handleFlowNFT() - mint/burn FlowNFT to flow distributor - { - address constantOutflowNFTAddress = _getConstantOutflowNFTAddress(token); - - if (constantOutflowNFTAddress != address(0)) { - uint256 gasLeftBefore; - // create flow (mint) - if (requestedFlowRate > 0 && FlowRate.unwrap(flowVars.oldFlowRate) == 0) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try IConstantOutflowNFT(constantOutflowNFTAddress).onCreate(token, from, address(pool)) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - } - - // update flow (update metadata) - if (requestedFlowRate > 0 && FlowRate.unwrap(flowVars.oldFlowRate) > 0) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try IConstantOutflowNFT(constantOutflowNFTAddress).onUpdate(token, from, address(pool)) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - } - - // delete flow (burn) - if (requestedFlowRate == 0) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try IConstantOutflowNFT(constantOutflowNFTAddress).onDelete(token, from, address(pool)) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - } - } - } - { (address adjustmentFlowRecipient,, int96 adjustmentFlowRate) = _getPoolAdjustmentFlowInfo(abi.encode(token), address(pool)); @@ -573,31 +583,6 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi } } - /** - * @notice Checks whether or not the NFT hook can be called. - * @dev A staticcall, so `CONSTANT_OUTFLOW_NFT` must be a view otherwise the assumption is that it reverts - * @param token the super token that is being streamed - * @return constantOutflowNFTAddress the address returned by low level call - */ - function _getConstantOutflowNFTAddress(ISuperfluidToken token) - internal - view - returns (address constantOutflowNFTAddress) - { - // solhint-disable-next-line avoid-low-level-calls - (bool success, bytes memory data) = - address(token).staticcall(abi.encodeWithSelector(ISuperToken.CONSTANT_OUTFLOW_NFT.selector)); - - if (success) { - // @note We are aware this may revert if a Custom SuperToken's - // CONSTANT_OUTFLOW_NFT does not return data that can be - // decoded to an address. This would mean it was intentionally - // done by the creator of the Custom SuperToken logic and is - // fully expected to revert in that case as the author desired. - constantOutflowNFTAddress = abi.decode(data, (address)); - } - } - function _getPoolAdminNFTAddress(ISuperfluidToken token) internal view returns (address poolAdminNFTAddress) { // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory data) = @@ -613,7 +598,7 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi } } - function _makeLiquidationPayouts(StackVarsLiquidation memory data) internal { + function _makeLiquidationPayouts(_StackVars_Liquidation memory data) internal { (, FlowDistributionData memory flowDistributionData) = _getFlowDistributionData(ISuperfluidToken(data.token), data.distributionFlowHash); int256 signedSingleDeposit = flowDistributionData.buffer.toInt256(); @@ -871,8 +856,8 @@ contract GeneralDistributionAgreementV1 is AgreementBase, TokenMonad, IGeneralDi bytes memory, // eff, address pool ) internal view override returns (PDPoolIndex memory) { - ISuperfluidPool.PoolIndexData memory data = SuperfluidPool(pool).getIndex(); - return SuperfluidPool(pool).poolIndexDataToPDPoolIndex(data); + SuperfluidPool.PoolIndexData memory data = SuperfluidPool(pool).poolOperatorGetIndex(); + return poolIndexDataToPDPoolIndex(data); } function _setPDPIndex(bytes memory eff, address pool, PDPoolIndex memory p) diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol index 937fd09ab6..4b86cb5b83 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { IPoolAdminNFT } from "../../interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { PoolNFTBase } from "./PoolNFTBase.sol"; -import { ISuperfluid } from "../../interfaces/superfluid/ISuperfluid.sol"; +import { IGeneralDistributionAgreementV1, ISuperfluid } from "../../interfaces/superfluid/ISuperfluid.sol"; import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPool.sol"; import { ISuperfluidToken } from "../../interfaces/superfluid/ISuperfluidToken.sol"; @@ -22,7 +22,7 @@ contract PoolAdminNFT is PoolNFTBase, IPoolAdminNFT { /// @dev The token id is uint256(keccak256(abi.encode(pool, admin))) mapping(uint256 => PoolAdminNFTData) internal _poolAdminDataByTokenId; - constructor(ISuperfluid host) PoolNFTBase(host) { } + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolNFTBase(host, gdaV1) { } // note that this is used so we don't upgrade to wrong logic contract function proxiableUUID() public pure override returns (bytes32) { diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol index 8999f09a98..2387806555 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { IPoolMemberNFT } from "../../interfaces/agreements/gdav1/IPoolMemberNFT.sol"; import { PoolNFTBase } from "./PoolNFTBase.sol"; -import { ISuperfluid } from "../../interfaces/superfluid/ISuperfluid.sol"; +import { IGeneralDistributionAgreementV1, ISuperfluid } from "../../interfaces/superfluid/ISuperfluid.sol"; import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPool.sol"; import { ISuperfluidToken } from "../../interfaces/superfluid/ISuperfluidToken.sol"; @@ -22,7 +22,7 @@ contract PoolMemberNFT is PoolNFTBase, IPoolMemberNFT { /// @dev The token id is uint256(keccak256(abi.encode(pool, member))) mapping(uint256 => PoolMemberNFTData) internal _poolMemberDataByTokenId; - constructor(ISuperfluid host) PoolNFTBase(host) { } + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolNFTBase(host, gdaV1) { } // note that this is used so we don't upgrade to wrong logic contract function proxiableUUID() public pure override returns (bytes32) { diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol index bda4fe2e90..c0a061103c 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // Notes: We use reserved slots for upgradable contracts. // solhint-disable max-states-count @@ -8,10 +8,9 @@ pragma solidity 0.8.19; // solhint-disable-next-line no-unused-import import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { UUPSProxiable } from "../../upgradability/UUPSProxiable.sol"; -import { ISuperfluid } from "../../interfaces/superfluid/ISuperfluid.sol"; +import { IGeneralDistributionAgreementV1, ISuperfluid } from "../../interfaces/superfluid/ISuperfluid.sol"; import { ISuperTokenFactory } from "../../interfaces/superfluid/ISuperTokenFactory.sol"; import { IPoolNFTBase } from "../../interfaces/agreements/gdav1/IPoolNFTBase.sol"; -import { IGeneralDistributionAgreementV1 } from "../../interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; abstract contract PoolNFTBase is UUPSProxiable, IPoolNFTBase { string public constant DEFAULT_BASE_URI = "https://nft.superfluid.finance/pool/v2/getmeta"; @@ -68,15 +67,9 @@ abstract contract PoolNFTBase is UUPSProxiable, IPoolNFTBase { uint256 private _reserve20; uint256 internal _reserve21; - constructor(ISuperfluid host) { + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) { HOST = host; - GENERAL_DISTRIBUTION_AGREEMENT_V1 = IGeneralDistributionAgreementV1( - address( - ISuperfluid(host).getAgreementClass( - keccak256("org.superfluid-finance.agreements.GeneralDistributionAgreement.v1") - ) - ) - ); + GENERAL_DISTRIBUTION_AGREEMENT_V1 = gdaV1; } function initialize(string memory nftName, string memory nftSymbol) diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol index fcb5714a4a..4dd9ad344f 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPool.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable not-rely-on-time -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // Notes: We use these interfaces in natspec documentation below, grep @inheritdoc // solhint-disable-next-line no-unused-import @@ -24,7 +24,36 @@ import { ISuperfluidPool } from "../../interfaces/agreements/gdav1/ISuperfluidPo import { GeneralDistributionAgreementV1 } from "../../agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { BeaconProxiable } from "../../upgradability/BeaconProxiable.sol"; import { IPoolMemberNFT } from "../../interfaces/agreements/gdav1/IPoolMemberNFT.sol"; -import { SafeGasLibrary } from "../../libs/SafeGasLibrary.sol"; + +using SafeCast for uint256; +using SafeCast for int256; + +function toSemanticMoneyUnit(uint128 units) pure returns (Unit) { + // @note safe upcasting from uint128 to uint256 + // and use of safecast library for downcasting from uint256 to int128 + return Unit.wrap(uint256(units).toInt256().toInt128()); +} + +function poolIndexDataToWrappedParticle(SuperfluidPool.PoolIndexData memory data) + pure + returns (BasicParticle memory wrappedParticle) +{ + wrappedParticle = BasicParticle({ + _settled_at: Time.wrap(data.wrappedSettledAt), + _flow_rate: FlowRate.wrap(int128(data.wrappedFlowRate)), // upcast from int96 is safe + _settled_value: Value.wrap(data.wrappedSettledValue) + }); +} + +function poolIndexDataToPDPoolIndex(SuperfluidPool.PoolIndexData memory data) + pure + returns (PDPoolIndex memory pdPoolIndex) +{ + pdPoolIndex = PDPoolIndex({ + total_units: toSemanticMoneyUnit(data.totalUnits), + _wrapped_particle: poolIndexDataToWrappedParticle(data) + }); +} /** * @title SuperfluidPool @@ -34,8 +63,24 @@ import { SafeGasLibrary } from "../../libs/SafeGasLibrary.sol"; */ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { using SemanticMoney for BasicParticle; - using SafeCast for uint256; - using SafeCast for int256; + + // Structs + struct PoolIndexData { + uint128 totalUnits; + uint32 wrappedSettledAt; + int96 wrappedFlowRate; + int256 wrappedSettledValue; + } + + struct MemberData { + uint128 ownedUnits; + uint32 syncedSettledAt; + int96 syncedFlowRate; + int256 syncedSettledValue; + int256 settledValue; + int256 claimedValue; + } + GeneralDistributionAgreementV1 public immutable GDA; @@ -76,7 +121,8 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { return keccak256("org.superfluid-finance.contracts.SuperfluidPool.implementation"); } - function getIndex() external view returns (PoolIndexData memory) { + /// @dev This function is only meant to be called by the GDAv1 contract + function poolOperatorGetIndex() external view returns (PoolIndexData memory) { return _index; } @@ -138,6 +184,7 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { } function _transfer(address from, address to, uint256 amount) internal { + if (from == to) revert SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED(); if (!transferabilityForUnitsOwner) revert SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED(); uint128 fromUnitsBefore = _getUnits(from); @@ -214,6 +261,21 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { return Value.unwrap(PDPoolMemberMU(pdPoolIndex, pdPoolMember).rtb(Time.wrap(time))); } + /// @inheritdoc ISuperfluidPool + function getTotalAmountReceivedByMember(address memberAddr) external view override returns (uint256) { + MemberData memory memberData = _membersData[memberAddr]; + + // max timestamp is uint32.max + return uint256( + Value.unwrap( + // PDPoolMemberMU(poolIndex, memberData) + PDPoolMemberMU(poolIndexDataToPDPoolIndex(_index), _memberDataToPDPoolMember(memberData)).settle( + Time.wrap(uint32(block.timestamp)) + ).m._settled_value + ) + ); + } + /// @inheritdoc ISuperfluidPool function getMemberFlowRate(address memberAddr) external view override returns (int96) { uint128 units = _getUnits(memberAddr); @@ -222,29 +284,6 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { else return (_index.wrappedFlowRate * uint256(units).toInt256()).toInt96(); } - function _poolIndexDataToWrappedParticle(PoolIndexData memory data) - internal - pure - returns (BasicParticle memory wrappedParticle) - { - wrappedParticle = BasicParticle({ - _settled_at: Time.wrap(data.wrappedSettledAt), - _flow_rate: FlowRate.wrap(int128(data.wrappedFlowRate)), // upcast from int96 is safe - _settled_value: Value.wrap(data.wrappedSettledValue) - }); - } - - function poolIndexDataToPDPoolIndex(PoolIndexData memory data) - public - pure - returns (PDPoolIndex memory pdPoolIndex) - { - pdPoolIndex = PDPoolIndex({ - total_units: _toSemanticMoneyUnit(data.totalUnits), - _wrapped_particle: _poolIndexDataToWrappedParticle(data) - }); - } - function _pdPoolIndexToPoolIndexData(PDPoolIndex memory pdPoolIndex) internal pure @@ -264,7 +303,7 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { returns (PDPoolMember memory pdPoolMember) { pdPoolMember = PDPoolMember({ - owned_units: _toSemanticMoneyUnit(memberData.ownedUnits), + owned_units: toSemanticMoneyUnit(memberData.ownedUnits), _synced_particle: BasicParticle({ _settled_at: Time.wrap(memberData.syncedSettledAt), _flow_rate: FlowRate.wrap(int128(memberData.syncedFlowRate)), // upcast from int96 is safe @@ -274,12 +313,6 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { }); } - function _toSemanticMoneyUnit(uint128 units) internal pure returns (Unit) { - // @note safe upcasting from uint128 to uint256 - // and use of safecast library for downcasting from uint256 to int128 - return Unit.wrap(uint256(units).toInt256().toInt128()); - } - function _pdPoolMemberToMemberData(PDPoolMember memory pdPoolMember, int256 claimedValue) internal pure @@ -351,33 +384,17 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { IPoolMemberNFT poolMemberNFT = IPoolMemberNFT(_canCallNFTHook(superToken)); if (address(poolMemberNFT) != address(0)) { uint256 tokenId = poolMemberNFT.getTokenId(address(this), memberAddr); - uint256 gasLeftBefore; if (newUnits == 0) { if (poolMemberNFT.poolMemberDataByTokenId(tokenId).member != address(0)) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolMemberNFT.onDelete(address(this), memberAddr) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } + poolMemberNFT.onDelete(address(this), memberAddr); } } else { // if not minted, we mint a new pool member nft if (poolMemberNFT.poolMemberDataByTokenId(tokenId).member == address(0)) { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolMemberNFT.onCreate(address(this), memberAddr) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } - // if minted, we update the pool member nft + poolMemberNFT.onCreate(address(this), memberAddr); } else { - gasLeftBefore = gasleft(); - // solhint-disable-next-line no-empty-blocks - try poolMemberNFT.onUpdate(address(this), memberAddr) { } - catch { - SafeGasLibrary._revertWhenOutOfGas(gasLeftBefore); - } + // if minted, we update the pool member nft + poolMemberNFT.onUpdate(address(this), memberAddr); } } } @@ -391,7 +408,7 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { uint32 time = uint32(ISuperfluid(superToken.getHost()).getNow()); Time t = Time.wrap(time); - Unit wrappedUnits = _toSemanticMoneyUnit(newUnits); + Unit wrappedUnits = toSemanticMoneyUnit(newUnits); PDPoolIndex memory pdPoolIndex = poolIndexDataToPDPoolIndex(_index); MemberData memory memberData = _membersData[memberAddr]; @@ -403,12 +420,7 @@ contract SuperfluidPool is ISuperfluidPool, BeaconProxiable { // update pool's disconnected units if (!GDA.isMemberConnected(ISuperfluidPool(address(this)), memberAddr)) { - // trigger the side effect of claiming all if not connected - // @note claiming is a bit surprising here given the function name - int256 claimedAmount = _claimAll(memberAddr, time); - - // update pool's disconnected units - _shiftDisconnectedUnits(wrappedUnits - mu.m.owned_units, Value.wrap(claimedAmount), t); + _shiftDisconnectedUnits(wrappedUnits - mu.m.owned_units, Value.wrap(0), t); } // update pool member's units diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol index c3699a2c41..a54019225f 100644 --- a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolDeployerLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { BeaconProxy } from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import { ISuperfluidToken } from "../../interfaces/superfluid/ISuperfluidToken.sol"; diff --git a/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol new file mode 100644 index 0000000000..491492765b --- /dev/null +++ b/packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: AGPLv3 +// solhint-disable not-rely-on-time +pragma solidity ^0.8.23; + +import { BeaconProxiable } from "../../upgradability/BeaconProxiable.sol"; + +/** + * @title used on first deployment (upgrade case) of GDA + * in order to solve the circular dependency between GDA and SuperfluidPool + */ +contract SuperfluidPoolPlaceholder is BeaconProxiable { + // don't allow to create instances of the placeholder + function initialize(address, address, bool ,bool) external pure { + // solhint-disable-next-line reason-string + revert(); + } + + function proxiableUUID() public pure override returns (bytes32) { + return keccak256("org.superfluid-finance.contracts.SuperfluidPool.implementation"); + } +} diff --git a/packages/ethereum-contracts/contracts/apps/SuperAppBaseFlow.sol b/packages/ethereum-contracts/contracts/apps/CFASuperAppBase.sol similarity index 74% rename from packages/ethereum-contracts/contracts/apps/SuperAppBaseFlow.sol rename to packages/ethereum-contracts/contracts/apps/CFASuperAppBase.sol index 827d75a8c5..b5145f6ef8 100644 --- a/packages/ethereum-contracts/contracts/apps/SuperAppBaseFlow.sol +++ b/packages/ethereum-contracts/contracts/apps/CFASuperAppBase.sol @@ -4,7 +4,18 @@ pragma solidity >= 0.8.11; import { ISuperfluid, ISuperToken, ISuperApp, SuperAppDefinitions } from "../interfaces/superfluid/ISuperfluid.sol"; import { SuperTokenV1Library } from "./SuperTokenV1Library.sol"; -abstract contract SuperAppBaseFlow is ISuperApp { +/** + * @title abstract base contract for SuperApps using CFA callbacks + * @author Superfluid + * @dev This contract provides a more convenient API for implementing CFA callbacks. + * It allows to write more concise and readable SuperApps when the full flexibility + * of the low-level agreement callbacks isn't needed. + * The API is tailored for the most common use cases, with the "beforeX" and "afterX" callbacks being + * abstrated into a single "onX" callback for create|update|delete flows. + * For use cases requiring more flexibility (specifically if more data needs to be provided by the before callbacks) + * it's recommended to implement the low-level callbacks directly instead of using this base contract. + */ +abstract contract CFASuperAppBase is ISuperApp { using SuperTokenV1Library for ISuperToken; bytes32 public constant CFAV1_TYPE = keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1"); @@ -21,36 +32,59 @@ abstract contract SuperAppBaseFlow is ISuperApp { error NotAcceptedSuperToken(); /** - * @dev Initializes the contract by setting the expected Superfluid Host. - * and register which callbacks the Host can engage when appropriate. + * @dev Creates the contract tied to the provided Superfluid host + * @param host_ the Superfluid host the SuperApp belongs to + * @notice You also need to register the app with the host in order to enable callbacks. + * This can be done either by calling `selfRegister()` or by calling `host.registerApp()`. */ - constructor( - ISuperfluid host_, + constructor(ISuperfluid host_) { + HOST = host_; + } + + /** + * @dev Registers the SuperApp with its Superfluid host contract (self-registration) + * @param activateOnCreated if true, callbacks for `createFlow` will be activated + * @param activateOnUpdated if true, callbacks for `updateFlow` will be activated + * @param activateOnDeleted if true, callbacks for `deleteFlow` will be activated + * + * Note: if the App self-registers on a network with permissioned SuperApp registration, + * self-registration can be used only if the tx.origin (EOA) is whitelisted as deployer. + * If a whitelisted factory is used, it needs to call `host.registerApp()` itself. + * For more details, see https://github.com/superfluid-finance/protocol-monorepo/wiki/Super-App-White-listing-Guide + */ + function selfRegister( bool activateOnCreated, bool activateOnUpdated, - bool activateOnDeleted, - string memory registrationKey - ) { - HOST = host_; + bool activateOnDeleted + ) public { + HOST.registerApp(getConfigWord(activateOnCreated, activateOnUpdated, activateOnDeleted)); + } - uint256 callBackDefinitions = SuperAppDefinitions.APP_LEVEL_FINAL + /** + * @dev Convenience function to get the `configWord` for app registration when not using self-registration + * @param activateOnCreated if true, callbacks for `createFlow` will be activated + * @param activateOnUpdated if true, callbacks for `updateFlow` will be activated + * @param activateOnDeleted if true, callbacks for `deleteFlow` will be activated + * @return configWord the `configWord` encoding the provided settings + */ + function getConfigWord( + bool activateOnCreated, + bool activateOnUpdated, + bool activateOnDeleted + ) public pure returns (uint256 configWord) { + configWord = SuperAppDefinitions.APP_LEVEL_FINAL | SuperAppDefinitions.BEFORE_AGREEMENT_CREATED_NOOP; - if (!activateOnCreated) { - callBackDefinitions |= SuperAppDefinitions.AFTER_AGREEMENT_CREATED_NOOP; + configWord |= SuperAppDefinitions.AFTER_AGREEMENT_CREATED_NOOP; } - if (!activateOnUpdated) { - callBackDefinitions |= SuperAppDefinitions.BEFORE_AGREEMENT_UPDATED_NOOP + configWord |= SuperAppDefinitions.BEFORE_AGREEMENT_UPDATED_NOOP | SuperAppDefinitions.AFTER_AGREEMENT_UPDATED_NOOP; } - if (!activateOnDeleted) { - callBackDefinitions |= SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP + configWord |= SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP; } - - host_.registerAppWithKey(callBackDefinitions, registrationKey); } /** diff --git a/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol b/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol index 40da018f1d..b389f658f6 100644 --- a/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol +++ b/packages/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol @@ -833,6 +833,27 @@ library SuperTokenV1Library { (lastUpdated, flowRate, deposit, owedDeposit) = cfa.getFlow(token, sender, receiver); } + /** + * @dev get flow info of a distributor to a pool for given token + * @param token The token used in flow + * @param distributor The sitributor of the flow + * @param pool The GDA pool + * @return lastUpdated Timestamp of flow creation or last flowrate change + * @return flowRate The flow rate + * @return deposit The amount of deposit the flow + */ + function getGDAFlowInfo(ISuperToken token, address distributor, ISuperfluidPool pool) + internal view + returns(uint256 lastUpdated, int96 flowRate, uint256 deposit) + { + (, IGeneralDistributionAgreementV1 gda) = _getHostAndGDA(token); + return gda.getFlow(token, distributor, pool); + } + + /* function getGDAFlowInfo(ISuperToken token, address distributor, ISuperfluidPool pool) */ + /* { */ + /* } */ + /** * @dev get net flow rate for given account for given token (CFA + GDA) * @param token Super token address @@ -876,7 +897,7 @@ library SuperTokenV1Library { } /** - * @dev get the aggregated flow info of the account + * @dev get the aggregated flow info of the account (CFA + GDA) * @param token Super token address * @param account Account to query * @return lastUpdated Timestamp of the last change of the net flow @@ -885,7 +906,46 @@ library SuperTokenV1Library { * @return owedDeposit The sum of all owed deposits for account's flows */ function getNetFlowInfo(ISuperToken token, address account) - internal view + internal + view + returns (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 owedDeposit) + { + (, IConstantFlowAgreementV1 cfa) = _getHostAndCFA(token); + (, IGeneralDistributionAgreementV1 gda) = _getHostAndGDA(token); + + { + (uint256 lastUpdatedCFA, int96 cfaNetFlowRate, uint256 cfaDeposit, uint256 cfaOwedDeposit) = + cfa.getAccountFlowInfo(token, account); + + lastUpdated = lastUpdatedCFA; + flowRate += cfaNetFlowRate; + deposit += cfaDeposit; + owedDeposit += cfaOwedDeposit; + } + + { + (uint256 lastUpdatedGDA, int96 gdaNetFlowRate, uint256 gdaDeposit) = gda.getAccountFlowInfo(token, account); + + if (lastUpdatedGDA > lastUpdated) { + lastUpdated = lastUpdatedGDA; + } + flowRate += gdaNetFlowRate; + deposit += gdaDeposit; + } + } + + /** + * @dev get the aggregated CFA flow info of the account + * @param token Super token address + * @param account Account to query + * @return lastUpdated Timestamp of the last change of the net flow + * @return flowRate The net flow rate of token for account + * @return deposit The sum of all deposits for account's flows + * @return owedDeposit The sum of all owed deposits for account's flows + */ + function getCFANetFlowInfo(ISuperToken token, address account) + internal + view returns (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 owedDeposit) { (, IConstantFlowAgreementV1 cfa) = _getHostAndCFA(token); @@ -893,7 +953,57 @@ library SuperTokenV1Library { } /** - * @dev calculate buffer for a flow rate + * @dev get the aggregated GDA flow info of the account + * @param token Super token address + * @param account Account to query + * @return lastUpdated Timestamp of the last change of the net flow + * @return flowRate The net flow rate of token for account + * @return deposit The sum of all deposits for account's flows + * @return owedDeposit The sum of all owed deposits for account's flows + */ + function getGDANetFlowInfo(ISuperToken token, address account) + internal + view + returns (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 owedDeposit) + { + (, IGeneralDistributionAgreementV1 gda) = _getHostAndGDA(token); + (lastUpdated, flowRate, deposit) = gda.getAccountFlowInfo(token, account); + owedDeposit = 0; // unused in GDA + } + + /** + * @dev get the adjustment flow rate for a pool + * @param token Super token address + * @param pool The pool to query + * @return poolAdjustmentFlowRate The adjustment flow rate of the pool + */ + function getPoolAdjustmentFlowRate(ISuperToken token, ISuperfluidPool pool) + internal + view + returns (int96 poolAdjustmentFlowRate) + { + (, IGeneralDistributionAgreementV1 gda) = _getHostAndGDA(token); + return gda.getPoolAdjustmentFlowRate(address(pool)); + } + + /** + * @dev Get the total amount of tokens received by a member via instant and flowing distributions + * @param pool The pool to query + * @param memberAddr The member to query + * @return totalAmountReceived The total amount received by the member + */ + function getTotalAmountReceivedByMember(ISuperfluidPool pool, address memberAddr) + internal + view + returns (uint256 totalAmountReceived) + { + return pool.getTotalAmountReceivedByMember(memberAddr); + } + + /** + * @notice calculate buffer for a CFA/GDA flow rate + * @dev Even though we are using the CFA, the logic for calculating buffer is the same in the GDA + * and a change in the buffer logic in either means it is a BREAKING change * @param token The token used in flow * @param flowRate The flowrate to calculate the needed buffer for * @return bufferAmount The buffer amount based on flowRate, liquidationPeriod and minimum deposit @@ -2059,8 +2169,8 @@ library SuperTokenV1Library { */ function distributeWithCtx( ISuperToken token, - ISuperfluidPool pool, address from, + ISuperfluidPool pool, uint256 requestedAmount, bytes memory ctx ) internal returns (bytes memory newCtx) { diff --git a/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol b/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol index 222091227e..4d09832e2c 100644 --- a/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol +++ b/packages/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol @@ -10,22 +10,24 @@ library SuperfluidLoaderLibrary { uint256 private constant BSC_MAINNET = 56; uint256 private constant XDAI_MAINNET = 100; uint256 private constant POLYGON_MAINNET = 137; + uint256 private constant BASE_MAINNET = 8453; uint256 private constant ARBITRUM_ONE = 42161; uint256 private constant CELO_MAINNET = 42220; uint256 private constant AVALANCHE_C = 43114; + uint256 private constant SCROLL_MAINNET = 534352; + uint256 private constant DEGENCHAIN = 666666666; + // testnets - uint256 private constant ETH_GOERLI = 5; - uint256 private constant ETH_SEPOLIA = 11155111; - uint256 private constant BASE_GOERLI = 84531; - uint256 private constant POLYGON_MUMBAI = 80001; - uint256 private constant ARBITRUM_GOERLI = 421613; - uint256 private constant OPTIMISM_GOERLI = 420; uint256 private constant AVALANCHE_FUJI = 43113; - uint256 private constant ZKEVM_TESTNET = 1442; - + uint256 private constant SCROLL_SEPOLIA = 534351; + uint256 private constant ETH_SEPOLIA = 11155111; + uint256 private constant OPTIMISM_SEPOLIA = 11155420; + uint256 private constant BASE_SEPOLIA = 84532; + function getHost() public view returns (address) { + // mainnets if (block.chainid == ETH_MAINNET) { return 0x4E583d9390082B65Bef884b629DFA426114CED6d; } else if (block.chainid == OPTIMISM_MAINNET) { @@ -36,28 +38,29 @@ library SuperfluidLoaderLibrary { return 0x2dFe937cD98Ab92e59cF3139138f18c823a4efE7; } else if (block.chainid == POLYGON_MAINNET) { return 0x3E14dC1b13c488a8d5D310918780c983bD5982E7; + } else if (block.chainid == BASE_MAINNET) { + return 0x4C073B3baB6d8826b8C5b229f3cfdC1eC6E47E74; } else if (block.chainid == ARBITRUM_ONE) { return 0xCf8Acb4eF033efF16E8080aed4c7D5B9285D2192; } else if (block.chainid == CELO_MAINNET) { return 0xA4Ff07cF81C02CFD356184879D953970cA957585; } else if (block.chainid == AVALANCHE_C) { return 0x60377C7016E4cdB03C87EF474896C11cB560752C; - } else if (block.chainid == ETH_GOERLI) { - return 0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9; - } else if (block.chainid == ARBITRUM_GOERLI) { - return 0xE40983C2476032A0915600b9472B3141aA5B5Ba9; - } else if (block.chainid == OPTIMISM_GOERLI) { - return 0xE40983C2476032A0915600b9472B3141aA5B5Ba9; + } else if (block.chainid == SCROLL_MAINNET) { + return 0x0F86a21F6216c061B222c224e315d9FC34520bb7; + } else if (block.chainid == DEGENCHAIN) { + return 0xc1314EdcD7e478C831a7a24169F7dEADB2646eD2; + // testnets } else if (block.chainid == AVALANCHE_FUJI) { return 0x85Fe79b998509B77BF10A8BD4001D58475D29386; - } else if (block.chainid == POLYGON_MUMBAI) { - return 0xEB796bdb90fFA0f28255275e16936D25d3418603; + } else if (block.chainid == SCROLL_SEPOLIA) { + return 0x42b05a6016B9eED232E13fd56a8F0725693DBF8e; } else if (block.chainid == ETH_SEPOLIA) { return 0x109412E3C84f0539b43d39dB691B08c90f58dC7c; - } else if (block.chainid == BASE_GOERLI) { - return 0x507c3a7C6Ccc253884A2e3a3ee2A211cC7E796a6; - } else if (block.chainid == ZKEVM_TESTNET) { - return 0xe64f81d5dDdA1c7172e5C6d964E8ef1BD82D8704; + } else if (block.chainid == OPTIMISM_SEPOLIA) { + return 0xd399e2Fb5f4cf3722a11F65b88FAB6B2B8621005; + } else if (block.chainid == BASE_SEPOLIA) { + return 0x109412E3C84f0539b43d39dB691B08c90f58dC7c; } else { revert UnsupportedNetwork(); } diff --git a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol index 4473fe2f18..02d8beb2fd 100644 --- a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol +++ b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol index c421c5dd2d..541c24254d 100644 --- a/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol +++ b/packages/ethereum-contracts/contracts/gov/SuperfluidGovernanceII.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol b/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol index 5b4e1fdb3b..e8f9c63159 100644 --- a/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol +++ b/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol @@ -19,35 +19,6 @@ struct PoolConfig { * @author Superfluid */ abstract contract IGeneralDistributionAgreementV1 is ISuperAgreement { - // Structs - struct UniversalIndexData { - int96 flowRate; - uint32 settledAt; - uint256 totalBuffer; - bool isPool; - int256 settledValue; - } - - struct FlowDistributionData { - uint32 lastUpdated; - int96 flowRate; - uint256 buffer; // stored as uint96 - } - - struct PoolMemberData { - address pool; - uint32 poolID; // the slot id in the pool's subs bitmap - } - - struct StackVarsLiquidation { - ISuperfluidToken token; - int256 availableBalance; - address sender; - bytes32 distributionFlowHash; - int256 signedTotalGDADeposit; - address liquidator; - } - // Custom Errors error GDA_DISTRIBUTE_FOR_OTHERS_NOT_ALLOWED(); // 0xf67d263e @@ -131,6 +102,31 @@ abstract contract IGeneralDistributionAgreementV1 is ISuperAgreement { virtual returns (int96); + /// @dev Gets the GDA flow data between `from` and `to` of `token` + /// @param token The token address + /// @param from The sender address + /// @param to The receiver address + /// @return lastUpdated The timestamp of when the flow was last updated + /// @return flowRate The flow rate + /// @return deposit The amount of deposit the flow + function getFlow(ISuperfluidToken token, address from, ISuperfluidPool to) + external + view + virtual + returns (uint256 lastUpdated, int96 flowRate, uint256 deposit); + + /// @dev Gets the aggregated GDA flow info of `account` for `token` + /// @param token The token address + /// @param account The account address + /// @return timestamp The timestamp of when the flow was last updated for account + /// @return flowRate The net flow rate of token for account + /// @return deposit The sum of all deposits for account's flows + function getAccountFlowInfo(ISuperfluidToken token, address account) + external + view + virtual + returns (uint256 timestamp, int96 flowRate, uint256 deposit); + /// @notice Executes an optimistic estimation of what the actual flow distribution flow rate may be. /// The actual flow distribution flow rate is the flow rate that will be sent from `from`. /// NOTE: this is only precise in an atomic transaction. DO NOT rely on this if querying off-chain. diff --git a/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol b/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol index 4dee5ca426..b09524f561 100644 --- a/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol +++ b/packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/ISuperfluidPool.sol @@ -8,24 +8,6 @@ import { ISuperfluidToken } from "../../superfluid/ISuperfluidToken.sol"; * @dev The interface for any super token pool regardless of the distribution schemes. */ interface ISuperfluidPool is IERC20 { - - // Structs - struct PoolIndexData { - uint128 totalUnits; - uint32 wrappedSettledAt; - int96 wrappedFlowRate; - int256 wrappedSettledValue; - } - - struct MemberData { - uint128 ownedUnits; - uint32 syncedSettledAt; - int96 syncedFlowRate; - int256 syncedSettledValue; - int256 settledValue; - int256 claimedValue; - } - // Custom Errors error SUPERFLUID_POOL_INVALID_TIME(); // 0x83c35016 @@ -34,6 +16,7 @@ interface ISuperfluidPool is IERC20 { error SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA(); // 0x1c5fbdcb error SUPERFLUID_POOL_NOT_GDA(); // 0xfcbe3f9e error SUPERFLUID_POOL_TRANSFER_UNITS_NOT_ALLOWED(); // 0x2285efba + error SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED(); // 0xceddc0be // Events event MemberUnitsUpdated( @@ -66,9 +49,9 @@ interface ISuperfluidPool is IERC20 { /// @notice The total number of units of disconnected members function getTotalDisconnectedUnits() external view returns (uint128); - /// @notice The total number of units for `memberAddress` - /// @param memberAddress The address of the member - function getUnits(address memberAddress) external view returns (uint128); + /// @notice The total number of units for `memberAddr` + /// @param memberAddr The address of the member + function getUnits(address memberAddr) external view returns (uint128); /// @notice The total flow rate of the pool function getTotalFlowRate() external view returns (int96); @@ -83,9 +66,14 @@ interface ISuperfluidPool is IERC20 { /// @param time The time to query function getDisconnectedBalance(uint32 time) external view returns (int256 balance); + /// @notice The total amount received by `memberAddr` in the pool + /// @param memberAddr The address of the member + /// @return totalAmountReceived The total amount received by the member + function getTotalAmountReceivedByMember(address memberAddr) external view returns (uint256 totalAmountReceived); + /// @notice The flow rate a member is receiving from the pool - /// @param memberAddress The address of the member - function getMemberFlowRate(address memberAddress) external view returns (int96); + /// @param memberAddr The address of the member + function getMemberFlowRate(address memberAddr) external view returns (int96); /// @notice The claimable balance for `memberAddr` at `time` in the pool /// @param memberAddr The address of the member diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol index f9687901a1..7a29d7e775 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/Definitions.sol @@ -192,6 +192,24 @@ library BatchOperation { * ) */ uint32 constant internal OPERATION_TYPE_SUPERTOKEN_DOWNGRADE = 2 + 100; + /** + * @dev SuperToken.upgradeTo batch operation type + * + * Call spec: + * ISuperToken(target).operationUpgradeTo( + * abi.decode(data, (address to, uint256 amount) + * ) + */ + uint32 constant internal OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO = 3 + 100; + /** + * @dev SuperToken.downgradeTo batch operation type + * + * Call spec: + * ISuperToken(target).operationDowngradeTo( + * abi.decode(data, (address to, uint256 amount) + * ) + */ + uint32 constant internal OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO = 4 + 100; /** * @dev Superfluid.callAgreement batch operation type * @@ -212,6 +230,41 @@ library BatchOperation { * ) */ uint32 constant internal OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION = 2 + 200; + /** + * @dev DMZForwarder.forwardCall batch operation type + * + * Call spec: + * forwardCall( + * target, + * data + * ) + */ + uint32 constant internal OPERATION_TYPE_SIMPLE_FORWARD_CALL = 1 + 300; + /** + * @dev DMZForwarder.forward2771Call batch operation type + * + * Call spec: + * forward2771Call( + * target, + * msgSender, + * data + * ) + * + * NOTE: In the context of this operation, the `DZMForwarder` contract acts as the + * _trusted forwarder_ which must be trusted by the _recipient contract_ (operation target). + * It shall do so by dynamically looking up the DMZForwarder used by the host, like this: + * + * function isTrustedForwarder(address forwarder) public view returns(bool) { + * return forwarder == address(host.DMZ_FORWARDER()); + * } + * + * If used in the context of a `forwardBatchCall`, we effectively have a chaining/nesting + * of ERC-2771 calls where the host acts as _recipient contract_ of the enveloping 2771 call + * and the DMZForwarder acts as the _trusted forwarder_ of the nested 2771 call(s). + * That's why `msgSender` could be either the actual `msg.sender` (if using `batchCall`) + * or the relayed sender address (if using `forwardBatchCall`). + */ + uint32 constant internal OPERATION_TYPE_ERC2771_FORWARD_CALL = 2 + 300; } /** diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol deleted file mode 100644 index c0c89879ad..0000000000 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantInflowNFT.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.11; - -import { IFlowNFTBase } from "./IFlowNFTBase.sol"; - -interface IConstantInflowNFT is IFlowNFTBase { - /************************************************************************** - * Custom Errors - *************************************************************************/ - error CIF_NFT_ONLY_CONSTANT_OUTFLOW(); // 0xe81ef57a - - /************************************************************************** - * Write Functions - *************************************************************************/ - - /// @notice The mint function emits the "mint" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// @param to the flow receiver (inflow NFT receiver) - /// @param newTokenId the new token id - function mint(address to, uint256 newTokenId) external; - - /// @notice This burn function emits the "burn" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// @param tokenId desired token id to burn - function burn(uint256 tokenId) external; -} diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol deleted file mode 100644 index 76dc52c8f3..0000000000 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/IConstantOutflowNFT.sol +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.11; - -import { ISuperfluidToken } from "./ISuperfluidToken.sol"; -import { IFlowNFTBase } from "./IFlowNFTBase.sol"; - -interface IConstantOutflowNFT is IFlowNFTBase { - /************************************************************************** - * Custom Errors - *************************************************************************/ - - error COF_NFT_INVALID_SUPER_TOKEN(); // 0x6de98774 - error COF_NFT_MINT_TO_AND_FLOW_RECEIVER_SAME(); // 0x0d1d1161 - error COF_NFT_MINT_TO_ZERO_ADDRESS(); // 0x43d05e51 - error COF_NFT_ONLY_CONSTANT_INFLOW(); // 0xa495a718 - error COF_NFT_ONLY_FLOW_AGREEMENTS(); // 0xd367b64f - error COF_NFT_TOKEN_ALREADY_EXISTS(); // 0xe2480183 - - - /************************************************************************** - * Write Functions - *************************************************************************/ - - /// @notice The onCreate function is called when a new flow is created. - /// @param token the super token passed from the CFA (flowVars) - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - function onCreate(ISuperfluidToken token, address flowSender, address flowReceiver) external; - - /// @notice The onUpdate function is called when a flow is updated. - /// @param token the super token passed from the CFA (flowVars) - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - function onUpdate(ISuperfluidToken token, address flowSender, address flowReceiver) external; - - /// @notice The onDelete function is called when a flow is deleted. - /// @param token the super token passed from the CFA (flowVars) - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - function onDelete(ISuperfluidToken token, address flowSender, address flowReceiver) external; -} diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol deleted file mode 100644 index 3ca847e6ad..0000000000 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/IFlowNFTBase.sol +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.11; - -import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; - -interface IFlowNFTBase is IERC721Metadata { - // FlowNFTData struct storage packing: - // b = bits - // WORD 1: | superToken | FREE - // | 160b | 96b - // WORD 2: | flowSender | FREE - // | 160b | 96b - // WORD 3: | flowReceiver | flowStartDate | FREE - // | 160b | 32b | 64b - struct FlowNFTData { - address superToken; - address flowSender; - address flowReceiver; - uint32 flowStartDate; - } - - /************************************************************************** - * Custom Errors - *************************************************************************/ - - error CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); // 0xa3352582 - error CFA_NFT_APPROVE_TO_CALLER(); // 0xd3c77329 - error CFA_NFT_APPROVE_TO_CURRENT_OWNER(); // 0xe4790b25 - error CFA_NFT_INVALID_TOKEN_ID(); // 0xeab95e3b - error CFA_NFT_ONLY_SUPER_TOKEN_FACTORY(); // 0xebb7505b - error CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); // 0x2551d606 - error CFA_NFT_TRANSFER_FROM_INCORRECT_OWNER(); // 0x5a26c744 - error CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); // 0xaa747eca - error CFA_NFT_TRANSFER_TO_ZERO_ADDRESS(); // 0xde06d21e - - /************************************************************************** - * Events - *************************************************************************/ - - /// @notice Informs third-party platforms that NFT metadata should be updated - /// @dev This event comes from https://eips.ethereum.org/EIPS/eip-4906 - /// @param tokenId the id of the token that should have its metadata updated - event MetadataUpdate(uint256 tokenId); - - /************************************************************************** - * View - *************************************************************************/ - - /// @notice An external function for querying flow data by `tokenId`` - /// @param tokenId the token id - /// @return flowData the flow data associated with `tokenId` - function flowDataByTokenId( - uint256 tokenId - ) external view returns (FlowNFTData memory flowData); - - /// @notice An external function for computing the deterministic tokenId - /// @dev tokenId = uint256(keccak256(abi.encode(block.chainId, superToken, flowSender, flowReceiver))) - /// @param superToken the super token - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// @return tokenId the tokenId - function getTokenId( - address superToken, - address flowSender, - address flowReceiver - ) external view returns (uint256); - - /************************************************************************** - * Write - *************************************************************************/ - - function initialize( - string memory nftName, - string memory nftSymbol - ) external; // initializer; - - function triggerMetadataUpdate(uint256 tokenId) external; -} diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol index ef62a0e93c..c1a468f631 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol @@ -4,8 +4,6 @@ pragma solidity >= 0.8.11; import { ISuperfluidToken } from "./ISuperfluidToken.sol"; import { IERC20, IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { IERC777 } from "@openzeppelin/contracts/token/ERC777/IERC777.sol"; -import { IConstantOutflowNFT } from "./IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "./IConstantInflowNFT.sol"; import { IPoolAdminNFT } from "../agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../agreements/gdav1/IPoolMemberNFT.sol"; @@ -73,10 +71,6 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777 { * Immutable variables *************************************************************************/ - // solhint-disable-next-line func-name-mixedcase - function CONSTANT_OUTFLOW_NFT() external view returns (IConstantOutflowNFT); - // solhint-disable-next-line func-name-mixedcase - function CONSTANT_INFLOW_NFT() external view returns (IConstantInflowNFT); // solhint-disable-next-line func-name-mixedcase function POOL_ADMIN_NFT() external view returns (IPoolAdminNFT); // solhint-disable-next-line func-name-mixedcase @@ -578,22 +572,27 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777 { */ function operationDowngrade(address account, uint256 amount) external; - // Flow NFT events /** - * @dev Constant Outflow NFT proxy created event - * @param constantOutflowNFT constant outflow nft address - */ - event ConstantOutflowNFTCreated( - IConstantOutflowNFT indexed constantOutflowNFT - ); + * @dev Upgrade ERC20 to SuperToken by host contract and transfer immediately. + * @param account The account to be changed. + * @param to The account to receive upgraded tokens + * @param amount Number of tokens to be upgraded (in 18 decimals) + * + * @custom:modifiers + * - onlyHost + */ + function operationUpgradeTo(address account, address to, uint256 amount) external; /** - * @dev Constant Inflow NFT proxy created event - * @param constantInflowNFT constant inflow nft address - */ - event ConstantInflowNFTCreated( - IConstantInflowNFT indexed constantInflowNFT - ); + * @dev Downgrade ERC20 to SuperToken by host contract and transfer immediately. + * @param account The account to be changed. + * @param to The account to receive downgraded tokens + * @param amount Number of tokens to be downgraded (in 18 decimals) + * + * @custom:modifiers + * - onlyHost + */ + function operationDowngradeTo(address account, address to, uint256 amount) external; /** * @dev Pool Admin NFT proxy created event diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol index b6abefb953..b698648111 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol @@ -23,9 +23,6 @@ import { ISuperToken } from "./ISuperToken.sol"; import { ISuperTokenFactory } from "./ISuperTokenFactory.sol"; import { ISETH } from "../tokens/ISETH.sol"; /// Superfluid/ERC20x NFTs -import { IFlowNFTBase } from "./IFlowNFTBase.sol"; -import { IConstantOutflowNFT } from "./IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "./IConstantInflowNFT.sol"; import { IPoolAdminNFT } from "../agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../agreements/gdav1/IPoolMemberNFT.sol"; /// Superfluid agreement interfaces: @@ -622,14 +619,31 @@ interface ISuperfluid { /** * @dev Batch call function * @param operations Array of batch operations + * + * NOTE: `batchCall` is `payable, because there's limited support for sending + * native tokens to batch operation targets. + * If value is > 0, the whole amount is sent to the first operation matching any of: + * - OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION + * - OPERATION_TYPE_SIMPLE_FORWARD_CALL + * - OPERATION_TYPE_ERC2771_FORWARD_CALL + * If the first such operation does not allow receiving native tokens, + * the transaction will revert. + * It's currently not possible to send native tokens to multiple operations, or to + * any but the first operation of one of the above mentioned types. + * If no such operation is included, the native tokens will be sent back to the sender. */ function batchCall(Operation[] calldata operations) external payable; /** - * @dev Batch call function for trusted forwarders (EIP-2771) + * @dev Batch call function with EIP-2771 encoded msgSender * @param operations Array of batch operations + * + * NOTE: This can be called only by contracts recognized as _trusted forwarder_ + * by the host contract (see `Superfluid.isTrustedForwarder`). + * If native tokens are passed along, the same rules as for `batchCall` apply, + * with an optional refund going to the encoded msgSender. */ - function forwardBatchCall(Operation[] calldata operations) external; + function forwardBatchCall(Operation[] calldata operations) external payable; /************************************************************************** * Function modifiers for access control and parameter validations diff --git a/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol b/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol index 4b7539a083..fef43f95a2 100644 --- a/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol +++ b/packages/ethereum-contracts/contracts/interfaces/utils/IUserDefinedMacro.sol @@ -3,8 +3,51 @@ pragma solidity >=0.8.11; import { ISuperfluid } from "../superfluid/ISuperfluid.sol"; -// User-defined macro +/** + * @dev User-defined macro used in implementations of TrustedMacros. + */ interface IUserDefinedMacro { - function executeMacro(ISuperfluid host, bytes memory params) external view + /** + * @dev Build batch operations according to the parameters provided. + * It's up to the macro contract to map the provided params (can also be empty) to any + * valid list of operations. + * @param host The executing host contract. + * @param params The encoded form of the parameters. + * @param msgSender The msg.sender of the call to the MacroForwarder. + * @return operations The batch operations built. + */ + function buildBatchOperations(ISuperfluid host, bytes memory params, address msgSender) external view returns (ISuperfluid.Operation[] memory operations); + + /** + * @dev A post-check function which is called after execution. + * It allows to do arbitrary checks based on the state after execution, + * and to revert if the result is not as expected. + * Can be an empty implementation if no check is needed. + * @param host The host contract set for the executing MacroForwarder. + * @param params The encoded parameters as provided to `MacroForwarder.runMacro()` + * @param msgSender The msg.sender of the call to the MacroForwarder. + */ + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view; + + /* + * Additional to the required interface, we recommend to implement the following function: + * `function getParams(...) external view returns (bytes memory);` + * + * It shall return abi encoded params as required as second argument of `MacroForwarder.runMacro()`. + * + * The function name shall be `getParams` and the return type shall be `bytes memory`. + * The number, type and name of arguments are free to choose such that they best fit the macro use case. + * + * In conjunction with the name of the Macro contract, the signature should be as self-explanatory as possible. + * + * Example for a contract `MultiFlowDeleteMacro` which lets a user delete multiple flows in one transaction: + * `function getParams(ISuperToken superToken, address[] memory receivers) external view returns (bytes memory)` + * + * + * Implementing this view function has several advantages: + * - Allows to use generic tooling like Explorers to interact with the macro + * - Allows to build auto-generated UIs based on the contract ABI + * - Makes it easier to interface with the macro from Dapps + */ } diff --git a/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol b/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol index a050075193..8f86ba53c9 100644 --- a/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol +++ b/packages/ethereum-contracts/contracts/libs/BaseRelayRecipient.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IRelayRecipient } from "../interfaces/utils/IRelayRecipient.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/CallUtils.sol b/packages/ethereum-contracts/contracts/libs/CallUtils.sol index 5109a86bdf..91392b0038 100644 --- a/packages/ethereum-contracts/contracts/libs/CallUtils.sol +++ b/packages/ethereum-contracts/contracts/libs/CallUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; /** * @title Call utilities library that is absent from the OpenZeppelin diff --git a/packages/ethereum-contracts/contracts/libs/CallbackUtils.sol b/packages/ethereum-contracts/contracts/libs/CallbackUtils.sol new file mode 100644 index 0000000000..6d15d5bec1 --- /dev/null +++ b/packages/ethereum-contracts/contracts/libs/CallbackUtils.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.23; + +/** + * @title Callback utilities solidity library + * @notice An internal library used to handle different types of out of gas errors in callbacks + * + * @dev + * + * ## Problem Statement + * + * When calling an untrusted external callback (or hook), gas limit is usually provided to prevent + * grief attack from them. However, such gas limits are nested. From the callback invoking site, one + * might need to differentiate the cases between the outer-layer induced out-of-gas vs. the callback + * resulted out-of-gas. + * + * This library solves such challenge by safely marking the second case with an explicit flag of + * insufficient-callback-gas-provided. In order to use this library, one must first understand the + * concept of callback gas limit zones. + * + * ## Definitions: callback gas limit zones + * + * +---------------------------+--------------+---------------------+ + * | insufficient-callback-gas | transitional | out-of-callback-gas | + * +---------------------------+--------------+---------------------+ + * + * - insufficient-callback-gas zone + * + * This zone includes all outer gas limits that are below callback gas limit. The invariance of + * this zone is that calling the callback shall return with the insufficient-callback-gas-provided + * set to true if more gas is needed to execute the callback. + * + * - out-of-callback-gas zone + * + * Within this continuous zone, the invariance is that calling the callback shall never return + * with the insufficient-callback-gas-provided flag set to true. + * + * - transitional zone + * + * Between the insufficient-callback-gas zone to the out-of-callback-gas zone, there is a zone of + * unspecified size where insufficient-callback-gas-provided may be set to true. This is due the + * factors of EIP-150 Magic N and callback setup overhead. + * + * ## EIP-150 Magic N + * + * "If a call asks for more gas than the maximum allowed amount (i.e. the total amount of gas + * remaining in the parent after subtracting the gas cost of the call and memory expansion), do not + * return an OOG error; instead, if a call asks for more gas than all but one 64th of the maximum + * allowed amount, call with all but one 64th of the maximum allowed amount of gas (this is + * equivalent to a version of EIP-90 plus EIP-114). CREATE only provides all but one 64th of the + * parent gas to the child call." + * + * Another article about this topic: + * https://medium.com/%40wighawag/ethereum-the-concept-of-gas-and-its-dangers-28d0eb809bb2 + * + */ +library CallbackUtils { + /// The magic N constant from the EIP-150 + uint256 internal constant EIP150_MAGIC_N = 64; + + /// Make a call to the target with a callback gas limit. + function externalCall(address target, bytes memory callData, uint256 callbackGasLimit) internal + returns (bool success, bool insufficientCallbackGasProvided, bytes memory returnedData) + { + uint256 gasLeftBefore = gasleft(); + // solhint-disable-next-line avoid-low-level-calls + (success, returnedData) = address(target).call{ gas: callbackGasLimit }(callData); + if (!success) { + if (gasleft() <= gasLeftBefore / EIP150_MAGIC_N) insufficientCallbackGasProvided = true; + } + } + + /// Make a staticcall to the target with a callback gas limit. + function staticCall(address target, bytes memory callData, uint256 callbackGasLimit) internal view + returns (bool success, bool insufficientCallbackGasProvided, bytes memory returnedData) + { + uint256 gasLeftBefore = gasleft(); + // solhint-disable-next-line avoid-low-level-calls + (success, returnedData) = address(target).staticcall{ gas: callbackGasLimit }(callData); + if (!success) { + if (gasleft() <= gasLeftBefore / EIP150_MAGIC_N) insufficientCallbackGasProvided = true; + } + } + + /// Reliably consume all the gas given. + function consumeAllGas() internal pure { + // Neither revert or assert consume all gas since Solidity 0.8.20 + // https://docs.soliditylang.org/en/v0.8.20/control-structures.html#panic-via-assert-and-error-via-require + // @solidity memory-safe-assembly + // solhint-disable-next-line no-inline-assembly + assembly { invalid() } + } +} diff --git a/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol b/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol index a5ca94423a..fa245fa4f4 100644 --- a/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol +++ b/packages/ethereum-contracts/contracts/libs/ERC1820RegistryCompiled.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable const-name-snakecase // solhint-disable max-line-length -pragma solidity 0.8.19; +pragma solidity ^0.8.23; /// @dev This is meant to be used by test framework to get the raw bytecode without compiling the origin contract library ERC1820RegistryCompiled { diff --git a/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol b/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol index 0850a64060..1842629981 100644 --- a/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol +++ b/packages/ethereum-contracts/contracts/libs/ERC777Helper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC1820Registry } from "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/EventsEmitter.sol b/packages/ethereum-contracts/contracts/libs/EventsEmitter.sol deleted file mode 100644 index 9ccc698851..0000000000 --- a/packages/ethereum-contracts/contracts/libs/EventsEmitter.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -/** - * @title Events Emitter Library - * @author Superfluid - * @dev A library used for emitting missing and unaccessable events. - * - */ -library EventsEmitter { - event Transfer(address indexed from, address indexed to, uint256 value); - - function emitTransfer(address from, address to, uint256 value) internal { - emit Transfer(from, to, value); - } -} \ No newline at end of file diff --git a/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol b/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol index f8ac452183..93d847cc34 100644 --- a/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol +++ b/packages/ethereum-contracts/contracts/libs/FixedSizeData.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; /** * @title Utilities for fixed size data in storage diff --git a/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol b/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol deleted file mode 100644 index 33e24bb4b8..0000000000 --- a/packages/ethereum-contracts/contracts/libs/SafeGasLibrary.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -/// @title SafeGasLibrary -/// @author Superfluid -/// @notice An internal library used to handle out of gas errors -library SafeGasLibrary { - error OUT_OF_GAS(); // 0x20afada5 - - function _isOutOfGas(uint256 gasLeftBefore) internal view returns (bool) { - return gasleft() <= gasLeftBefore / 64; - } - - /// @dev A function used in the catch block to handle true out of gas errors - /// @param gasLeftBefore the gas left before the try/catch block - function _revertWhenOutOfGas(uint256 gasLeftBefore) internal view { -// If the function actually runs out of gas, not just hitting the safety gas limit, we revert the whole transaction. -// This solves an issue where the gas estimaton didn't provide enough gas by default for the function to succeed. -// See https://medium.com/@wighawag/ethereum-the-concept-of-gas-and-its-dangers-28d0eb809bb2 - if (_isOutOfGas(gasLeftBefore)) { - revert OUT_OF_GAS(); - } - } -} diff --git a/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol b/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol index 735a08bc46..3322b7056e 100644 --- a/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol +++ b/packages/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import {ISuperfluidToken} from "../interfaces/superfluid/ISuperfluidToken.sol"; diff --git a/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol b/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol index 33682ee75c..765215cb41 100644 --- a/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol +++ b/packages/ethereum-contracts/contracts/libs/SolvencyHelperLibrary.sol @@ -7,7 +7,7 @@ import { SuperfluidGovernanceConfigs } from "../interfaces/superfluid/ISuperfluid.sol"; -pragma solidity 0.8.19; +pragma solidity ^0.8.23; library SolvencyHelperLibrary { function decode3PsData(ISuperfluid host, ISuperfluidToken token) diff --git a/packages/ethereum-contracts/contracts/mocks/AgreementMock.sol b/packages/ethereum-contracts/contracts/mocks/AgreementMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/AgreementMock.sol rename to packages/ethereum-contracts/contracts/mocks/AgreementMock.t.sol index 18c7244822..bcfac48017 100644 --- a/packages/ethereum-contracts/contracts/mocks/AgreementMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/AgreementMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.sol b/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/CFAAppMocks.sol rename to packages/ethereum-contracts/contracts/mocks/CFAAppMocks.t.sol index 763c1be832..ef7a92ce30 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.sol +++ b/packages/ethereum-contracts/contracts/mocks/CFAAppMocks.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.sol b/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/CFALibraryMock.sol rename to packages/ethereum-contracts/contracts/mocks/CFALibraryMock.t.sol index b31bc65462..3dfdf0b466 100644 --- a/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/CFALibraryMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidToken, ISuperToken, IConstantFlowAgreementV1 diff --git a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTMock.sol b/packages/ethereum-contracts/contracts/mocks/CFAv1NFTMock.sol deleted file mode 100644 index b9a1858aae..0000000000 --- a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTMock.sol +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -// solhint-disable reason-string -// solhint-disable not-rely-on-time -pragma solidity 0.8.19; - -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { ISuperfluid, IConstantInflowNFT, IConstantOutflowNFT } from "../interfaces/superfluid/ISuperfluid.sol"; -import { ConstantOutflowNFT } from "../superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT } from "../superfluid/ConstantInflowNFT.sol"; -import { FlowNFTBase } from "../superfluid/FlowNFTBase.sol"; - -/// @title FlowNFTBaseMock -/// @author Superfluid -/// @dev A mock contract for testing the functionality on FlowNFTBase -contract FlowNFTBaseMock is FlowNFTBase { - using Strings for uint256; - - mapping(uint256 => FlowNFTData) internal _flowDataByTokenId; - - constructor(ISuperfluid host) FlowNFTBase(host) { } - - function proxiableUUID() public pure override returns (bytes32) { - return keccak256("org.superfluid-finance.contracts.FlowNFTBaseMock.implementation"); - } - - /// @dev The owner of here is always the flow sender - function _ownerOf(uint256 tokenId) internal view override returns (address) { - return _flowDataByTokenId[tokenId].flowSender; - } - - /// @dev a mock mint function that sets the FlowNFTData - function mockMint(address _superToken, address _flowSender, address _flowReceiver) public { - uint256 tokenId = _getTokenId(_superToken, _flowSender, _flowReceiver); - _flowDataByTokenId[tokenId] = FlowNFTData({ - flowSender: _flowSender, - flowStartDate: uint32(block.timestamp), - flowReceiver: _flowReceiver, - superToken: _superToken - }); - } - - function _transfer( - address, //from, - address, //to, - uint256 //tokenId - ) internal pure override { - revert CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); - } - - function flowDataByTokenId(uint256 tokenId) public view override returns (FlowNFTData memory flowData) { - return _flowDataByTokenId[tokenId]; - } - - function tokenURI(uint256 tokenId) external pure override returns (string memory) { - return string(abi.encodePacked("tokenId=", tokenId.toString())); - } -} - -contract ConstantOutflowNFTMock is ConstantOutflowNFT { - constructor(ISuperfluid host, IConstantInflowNFT constantInflowNFT) ConstantOutflowNFT(host, constantInflowNFT) { } - - /// @dev a mock mint function that exposes the internal _mint function - function mockMint(address _superToken, address _to, address _flowReceiver, uint256 _newTokenId) public { - _mint(_superToken, _to, _flowReceiver, _newTokenId); - } - - /// @dev a mock burn function that exposes the internal _burn function - function mockBurn(uint256 _tokenId) public { - _burn(_tokenId); - } - - /// @dev this ownerOf doesn't revert if _tokenId doesn't exist - function mockOwnerOf(uint256 _tokenId) public view returns (address) { - return _ownerOf(_tokenId); - } - - /// @dev This exposes the _tokenApprovals storage without the requireMinted call - function mockGetApproved(uint256 _tokenId) public view returns (address) { - return _tokenApprovals[_tokenId]; - } -} - -contract ConstantInflowNFTMock is ConstantInflowNFT { - constructor( - ISuperfluid host, - IConstantOutflowNFT constantOutflowNFT - ) ConstantInflowNFT(host, constantOutflowNFT) { } - - /// @dev a mock mint function to emit the mint Transfer event - function mockMint(address _to, uint256 _newTokenId) public { - _mint(_to, _newTokenId); - } - - /// @dev a mock burn function to emit the burn Transfer event - function mockBurn(uint256 _tokenId) public { - _burn(_tokenId); - } - - // @dev this ownerOf doesn't revert if _tokenId doesn't exist - function mockOwnerOf(uint256 _tokenId) public view returns (address) { - return _ownerOf(_tokenId); - } - - /// @dev This exposes the _tokenApprovals storage without the requireMinted call - function mockGetApproved(uint256 _tokenId) public view returns (address) { - return _tokenApprovals[_tokenId]; - } -} \ No newline at end of file diff --git a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTUpgradabilityMock.sol b/packages/ethereum-contracts/contracts/mocks/CFAv1NFTUpgradabilityMock.sol deleted file mode 100644 index af0ad2d344..0000000000 --- a/packages/ethereum-contracts/contracts/mocks/CFAv1NFTUpgradabilityMock.sol +++ /dev/null @@ -1,192 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../superfluid/ConstantInflowNFT.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../superfluid/ConstantOutflowNFT.sol"; -import { FlowNFTBase } from "../superfluid/FlowNFTBase.sol"; -import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; - -/*////////////////////////////////////////////////////////////////////////// - FlowNFTBase Mocks -//////////////////////////////////////////////////////////////////////////*/ - -/// @title FlowNFTBaseStorageLayoutMock -/// @author Superfluid -/// @notice A mock FlowNFTBase contract for testing storage layout. -/// @dev This contract *MUST* have the same storage layout as FlowNFTBase.sol -contract FlowNFTBaseStorageLayoutMock is FlowNFTBase, IStorageLayoutBase { - constructor( - ISuperfluid host - ) FlowNFTBase(host) {} - - /// @notice Validates storage layout - /// @dev This function is used by all the FlowNFTBase mock contracts to validate the layout - function validateStorageLayout() public virtual { - uint256 slot; - uint256 offset; // in bytes - - // slot 0 taken is occupied by these variables: - // Initializable._initialized (uint8) 1byte - // Initializable._initializing (bool) 1byte - - assembly { slot := _name.slot offset := _name.offset } - if (slot != 1 || offset != 0) revert STORAGE_LOCATION_CHANGED("_name"); - - assembly { slot := _symbol.slot offset := _symbol.offset } - if (slot != 2 || offset != 0) revert STORAGE_LOCATION_CHANGED("_symbol"); - - assembly { slot := _tokenApprovals.slot offset := _tokenApprovals.offset } - if (slot != 3 || offset != 0) revert STORAGE_LOCATION_CHANGED("_tokenApprovals"); - - assembly { slot := _operatorApprovals.slot offset := _operatorApprovals.offset } - if (slot != 4 || offset != 0) revert STORAGE_LOCATION_CHANGED("_operatorApprovals"); - - assembly { slot := _reserve5.slot offset := _reserve5.offset } - if (slot != 5 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve5"); - - assembly { slot := _reserve21.slot offset := _reserve21.offset } - if (slot != 21 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve21"); - } - - // Dummy implementations for abstract functions - function flowDataByTokenId( - uint256 //tokenId - ) public pure override returns (FlowNFTData memory flowData) { - return flowData; - } - // Dummy implementations for abstract functions - function _ownerOf( - uint256 //tokenId - ) internal pure override returns (address) { - return address(0); - } - function _transfer( - address, //from, - address, //to, - uint256 //tokenId - ) internal pure override { - return; - } - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal pure override { - _transfer(from, to, tokenId); - } - function proxiableUUID() public pure override returns (bytes32) { - return keccak256(""); - } - - function tokenURI(uint256 /* tokenId */) external pure override returns (string memory) { - return ""; - } -} - - -/// @title ConstantInflowNFTStorageLayoutMock -/// @author Superfluid -/// @notice A mock ConstantOutflowNFT contract for testing storage layout. -/// @dev This contract *MUST* have the same storage layout as ConstantOutflowNFT.sol -contract ConstantInflowNFTStorageLayoutMock is ConstantInflowNFT, IStorageLayoutBase { - - constructor( - ISuperfluid host, - IConstantOutflowNFT constantOutflowNFT - ) ConstantInflowNFT(host, constantOutflowNFT) {} - - /// @notice Validates storage layout - /// @dev This function is used to validate storage layout of ConstantInflowNFT - function validateStorageLayout() public virtual { - uint256 slot; - uint256 offset; // in bytes - - // slot 0 taken is occupied by these variables: - // Initializable._initialized (uint8) 1byte - // Initializable._initializing (bool) 1byte - - assembly { slot := _name.slot offset := _name.offset } - if (slot != 1 || offset != 0) revert STORAGE_LOCATION_CHANGED("_name"); - - assembly { slot := _symbol.slot offset := _symbol.offset } - if (slot != 2 || offset != 0) revert STORAGE_LOCATION_CHANGED("_symbol"); - - assembly { slot := _tokenApprovals.slot offset := _tokenApprovals.offset } - if (slot != 3 || offset != 0) revert STORAGE_LOCATION_CHANGED("_tokenApprovals"); - - assembly { slot := _operatorApprovals.slot offset := _operatorApprovals.offset } - if (slot != 4 || offset != 0) revert STORAGE_LOCATION_CHANGED("_operatorApprovals"); - - assembly { slot := _reserve5.slot offset := _reserve5.offset } - if (slot != 5 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve5"); - - assembly { slot := _reserve21.slot offset := _reserve21.offset } - if (slot != 21 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve21"); - } - - // Dummy implementations for abstract functions - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal override pure { - _transfer(from, to, tokenId); - } -} - -/// @title ConstantOutflowNFTStorageLayoutMock -/// @author Superfluid -/// @notice A mock ConstantOutflowNFT contract for testing storage layout. -/// @dev This contract *MUST* have the same storage layout as ConstantOutflowNFT.sol -contract ConstantOutflowNFTStorageLayoutMock is ConstantOutflowNFT, IStorageLayoutBase { - - constructor( - ISuperfluid host, - IConstantInflowNFT constantInflowNFT - ) ConstantOutflowNFT(host, constantInflowNFT) {} - - /// @notice Validates storage layout - /// @dev This function is used to validate storage layout of ConstantOutflowNFT - function validateStorageLayout() public virtual { - uint256 slot; - uint256 offset; // in bytes - - // slot 0 taken is occupied by these variables: - // Initializable._initialized (uint8) 1byte - // Initializable._initializing (bool) 1byte - - assembly { slot := _name.slot offset := _name.offset } - if (slot != 1 || offset != 0) revert STORAGE_LOCATION_CHANGED("_name"); - - assembly { slot := _symbol.slot offset := _symbol.offset } - if (slot != 2 || offset != 0) revert STORAGE_LOCATION_CHANGED("_symbol"); - - assembly { slot := _tokenApprovals.slot offset := _tokenApprovals.offset } - if (slot != 3 || offset != 0) revert STORAGE_LOCATION_CHANGED("_tokenApprovals"); - - assembly { slot := _operatorApprovals.slot offset := _operatorApprovals.offset } - if (slot != 4 || offset != 0) revert STORAGE_LOCATION_CHANGED("_operatorApprovals"); - - assembly { slot := _reserve5.slot offset := _reserve5.offset } - if (slot != 5 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve5"); - - assembly { slot := _reserve21.slot offset := _reserve21.offset } - if (slot != 21 || offset != 0) revert STORAGE_LOCATION_CHANGED("_reserve21"); - - assembly { slot := _flowDataByTokenId.slot offset := _flowDataByTokenId.offset } - if (slot != 22 || offset != 0) revert STORAGE_LOCATION_CHANGED("_flowDataByTokenId"); - } - - // Dummy implementations for abstract functions - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal pure override { - _transfer(from, to, tokenId); - } -} diff --git a/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.sol b/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.t.sol similarity index 98% rename from packages/ethereum-contracts/contracts/mocks/CallUtilsMock.sol rename to packages/ethereum-contracts/contracts/mocks/CallUtilsMock.t.sol index 3f1d3716a1..59c8dde78d 100644 --- a/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/CallUtilsMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.sol b/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.t.sol similarity index 95% rename from packages/ethereum-contracts/contracts/mocks/CallUtilsTester.sol rename to packages/ethereum-contracts/contracts/mocks/CallUtilsTester.t.sol index 8a8a266694..87e56d8bf7 100644 --- a/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.sol +++ b/packages/ethereum-contracts/contracts/mocks/CallUtilsTester.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol b/packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol deleted file mode 100644 index 06cb22df2e..0000000000 --- a/packages/ethereum-contracts/contracts/mocks/CrossStreamSuperApp.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { ISuperfluid, ISuperToken } from "../interfaces/superfluid/ISuperfluid.sol"; -import { SuperAppBaseFlow } from "../apps/SuperAppBaseFlow.sol"; -import { SuperTokenV1Library } from "../apps/SuperTokenV1Library.sol"; - -using SuperTokenV1Library for ISuperToken; - -/// @title CrossStreamSuperApp -/// @author Superfluid -/// @dev A super app used for testing "cross-stream" flows in callbacks -/// and its behavior surrounding the internal protocol accounting. -/// That is, two senders sending a flow to the super app -contract CrossStreamSuperApp is SuperAppBaseFlow { - address public flowRecipient; - address public prevSender; - int96 public prevFlowRate; - - constructor(ISuperfluid host_, address z_) SuperAppBaseFlow(host_, true, true, true, "") { - flowRecipient = z_; - } - - function onFlowCreated(ISuperToken superToken, address sender, bytes calldata ctx) - internal - override - returns (bytes memory newCtx) - { - newCtx = ctx; - - // get incoming stream - int96 inFlowRate = superToken.getFlowRate(sender, address(this)); - - if (prevSender == address(0)) { - // first flow to super app creates a flow - newCtx = superToken.createFlowWithCtx(flowRecipient, inFlowRate, newCtx); - } else { - // subsequent flows to super app updates and deletes the flow - newCtx = superToken.updateFlowWithCtx(flowRecipient, inFlowRate, newCtx); - newCtx = superToken.deleteFlowWithCtx(prevSender, address(this), newCtx); - } - - prevSender = sender; - prevFlowRate = inFlowRate; - } -} diff --git a/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.sol b/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.sol rename to packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.t.sol index a80938eef0..3cf3a3daf6 100644 --- a/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/CustomSuperTokenMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { CustomSuperTokenBase, ISuperToken } from "../interfaces/superfluid/CustomSuperTokenBase.sol"; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.sol b/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.sol rename to packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.t.sol index 32f7d802f3..f6ca024fce 100644 --- a/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/ERC777SenderRecipientMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Context } from "@openzeppelin/contracts/utils/Context.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.sol b/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.t.sol similarity index 95% rename from packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.sol rename to packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.t.sol index 08c56125c0..53df7296a3 100644 --- a/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/FakeSuperfluidMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/ForwarderMock.sol b/packages/ethereum-contracts/contracts/mocks/ForwarderMock.t.sol similarity index 97% rename from packages/ethereum-contracts/contracts/mocks/ForwarderMock.sol rename to packages/ethereum-contracts/contracts/mocks/ForwarderMock.t.sol index 4a2187c850..f03c442429 100644 --- a/packages/ethereum-contracts/contracts/mocks/ForwarderMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/ForwarderMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { CallUtils } from "../libs/CallUtils.sol"; import { IRelayRecipient } from "../interfaces/utils/IRelayRecipient.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.sol b/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.sol rename to packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.t.sol index 37ae4eb21b..ac9d2a5488 100644 --- a/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.sol +++ b/packages/ethereum-contracts/contracts/mocks/IDASuperAppTester.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.sol b/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.sol rename to packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.t.sol index dcbd3818dd..938d2fb327 100644 --- a/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/IDAv1LibraryMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; pragma experimental ABIEncoderV2; import {ISuperfluid, ISuperfluidToken, ISuperToken} from "../interfaces/superfluid/ISuperfluid.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.sol b/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.t.sol similarity index 94% rename from packages/ethereum-contracts/contracts/mocks/MockSmartWallet.sol rename to packages/ethereum-contracts/contracts/mocks/MockSmartWallet.t.sol index 0370d9b918..1edf9e5833 100644 --- a/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.sol +++ b/packages/ethereum-contracts/contracts/mocks/MockSmartWallet.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperToken, IERC20 } from "../interfaces/superfluid/ISuperfluid.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.sol b/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.sol rename to packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.t.sol index 2cd92308e9..53476772f7 100644 --- a/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.sol +++ b/packages/ethereum-contracts/contracts/mocks/MultiFlowTesterApp.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/mocks/StreamRedirector.sol b/packages/ethereum-contracts/contracts/mocks/StreamRedirector.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/StreamRedirector.sol rename to packages/ethereum-contracts/contracts/mocks/StreamRedirector.t.sol index bb95df08dd..12c3bcbad0 100644 --- a/packages/ethereum-contracts/contracts/mocks/StreamRedirector.sol +++ b/packages/ethereum-contracts/contracts/mocks/StreamRedirector.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperToken, SuperAppBase, ISuperApp, SuperAppDefinitions, IConstantFlowAgreementV1, ISuperAgreement diff --git a/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.sol b/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol similarity index 96% rename from packages/ethereum-contracts/contracts/mocks/SuperAppMocks.sol rename to packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol index 927381d62b..3c92cf017c 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperAppMocks.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, @@ -8,7 +8,9 @@ import { ISuperAgreement, SuperAppDefinitions } from "../superfluid/Superfluid.sol"; -import { AgreementMock } from "./AgreementMock.sol"; +import { CallbackUtils } from "../libs/CallbackUtils.sol"; +import { AgreementMock } from "./AgreementMock.t.sol"; + contract SuperAppMockAux { @@ -446,11 +448,16 @@ contract SuperAppMock is ISuperApp { function _burnGas(uint256 gasToBurn) private view { uint256 gasStart = gasleft(); - uint256 gasNow = gasleft(); - while ((gasStart - gasNow) < gasToBurn - 1000 /* some margin for other things*/) { - gasNow = gasleft(); + // _stubBurnGas burns gas more efficiently + try this._stubBurnGas{ gas: gasToBurn }() { assert(false); } catch { + // use gasleft() to burn the remaining gas budget + // solhint-disable-next-line no-empty-blocks + while ((gasStart - gasleft()) < gasToBurn - 1000 /* some margin for other things*/) { } } } + function _stubBurnGas() external pure { + CallbackUtils.consumeAllGas(); + } modifier requireValidCtx(bytes calldata ctx) { require(ISuperfluid(msg.sender).isCtxValid(ctx), "AgreementMock: ctx not valid before"); diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol similarity index 94% rename from packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol index ae69db9200..bb1ad92282 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol @@ -1,15 +1,13 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -import { +import { ISuperfluid, ISuperToken, - IConstantInflowNFT, - IConstantOutflowNFT, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; -import { SuperTokenFactoryBase } from "../superfluid/SuperTokenFactory.sol"; +import { SuperTokenFactoryBase, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperTokenFactory.sol"; contract SuperTokenFactoryStorageLayoutTester is SuperTokenFactoryBase { constructor( diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.t.sol similarity index 99% rename from packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.t.sol index 3e5dc35c23..663034e984 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenLibraryV1Mock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperToken } from "../interfaces/superfluid/ISuperfluid.sol"; import { SuperAppDefinitions } from "../interfaces/superfluid/ISuperfluid.sol"; @@ -869,7 +869,7 @@ contract SuperTokenLibraryGDASuperAppMock is SuperTokenLibraryGDAMock, SuperAppB } else if (functionIndex == uint8(FunctionIndex.CLAIM_ALL)) { return token.claimAllWithCtx(ISuperfluidPool(pool), member, ctx); } else if (functionIndex == uint8(FunctionIndex.DISTRIBUTE)) { - return token.distributeWithCtx(ISuperfluidPool(pool), from, requestedAmount, ctx); + return token.distributeWithCtx(from, ISuperfluidPool(pool), requestedAmount, ctx); } else if (functionIndex == uint8(FunctionIndex.DISTRIBUTE_FLOW)) { return token.distributeFlowWithCtx(from, ISuperfluidPool(pool), requestedFlowRate, ctx); } else { diff --git a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol similarity index 97% rename from packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol index 7e336c249f..402c753631 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperTokenMock.t.sol @@ -1,13 +1,14 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; + +import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { - ISuperfluid, IERC20, IConstantInflowNFT, IConstantOutflowNFT, IPoolAdminNFT, IPoolMemberNFT + ISuperfluid, IERC20, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; -import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { ERC777Helper } from "../libs/ERC777Helper.sol"; -import { SuperToken } from "../superfluid/SuperToken.sol"; +import { SuperToken, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperToken.sol"; import { SuperfluidToken } from "../superfluid/SuperfluidToken.sol"; contract SuperTokenStorageLayoutTester is SuperToken { @@ -17,7 +18,7 @@ contract SuperTokenStorageLayoutTester is SuperToken { IConstantInflowNFT constantInflowNFTProxy, IPoolAdminNFT poolAdminNFTProxy, IPoolMemberNFT poolMemberNFTProxy - ) SuperToken(host, constantOutflowNFTProxy, constantInflowNFTProxy, poolAdminNFTProxy, poolMemberNFTProxy) + ) SuperToken(host, constantOutflowNFTProxy, constantInflowNFTProxy, poolAdminNFTProxy, poolMemberNFTProxy) // solhint-disable-next-line no-empty-blocks { } diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.t.sol similarity index 78% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.t.sol index 94ef1d5e56..33252f20e8 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidDestructorMock.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable -pragma solidity 0.8.19; +pragma solidity ^0.8.23; contract SuperfluidDestructorMock { @@ -8,7 +8,7 @@ contract SuperfluidDestructorMock { fallback() external { // this == impl in this call - selfdestruct(payable(0)); + assembly { selfdestruct(0) } } } diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.t.sol similarity index 96% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.t.sol index ebb57add87..7cce278d75 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidGovernanceIIMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { SuperfluidGovernanceII } from "../gov/SuperfluidGovernanceII.sol"; diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol similarity index 93% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol rename to packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol index a9a02ff0e9..caa1fb6955 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/SuperfluidMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Superfluid, @@ -11,7 +11,8 @@ import { CallUtils } from "../libs/CallUtils.sol"; contract SuperfluidUpgradabilityTester is Superfluid { - constructor() Superfluid(false, false) + // 3_000_000 is the min callback gas limit used in a prod deployment + constructor() Superfluid(false, false, 3_000_000, address(0)) // solhint-disable-next-line no-empty-blocks { } @@ -129,9 +130,13 @@ contract SuperfluidUpgradabilityTester is Superfluid { contract SuperfluidMock is Superfluid { - - constructor(bool nonUpgradable, bool appWhiteListingEnabled) - Superfluid(nonUpgradable, appWhiteListingEnabled) + constructor( + bool nonUpgradable, + bool appWhiteListingEnabled, + uint64 callbackGasLimit, + address dmzForwarder + ) + Superfluid(nonUpgradable, appWhiteListingEnabled, callbackGasLimit, dmzForwarder) // solhint-disable-next-line no-empty-blocks { } @@ -173,5 +178,4 @@ contract SuperfluidMock is Superfluid { { _jailApp(app, 6942); } - } diff --git a/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.sol b/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.t.sol similarity index 96% rename from packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.sol rename to packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.t.sol index 54e460eab2..0a4b8af744 100644 --- a/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.sol +++ b/packages/ethereum-contracts/contracts/mocks/UUPSProxiableMock.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol b/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol deleted file mode 100644 index 5603aa8fca..0000000000 --- a/packages/ethereum-contracts/contracts/superfluid/ConstantInflowNFT.sol +++ /dev/null @@ -1,92 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { IConstantOutflowNFT } from "../interfaces/superfluid/IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "../interfaces/superfluid/IConstantInflowNFT.sol"; -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { FlowNFTBase, IFlowNFTBase } from "./FlowNFTBase.sol"; - -/// @title ConstantInflowNFT Contract (CIF NFT) -/// @author Superfluid -/// @notice The ConstantInflowNFT contract to be minted to the flow sender on flow creation. -/// @dev This contract does not hold any storage, but references the ConstantOutflowNFT contract storage. -contract ConstantInflowNFT is FlowNFTBase, IConstantInflowNFT { - IConstantOutflowNFT public immutable CONSTANT_OUTFLOW_NFT; - - // solhint-disable-next-line no-empty-blocks - constructor(ISuperfluid host, IConstantOutflowNFT constantOutflowNFT) FlowNFTBase(host) { - CONSTANT_OUTFLOW_NFT = constantOutflowNFT; - } - - function proxiableUUID() public pure override returns (bytes32) { - return keccak256("org.superfluid-finance.contracts.ConstantInflowNFT.implementation"); - } - - /// @notice The mint function emits the "mint" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// Only callable by ConstantOutflowNFT - /// @param to the receiver of the inflow nft and desired flow receiver - /// @param newTokenId the new token id - function mint(address to, uint256 newTokenId) external onlyConstantOutflowNFT { - _mint(to, newTokenId); - } - - /// @notice This burn function emits the "burn" `Transfer` event. - /// @dev We don't modify storage as this is handled in ConstantOutflowNFT.sol and this function's sole purpose - /// is to inform clients that search for events. - /// Only callable by ConstantOutflowNFT - /// @param tokenId desired token id to burn - function burn(uint256 tokenId) external onlyConstantOutflowNFT { - _burn(tokenId); - } - - function flowDataByTokenId(uint256 tokenId) - public - view - override(FlowNFTBase, IFlowNFTBase) - returns (FlowNFTData memory flowData) - { - flowData = CONSTANT_OUTFLOW_NFT.flowDataByTokenId(tokenId); - } - - function tokenURI(uint256 tokenId) external view override(FlowNFTBase, IERC721Metadata) returns (string memory) { - return _tokenURI(tokenId, true); - } - - /// @inheritdoc FlowNFTBase - function _ownerOf(uint256 tokenId) internal view override returns (address) { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - return flowData.flowReceiver; - } - - /// @notice Transfer is currently not allowed. - /// @dev Will revert currently. - function _transfer( - address, // from, - address, // to, - uint256 // tokenId - ) internal pure override { - revert CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); - } - - function _mint(address to, uint256 newTokenId) internal { - emit Transfer(address(0), to, newTokenId); - } - - function _burn(uint256 tokenId) internal override { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - - super._burn(tokenId); - - emit Transfer(flowData.flowReceiver, address(0), tokenId); - } - - modifier onlyConstantOutflowNFT() { - if (msg.sender != address(CONSTANT_OUTFLOW_NFT)) { - revert CIF_NFT_ONLY_CONSTANT_OUTFLOW(); - } - _; - } -} diff --git a/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol b/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol deleted file mode 100644 index 63e311d42d..0000000000 --- a/packages/ethereum-contracts/contracts/superfluid/ConstantOutflowNFT.sol +++ /dev/null @@ -1,171 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -// solhint-disable not-rely-on-time -pragma solidity 0.8.19; - -import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { ISuperfluidToken } from "../interfaces/superfluid/ISuperfluidToken.sol"; -import { IConstantInflowNFT } from "../interfaces/superfluid/IConstantInflowNFT.sol"; -import { IConstantOutflowNFT } from "../interfaces/superfluid/IConstantOutflowNFT.sol"; -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { FlowNFTBase, IFlowNFTBase } from "./FlowNFTBase.sol"; - -/// @title ConstantOutflowNFT contract (COF NFT) -/// @author Superfluid -/// @notice The ConstantOutflowNFT contract to be minted to the flow sender on flow creation. -/// @dev This contract uses mint/burn interface for flow creation/deletion and holds the actual storage for both NFTs. -contract ConstantOutflowNFT is FlowNFTBase, IConstantOutflowNFT { - IConstantInflowNFT public immutable CONSTANT_INFLOW_NFT; - - /// @notice A mapping from token id to FlowNFTData - /// FlowNFTData: { address flowSender, uint32 flowStartDate, address flowReceiver, address superToken } - /// @dev The token id is uint256(keccak256(abi.encode(flowSender, flowReceiver))) - mapping(uint256 => FlowNFTData) internal _flowDataByTokenId; - - // solhint-disable-next-line no-empty-blocks - constructor(ISuperfluid host, IConstantInflowNFT constantInflowNFT) FlowNFTBase(host) { - CONSTANT_INFLOW_NFT = constantInflowNFT; - } - - // note that this is used so we don't upgrade to wrong logic contract - function proxiableUUID() public pure override returns (bytes32) { - return keccak256("org.superfluid-finance.contracts.ConstantOutflowNFT.implementation"); - } - - /// @notice An external function for querying flow data by `tokenId`` - /// @param tokenId the token id - /// @return flowData the flow data associated with `tokenId` - function flowDataByTokenId(uint256 tokenId) - public - view - override(FlowNFTBase, IFlowNFTBase) - returns (FlowNFTData memory flowData) - { - flowData = _flowDataByTokenId[tokenId]; - } - - function tokenURI(uint256 tokenId) external view override(FlowNFTBase, IERC721Metadata) returns (string memory) { - return _tokenURI(tokenId, false); - } - - /// @notice Hook called by CFA contract on flow creation - /// @dev This function mints the COF NFT to the flow sender and mints the CIF NFT to the flow receiver - /// @param superToken the SuperToken contract address - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// NOTE: We do an existence check in here to determine whether or not to execute the hook - function onCreate(ISuperfluidToken superToken, address flowSender, address flowReceiver) - external - onlyFlowAgreements - { - // we don't check matching super token because the nft token id - // is generated based on the superToken - uint256 newTokenId = _getTokenId(address(superToken), flowSender, flowReceiver); - if (_flowDataByTokenId[newTokenId].flowSender == address(0)) { - _mint(address(superToken), flowSender, flowReceiver, newTokenId); - - CONSTANT_INFLOW_NFT.mint(flowReceiver, newTokenId); - } - } - - /// @notice Hook called by CFA contract on flow update - /// @dev This function triggers the metadata update of both COF and CIF NFTs - /// @param superToken the SuperToken contract address - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// NOTE: We do an existence check in here to determine whether or not to execute the hook - function onUpdate(ISuperfluidToken superToken, address flowSender, address flowReceiver) - external - onlyFlowAgreements - { - uint256 tokenId = _getTokenId(address(superToken), flowSender, flowReceiver); - if (_flowDataByTokenId[tokenId].flowSender != address(0)) { - _triggerMetadataUpdate(tokenId); - - CONSTANT_INFLOW_NFT.triggerMetadataUpdate(tokenId); - } - } - - /// @notice Hook called by CFA contract on flow deletion - /// @dev This function burns the COF NFT and burns the CIF NFT - /// @param superToken the SuperToken contract address - /// @param flowSender the flow sender - /// @param flowReceiver the flow receiver - /// NOTE: We do an existence check in here to determine whether or not to execute the hook - function onDelete(ISuperfluidToken superToken, address flowSender, address flowReceiver) - external - onlyFlowAgreements - { - uint256 tokenId = _getTokenId(address(superToken), flowSender, flowReceiver); - if (_flowDataByTokenId[tokenId].flowSender != address(0)) { - // must "burn" inflow NFT first because we clear storage when burning outflow NFT - - CONSTANT_INFLOW_NFT.burn(tokenId); - - _burn(tokenId); - } - } - - /// @inheritdoc FlowNFTBase - function _ownerOf(uint256 tokenId) internal view override returns (address) { - return _flowDataByTokenId[tokenId].flowSender; - } - - /// @notice Reverts - Transfer of outflow NFT is not allowed. - /// @dev We revert when users attempt to transfer outflow NFTs. - function _transfer( - address, // from, - address, // to, - uint256 // tokenId - ) internal pure override { - revert CFA_NFT_TRANSFER_IS_NOT_ALLOWED(); - } - - /// @notice Mints `newTokenId` and transfers it to `flowSender` - /// @dev `newTokenId` must not exist `flowSender` cannot be `address(0)` and we emit a {Transfer} event. - /// `flowSender` cannot be equal to `flowReceiver`. - /// @param superToken the SuperToken contract address - /// @param flowSender the receiver of the newly minted outflow nft (to) - /// @param flowReceiver the flow receiver (owner of the InflowNFT) - /// @param newTokenId the new token id to be minted - function _mint(address superToken, address flowSender, address flowReceiver, uint256 newTokenId) internal { - assert(flowSender != address(0)); - assert(flowSender != flowReceiver); - assert(!_exists(newTokenId)); - - // update mapping for new NFT to be minted - _flowDataByTokenId[newTokenId] = FlowNFTData( - superToken, - flowSender, - flowReceiver, - uint32(block.timestamp) // flowStartDate - ); - - // emit mint of new outflow token with newTokenId - emit Transfer(address(0), flowSender, newTokenId); - } - - /// @notice Destroys token with `tokenId` and clears approvals from previous owner. - /// @dev `tokenId` must exist AND we emit a {Transfer} event - /// @param tokenId the id of the token we are destroying - function _burn(uint256 tokenId) internal override { - address owner = _ownerOf(tokenId); - - super._burn(tokenId); - - // remove previous tokenId flow data mapping - delete _flowDataByTokenId[tokenId]; - - // emit burn of outflow token with tokenId - emit Transfer(owner, address(0), tokenId); - } - - modifier onlyFlowAgreements() { - if ( - msg.sender != address(CONSTANT_FLOW_AGREEMENT_V1) - && msg.sender != address(GENERAL_DISTRIBUTION_AGREEMENT_V1) - ) { - revert COF_NFT_ONLY_FLOW_AGREEMENTS(); - } - _; - } -} diff --git a/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol b/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol deleted file mode 100644 index a67ca5c55c..0000000000 --- a/packages/ethereum-contracts/contracts/superfluid/FlowNFTBase.sol +++ /dev/null @@ -1,374 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -// solhint-disable max-states-count -// Notes: We use reserved slots for upgradable contracts. - -// They are used in solidity docs. -import { - // solhint-disable-next-line no-unused-import - IERC165, IERC721, IERC721Metadata -} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; - -import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { - ISuperfluid, ISuperToken, ISuperTokenFactory, IFlowNFTBase, - IConstantFlowAgreementV1, IGeneralDistributionAgreementV1 -} from "../interfaces/superfluid/ISuperfluid.sol"; - -/// @title FlowNFTBase abstract contract -/// @author Superfluid -/// @notice The abstract contract to be inherited by the Flow NFTs. -/// @dev This contract inherits from IFlowNFTBase which inherits from -/// IERC721Metadata and holds shared storage and functions for the two NFT contracts. -/// This contract is upgradeable and it inherits from our own ad-hoc UUPSProxiable contract which allows. -/// NOTE: the storage gap allows us to add an additional 16 storage variables to this contract without breaking child -/// COFNFT or CIFNFT storage. -abstract contract FlowNFTBase is UUPSProxiable, IFlowNFTBase { - using Strings for uint256; - - string public constant DEFAULT_BASE_URI = "https://nft.superfluid.finance/cfa/v2/getmeta"; - - function baseURI() public pure returns (string memory) { return DEFAULT_BASE_URI; } - - /// @notice ConstantFlowAgreementV1 contract address - /// @dev This is the address of the CFAv1 contract cached so we don't have to - /// do an external call for every flow created. - // solhint-disable-next-line var-name-mixedcase - IConstantFlowAgreementV1 public immutable CONSTANT_FLOW_AGREEMENT_V1; - - /// @notice GeneralDistributionAgreementV1 contract address - /// @dev This is the address of the GDAv1 contract cached so we don't have to - /// do an external call for every flow created. - // solhint-disable-next-line var-name-mixedcase - IGeneralDistributionAgreementV1 public immutable GENERAL_DISTRIBUTION_AGREEMENT_V1; - - /// @notice Superfluid host contract address - ISuperfluid public immutable HOST; - - /************************************************************************** - * Storage variables - *************************************************************************/ - /// NOTE: The storage variables in this contract MUST NOT: - /// - change the ordering of the existing variables - /// - change any of the variable types - /// - rename any of the existing variables - /// - remove any of the existing variables - /// - add any new variables after _gap - /// - add any new variables before _gap and NOT decrement the length of the _gap array - /// Go to CFAv1NFTUpgradability.t.sol for the tests and make sure to add new tests for upgrades. - - string internal _name; - string internal _symbol; - - /// @notice Mapping for token approvals - /// @dev tokenID => approved address mapping - mapping(uint256 => address) internal _tokenApprovals; - - /// @notice Mapping for operator approvals - mapping(address => mapping(address => bool)) internal _operatorApprovals; - - /// @notice This allows us to add new storage variables in the base contract - /// without having to worry about messing up the storage layout that exists in COFNFT or CIFNFT. - /// @dev This empty reserved space is put in place to allow future versions to add new - /// variables without shifting down storage in the inheritance chain. - /// Slots 5-21 are reserved for future use. - /// We use this pattern in SuperToken.sol and favor this over the OpenZeppelin pattern - /// as this prevents silly footgunning. - /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - uint256 internal _reserve5; - uint256 private _reserve6; - uint256 private _reserve7; - uint256 private _reserve8; - uint256 private _reserve9; - uint256 private _reserve10; - uint256 private _reserve11; - uint256 private _reserve12; - uint256 private _reserve13; - uint256 private _reserve14; - uint256 private _reserve15; - uint256 private _reserve16; - uint256 private _reserve17; - uint256 private _reserve18; - uint256 private _reserve19; - uint256 private _reserve20; - uint256 internal _reserve21; - - constructor(ISuperfluid host) { - HOST = host; - CONSTANT_FLOW_AGREEMENT_V1 = IConstantFlowAgreementV1( - address( - ISuperfluid(host).getAgreementClass( - keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1") - ) - ) - ); - GENERAL_DISTRIBUTION_AGREEMENT_V1 = IGeneralDistributionAgreementV1( - address( - ISuperfluid(host).getAgreementClass( - keccak256("org.superfluid-finance.agreements.GeneralDistributionAgreement.v1") - ) - ) - ); - } - - function initialize(string memory nftName, string memory nftSymbol) - external - override - initializer // OpenZeppelin Initializable - { - _name = nftName; - _symbol = nftSymbol; - } - - function updateCode(address newAddress) external override { - ISuperTokenFactory superTokenFactory = HOST.getSuperTokenFactory(); - if (msg.sender != address(superTokenFactory)) { - revert CFA_NFT_ONLY_SUPER_TOKEN_FACTORY(); - } - - UUPSProxiable._updateCodeAddress(newAddress); - } - - /// @notice Emits the MetadataUpdate event with `tokenId` as the argument. - /// @dev Callable by anyone. - /// @param tokenId the token id to trigger a metaupdate for - function triggerMetadataUpdate(uint256 tokenId) external { - _triggerMetadataUpdate(tokenId); - } - - /// @notice This contract supports IERC165, IERC721 and IERC721Metadata - /// @dev This is part of the Standard Interface Detection EIP: https://eips.ethereum.org/EIPS/eip-165 - /// @param interfaceId the XOR of all function selectors in the interface - /// @return boolean true if the interface is supported - /// @inheritdoc IERC165 - function supportsInterface(bytes4 interfaceId) external pure virtual override returns (bool) { - return interfaceId == 0x01ffc9a7 // ERC165 Interface ID for ERC165 - || interfaceId == 0x80ac58cd // ERC165 Interface ID for ERC721 - || interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata - } - - /// @inheritdoc IERC721 - function ownerOf(uint256 tokenId) public view virtual override returns (address) { - address owner = _ownerOf(tokenId); - if (owner == address(0)) { - revert CFA_NFT_INVALID_TOKEN_ID(); - } - return owner; - } - - /// @notice Returns a hardcoded balance of 1 - /// @dev We always return 1 to avoid the need for additional mapping - /// @return balance = 1 - function balanceOf( - address // owner - ) external pure returns (uint256 balance) { - balance = 1; - } - - /// @notice Returns the name of the NFT - /// @dev Should follow the naming convention: TOKENx Constant Outflow/Inflow NFT - /// @return name of the NFT - function name() external view virtual override returns (string memory) { - return _name; - } - - /// @notice Returns the symbol of the NFT - /// @dev Should follow the naming convention: TOKENx(COF/CIF) - /// @return symbol of the NFT - function symbol() external view virtual override returns (string memory) { - return _symbol; - } - - /// @notice This returns the Uniform Resource Identifier (URI), where the metadata for the NFT lives. - /// @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. - /// @return the token URI - function tokenURI(uint256 tokenId) external view virtual returns (string memory); - - function _tokenURI(uint256 tokenId, bool isInflow) internal view virtual returns (string memory) { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - - ISuperToken token = ISuperToken(flowData.superToken); - - (, int96 flowRate,,) = CONSTANT_FLOW_AGREEMENT_V1.getFlow(token, flowData.flowSender, flowData.flowReceiver); - - return - string( - abi.encodePacked( - baseURI(), - "?flowRate=", - uint256(uint96(flowRate)).toString(), - "&outgoing=", - isInflow ? "false" : "true", - _flowDataString(tokenId) - ) - ); - } - - function _flowDataString(uint256 tokenId) internal view returns (string memory) { - FlowNFTData memory flowData = flowDataByTokenId(tokenId); - - // @note taking this out to deal with the stack too deep issue - // which occurs when you are attempting to abi.encodePacked - // too many elements - return string( - abi.encodePacked( - "&token_address=", - Strings.toHexString(uint256(uint160(flowData.superToken)), 20), - "&chain_id=", - block.chainid.toString(), - "&token_symbol=", - ISuperToken(flowData.superToken).symbol(), - "&sender=", - Strings.toHexString(uint256(uint160(flowData.flowSender)), 20), - "&receiver=", - Strings.toHexString(uint256(uint160(flowData.flowReceiver)), 20), - "&token_decimals=", - uint256(ISuperToken(flowData.superToken).decimals()).toString(), - "&start_date=", - // @note upcasting is safe - uint256(flowData.flowStartDate).toString() - ) - ); - } - - /// @inheritdoc IERC721 - function approve(address to, uint256 tokenId) public virtual override { - address owner = FlowNFTBase.ownerOf(tokenId); - if (to == owner) { - revert CFA_NFT_APPROVE_TO_CURRENT_OWNER(); - } - - if (msg.sender != owner && !isApprovedForAll(owner, msg.sender)) { - revert CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); - } - - _approve(to, tokenId); - } - - /// @inheritdoc IFlowNFTBase - function getTokenId(address superToken, address sender, address receiver) external view returns (uint256 tokenId) { - tokenId = _getTokenId(superToken, sender, receiver); - } - - function _getTokenId(address superToken, address sender, address receiver) - internal - view - returns (uint256 tokenId) - { - tokenId = uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))); - } - - /// @inheritdoc IERC721 - function getApproved(uint256 tokenId) public view virtual override returns (address) { - _requireMinted(tokenId); - - return _tokenApprovals[tokenId]; - } - - /// @inheritdoc IERC721 - function setApprovalForAll(address operator, bool approved) external virtual override { - _setApprovalForAll(msg.sender, operator, approved); - } - - /// @inheritdoc IERC721 - function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { - return _operatorApprovals[owner][operator]; - } - - /// @inheritdoc IERC721 - function transferFrom(address from, address to, uint256 tokenId) external virtual override { - if (!_isApprovedOrOwner(msg.sender, tokenId)) { - revert CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); - } - - _transfer(from, to, tokenId); - } - - /// @inheritdoc IERC721 - function safeTransferFrom(address from, address to, uint256 tokenId) external virtual override { - safeTransferFrom(from, to, tokenId, ""); - } - - /// @inheritdoc IERC721 - function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { - if (!_isApprovedOrOwner(msg.sender, tokenId)) { - revert CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL(); - } - - _safeTransfer(from, to, tokenId, data); - } - - /// @notice Returns whether `spender` is allowed to manage `tokenId`. - /// @dev Will revert if `tokenId` doesn't exist. - /// @param spender the spender of the token - /// @param tokenId the id of the token to be spent - /// @return whether `tokenId` can be spent by `spender` - function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { - address owner = FlowNFTBase.ownerOf(tokenId); - return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); - } - - /// @notice Reverts if `tokenId` doesn't exist - /// @param tokenId the token id whose existence we are checking - function _requireMinted(uint256 tokenId) internal view { - if (!_exists(tokenId)) revert CFA_NFT_INVALID_TOKEN_ID(); - } - - /// @notice Returns whether `tokenId` exists - /// @dev Tokens can be managed by their owner or approved accounts via `approve` or `setApprovalForAll`. - /// Tokens start existing when they are minted (`_mint`), - /// and stop existing when they are burned (`_burn`). - /// @param tokenId the token id we're interested in seeing if exists - /// @return bool whether ot not the token exists - function _exists(uint256 tokenId) internal view returns (bool) { - return _ownerOf(tokenId) != address(0); - } - - function _triggerMetadataUpdate(uint256 tokenId) internal { - emit MetadataUpdate(tokenId); - } - - function _approve(address to, uint256 tokenId) internal { - _tokenApprovals[tokenId] = to; - - emit Approval(_ownerOf(tokenId), to, tokenId); - } - - function _setApprovalForAll(address owner, address operator, bool approved) internal { - if (owner == operator) revert CFA_NFT_APPROVE_TO_CALLER(); - - _operatorApprovals[owner][operator] = approved; - - emit ApprovalForAll(owner, operator, approved); - } - - /// @dev Returns the flow data of the `tokenId`. Does NOT revert if token doesn't exist. - /// @param tokenId the token id whose existence we're checking - /// @return flowData the FlowNFTData struct for `tokenId` - function flowDataByTokenId(uint256 tokenId) public view virtual returns (FlowNFTData memory flowData); - - /// @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist. - /// @param tokenId the token id whose existence we're checking - /// @return address the address of the owner of `tokenId` - function _ownerOf(uint256 tokenId) internal view virtual returns (address); - - function _transfer(address from, address to, uint256 tokenId) internal virtual; - - function _safeTransfer( - address from, - address to, - uint256 tokenId, - bytes memory // data - ) internal virtual { - _transfer(from, to, tokenId); - } - - /// @dev Deletes the tokenApprovals for `tokenId` - /// @param tokenId the token id whose approvals we're clearing - function _burn(uint256 tokenId) internal virtual { - // clear approvals from the previous owner - delete _tokenApprovals[tokenId]; - } -} diff --git a/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol b/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol index 54a548cf1f..5870bd8174 100644 --- a/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol +++ b/packages/ethereum-contracts/contracts/superfluid/FullUpgradableSuperTokenProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperTokenFactory } from "../interfaces/superfluid/ISuperTokenFactory.sol"; import { Proxy } from "@openzeppelin/contracts/proxy/Proxy.sol"; diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol index 2e253d62a9..dbb0db043f 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // solhint-disable max-states-count // Notes: SuperToken is rich with states, disable this default rule here. @@ -9,8 +9,6 @@ import { ISuperfluid, ISuperToken, IERC20, - IConstantOutflowNFT, - IConstantInflowNFT, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; @@ -23,6 +21,12 @@ import { IERC777Recipient } from "@openzeppelin/contracts/token/ERC777/IERC777Re import { IERC777Sender } from "@openzeppelin/contracts/token/ERC777/IERC777Sender.sol"; import { Address } from "@openzeppelin/contracts/utils/Address.sol"; +// placeholder types needed as an intermediate step before complete removal of FlowNFTs +// solhint-disable-next-line no-empty-blocks +interface IConstantOutflowNFT {} +// solhint-disable-next-line no-empty-blocks +interface IConstantInflowNFT {} + /** * @title Superfluid's super token implementation * @@ -117,12 +121,10 @@ contract SuperToken is // set the immutable canonical NFT proxy addresses CONSTANT_OUTFLOW_NFT = constantOutflowNFT; CONSTANT_INFLOW_NFT = constantInflowNFT; + POOL_ADMIN_NFT = poolAdminNFT; POOL_MEMBER_NFT = poolMemberNFT; - emit ConstantOutflowNFTCreated(constantOutflowNFT); - emit ConstantInflowNFTCreated(constantInflowNFT); - emit PoolAdminNFTCreated(poolAdminNFT); emit PoolMemberNFTCreated(poolMemberNFT); } @@ -177,18 +179,6 @@ contract SuperToken is */ function updateCode(address newAddress) external virtual override onlyAdmin { UUPSProxiable._updateCodeAddress(newAddress); - - // @note This is another check to ensure that when updating to a new SuperToken logic contract - // that we have passed the correct NFT proxy contracts in the construction of the new SuperToken - // logic contract - if ( - CONSTANT_OUTFLOW_NFT != - SuperToken(newAddress).CONSTANT_OUTFLOW_NFT() || - CONSTANT_INFLOW_NFT != - SuperToken(newAddress).CONSTANT_INFLOW_NFT() - ) { - revert SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED(); - } } function changeAdmin(address newAdmin) external override onlyAdmin { @@ -882,6 +872,20 @@ contract SuperToken is _downgrade(msg.sender, account, account, amount, "", ""); } + function operationUpgradeTo(address account, address to, uint256 amount) + external virtual override + onlyHost + { + _upgrade(msg.sender, account, to, amount, "", ""); + } + + function operationDowngradeTo(address account, address to, uint256 amount) + external virtual override + onlyHost + { + _downgrade(msg.sender, account, to, amount, "", ""); + } + /************************************************************************** * Modifiers *************************************************************************/ diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol b/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol index 7030064d4d..55823bf0e4 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; @@ -8,11 +8,12 @@ import { ISuperToken } from "../interfaces/superfluid/ISuperTokenFactory.sol"; import { - ISuperfluid, IConstantOutflowNFT, IConstantInflowNFT, IPoolAdminNFT, IPoolMemberNFT + ISuperfluid, IPoolAdminNFT, IPoolMemberNFT } from "../interfaces/superfluid/ISuperfluid.sol"; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { FullUpgradableSuperTokenProxy } from "./FullUpgradableSuperTokenProxy.sol"; +import { IConstantOutflowNFT, IConstantInflowNFT } from "./SuperToken.sol"; abstract contract SuperTokenFactoryBase is UUPSProxiable, @@ -144,16 +145,6 @@ abstract contract SuperTokenFactoryBase is // We only do this if the new logic contracts passed in updating the SuperTokenFactory // are different from the current logic contracts SuperTokenFactory newFactory = SuperTokenFactory(newAddress); - address newConstantOutflowLogic = address(newFactory.CONSTANT_OUTFLOW_NFT_LOGIC()); - address newConstantInflowLogic = address(newFactory.CONSTANT_INFLOW_NFT_LOGIC()); - - if (address(CONSTANT_OUTFLOW_NFT_LOGIC) != newConstantOutflowLogic) { - UUPSProxiable(address(_SUPER_TOKEN_LOGIC.CONSTANT_OUTFLOW_NFT())).updateCode(newConstantOutflowLogic); - } - - if (address(CONSTANT_INFLOW_NFT_LOGIC) != newConstantInflowLogic) { - UUPSProxiable(address(_SUPER_TOKEN_LOGIC.CONSTANT_INFLOW_NFT())).updateCode(newConstantInflowLogic); - } if (address(POOL_ADMIN_NFT_LOGIC) != address(newFactory.POOL_ADMIN_NFT_LOGIC())) { UUPSProxiable(address(_SUPER_TOKEN_LOGIC.POOL_ADMIN_NFT())).updateCode( diff --git a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol index 2e0925450e..9528c99748 100644 --- a/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol +++ b/packages/ethereum-contracts/contracts/superfluid/Superfluid.sol @@ -1,10 +1,9 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { UUPSProxiable } from "../upgradability/UUPSProxiable.sol"; import { UUPSProxy } from "../upgradability/UUPSProxy.sol"; -import { SafeGasLibrary } from "../libs/SafeGasLibrary.sol"; import { ISuperfluid, @@ -22,7 +21,9 @@ import { import { GeneralDistributionAgreementV1 } from "../agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { SuperfluidUpgradeableBeacon } from "../upgradability/SuperfluidUpgradeableBeacon.sol"; import { CallUtils } from "../libs/CallUtils.sol"; +import { CallbackUtils } from "../libs/CallbackUtils.sol"; import { BaseRelayRecipient } from "../libs/BaseRelayRecipient.sol"; +import { DMZForwarder } from "../utils/DMZForwarder.sol"; /** * @dev The Superfluid host implementation. @@ -51,6 +52,10 @@ contract Superfluid is // solhint-disable-next-line var-name-mixedcase bool immutable public APP_WHITE_LISTING_ENABLED; + uint64 immutable public CALLBACK_GAS_LIMIT; + + DMZForwarder immutable public DMZ_FORWARDER; + /** * @dev Maximum number of level of apps can be composed together * @@ -61,9 +66,6 @@ contract Superfluid is // solhint-disable-next-line var-name-mixedcase uint constant public MAX_APP_CALLBACK_LEVEL = 1; - // solhint-disable-next-line var-name-mixedcase - uint64 constant public CALLBACK_GAS_LIMIT = 3000000; - uint32 constant public MAX_NUM_AGREEMENTS = 256; /* WARNING: NEVER RE-ORDER VARIABLES! Always double-check that new @@ -95,9 +97,16 @@ contract Superfluid is /// function in its respective mock contract to ensure that it doesn't break anything or lead to unexpected /// behaviors/layout when upgrading - constructor(bool nonUpgradable, bool appWhiteListingEnabled) { + constructor( + bool nonUpgradable, + bool appWhiteListingEnabled, + uint64 callbackGasLimit, + address dmzForwarderAddress + ) { NON_UPGRADABLE_DEPLOYMENT = nonUpgradable; APP_WHITE_LISTING_ENABLED = appWhiteListingEnabled; + CALLBACK_GAS_LIMIT = callbackGasLimit; + DMZ_FORWARDER = DMZForwarder(dmzForwarderAddress); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -312,7 +321,7 @@ contract Superfluid is //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Superfluid Upgradeable Beacon //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - + /// @inheritdoc ISuperfluid function updatePoolBeaconLogic(address newLogic) external override onlyGovernance { GeneralDistributionAgreementV1 gda = GeneralDistributionAgreementV1( @@ -794,12 +803,11 @@ contract Superfluid is **************************************************************************/ function _batchCall( - address msgSender, + address payable msgSender, Operation[] calldata operations ) internal { - bool valueForwarded = false; for (uint256 i = 0; i < operations.length; ++i) { uint32 operationType = operations[i].operationType; if (operationType == BatchOperation.OPERATION_TYPE_ERC20_APPROVE) { @@ -847,6 +855,18 @@ contract Superfluid is ISuperToken(operations[i].target).operationDowngrade( msgSender, abi.decode(operations[i].data, (uint256))); // amount + } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO) { + (address to, uint256 amount) = abi.decode(operations[i].data, (address, uint256)); + ISuperToken(operations[i].target).operationUpgradeTo( + msgSender, + to, + amount); + } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO) { + (address to, uint256 amount) = abi.decode(operations[i].data, (address, uint256)); + ISuperToken(operations[i].target).operationDowngradeTo( + msgSender, + to, + amount); } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT) { (bytes memory callData, bytes memory userData) = abi.decode(operations[i].data, (bytes, bytes)); _callAgreement( @@ -854,20 +874,42 @@ contract Superfluid is ISuperAgreement(operations[i].target), callData, userData); - } else if (operationType == BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION) { + } + // The following operations for call proxies allow forwarding of native tokens. + // we use `address(this).balance` instead of `msg.value`, because the latter ist not + // updated after forwarding to the first operation, while `balance` is. + // The initial balance is equal to `msg.value` because there's no other path + // for the contract to receive native tokens. + else if (operationType == BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION) { _callAppAction( msgSender, ISuperApp(operations[i].target), - valueForwarded ? 0 : msg.value, + address(this).balance, operations[i].data); - valueForwarded = true; + } else if (operationType == BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL) { + (bool success, bytes memory returnData) = + DMZ_FORWARDER.forwardCall{value: address(this).balance}( + operations[i].target, + operations[i].data); + if (!success) { + CallUtils.revertFromReturnedData(returnData); + } + } else if (operationType == BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL) { + (bool success, bytes memory returnData) = + DMZ_FORWARDER.forward2771Call{value: address(this).balance}( + operations[i].target, + msgSender, + operations[i].data); + if (!success) { + CallUtils.revertFromReturnedData(returnData); + } } else { revert HOST_UNKNOWN_BATCH_CALL_OPERATION_TYPE(); } } - if (msg.value != 0 && !valueForwarded) { - // return ETH provided if not forwarded - payable(msg.sender).transfer(msg.value); + if (address(this).balance != 0) { + // return any native tokens left to the sender. + msgSender.transfer(address(this).balance); } } @@ -877,12 +919,12 @@ contract Superfluid is ) external override payable { - _batchCall(msg.sender, operations); + _batchCall(payable(msg.sender), operations); } /// @dev ISuperfluid.forwardBatchCall implementation function forwardBatchCall(Operation[] calldata operations) - external override + external override payable { _batchCall(_getTransactionSigner(), operations); } @@ -899,7 +941,7 @@ contract Superfluid is ) != 0; } - /// @dev IRelayRecipient.isTrustedForwarder implementation + /// @dev IRelayRecipient.versionRecipient implementation function versionRecipient() external override pure returns (string memory) @@ -1037,26 +1079,14 @@ contract Superfluid is callData = _replacePlaceholderCtx(callData, ctx); - uint256 gasLimit = CALLBACK_GAS_LIMIT; - uint256 gasLeftBefore = gasleft(); - if (isStaticall) { - /* solhint-disable-next-line avoid-low-level-calls*/ - (success, returnedData) = address(app).staticcall{ gas: gasLimit }(callData); - } else { - /* solhint-disable-next-line avoid-low-level-calls*/ - (success, returnedData) = address(app).call{ gas: gasLimit }(callData); - } + uint256 callbackGasLimit = CALLBACK_GAS_LIMIT; + bool insufficientCallbackGasProvided; + (success, insufficientCallbackGasProvided, returnedData) = isStaticall ? + CallbackUtils.staticCall(address(app), callData, callbackGasLimit) : + CallbackUtils.externalCall(address(app), callData, callbackGasLimit); if (!success) { - // - "/ 63" is a magic to avoid out of gas attack. - // See: https://medium.com/@wighawag/ethereum-the-concept-of-gas-and-its-dangers-28d0eb809bb2. - // - Without it, an app callback may use this to block the APP_RULE_NO_REVERT_ON_TERMINATION_CALLBACK jail - // rule. - // - Also note that, the CALLBACK_GAS_LIMIT given to the app includes the overhead an app developer may not - // have direct control of, such as abi decoding code block. It is recommend for the app developer to stay - // at least 30000 less gas usage from that value to not trigger - // APP_RULE_NO_REVERT_ON_TERMINATION_CALLBACK. - if (!SafeGasLibrary._isOutOfGas(gasLeftBefore)) { + if (!insufficientCallbackGasProvided) { if (!isTermination) { CallUtils.revertFromReturnedData(returnedData); } else { diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol index 9ca7ceb94f..cb5218676e 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperfluidToken.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { ISuperfluid, ISuperAgreement, ISuperfluidGovernance, ISuperfluidToken } from "../interfaces/superfluid/ISuperfluid.sol"; -import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; -import { EventsEmitter } from "../libs/EventsEmitter.sol"; import { FixedSizeData } from "../libs/FixedSizeData.sol"; /** @@ -349,7 +349,8 @@ abstract contract SuperfluidToken is ISuperfluidToken _sharedSettledBalances[rewardAmountReceiver] += rewardAmount.toInt256(); _sharedSettledBalances[targetAccount] += targetAccountBalanceDelta; - EventsEmitter.emitTransfer(targetAccount, rewardAmountReceiver, rewardAmount); + + emit IERC20.Transfer(targetAccount, rewardAmountReceiver, rewardAmount); } else { // LESS LIKELY BRANCH: target account is bailed out // NOTE: useDefaultRewardAccount being true is undefined behavior @@ -358,8 +359,9 @@ abstract contract SuperfluidToken is ISuperfluidToken _sharedSettledBalances[rewardAccount] -= (rewardAmount.toInt256() + targetAccountBalanceDelta); _sharedSettledBalances[liquidatorAccount] += rewardAmount.toInt256(); _sharedSettledBalances[targetAccount] += targetAccountBalanceDelta; - EventsEmitter.emitTransfer(rewardAccount, liquidatorAccount, rewardAmount); - EventsEmitter.emitTransfer(rewardAccount, targetAccount, uint256(targetAccountBalanceDelta)); + + emit IERC20.Transfer(rewardAccount, liquidatorAccount, rewardAmount); + emit IERC20.Transfer(rewardAccount, targetAccount, uint256(targetAccountBalanceDelta)); } emit AgreementLiquidatedV2( diff --git a/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol b/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol index 0315e02178..0deeb3dcff 100644 --- a/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol +++ b/packages/ethereum-contracts/contracts/tokens/PureSuperToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperToken, diff --git a/packages/ethereum-contracts/contracts/tokens/SETH.sol b/packages/ethereum-contracts/contracts/tokens/SETH.sol index ba8f9eb766..4070afc825 100644 --- a/packages/ethereum-contracts/contracts/tokens/SETH.sol +++ b/packages/ethereum-contracts/contracts/tokens/SETH.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperToken, @@ -19,7 +19,8 @@ contract SETHProxy is ISETHCustom, CustomSuperTokenBase, UUPSProxy { event TokenUpgraded(address indexed account, uint256 amount); event TokenDowngraded(address indexed account, uint256 amount); - // fallback function which mints Super Tokens for received ETH + /// fallback function which mints Super Tokens for received ETH + // solhint-disable-next-line no-complex-fallback receive() external payable override { ISuperToken(address(this)).selfMint(msg.sender, msg.value, new bytes(0)); emit TokenUpgraded(msg.sender, msg.value); diff --git a/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol b/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol index ba692cdaad..43db85e730 100644 --- a/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol +++ b/packages/ethereum-contracts/contracts/upgradability/BeaconProxiable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; diff --git a/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol b/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol index 126fc11e95..3dc1bbc9f6 100644 --- a/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol +++ b/packages/ethereum-contracts/contracts/upgradability/SuperfluidUpgradeableBeacon.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { UpgradeableBeacon diff --git a/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol b/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol index 1cc982cce6..13f5fc9036 100644 --- a/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol +++ b/packages/ethereum-contracts/contracts/upgradability/UUPSProxiable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { UUPSUtils } from "./UUPSUtils.sol"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; diff --git a/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol b/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol index 43b890360e..c871838a61 100644 --- a/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol +++ b/packages/ethereum-contracts/contracts/upgradability/UUPSProxy.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { UUPSUtils } from "./UUPSUtils.sol"; import { Proxy } from "@openzeppelin/contracts/proxy/Proxy.sol"; diff --git a/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol b/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol index 616b563b32..224a44009f 100644 --- a/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol +++ b/packages/ethereum-contracts/contracts/upgradability/UUPSUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; /** * @title UUPS (Universal Upgradeable Proxy Standard) Shared Library diff --git a/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol b/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol index 77603cdc72..d8d2ccd01e 100644 --- a/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol +++ b/packages/ethereum-contracts/contracts/utils/BatchLiquidator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperAgreement, ISuperToken, ISuperfluidPool, diff --git a/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol b/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol index 2e7b2dd40c..89f9a17c08 100644 --- a/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/CFAv1Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol b/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol new file mode 100644 index 0000000000..caaa47497d --- /dev/null +++ b/packages/ethereum-contracts/contracts/utils/DMZForwarder.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.23; + +import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; + +/** + * @title DMZForwarder + * @dev The purpose of this contract is to make arbitrary contract calls batchable + * alongside Superfluid specific batch operations. + * We route the calls through this dedicated contract in order to not have msg.sender set + * to the host contract, for security reasons. + * Forwarded calls can optionally use ERC-2771 to preserve the original msg.sender. + * If native tokens (msg.value) are provided, they are forwarded as well. + */ +contract DMZForwarder is Ownable { + /** + * @dev Forwards a call for which msg.sender doesn't matter + * @param target The target contract to call + * @param data The call data + */ + function forwardCall(address target, bytes memory data) + external payable + returns(bool success, bytes memory returnData) + { + // solhint-disable-next-line avoid-low-level-calls + (success, returnData) = target.call{value: msg.value}(data); + } + + /** + * @dev Forwards a call passing along the original msg.sender encoded as specified in ERC-2771. + * @param target The target contract to call + * @param msgSender The original msg.sender passed along by the trusted contract owner + * @param data The call data + */ + function forward2771Call(address target, address msgSender, bytes memory data) + external payable onlyOwner + returns(bool success, bytes memory returnData) + { + // solhint-disable-next-line avoid-low-level-calls + (success, returnData) = target.call{value: msg.value}(abi.encodePacked(data, msgSender)); + } + + /** + * @dev Allows to withdraw native tokens (ETH) which got stuck in this contract. + * This could happen if a call fails, but the caller doesn't revert the tx. + */ + function withdrawLostNativeTokens(address payable receiver) external onlyOwner { + receiver.transfer(address(this).balance); + } +} \ No newline at end of file diff --git a/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol b/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol index 8dec77819f..7097873328 100644 --- a/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol +++ b/packages/ethereum-contracts/contracts/utils/ForwarderBase.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { BatchOperation, ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; import { CallUtils } from "../libs/CallUtils.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol b/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol index dd5458d8f3..bc7af3235a 100644 --- a/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/GDAv1Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidToken } from "../interfaces/superfluid/ISuperfluid.sol"; import { ISuperfluidPool } from "../agreements/gdav1/SuperfluidPool.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol b/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol index 28e19d5912..adcc812400 100644 --- a/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol +++ b/packages/ethereum-contracts/contracts/utils/IDAv1Forwarder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, ISuperfluidToken } from "../interfaces/superfluid/ISuperfluid.sol"; import { IInstantDistributionAgreementV1 } from "../interfaces/agreements/IInstantDistributionAgreementV1.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol b/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol new file mode 100644 index 0000000000..3e8f4e2b03 --- /dev/null +++ b/packages/ethereum-contracts/contracts/utils/MacroForwarder.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.23; + +import { IUserDefinedMacro } from "../interfaces/utils/IUserDefinedMacro.sol"; +import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; +import { ForwarderBase } from "../utils/ForwarderBase.sol"; + + +/** + * @dev This is a trusted forwarder with high degree of extensibility through permission-less and user-defined "macro + * contracts". This is a vanilla version without EIP-712 support. + */ +contract MacroForwarder is ForwarderBase { + constructor(ISuperfluid host) ForwarderBase(host) {} + + /** + * @dev A convenience view wrapper for building the batch operations using a macro. + * @param m Target macro. + * @param params Parameters to simulate the macro. + * @return operations Operations returned by the macro after the simulation. + */ + function buildBatchOperations(IUserDefinedMacro m, bytes calldata params) public view + returns (ISuperfluid.Operation[] memory operations) + { + operations = m.buildBatchOperations(_host, params, msg.sender); + } + + /** + * @dev Run the macro defined by the provided macro contract and params. + * @param m Target macro. + * @param params Parameters to run the macro. + */ + function runMacro(IUserDefinedMacro m, bytes calldata params) external returns (bool) + { + ISuperfluid.Operation[] memory operations = buildBatchOperations(m, params); + bool retVal = _forwardBatchCall(operations); + m.postCheck(_host, params, msg.sender); + return retVal; + } +} diff --git a/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol b/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol index aee5834e24..ba410beb21 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperUpgrader.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.sol index f96adc7883..25a16a39e5 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeployer.sol @@ -14,33 +14,12 @@ import { SETHProxy } from "../tokens/SETH.sol"; /// @title Superfluid Framework Deployer /// @dev This deployer should only be used for local testing environments. -/// NOTE: ERC1820 must be deployed as a prerequisite to using this contract. +/// +/// Notes: +/// - ERC1820 must be deployed as a prerequisite to using this contract. +/// - Some test frameworks may have difficulties in tuning its maximum contract code size limit. Using deployment +/// steps contract solves this issue. contract SuperfluidFrameworkDeployer is SuperfluidFrameworkDeploymentSteps { - struct TestFrameworkConfigs { - // Whether the protocol is not upgradeable - // Default: false - bool nonUpgradeable; - // Whether app whitelisting is required - // Default: false - bool appWhitelistingEnabled; - // Trusted forwarders that can forward batch calls on your behalf via the Host - // Default: [] - address[] trustedForwarders; - // The default address to receive patrician period liquidation rewards (TOGA if unset/address(0)) - // Default: address(69) - address defaultRewardAddress; - // The multiplier against the flow rate which determines the buffer required for flow creation - // Buffer = flowRate * liquidationPeriod - // Default: 4 hours - uint256 liquidationPeriod; - // The amount of time where a liquidation results in a reward for the defaultRewardAddress - // Default: 30 minutes - uint256 patricianPeriod; - // The minimum amount of time that a user must bond their tokens in TOGA for - // Default: 1 week - uint256 minBondDuration; - } - /// @notice Deploys the Superfluid Framework (Test) /// @dev This uses default configurations for the framework. /// NOTE: ERC1820 must be deployed as a prerequisite before calling this function. diff --git a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol index b207720f50..7d15408dd4 100644 --- a/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol +++ b/packages/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol @@ -10,17 +10,18 @@ import { GDAv1Forwarder } from "./GDAv1Forwarder.sol"; import { ISuperfluid, ISuperfluidToken, Superfluid } from "../superfluid/Superfluid.sol"; import { TestGovernance } from "./TestGovernance.sol"; import { ConstantFlowAgreementV1 } from "../agreements/ConstantFlowAgreementV1.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../superfluid/ConstantInflowNFT.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../agreements/gdav1/PoolMemberNFT.sol"; import { InstantDistributionAgreementV1 } from "../agreements/InstantDistributionAgreementV1.sol"; -import { GeneralDistributionAgreementV1 } from "../agreements/gdav1/GeneralDistributionAgreementV1.sol"; +import { + IGeneralDistributionAgreementV1, + GeneralDistributionAgreementV1 +} from "../agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { SuperTokenFactory } from "../superfluid/SuperTokenFactory.sol"; import { TestToken } from "./TestToken.sol"; import { PureSuperToken } from "../tokens/PureSuperToken.sol"; import { SETHProxy } from "../tokens/SETH.sol"; -import { ISuperToken, SuperToken } from "../superfluid/SuperToken.sol"; +import { ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperToken.sol"; import { TestResolver } from "./TestResolver.sol"; import { SuperfluidLoader } from "./SuperfluidLoader.sol"; import { SuperfluidPool } from "../agreements/gdav1/SuperfluidPool.sol"; @@ -31,12 +32,13 @@ import { TOGA } from "./TOGA.sol"; import { CFAv1Library } from "../apps/CFAv1Library.sol"; import { IDAv1Library } from "../apps/IDAv1Library.sol"; import { IResolver } from "../interfaces/utils/IResolver.sol"; +import { DMZForwarder } from "../utils/DMZForwarder.sol"; /// @title Superfluid Framework Deployment Steps /// @author Superfluid /// @notice A contract which splits framework deployment into steps. /// @dev This was necessary because of the contract size limit of the deployed contract -/// which is an issue when deploying the original framework with Hardhat. +/// which is an issue when deploying the original framework with Hardhat. /// https://github.com/NomicFoundation/hardhat/issues/3404#issuecomment-1346849400 contract SuperfluidFrameworkDeploymentSteps { bool public constant DEFAULT_NON_UPGRADEABLE = false; @@ -45,9 +47,6 @@ contract SuperfluidFrameworkDeploymentSteps { uint256 public constant DEFAULT_LIQUIDATION_PERIOD = 4 hours; uint256 public constant DEFAULT_PATRICIAN_PERIOD = 30 minutes; uint256 public constant DEFAULT_TOGA_MIN_BOND_DURATION = 1 weeks; - // TODO we blame solidity that does not suppor this yet - // solhint-disable-next-line var-name-mixedcase - address[] public DEFAULT_TRUSTED_FORWARDERS = new address[](0); string public constant RESOLVER_BASE_SUPER_TOKEN_KEY = "supertokens.test."; string public constant RESOLVER_BASE_TOKEN_KEY = "tokens.test."; @@ -62,8 +61,6 @@ contract SuperfluidFrameworkDeploymentSteps { IDAv1Library.InitData idaLib; SuperTokenFactory superTokenFactory; ISuperToken superTokenLogic; - ConstantOutflowNFT constantOutflowNFT; - ConstantInflowNFT constantInflowNFT; TestResolver resolver; SuperfluidLoader superfluidLoader; CFAv1Forwarder cfaV1Forwarder; @@ -80,40 +77,29 @@ contract SuperfluidFrameworkDeploymentSteps { Superfluid internal host; // Agreement Contracts - ConstantFlowAgreementV1 internal cfaV1; - ConstantFlowAgreementV1 internal cfaV1Logic; + ConstantFlowAgreementV1 internal cfaV1; InstantDistributionAgreementV1 internal idaV1; - InstantDistributionAgreementV1 internal idaV1Logic; GeneralDistributionAgreementV1 internal gdaV1; - GeneralDistributionAgreementV1 internal gdaV1Logic; // SuperToken-related Contracts - ConstantOutflowNFT internal constantOutflowNFTLogic; - ConstantInflowNFT internal constantInflowNFTLogic; - ConstantOutflowNFT internal constantOutflowNFT; - ConstantInflowNFT internal constantInflowNFT; - PoolAdminNFT internal poolAdminNFTLogic; - PoolMemberNFT internal poolMemberNFTLogic; - PoolAdminNFT internal poolAdminNFT; - PoolMemberNFT internal poolMemberNFT; - ISuperToken internal superTokenLogic; + PoolAdminNFT internal poolAdminNFT; + PoolMemberNFT internal poolMemberNFT; + + ISuperToken internal superTokenLogic; SuperTokenFactory internal superTokenFactory; - SuperTokenFactory internal superTokenFactoryLogic; - // Peripheral Contracts - TestResolver internal testResolver; - SuperfluidLoader internal superfluidLoader; + // Forwarders CFAv1Forwarder internal cfaV1Forwarder; IDAv1Forwarder internal idaV1Forwarder; GDAv1Forwarder internal gdaV1Forwarder; + + // Other Peripheral Contracts + TestResolver internal testResolver; + SuperfluidLoader internal superfluidLoader; BatchLiquidator internal batchLiquidator; TOGA internal toga; - error DEPLOY_AGREEMENTS_REQUIRES_DEPLOY_CORE(); - error DEPLOY_PERIPHERALS_REQUIRES_DEPLOY_CORE(); - error DEPLOY_PERIPHERALS_REQUIRES_DEPLOY_AGREEMENTS(); error DEPLOY_TOGA_REQUIRES_1820(); - error DEPLOY_SUPER_TOKEN_CONTRACTS_REQUIRES_DEPLOY_CORE(); error DEPLOY_SUPER_TOKEN_REQUIRES_1820(); error DEPLOY_SUPER_TOKEN_REQUIRES_DEPLOY_SUPER_TOKEN_CONTRACTS(); error RESOLVER_LIST_REQUIRES_DEPLOY_PERIPHERALS(); @@ -130,8 +116,6 @@ contract SuperfluidFrameworkDeploymentSteps { gda: gdaV1, superTokenFactory: superTokenFactory, superTokenLogic: superTokenLogic, - constantOutflowNFT: constantOutflowNFT, - constantInflowNFT: constantInflowNFT, resolver: testResolver, superfluidLoader: superfluidLoader, cfaV1Forwarder: cfaV1Forwarder, @@ -151,55 +135,47 @@ contract SuperfluidFrameworkDeploymentSteps { } function getNumSteps() public pure returns (uint8) { - return 8; + return 7; } function executeStep(uint8 step) public { if (step != currentStep) revert("Incorrect step"); - // CORE CONTRACTS - if (step == 0) { - // Deploy Superfluid Governance - // Deploy TestGovernance. Needs initialization later. + if (step == 0) { // CORE CONTRACT: TestGovernance + // Deploy TestGovernance, a Superfluid Governance for testing purpose. It needs initialization later. testGovernance = SuperfluidGovDeployerLibrary.deployTestGovernance(); - SuperfluidGovDeployerLibrary.transferOwnership(testGovernance, address(this)); - } else if (step == 1) { - // Deploy Host - // _deployHost(nonUpgradable, appWhiteListingEnabled); - host = SuperfluidHostDeployerLibrary.deploySuperfluidHost(true, false); + } else if (step == 1) { // CORE CONTRACT: Superfluid (Host) + DMZForwarder dmzForwarder = SuperfluidDMZForwarderDeployerLibrary.deploy(); + // Deploy Host and initialize the test governance. + // 3_000_000 is the min callback gas limit used in a prod deployment + host = SuperfluidHostDeployerLibrary.deploy(true, false, 3_000_000, address(dmzForwarder)); + dmzForwarder.transferOwnership(address(host)); - // _initializeHost(); host.initialize(testGovernance); - // _initializeGovernance( - // DEFAULT_REWARD_ADDRESS, DEFAULT_LIQUIDATION_PERIOD, DEFAULT_PATRICIAN_PERIOD, - // DEFAULT_TRUSTED_FORWARDERS - // ); testGovernance.initialize( host, DEFAULT_REWARD_ADDRESS, DEFAULT_LIQUIDATION_PERIOD, DEFAULT_PATRICIAN_PERIOD, - DEFAULT_TRUSTED_FORWARDERS + new address[](0) // no trusted forwarders ); - } else if (step == 2) { - // AGREEMENT CONTRACTS - // Deploy Superfluid CFA, IDA, GDA + } else if (step == 2) { // CORE CONTRACTS: Core Agreements + ConstantFlowAgreementV1 cfaV1Logic = SuperfluidCFAv1DeployerLibrary.deploy(host); + InstantDistributionAgreementV1 idaV1Logic = SuperfluidIDAv1DeployerLibrary.deploy(host); + GeneralDistributionAgreementV1 gdaV1Logic; + { + // GDA proxy is not created yet, hence this is a bootstrapping workaround. + // First deploy the bootstrapping superfluid pool with GDA = address(0), + // We will redeploy the pool logic and upgrade this in the beacon later. + SuperfluidPool superfluidPoolLogic = + SuperfluidPoolLogicDeployerLibrary.deploy(GeneralDistributionAgreementV1(address(0))); + SuperfluidUpgradeableBeacon superfluidPoolBeacon = + ProxyDeployerLibrary.deploySuperfluidUpgradeableBeacon(address(superfluidPoolLogic)); + gdaV1Logic = SuperfluidGDAv1DeployerLibrary.deploy(host, superfluidPoolBeacon); + } - if (address(host) == address(0)) revert DEPLOY_AGREEMENTS_REQUIRES_DEPLOY_CORE(); - - // _deployAgreementContracts(); - // _deployCFAv1(); - cfaV1Logic = SuperfluidCFAv1DeployerLibrary.deployConstantFlowAgreementV1(host); - - // _deployIDAv1(); - idaV1Logic = SuperfluidIDAv1DeployerLibrary.deployInstantDistributionAgreementV1(host); - - // _deployGDAv1(); - gdaV1Logic = SuperfluidGDAv1DeployerLibrary.deployGeneralDistributionAgreementV1(host); - - // _registerAgreements(); // we set the canonical address based on host.getAgreementClass() because // in the upgradeable case, we create a new proxy contract in the function // and set it as the canonical agreement. @@ -209,144 +185,64 @@ contract SuperfluidFrameworkDeploymentSteps { idaV1 = InstantDistributionAgreementV1(address(host.getAgreementClass(idaV1Logic.agreementType()))); testGovernance.registerAgreementClass(host, address(gdaV1Logic)); gdaV1 = GeneralDistributionAgreementV1(address(host.getAgreementClass(gdaV1Logic.agreementType()))); - } else if (step == 3) { - // PERIPHERAL CONTRACTS: FORWARDERS + + { + SuperfluidPool superfluidPoolLogic = SuperfluidPoolLogicDeployerLibrary.deploy(gdaV1); + superfluidPoolLogic.castrate(); + + // Deploy SuperfluidPool beacon + // @note we upgrade the superfluid beacon to point to the new and correct superfluid pool logic + gdaV1Logic.superfluidPoolBeacon().upgradeTo(address(superfluidPoolLogic)); + gdaV1Logic.superfluidPoolBeacon().transferOwnership(address(host)); + } + } else if (step == 3) {// PERIPHERAL CONTRACTS: NFT Proxy and Logic + { + poolAdminNFT = PoolAdminNFT(address(ProxyDeployerLibrary.deployUUPSProxy())); + PoolAdminNFT poolAdminNFTLogic = + SuperfluidPoolNFTLogicDeployerLibrary.deployPoolAdminNFT(host, gdaV1); + poolAdminNFTLogic.castrate(); + UUPSProxy(payable(address(poolAdminNFT))).initializeProxy(address(poolAdminNFTLogic)); + + poolMemberNFT = PoolMemberNFT(address(ProxyDeployerLibrary.deployUUPSProxy())); + PoolMemberNFT poolMemberNFTLogic = + SuperfluidPoolNFTLogicDeployerLibrary.deployPoolMemberNFT(host, gdaV1); + poolMemberNFTLogic.castrate(); + UUPSProxy(payable(address(poolMemberNFT))).initializeProxy(address(poolMemberNFTLogic)); + + poolAdminNFT.initialize("Pool Admin NFT", "PA"); + poolMemberNFT.initialize("Pool Member NFT", "PM"); + } + } else if (step == 4) { // PERIPHERAL CONTRACTS: FORWARDERS // Deploy CFAv1Forwarder - // _deployCFAv1Forwarder() - cfaV1Forwarder = CFAv1ForwarderDeployerLibrary.deployCFAv1Forwarder(host); - // _enableCFAv1ForwarderAsTrustedForwarder() + cfaV1Forwarder = CFAv1ForwarderDeployerLibrary.deploy(host); testGovernance.enableTrustedForwarder(host, ISuperfluidToken(address(0)), address(cfaV1Forwarder)); // Deploy IDAv1Forwarder - // _deployIDAv1Forwarder(); - idaV1Forwarder = IDAv1ForwarderDeployerLibrary.deployIDAv1Forwarder(host); - // _enableIDAv1ForwarderAsTrustedForwarder(); + idaV1Forwarder = IDAv1ForwarderDeployerLibrary.deploy(host); testGovernance.enableTrustedForwarder(host, ISuperfluidToken(address(0)), address(idaV1Forwarder)); // Deploy GDAv1Forwarder - // _deployGDAv1Forwarder(); - gdaV1Forwarder = GDAv1ForwarderDeployerLibrary.deployGDAv1Forwarder(host); - // _enableGDAv1ForwarderAsTrustedForwarder(); + gdaV1Forwarder = GDAv1ForwarderDeployerLibrary.deploy(host); testGovernance.enableTrustedForwarder(host, ISuperfluidToken(address(0)), address(gdaV1Forwarder)); - } else if (step == 4) { - // PERIPHERAL CONTRACTS: SuperfluidPool Logic - // Deploy SuperfluidPool - // Initialize GDA with SuperfluidPool beacon - // _deploySuperfluidPoolLogicAndInitializeGDA(); - - /// Deploy SuperfluidPool logic contract - SuperfluidPool superfluidPoolLogic = SuperfluidPoolLogicDeployerLibrary.deploySuperfluidPool(gdaV1); - - // Initialize the logic contract - superfluidPoolLogic.castrate(); - - // Deploy SuperfluidPool beacon - SuperfluidUpgradeableBeacon superfluidPoolBeacon = - ProxyDeployerLibrary.deploySuperfluidUpgradeableBeacon(address(superfluidPoolLogic)); - gdaV1.initialize(superfluidPoolBeacon); - - superfluidPoolBeacon.transferOwnership(address(host)); - } else if (step == 5) { - // PERIPHERAL CONTRACTS: NFT Proxy and Logic - // Deploy Superfluid NFTs (Proxy and Logic contracts) - - if (address(host) == address(0)) revert DEPLOY_SUPER_TOKEN_CONTRACTS_REQUIRES_DEPLOY_CORE(); - // Deploy canonical Constant Outflow NFT proxy contract - UUPSProxy constantOutflowNFTProxy = ProxyDeployerLibrary.deployUUPSProxy(); - - // Deploy canonical Constant Outflow NFT proxy contract - UUPSProxy constantInflowNFTProxy = ProxyDeployerLibrary.deployUUPSProxy(); - - // Deploy canonical Pool Admin NFT proxy contract - UUPSProxy poolAdminNFTProxy = ProxyDeployerLibrary.deployUUPSProxy(); - - // Deploy canonical Pool Member NFT proxy contract - UUPSProxy poolMemberNFTProxy = ProxyDeployerLibrary.deployUUPSProxy(); - - // Deploy canonical Constant Outflow NFT logic contract - constantOutflowNFTLogic = SuperfluidFlowNFTLogicDeployerLibrary.deployConstantOutflowNFT( - host, IConstantInflowNFT(address(constantInflowNFTProxy)) - ); - - // Initialize Constant Outflow NFT logic contract - constantOutflowNFTLogic.castrate(); - - // Deploy canonical Constant Inflow NFT logic contract - constantInflowNFTLogic = SuperfluidFlowNFTLogicDeployerLibrary.deployConstantInflowNFT( - host, IConstantOutflowNFT(address(constantOutflowNFTProxy)) - ); - - // Initialize Constant Inflow NFT logic contract - constantInflowNFTLogic.castrate(); - - // Deploy canonical Pool Admin NFT logic contract - poolAdminNFTLogic = SuperfluidPoolNFTLogicDeployerLibrary.deployPoolAdminNFT(host); - - // Initialize Pool Admin NFT logic contract - poolAdminNFTLogic.castrate(); - - // Deploy canonical Pool Member NFT logic contract - poolMemberNFTLogic = SuperfluidPoolNFTLogicDeployerLibrary.deployPoolMemberNFT(host); - - // Initialize Pool Member NFT logic contract - poolMemberNFTLogic.castrate(); - - // Initialize COFNFT proxy contract - constantOutflowNFTProxy.initializeProxy(address(constantOutflowNFTLogic)); - - // Initialize CIFNFT proxy contract - constantInflowNFTProxy.initializeProxy(address(constantInflowNFTLogic)); - - // Initialize Pool Admin NFT proxy contract - poolAdminNFTProxy.initializeProxy(address(poolAdminNFTLogic)); - - // Initialize Pool Member NFT proxy contract - poolMemberNFTProxy.initializeProxy(address(poolMemberNFTLogic)); - - // // Initialize COFNFT proxy contract - IConstantOutflowNFT(address(constantOutflowNFTProxy)).initialize("Constant Outflow NFT", "COF"); - - // // Initialize CIFNFT proxy contract - IConstantInflowNFT(address(constantInflowNFTProxy)).initialize("Constant Inflow NFT", "CIF"); - - // // Initialize Pool Admin NFT proxy contract - IPoolAdminNFT(address(poolAdminNFTProxy)).initialize("Pool Admin NFT", "PA"); - - // // Initialize Pool Member NFT proxy contract - IPoolMemberNFT(address(poolMemberNFTProxy)).initialize("Pool Member NFT", "PM"); - - constantOutflowNFT = ConstantOutflowNFT(address(constantOutflowNFTProxy)); - constantInflowNFT = ConstantInflowNFT(address(constantInflowNFTProxy)); - poolAdminNFT = PoolAdminNFT(address(poolAdminNFTProxy)); - poolMemberNFT = PoolMemberNFT(address(poolMemberNFTProxy)); - } else if (step == 6) { - // PERIPHERAL CONTRACTS: SuperToken Logic and SuperTokenFactory Logic - // Deploy SuperToken Logic - // Deploy SuperToken Factory - - // _deploySuperTokenLogic(); + } else if (step == 5) {// PERIPHERAL CONTRACTS: SuperToken Logic and SuperTokenFactory Logic // Deploy canonical SuperToken logic contract - superTokenLogic = SuperToken( - SuperTokenDeployerLibrary.deploySuperTokenLogic( - host, - IConstantOutflowNFT(address(constantOutflowNFT)), - IConstantInflowNFT(address(constantInflowNFT)), - IPoolAdminNFT(address(poolAdminNFT)), - IPoolMemberNFT(address(poolMemberNFT)) - ) - ); + superTokenLogic = SuperToken(SuperTokenDeployerLibrary.deploy( + host, + poolAdminNFT, + poolMemberNFT + )); - // _deploySuperTokenFactory(); - superTokenFactoryLogic = SuperfluidPeripheryDeployerLibrary.deploySuperTokenFactory( + // Deploy SuperToken Factory + // Note: + // - Logic contract is used because super token factory caches them as an optimization during upgrade. Read + // its code. + SuperTokenFactory superTokenFactoryLogic = SuperTokenFactoryDeployerLibrary.deploy( host, superTokenLogic, - constantOutflowNFTLogic, - constantInflowNFTLogic, - poolAdminNFTLogic, - poolMemberNFTLogic + IPoolAdminNFT(poolAdminNFT.getCodeAddress()), + IPoolMemberNFT(poolMemberNFT.getCodeAddress()) ); - // _setSuperTokenFactoryInHost(); // 'Update' code with Governance and register SuperTokenFactory with Superfluid testGovernance.updateContracts( host, address(0), new address[](0), address(superTokenFactoryLogic), address(0) @@ -356,20 +252,15 @@ contract SuperfluidFrameworkDeploymentSteps { // in the upgradeable case, we create a new proxy contract in the function // and set it as the canonical supertokenfactory. superTokenFactory = SuperTokenFactory(address(host.getSuperTokenFactory())); - } else if (step == 7) { - // PERIPHERAL CONTRACTS: Resolver, SuperfluidLoader, TOGA, BatchLiquidator + } else if (step == 6) {// PERIPHERAL CONTRACTS: Resolver, SuperfluidLoader, TOGA, BatchLiquidator // Deploy TestResolver // Deploy SuperfluidLoader and make SuperfluidFrameworkDeployer an admin for the TestResolver // Set TestGovernance, Superfluid, SuperfluidLoader and CFAv1Forwarder in TestResolver - - // _deployTestResolver(resolverAdmin); - if (address(host) == address(0)) revert DEPLOY_PERIPHERALS_REQUIRES_DEPLOY_CORE(); testResolver = SuperfluidPeripheryDeployerLibrary.deployTestResolver(address(this)); - // _deploySuperfluidLoader(); - superfluidLoader = SuperfluidLoaderDeployerLibrary.deploySuperfluidLoader(testResolver); + // Deploy superfluid loader + superfluidLoader = SuperfluidPeripheryDeployerLibrary.deploySuperfluidLoader(testResolver); - // _setAddressesInResolver(); // Register Governance with Resolver testResolver.set("TestGovernance.test", address(testGovernance)); @@ -391,15 +282,13 @@ contract SuperfluidFrameworkDeploymentSteps { // Make SuperfluidFrameworkDeployer deployer an admin for the TestResolver as well testResolver.addAdmin(msg.sender); - // _deployTOGA(); + // Deploy batch liquidator + batchLiquidator = SuperfluidPeripheryDeployerLibrary.deployBatchLiquidator(host); + + // Deploy TOGA if (!_is1820Deployed()) revert DEPLOY_TOGA_REQUIRES_1820(); - toga = new TOGA(host, DEFAULT_TOGA_MIN_BOND_DURATION); + toga = SuperfluidPeripheryDeployerLibrary.deployTOGA(host, DEFAULT_TOGA_MIN_BOND_DURATION); testGovernance.setRewardAddress(host, ISuperfluidToken(address(0)), address(toga)); - - // _deployBatchLiquidator(); - if (address(cfaV1) == address(0)) revert DEPLOY_PERIPHERALS_REQUIRES_DEPLOY_CORE(); - if (address(cfaV1) == address(0)) revert DEPLOY_PERIPHERALS_REQUIRES_DEPLOY_AGREEMENTS(); - batchLiquidator = new BatchLiquidator(address(host)); } else { revert("Invalid step"); } @@ -418,227 +307,112 @@ contract SuperfluidFrameworkDeploymentSteps { //// External Libraries //// -/// @title SuperfluidGovDeployerLibrary -/// @author Superfluid -/// @notice An external library that deploys the Superfluid TestGovernance contract with additional functions -/// @dev This library is used for testing purposes only, not deployments to test OR production networks library SuperfluidGovDeployerLibrary { - /// @notice deploys the Superfluid TestGovernance Contract - /// @return newly deployed TestGovernance contract function deployTestGovernance() external returns (TestGovernance) { return new TestGovernance(); } - /// @notice transfers ownership of _gov to _newOwner - /// @dev _gov must be deployed from this contract - /// @param _gov address of the TestGovernance contract - /// @param _newOwner the new owner of the governance contract function transferOwnership(TestGovernance _gov, address _newOwner) external { _gov.transferOwnership(_newOwner); } } -/// @title SuperfluidHostDeployerLibrary -/// @author Superfluid -/// @notice An external library that deploys the Superfluid Host contract with additional functions. -/// @dev This library is used for testing purposes only, not deployments to test OR production networks -library SuperfluidHostDeployerLibrary { - /// @notice Deploys the Superfluid Host Contract - /// @param _nonUpgradable whether the hsot contract is upgradeable or not - /// @param _appWhiteListingEnabled whether app white listing is enabled - /// @return Superfluid newly deployed Superfluid Host contract - function deploySuperfluidHost(bool _nonUpgradable, bool _appWhiteListingEnabled) external returns (Superfluid) { - return new Superfluid(_nonUpgradable, _appWhiteListingEnabled); - } -} - -/// @title SuperfluidIDAv1DeployerLibrary -/// @author Superfluid -/// @notice An external library that deploys the Superfluid InstantDistributionAgreementV1 contract. -/// @dev This library is used for testing purposes only, not deployments to test OR production networks -library SuperfluidIDAv1DeployerLibrary { - /// @notice deploys the Superfluid InstantDistributionAgreementV1 Contract - /// @param _host Superfluid host address - /// @return newly deployed InstantDistributionAgreementV1 contract - function deployInstantDistributionAgreementV1(ISuperfluid _host) - external - returns (InstantDistributionAgreementV1) - { - return new InstantDistributionAgreementV1(_host); +library SuperfluidDMZForwarderDeployerLibrary { + // After deploying, you may want to transfer ownership to the host + function deploy() external returns (DMZForwarder) { + return new DMZForwarder(); } } -/// @title SuperfluidGDAv1DeployerLibrary -/// @author Superfluid -/// @notice An external library that deploys Superfluid GeneralDistributionAgreementV1 contract -/// @dev This library is used for testing purposes only, not deployments to test OR production networks -library SuperfluidGDAv1DeployerLibrary { - /// @notice deploys the Superfluid GeneralDistributionAgreementV1 Contract - /// @param _host Superfluid host address - /// @return newly deployed GeneralDistributionAgreementV1 contract - function deployGeneralDistributionAgreementV1(ISuperfluid _host) - external - returns (GeneralDistributionAgreementV1) +library SuperfluidHostDeployerLibrary { + function deploy( + bool _nonUpgradable, + bool _appWhiteListingEnabled, + uint64 callbackGasLimit, + address dmzForwarderAddress + ) + external returns (Superfluid) { - return new GeneralDistributionAgreementV1(_host); + return new Superfluid(_nonUpgradable, _appWhiteListingEnabled, callbackGasLimit, dmzForwarderAddress); } } -/// @title SuperfluidCFAv1DeployerLibrary -/// @author Superfluid -/// @notice An external library that deploys Superfluid ConstantFlowAgreementV1 contract -/// @dev This library is used for testing purposes only, not deployments to test OR production networks library SuperfluidCFAv1DeployerLibrary { - /// @notice deploys ConstantFlowAgreementV1 contract - /// @param _host address of the Superfluid contract - /// @return newly deployed ConstantFlowAgreementV1 contract - function deployConstantFlowAgreementV1(ISuperfluid _host) external returns (ConstantFlowAgreementV1) { + function deploy(ISuperfluid _host) external returns (ConstantFlowAgreementV1) { return new ConstantFlowAgreementV1(_host); } } -/// @title SuperToken deployer library -/// @author Superfluid -/// @notice This is an external library used to deploy SuperToken logic contracts -library SuperTokenDeployerLibrary { - /// @notice Deploy a SuperToken logic contract - /// @param host the address of the host contract - /// @param constantOutflowNFT the address of the ConstantOutflowNFT contract - /// @param constantInflowNFT the address of the ConstantInflowNFT contract - /// @param poolAdminNFT the address of the PoolAdminNFT contract - /// @param poolMemberNFT the address of the PoolMemberNFT contract - /// @return the address of the newly deployed SuperToken logic contract - function deploySuperTokenLogic( - ISuperfluid host, - IConstantOutflowNFT constantOutflowNFT, - IConstantInflowNFT constantInflowNFT, - IPoolAdminNFT poolAdminNFT, - IPoolMemberNFT poolMemberNFT - ) external returns (address) { - return address(new SuperToken(host, constantOutflowNFT, constantInflowNFT, poolAdminNFT, poolMemberNFT)); +library SuperfluidIDAv1DeployerLibrary { + function deploy(ISuperfluid _host) + external + returns (InstantDistributionAgreementV1) + { + return new InstantDistributionAgreementV1(_host); } } -/// @title SuperfluidPeripheryDeployerLibrary -/// @author Superfluid -/// @notice An external library that deploys Superfluid periphery contracts (Super Token Factory and Test Resolver) -/// @dev This library is used for testing purposes only, not deployments to test OR production networks -library SuperfluidPeripheryDeployerLibrary { - /// @dev deploys Super Token Factory contract - /// @param _host address of the Superfluid contract - /// @param _superTokenLogic address of the Super Token logic contract - /// @param constantOutflowNFTLogic address of the Constant Outflow NFT logic contract - /// @param constantInflowNFTLogic address of the Constant Inflow NFT logic contract - /// @param poolAdminNFTLogic address of the Pool Admin NFT logic contract - /// @param poolMemberNFTLogic address of the Pool Member NFT logic contract - /// @return newly deployed SuperTokenFactory contract - function deploySuperTokenFactory( - ISuperfluid _host, - ISuperToken _superTokenLogic, - IConstantOutflowNFT constantOutflowNFTLogic, - IConstantInflowNFT constantInflowNFTLogic, - IPoolAdminNFT poolAdminNFTLogic, - IPoolMemberNFT poolMemberNFTLogic - ) external returns (SuperTokenFactory) { - return new SuperTokenFactory( - _host, - _superTokenLogic, - constantOutflowNFTLogic, - constantInflowNFTLogic, - poolAdminNFTLogic, - poolMemberNFTLogic - ); +library SuperfluidPoolLogicDeployerLibrary { + function deploy(GeneralDistributionAgreementV1 gda) external returns (SuperfluidPool) { + return new SuperfluidPool(gda); } +} - /// @dev deploys Test Resolver contract - /// @param _additionalAdmin address of the additional administrator of the Test Resolver contract - /// @return newly deployed Test Resolver contract - function deployTestResolver(address _additionalAdmin) external returns (TestResolver) { - return new TestResolver(_additionalAdmin); +library SuperfluidGDAv1DeployerLibrary { + function deploy(ISuperfluid host, SuperfluidUpgradeableBeacon superfluidPoolBeacon) external + returns (GeneralDistributionAgreementV1 gdaV1Logic) + { + gdaV1Logic = new GeneralDistributionAgreementV1(host, superfluidPoolBeacon); } } library CFAv1ForwarderDeployerLibrary { - /// @notice deploys the Superfluid CFAv1Forwarder contract - /// @param _host Superfluid host address - /// @return newly deployed CFAv1Forwarder contract - function deployCFAv1Forwarder(ISuperfluid _host) external returns (CFAv1Forwarder) { + function deploy(ISuperfluid _host) external returns (CFAv1Forwarder) { return new CFAv1Forwarder(_host); } } library IDAv1ForwarderDeployerLibrary { - /// @notice deploys the Superfluid IDAv1Forwarder contract - /// @param _host Superfluid host address - /// @return newly deployed IDAv1Forwarder contract - function deployIDAv1Forwarder(ISuperfluid _host) external returns (IDAv1Forwarder) { + function deploy(ISuperfluid _host) external returns (IDAv1Forwarder) { return new IDAv1Forwarder(_host); } } library GDAv1ForwarderDeployerLibrary { - /// @notice deploys the Superfluid GDAv1Forwarder contract - /// @param _host Superfluid host address - /// @return newly deployed GDAv1Forwarder contract - function deployGDAv1Forwarder(ISuperfluid _host) external returns (GDAv1Forwarder) { + function deploy(ISuperfluid _host) external returns (GDAv1Forwarder) { return new GDAv1Forwarder(_host); } } -library SuperfluidLoaderDeployerLibrary { - /// @notice deploys the Superfluid SuperfluidLoader contract - /// @param _resolver Superfluid resolver address - /// @return newly deployed SuperfluidLoader contract - function deploySuperfluidLoader(IResolver _resolver) external returns (SuperfluidLoader) { - return new SuperfluidLoader(_resolver); - } -} - -library SuperfluidPoolLogicDeployerLibrary { - /// @notice deploys the Superfluid SuperfluidPool contract - /// @return newly deployed SuperfluidPool contract - function deploySuperfluidPool(GeneralDistributionAgreementV1 _gda) external returns (SuperfluidPool) { - return new SuperfluidPool(_gda); +library SuperTokenDeployerLibrary { + function deploy( + ISuperfluid host, + IPoolAdminNFT poolAdminNFT, + IPoolMemberNFT poolMemberNFT + ) external returns (address) { + return address(new SuperToken( + host, + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), + poolAdminNFT, + poolMemberNFT + )); } } -library SuperfluidFlowNFTLogicDeployerLibrary { - /// @notice deploys the Superfluid ConstantOutflowNFT contract - /// @param _host Superfluid host address - /// @param _constantInflowNFTProxy address of the ConstantInflowNFT proxy contract - /// @return newly deployed ConstantOutflowNFT contract - function deployConstantOutflowNFT(ISuperfluid _host, IConstantInflowNFT _constantInflowNFTProxy) +library SuperfluidPoolNFTLogicDeployerLibrary { + function deployPoolAdminNFT(ISuperfluid host, IGeneralDistributionAgreementV1 gda) external - returns (ConstantOutflowNFT) + returns (PoolAdminNFT) { - return new ConstantOutflowNFT(_host, _constantInflowNFTProxy); + return new PoolAdminNFT(host, gda); } - /// @notice deploys the Superfluid ConstantInflowNFT contract - /// @param _host Superfluid host address - /// @param _constantOutflowNFTProxy address of the ConstantOutflowNFT proxy contract - /// @return newly deployed ConstantInflowNFT contract - function deployConstantInflowNFT(ISuperfluid _host, IConstantOutflowNFT _constantOutflowNFTProxy) + function deployPoolMemberNFT(ISuperfluid host, IGeneralDistributionAgreementV1 gda) external - returns (ConstantInflowNFT) + returns (PoolMemberNFT) { - return new ConstantInflowNFT(_host, _constantOutflowNFTProxy); - } -} - -library SuperfluidPoolNFTLogicDeployerLibrary { - /// @notice deploys the Superfluid PoolAdminNFT contract - /// @param _host Superfluid host address - /// @return newly deployed PoolAdminNFT contract - function deployPoolAdminNFT(ISuperfluid _host) external returns (PoolAdminNFT) { - return new PoolAdminNFT(_host); - } - - /// @notice deploys the Superfluid PoolMemberNFT contract - /// @param _host Superfluid host address - /// @return newly deployed PoolMemberNFT contract - function deployPoolMemberNFT(ISuperfluid _host) external returns (PoolMemberNFT) { - return new PoolMemberNFT(_host); + return new PoolMemberNFT(host, gda); } } @@ -659,11 +433,7 @@ library TokenDeployerLibrary { uint8 _decimals, uint256 _mintLimit ) external returns (TestToken) { - return new TestToken( - _underlyingName, - _underlyingSymbol, - _decimals, - _mintLimit); + return new TestToken(_underlyingName, _underlyingSymbol, _decimals, _mintLimit); } function deploySETHProxy() external returns (SETHProxy) { @@ -674,3 +444,39 @@ library TokenDeployerLibrary { return new PureSuperToken(); } } + +library SuperTokenFactoryDeployerLibrary { + function deploy( + ISuperfluid host, + ISuperToken superTokenLogic, + IPoolAdminNFT poolAdminNFTLogic, + IPoolMemberNFT poolMemberNFTLogic + ) external returns (SuperTokenFactory) { + return new SuperTokenFactory( + host, + superTokenLogic, + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), + poolAdminNFTLogic, + poolMemberNFTLogic + ); + } +} + +library SuperfluidPeripheryDeployerLibrary { + function deployTestResolver(address additionalAdmin) external returns (TestResolver) { + return new TestResolver(additionalAdmin); + } + + function deploySuperfluidLoader(IResolver resolver) external returns (SuperfluidLoader) { + return new SuperfluidLoader(resolver); + } + + function deployBatchLiquidator(ISuperfluid host) external returns (BatchLiquidator) { + return new BatchLiquidator(address(host)); + } + + function deployTOGA(ISuperfluid host, uint256 minBondDuration) external returns (TOGA) { + return new TOGA(host, minBondDuration); + } +} diff --git a/packages/ethereum-contracts/contracts/utils/TOGA.sol b/packages/ethereum-contracts/contracts/utils/TOGA.sol index aac7bf1f82..30dcf941c5 100644 --- a/packages/ethereum-contracts/contracts/utils/TOGA.sol +++ b/packages/ethereum-contracts/contracts/utils/TOGA.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/packages/ethereum-contracts/default.nix b/packages/ethereum-contracts/default.nix new file mode 100644 index 0000000000..b895da1e83 --- /dev/null +++ b/packages/ethereum-contracts/default.nix @@ -0,0 +1,27 @@ +{ + halfBoardModule = { + dependencies = [ + ../.. + ../solidity-semantic-money + ]; + outputs = [ + "build" + "coverage" + ]; + includedFiles = [ + # source code + ./tasks + ./contracts + ./dev-scripts + ./test + ./testsuites + # configurations + ./package.json + ./truffle-config.js + ./hardhat.config.ts + ./foundry.toml + ./tsconfig.json + ./tsconfig.scripts.json + ]; + }; +} diff --git a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js index 7f07237592..3425d88afb 100644 --- a/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js +++ b/packages/ethereum-contracts/dev-scripts/deploy-test-framework.js @@ -10,16 +10,16 @@ const SuperfluidGDAv1DeployerLibraryArtifact = require("@superfluid-finance/ethe const SuperTokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperTokenDeployerLibrary.json"); const SuperfluidPeripheryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPeripheryDeployerLibrary.json"); const SuperfluidPoolLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPoolLogicDeployerLibrary.json"); -const SuperfluidFlowNFTLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidFlowNFTLogicDeployerLibrary.json"); const SuperfluidPoolNFTLogicDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidPoolNFTLogicDeployerLibrary.json"); const ProxyDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/ProxyDeployerLibrary.json"); const CFAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/CFAv1ForwarderDeployerLibrary.json"); const IDAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/IDAv1ForwarderDeployerLibrary.json"); const GDAv1ForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/GDAv1ForwarderDeployerLibrary.json"); -const SuperfluidLoaderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidLoaderDeployerLibrary.json"); +const SuperTokenFactoryDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperTokenFactoryDeployerLibrary.json"); const SuperfluidFrameworkDeployerArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeployer.sol/SuperfluidFrameworkDeployer.json"); const SlotsBitmapLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/libs/SlotsBitmapLibrary.sol/SlotsBitmapLibrary.json"); const TokenDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/TokenDeployerLibrary.json"); +const SuperfluidDMZForwarderDeployerLibraryArtifact = require("@superfluid-finance/ethereum-contracts/build/hardhat/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol/SuperfluidDMZForwarderDeployerLibrary.json"); const ERC1820Registry = require("../dev-scripts/artifacts/ERC1820Registry.json"); @@ -192,12 +192,6 @@ const _deployTestFramework = async (provider, signer) => { SuperfluidPoolLogicDeployerLibraryArtifact, signer ); - const SuperfluidFlowNFTLogicDeployerLibrary = - await _getFactoryAndReturnDeployedContract( - "SuperfluidFlowNFTLogicDeployerLibrary", - SuperfluidFlowNFTLogicDeployerLibraryArtifact, - signer - ); const SuperfluidPoolNFTLogicDeployerLibrary = await _getFactoryAndReturnDeployedContract( "SuperfluidPoolNFTLogicDeployerLibrary", @@ -227,10 +221,10 @@ const _deployTestFramework = async (provider, signer) => { GDAv1ForwarderDeployerLibraryArtifact, signer ); - const SuperfluidLoaderDeployerLibrary = + const SuperTokenFactoryDeployerLibrary = await _getFactoryAndReturnDeployedContract( - "SuperfluidLoaderDeployerLibrary", - SuperfluidLoaderDeployerLibraryArtifact, + "SuperTokenFactoryDeployerLibrary", + SuperTokenFactoryDeployerLibraryArtifact, signer ); const TokenDeployerLibrary = await _getFactoryAndReturnDeployedContract( @@ -238,6 +232,12 @@ const _deployTestFramework = async (provider, signer) => { TokenDeployerLibraryArtifact, signer ); + const SuperfluidDMZForwarderDeployerLibrary = + await _getFactoryAndReturnDeployedContract( + "SuperfluidDMZForwarderDeployerLibrary", + SuperfluidDMZForwarderDeployerLibraryArtifact, + signer + ); const sfDeployer = await _getFactoryAndReturnDeployedContract( "SuperfluidFrameworkDeployer", @@ -269,9 +269,6 @@ const _deployTestFramework = async (provider, signer) => { SuperfluidPoolLogicDeployerLibrary: getContractAddress( SuperfluidPoolLogicDeployerLibrary ), - SuperfluidFlowNFTLogicDeployerLibrary: getContractAddress( - SuperfluidFlowNFTLogicDeployerLibrary - ), SuperfluidPoolNFTLogicDeployerLibrary: getContractAddress( SuperfluidPoolNFTLogicDeployerLibrary ), @@ -285,10 +282,13 @@ const _deployTestFramework = async (provider, signer) => { GDAv1ForwarderDeployerLibrary: getContractAddress( GDAv1ForwarderDeployerLibrary ), - SuperfluidLoaderDeployerLibrary: getContractAddress( - SuperfluidLoaderDeployerLibrary + SuperTokenFactoryDeployerLibrary: getContractAddress( + SuperTokenFactoryDeployerLibrary ), TokenDeployerLibrary: getContractAddress(TokenDeployerLibrary), + SuperfluidDMZForwarderDeployerLibrary: getContractAddress( + SuperfluidDMZForwarderDeployerLibrary + ), }, } ); @@ -306,8 +306,6 @@ const printProtocolFrameworkAddresses = (framework) => { IDAv1: framework.ida, SuperTokenFactory: framework.superTokenFactory, SuperTokenLogic: framework.superTokenLogic, - ConstantOutflowNFT: framework.constantOutflowNFT, - ConstantInflowNFT: framework.constantInflowNFT, Resolver: framework.resolver, SuperfluidLoader: framework.superfluidLoader, CFAv1Forwarder: framework.cfaV1Forwarder, diff --git a/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js b/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js index e81ebc157e..6b033f737f 100644 --- a/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js +++ b/packages/ethereum-contracts/dev-scripts/run-deploy-contracts-and-token.js @@ -18,8 +18,6 @@ deployContractsAndToken() nativeAssetSuperTokenAddress: tokenDeploymentOutput.nativeAssetSuperTokenData .nativeAssetSuperTokenAddress, - constantOutflowNFTAddress: frameworkAddresses.constantOutflowNFT, - constantInflowNFTAddress: frameworkAddresses.constantInflowNFT, }; // create json output diff --git a/packages/ethereum-contracts/docs/deployment-view.drawio b/packages/ethereum-contracts/docs/deployment-view.drawio deleted file mode 100644 index fbd9c924e5..0000000000 --- a/packages/ethereum-contracts/docs/deployment-view.drawio +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/ethereum-contracts/docs/diagrams.drawio b/packages/ethereum-contracts/docs/diagrams.drawio new file mode 100644 index 0000000000..878c22d289 --- /dev/null +++ b/packages/ethereum-contracts/docs/diagrams.drawio @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/ethereum-contracts/docs/user-defined-macros-architecture.png b/packages/ethereum-contracts/docs/user-defined-macros-architecture.png new file mode 100644 index 0000000000..23b5bdd9c8 Binary files /dev/null and b/packages/ethereum-contracts/docs/user-defined-macros-architecture.png differ diff --git a/packages/ethereum-contracts/foundry.toml b/packages/ethereum-contracts/foundry.toml index 04e9527012..bfc0278b1c 100644 --- a/packages/ethereum-contracts/foundry.toml +++ b/packages/ethereum-contracts/foundry.toml @@ -1,10 +1,12 @@ [profile.default] root = '../..' src = 'packages/ethereum-contracts/contracts' -test = 'packages/ethereum-contracts/test/foundry/' -solc_version = "0.8.19" -ignored_error_codes = [5159] # selfdestruct in contracts/mocks/SuperfluidDestructorMock.sol -# deny_warnings = true +test = 'packages/ethereum-contracts/test/foundry' +solc_version = "0.8.26" +#deny_warnings = true +ignored_error_codes = [ + 1699 # assembly { selfdestruct } in contracts/mocks/SuperfluidDestructorMock.sol +] # keep in sync with truffle-config.js evm_version = 'paris' remappings = [ @@ -30,6 +32,7 @@ wrap_comments = true [profile.ci] offline = true +verbosity = 2 [profile.ci.fuzz] runs = 1000 diff --git a/packages/ethereum-contracts/hardhat.config.ts b/packages/ethereum-contracts/hardhat.config.ts index 1caaf1c025..91301ba2d1 100644 --- a/packages/ethereum-contracts/hardhat.config.ts +++ b/packages/ethereum-contracts/hardhat.config.ts @@ -55,19 +55,15 @@ subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction( const chainIds = { "eth-mainnet": 1, - "eth-goerli": 5, "eth-sepolia": 11155111, "xdai-mainnet": 100, "optimism-mainnet": 10, - "optimism-goerli": 420, "arbitrum-one": 42161, - "arbitrum-goerli": 421613, "polygon-mainnet": 137, - "polygon-mumbai": 80001, "avalanche-c": 43114, "avalanche-fuji": 43113, @@ -97,7 +93,7 @@ function createNetworkConfig( const config: HardhatUserConfig = { solidity: { - version: "0.8.19", + version: "0.8.26", settings: { optimizer: { enabled: true, @@ -114,10 +110,6 @@ const config: HardhatUserConfig = { ...createNetworkConfig("bsc-mainnet"), url: process.env.BSC_MAINNET_PROVIDER_URL || "", }, - "eth-goerli": { - ...createNetworkConfig("eth-goerli"), - url: process.env.ETH_GOERLI_PROVIDER_URL || "", - }, "xdai-mainnet": { ...createNetworkConfig("xdai-mainnet"), url: process.env.XDAI_MAINNET_PROVIDER_URL || "", @@ -126,26 +118,14 @@ const config: HardhatUserConfig = { ...createNetworkConfig("optimism-mainnet"), url: process.env.OPTIMISM_MAINNET_PROVIDER_URL || "", }, - "optimism-goerli": { - ...createNetworkConfig("optimism-goerli"), - url: process.env.OPTIMISM_GOERLI_PROVIDER_URL || "", - }, "arbitrum-one": { ...createNetworkConfig("arbitrum-one"), url: process.env.ARBITRUM_ONE_PROVIDER_URL || "", }, - "arbitrum-goerli": { - ...createNetworkConfig("arbitrum-goerli"), - url: process.env.ARBITRUM_GOERLI_PROVIDER_URL || "", - }, "polygon-mainnet": { ...createNetworkConfig("polygon-mainnet"), url: process.env.POLYGON_MAINNET_PROVIDER_URL || "", }, - "polygon-mumbai": { - ...createNetworkConfig("polygon-mumbai"), - url: process.env.POLYGON_MUMBAI_PROVIDER_URL || "", - }, "avalanche-c": { ...createNetworkConfig("avalanche-c"), url: process.env.AVALANCHE_C_PROVIDER_URL || "", @@ -162,10 +142,6 @@ const config: HardhatUserConfig = { ...createNetworkConfig("eth-sepolia"), url: process.env.ETH_SEPOLIA_PROVIDER_URL || "", }, - "base-goerli": { - ...createNetworkConfig("base-goerli"), - url: process.env.BASE_GOERLI_PROVIDER_URL || "", - }, "scroll-sepolia": { ...createNetworkConfig("scroll-sepolia"), url: process.env.SCROLL_SEPOLIA_PROVIDER_URL || "", @@ -175,14 +151,13 @@ const config: HardhatUserConfig = { url: process.env.SCROLL_MAINNET_PROVIDER_URL || "", }, hardhat: { - // Fixing an issue that parallel coverage test is not working for unkown reason. - // Ref: https://github.com/NomicFoundation/hardhat/issues/4310 - allowUnlimitedContractSize: process.env.IS_COVERAGE_TEST ? true : undefined, + // We defer the contract size limit test to foundry. + allowUnlimitedContractSize: true, }, }, mocha: { timeout: 250000, - parallel: !!process.env.HARDHAT_RUN_PARALLEL, + parallel: !!+process.env.HARDHAT_RUN_PARALLEL, jobs: process.env.HARDHAT_TEST_JOBS ? parseInt(process.env.HARDHAT_TEST_JOBS) : undefined, diff --git a/packages/ethereum-contracts/ops-scripts/deploy-deterministically.js b/packages/ethereum-contracts/ops-scripts/deploy-deterministically.js index 9b1da6c5bc..d9aa814b13 100644 --- a/packages/ethereum-contracts/ops-scripts/deploy-deterministically.js +++ b/packages/ethereum-contracts/ops-scripts/deploy-deterministically.js @@ -6,6 +6,7 @@ const Resolver = artifacts.require("Resolver"); const SuperfluidLoader = artifacts.require("SuperfluidLoader"); const CFAv1Forwarder = artifacts.require("CFAv1Forwarder"); const GDAv1Forwarder = artifacts.require("GDAv1Forwarder"); +const MacroForwarder = artifacts.require("MacroForwarder"); /** * @dev Deploy specified contract at a deterministic address (defined by sender, nonce) @@ -87,6 +88,12 @@ module.exports = eval(`(${S.toString()})()`)(async function ( console.log( `setting up GDAv1Forwarder for chainId ${chainId}, host ${hostAddr}` ); + } else if (contractName === "MacroForwarder") { + ContractArtifact = MacroForwarder; + deployArgs = [hostAddr]; + console.log( + `setting up MacroForwarder for chainId ${chainId}, host ${hostAddr}` + ); } else { throw new Error("Contract unknown / not supported"); } @@ -110,6 +117,9 @@ module.exports = eval(`(${S.toString()})()`)(async function ( data: ContractArtifact.bytecode, arguments: deployArgs, }); + if (process.env.GAS_PRICE !== undefined) { + deployTx.gasPrice = gasPrice; + } const gasLimit = process.env.GAS_LIMIT || (await deployTx.estimateGas()); console.log("gas limit:", gasLimit); diff --git a/packages/ethereum-contracts/ops-scripts/deploy-framework.js b/packages/ethereum-contracts/ops-scripts/deploy-framework.js index e41c8d4e2a..3e28ba35db 100644 --- a/packages/ethereum-contracts/ops-scripts/deploy-framework.js +++ b/packages/ethereum-contracts/ops-scripts/deploy-framework.js @@ -18,10 +18,12 @@ const { setResolver, versionStringToPseudoAddress, pseudoAddressToVersionString, + getGasConfig, } = require("./libs/common"); let resetSuperfluidFramework; let resolver; +let sfObjForGovAndResolver; /// @param deployFunc must return a contract object /// @returns the newly deployed or existing loaded contract @@ -39,10 +41,7 @@ async function deployAndRegisterContractIf( console.log(`${contractName} needs new deployment.`); contractDeployed = await deployFunc(); console.log(`${resolverKey} deployed to`, contractDeployed.address); - await web3tx(resolver.set, `Resolver set ${resolverKey}`)( - resolverKey, - contractDeployed.address - ); + await setResolver(sfObjForGovAndResolver, resolverKey, contractDeployed.address); } else { console.log(`${contractName} does not need new deployment.`); contractDeployed = await Contract.at(contractAddress); @@ -85,6 +84,11 @@ async function deployContractIfCodeChanged( ); } +// helper function: encode an address as word +function ap(addr) { + return addr.toLowerCase().slice(2).padStart(64, "0"); +} + /** * @dev Deploy the superfluid framework * @param {boolean} options.isTruffle Whether the script is used within native truffle framework @@ -118,6 +122,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( useMocks, nonUpgradable, appWhiteListing, + appCallbackGasLimit, protocolReleaseVersion, outputFile, newSuperfluidLoader, @@ -145,6 +150,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( console.log("chain ID: ", chainId); console.log("deployer: ", deployerAddr); const config = getConfig(chainId); + if (config.isTestnet) { output += "IS_TESTNET=1\n"; } @@ -173,6 +179,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( appWhiteListing || config.gov_enableAppWhiteListing || !!process.env.ENABLE_APP_WHITELISTING; + appCallbackGasLimit = + appCallbackGasLimit || + config.appCallbackGasLimit || + !!process.env.APP_CALLBACK_GAS_LIMIT; newSuperfluidLoader = newSuperfluidLoader || !!process.env.NEW_SUPERFLUID_LOADER; console.log("app whitelisting enabled:", appWhiteListing); @@ -216,12 +226,13 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( "GeneralDistributionAgreementV1", "SuperfluidUpgradeableBeacon", "SuperfluidPool", + "SuperfluidPoolPlaceholder", "SuperfluidPoolDeployerLibrary", - "ConstantOutflowNFT", - "ConstantInflowNFT", + "BeaconProxy", "PoolAdminNFT", "PoolMemberNFT", "IAccessControlEnumerable", + "DMZForwarder", ]; const mockContracts = [ "SuperfluidMock", @@ -254,17 +265,19 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( GeneralDistributionAgreementV1, SuperfluidUpgradeableBeacon, SuperfluidPool, + SuperfluidPoolPlaceholder, SuperfluidPoolDeployerLibrary, - ConstantOutflowNFT, - ConstantInflowNFT, + BeaconProxy, PoolAdminNFT, PoolMemberNFT, IAccessControlEnumerable, + DMZForwarder, } = await SuperfluidSDK.loadContracts({ ...extractWeb3Options(options), additionalContracts: contracts.concat(useMocks ? mockContracts : []), contractLoader: builtTruffleContractLoader, networkId, + gasConfig: getGasConfig(networkId), }); if (!newTestResolver && config.resolverAddress) { @@ -276,32 +289,27 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( } console.log("Resolver address", resolver.address); + sfObjForGovAndResolver = { + contracts: { + Resolver, + Ownable, + IMultiSigWallet, + ISafe, + IAccessControlEnumerable, + SuperfluidGovernanceBase + }, + resolver: { + address: resolver.address + } + }; + const previousVersionString = pseudoAddressToVersionString( await resolver.get(`versionString.${protocolReleaseVersion}`) ); console.log(`previous versionString: ${previousVersionString}`); console.log(`new versionString: ${versionString}`); - // deploy new governance contract - let governanceInitializationRequired = false; - let governance; - if (!config.disableTestGovernance && !process.env.NO_NEW_GOVERNANCE) { - governance = await deployAndRegisterContractIf( - TestGovernance, - `TestGovernance.${protocolReleaseVersion}`, - async (contractAddress) => - await codeChanged(web3, TestGovernance, contractAddress), - async () => { - governanceInitializationRequired = true; - const c = await web3tx( - TestGovernance.new, - "TestGovernance.new" - )(); - output += `SUPERFLUID_GOVERNANCE=${c.address}\n`; - return c; - } - ); - } + // =========== BOOTSTRAPPING (initial deployment) =========== // deploy superfluid loader await deployAndRegisterContractIf( @@ -318,6 +326,25 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( } ); + // deploy new TestGovernance contract + // (only on testnets, devnets and initial mainnet deployment) + let testGovernanceInitRequired = false; + let governance; + if (!config.disableTestGovernance && !process.env.NO_NEW_GOVERNANCE) { + const prevGovAddr = await resolver.get.call(`TestGovernance.${protocolReleaseVersion}`); + if (resetSuperfluidFramework || await codeChanged(web3, TestGovernance, prevGovAddr)) { + console.log(`TestGovernance needs new deployment.`); + const c = await web3tx(TestGovernance.new,"TestGovernance.new")(); + governance = await TestGovernance.at(c.address); + testGovernanceInitRequired = true; + output += `SUPERFLUID_GOVERNANCE=${c.address}\n`; + } else { + governance = await TestGovernance.at(prevGovAddr); + } + // defer resolver update to after the initialization + // this avoids testnet bricking in case script execution is interrupted + } + // deploy new superfluid host contract const SuperfluidLogic = useMocks ? SuperfluidMock : Superfluid; const superfluid = await deployAndRegisterContractIf( @@ -325,12 +352,14 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( `Superfluid.${protocolReleaseVersion}`, async (contractAddress) => !(await hasCode(web3, contractAddress)), async () => { - governanceInitializationRequired = true; + const dmzForwarder = await web3tx(DMZForwarder.new, "DMZForwarder.new")(); + output += `DMZ_FORWARDER=${dmzForwarder.address}\n`; + let superfluidAddress; const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing); + )(nonUpgradable, appWhiteListing, appCallbackGasLimit, dmzForwarder.address); console.log( `Superfluid new code address ${superfluidLogic.address}` ); @@ -350,6 +379,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( superfluidAddress = superfluidLogic.address; } const superfluid = await Superfluid.at(superfluidAddress); + await web3tx( + dmzForwarder.transferOwnership, + "dmzForwarder.transferOwnership" + )(superfluid.address); await web3tx( superfluid.initialize, "Superfluid.initialize" @@ -370,12 +403,15 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( return superfluid; } ); - // this is needed later on + + // helper objects needed later on const superfluidConstructorParam = superfluid.address .toLowerCase() .slice(2) .padStart(64, "0"); + sfObjForGovAndResolver.host = superfluid; + // load existing governance if needed if (!governance) { governance = await ISuperfluidGovernance.at( @@ -384,8 +420,8 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( console.log("Governance address", governance.address); } - // initialize the new governance - if (governanceInitializationRequired) { + // initialize the new TestGovernance + if (testGovernanceInitRequired) { const accounts = await web3.eth.getAccounts(); const trustedForwarders = []; if (config.trustedForwarders) { @@ -397,7 +433,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( if (config.gdaFwd) { trustedForwarders.push(config.gdaFwd); } - console.log(`initializing governance with config: ${JSON.stringify({ + console.log(`initializing TestGovernance with config: ${JSON.stringify({ liquidationPeriod: config.liquidationPeriod, patricianPeriod: config.patricityPeriod, trustedForwarders @@ -414,6 +450,13 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( // trustedForwarders trustedForwarders ); + + // update the resolver + await setResolver( + sfObjForGovAndResolver, + `TestGovernance.${protocolReleaseVersion}`, + governance.address + ); } // replace with new governance @@ -462,20 +505,28 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( externalLibraryArtifact, externalLibraryName, outputName, - contract + contract, + allowFailure = false ) => { - const externalLibrary = await web3tx( - externalLibraryArtifact.new, - `${externalLibraryName}.new` - )(); - output += `${outputName}=${externalLibrary.address}\n`; - if (process.env.IS_HARDHAT) { - contract.link(externalLibrary); - } else { - contract.link(externalLibraryName, externalLibrary.address); + try { + const externalLibrary = await web3tx( + externalLibraryArtifact.new, + `${externalLibraryName}.new` + )(); + output += `${outputName}=${externalLibrary.address}\n`; + if (process.env.IS_HARDHAT) { + contract.link(externalLibrary); + } else { + contract.link(externalLibraryName, externalLibrary.address); + } + console.log(externalLibraryName, "address", externalLibrary.address); + return externalLibrary; + } catch (err) { + console.warn("Error: ", err); + if (!allowFailure) { + throw err; + } } - console.log(externalLibraryName, "address", externalLibrary.address); - return externalLibrary; }; let slotsBitmapLibraryAddress = ZERO_ADDRESS; @@ -537,23 +588,41 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( } } - // @note GDA deployment is commented out until we plan on releasing it - const deployGDAv1 = async () => { - try { - // deploy and link SuperfluidPoolDeployerLibrary + let gdaIsLinked = false; + const deployGDAv1 = async (superfluidPoolBeaconAddr) => { + if (!gdaIsLinked) { await deployExternalLibraryAndLink( SuperfluidPoolDeployerLibrary, "SuperfluidPoolDeployerLibrary", - "SUPERFLUID_POOL_DEPLOYER", - GeneralDistributionAgreementV1 + "SUPERFLUID_POOL_DEPLOYER_LIBRARY", + GeneralDistributionAgreementV1, + protocolReleaseVersion === "test" ? true : false ); + // deploy a dummy BeaconProxy for verification + const beaconProxy = await web3tx( + BeaconProxy.new, + "BeaconProxy.new" + )(superfluidPoolBeaconAddr, "0x"); + console.log("Dummy BeaconProxy address", beaconProxy.address); + output += `DUMMY_BEACON_PROXY=${beaconProxy.address}\n`; + if (process.env.IS_HARDHAT) { - if (slotsBitmapLibraryAddress !== ZERO_ADDRESS) { - const lib = await SlotsBitmapLibrary.at( - slotsBitmapLibraryAddress - ); - GeneralDistributionAgreementV1.link(lib); + // this fails in test case deployment.test.js:ops-scripts/deploy-super-token.js + // where deploy-framework is invoked twice, the second time failing because + // hardhat claims the library is already linked. Thus we try/catch here. + try { + if (slotsBitmapLibraryAddress !== ZERO_ADDRESS) { + const lib = await SlotsBitmapLibrary.at( + slotsBitmapLibraryAddress + ); + GeneralDistributionAgreementV1.link(lib); + } + } catch (e) { + console.warn("!!! Cannot link slotsBitmapLibrary", e.toString()); + if (protocolReleaseVersion !== "test") { + throw e; + } } } else { GeneralDistributionAgreementV1.link( @@ -561,13 +630,13 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( slotsBitmapLibraryAddress ); } - } catch (err) { - console.error(err); + gdaIsLinked = true; } + const agreement = await web3tx( GeneralDistributionAgreementV1.new, "GeneralDistributionAgreementV1.new" - )(superfluid.address); + )(superfluid.address, superfluidPoolBeaconAddr); console.log( "New GeneralDistributionAgreementV1 address", @@ -577,12 +646,62 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( return agreement; }; + // initial GDA deployment (GDA bootstrapping) if (!(await superfluid.isAgreementTypeListed.call(GDAv1_TYPE))) { - const gda = await deployGDAv1(); - await web3tx( - governance.registerAgreementClass, - "Governance registers GDA" - )(superfluid.address, gda.address); + // first we deploy a SuperfluidPoolBeacon + // ... with the placeholder logic (just enough to allow later update) + const superfluidPoolPlaceholderLogic = await web3tx( + SuperfluidPoolPlaceholder.new, + "SuperfluidPoolPlaceholder.new" + )(); + const superfluidPoolBeaconContract = await web3tx( + SuperfluidUpgradeableBeacon.new, + "SuperfluidUpgradeableBeacon.new" + )(superfluidPoolPlaceholderLogic.address); + console.log( + "New SuperfluidPoolBeacon address", + superfluidPoolBeaconContract.address + ); + output += `SUPERFLUID_POOL_BEACON=${superfluidPoolBeaconContract.address}\n`; + + const gda = await deployGDAv1(superfluidPoolBeaconContract.address); + + /* + // now that we have a GDA, we can deploy the actual SuperfluidPool... + // "narrator: no, we cannot, needs the proxy address" + const superfluidPoolLogic = await web3tx( + SuperfluidPool.new, + "SuperfluidPool.new" + )(gda.address); + await superfluidPoolLogic.castrate(); + console.log("New SuperfluidPoolLogic address", superfluidPoolLogic.address); + output += `SUPERFLUID_POOL_LOGIC=${superfluidPoolLogic.address}\n`; + + // ...update the beacon to it... + console.log("Upgrading beacon to the actual SuperfluidPool logic..."); + await superfluidPoolBeaconContract.upgradeTo(superfluidPoolLogic.address); + */ + + // ...and transfer ownership of the beacon + console.log("Transferring ownership of beacon contract to Superfluid Host..."); + await superfluidPoolBeaconContract.transferOwnership(superfluid.address); + + // finally, register the GDA with a gov action. + // its pending state changes don't affect the remaining actions + await sendGovernanceAction( + sfObjForGovAndResolver, + (gov) => gov.registerAgreementClass(superfluid.address, gda.address) + ); + + // assumption: testnets don't require async gov action execution, so can continue + // while for mainnets with async gov action, we need to exit here. + if (!config.isTestnet) { + console.log("info for verification:"); + console.log(output); + console.log("##### STEP1 of GDA DEPLOYMENT DONE #####"); + console.log("Now go execute the gov action, then run this script again"); + process.exit(); + } } else { // NOTE that we are reusing the existing deployed external library // here as an optimization, this assumes that we do not change the @@ -592,6 +711,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const GDAv1 = await GeneralDistributionAgreementV1.at( await superfluid.getAgreementClass.call(GDAv1_TYPE) ); + console.log("GDAv1 proxy address", GDAv1.address); slotsBitmapLibraryAddress = await GDAv1.SLOTS_BITMAP_LIBRARY_ADDRESS.call(); let superfluidPoolDeployerLibraryAddress = @@ -623,7 +743,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( console.warn("Cannot get slotsBitmapLibrary address", e.toString()); } } - // @note GDA deployment is commented out until we plan on releasing it if (protocolReleaseVersion === "test") { // deploy CFAv1Forwarder for test deployments @@ -678,6 +797,9 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( ); } + // =========== UPGRADE changed contracts =========== + console.log("===== STARTING UPGRADE PHASE ======"); + let superfluidNewLogicAddress = ZERO_ADDRESS; const agreementsToUpdate = []; if (!nonUpgradable) { @@ -685,6 +807,42 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( throw new Error("Superfluid is not upgradable"); } + async function getPrevDMZForwarderAddr() { + try { + return await superfluid.DMZ_FORWARDER(); + } catch (err) { + console.error("### Error getting DMZForwarder address", err); + return ZERO_ADDRESS; // fallback + } + } + const prevDMZForwarderAddr = await getPrevDMZForwarderAddr(); + + const dmzForwarderNewAddress = await deployContractIfCodeChanged( + web3, + DMZForwarder, + prevDMZForwarderAddr, + async () => { + const dmzForwarder = await web3tx(DMZForwarder.new, "DMZForwarder.new")(); + await web3tx( + dmzForwarder.transferOwnership, + "dmzForwarder.transferOwnership" + )(superfluid.address); + output += `DMZ_FORWARDER=${dmzForwarder.address}\n`; + return dmzForwarder.address; + } + ); + const dmzForwarderAddress = dmzForwarderNewAddress !== ZERO_ADDRESS + ? dmzForwarderNewAddress + : prevDMZForwarderAddr; + + // get previous callback gas limit, make sure we don't decrease it + const prevCallbackGasLimit = await superfluid.CALLBACK_GAS_LIMIT(); + if (prevCallbackGasLimit.toNumber() > appCallbackGasLimit) { + throw new Error("Cannot decrease app callback gas limit"); + } else if (prevCallbackGasLimit.toNumber() !== appCallbackGasLimit) { + console.log(` !!! CHANGING APP CALLBACK GAS LIMIT FROM ${prevCallbackGasLimit} to ${appCallbackGasLimit} !!!`); + } + // deploy new superfluid host logic superfluidNewLogicAddress = await deployContractIfCodeChanged( web3, @@ -697,7 +855,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const superfluidLogic = await web3tx( SuperfluidLogic.new, "SuperfluidLogic.new" - )(nonUpgradable, appWhiteListing); + )(nonUpgradable, appWhiteListing, appCallbackGasLimit, dmzForwarderAddress); output += `SUPERFLUID_HOST_LOGIC=${superfluidLogic.address}\n`; return superfluidLogic.address; } @@ -713,11 +871,7 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( ) ).getCodeAddress(), async () => (await deployCFAv1()).address, - [ - // See SuperToken constructor parameter - superfluidConstructorParam, - ZERO_ADDRESS.toLowerCase().slice(2).padStart(64, "0"), - ] + [ superfluidConstructorParam ] ); if (cfaNewLogicAddress !== ZERO_ADDRESS) { agreementsToUpdate.push(cfaNewLogicAddress); @@ -732,33 +886,30 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( ) ).getCodeAddress(), async () => (await deployIDAv1()).address, - [ - // See SuperToken constructor parameter - superfluidConstructorParam, - ] + [ superfluidConstructorParam ] ); if (idaNewLogicAddress !== ZERO_ADDRESS) { agreementsToUpdate.push(idaNewLogicAddress); } - // @note commented out: deploy new GDA logic + // deploy new GDA logic + const gdaProxyAddr = await superfluid.getAgreementClass.call(GDAv1_TYPE); + const gdaLogicAddr = await (await UUPSProxiable.at(gdaProxyAddr)).getCodeAddress(); + const superfluidPoolBeaconAddr = await ( + await GeneralDistributionAgreementV1.at(gdaProxyAddr) + ).superfluidPoolBeacon.call(); const gdaNewLogicAddress = await deployContractIfCodeChanged( web3, GeneralDistributionAgreementV1, - await ( - await UUPSProxiable.at( - await superfluid.getAgreementClass.call(GDAv1_TYPE) - ) - ).getCodeAddress(), - async () => (await deployGDAv1()).address, + gdaLogicAddr, + async () => (await deployGDAv1(superfluidPoolBeaconAddr)).address, [ - // See SuperToken constructor parameter superfluidConstructorParam, + ap(superfluidPoolBeaconAddr) ] ); if (gdaNewLogicAddress !== ZERO_ADDRESS) { agreementsToUpdate.push(gdaNewLogicAddress); } - // @note GDA deployment is commented out until we plan on releasing it } // deploy new super token factory logic (depends on SuperToken logic, which links to nft deployer library) @@ -770,8 +921,6 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const factoryAddress = await superfluid.getSuperTokenFactory.call(); - let constantOutflowNFTLogicChanged = false; - let constantInflowNFTLogicChanged = false; let poolAdminNFTLogicChanged = false; let poolMemberNFTLogicChanged = false; @@ -789,26 +938,37 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( web3, SuperTokenFactoryLogic, async () => { - // helper function: encode an address as word - const ap = function(addr) { - return addr.toLowerCase().slice(2).padStart(64, "0"); - } console.log( "checking if SuperTokenFactory needs to be redeployed..." ); // check if super token factory or super token logic changed - try { - if (factoryAddress === ZERO_ADDRESS) return true; - const factory = await SuperTokenFactoryLogic.at(factoryAddress); - const superTokenLogicAddress = await factory.getSuperTokenLogic.call(); - const superTokenLogic = await SuperTokenLogic.at(superTokenLogicAddress); - const cofNFTPAddr = await superTokenLogic.CONSTANT_OUTFLOW_NFT(); - const cifNFTPAddr = await superTokenLogic.CONSTANT_INFLOW_NFT(); - const cofNFTContract = await ConstantOutflowNFT.at(cofNFTPAddr); - const cifNFTContract = await ConstantInflowNFT.at(cifNFTPAddr); - const cofNFTLAddr = await cofNFTContract.getCodeAddress(); - const cifNFTLAddr = await cifNFTContract.getCodeAddress(); + if (factoryAddress === ZERO_ADDRESS) return true; + + const factory = await SuperTokenFactoryLogic.at(factoryAddress); + const superTokenLogicAddress = await factory.getSuperTokenLogic.call(); + const superTokenLogic = await SuperTokenLogic.at(superTokenLogicAddress); + + const gdaPAddr = await superfluid.getAgreementClass.call(GDAv1_TYPE); + + const cofNFTPAddr = await superTokenLogic.CONSTANT_OUTFLOW_NFT(); + const cifNFTPAddr = await superTokenLogic.CONSTANT_INFLOW_NFT(); + + let cofNFTLAddr = ZERO_ADDRESS; + let cifNFTLAddr = ZERO_ADDRESS; + + if (cofNFTPAddr !== ZERO_ADDRESS) { + const cofNFTContract = await UUPSProxiable.at(cofNFTPAddr); + cofNFTLAddr = await cofNFTContract.getCodeAddress(); + } + + if (cifNFTPAddr !== ZERO_ADDRESS) { + const cifNFTContract = await UUPSProxiable.at(cifNFTPAddr); + cifNFTLAddr = await cifNFTContract.getCodeAddress(); + } + + // TODO: remove from try block once all networks have a PoolNFT aware supertoken logic deployed + try { const poolAdminNFTPAddr = await superTokenLogic.POOL_ADMIN_NFT(); const poolMemberNFTPAddr = await superTokenLogic.POOL_MEMBER_NFT(); const poolAdminNFTContract = await PoolAdminNFT.at(poolAdminNFTPAddr); @@ -816,24 +976,10 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const poolAdminNFTLAddr = await poolAdminNFTContract.getCodeAddress(); const poolMemberNFTLAddr = await poolMemberNFTContract.getCodeAddress(); - const cfaPAddr = await superfluid.getAgreementClass.call(CFAv1_TYPE); - const gdaPAddr = await superfluid.getAgreementClass.call(GDAv1_TYPE); - constantOutflowNFTLogicChanged = await codeChanged( - web3, - ConstantOutflowNFT, - cofNFTLAddr, - [superfluidConstructorParam, ap(cifNFTPAddr), ap(cfaPAddr), ap(gdaPAddr)] - ); - console.log(" constantOutflowNFTLogicChanged:", constantOutflowNFTLogicChanged); + // TODO: check only if non-zero address + // don't do in try block, otherwise we may accidentally re-deploy the NFT proxies - constantInflowNFTLogicChanged = await codeChanged( - web3, - ConstantInflowNFT, - cifNFTLAddr, - [superfluidConstructorParam, ap(cofNFTPAddr), ap(cfaPAddr), ap(gdaPAddr)] - ); - console.log(" constantInflowNFTLogicChanged:", constantInflowNFTLogicChanged); poolAdminNFTLogicChanged = await codeChanged( web3, @@ -874,12 +1020,9 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( return ( // check if super token factory logic has changed // or super token logic has changed - // or constant outflow nft logic has changed - // or constant inflow nft logic has changed + // or pool nft logic has changed superTokenFactoryCodeChanged || superTokenLogicCodeChanged || - constantOutflowNFTLogicChanged || - constantInflowNFTLogicChanged || poolAdminNFTLogicChanged || poolMemberNFTLogicChanged ); @@ -891,13 +1034,15 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( return true; } }, + // now we know if something changed which requires it to be upgraded + // if so, this is what needs to be done: async () => { let superTokenFactoryLogic; // @note this will either be freshly created proxies on the very first bootstrapping per network // OR it will be the canonical proxy set on the SuperToken - let cofNFTProxyAddress = ZERO_ADDRESS; - let cifNFTProxyAddress = ZERO_ADDRESS; + let cofNFTProxyAddress; + let cifNFTProxyAddress; let cofNFTLogicAddress = ZERO_ADDRESS; let cifNFTLogicAddress = ZERO_ADDRESS; let poolAdminNFTProxyAddress = ZERO_ADDRESS; @@ -907,29 +1052,33 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( // try to get NFT proxy addresses from canonical Super Token logic if (factoryAddress !== ZERO_ADDRESS) { - try { - const factory = await SuperTokenFactoryLogic.at( - factoryAddress - ); - console.log(" factory.getSuperTokenLogic.call()"); - const superTokenLogicAddress = - await factory.getSuperTokenLogic.call(); - const superTokenLogic = await SuperTokenLogic.at( - superTokenLogicAddress - ); - // Flow NFTs - cofNFTProxyAddress = - await superTokenLogic.CONSTANT_OUTFLOW_NFT.call(); - cifNFTProxyAddress = - await superTokenLogic.CONSTANT_INFLOW_NFT.call(); - cofNFTLogicAddress = await ( - await UUPSProxiable.at(cofNFTProxyAddress) - ).getCodeAddress(); - cifNFTLogicAddress = await ( - await UUPSProxiable.at(cifNFTProxyAddress) - ).getCodeAddress(); + const factory = await SuperTokenFactoryLogic.at( + factoryAddress + ); + console.log(" factory.getSuperTokenLogic.call()"); + const superTokenLogicAddress = + await factory.getSuperTokenLogic.call(); + const superTokenLogic = await SuperTokenLogic.at( + superTokenLogicAddress + ); + // Flow NFTs + console.log(" getting FlowNFT addrs"); + cofNFTProxyAddress = + await superTokenLogic.CONSTANT_OUTFLOW_NFT.call(); + cifNFTProxyAddress = + await superTokenLogic.CONSTANT_INFLOW_NFT.call(); + cofNFTLogicAddress = cofNFTProxyAddress === ZERO_ADDRESS ? ZERO_ADDRESS : await ( + await UUPSProxiable.at(cofNFTProxyAddress) + ).getCodeAddress(); + cifNFTLogicAddress = cofNFTProxyAddress === ZERO_ADDRESS ? ZERO_ADDRESS : await ( + await UUPSProxiable.at(cifNFTProxyAddress) + ).getCodeAddress(); + + // TODO: remove from try block once all networks have a PoolNFT aware supertoken logic deployed + try { // Pool NFTs + console.log(" getting PoolNFT addrs"); poolAdminNFTProxyAddress = await superTokenLogic.POOL_ADMIN_NFT.call(); poolMemberNFTProxyAddress = @@ -941,195 +1090,105 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( await UUPSProxiable.at(poolMemberNFTProxyAddress) ).getCodeAddress(); } catch (err) { - console.error("Unable to get nft proxy addresses"); + console.error("Unable to get PoolNFT proxy addresses"); + // if any of them fails, we assume the following ones are missing too } } // if the super token logic does not have the proxies, we must deploy // new nft logic and proxies. - if ( - cofNFTProxyAddress === ZERO_ADDRESS || - cifNFTProxyAddress === ZERO_ADDRESS || - poolAdminNFTProxyAddress === ZERO_ADDRESS || - poolMemberNFTProxyAddress === ZERO_ADDRESS - ) { - if ( - cofNFTProxyAddress === ZERO_ADDRESS || - cifNFTProxyAddress === ZERO_ADDRESS - ) { - const constantOutflowNFTProxy = await web3tx( - UUPSProxy.new, - `Create ConstantOutflowNFT proxy` - )(); - console.log( - "ConstantOutflowNFT Proxy address", - constantOutflowNFTProxy.address - ); - output += `CONSTANT_OUTFLOW_NFT_PROXY=${constantOutflowNFTProxy.address}\n`; - - const constantInflowNFTProxy = await web3tx( - UUPSProxy.new, - `Create ConstantInflowNFT proxy` - )(); - console.log( - "ConstantInflowNFT Proxy address", - constantInflowNFTProxy.address - ); - output += `CONSTANT_INFLOW_NFT_PROXY=${constantInflowNFTProxy.address}\n`; - const constantOutflowNFTLogic = await deployNFTContract( - ConstantOutflowNFT, - "ConstantOutflowNFT", - "CONSTANT_OUTFLOW_NFT", - [superfluid.address, constantInflowNFTProxy.address] - ); - const constantInflowNFTLogic = await deployNFTContract( - ConstantInflowNFT, - "ConstantInflowNFT", - "CONSTANT_INFLOW_NFT", - [superfluid.address, constantOutflowNFTProxy.address] - ); + const cfaAddr = await superfluid.getAgreementClass.call(CFAv1_TYPE); + const gdaAddr = await superfluid.getAgreementClass.call(GDAv1_TYPE); - // set the nft logic addresses (to be consumed by the super token factory logic constructor) - cofNFTLogicAddress = constantOutflowNFTLogic.address; - cifNFTLogicAddress = constantInflowNFTLogic.address; + // We used to deploy a proxy if none existed. But FlowNFTs are now deprecated, so we don't. + if (cofNFTProxyAddress === undefined) { + console.log("COFNFT proxy doesn't exist, skipping deployment"); + cofNFTProxyAddress = ZERO_ADDRESS; + } + if (cifNFTProxyAddress === undefined) { + console.log("CIFNFT proxy doesn't exist, skipping deployment"); + cifNFTProxyAddress = ZERO_ADDRESS; + } - // initialize the nft proxy with the nft logic - await constantOutflowNFTProxy.initializeProxy( - constantOutflowNFTLogic.address - ); - await constantInflowNFTProxy.initializeProxy( - constantInflowNFTLogic.address - ); - const constantOutflowNFT = await ConstantOutflowNFT.at( - constantOutflowNFTProxy.address - ); - const constantInflowNFT = await ConstantInflowNFT.at( - constantInflowNFTProxy.address - ); + // For existing proxies, we used to check-update the logic. But we don't anymore. + if (cofNFTProxyAddress !== ZERO_ADDRESS) { + console.log("skipping COFNFT logic update") + } + if (cifNFTProxyAddress !== ZERO_ADDRESS) { + console.log("skipping CIFNFT logic update") + } - // initialize the proxy contracts with the nft names - await constantOutflowNFT.initialize( - "Constant Outflow NFT", - "COF" - ); - await constantInflowNFT.initialize( - "Constant Inflow NFT", - "CIF" - ); - // set the nft proxy addresses (to be consumed by the super token logic constructor) - cofNFTProxyAddress = constantOutflowNFTProxy.address; - cifNFTProxyAddress = constantInflowNFTProxy.address; - } - if ( - poolAdminNFTProxyAddress === ZERO_ADDRESS || - poolMemberNFTProxyAddress === ZERO_ADDRESS - ) { - const poolAdminNFTProxy = await web3tx( - UUPSProxy.new, - `Create PoolAdminNFT proxy` - )(); - console.log( - "PoolAdminNFT Proxy address", - poolAdminNFTProxy.address - ); - output += `POOL_ADMIN_NFT_PROXY=${poolAdminNFTProxy.address}\n`; - - const poolMemberNFTProxy = await web3tx( - UUPSProxy.new, - `Create PoolMemberNFT proxy` - )(); - console.log( - "PoolMemberNFT Proxy address", - poolMemberNFTProxy.address - ); - output += `POOL_MEMBER_NFT_PROXY=${poolMemberNFTProxy.address}\n`; + if ( + poolAdminNFTProxyAddress === ZERO_ADDRESS || + poolMemberNFTProxyAddress === ZERO_ADDRESS + ) { + console.log("BOOTSTRAPPING: Deploying Pool NFT Proxies..."); + const poolAdminNFTProxy = await web3tx( + UUPSProxy.new, + `Create PoolAdminNFT proxy` + )(); + console.log( + "PoolAdminNFT Proxy address", + poolAdminNFTProxy.address + ); + output += `POOL_ADMIN_NFT_PROXY=${poolAdminNFTProxy.address}\n`; - const poolAdminNFTLogic = await deployNFTContract( - PoolAdminNFT, - "PoolAdminNFT", - "POOL_ADMIN_NFT", - [superfluid.address] - ); - const poolMemberNFTLogic = await deployNFTContract( - PoolMemberNFT, - "PoolMemberNFT", - "POOL_MEMBER_NFT", - [superfluid.address] - ); + const poolMemberNFTProxy = await web3tx( + UUPSProxy.new, + `Create PoolMemberNFT proxy` + )(); + console.log( + "PoolMemberNFT Proxy address", + poolMemberNFTProxy.address + ); + output += `POOL_MEMBER_NFT_PROXY=${poolMemberNFTProxy.address}\n`; - // set the nft logic addresses (to be consumed by the super token factory logic constructor) - poolAdminNFTLogicAddress = poolAdminNFTLogic.address; - poolMemberNFTLogicAddress = poolMemberNFTLogic.address; + const poolAdminNFTLogic = await deployNFTContract( + PoolAdminNFT, + "PoolAdminNFT", + "POOL_ADMIN_NFT_LOGIC", + [superfluid.address, gdaAddr] + ); + const poolMemberNFTLogic = await deployNFTContract( + PoolMemberNFT, + "PoolMemberNFT", + "POOL_MEMBER_NFT_LOGIC", + [superfluid.address, gdaAddr] + ); - // initialize the nft proxy with the nft logic - await poolAdminNFTProxy.initializeProxy( - poolAdminNFTLogic.address - ); + // set the nft logic addresses (to be consumed by the super token factory logic constructor) + poolAdminNFTLogicAddress = poolAdminNFTLogic.address; + poolMemberNFTLogicAddress = poolMemberNFTLogic.address; - await poolMemberNFTProxy.initializeProxy( - poolMemberNFTLogic.address - ); + // initialize the nft proxy with the nft logic + await poolAdminNFTProxy.initializeProxy( + poolAdminNFTLogic.address + ); - const poolAdminNFT = await PoolAdminNFT.at( - poolAdminNFTProxy.address - ); + await poolMemberNFTProxy.initializeProxy( + poolMemberNFTLogic.address + ); - const poolMemberNFT = await PoolMemberNFT.at( - poolMemberNFTProxy.address - ); + const poolAdminNFT = await PoolAdminNFT.at( + poolAdminNFTProxy.address + ); - // initialize the proxy contracts with the nft names - await poolAdminNFT.initialize("Pool Admin NFT", "PA"); - await poolMemberNFT.initialize("Pool Member NFT", "PM"); + const poolMemberNFT = await PoolMemberNFT.at( + poolMemberNFTProxy.address + ); - // set the nft proxy addresses (to be consumed by the super token logic constructor) - poolAdminNFTProxyAddress = poolAdminNFTProxy.address; - poolMemberNFTProxyAddress = poolMemberNFTProxy.address; - } - } else { - // nft proxies already exist - await deployContractIf( - web3, - ConstantOutflowNFT, - async () => { - return constantOutflowNFTLogicChanged; - }, - async () => { - const cofNFTLogic = await deployNFTContract( - ConstantOutflowNFT, - "ConstantOutflowNFT", - "CONSTANT_OUTFLOW_NFT", - [superfluid.address, cifNFTProxyAddress] - ); - // @note we set the cofNFTLogicAddress to be passed to SuperTokenFactoryLogic here - cofNFTLogicAddress = cofNFTLogic.address; + // initialize the proxy contracts with the nft names + await poolAdminNFT.initialize("Pool Admin NFT", "PA"); + await poolMemberNFT.initialize("Pool Member NFT", "PM"); - return cofNFTLogic.address; - } - ); - await deployContractIf( - web3, - ConstantInflowNFT, - async () => { - return constantInflowNFTLogicChanged; - }, - async () => { - const cifNFTLogic = await deployNFTContract( - ConstantInflowNFT, - "ConstantInflowNFT", - "CONSTANT_INFLOW_NFT", - [ - superfluid.address, - cofNFTProxyAddress, - ] - ); - // @note we set the cifNFTLogicAddress to be passed to SuperTokenFactoryLogic here - cifNFTLogicAddress = cifNFTLogic.address; - return cifNFTLogic.address; - } - ); + // set the nft proxy addresses (to be consumed by the super token logic constructor) + poolAdminNFTProxyAddress = poolAdminNFTProxy.address; + poolMemberNFTProxyAddress = poolMemberNFTProxy.address; + } else { + // PoolNFT proxies already exist + console.log("Check-upgrading Pool NFTs..."); await deployContractIf( web3, PoolAdminNFT, @@ -1140,8 +1199,8 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const poolAdminNFTLogic = await deployNFTContract( PoolAdminNFT, "PoolAdminNFT", - "POOL_ADMIN_NFT", - [superfluid.address] + "POOL_ADMIN_NFT_LOGIC", + [superfluid.address, gdaAddr] ); // @note we set the poolAdminNFTLogicAddress to be passed to SuperTokenFactoryLogic here poolAdminNFTLogicAddress = poolAdminNFTLogic.address; @@ -1158,8 +1217,8 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( const poolMemberNFTLogic = await deployNFTContract( PoolMemberNFT, "PoolMemberNFT", - "POOL_MEMBER_NFT", - [superfluid.address] + "POOL_MEMBER_NFT_LOGIC", + [superfluid.address, gdaAddr] ); // @note we set the poolMemberNFTLogicAddress to be passed to SuperTokenFactoryLogic here poolMemberNFTLogicAddress = poolMemberNFTLogic.address; @@ -1208,59 +1267,21 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( } ); - if ( - superfluidNewLogicAddress !== ZERO_ADDRESS || - agreementsToUpdate.length > 0 || - superTokenFactoryNewLogicAddress !== ZERO_ADDRESS - ) { - console.log(`invoking gov.updateContracts(${superfluid.address}, ${superfluidNewLogicAddress}, [${agreementsToUpdate}], ${superTokenFactoryNewLogicAddress})})`); - await sendGovernanceAction( - { - host: superfluid, - contracts: { - Ownable, - IMultiSigWallet, - ISafe, - SuperfluidGovernanceBase, - }, - }, - (gov) => - gov.updateContracts( - superfluid.address, - superfluidNewLogicAddress, - agreementsToUpdate, - superTokenFactoryNewLogicAddress, - ZERO_ADDRESS - ) - ); - } - // Superfluid Pool Beacon deployment + let superfluidPoolNewLogicAddress = ZERO_ADDRESS; + + // SuperfluidPool upgrade const gdaV1Contract = await GeneralDistributionAgreementV1.at( await superfluid.getAgreementClass.call(GDAv1_TYPE) ); - const superfluidPoolBeaconAddress = - await gdaV1Contract.superfluidPoolBeacon(); + const superfluidPoolBeaconAddress = await gdaV1Contract.superfluidPoolBeacon(); - const getPoolLogicAddress = async () => { - if (superfluidPoolBeaconAddress === ZERO_ADDRESS) { - return ZERO_ADDRESS; - } - - try { - return await ( - await SuperfluidUpgradeableBeacon.at( - superfluidPoolBeaconAddress - ) - ).implementation(); - } catch (e) { - return ZERO_ADDRESS; - } - }; - const superfluidPoolLogicAddress = await deployContractIfCodeChanged( + superfluidPoolNewLogicAddress = await deployContractIfCodeChanged( web3, SuperfluidPool, - await getPoolLogicAddress(), + await ( + await SuperfluidUpgradeableBeacon.at(superfluidPoolBeaconAddress) + ).implementation(), async () => { // Deploy new SuperfluidPool logic contract const superfluidPoolLogic = await web3tx( @@ -1273,81 +1294,39 @@ module.exports = eval(`(${S.toString()})({skipArgv: true})`)(async function ( superfluidPoolLogic.address ); output += `SUPERFLUID_POOL_LOGIC=${superfluidPoolLogic.address}\n`; - return superfluidPoolLogic.address; }, - [ - // See SuperToken constructor parameter - gdaV1Contract.address.toLowerCase().slice(2).padStart(64, "0"), - ] + [ap(gdaV1Contract.address)] ); - // if beacon doesn't exist, we deploy a new one - if (superfluidPoolBeaconAddress === ZERO_ADDRESS) { - console.log( - "SuperfluidPool Beacon doesn't exist, creating a new one..." - ); - const superfluidPoolBeaconContract = await web3tx( - SuperfluidUpgradeableBeacon.new, - "SuperfluidUpgradeableBeacon.new" - )(superfluidPoolLogicAddress); - console.log( - "New SuperfluidPoolBeacon address", - superfluidPoolBeaconContract.address - ); - output += `SUPERFLUID_POOL_BEACON=${superfluidPoolBeaconContract.address}\n`; - - console.log("Transferring ownership of beacon contract to Superfluid Host..."); - await superfluidPoolBeaconContract.transferOwnership(superfluid.address); + if ( + superfluidNewLogicAddress !== ZERO_ADDRESS || + agreementsToUpdate.length > 0 || + superTokenFactoryNewLogicAddress !== ZERO_ADDRESS || + superfluidPoolNewLogicAddress !== ZERO_ADDRESS + ) { + console.log(`Creting gov action: gov.updateContracts(${superfluid.address}, ${superfluidNewLogicAddress}, + [${agreementsToUpdate}], ${superTokenFactoryNewLogicAddress}, ${superfluidPoolNewLogicAddress})`); - console.log("Initializing GDA w/ beacon contract..."); - await gdaV1Contract.initialize(superfluidPoolBeaconContract.address); - } else { - console.log("Superfluid Pool Beacon exists..."); - // if the beacon exists AND we deployed a new SuperfluidPool logic contract - if (superfluidPoolLogicAddress !== ZERO_ADDRESS) { - console.log( - "superfluidPoolLogicAddress updated, upgrading logic contract..." - ); - // update beacon implementation - const superfluidPoolBeacon = await SuperfluidUpgradeableBeacon.at( - superfluidPoolBeaconAddress - ); - await superfluidPoolBeacon.upgradeTo(superfluidPoolLogicAddress); - } + await sendGovernanceAction( + sfObjForGovAndResolver, + (gov) => gov.updateContracts( + superfluid.address, + superfluidNewLogicAddress, + agreementsToUpdate, + superTokenFactoryNewLogicAddress, + superfluidPoolNewLogicAddress + ) + ); } - // finally, set the version string in resolver - if (previousVersionString !== versionString) { - const sfObjForResolver = { - contracts: { - Resolver, - IAccessControlEnumerable, - }, - resolver: { - address: resolver.address - } - }; - const encodedVersionString = versionStringToPseudoAddress(versionString); - await setResolver(sfObjForResolver, `versionString.${protocolReleaseVersion}`, encodedVersionString); - } // finally, set the version string in resolver - + // Note that if executed immediately, this may advance the version string + // before the actual protocol upgrade takes place through gov multisig signing if (previousVersionString !== versionString) { - const sfObjForResolver = { - contracts: { - Resolver, - IMultiSigWallet, - ISafe, - IAccessControlEnumerable, - }, - resolver: { - address: resolver.address - } - }; const encodedVersionString = versionStringToPseudoAddress(versionString); - await setResolver(sfObjForResolver, `versionString.${protocolReleaseVersion}`, encodedVersionString); + await setResolver(sfObjForGovAndResolver, `versionString.${protocolReleaseVersion}`, encodedVersionString); } console.log("======== Superfluid framework deployed ========"); diff --git a/packages/ethereum-contracts/ops-scripts/gov-authorize-app-deployer.js b/packages/ethereum-contracts/ops-scripts/gov-authorize-app-deployer.js index a08f98a681..b496395da1 100644 --- a/packages/ethereum-contracts/ops-scripts/gov-authorize-app-deployer.js +++ b/packages/ethereum-contracts/ops-scripts/gov-authorize-app-deployer.js @@ -27,13 +27,13 @@ module.exports = eval(`(${S.toString()})({ console.log("======== Authorizing Super App Deployer ========"); let {protocolReleaseVersion} = options; - if (args.length > 3 || args.length < 2) { + if (args.length > 2 || args.length < 1) { throw new Error("Wrong number of arguments"); } // default: 2^64 - 1 (far in the future - for practical purposes, never expiring) let expirationTs = (BigInt(2) ** BigInt(64) - BigInt(1)).toString(); - if (args.length === 3) { + if (args.length === 2) { const expTsStr = args.pop(); const parsedExpTs = parseInt(expTsStr); if (parsedExpTs.toString() !== expTsStr) { @@ -43,8 +43,9 @@ module.exports = eval(`(${S.toString()})({ console.log("Expiration timestamp", expirationTs); console.log("Expiration date", new Date(expirationTs * 1000)); // print human readable } - // for historical reasons, we have "registration keys" and now hardcode those to "k1" - const registrationKey = "k1"; + // for historical reasons, we have "registration keys" and now hardcode those to "k1" by default + const registrationKey = process.env.REGISTRATION_KEY !== undefined ? process.env.REGISTRATION_KEY : "k1"; + console.log("Registration key", registrationKey); const deployer = args.pop(); console.log("Deployer", deployer); diff --git a/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js b/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js index b66286c95f..1b5ef9924f 100644 --- a/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js +++ b/packages/ethereum-contracts/ops-scripts/gov-transfer-framework-ownership.js @@ -5,6 +5,7 @@ const { extractWeb3Options, hasCode, sendGovernanceAction, + builtTruffleContractLoader, } = require("./libs/common"); /** @@ -47,7 +48,13 @@ module.exports = eval(`(${S.toString()})()`)(async function ( const sf = new SuperfluidSDK.Framework({ ...extractWeb3Options(options), version: protocolReleaseVersion, - additionalContracts: ["AccessControl", "Ownable"], + additionalContracts: [ + "AccessControl", + "Ownable", + "IMultiSigWallet", + "ISafe" + ], + contractLoader: builtTruffleContractLoader, }); await sf.initialize(); diff --git a/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js b/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js index 0ecea23977..7fca30798c 100644 --- a/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js +++ b/packages/ethereum-contracts/ops-scripts/gov-upgrade-super-token-logic.js @@ -1,7 +1,6 @@ const async = require("async"); const fs = require("fs"); const SuperfluidSDK = require("@superfluid-finance/js-sdk"); -const {ZERO_ADDRESS} = require("./libs/common"); const MAX_REQUESTS = 20; @@ -10,6 +9,7 @@ const { extractWeb3Options, builtTruffleContractLoader, sendGovernanceAction, + ZERO_ADDRESS, } = require("./libs/common"); /** @@ -28,6 +28,10 @@ const { * @param {string} options.superTokenLogic override address for the logic to upgrade to instead of the canonical one * (overriding env: SUPER_TOKEN_LOGIC * + * extra env vars: + * - EXTRA_PAST_SUPER_TOKEN_LOGICS - comma-separated list of extra past canonical super token logics to be considered + * This is a workaround to the subgraph not containing all of them + * * Usage: npx truffle exec ops-scripts/gov-upgrade-super-token-logic.js : ALL | {SUPER_TOKEN_ADDRESS} ... */ module.exports = eval(`(${S.toString()})()`)(async function ( @@ -69,6 +73,7 @@ module.exports = eval(`(${S.toString()})()`)(async function ( additionalContracts: [ "Ownable", "IMultiSigWallet", + "ISafe", "SuperfluidGovernanceBase", "Resolver", "UUPSProxiable", @@ -81,17 +86,37 @@ module.exports = eval(`(${S.toString()})()`)(async function ( const canonicalSuperTokenLogic = await getCanonicalSuperTokenLogic(sf); console.log(`current canonical super token logic: ${canonicalSuperTokenLogic}`); + const newSuperTokenLogic = superTokenLogic !== undefined ? + superTokenLogic : + canonicalSuperTokenLogic; + + console.log("SuperToken logic to update to:", newSuperTokenLogic); + + const pastSuperTokenLogics = (await sf.subgraphQuery(`{ + superTokenLogicCreatedEvents { + name + tokenLogic + } + }`)).superTokenLogicCreatedEvents.map((i) => i.tokenLogic); + + const extraPastSuperTokenLogics = (process.env.EXTRA_PAST_SUPER_TOKEN_LOGICS || "").split(",") + .map((i) => i.trim()) + .filter((i) => i !== ""); + + // workaround for the subgraph query not returning all past canonical super token logics + if (canonicalSuperTokenLogic !== newSuperTokenLogic) { + pastSuperTokenLogics.push(canonicalSuperTokenLogic); + } + + console.log(`Extra past SuperToken logic contracts: ${JSON.stringify(extraPastSuperTokenLogics, null, 2)}`); + pastSuperTokenLogics.push(...extraPastSuperTokenLogics); + let tokensToBeUpgraded = (args.length === 1 && args[0] === "ALL") ? - await getTokensToBeUpgraded(sf, canonicalSuperTokenLogic, skipTokens) : + await getTokensToBeUpgraded(sf, newSuperTokenLogic, skipTokens, pastSuperTokenLogics) : Array.from(args); - console.log(`${tokensToBeUpgraded.length} tokens to be upgraded)`); - - const superTokenLogicAddr = superTokenLogic !== undefined ? - superTokenLogic : - canonicalSuperTokenLogic; + console.log(`${tokensToBeUpgraded.length} tokens to be upgraded`); - console.log("SuperToken logic to update to:", superTokenLogicAddr); if (tokensToBeUpgraded.length > 0) { console.log(`${tokensToBeUpgraded.length} tokens to be upgraded`); @@ -100,7 +125,11 @@ module.exports = eval(`(${S.toString()})()`)(async function ( console.log(`List of tokens to be upgraded written to ${outputFile}`); } - const batchSize = parseInt(process.env.BATCH_SIZE) || 1000; + // example gas use: 4.3M for 218 tokens in the batch + // https://polygonscan.com/tx/0xd449062303646e16bf1e5129588a3c3ec22724f29a4777c7af038cbb62b43dc9 + // we want to keep it below 8M gas + // Note that the gas use can fluctuate depending on the actions done in the contracts + const batchSize = parseInt(process.env.BATCH_SIZE) || 380; for (let offset = 0; offset < tokensToBeUpgraded.length; offset += batchSize) { const batch = tokensToBeUpgraded.slice(offset, offset + batchSize); console.log( @@ -109,28 +138,10 @@ module.exports = eval(`(${S.toString()})()`)(async function ( if (!dryRun) { // a non-canonical logic address can be provided in an extra array (batchUpdateSuperTokenLogic is overloaded) const govAction = superTokenLogic !== undefined ? - (gov) => gov.batchUpdateSuperTokenLogic(sf.host.address, batch, [...new Array(batch.length)].map(e => superTokenLogicAddr)) : + (gov) => gov.batchUpdateSuperTokenLogic(sf.host.address, batch, [...new Array(batch.length)].map(e => newSuperTokenLogic)) : (gov) => gov.batchUpdateSuperTokenLogic(sf.host.address, batch) await sendGovernanceAction(sf, govAction); - - // When first updating to the version adding native flow NFTs, this needs to be run twice - console.log("checking if 2nd run needed..."); - try { - const beaconST = await sf.contracts.ISuperToken.at(batch[0]); - const cofAddr = await beaconST.CONSTANT_OUTFLOW_NFT(); - if (cofAddr === ZERO_ADDRESS) { - console.log("...running upgrade again for NFT initialization..."); - // the first time it is to get the code to initialize the NFT proxies there - // the second time is to actually execute that code in updateCode - await sendGovernanceAction(sf, govAction); - } else { - console.log("...not needed"); - } - } catch (e) { - console.log(`failed to read constantOutflowNFT addr: ${e.toString()}`); - console.log("this is expected if running against a pre-1.6.0 deployment"); - } } } } @@ -151,10 +162,12 @@ async function getCanonicalSuperTokenLogic(sf) { // - not being a proxy or not having a logic address // - already pointing to the latest logic // - in the skip list (e.g. because not managed by SF gov) -async function getTokensToBeUpgraded(sf, canonicalSuperTokenLogic, skipList) { +async function getTokensToBeUpgraded(sf, newSuperTokenLogic, skipList, pastSuperTokenLogics) { const maxItems = parseInt(process.env.MAX_ITEMS) || 1000; const skipItems = parseInt(process.env.SKIP_ITEMS) || 0; + console.log(`Past SuperToken logic contracts we take into account: ${JSON.stringify(pastSuperTokenLogics, null, 2)}`); + const candidateTokens = (await sf.subgraphQuery(`{ tokens(where: {isSuperToken: true}, first: ${maxItems}, skip: ${skipItems}) { id @@ -175,7 +188,7 @@ async function getTokensToBeUpgraded(sf, canonicalSuperTokenLogic, skipList) { const symbol = await superToken.symbol(); if ((await superToken.getHost()) !== sf.host.address) { throw new Error( - "Super token is from a different universe" + `Super token has different host ${superToken.getHost()}` ); } const superTokenLogic = await ( @@ -184,26 +197,44 @@ async function getTokensToBeUpgraded(sf, canonicalSuperTokenLogic, skipList) { if (superTokenLogic === ZERO_ADDRESS) { console.log( - `SuperToken@${superToken.address} (${symbol}) is likely an uninitalized proxy` - ); - } else if (canonicalSuperTokenLogic !== superTokenLogic) { - console.log( - `SuperToken@${superToken.address} (${symbol}) logic needs upgrade from ${superTokenLogic}` + `[SKIP] SuperToken@${superToken.address} (${symbol}) is likely an uninitalized proxy` ); - return superTokenAddress; + } else if (newSuperTokenLogic !== superTokenLogic) { + if (!pastSuperTokenLogics.map(e => e.toLowerCase()).includes(superTokenLogic.toLowerCase())) { + // if the previous logic isn't in our list of past canonical supertoken logics, we skip it + // it likely means we don't have upgradability ownership + console.log( + `!!! [SKIP] SuperToken@${superToken.address} (${symbol}) alien previous logic ${superTokenLogic} - please manually check!` + ); + } else { + let adminAddr = ZERO_ADDRESS; + try { + adminAddr = await superToken.getAdmin(); + } catch(err) { + console.log("### failed to get admin addr:", err.message); + } + if (adminAddr !== ZERO_ADDRESS) { + console.warn( + `!!! [SKIP] SuperToken@${superToken.address} admin override set to ${adminAddr}` + ); + } else { + console.log( + `SuperToken@${superToken.address} (${symbol}) logic needs upgrade from ${superTokenLogic}` + ); + return superTokenAddress; + } + } } else { console.log( - `SuperToken@${superToken.address} (${symbol}) logic is up to date` + `[SKIP] SuperToken@${superToken.address} (${symbol}) logic is up to date` ); - return undefined; } } catch { console.warn( - `[WARN] SuperToken@${superToken.address} is smelly` + `??? [SKIP] SuperToken@${superToken.address} failed to be queried, probably not UUPSProxiable` ); - return undefined; } } )).filter((i) => typeof i !== "undefined") .filter((item) => !skipList.map(e => e.toLowerCase()).includes(item.toLowerCase())); -} \ No newline at end of file +} diff --git a/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js b/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js index e7975193d1..aca089f4e0 100644 --- a/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js +++ b/packages/ethereum-contracts/ops-scripts/info-print-contract-addresses.js @@ -130,7 +130,7 @@ module.exports = eval(`(${S.toString()})()`)(async function ( const superfluidPoolBeaconContract = await SuperfluidUpgradeableBeacon.at( await gdaContract.superfluidPoolBeacon() ); - output += `SUPERFLUID_POOL_DEPLOYER=${await gdaContract.SUPERFLUID_POOL_DEPLOYER_ADDRESS()}\n`; + output += `SUPERFLUID_POOL_DEPLOYER_LIBRARY=${await gdaContract.SUPERFLUID_POOL_DEPLOYER_ADDRESS()}\n`; output += `SUPERFLUID_POOL_BEACON=${superfluidPoolBeaconContract.address}\n`; output += `SUPERFLUID_POOL_LOGIC=${await superfluidPoolBeaconContract.implementation()}\n`; @@ -141,50 +141,30 @@ module.exports = eval(`(${S.toString()})()`)(async function ( const superTokenLogicContract = await SuperToken.at(superTokenLogicAddress); - const constantOutflowNFTProxyAddress = - await superTokenLogicContract.CONSTANT_OUTFLOW_NFT(); - - // FlowNFTs are optional, zero address means not deployed - if (constantOutflowNFTProxyAddress !== ZERO_ADDRESS) { - output += `CONSTANT_OUTFLOW_NFT_PROXY=${constantOutflowNFTProxyAddress}\n`; + // not yet deployed on all networks + // TODO: remove try after rollout + try { + const poolAdminNFTProxyAddress = + await superTokenLogicContract.POOL_ADMIN_NFT(); + output += `POOL_ADMIN_NFT_PROXY=${poolAdminNFTProxyAddress}\n`; - const constantOutflowNFTLogicAddress = await ( - await UUPSProxiable.at(constantOutflowNFTProxyAddress) + const poolAdminNFTLogicAddress = await ( + await UUPSProxiable.at(poolAdminNFTProxyAddress) ).getCodeAddress(); - output += `CONSTANT_OUTFLOW_NFT_LOGIC=${constantOutflowNFTLogicAddress}\n`; - } + output += `POOL_ADMIN_NFT_LOGIC=${poolAdminNFTLogicAddress}\n`; - const constantInflowNFTProxyAddress = - await superTokenLogicContract.CONSTANT_INFLOW_NFT(); + const poolMemberNFTProxyAddress = + await superTokenLogicContract.POOL_MEMBER_NFT(); + output += `POOL_MEMBER_NFT_PROXY=${poolMemberNFTProxyAddress}\n`; - // FlowNFTs are optional, zero address means not deployed - if (constantInflowNFTProxyAddress !== ZERO_ADDRESS) { - output += `CONSTANT_INFLOW_NFT_PROXY=${constantInflowNFTProxyAddress}\n`; - - const constantInflowNFTLogicAddress = await ( - await UUPSProxiable.at(constantInflowNFTProxyAddress) + const poolMemberNFTLogicAddress = await ( + await UUPSProxiable.at(poolMemberNFTProxyAddress) ).getCodeAddress(); - output += `CONSTANT_INFLOW_NFT_LOGIC=${constantInflowNFTLogicAddress}\n`; + output += `POOL_MEMBER_NFT_LOGIC=${poolMemberNFTLogicAddress}\n`; + } catch (e) { + console.warn("POOL_ADMIN_NFT or POOL_MEMBER_NFT probably not deployed yet"); } - const poolAdminNFTProxyAddress = - await superTokenLogicContract.POOL_ADMIN_NFT(); - output += `POOL_ADMIN_NFT_PROXY=${poolAdminNFTProxyAddress}\n`; - - const poolAdminNFTLogicAddress = await ( - await UUPSProxiable.at(poolAdminNFTProxyAddress) - ).getCodeAddress(); - output += `POOL_ADMIN_NFT_LOGIC=${poolAdminNFTLogicAddress}\n`; - - const poolMemberNFTProxyAddress = - await superTokenLogicContract.POOL_MEMBER_NFT(); - output += `POOL_MEMBER_NFT_PROXY=${poolMemberNFTProxyAddress}\n`; - - const poolMemberNFTLogicAddress = await ( - await UUPSProxiable.at(poolMemberNFTProxyAddress) - ).getCodeAddress(); - output += `POOL_MEMBER_NFT_LOGIC=${poolMemberNFTLogicAddress}\n`; - if (! skipTokens) { await Promise.all( config.tokenList.map(async (tokenName) => { @@ -206,6 +186,14 @@ module.exports = eval(`(${S.toString()})()`)(async function ( } } + // forwarders + if (config.metadata?.contractsV1?.cfaV1Forwarder) { + output += `CFAV1_FORWARDER=${config.metadata.contractsV1.cfaV1Forwarder}\n`; + } + if (config.metadata?.contractsV1?.gdaV1Forwarder) { + output += `GDAV1_FORWARDER=${config.metadata.contractsV1.gdaV1Forwarder}\n`; + } + // optional periphery contracts if (config.metadata?.contractsV1?.toga) { diff --git a/packages/ethereum-contracts/ops-scripts/libs/common.js b/packages/ethereum-contracts/ops-scripts/libs/common.js index 7cc7fdf92c..e43afb0628 100644 --- a/packages/ethereum-contracts/ops-scripts/libs/common.js +++ b/packages/ethereum-contracts/ops-scripts/libs/common.js @@ -2,6 +2,7 @@ const path = require("path"); const async = require("async"); const {promisify} = require("util"); const readline = require("readline"); +const truffleConfig = require("../../truffle-config"); const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; @@ -66,6 +67,40 @@ function detectTruffle() { return truffleDetected; } +// extracts the gas related config for the given network from the truffle config +// returns an object with the relevant fields set in the config (empty if none) +// +// NOTE: This implememtation only works for settings provided by a network specific config, +// not for settings provided by a wildcard (network_id: "*") config. +function getGasConfig(networkId) { + let gasConfig = {}; + + const networkConfig = Object.values(truffleConfig.networks) + .filter(e => e !== undefined) + .find(e => e.network_id === networkId); + + if (networkConfig !== undefined) { + // gas limit + if (networkConfig.gas !== undefined) { + gasConfig.gas = networkConfig.gas; + } + // legacy gas price + if (networkConfig.gasPrice !== undefined) { + gasConfig.gasPrice = networkConfig.gasPrice; + } + + // EIP-1559 gas price + if (networkConfig.maxPriorityFeePerGas !== undefined) { + gasConfig.maxPriorityFeePerGas = networkConfig.maxPriorityFeePerGas; + } + if (networkConfig.maxFeePerGas !== undefined) { + gasConfig.maxFeePerGas = networkConfig.maxFeePerGas; + } + } + + return gasConfig; +} + /**************************************************************** * Contracts upgradability utilities ****************************************************************/ @@ -165,7 +200,6 @@ async function setResolver(sf, key, value) { const resolverAdmin = nrAdmins > 0 ? await ac.getRoleMember(ADMIN_ROLE, nrAdmins - 1): await (async () => { - // This is for eth-goerli (and maybe other networks too) console.log(`!!! resolver.getRoleMemberCount() returned 0. Trying account[0] as resolver admin.`); return (await web3.eth.getAccounts())[0]; })(); @@ -189,9 +223,9 @@ async function setResolver(sf, key, value) { } case "OWNABLE": { console.log("Resolver Admin type: Direct Ownership (default)"); - console.log("Executing admin action..."); + console.log("Executing resolver action..."); await resolver.set(key, value); - console.log("Admin action executed."); + console.log("Resolver action executed."); break; } case "SAFE": { @@ -221,7 +255,7 @@ async function setResolver(sf, key, value) { * @param actionFn function that gets governance methods as argument * * @note if the caller intends to invoke methods only available in SuperfluidGovernanceII - * (e.g. UUPSProxiable or Ownable), it must provide the SuperfluidGovernanceII artifact + * (e.g. UUPSProxiable), it must provide the SuperfluidGovernanceII artifact * in the sf object. */ async function sendGovernanceAction(sf, actionFn) { @@ -283,8 +317,9 @@ async function sendGovernanceAction(sf, actionFn) { // Throws when encountering an unknown contract. // TODO: add support for detecting SAFE async function autodetectAdminType(sf, account) { + console.debug("Auto detecting admin type of", account); if (!await hasCode(web3, account)) { - console.log("account has no code"); + console.debug("Account has no code, assuming ownable contract."); return "OWNABLE"; } @@ -293,7 +328,7 @@ async function autodetectAdminType(sf, account) { await multis.required(); return "MULTISIG"; } catch(e) { - console.log("not detecting legacy multisig fingerprint"); + console.debug("Not detecting legacy multisig fingerprint."); } try { @@ -302,14 +337,14 @@ async function autodetectAdminType(sf, account) { console.log("detected Safe version", safeVersion); return "SAFE"; } catch(e) { - console.log("not detecting Safe fingerprint"); + console.debug("Not detecting Safe fingerprint."); } throw new Error(`Unknown admin contract type of account ${account}`); } // returns the Safe Tx Service URL or throws if none available -// source: https://github.com/safe-global/safe-docs/blob/main/safe-core-api/available-services.md +// source: https://github.com/safe-global/safe-docs/blob/main/pages/api-supported-networks.md?plain=1 function getSafeTxServiceUrl(chainId) { const safeChainNames = { // mainnets @@ -320,10 +355,10 @@ function getSafeTxServiceUrl(chainId) { 137: "polygon", 8453: "base", 42161: "arbitrum", + 42220: "celo", 43114: "avalanche", // testnets - 5: "goerli", - 84531: "base-testnet" + 11155111: "sepolia" }; if (safeChainNames[chainId] === undefined) { throw new Error(`no Safe tx service url known for chainId ${chainId}`); @@ -516,6 +551,7 @@ module.exports = { extractWeb3Options, builtTruffleContractLoader, detectTruffle, + getGasConfig, hasCode, codeChanged, diff --git a/packages/ethereum-contracts/ops-scripts/libs/getConfig.js b/packages/ethereum-contracts/ops-scripts/libs/getConfig.js index 98bb0cb0da..8aef920ee3 100644 --- a/packages/ethereum-contracts/ops-scripts/libs/getConfig.js +++ b/packages/ethereum-contracts/ops-scripts/libs/getConfig.js @@ -22,10 +22,42 @@ module.exports = function getConfig(chainId) { trustedForwarders: ["0x3075b4dc7085C48A14A5A39BBa68F58B19545971"], }, + // persistent chains + + // eth-mainnet + 1: { + // we keep it low because mainnet is expensive and we don't want solvency risks + appCallbackGasLimit: 3000000, + }, + + // xdai-mainnet + 100: { + // half of the block gas limit of 17M + appCallbackGasLimit: 8500000, + }, + + // avalanche-fuji + 43113: { + // half of the block gas limit of 15M + appCallbackGasLimit: 7500000, + }, + // avalanche-c + 43114: { + // half of the block gas limit of 15M + appCallbackGasLimit: 7500000, + }, + // Celo Mainnet 42220: { gov_enableAppWhiteListing: false, - } + }, + + // scroll-mainnet + 534352: { + // we keep it low in order to minimize the chance of "proof overflows" + // see https://docs.scroll.io/en/technology/sequencer/execution-node/#circuit-capacity-checker + appCallbackGasLimit: 3000000, + }, }; const sfNw = sfMetadata.getNetworkByChainId(chainId); @@ -51,6 +83,7 @@ module.exports = function getConfig(chainId) { metadata: sfNw, resolverAddress: global?.process.env.RESOLVER_ADDRESS || sfNw?.contractsV1?.resolver, trustedForwarders: sfNw?.trustedForwarders, + appCallbackGasLimit: 15000000, ...EXTRA_CONFIG[chainId] }; }; diff --git a/packages/ethereum-contracts/ops-scripts/validate-deployment.ts b/packages/ethereum-contracts/ops-scripts/validate-deployment.ts index 0495f223b7..907c083c27 100644 --- a/packages/ethereum-contracts/ops-scripts/validate-deployment.ts +++ b/packages/ethereum-contracts/ops-scripts/validate-deployment.ts @@ -7,8 +7,6 @@ const gdaAgreementType = ethers.utils.solidityKeccak256(["string"], ["org.superf const superTokenFactoryUuid = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.SuperTokenFactory.implementation"]); const superTokenUUID = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.SuperToken.implementation"]); -const constantOutflowNftUuid = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.ConstantOutflowNFT.implementation"]); -const constantInflowNftUuid = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.ConstantInflowNFT.implementation"]); const superfluidPoolUUID = ethers.utils.solidityKeccak256(["string"], ["org.superfluid-finance.contracts.SuperfluidPool.implementation"]); function assertLog(condition: boolean, message: string) { @@ -45,7 +43,7 @@ async function main() { console.log("SuperTokenFactory Logic Address:", superTokenFactoryLogicAddress, "\n"); assertLog(superTokenFactoryLogicAddress === await superTokenFactoryContract.getCodeAddress(), "Canonical Factory Logic Address matches Factory Proxy Logic Address"); - + const superTokenLogicAddress = await superTokenFactoryContract.getSuperTokenLogic(); console.log("SuperToken Logic Address:", superTokenLogicAddress, "\n"); @@ -53,37 +51,6 @@ async function main() { const superTokenLiveUUID = await superTokenLogicContract.proxiableUUID(); assertLog(superTokenUUID === superTokenLiveUUID, "SuperTokenFactory Deployed UUID matches live UUID"); - // validate flow NFTs - const constantOutflowNFTCanonicalLogic = await superTokenFactoryContract.CONSTANT_OUTFLOW_NFT_LOGIC(); - console.log("ConstantOutflowNFT Canonical Logic (on Factory):", constantOutflowNFTCanonicalLogic); - const constantInflowNFTCanonicalLogic = await superTokenFactoryContract.CONSTANT_INFLOW_NFT_LOGIC(); - console.log("ConstantInflowNFT Canonical Logic (on Factory):", constantInflowNFTCanonicalLogic, "\n"); - - const constantOutflowNFProxy = await superTokenLogicContract.CONSTANT_OUTFLOW_NFT(); - const cofNFTContract = await ethers.getContractAt("ConstantOutflowNFT", constantOutflowNFProxy); - const cofNFTContractLiveUUID = await cofNFTContract.proxiableUUID(); - assertLog(constantOutflowNftUuid === cofNFTContractLiveUUID, "ConstantOutflowNFT Deployed UUID matches live UUID"); - console.log("ConstantOutflowNFT:", constantOutflowNFProxy); - - const outflowProxyLogic = await cofNFTContract.getCodeAddress(); - console.log("ConstantOutflow NFT Logic (on Proxy):", outflowProxyLogic, "\n"); - assertLog(await cofNFTContract.baseURI() === "https://nft.superfluid.finance/cfa/v2/getmeta", "ConstantOutflowNFT baseURI is equal to https://nft.superfluid.finance/cfa/v2/getmeta"); - - const constantInflowNFProxy = await superTokenLogicContract.CONSTANT_INFLOW_NFT(); - const cifNFTContract = await ethers.getContractAt("ConstantInflowNFT", constantInflowNFProxy); - const cifNFTContractLiveUUID = await cifNFTContract.proxiableUUID(); - assertLog(constantInflowNftUuid === cifNFTContractLiveUUID, "ConstantInflowNFT Deployed UUID matches live UUID"); - console.log("ConstantInflowNFT:", constantInflowNFProxy); - assertLog(await cifNFTContract.baseURI() === "https://nft.superfluid.finance/cfa/v2/getmeta", "ConstantInflowNFT baseURI is equal to https://nft.superfluid.finance/cfa/v2/getmeta"); - - const inflowProxyLogic = await cifNFTContract.getCodeAddress(); - console.log("ConstantInflow NFT Logic (on Proxy):", inflowProxyLogic); - - assertLog(await cofNFTContract.proxiableUUID() !== await cifNFTContract.proxiableUUID(), "NFT proxies have different implementation."); - - assertLog(outflowProxyLogic === constantOutflowNFTCanonicalLogic, "Outflow proxy logic is equal to canonical outflow logic"); - assertLog(inflowProxyLogic === constantInflowNFTCanonicalLogic, "Inflow proxy logic is equal to canonical inflow logic"); - // validate pool NFTs const poolAdminNFTCanonicalLogic = await superTokenFactoryContract.POOL_ADMIN_NFT_LOGIC(); console.log("PoolAdminNFT Canonical Logic (on Factory):", poolAdminNFTCanonicalLogic); @@ -101,7 +68,7 @@ async function main() { console.log("PoolMemberNFT:", poolMemberNFProxy); const pmNFTContract = await ethers.getContractAt("PoolMemberNFT", poolMemberNFProxy); assertLog(await pmNFTContract.baseURI() === "https://nft.superfluid.finance/pool/v2/getmeta", "PoolMemberNFT baseURI is equal to https://nft.superfluid.finance/pool/v2/getmeta"); - + const poolMemberProxyLogic = await pmNFTContract.getCodeAddress(); console.log("ConstantInflow NFT Logic (on Proxy):", poolMemberProxyLogic); @@ -129,11 +96,11 @@ async function main() { // GDA specific validation const superfluidPoolBeaconAddress = await gdaContract.superfluidPoolBeacon(); assertLog(superfluidPoolBeaconAddress !== ethers.constants.AddressZero, "SuperfluidPoolBeaconAddress is not zero address") - + const beaconContract = await ethers.getContractAt("IBeacon", superfluidPoolBeaconAddress); const sfPoolBeaconImplementationAddress = await beaconContract.implementation(); assertLog(sfPoolBeaconImplementationAddress !== ethers.constants.AddressZero, "SFPool beacon implementation is not zero address"); - + const superfluidPoolContract = await ethers.getContractAt("SuperfluidPool", sfPoolBeaconImplementationAddress); const sfPoolLiveUUID = await superfluidPoolContract.proxiableUUID(); diff --git a/packages/ethereum-contracts/package.json b/packages/ethereum-contracts/package.json index 4e771938da..f7f72e77d7 100644 --- a/packages/ethereum-contracts/package.json +++ b/packages/ethereum-contracts/package.json @@ -1,31 +1,62 @@ { "name": "@superfluid-finance/ethereum-contracts", - "version": "1.9.0", "description": " Ethereum contracts implementation for the Superfluid Protocol", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts#readme", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/ethereum-contracts" + "version": "1.11.0", + "dependencies": { + "@decentral.ee/web3-helpers": "0.5.3", + "@nomiclabs/hardhat-ethers": "2.2.3", + "@openzeppelin/contracts": "4.9.6", + "@truffle/contract": "4.6.31", + "ethereumjs-tx": "2.1.2", + "ethereumjs-util": "7.1.5", + "hardhat": "2.22.9" + }, + "devDependencies": { + "@d10r/truffle-plugin-verify": "^0.6.10", + "@nomiclabs/hardhat-truffle5": "^2.0.7", + "@safe-global/safe-core-sdk": "^3.3.5", + "@safe-global/safe-service-client": "^2.0.3", + "@safe-global/safe-web3-lib": "^1.9.4", + "@superfluid-finance/js-sdk": "^0.6.3", + "@superfluid-finance/metadata": "^1.5.0", + "async": "^3.2.6", + "csv-writer": "^1.6.0", + "ethers": "^5.7.2", + "ganache-time-traveler": "^1.0.16", + "mochawesome": "^7.1.3", + "readline": "^1.3.0", + "solidity-coverage": "^0.8.12", + "solidity-docgen": "^0.6.0-beta.36", + "stack-trace": "0.0.10", + "truffle-flattener": "^1.6.0" }, - "license": "AGPL-3.0-or-later OR MIT", "files": [ "/contracts/**/*", "!/contracts/mocks/*", "/build/truffle/*.json", - "/build/hardhat/**/*", "!/build/truffle/*Mock*.json", "!/build/truffle/*Tester*.json", "!/build/truffle/*Anvil.json", "!/build/truffle/*Properties.json", + "/build/hardhat/**/*", + "!/build/hardhat/contracts/mocks/**/*", "/build/contracts-sizes.txt", "/build/bundled-abi.js", "/build/bundled-abi.json", "dev-scripts/**/*", "utils/**/*" ], + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/ethereum-contracts#readme", + "license": "AGPL-3.0-or-later OR MIT", "main": "./dev-scripts/index.js", - "typings": "./types/index.d.ts", + "peerDependencies": { + "ethers": "^5.7.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/ethereum-contracts" + }, "scripts": { "dev": "yarn dev-foundry", "dev-foundry": "nodemon -e sol -x yarn run-foundry test --hardhat", @@ -43,7 +74,7 @@ "build:post-contracts": "run-p -l build:post-contracts:*", "build:post-contracts:abi-bundle": "tasks/build-bundled-abi.sh", "build:post-contracts:dev-scripts-typings": "rm -rf dev-scripts/*.d.ts dev-scripts/*.d.ts.map; tsc -p tsconfig.scripts.json", - "build:post-contracts:contracts-size": "forge build --sizes > build/contracts-sizes.txt > /dev/null&", + "build:post-contracts:contracts-size": "forge build --sizes > build/contracts-sizes.txt", "verify-framework": "tasks/etherscan-verify-framework.sh", "testenv:start": "test/testenv-ctl.sh start", "testenv:stop": "test/testenv-ctl.sh stop", @@ -59,7 +90,7 @@ "posttest": "yarn testenv:stop", "test-coverage": "run-s test-coverage:*", "test-coverage:hardhat": "yarn run-hardhat coverage --testfiles testsuites/all-contracts.js --solcoverjs ./.solcover.js", - "test-coverage:foundry": "yarn run-foundry coverage --hardhat --report lcov", + "test-coverage:foundry": "yarn run-foundry coverage --gas-limit 999999999999 --report lcov", "test-slither": "tasks/test-slither.sh", "lint": "run-s lint:*", "lint:sol": "solhint -w 0 `find contracts -name *.sol` && echo '✔ Your .sol files look good.'", @@ -70,41 +101,9 @@ "fix": "run-s fix:*", "fix:eslint": "yarn lint-ts --fix", "lint:check-no-focused-tests": "grep -FR .only test || { echo 'No test is focused.';exit 0; } && { echo '✘ You have focused tests.'; exit 1; }", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "check-updates": "ncu --target minor --dep prod,dev", "cloc": "tasks/cloc.sh", "docgen": "rm -rf docs/api; hardhat docgen" }, - "dependencies": { - "@decentral.ee/web3-helpers": "0.5.3", - "@nomiclabs/hardhat-ethers": "^2.2.3", - "@openzeppelin/contracts": "4.9.3", - "@truffle/contract": "4.6.29", - "ethereumjs-tx": "2.1.2", - "ethereumjs-util": "7.1.5", - "hardhat": "^2.19.4" - }, - "devDependencies": { - "@nomiclabs/hardhat-truffle5": "^2.0.7", - "@safe-global/safe-core-sdk": "^3.3.5", - "@safe-global/safe-service-client": "^2.0.3", - "@safe-global/safe-web3-lib": "^1.9.4", - "@superfluid-finance/js-sdk": "0.6.3", - "@superfluid-finance/metadata": "1.1.23", - "async": "^3.2.5", - "csv-writer": "^1.6.0", - "ethers": "^5.7.2", - "ganache-time-traveler": "1.0.16", - "mochawesome": "^7.1.3", - "readline": "1.3.0", - "solidity-coverage": "0.8.5", - "solidity-docgen": "^0.6.0-beta.36", - "stack-trace": "0.0.10", - "truffle-flattener": "^1.6.0", - "truffle-plugin-verify": "0.6.5" - }, - "peerDependencies": { - "ethers": "^5.7.2" - } + "typings": "./types/index.d.ts" } diff --git a/packages/ethereum-contracts/tasks/build-bundled-abi.sh b/packages/ethereum-contracts/tasks/build-bundled-abi.sh index 6368476c4b..f65d3d72e0 100755 --- a/packages/ethereum-contracts/tasks/build-bundled-abi.sh +++ b/packages/ethereum-contracts/tasks/build-bundled-abi.sh @@ -5,9 +5,7 @@ set -e cd "$(dirname "$0")/.." || exit 1 -JQ="npx --package=node-jq -- jq" - -CONTRACTS=( $($JQ -r .[] tasks/bundled-abi-contracts-list.json) ) || exit 2 +CONTRACTS=( $(jq -r .[] tasks/bundled-abi-contracts-list.json) ) || exit 2 { echo "if (typeof module === \"undefined\") module = {};" @@ -19,7 +17,7 @@ CONTRACTS=( $($JQ -r .[] tasks/bundled-abi-contracts-list.json) ) || exit 2 echo "${CONTRACTS[@]}" | xargs -n1 -P4 bash -c " { echo -n \" \$1: \" - $JQ \".abi\" build/truffle/\"\$1\".json || exit 3 + jq \".abi\" build/truffle/\"\$1\".json || exit 3 echo ',' } > build/bundled-abi.\$1.frag " -- diff --git a/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json b/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json index b531b112c8..dcb99646a4 100644 --- a/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json +++ b/packages/ethereum-contracts/tasks/bundled-abi-contracts-list.json @@ -10,9 +10,6 @@ "ISuperToken", "SuperToken", "ISuperTokenFactory", "SuperTokenFactory", "ISETH", "SETHProxy", - "IFlowNFTBase", "FlowNFTBase", - "IConstantInflowNFT", "ConstantInflowNFT", - "IConstantOutflowNFT", "ConstantOutflowNFT", "IPoolAdminNFT", "PoolAdminNFT", "IPoolMemberNFT", "PoolMemberNFT", "ISuperAgreement", @@ -23,5 +20,6 @@ "TestToken", "IPureSuperToken", "IResolver", "Resolver", "TestResolver", - "SuperfluidLoader" + "SuperfluidLoader", + "IUserDefinedMacro" ] diff --git a/packages/ethereum-contracts/tasks/coverage-cleanup.sh b/packages/ethereum-contracts/tasks/coverage-cleanup.sh index 0ff548eac5..c7a5d56394 100755 --- a/packages/ethereum-contracts/tasks/coverage-cleanup.sh +++ b/packages/ethereum-contracts/tasks/coverage-cleanup.sh @@ -4,13 +4,15 @@ set -ex cd "$(dirname "$0")"/.. +LCOV="lcov --ignore-errors inconsistent" + # extract coverage for Superfluid contracts from forge coverage -lcov -e ../../lcov.info \ +$LCOV -e ../../lcov.info \ "packages/ethereum-contracts/contracts/*" \ -o lcov.info # remove contracts whose coverage we don't care about (see .solcover.js) -lcov -r lcov.info \ +$LCOV -r lcov.info \ "packages/ethereum-contracts/contracts/mocks/*" \ "packages/ethereum-contracts/contracts/apps/*Base*" \ "packages/ethereum-contracts/contracts/utils/*Test*" \ @@ -19,6 +21,6 @@ lcov -r lcov.info \ -o lcov.info # merge hardhat and forge coverage files -lcov -a lcov.info \ +$LCOV -a lcov.info \ -a coverage/lcov.info \ -o coverage/lcov.info diff --git a/packages/ethereum-contracts/tasks/deploy-cfa-forwarder.sh b/packages/ethereum-contracts/tasks/deploy-cfa-forwarder.sh index 0e6151c198..7ca80a6e0a 100755 --- a/packages/ethereum-contracts/tasks/deploy-cfa-forwarder.sh +++ b/packages/ethereum-contracts/tasks/deploy-cfa-forwarder.sh @@ -4,9 +4,6 @@ set -eu # Usage: # tasks/deploy-cfa-forwarder.sh # -# Example: -# tasks/deploy-cfa-forwarder.sh optimism-goerli -# # The invoking account needs to be (co-)owner of the resolver and governance # # important ENV vars: diff --git a/packages/ethereum-contracts/tasks/deploy-gda-forwarder.sh b/packages/ethereum-contracts/tasks/deploy-gda-forwarder.sh index 08da123704..3176ef396f 100755 --- a/packages/ethereum-contracts/tasks/deploy-gda-forwarder.sh +++ b/packages/ethereum-contracts/tasks/deploy-gda-forwarder.sh @@ -4,9 +4,6 @@ set -eu # Usage: # tasks/deploy-gda-forwarder.sh # -# Example: -# tasks/deploy-gda-forwarder.sh optimism-goerli -# # The invoking account needs to be (co-)owner of the resolver and governance # # important ENV vars: diff --git a/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh b/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh new file mode 100755 index 0000000000..29065255fc --- /dev/null +++ b/packages/ethereum-contracts/tasks/deploy-macro-forwarder.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +set -eu + +# Usage: +# tasks/deploy-macro-forwarder.sh +# +# The invoking account needs to be (co-)owner of the resolver and governance +# +# important ENV vars: +# RELEASE_VERSION, MACROFWD_DEPLOYER_PK +# +# You can use the npm package vanity-eth to get a deployer account for a given contract address: +# Example use: npx vanityeth -i fd01 --contract +# +# For optimism the gas estimation doesn't work, requires setting EST_TX_COST +# (the value auto-detected for arbitrum should work). +# +# On some networks you may need to use override ENV vars for the deployment to succeed + +# shellcheck source=/dev/null +source .env + +set -x + +network=$1 +expectedContractAddr="0xfD01285b9435bc45C243E5e7F978E288B2912de6" +deployerPk=$MACROFWD_DEPLOYER_PK + +tmpfile="/tmp/$(basename "$0").addr" + +# deploy +DETERMINISTIC_DEPLOYER_PK=$deployerPk npx truffle exec --network "$network" ops-scripts/deploy-deterministically.js : MacroForwarder | tee "$tmpfile" +contractAddr=$(tail -n 1 "$tmpfile") +rm "$tmpfile" + +echo "deployed to $contractAddr" +if [[ $contractAddr != "$expectedContractAddr" ]]; then + echo "oh no!" + exit +fi + +# verify (give it a few seconds to pick up the code) +sleep 5 +npx truffle run --network "$network" verify MacroForwarder@"$contractAddr" + +# set resolver +ALLOW_UPDATE=1 npx truffle exec --network "$network" ops-scripts/resolver-set-key-value.js : MacroForwarder "$contractAddr" + +# create gov action +npx truffle exec --network "$network" ops-scripts/gov-set-trusted-forwarder.js : 0x0000000000000000000000000000000000000000 "$contractAddr" 1 + +# TODO: on mainnets, the resolver entry should be set only after the gov action was signed & executed diff --git a/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh b/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh index 880d40dcdf..63bfcf9cdb 100755 --- a/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh +++ b/packages/ethereum-contracts/tasks/etherscan-verify-framework.sh @@ -7,29 +7,34 @@ # if proxy addresses are provided, verification against up-to-date logic contracts will only succeed # once they point to those (after gov upgrade execution) -set -x - CONTRACTS_DIR=build/truffle TRUFFLE_NETWORK=$1 ADDRESSES_VARS=$2 -shift 2 -EXTRA_ARGS="$*" + +shift 1 if [ -z "$ADDRESSES_VARS" ]; then + EXTRA_ARGS="$*" + echo "EXTRA_ARGS: $EXTRA_ARGS" echo "no addresses provided, fetching myself..." - ADDRESSES_VARS="/tmp/$TRUFFLE_NETWORK.addrs" + ADDRESSES_VARS="/tmp/superfluid.$TRUFFLE_NETWORK.addrs" npx truffle exec --network "$TRUFFLE_NETWORK" ops-scripts/info-print-contract-addresses.js : "$ADDRESSES_VARS" || exit 1 +else + shift 1 fi +EXTRA_ARGS="$*" + # shellcheck disable=SC1090 source "$ADDRESSES_VARS" FAILED_VERIFICATIONS=() function try_verify() { echo # newline for better readability - npx truffle run --network "$TRUFFLE_NETWORK" verify "$@" ${EXTRA_ARGS:+$EXTRA_ARGS} || - FAILED_VERIFICATIONS[${#FAILED_VERIFICATIONS[@]}]="$*" + cmd="npx truffle run --network $TRUFFLE_NETWORK verify $* ${EXTRA_ARGS:+$EXTRA_ARGS}" + echo "> $cmd" + $cmd || FAILED_VERIFICATIONS[${#FAILED_VERIFICATIONS[@]}]="$*" # NOTE: append using length so that having spaces in the element is not a problem # TODO: version 0.6.5 of the plugin seems to not reliably return non-zero if verification fails } @@ -39,6 +44,8 @@ function link_library() { local library_name="$2" local library_address="$3" + echo "linking $contract_name to $library_name at $library_address" + cp -f "$CONTRACTS_DIR/${contract_name}.json" "$CONTRACTS_DIR/${contract_name}.json.bak" jq -s '.[0] * .[1]' \ "$CONTRACTS_DIR/${contract_name}.json.bak" \ @@ -60,12 +67,8 @@ if [ -n "$RESOLVER" ]; then try_verify Resolver@"${RESOLVER}" fi -if [ -n "$POOL_ADMIN_NFT_LOGIC" ]; then - try_verify PoolAdminNFT@"${POOL_ADMIN_NFT_LOGIC}" -fi - -if [ -n "$POOL_MEMBER_NFT_LOGIC" ]; then - try_verify PoolMemberNFT@"${POOL_MEMBER_NFT_LOGIC}" +if [ -n "$DMZ_FORWARDER" ]; then + try_verify DMZForwarder@"${DMZ_FORWARDER}" fi if [ -n "$SUPERFLUID_HOST_LOGIC" ]; then @@ -78,7 +81,7 @@ if [ -n "$SUPERFLUID_HOST_PROXY" ]; then fi if [ -n "$SUPERFLUID_GOVERNANCE" ]; then - if [ -n "$IS_TESTNET" ];then + if [ -n "$IS_TESTNET" ]; then try_verify TestGovernance@"${SUPERFLUID_GOVERNANCE}" else if [ -n "$SUPERFLUID_GOVERNANCE_LOGIC" ]; then @@ -99,22 +102,6 @@ if [ -n "$SUPER_TOKEN_FACTORY_PROXY" ]; then try_verify SuperTokenFactory@"${SUPER_TOKEN_FACTORY_PROXY}" --custom-proxy UUPSProxy fi -if [ -n "$CONSTANT_OUTFLOW_NFT_LOGIC" ]; then - try_verify ConstantOutflowNFT@"${CONSTANT_OUTFLOW_NFT_LOGIC}" -fi - -if [ -n "$CONSTANT_INFLOW_NFT_LOGIC" ]; then - try_verify ConstantInflowNFT@"${CONSTANT_INFLOW_NFT_LOGIC}" -fi - -if [ -n "$CONSTANT_OUTFLOW_NFT_PROXY" ]; then - try_verify ConstantOutflowNFT@"${CONSTANT_OUTFLOW_NFT_PROXY}" --custom-proxy UUPSProxy -fi - -if [ -n "$CONSTANT_INFLOW_NFT_PROXY" ]; then - try_verify ConstantInflowNFT@"${CONSTANT_INFLOW_NFT_PROXY}" --custom-proxy UUPSProxy -fi - if [ -n "$POOL_ADMIN_NFT_PROXY" ]; then try_verify PoolAdminNFT@"${POOL_ADMIN_NFT_PROXY}" --custom-proxy UUPSProxy fi @@ -123,6 +110,14 @@ if [ -n "$POOL_MEMBER_NFT_PROXY" ]; then try_verify PoolMemberNFT@"${POOL_MEMBER_NFT_PROXY}" --custom-proxy UUPSProxy fi +if [ -n "$POOL_ADMIN_NFT_LOGIC" ]; then + try_verify PoolAdminNFT@"${POOL_ADMIN_NFT_LOGIC}" +fi + +if [ -n "$POOL_MEMBER_NFT_LOGIC" ]; then + try_verify PoolMemberNFT@"${POOL_MEMBER_NFT_LOGIC}" +fi + if [ -n "$SUPER_TOKEN_LOGIC" ]; then try_verify SuperToken@"${SUPER_TOKEN_LOGIC}" fi @@ -145,13 +140,19 @@ fi if [ -n "$IDA_PROXY" ]; then try_verify InstantDistributionAgreementV1@"${IDA_PROXY}" --custom-proxy UUPSProxy fi +mv -f $CONTRACTS_DIR/InstantDistributionAgreementV1.json.bak $CONTRACTS_DIR/InstantDistributionAgreementV1.json -if [ -n "$SUPERFLUID_POOL_DEPLOYER" ]; then - try_verify SuperfluidPoolDeployerLibrary@"${SUPERFLUID_POOL_DEPLOYER}" +if [ -n "$SUPERFLUID_POOL_DEPLOYER_LIBRARY" ]; then + try_verify SuperfluidPoolDeployerLibrary@"${SUPERFLUID_POOL_DEPLOYER_LIBRARY}" fi -link_library "GeneralDistributionAgreementV1" "SlotsBitmapLibrary" "${GDA_SLOTS_BITMAP_LIBRARY}" -link_library "GeneralDistributionAgreementV1" "SuperfluidPoolDeployerLibrary" "${SUPERFLUID_POOL_DEPLOYER}" +if [ -n "$DUMMY_BEACON_PROXY" ]; then + try_verify BeaconProxy@"${DUMMY_BEACON_PROXY}" +fi + +# this will fail with 'Library address is not prefixed with "0x"' if a library address is not set +link_library "GeneralDistributionAgreementV1" "SlotsBitmapLibrary" "${SLOTS_BITMAP_LIBRARY}" +link_library "GeneralDistributionAgreementV1" "SuperfluidPoolDeployerLibrary" "${SUPERFLUID_POOL_DEPLOYER_LIBRARY}" if [ -n "$GDA_LOGIC" ]; then try_verify GeneralDistributionAgreementV1@"${GDA_LOGIC}" fi @@ -159,6 +160,7 @@ fi if [ -n "$GDA_PROXY" ]; then try_verify GeneralDistributionAgreementV1@"${GDA_PROXY}" --custom-proxy UUPSProxy fi +mv -f $CONTRACTS_DIR/GeneralDistributionAgreementV1.json.bak $CONTRACTS_DIR/GeneralDistributionAgreementV1.json if [ -n "$SUPERFLUID_POOL_BEACON" ]; then try_verify SuperfluidUpgradeableBeacon@"${SUPERFLUID_POOL_BEACON}" @@ -168,7 +170,7 @@ if [ -n "$SUPERFLUID_POOL_LOGIC" ]; then try_verify SuperfluidPool@"${SUPERFLUID_POOL_LOGIC}" fi -mv -f $CONTRACTS_DIR/InstantDistributionAgreementV1.json.bak $CONTRACTS_DIR/InstantDistributionAgreementV1.json +# super tokens if [ -n "$SUPER_TOKEN_NATIVE_COIN" ];then # special case: verify only the proxy @@ -176,8 +178,24 @@ if [ -n "$SUPER_TOKEN_NATIVE_COIN" ];then try_verify SuperToken@"${SUPER_TOKEN_NATIVE_COIN}" --custom-proxy SETHProxy fi +# testnet tokens +for var in $(compgen -v); do + if [[ $var == NON_SUPER_TOKEN_* ]]; then + addr=${!var} + try_verify TestToken@"$addr" + fi +done + # optional peripery contracts +if [ -n "$CFAV1_FORWARDER" ];then + try_verify CFAv1Forwarder@"${CFAV1_FORWARDER}" +fi + +if [ -n "$GDAV1_FORWARDER" ];then + try_verify GDAv1Forwarder@"${GDAV1_FORWARDER}" +fi + if [ -n "$TOGA" ];then try_verify TOGA@"${TOGA}" fi diff --git a/packages/ethereum-contracts/tasks/list-all-linked-libraries.sh b/packages/ethereum-contracts/tasks/list-all-linked-libraries.sh index 8edf18f0b2..0f55a05ba9 100755 --- a/packages/ethereum-contracts/tasks/list-all-linked-libraries.sh +++ b/packages/ethereum-contracts/tasks/list-all-linked-libraries.sh @@ -4,6 +4,6 @@ list_linked_libraries() { jq -r '.bytecode.linkReferences | map(keys) | .[][]' } -find build/foundry/out/ -name '*.json' | while read -r i;do +find build/foundry/ -name '*.json' | while read -r i;do cat < "$i" | list_linked_libraries done | sort | uniq diff --git a/packages/ethereum-contracts/test/TestEnvironment.ts b/packages/ethereum-contracts/test/TestEnvironment.ts index 1985ef56c3..2474e042eb 100644 --- a/packages/ethereum-contracts/test/TestEnvironment.ts +++ b/packages/ethereum-contracts/test/TestEnvironment.ts @@ -7,20 +7,12 @@ import _ from "lodash"; import Web3 from "web3"; import { - ConstantInflowNFT, - ConstantInflowNFT__factory, - ConstantOutflowNFT, - ConstantOutflowNFT__factory, ISuperToken, ISuperToken__factory, - PoolAdminNFT, PoolAdminNFT__factory, - PoolMemberNFT, PoolMemberNFT__factory, SuperTokenMock, TestToken, - UUPSProxiableMock__factory, - UUPSProxy, } from "../typechain-types"; import {VerifyOptions} from "./contracts/agreements/Agreement.types"; @@ -585,15 +577,6 @@ export default class TestEnvironment { } deployNFTContracts = async () => { - let constantOutflowNFT; - let constantInflowNFT; - let cofNFTLogicAddress; - let cifNFTLogicAddress; - let paNFTLogicAddress; - let poolAdminNFT; - let pmNFTLogicAddress; - let poolMemberNFT; - const superTokenFactoryLogicAddress = await this.contracts.superfluid.getSuperTokenFactoryLogic(); const superTokenFactory = await ethers.getContractAt( @@ -606,125 +589,23 @@ export default class TestEnvironment { "SuperToken", superTokenLogicAddress ); - const constantOutflowNFTProxyAddress = - await superTokenLogic.CONSTANT_OUTFLOW_NFT(); - const constantInflowNFTProxyAddress = - await superTokenLogic.CONSTANT_INFLOW_NFT(); const poolAdminNFTProxyAddress = await superTokenLogic.POOL_ADMIN_NFT(); const poolMemberNFTProxyAddress = await superTokenLogic.POOL_MEMBER_NFT(); - if ( - constantOutflowNFTProxyAddress === ethers.constants.AddressZero || - constantInflowNFTProxyAddress === ethers.constants.AddressZero || - poolAdminNFTProxyAddress === ethers.constants.AddressZero || - poolMemberNFTProxyAddress === ethers.constants.AddressZero - ) { - const cofProxy = await this.deployContract("UUPSProxy"); - const cifProxy = await this.deployContract("UUPSProxy"); - - const paProxy = await this.deployContract("UUPSProxy"); - const pmProxy = await this.deployContract("UUPSProxy"); - - const constantOutflowNFTLogic = - await this.deployContract( - "ConstantOutflowNFT", - this.contracts.superfluid.address, - cifProxy.address - ); - cofNFTLogicAddress = constantOutflowNFTLogic.address; - - const constantInflowNFTLogic = - await this.deployContract( - "ConstantInflowNFT", - this.contracts.superfluid.address, - cofProxy.address - ); - cifNFTLogicAddress = constantInflowNFTLogic.address; - - const poolAdminNFTLogic = await this.deployContract( - "PoolAdminNFT", - this.contracts.superfluid.address - ); - paNFTLogicAddress = poolAdminNFTLogic.address; - - const poolMemberNFTLogic = await this.deployContract( - "PoolMemberNFT", - this.contracts.superfluid.address - ); - pmNFTLogicAddress = poolMemberNFTLogic.address; - - const signer = await ethers.getSigner(this.aliases.admin); - const proxiableCofLogic = UUPSProxiableMock__factory.connect( - constantOutflowNFTLogic.address, - signer - ); - const proxiableCifLogic = UUPSProxiableMock__factory.connect( - constantInflowNFTLogic.address, - signer - ); - const proxiablePaLogic = UUPSProxiableMock__factory.connect( - poolAdminNFTLogic.address, - signer - ); - const proxiablePmLogic = UUPSProxiableMock__factory.connect( - poolMemberNFTLogic.address, - signer - ); - await proxiableCofLogic.castrate(); - await proxiableCifLogic.castrate(); - await proxiablePaLogic.castrate(); - await proxiablePmLogic.castrate(); - - await cofProxy.initializeProxy(constantOutflowNFTLogic.address); - await cifProxy.initializeProxy(constantInflowNFTLogic.address); - await paProxy.initializeProxy(poolAdminNFTLogic.address); - await pmProxy.initializeProxy(poolMemberNFTLogic.address); - constantOutflowNFT = ConstantOutflowNFT__factory.connect( - cofProxy.address, - signer - ); - constantInflowNFT = ConstantInflowNFT__factory.connect( - cifProxy.address, - signer - ); - poolAdminNFT = PoolAdminNFT__factory.connect( - paProxy.address, - signer - ); - poolMemberNFT = PoolMemberNFT__factory.connect( - pmProxy.address, - signer - ); - } else { - constantOutflowNFT = ConstantOutflowNFT__factory.connect( - constantOutflowNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - constantInflowNFT = ConstantInflowNFT__factory.connect( - constantInflowNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - poolAdminNFT = PoolAdminNFT__factory.connect( - poolAdminNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - poolMemberNFT = PoolMemberNFT__factory.connect( - poolMemberNFTProxyAddress, - await ethers.getSigner(this.aliases.admin) - ); - cofNFTLogicAddress = await constantOutflowNFT.getCodeAddress(); - cifNFTLogicAddress = await constantInflowNFT.getCodeAddress(); - paNFTLogicAddress = await poolAdminNFT.getCodeAddress(); - pmNFTLogicAddress = await poolMemberNFT.getCodeAddress(); - } + const poolAdminNFT = PoolAdminNFT__factory.connect( + poolAdminNFTProxyAddress, + await ethers.getSigner(this.aliases.admin) + ); + const poolMemberNFT = PoolMemberNFT__factory.connect( + poolMemberNFTProxyAddress, + await ethers.getSigner(this.aliases.admin) + ); + const paNFTLogicAddress = await poolAdminNFT.getCodeAddress(); + const pmNFTLogicAddress = await poolMemberNFT.getCodeAddress(); return { - constantOutflowNFTProxy: constantOutflowNFT, - constantInflowNFTProxy: constantInflowNFT, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy: poolAdminNFT, poolMemberNFTProxy: poolMemberNFT, paNFTLogicAddress, diff --git a/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts b/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts index e29ae8b7b2..05bdd5598f 100644 --- a/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts +++ b/packages/ethereum-contracts/test/contracts/agreements/AgreementHelper.ts @@ -4,7 +4,7 @@ import {ethers} from "hardhat"; import IConstantFlowAgreementV1Artifact from "../../../build/hardhat/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol/IConstantFlowAgreementV1.json"; import IInstantDistributionAgreementV1Artifact from "../../../build/hardhat/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol/IInstantDistributionAgreementV1.json"; -import SuperfluidMockArtifact from "../../../build/hardhat/contracts/mocks/SuperfluidMock.sol/SuperfluidMock.json"; +import SuperfluidMockArtifact from "../../../build/hardhat/contracts/mocks/SuperfluidMock.t.sol/SuperfluidMock.json"; import TestEnvironment from "../../TestEnvironment"; import { diff --git a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts index 2d34e6a453..4022e3c1bd 100644 --- a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts +++ b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.CFA.test.ts @@ -41,18 +41,14 @@ const callbackFunctionIndex = { export const deploySuperTokenAndNFTContractsAndInitialize = async ( t: TestEnvironment ) => { - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superToken = await t.deployContract( "SuperTokenMock", t.contracts.superfluid.address, "69", - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); diff --git a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts index 68ddfff3e3..122fcd5b89 100644 --- a/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts +++ b/packages/ethereum-contracts/test/contracts/apps/SuperTokenV1Library.GDA.test.ts @@ -73,9 +73,9 @@ describe("SuperTokenV1Library.GDA", function () { const event = receipt.events?.find((x) => x.topics.includes(POOL_CREATED_TOPIC) ); - return ethers.utils.hexStripZeros( - event ? event.data : ethers.constants.AddressZero - ); + return event + ? `0x${event.data.substring(event.data.length - 40)}` + : ethers.constants.AddressZero; }; let alice: string, bob: string; @@ -120,6 +120,7 @@ describe("SuperTokenV1Library.GDA", function () { ); const receipt = await createPoolTxn.wait(); const poolAddress = getPoolAddressFromReceipt(receipt); + const poolContract = await ethers.getContractAt( "SuperfluidPool", poolAddress diff --git a/packages/ethereum-contracts/test/contracts/gov/SuperfluidGovernanceII.test.ts b/packages/ethereum-contracts/test/contracts/gov/SuperfluidGovernanceII.test.ts index 8e06678697..79839f200c 100644 --- a/packages/ethereum-contracts/test/contracts/gov/SuperfluidGovernanceII.test.ts +++ b/packages/ethereum-contracts/test/contracts/gov/SuperfluidGovernanceII.test.ts @@ -721,12 +721,9 @@ describe("Superfluid Ownable Governance Contract", function () { ); await governance .connect(aliceSigner) - ["setConfig(address,address,bytes32,address)"]( - superfluid.address, - FAKE_TOKEN_ADDRESS1, - SUPERFLUID_REWARD_ADDRESS_CONFIG_KEY, - FAKE_ADDRESS2 - ); + [ + "setConfig(address,address,bytes32,address)" + ](superfluid.address, FAKE_TOKEN_ADDRESS1, SUPERFLUID_REWARD_ADDRESS_CONFIG_KEY, FAKE_ADDRESS2); assert.equal( await governance.getRewardAddress( @@ -801,12 +798,9 @@ describe("Superfluid Ownable Governance Contract", function () { ); await governance .connect(aliceSigner) - ["setConfig(address,address,bytes32,uint256)"]( - superfluid.address, - FAKE_TOKEN_ADDRESS1, - SUPERTOKEN_MINIMUM_DEPOSIT_KEY, - 123456 - ); + [ + "setConfig(address,address,bytes32,uint256)" + ](superfluid.address, FAKE_TOKEN_ADDRESS1, SUPERTOKEN_MINIMUM_DEPOSIT_KEY, 123456); assert.equal( ( diff --git a/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts index bbbeb74be4..1c7ce0b917 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/SuperToken.NonStandard.test.ts @@ -67,18 +67,14 @@ describe("SuperToken's Non Standard Functions", function () { describe("#1 upgradability", () => { it("#1.1 storage layout", async () => { - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superTokenLogic = await t.deployContract( "SuperTokenStorageLayoutTester", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -710,18 +706,14 @@ describe("SuperToken's Non Standard Functions", function () { }); it("#3.1 Custom token storage should not overlap with super token", async () => { - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superTokenLogic = await t.deployContract( "SuperTokenStorageLayoutTester", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); diff --git a/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts index 0e19b464c4..9e708aee40 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/SuperTokenFactory.test.ts @@ -66,10 +66,6 @@ describe("SuperTokenFactory Contract", function () { describe("#1 upgradability", () => { it("#1.1 storage layout", async () => { const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -79,8 +75,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenMock", superfluid.address, "0", - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -89,8 +85,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenFactoryStorageLayoutTester", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -153,10 +149,6 @@ describe("SuperTokenFactory Contract", function () { context("#2.a Mock factory", () => { async function updateSuperTokenFactory() { const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -166,8 +158,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenMock", superfluid.address, 42, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -176,8 +168,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenFactoryMock42", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -287,18 +279,14 @@ describe("SuperTokenFactory Contract", function () { await updateSuperTokenFactory(); assert.equal((await superToken1.waterMark()).toString(), "0"); - const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - poolAdminNFTProxy, - poolMemberNFTProxy, - } = await t.deployNFTContracts(); + const {poolAdminNFTProxy, poolMemberNFTProxy} = + await t.deployNFTContracts(); const superTokenLogic = await t.deployContract( "SuperTokenMock", superfluid.address, 69, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -317,10 +305,6 @@ describe("SuperTokenFactory Contract", function () { context("#2.b Production Factory", () => { it("#2.b.1 use production factory to create different super tokens", async () => { const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -329,8 +313,8 @@ describe("SuperTokenFactory Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -339,8 +323,8 @@ describe("SuperTokenFactory Contract", function () { "SuperTokenFactoryMock42", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); diff --git a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts index 98fe04baf7..7556c16e02 100644 --- a/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts +++ b/packages/ethereum-contracts/test/contracts/superfluid/Superfluid.test.ts @@ -112,11 +112,15 @@ describe("Superfluid Host Contract", function () { await ethers.getContractFactory("SuperfluidMock"); const mock1 = await sfMockFactory.deploy( false /* nonUpgradable */, - false /* appWhiteListingEnabled */ + false /* appWhiteListingEnabled */, + 3000000 /* callbackGasLimit */, + ZERO_ADDRESS /* dmzForwader */ ); const mock2 = await sfMockFactory.deploy( true /* nonUpgradable */, - false /* appWhiteListingEnabled */ + false /* appWhiteListingEnabled */, + 3000000 /* callbackGasLimit */, + ZERO_ADDRESS /* dmzForwader */ ); await governance.updateContracts( superfluid.address, @@ -403,10 +407,6 @@ describe("Superfluid Host Contract", function () { it("#3.2 update super token factory", async () => { const factory = await superfluid.getSuperTokenFactory(); const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -415,8 +415,8 @@ describe("Superfluid Host Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -425,8 +425,8 @@ describe("Superfluid Host Contract", function () { const factory2Logic = await factory2LogicFactory.deploy( superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -452,10 +452,6 @@ describe("Superfluid Host Contract", function () { it("#3.3 update super token factory double check if new code is called", async () => { const factory = await superfluid.getSuperTokenFactory(); const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -464,8 +460,8 @@ describe("Superfluid Host Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -475,8 +471,8 @@ describe("Superfluid Host Contract", function () { const factory2Logic = await factory2LogicFactory.deploy( superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -662,6 +658,7 @@ describe("Superfluid Host Contract", function () { }); }); + // disabled due to contract size limit describe("#5 Context Utilities", () => { it("#5.1 test replacePlaceholderCtx with testCtxFuncX", async () => { const testCtxFunc = async ( @@ -694,6 +691,7 @@ describe("Superfluid Host Contract", function () { ); } + // disabled code because contract size limit hit // more complicated ABI await testCtxFunc( "ctxFunc2", @@ -701,8 +699,8 @@ describe("Superfluid Host Contract", function () { governance.address, t.contracts.ida.address, ethers.utils.hexZeroPad("0x2020", 32), - "0x" /* agreementData */, - "0x" /* cbdata */, + "0x", // agreementData + "0x", // cbdata ], "0x" + "dead".repeat(20) ); @@ -712,8 +710,8 @@ describe("Superfluid Host Contract", function () { governance.address, t.contracts.ida.address, ethers.utils.hexZeroPad("0x2020", 32), - "0xdead" /* agreementData */, - "0xbeef" /* cbdata */, + "0xdead", // agreementData + "0xbeef", // cbdata ], "0x" + "faec".repeat(20) ); @@ -1493,7 +1491,7 @@ describe("Superfluid Host Contract", function () { let receipt = await tx.wait(); console.debug("Gas used", receipt.gasUsed.toString()); let gasLowerBound = Number(receipt.gasUsed.toString()); - let gasUpperBound = gasLowerBound + 300000; + let gasUpperBound = Math.floor(gasLowerBound * 1.3); console.debug( "Current bound", gasLowerBound, @@ -2653,10 +2651,6 @@ describe("Superfluid Host Contract", function () { await superfluid.getSuperTokenFactoryLogic() ); const { - constantOutflowNFTProxy, - constantInflowNFTProxy, - cofNFTLogicAddress, - cifNFTLogicAddress, poolAdminNFTProxy, poolMemberNFTProxy, paNFTLogicAddress, @@ -2665,8 +2659,8 @@ describe("Superfluid Host Contract", function () { const superTokenLogic = await t.deployContract( "SuperToken", superfluid.address, - constantOutflowNFTProxy.address, - constantInflowNFTProxy.address, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, poolAdminNFTProxy.address, poolMemberNFTProxy.address ); @@ -2674,8 +2668,8 @@ describe("Superfluid Host Contract", function () { "SuperTokenFactory", superfluid.address, superTokenLogic.address, - cofNFTLogicAddress, - cifNFTLogicAddress, + t.constants.ZERO_ADDRESS, + t.constants.ZERO_ADDRESS, paNFTLogicAddress, pmNFTLogicAddress ); @@ -2697,7 +2691,9 @@ describe("Superfluid Host Contract", function () { await ethers.getContractFactory("SuperfluidMock"); const mock1 = await mock1Factory.deploy( false /* nonUpgradable */, - false /* appWhiteListingEnabled */ + false /* appWhiteListingEnabled */, + 3000000 /* callbackGasLimit */, + ZERO_ADDRESS /* dmzForwader */ ); await expectCustomError( governance.updateContracts( diff --git a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol index e31dedfeb2..7412fe2234 100644 --- a/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol +++ b/packages/ethereum-contracts/test/foundry/FoundrySuperfluidTester.sol @@ -9,7 +9,6 @@ import { ERC1820RegistryCompiled } from "../../contracts/libs/ERC1820RegistryCom import { SuperfluidFrameworkDeployer } from "../../contracts/utils/SuperfluidFrameworkDeployer.sol"; import { Superfluid } from "../../contracts/superfluid/Superfluid.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../contracts/agreements/gdav1/SuperfluidPool.sol"; -import { IFlowNFTBase } from "../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; import { IGeneralDistributionAgreementV1, PoolConfig @@ -17,14 +16,13 @@ import { import { IPoolNFTBase } from "../../contracts/interfaces/agreements/gdav1/IPoolNFTBase.sol"; import { IPoolAdminNFT } from "../../contracts/interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../../contracts/interfaces/agreements/gdav1/IPoolMemberNFT.sol"; -import { IConstantOutflowNFT } from "../../contracts/interfaces/superfluid/IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "../../contracts/interfaces/superfluid/IConstantInflowNFT.sol"; import { ISuperfluidToken } from "../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; import { ISETH } from "../../contracts/interfaces/tokens/ISETH.sol"; import { UUPSProxy } from "../../contracts/upgradability/UUPSProxy.sol"; import { ConstantFlowAgreementV1 } from "../../contracts/agreements/ConstantFlowAgreementV1.sol"; import { SuperTokenV1Library } from "../../contracts/apps/SuperTokenV1Library.sol"; -import { IERC20, ISuperToken, SuperToken } from "../../contracts/superfluid/SuperToken.sol"; +import { IERC20, ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } + from "../../contracts/superfluid/SuperToken.sol"; import { SuperfluidLoader } from "../../contracts/utils/SuperfluidLoader.sol"; import { TestResolver } from "../../contracts/utils/TestResolver.sol"; import { TestToken } from "../../contracts/utils/TestToken.sol"; @@ -180,8 +178,6 @@ contract FoundrySuperfluidTester is Test { // - Host // - CFA // - IDA - // - ConstantOutflowNFT logic - // - ConstantInflowNFT logic // - SuperToken logic // - SuperTokenFactory // - Resolver @@ -371,19 +367,19 @@ contract FoundrySuperfluidTester is Test { _assertInvariantAumGtEqSuperTokenTotalSupply(); } - function _assertInvariantLiquiditySum() internal { + function _assertInvariantLiquiditySum() internal view { assertTrue(_definitionLiquiditySumInvariant(), "Invariant: Liquidity Sum Invariant"); } - function _assertInvariantNetFlowRateSum() internal { + function _assertInvariantNetFlowRateSum() internal view { assertTrue(_definitionNetFlowRateSumInvariant(), "Invariant: Net Flow Rate Sum Invariant"); } - function _assertInvariantAumGtEqRtbSum() internal { + function _assertInvariantAumGtEqRtbSum() internal view { assertTrue(_definitionAumGtEqRtbSumInvariant(), "Invariant: AUM > RTB Sum"); } - function _assertInvariantAumGtEqSuperTokenTotalSupply() internal { + function _assertInvariantAumGtEqSuperTokenTotalSupply() internal view { assertTrue(_defintionAumGtEqSuperTokenTotalSupplyInvariant(), "Invariant: AUM > SuperToken Total Supply"); } @@ -692,8 +688,8 @@ contract FoundrySuperfluidTester is Test { ) internal returns (SuperToken localSuperToken) { localSuperToken = new SuperToken( sf.host, - previousSuperToken.CONSTANT_OUTFLOW_NFT(), - previousSuperToken.CONSTANT_INFLOW_NFT(), + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), previousSuperToken.POOL_ADMIN_NFT(), previousSuperToken.POOL_MEMBER_NFT() ); @@ -1067,7 +1063,7 @@ contract FoundrySuperfluidTester is Test { _assertGlobalInvariants(); } - function _helperAssertCreateIndex(ISuperToken superToken_, address publisher, uint32 indexId) internal { + function _helperAssertCreateIndex(ISuperToken superToken_, address publisher, uint32 indexId) internal view { _assertIndexData(superToken_, publisher, indexId, true, 0, 0, 0); } @@ -1598,13 +1594,11 @@ contract FoundrySuperfluidTester is Test { // there is a hard restriction in which total units must never exceed type(int96).max vm.assume(newUnits_ < type(uint72).max); ISuperToken poolSuperToken = ISuperToken(address(pool_.superToken())); - if (caller_ == address(0) || member_ == address(0) || sf.gda.isPool(poolSuperToken, member_)) return; (bool isConnected, int256 oldUnits,) = _helperGetMemberPoolState(pool_, member_); PoolUnitData memory poolUnitDataBefore = _helperGetPoolUnitsData(pool_); - (int256 claimableBalance,) = pool_.getClaimableNow(member_); (int256 balanceBefore,,,) = poolSuperToken.realtimeBalanceOfNow(member_); { _updateMemberUnits(pool_, poolSuperToken, caller_, member_, newUnits_, useBools_); @@ -1617,11 +1611,11 @@ contract FoundrySuperfluidTester is Test { assertEq(pool_.getUnits(member_), newUnits_, "GDAv1.t: Members' units incorrectly set"); - // Assert that pending balance is claimed if user is disconnected + // Assert that pending balance didn't change if user is disconnected if (!isConnected) { (int256 balanceAfter,,,) = poolSuperToken.realtimeBalanceOfNow(member_); assertEq( - balanceAfter, balanceBefore + claimableBalance, "_helperUpdateMemberUnits: Pending balance not claimed" + balanceAfter, balanceBefore, "_helperUpdateMemberUnits: Pending balance changed" ); } @@ -1946,10 +1940,6 @@ contract FoundrySuperfluidTester is Test { ); } - // Assert Outflow NFT is minted to distributor - // Assert Inflow NFT is minted to pool - _assertFlowNftOnDistributeFlow(superToken_, pool_, from, requestedFlowRate); - { if (members.length == 0) return; uint128 poolTotalUnitsAfter = pool_.getTotalUnits(); @@ -2120,7 +2110,7 @@ contract FoundrySuperfluidTester is Test { int96 expectedFlowRate, uint256 expectedLastUpdated, uint256 expectedOwedDeposit - ) internal { + ) internal view { (uint256 lastUpdated, int96 flowRate, uint256 deposit, uint256 owedDeposit) = superToken_.getFlowInfo(sender, receiver); @@ -2133,7 +2123,7 @@ contract FoundrySuperfluidTester is Test { } /// @dev Asserts that a single flow has been removed on deletion - function _assertFlowDataIsEmpty(ISuperToken superToken_, address sender, address receiver) internal { + function _assertFlowDataIsEmpty(ISuperToken superToken_, address sender, address receiver) internal view { _assertFlowData(superToken_, sender, receiver, 0, 0, 0); } @@ -2143,7 +2133,7 @@ contract FoundrySuperfluidTester is Test { address flowOperator, int96 expectedFlowRateAllowance, uint8 expectedPermissionsBitmask - ) internal { + ) internal view { (bool canCreate, bool canUpdate, bool canDelete, int96 allowance) = superToken_.getFlowPermissions(sender, flowOperator); @@ -2157,7 +2147,9 @@ contract FoundrySuperfluidTester is Test { assertEq(allowance, expectedFlowRateAllowance, "FlowOperatorData: flow rate allowance"); } - function _assertFlowOperatorDataIsEmpty(ISuperToken superToken_, address sender, address flowOperator) internal { + function _assertFlowOperatorDataIsEmpty(ISuperToken superToken_, address sender, address flowOperator) + internal view + { _assertFlowOperatorData(superToken_, sender, flowOperator, 0, 0); } @@ -2171,7 +2163,7 @@ contract FoundrySuperfluidTester is Test { int96 flowRateDelta, ConstantFlowAgreementV1.FlowData memory flowInfoBefore, bool isSender - ) internal { + ) internal view { (uint256 lastUpdated, int96 netFlowRate, uint256 deposit, uint256 owedDeposit) = sf.cfa.getAccountFlowInfo(superToken, account); int96 expectedNetFlowRate = flowInfoBefore.flowRate + (isSender ? -flowRateDelta : flowRateDelta); @@ -2206,7 +2198,7 @@ contract FoundrySuperfluidTester is Test { uint128 expectedIndexValue, uint128 expectedTotalUnitsApproved, uint128 expectedTotalUnitsPending - ) internal { + ) internal view { (bool exist, uint128 indexValue, uint128 totalUnitsApproved, uint128 totalUnitsPending) = superToken_.getIndex(publisher, indexId); @@ -2228,7 +2220,7 @@ contract FoundrySuperfluidTester is Test { bool expectedApproved, uint128 expectedUnits, uint256 expectedPending - ) internal { + ) internal view { (,, bool approved, uint128 units, uint256 pending) = superToken_.getSubscriptionByID(subscriptionId); assertEq(approved, expectedApproved, "SubscriptionData: approved"); assertEq(units, expectedUnits, "SubscriptionData: units"); @@ -2266,7 +2258,7 @@ contract FoundrySuperfluidTester is Test { // GeneralDistributionAgreement Assertions function _assertPoolAllowance(ISuperfluidPool _pool, address owner, address spender, uint256 expectedAllowance) - internal + internal view { assertEq(_pool.allowance(owner, spender), expectedAllowance, "_assertPoolAllowance: allowance mismatch"); } @@ -2293,33 +2285,4 @@ contract FoundrySuperfluidTester is Test { poolMemberNFT.ownerOf(tokenId); } } - - function _assertFlowNftOnDistributeFlow( - ISuperfluidToken _superToken, - ISuperfluidPool _pool, - address _distributor, - int96 _newFlowRate - ) internal { - IConstantOutflowNFT constantOutflowNFT = SuperToken(address(_superToken)).CONSTANT_OUTFLOW_NFT(); - IConstantInflowNFT constantInflowNFT = SuperToken(address(_superToken)).CONSTANT_INFLOW_NFT(); - uint256 tokenId = constantOutflowNFT.getTokenId(address(_superToken), address(_distributor), address(_pool)); - if (_newFlowRate > 0) { - assertEq( - constantOutflowNFT.ownerOf(tokenId), - _distributor, - "_assertFlowNftOnDistributeFlow: distributor doesn't own outflow NFT" - ); - assertEq( - constantInflowNFT.ownerOf(tokenId), - address(_pool), - "_assertFlowNftOnDistributeFlow: distributor doesn't own inflow NFT" - ); - } else { - vm.expectRevert(IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - constantOutflowNFT.ownerOf(tokenId); - - vm.expectRevert(IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - constantInflowNFT.ownerOf(tokenId); - } - } } diff --git a/packages/ethereum-contracts/contracts/mocks/IStorageLayoutBase.sol b/packages/ethereum-contracts/test/foundry/StorageLayoutTestBase.t.sol similarity index 55% rename from packages/ethereum-contracts/contracts/mocks/IStorageLayoutBase.sol rename to packages/ethereum-contracts/test/foundry/StorageLayoutTestBase.t.sol index 4a1cffbd80..5c4cffb488 100644 --- a/packages/ethereum-contracts/contracts/mocks/IStorageLayoutBase.sol +++ b/packages/ethereum-contracts/test/foundry/StorageLayoutTestBase.t.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -interface IStorageLayoutBase { +abstract contract StorageLayoutTestBase { error STORAGE_LOCATION_CHANGED(string _name); -} \ No newline at end of file +} diff --git a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol index 08123e9936..250b0367f8 100644 --- a/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol +++ b/packages/ethereum-contracts/test/foundry/SuperfluidFrameworkDeployer.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester } from "./FoundrySuperfluidTester.sol"; import { IPureSuperToken, ISETH, TestToken, SuperToken } from "../../contracts/utils/SuperfluidFrameworkDeployer.sol"; @@ -8,7 +8,7 @@ import { SuperfluidLoader } from "../../contracts/utils/SuperfluidLoader.sol"; contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { constructor() FoundrySuperfluidTester(1) { } - function testAllContractsDeployed() public { + function testAllContractsDeployed() public view { assertTrue(address(sf.governance) != address(0), "SFDeployer: governance not deployed"); assertTrue(address(sf.host) != address(0), "SFDeployer: host not deployed"); assertTrue(address(sf.cfa) != address(0), "SFDeployer: cfa not deployed"); @@ -16,8 +16,6 @@ contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { assertTrue(address(sf.gda) != address(0), "SFDeployer: gda not deployed"); assertTrue(address(sf.superTokenFactory) != address(0), "SFDeployer: superTokenFactory not deployed"); assertTrue(address(sf.superTokenLogic) != address(0), "SFDeployer: superTokenLogic not deployed"); - assertTrue(address(sf.constantOutflowNFT) != address(0), "SFDeployer: constantOutflowNFT not deployed"); - assertTrue(address(sf.constantInflowNFT) != address(0), "SFDeployer: constantInflowNFT not deployed"); assertTrue(address(sf.resolver) != address(0), "SFDeployer: resolver not deployed"); assertTrue(address(sf.superfluidLoader) != address(0), "SFDeployer: superfluidLoader not deployed"); assertTrue(address(sf.cfaV1Forwarder) != address(0), "SFDeployer: cfaV1Forwarder not deployed"); @@ -26,17 +24,17 @@ contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { assertTrue(address(sf.batchLiquidator) != address(0), "SFDeployer: batchLiquidator not deployed"); } - function testResolverGetsGovernance() public { + function testResolverGetsGovernance() public view { assertEq( sf.resolver.get("TestGovernance.test"), address(sf.governance), "SFDeployer: governance not registered" ); } - function testResolverGetsHost() public { + function testResolverGetsHost() public view { assertEq(sf.resolver.get("Superfluid.test"), address(sf.host), "SFDeployer: host not registered"); } - function testResolverGetsLoader() public { + function testResolverGetsLoader() public view { assertEq( sf.resolver.get("SuperfluidLoader-v1"), address(sf.superfluidLoader), @@ -44,7 +42,7 @@ contract SuperfluidFrameworkDeployerTest is FoundrySuperfluidTester { ); } - function testLoaderGetsFramework() public { + function testLoaderGetsFramework() public view { SuperfluidLoader.Framework memory loadedSf = sf.superfluidLoader.loadFramework("test"); assertEq(address(loadedSf.superfluid), address(sf.host), "SFDeployer: host not loaded"); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol index ef66c6bce4..2d8256baa9 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.ACL.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; @@ -297,7 +297,7 @@ contract ConstantFlowAgreementV1ACLTest is FoundrySuperfluidTester { ); } - function _assertFlowOperatorData(AssertFlowOperator memory data) internal { + function _assertFlowOperatorData(AssertFlowOperator memory data) internal view { (uint8 newPermissions, int96 newFlowRateAllowance) = sf.cfa.getFlowOperatorDataByID(data.superToken, data.flowOperatorId); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol similarity index 96% rename from packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.sol rename to packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol index d21a2639a1..9cc190359c 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; @@ -56,7 +56,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { cfa = new ConstantFlowAgreementV1Mock(); } - function testMaximumFlowRateAllowedForDeposit(uint32 liquidationPeriod, uint96 depositAllowed) public { + function testMaximumFlowRateAllowedForDeposit(uint32 liquidationPeriod, uint96 depositAllowed) public view { depositAllowed = uint96(bound(uint256(depositAllowed), cfa.DEFAULT_MINIMUM_DEPOSIT(), cfa.MAXIMUM_DEPOSIT())); vm.assume(liquidationPeriod > 0); @@ -68,7 +68,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { assertTrue(uint256(depositAllowed) >= deposit, "CFAv1.prop: depositAllowed < deposit"); } - function testMinimumDeposit(uint64 minimumDeposit, uint32 liquidationPeriod, int96 flowRate) public { + function testMinimumDeposit(uint64 minimumDeposit, uint32 liquidationPeriod, int96 flowRate) public view { minimumDeposit = uint32(bound(uint256(minimumDeposit), cfa.DEFAULT_MINIMUM_DEPOSIT(), type(uint64).max)); vm.assume(liquidationPeriod > 0); vm.assume(flowRate > 0); @@ -87,7 +87,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { * This test was added because we deleted the extra clipping in the _changeFlowToApp function * export FOUNDRY_FUZZ_RUNS=10000 && forge test --match testMinimumDepositClippingSumInvariant */ - function testMinimumDepositClippingSumInvariant(uint256 depositA, uint256 depositB) public { + function testMinimumDepositClippingSumInvariant(uint256 depositA, uint256 depositB) public view { vm.assume(type(uint256).max - depositA < depositB); vm.assume(type(uint256).max - depositB < depositA); uint256 clippedDepositA = cfa.clipDepositNumberRoundingUp(depositA); @@ -104,14 +104,14 @@ contract ConstantFlowAgreementV1PropertyTest is Test { * @dev This test was added to provide additional assurances that applying the minimum deposit clipping * multiple times on a value doesn't change it. */ - function testReapplyMinimumDepositClippingInvariant(uint256 deposit) public { + function testReapplyMinimumDepositClippingInvariant(uint256 deposit) public view { uint256 initialClipped = cfa.clipDepositNumberRoundingUp(deposit); uint256 reclipped = cfa.clipDepositNumberRoundingUp(initialClipped); assertTrue(initialClipped == reclipped, "CFAv1.prop: clipped sum != sum"); } function testFlowDataEncoding(uint32 timestamp, int96 flowRate, uint64 depositClipped, uint64 owedDepositClipped) - public + public view { ConstantFlowAgreementV1.FlowData memory a = ConstantFlowAgreementV1.FlowData({ timestamp: uint256(timestamp), @@ -129,7 +129,7 @@ contract ConstantFlowAgreementV1PropertyTest is Test { assertEq(a.owedDeposit, b.owedDeposit, "CFAv1Prop: owedDeposit !="); } - function testFlowOperatorDataEncoding(uint8 permissions, int96 flowRateAllowance) public { + function testFlowOperatorDataEncoding(uint8 permissions, int96 flowRateAllowance) public view { vm.assume(flowRateAllowance >= 0); ConstantFlowAgreementV1.FlowOperatorData memory a = ConstantFlowAgreementV1.FlowOperatorData({ permissions: permissions, flowRateAllowance: flowRateAllowance }); diff --git a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol index 59c9177b7a..556f96955f 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/ConstantFlowAgreementV1.t.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; +import { console } from "forge-std/Test.sol"; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; @@ -17,11 +18,31 @@ contract ConstantFlowAgreementV1IntegrationTest is FoundrySuperfluidTester { function testBobAliceLoop(int96 flowRate) public { _helperCreateFlow(superToken, alice, bob, flowRate); - + _warpAndAssertAll(superToken); _helperCreateFlow(superToken, bob, alice, flowRate); _warpAndAssertAll(superToken); } + + // helper functions wrapping internal calls into external calls (needed for try/catch) + + function __external_createFlow(ISuperToken superToken, address sender, address receiver, int96 fr) external { + vm.startPrank(sender); + superToken.createFlow(receiver, fr); + vm.stopPrank(); + } + + function __external_updateFlow(ISuperToken superToken, address sender, address receiver, int96 fr) external { + vm.startPrank(sender); + superToken.updateFlow(receiver, fr); + vm.stopPrank(); + } + + function __external_deleteFlow(ISuperToken superToken, address sender, address receiver) external { + vm.startPrank(sender); + superToken.deleteFlow(sender, receiver); + vm.stopPrank(); + } } diff --git a/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol b/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol index b676b2d819..ab58a6dab8 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/InstantDistributionAgreementV1.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "../FoundrySuperfluidTester.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol index 9d9b80e727..122414dd95 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreement.t.sol @@ -1,9 +1,8 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; -import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/IBeacon.sol"; import "@superfluid-finance/solidity-semantic-money/src/SemanticMoney.sol"; import "../../FoundrySuperfluidTester.sol"; import { @@ -11,16 +10,14 @@ import { IGeneralDistributionAgreementV1 } from "../../../../contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { SuperTokenV1Library } from "../../../../contracts/apps/SuperTokenV1Library.sol"; +import { SuperfluidUpgradeableBeacon } from "../../../../contracts/upgradability/SuperfluidUpgradeableBeacon.sol"; import { ISuperToken, SuperToken } from "../../../../contracts/superfluid/SuperToken.sol"; import { ISuperfluidToken } from "../../../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../../../contracts/agreements/gdav1/SuperfluidPool.sol"; -import { SuperfluidPoolStorageLayoutMock } from "../../../../contracts/mocks/SuperfluidPoolUpgradabilityMock.sol"; import { IPoolNFTBase } from "../../../../contracts/interfaces/agreements/gdav1/IPoolNFTBase.sol"; import { IPoolAdminNFT } from "../../../../contracts/interfaces/agreements/gdav1/IPoolAdminNFT.sol"; import { IPoolMemberNFT } from "../../../../contracts/interfaces/agreements/gdav1/IPoolMemberNFT.sol"; -import { IFlowNFTBase } from "../../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { IConstantOutflowNFT } from "../../../../contracts/interfaces/superfluid/IConstantOutflowNFT.sol"; -import { IConstantInflowNFT } from "../../../../contracts/interfaces/superfluid/IConstantInflowNFT.sol"; +import { SuperfluidPoolStorageLayoutMock } from "./SuperfluidPoolUpgradabilityMock.t.sol"; /// @title GeneralDistributionAgreementV1 Integration Tests /// @author Superfluid @@ -45,7 +42,7 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste SuperfluidPool public freePool; uint256 public liquidationPeriod; - constructor() FoundrySuperfluidTester(7) { } + constructor() FoundrySuperfluidTester(10) { } function setUp() public override { super.setUp(); @@ -70,19 +67,11 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste GDA Integration Tests //////////////////////////////////////////////////////////////////////////*/ - function testInitializeGDA(IBeacon beacon) public { - GeneralDistributionAgreementV1 gdaV1 = new GeneralDistributionAgreementV1(sf.host); - assertEq(address(gdaV1.superfluidPoolBeacon()), address(0), "GDAv1.t: Beacon address not address(0)"); - gdaV1.initialize(beacon); - + function testInitializeGDA(SuperfluidUpgradeableBeacon beacon) public { + GeneralDistributionAgreementV1 gdaV1 = new GeneralDistributionAgreementV1(sf.host, beacon); assertEq(address(gdaV1.superfluidPoolBeacon()), address(beacon), "GDAv1.t: Beacon address not equal"); } - function testRevertReinitializeGDA(IBeacon beacon) public { - vm.expectRevert("Initializable: contract is already initialized"); - sf.gda.initialize(beacon); - } - function testRevertAppendIndexUpdateByPoolByNonPool(BasicParticle memory p, Time t) public { vm.expectRevert(IGeneralDistributionAgreementV1.GDA_ONLY_SUPER_TOKEN_POOL.selector); sf.gda.appendIndexUpdateByPool(superToken, p, t); @@ -101,7 +90,7 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste ); } - function testPositiveBalanceIsPatricianPeriodNow(address account) public { + function testPositiveBalanceIsPatricianPeriodNow(address account) public view { (bool isPatricianPeriod,) = sf.gda.isPatricianPeriodNow(superToken, account); assertEq(isPatricianPeriod, true); } @@ -243,11 +232,10 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste vm.stopPrank(); } - function testRevertIfNotAdminOrGDAUpdatesMemberUnitsViaPool(address caller) public { - vm.assume(caller != alice); - vm.startPrank(caller); + function testRevertIfNotAdminOrGDAUpdatesMemberUnitsViaPool() public { + vm.startPrank(bob); vm.expectRevert(ISuperfluidPool.SUPERFLUID_POOL_NOT_POOL_ADMIN_OR_GDA.selector); - freePool.updateMemberUnits(caller, 69); + freePool.updateMemberUnits(bob, 69); vm.stopPrank(); } @@ -384,15 +372,15 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste mock.validateStorageLayout(); } - function testDistributeFlowUsesMinDeposit( + function testDistributeFlowUsesMinDepositWhenFlowDepositIsLess( uint64 distributionFlowRate, - uint32 minDepositMultiplier, + uint32 minDepositFlowRate, address member, FoundrySuperfluidTester._StackVars_UseBools memory useBools_, PoolConfig memory config ) public { ISuperfluidPool pool = _helperCreatePool(superToken, alice, alice, false, config); - vm.assume(distributionFlowRate < minDepositMultiplier); + vm.assume(distributionFlowRate < minDepositFlowRate); vm.assume(distributionFlowRate > 0); vm.assume(member != address(pool)); vm.assume(member != address(0)); @@ -400,7 +388,7 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste _addAccount(member); vm.startPrank(address(sf.governance.owner())); - uint256 minimumDeposit = 4 hours * uint256(minDepositMultiplier); + uint256 minimumDeposit = 4 hours * uint256(minDepositFlowRate); sf.governance.setSuperTokenMinimumDeposit(sf.host, superToken, minimumDeposit); vm.stopPrank(); @@ -411,15 +399,15 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste assertEq(buffer, minimumDeposit, "GDAv1.t: Min buffer should be used"); } - function testDistributeFlowIgnoresMinDeposit( + function testDistributeFlowIgnoresMinDepositWhenFlowDepositIsGreater( int32 distributionFlowRate, - uint32 minDepositMultiplier, + uint32 minDepositFlowRate, address member, FoundrySuperfluidTester._StackVars_UseBools memory useBools_, PoolConfig memory config ) public { ISuperfluidPool pool = _helperCreatePool(superToken, alice, alice, false, config); - vm.assume(uint32(distributionFlowRate) >= minDepositMultiplier); + vm.assume(uint32(distributionFlowRate) >= minDepositFlowRate); vm.assume(distributionFlowRate > 0); vm.assume(member != address(0)); vm.assume(member != address(freePool)); @@ -428,7 +416,7 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste vm.startPrank(address(sf.governance.owner())); - uint256 minimumDeposit = 4 hours * uint256(minDepositMultiplier); + uint256 minimumDeposit = 4 hours * uint256(minDepositFlowRate); sf.governance.setSuperTokenMinimumDeposit(sf.host, superToken, minimumDeposit); vm.stopPrank(); @@ -561,7 +549,17 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste _helperUpdateMemberUnits(pool, alice, members[i], memberUnits[i], useBools_); } + uint256 actualAmount = sf.gda.estimateDistributionActualAmount(superToken, alice, pool, distributionAmount); _helperDistributeViaGDA(superToken, alice, alice, pool, distributionAmount, useBools_.useForwarder); + + uint128 perUnitDistributionAmount = uint128(actualAmount / pool.getTotalUnits()); + for (uint256 i = 0; i < members.length; ++i) { + if (sf.gda.isPool(superToken, members[i]) || members[i] == address(0)) continue; + + uint128 memberIUnits = pool.getUnits(members[i]); + + assertEq(perUnitDistributionAmount * memberIUnits, pool.getTotalAmountReceivedByMember(members[i])); + } } function testDistributeToConnectedMembers( @@ -586,7 +584,17 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste _helperUpdateMemberUnits(pool, alice, members[i], memberUnits[i], useBools_); _addAccount(members[i]); } + uint256 actualAmount = sf.gda.estimateDistributionActualAmount(superToken, alice, pool, distributionAmount); _helperDistributeViaGDA(superToken, alice, alice, pool, distributionAmount, useBools_.useForwarder); + + uint128 perUnitDistributionAmount = uint128(actualAmount / pool.getTotalUnits()); + for (uint256 i = 0; i < members.length; ++i) { + if (sf.gda.isPool(superToken, members[i]) || members[i] == address(0)) continue; + + uint128 memberIUnits = pool.getUnits(members[i]); + + assertEq(perUnitDistributionAmount * memberIUnits, pool.getTotalAmountReceivedByMember(members[i])); + } } function testDistributeFlowToConnectedMembers( @@ -731,15 +739,13 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste _helperSuperfluidPoolDecreaseAllowance(pool, owner, spender, subtractedValue); } - function testRevertIfUnitsTransferReceiverIsPool(address from, address to, int96 unitsAmount, int128 transferAmount) + function testRevertIfUnitsTransferReceiverIsPool(address from, int96 unitsAmount, int128 transferAmount) public { // @note we use int96 because overflow will happen otherwise vm.assume(unitsAmount >= 0); vm.assume(transferAmount > 0); vm.assume(from != address(0)); - vm.assume(to != address(0)); - vm.assume(from != to); vm.assume(transferAmount <= unitsAmount); _helperUpdateMemberUnits(freePool, alice, from, uint128(int128(unitsAmount))); @@ -778,22 +784,32 @@ contract GeneralDistributionAgreementV1IntegrationTest is FoundrySuperfluidTeste } function testBasicTransfer( - address from, - address to, - int96 unitsAmount, - int128 transferAmount, - FoundrySuperfluidTester._StackVars_UseBools memory useBools_ + FoundrySuperfluidTester._StackVars_UseBools memory useBools_, + uint8 a, uint8 b, // One must use small sized data type to find equality cases + uint128 unitsAmount, + uint128 transferAmount ) public { - // @note we use int96 because overflow will happen otherwise - vm.assume(unitsAmount >= 0); - vm.assume(transferAmount > 0); - vm.assume(from != address(0)); - vm.assume(to != address(0)); - vm.assume(from != to); - vm.assume(transferAmount <= unitsAmount); - _helperUpdateMemberUnits(freePool, alice, from, uint128(int128(unitsAmount)), useBools_); + address from = address(uint160(a)); + address to = address(uint160(b)); - _helperSuperfluidPoolUnitsTransfer(freePool, from, to, uint256(uint128(transferAmount))); + transferAmount = uint96(bound(transferAmount, 0, unitsAmount)); + + vm.assume(from != address(0)); + _helperUpdateMemberUnits(freePool, alice, from, unitsAmount, useBools_); + + if (from == to) { + vm.startPrank(from); + vm.expectRevert(ISuperfluidPool.SUPERFLUID_POOL_SELF_TRANSFER_NOT_ALLOWED.selector); + freePool.transfer(to, transferAmount); + vm.stopPrank(); + } else if (to == address(0)) { + vm.startPrank(from); + vm.expectRevert(ISuperfluidPool.SUPERFLUID_POOL_NO_ZERO_ADDRESS.selector); + freePool.transfer(to, transferAmount); + vm.stopPrank(); + } else { + _helperSuperfluidPoolUnitsTransfer(freePool, from, to, uint256(uint128(transferAmount))); + } } function testApproveAndTransferFrom( diff --git a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol similarity index 87% rename from packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.sol rename to packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol index 487e50ef95..95d4b2e336 100644 --- a/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/GeneralDistributionAgreementV1.prop.t.sol @@ -1,24 +1,18 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { IBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol"; import "@superfluid-finance/solidity-semantic-money/src/SemanticMoney.sol"; -import { - ProxyDeployerLibrary, - SuperfluidPoolLogicDeployerLibrary, - SuperfluidUpgradeableBeacon -} from "../../../../contracts/utils/SuperfluidFrameworkDeploymentSteps.sol"; import { ERC1820RegistryCompiled } from "../../../../contracts/libs/ERC1820RegistryCompiled.sol"; -import { SuperfluidFrameworkDeployer } from "../../../../contracts/utils/SuperfluidFrameworkDeployer.sol"; +import { SuperfluidFrameworkDeployer} from "../../../../contracts/utils/SuperfluidFrameworkDeployer.sol"; import { TestToken } from "../../../../contracts/utils/TestToken.sol"; +import { SuperfluidUpgradeableBeacon } from "../../../../contracts/upgradability/SuperfluidUpgradeableBeacon.sol"; import { ISuperToken, SuperToken } from "../../../../contracts/superfluid/SuperToken.sol"; import { ISuperAgreement } from "../../../../contracts/interfaces/superfluid/ISuperAgreement.sol"; import { - GeneralDistributionAgreementV1, - ISuperfluid, - ISuperfluidPool + GeneralDistributionAgreementV1, ISuperfluid, ISuperfluidPool } from "../../../../contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol"; import { IGeneralDistributionAgreementV1, @@ -49,7 +43,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen address public constant alice = address(0x420); - constructor() GeneralDistributionAgreementV1(ISuperfluid(address(0))) { + constructor() GeneralDistributionAgreementV1(ISuperfluid(address(0)), SuperfluidUpgradeableBeacon(address(0))) { // deploy ERC1820 registry vm.etch(ERC1820RegistryCompiled.at, ERC1820RegistryCompiled.bin); sfDeployer = new SuperfluidFrameworkDeployer(); @@ -58,17 +52,6 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen (token, superToken) = sfDeployer.deployWrapperSuperToken("FTT", "FTT", 18, type(uint256).max, address(0)); - // /// Deploy SuperfluidPool logic contract - // SuperfluidPool superfluidPoolLogic = - // SuperfluidPoolLogicDeployerLibrary.deploySuperfluidPool(GeneralDistributionAgreementV1(address(this))); - - // // Initialize the logic contract - // superfluidPoolLogic.castrate(); - - // SuperfluidUpgradeableBeacon superfluidPoolBeacon = - // ProxyDeployerLibrary.deploySuperfluidUpgradeableBeacon(address(superfluidPoolLogic)); - // this.initialize(superfluidPoolBeacon); - PoolConfig memory poolConfig = PoolConfig({ transferabilityForUnitsOwner: true, distributionFromAnyAddress: true }); @@ -139,7 +122,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen vm.warp(1000); - (bool exist, IGeneralDistributionAgreementV1.FlowDistributionData memory setFlowDistributionData) = + (bool exist, FlowDistributionData memory setFlowDistributionData) = _getFlowDistributionData(superToken, flowHash); assertEq(true, exist, "flow distribution data does not exist"); @@ -171,14 +154,11 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen vm.startPrank(address(this)); superToken.updateAgreementData( poolMemberId, - _encodePoolMemberData( - IGeneralDistributionAgreementV1.PoolMemberData({ poolID: poolID, pool: address(_pool) }) - ) + _encodePoolMemberData(PoolMemberData({ poolID: poolID, pool: address(_pool) })) ); vm.stopPrank(); - (bool exist, IGeneralDistributionAgreementV1.PoolMemberData memory setPoolMemberData) = - _getPoolMemberData(superToken, poolMember, _pool); + (bool exist, PoolMemberData memory setPoolMemberData) = _getPoolMemberData(superToken, poolMember, _pool); assertEq(true, exist, "pool member data does not exist"); assertEq(poolID, setPoolMemberData.poolID, "poolID not equal"); @@ -297,7 +277,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen int256 settledValue, uint96 totalBuffer, bool isPool_ - ) public { + ) public pure { BasicParticle memory particle = BasicParticle({ _flow_rate: FlowRate.wrap(flowRate), _settled_at: Time.wrap(settledAt), @@ -319,7 +299,7 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen int256 settledValue, uint96 totalBuffer, bool isPool_ - ) public { + ) public pure { UniversalIndexData memory data = UniversalIndexData({ flowRate: flowRate, settledAt: settledAt, @@ -338,33 +318,31 @@ contract GeneralDistributionAgreementV1Properties is GeneralDistributionAgreemen assertEq(isPool_, decoded.isPool, "isPool not equal"); } - function testGetBasicParticleFromUIndex(UniversalIndexData memory data) public { + function testGetBasicParticleFromUIndex(UniversalIndexData memory data) public pure { BasicParticle memory particle = _getBasicParticleFromUIndex(data); assertEq(data.flowRate, int96(FlowRate.unwrap(particle._flow_rate)), "flowRate not equal"); assertEq(data.settledAt, Time.unwrap(particle._settled_at), "settledAt not equal"); assertEq(data.settledValue, Value.unwrap(particle._settled_value), "settledValue not equal"); } - function testEncodeDecodeFlowDistributionData(int96 flowRate, uint96 buffer) public { + function testEncodeDecodeFlowDistributionData(int96 flowRate, uint96 buffer) public view { vm.assume(flowRate >= 0); vm.assume(buffer >= 0); - IGeneralDistributionAgreementV1.FlowDistributionData memory original = IGeneralDistributionAgreementV1 - .FlowDistributionData({ flowRate: flowRate, lastUpdated: uint32(block.timestamp), buffer: buffer }); + FlowDistributionData memory original = + FlowDistributionData({ flowRate: flowRate, lastUpdated: uint32(block.timestamp), buffer: buffer }); bytes32[] memory encoded = _encodeFlowDistributionData(original); - (, IGeneralDistributionAgreementV1.FlowDistributionData memory decoded) = - _decodeFlowDistributionData(uint256(encoded[0])); + (, FlowDistributionData memory decoded) = _decodeFlowDistributionData(uint256(encoded[0])); assertEq(original.flowRate, decoded.flowRate, "flowRate not equal"); assertEq(original.buffer, decoded.buffer, "buffer not equal"); assertEq(original.lastUpdated, decoded.lastUpdated, "lastUpdated not equal"); } - function testEncodeDecodePoolMemberData(address pool, uint32 poolID) public { + function testEncodeDecodePoolMemberData(address pool, uint32 poolID) public pure { vm.assume(pool != address(0)); - IGeneralDistributionAgreementV1.PoolMemberData memory original = - IGeneralDistributionAgreementV1.PoolMemberData({ pool: pool, poolID: poolID }); + PoolMemberData memory original = PoolMemberData({ pool: pool, poolID: poolID }); bytes32[] memory encoded = _encodePoolMemberData(original); - (, IGeneralDistributionAgreementV1.PoolMemberData memory decoded) = _decodePoolMemberData(uint256(encoded[0])); + (, PoolMemberData memory decoded) = _decodePoolMemberData(uint256(encoded[0])); assertEq(original.pool, decoded.pool, "pool not equal"); assertEq(original.poolID, decoded.poolID, "poolID not equal"); diff --git a/packages/ethereum-contracts/contracts/mocks/SuperfluidPoolUpgradabilityMock.sol b/packages/ethereum-contracts/test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol similarity index 85% rename from packages/ethereum-contracts/contracts/mocks/SuperfluidPoolUpgradabilityMock.sol rename to packages/ethereum-contracts/test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol index 8af9ec6002..92f0922920 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperfluidPoolUpgradabilityMock.sol +++ b/packages/ethereum-contracts/test/foundry/agreements/gdav1/SuperfluidPoolUpgradabilityMock.t.sol @@ -1,14 +1,16 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -import { GeneralDistributionAgreementV1 } from "../agreements/gdav1/GeneralDistributionAgreementV1.sol"; -import { SuperfluidPool } from "../agreements/gdav1/SuperfluidPool.sol"; -import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; +import { + GeneralDistributionAgreementV1 +} from "../../../../contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol"; +import { SuperfluidPool } from "../../../../contracts/agreements/gdav1/SuperfluidPool.sol"; +import { StorageLayoutTestBase } from "../../StorageLayoutTestBase.t.sol"; /// @title SuperfluidPoolStorageLayoutMock /// @notice A mock SuperfluidPool contract for testing storage layout. /// @dev This contract *MUST* have the same storage layout as SuperfluidPool. -contract SuperfluidPoolStorageLayoutMock is SuperfluidPool, IStorageLayoutBase { +contract SuperfluidPoolStorageLayoutMock is SuperfluidPool, StorageLayoutTestBase { constructor(GeneralDistributionAgreementV1 gda_) SuperfluidPool(gda_) { } function validateStorageLayout() public pure { diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppBaseFlow.t.sol b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol similarity index 87% rename from packages/ethereum-contracts/test/foundry/apps/SuperAppBaseFlow.t.sol rename to packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol index a117664b37..eefa08c094 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppBaseFlow.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBase.t.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/console.sol"; + import "../FoundrySuperfluidTester.sol"; -import { SuperAppBaseFlow } from "../../../contracts/apps/SuperAppBaseFlow.sol"; -import { SuperAppBaseFlowTester } from "../../../contracts/mocks/SuperAppBaseFlowTester.sol"; + import { ISuperToken, ISuperApp, @@ -12,12 +12,15 @@ import { } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; +import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; -contract SuperAppBaseFlowTest is FoundrySuperfluidTester { +import { CFASuperAppBaseTester } from "./CFASuperAppBaseTester.t.sol"; + +contract CFASuperAppBaseTest is FoundrySuperfluidTester { using SuperTokenV1Library for SuperToken; using SuperTokenV1Library for ISuperToken; - SuperAppBaseFlowTester superApp; + CFASuperAppBaseTester superApp; address superAppAddress; ISuperToken otherSuperToken; @@ -26,7 +29,8 @@ contract SuperAppBaseFlowTest is FoundrySuperfluidTester { function setUp() public virtual override { super.setUp(); vm.startPrank(admin); - superApp = new SuperAppBaseFlowTester(sf.host, true, true, true); + superApp = new CFASuperAppBaseTester(sf.host); + superApp.selfRegister(true, true, true); superAppAddress = address(superApp); otherSuperToken = sfDeployer.deployPureSuperToken("FTT", "FTT", 1e27); otherSuperToken.transfer(alice, 1e21); @@ -60,25 +64,36 @@ contract SuperAppBaseFlowTest is FoundrySuperfluidTester { function _deploySuperAppAndGetConfig(bool activateOnCreated, bool activateOnUpdated, bool activateOnDeleted) internal - returns (SuperAppBaseFlowTester, uint256 configWord) + returns (CFASuperAppBaseTester, uint256 configWord) { - SuperAppBaseFlowTester mySuperApp = - new SuperAppBaseFlowTester(sf.host, activateOnCreated, activateOnUpdated, activateOnDeleted); + CFASuperAppBaseTester mySuperApp = new CFASuperAppBaseTester(sf.host); + mySuperApp.selfRegister(activateOnCreated, activateOnUpdated, activateOnDeleted); uint256 appConfig = _genManifest(activateOnCreated, activateOnUpdated, activateOnDeleted); return (mySuperApp, appConfig); } function testOnFlagsSetAppManifest(bool activateOnCreated, bool activateOnUpdated, bool activateOnDeleted) public { //all onOperations - (SuperAppBaseFlowTester mySuperApp, uint256 configWord) = + (CFASuperAppBaseTester mySuperApp, uint256 configWord) = _deploySuperAppAndGetConfig(activateOnCreated, activateOnUpdated, activateOnDeleted); + (bool isSuperApp,, uint256 noopMask) = sf.host.getAppManifest(ISuperApp(mySuperApp)); configWord = configWord & SuperAppDefinitions.AGREEMENT_CALLBACK_NOOP_BITMASKS; assertTrue(isSuperApp, "SuperAppBase: is superApp incorrect"); assertEq(noopMask, configWord, "SuperAppBase: noopMask != configWord"); } - function testAllowAllSuperTokensByDefault() public { + function testRegistrationByFactory(bool activateOnCreated, bool activateOnUpdated, bool activateOnDeleted) public { + CFASuperAppBaseTester mySuperApp = new CFASuperAppBaseTester(sf.host); + sf.host.registerApp( + mySuperApp, + mySuperApp.getConfigWord(activateOnCreated, activateOnUpdated, activateOnDeleted) + ); + (bool isSuperApp,,) = sf.host.getAppManifest(ISuperApp(mySuperApp)); + assertTrue(isSuperApp, "SuperAppBase: is superApp incorrect"); + } + + function testAllowAllSuperTokensByDefault() public view { assertTrue( superApp.isAcceptedSuperToken(superToken), "SuperAppBase: unrestricted | primary SuperToken accepted" ); @@ -103,10 +118,10 @@ contract SuperAppBaseFlowTest is FoundrySuperfluidTester { function testUnauthorizedHost() public { vm.startPrank(eve); - vm.expectRevert(SuperAppBaseFlow.UnauthorizedHost.selector); + vm.expectRevert(CFASuperAppBase.UnauthorizedHost.selector); superApp.afterAgreementCreated(superToken, address(sf.cfa), "0x", "0x", "0x", "0x"); - vm.expectRevert(SuperAppBaseFlow.UnauthorizedHost.selector); + vm.expectRevert(CFASuperAppBase.UnauthorizedHost.selector); superApp.afterAgreementUpdated(superToken, address(sf.cfa), "0x", "0x", "0x", "0x"); // termination callback doesn't revert, but should have no side effects @@ -229,7 +244,7 @@ contract SuperAppBaseFlowTest is FoundrySuperfluidTester { vm.startPrank(alice); // enable the filter superApp.setAcceptedSuperToken(superToken, true); - vm.expectRevert(SuperAppBaseFlow.NotAcceptedSuperToken.selector); + vm.expectRevert(CFASuperAppBase.NotAcceptedSuperToken.selector); sf.host.callAgreement( sf.cfa, abi.encodeCall(sf.cfa.createFlow, (otherSuperToken, address(superApp), int96(69), new bytes(0))), diff --git a/packages/ethereum-contracts/contracts/mocks/SuperAppBaseFlowTester.sol b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBaseTester.t.sol similarity index 82% rename from packages/ethereum-contracts/contracts/mocks/SuperAppBaseFlowTester.sol rename to packages/ethereum-contracts/test/foundry/apps/CFASuperAppBaseTester.t.sol index 03ca99b133..48fbb81d27 100644 --- a/packages/ethereum-contracts/contracts/mocks/SuperAppBaseFlowTester.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CFASuperAppBaseTester.t.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -import { ISuperfluid, ISuperToken } from "../interfaces/superfluid/ISuperfluid.sol"; -import { SuperAppBaseFlow } from "../apps/SuperAppBaseFlow.sol"; -import { SuperTokenV1Library } from "../apps/SuperTokenV1Library.sol"; +import { ISuperfluid, ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; +import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -contract SuperAppBaseFlowTester is SuperAppBaseFlow { +contract CFASuperAppBaseTester is CFASuperAppBase { using SuperTokenV1Library for ISuperToken; int96 public oldFlowRateHolder; @@ -17,8 +17,10 @@ contract SuperAppBaseFlowTester is SuperAppBaseFlow { // irreversibly set to true once the setter is invoked bool internal _restrictAcceptedSuperTokens; - constructor(ISuperfluid host, bool activateOnCreated, bool activateOnUpdated, bool activateOnDeleted) - SuperAppBaseFlow(host, activateOnCreated, activateOnUpdated, activateOnDeleted, "") + constructor( + ISuperfluid host + ) + CFASuperAppBase(host) { lastUpdateHolder = 0; // appeasing linter } diff --git a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol index 33a68b8572..570e04dfd8 100644 --- a/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/CrossStreamSuperApp.t.sol @@ -1,7 +1,9 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -import { CrossStreamSuperApp } from "../../../contracts/mocks/CrossStreamSuperApp.sol"; +import { ISuperfluid, ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { CFASuperAppBase } from "../../../contracts/apps/CFASuperAppBase.sol"; +import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; @@ -11,6 +13,45 @@ import "forge-std/Test.sol"; using SuperTokenV1Library for ISuperToken; +/// @title CrossStreamSuperApp +/// @author Superfluid +/// @dev A super app used for testing "cross-stream" flows in callbacks +/// and its behavior surrounding the internal protocol accounting. +/// That is, two senders sending a flow to the super app +contract CrossStreamSuperApp is CFASuperAppBase { + address public flowRecipient; + address public prevSender; + int96 public prevFlowRate; + + constructor(ISuperfluid host_, address z_) CFASuperAppBase(host_) { + selfRegister(true, true, true); + flowRecipient = z_; + } + + function onFlowCreated(ISuperToken superToken, address sender, bytes calldata ctx) + internal + override + returns (bytes memory newCtx) + { + newCtx = ctx; + + // get incoming stream + int96 inFlowRate = superToken.getFlowRate(sender, address(this)); + + if (prevSender == address(0)) { + // first flow to super app creates a flow + newCtx = superToken.createFlowWithCtx(flowRecipient, inFlowRate, newCtx); + } else { + // subsequent flows to super app updates and deletes the flow + newCtx = superToken.updateFlowWithCtx(flowRecipient, inFlowRate, newCtx); + newCtx = superToken.deleteFlowWithCtx(prevSender, address(this), newCtx); + } + + prevSender = sender; + prevFlowRate = inFlowRate; + } +} + contract CrossStreamSuperAppTest is FoundrySuperfluidTester { CrossStreamSuperApp public superApp; @@ -23,14 +64,13 @@ contract CrossStreamSuperAppTest is FoundrySuperfluidTester { _addAccount(address(superApp)); } - function testNoTokensMintedOrBurnedInCrossStreamSuperApp(int96 flowRate, uint64 blockTimestamp) public { - vm.assume(flowRate < 1e14); + function testNoTokensMintedOrBurnedInCrossStreamSuperApp(int96 flowRate, uint32 blockTimestamp) public { // @note due to clipping, there is precision loss, therefore if the flow rate is too low // tokens will be unrecoverable - vm.assume(flowRate > 2 ** 32 - 1); + flowRate = int96(bound(flowRate, 2 ** 31 - 1, 1e14)); int96 initialFlowRate = flowRate; - // @note transfer tokens from alice to carol so that + // @note transfer tokens from alice to carol so that // alice has type(uint64).max balance to start uint256 diff = type(uint88).max - type(uint64).max; vm.startPrank(alice); diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol index 23932e4dc4..808b9f34bb 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/FlowSplitter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // code taken from: // https://github.com/superfluid-finance/super-examples/blob/main/projects/flow-splitter/contracts/FlowSplitter.sol @@ -8,13 +8,13 @@ pragma solidity 0.8.19; // import "hardhat/console.sol"; import { SuperTokenV1Library } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperTokenV1Library.sol"; -import { SuperAppBaseFlow } from "@superfluid-finance/ethereum-contracts/contracts/apps/SuperAppBaseFlow.sol"; +import { CFASuperAppBase } from "@superfluid-finance/ethereum-contracts/contracts/apps/CFASuperAppBase.sol"; import { ISuperfluid, ISuperToken } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; -contract FlowSplitter is SuperAppBaseFlow { +contract FlowSplitter is CFASuperAppBase { using SuperTokenV1Library for ISuperToken; /// @dev Account that ought to be routed the majority of the inflows @@ -36,7 +36,8 @@ contract FlowSplitter is SuperAppBaseFlow { int96 _sideReceiverPortion, ISuperToken _acceptedSuperToken, ISuperfluid _host - ) SuperAppBaseFlow(_host, true, true, true, "") { + ) CFASuperAppBase(_host) { + selfRegister(true, true, true); mainReceiver = _mainReceiver; sideReceiver = _sideReceiver; sideReceiverPortion = _sideReceiverPortion; diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol index 699ee33eee..797b5f0fa1 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/SuperAppTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "forge-std/console.sol"; @@ -16,11 +16,11 @@ abstract contract SuperAppInvariants is Test { ISuperApp public superApp; Handler public handler; // Focus test to a set of operations - function invariant_AppNeverJailed() public InitializeTests { + function invariant_AppNeverJailed() external view InitializeTests { assertTrue(!host.isAppJailed(superApp)); } - function invariant_AppRegistered() external InitializeTests { + function invariant_AppRegistered() external view InitializeTests { assertTrue(host.isApp(superApp)); } diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol index e7faae2538..46bbda62d6 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/Handler.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "./IStreamHandler.sol"; diff --git a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol index d342b29fa4..37fd6ce25a 100644 --- a/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol +++ b/packages/ethereum-contracts/test/foundry/apps/SuperAppTester/handlers/IStreamHandler.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // Interface to define expected behavior of a stream handler. // We are defining a stream operation as a create, update, or delete flow. diff --git a/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol b/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol index 813e4487bd..c25489a0a1 100644 --- a/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol +++ b/packages/ethereum-contracts/test/foundry/echidna/EchidnaTestCases.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; +import { FoundrySuperfluidTester } from "../../foundry/FoundrySuperfluidTester.sol"; import { ISuperfluidPool, SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; diff --git a/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol b/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol index 6305d82130..8ce9cbda94 100644 --- a/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol +++ b/packages/ethereum-contracts/test/foundry/gov/SuperfluidGovernanceII.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "../FoundrySuperfluidTester.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; @@ -7,7 +7,6 @@ import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToke import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperAgreement } from "../../../contracts/interfaces/superfluid/ISuperAgreement.sol"; import { ISuperfluid } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { AgreementMock } from "../../../contracts/mocks/AgreementMock.sol"; import { SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; contract SuperfluidGovernanceIntegrationTest is FoundrySuperfluidTester { @@ -68,7 +67,7 @@ contract SuperfluidGovernanceIntegrationTest is FoundrySuperfluidTester { "testUpdateContractsToUpgradePoolBeaconLogic: pool beacon logic not upgraded" ); } - + function testRevertUpgradePoolBeaconLogicWhenNotGovernance() public { SuperfluidPool newPoolLogic = new SuperfluidPool(sf.gda); vm.expectRevert(); diff --git a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.sol b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol similarity index 90% rename from packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.sol rename to packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol index 817ee18c39..3e4612da59 100644 --- a/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.sol +++ b/packages/ethereum-contracts/test/foundry/libs/AgreementLibrary.prop.t.sol @@ -1,12 +1,12 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { AgreementLibrary } from "../../../contracts/agreements/AgreementLibrary.sol"; import "forge-std/Test.sol"; contract AgreementLibraryPropertyTest is Test { - function testAdjustNewAppCreditUsed(uint256 appCreditGranted, int256 appCreditUsed) public { + function testAdjustNewAppCreditUsed(uint256 appCreditGranted, int256 appCreditUsed) public pure { vm.assume(appCreditGranted <= uint256(type(int256).max)); vm.assume(appCreditUsed <= type(int256).max); int256 adjustedAppCreditUsed = AgreementLibrary._adjustNewAppCreditUsed(appCreditGranted, appCreditUsed); diff --git a/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol b/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol index a0b9065fb2..9a68c67c43 100644 --- a/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol +++ b/packages/ethereum-contracts/test/foundry/libs/CallUtils.t.sol @@ -1,18 +1,18 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { CallUtils } from "../../../contracts/libs/CallUtils.sol"; contract CallUtilsAnvil is Test { - function testPadLength32(uint256 len) public { + function testPadLength32(uint256 len) public pure { // rounding up the maximum value will overflow the function, so we skip these values vm.assume(len <= type(uint256).max - 32); assertTrue(CallUtils.padLength32(len) % 32 == 0); } - function testIsValidAbiEncodedBytes(bytes memory data) public { + function testIsValidAbiEncodedBytes(bytes memory data) public pure { assertTrue(CallUtils.isValidAbiEncodedBytes(abi.encode(data))); } diff --git a/packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol b/packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol new file mode 100644 index 0000000000..3328352796 --- /dev/null +++ b/packages/ethereum-contracts/test/foundry/libs/CallbackUtils.t.sol @@ -0,0 +1,71 @@ +pragma solidity ^0.8.23; + +import "forge-std/Test.sol"; + +import { CallbackUtils } from "../../../contracts/libs/CallbackUtils.sol"; + +contract CallbackUtilsTest is Test { + function testInsufficientCbGasZone(bool isStaticCall, uint256 callbackGasLimit) external { + callbackGasLimit = _boundCallbackGasLimit(callbackGasLimit); + // Non-exhaustive binary search for a counter case + for (uint256 gasLimit = callbackGasLimit / 2; + gasLimit <= callbackGasLimit; + gasLimit += (callbackGasLimit - gasLimit) / 2 + 1) { + try this._stubCall{ gas: gasLimit }(callbackGasLimit, isStaticCall) + returns (bool success, bool insufficientCallbackGasProvided, bytes memory) { + assertFalse(success, "Unexpected success"); + assertTrue(insufficientCallbackGasProvided, "Expected insufficientCallbackGasProvided"); + } catch { } + } + } + + function testOutOfCbGasZone(bool isStaticCall, uint256 callbackGasLimit) external { + callbackGasLimit = _boundCallbackGasLimit(callbackGasLimit); + // Heuristically, it should not take more than few steps going from transitional zone to + // out-of-callback-gas zone + bool transitioned = false; + for (uint256 i = 0; i < 20; i++) { + uint256 gasLimit = callbackGasLimit + + callbackGasLimit / (CallbackUtils.EIP150_MAGIC_N - i); + (bool success, bool insufficientCallbackGasProvided, bytes memory reason) = + this._stubCall{ gas: gasLimit } (callbackGasLimit, isStaticCall); + if (success) { + console.log("GasLimit %d / %d", gasLimit, callbackGasLimit); + assertTrue(false, "Unexpected success"); + break; + } else { + console.log("GasLimit %d / %d = %d, ", gasLimit, callbackGasLimit, + callbackGasLimit * 100 / (gasLimit - callbackGasLimit)); + console.log("reason length %d", reason.length); + if (!insufficientCallbackGasProvided) { + transitioned = true; + break; + } + } + } + assertTrue(transitioned, "out-of-callback-gas zone not found"); + } + + function _boundCallbackGasLimit(uint256 callbackGasLimit) internal pure returns (uint256) { + return bound(callbackGasLimit, 500e3, 10e6); // 500k to 10M + } + + // This is the opcode 0xfe consumes all the rest of the gas + function _gasUnlimitedEater() external pure { CallbackUtils.consumeAllGas(); } + + function _stubCall(uint256 callbackGasLimit, bool isStaticCall) external + returns (bool success, bool insufficientCallbackGasProvided, bytes memory returnedData) + { + bytes memory callData = abi.encodeCall(this._gasUnlimitedEater, ()); + if (isStaticCall) { + (success, insufficientCallbackGasProvided, returnedData) = + CallbackUtils.staticCall(address(this), callData, callbackGasLimit); + } else { + (success, insufficientCallbackGasProvided, returnedData) = + CallbackUtils.externalCall(address(this), callData, callbackGasLimit); + } + if (insufficientCallbackGasProvided) + assertFalse(success, "insufficientCallbackGasProvided only when !success"); + } +} + diff --git a/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.sol b/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol similarity index 99% rename from packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.sol rename to packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol index 81a13cf044..b1c64df1e2 100644 --- a/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.sol +++ b/packages/ethereum-contracts/test/foundry/libs/SlotsBitmapLibrary.prop.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { ERC1820RegistryCompiled } from "../../../contracts/libs/ERC1820RegistryCompiled.sol"; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol deleted file mode 100644 index 37e635dec3..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantInflowNFT.t.sol +++ /dev/null @@ -1,141 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { ConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { IFlowNFTBase } from "../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { FlowNFTBase, ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { FlowNFTBaseTest } from "./FlowNFTBase.t.sol"; - -contract ConstantInflowNFTTest is FlowNFTBaseTest { - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testRevertIfMintIsNotCalledByOutflowNFT(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(constantOutflowNFT)); - vm.expectRevert(IConstantInflowNFT.CIF_NFT_ONLY_CONSTANT_OUTFLOW.selector); - constantInflowNFT.mint(address(0), 69); - } - - function testRevertIfBurnIsNotCalledByOutflowNFT(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(constantOutflowNFT)); - vm.expectRevert(IConstantInflowNFT.CIF_NFT_ONLY_CONSTANT_OUTFLOW.selector); - constantInflowNFT.burn(69); - } - - function testRevertIfYouTryToTransferInflowNFT(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - - vm.startPrank(_flowReceiver); - vm.expectRevert(IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector); - constantInflowNFT.transferFrom(_flowReceiver, _flowSender, nftId); - vm.stopPrank(); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testProxiableUUIDIsExpectedValue() public { - assertEq( - constantInflowNFT.proxiableUUID(), - keccak256("org.superfluid-finance.contracts.ConstantInflowNFT.implementation") - ); - } - - function testConstantInflowNFTIsProperlyInitialized() public { - assertEq(constantInflowNFT.name(), INFLOW_NFT_NAME_TEMPLATE); - assertEq(constantInflowNFT.symbol(), INFLOW_NFT_SYMBOL_TEMPLATE); - } - - function testFlowDataByTokenIdMint(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - IFlowNFTBase.FlowNFTData memory flowData = constantInflowNFT.flowDataByTokenId(nftId); - assertEq(flowData.flowSender, _flowSender); - assertEq(flowData.flowReceiver, _flowReceiver); - } - - function testInternalMintToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventTransfer(address(constantInflowNFT), address(0), _flowReceiver, nftId); - - constantInflowNFT.mockMint(_flowReceiver, nftId); - - _assertNFTFlowDataStateIsEmpty(nftId); - } - - function testInternalBurnToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - _assertEventTransfer(address(constantInflowNFT), _flowReceiver, address(0), nftId); - - constantInflowNFT.mockBurn(nftId); - - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - } - - function testApprove(address _flowSender, address _flowReceiver, address _approvedAccount) - public - override - returns (uint256 nftId) - { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - vm.assume(_flowReceiver != _approvedAccount); - - nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - _assertEventApproval(address(constantInflowNFT), _flowReceiver, _approvedAccount, nftId); - - vm.startPrank(_flowReceiver); - constantInflowNFT.approve(_approvedAccount, nftId); - vm.stopPrank(); - - _assertApprovalIsExpected(constantInflowNFT, nftId, _approvedAccount); - } - - function testApproveThenBurn(address _flowSender, address _flowReceiver, address _approvedAccount) public { - uint256 nftId = testApprove(_flowSender, _flowReceiver, _approvedAccount); - constantInflowNFT.mockBurn(nftId); - - assertEq(constantInflowNFT.mockGetApproved(nftId), address(0)); - } - - function testSetApprovalForAll(address _tokenOwner, address _operator, bool _approved) public { - vm.assume(_tokenOwner != address(0)); - vm.assume(_tokenOwner != _operator); - - vm.startPrank(_tokenOwner); - _assertEventApprovalForAll(address(constantInflowNFT), _tokenOwner, _operator, _approved); - constantInflowNFT.setApprovalForAll(_operator, _approved); - vm.stopPrank(); - - _assertOperatorApprovalIsExpected(constantInflowNFT, _tokenOwner, _operator, _approved); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol deleted file mode 100644 index b543431680..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/ConstantOutflowNFT.t.sol +++ /dev/null @@ -1,286 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; -import { - FlowNFTBase, ConstantOutflowNFT, IConstantOutflowNFT -} from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; -import { IFlowNFTBase } from "../../../contracts/interfaces/superfluid/IFlowNFTBase.sol"; -import { FlowNFTBaseTest } from "./FlowNFTBase.t.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; -import { ConstantOutflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { NoNFTSuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; -import { TestToken } from "../../../contracts/utils/TestToken.sol"; -import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; - -contract ConstantOutflowNFTTest is FlowNFTBaseTest { - using Strings for uint256; - using SuperTokenV1Library for ISuperToken; - using SuperTokenV1Library for SuperTokenMock; - - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testRevertIfInternalMintToZeroAddress(address _flowReceiver) public { - uint256 nftId = _helperGetNFTID(address(superTokenMock), address(0), _flowReceiver); - vm.expectRevert(); - constantOutflowNFT.mockMint(address(superTokenMock), address(0), _flowReceiver, nftId); - } - - function testRevertIfInternalMintTokenThatExists(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - vm.expectRevert(); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - } - - function testRevertIfInternalMintSameToAndFlowReceiver(address _flowSender) public { - vm.assume(_flowSender != address(0)); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowSender); - vm.expectRevert(); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowSender, nftId); - } - - function testRevertIfOnCreateIsNotCalledByFlowAgreement(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(sf.cfa)); - _assumeCallerIsNotOtherAddress(caller, address(sf.gda)); - - vm.expectRevert(IConstantOutflowNFT.COF_NFT_ONLY_FLOW_AGREEMENTS.selector); - vm.prank(caller); - constantOutflowNFT.onCreate(superToken, address(1), address(2)); - } - - function testRevertIfOnUpdateIsNotCalledByFlowAgreement(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(sf.cfa)); - _assumeCallerIsNotOtherAddress(caller, address(sf.gda)); - - vm.startPrank(caller); - vm.expectRevert(IConstantOutflowNFT.COF_NFT_ONLY_FLOW_AGREEMENTS.selector); - constantOutflowNFT.onUpdate(superToken, address(1), address(2)); - vm.stopPrank(); - } - - function testRevertIfOnDeleteIsNotCalledByFlowAgreement(address caller) public { - _assumeCallerIsNotOtherAddress(caller, address(sf.cfa)); - _assumeCallerIsNotOtherAddress(caller, address(sf.gda)); - vm.prank(caller); - vm.expectRevert(IConstantOutflowNFT.COF_NFT_ONLY_FLOW_AGREEMENTS.selector); - constantOutflowNFT.onDelete(superToken, address(1), address(2)); - } - - function testRevertIfGetNoFlowTokenURI() public { - uint256 nftId = _helperGetNFTID(address(superTokenMock), alice, bob); - vm.expectRevert(); - constantOutflowNFT.tokenURI(nftId); - vm.expectRevert(); - constantInflowNFT.tokenURI(nftId); - } - - function testRevertIfYouTryToTransferOutflowNFT(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - - vm.startPrank(_flowSender); - vm.expectRevert(IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector); - constantOutflowNFT.transferFrom(_flowSender, _flowReceiver, nftId); - vm.stopPrank(); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testProxiableUUIDIsExpectedValue() public { - assertEq( - constantOutflowNFT.proxiableUUID(), - keccak256("org.superfluid-finance.contracts.ConstantOutflowNFT.implementation") - ); - } - - function testConstantOutflowNFTIsProperlyInitialized() public { - assertEq(constantOutflowNFT.name(), OUTFLOW_NFT_NAME_TEMPLATE); - assertEq(constantOutflowNFT.symbol(), OUTFLOW_NFT_SYMBOL_TEMPLATE); - } - - function testInternalMintToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventTransfer(address(constantOutflowNFT), address(0), _flowSender, nftId); - - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - } - - function testInternalBurnToken(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - _assertEventTransfer(address(constantOutflowNFT), _flowSender, address(0), nftId); - - constantOutflowNFT.mockBurn(nftId); - _assertNFTFlowDataStateIsEmpty(nftId); - } - - function testApprove(address _flowSender, address _flowReceiver, address _approvedAccount) - public - override - returns (uint256 nftId) - { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - vm.assume(_flowSender != _approvedAccount); - - nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - constantOutflowNFT.mockMint(address(superTokenMock), _flowSender, _flowReceiver, nftId); - - _assertEventApproval(address(constantOutflowNFT), _flowSender, _approvedAccount, nftId); - - vm.startPrank(_flowSender); - constantOutflowNFT.approve(_approvedAccount, nftId); - vm.stopPrank(); - - _assertApprovalIsExpected(constantOutflowNFT, nftId, _approvedAccount); - } - - function testApproveThenBurn(address _flowSender, address _flowReceiver, address _approvedAccount) public { - uint256 nftId = testApprove(_flowSender, _flowReceiver, _approvedAccount); - constantOutflowNFT.mockBurn(nftId); - - assertEq(constantOutflowNFT.mockGetApproved(nftId), address(0)); - } - - function testSetApprovalForAll(address _tokenOwner, address _operator, bool _approved) public { - vm.assume(_tokenOwner != address(0)); - vm.assume(_tokenOwner != _operator); - - - vm.startPrank(_tokenOwner); - _assertEventApprovalForAll(address(constantOutflowNFT), _tokenOwner, _operator, _approved); - constantOutflowNFT.setApprovalForAll(_operator, _approved); - vm.stopPrank(); - - _assertOperatorApprovalIsExpected(constantOutflowNFT, _tokenOwner, _operator, _approved); - } - - function testCreateFlowMintsOutflowAndInflowNFTsAndEmitsTransferEvents() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - } - - function testUpdateFlowDoesNotImpactStorageAndEmitsMetadataUpdateEvents() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - _assertEventMetadataUpdate(address(constantOutflowNFT), nftId); - _assertEventMetadataUpdate(address(constantInflowNFT), nftId); - - vm.prank(flowSender); - superTokenMock.updateFlow(flowReceiver, flowRate + 333); - - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), flowSender, uint32(block.timestamp), flowReceiver - ); - } - - function testDeleteFlowClearsStorageAndEmitsTransferEvents() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - - _assertEventTransfer(address(constantInflowNFT), flowReceiver, address(0), nftId); - - _assertEventTransfer(address(constantOutflowNFT), flowSender, address(0), nftId); - - vm.prank(flowSender); - superTokenMock.deleteFlow(flowSender, flowReceiver); - - _assertNFTFlowDataStateIsEmpty(nftId); - } - - function testTokenURIIsExpected() public { - int96 flowRate = 42069; - address flowSender = alice; - address flowReceiver = bob; - _helperCreateFlowAndAssertNFTInvariants(flowSender, flowReceiver, flowRate); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), flowSender, flowReceiver); - - assertEq( - constantOutflowNFT.tokenURI(nftId), - string( - abi.encodePacked( - "https://nft.superfluid.finance/cfa/v2/getmeta?flowRate=", - uint256(uint96(flowRate)).toString(), - "&outgoing=true", - "&token_address=", - Strings.toHexString(uint256(uint160(address(superTokenMock))), 20), - "&chain_id=", - block.chainid.toString(), - "&token_symbol=", - superTokenMock.symbol(), - "&sender=", - Strings.toHexString(uint256(uint160(flowSender)), 20), - "&receiver=", - Strings.toHexString(uint256(uint160(flowReceiver)), 20), - "&token_decimals=", - uint256(superTokenMock.decimals()).toString(), - "&start_date=1" // timestamp shifts 1 - ) - ) - ); - } - - function testCreateUpdateDeleteFlowNoNFTToken() public { - uint256 initialAmount = 10000 ether; - TestToken testToken = new TestToken("Test", "TS", 18, initialAmount); - NoNFTSuperTokenMock noNFTSuperTokenMock = new NoNFTSuperTokenMock( - sf.host - ); - noNFTSuperTokenMock.initialize(testToken, 18, "Super Test", "TSx"); - vm.startPrank(alice); - testToken.mint(alice, initialAmount); - testToken.approve(address(noNFTSuperTokenMock), initialAmount); - noNFTSuperTokenMock.upgrade(initialAmount); - ISuperToken(address(noNFTSuperTokenMock)).createFlow(bob, 100); - (, int96 flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 100); - ISuperToken(address(noNFTSuperTokenMock)).updateFlow(bob, 150); - (, flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 150); - ISuperToken(address(noNFTSuperTokenMock)).updateFlow(bob, 90); - (, flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 90); - ISuperToken(address(noNFTSuperTokenMock)).deleteFlow(alice, bob); - (, flowRate,,) = sf.cfa.getFlow(noNFTSuperTokenMock, alice, bob); - assertEq(flowRate, 0); - vm.stopPrank(); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol index 21951ba2a9..befdcadd4d 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/ERC721.t.sol @@ -1,37 +1,24 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC721Metadata } from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { PoolAdminNFTMock, PoolMemberNFTMock } from "../../../contracts/mocks/PoolNFTMock.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; +import { PoolAdminNFTMock, PoolMemberNFTMock } from "./PoolNFTMock.t.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; +import { SuperToken, SuperTokenMock, IConstantOutflowNFT, IConstantInflowNFT } from "../../../contracts/mocks/SuperTokenMock.t.sol"; contract ERC721IntegrationTest is FoundrySuperfluidTester { string internal constant POOL_MEMBER_NFT_NAME_TEMPLATE = "Pool Member NFT"; string internal constant POOL_MEMBER_NFT_SYMBOL_TEMPLATE = "PMF"; string internal constant POOL_ADMIN_NFT_NAME_TEMPLATE = "Pool Admin NFT"; string internal constant POOL_ADMIN_NFT_SYMBOL_TEMPLATE = "PAF"; - string internal constant OUTFLOW_NFT_NAME_TEMPLATE = "Constant Outflow NFT"; - string internal constant OUTFLOW_NFT_SYMBOL_TEMPLATE = "COF"; - string internal constant INFLOW_NFT_NAME_TEMPLATE = "Constant Inflow NFT"; - string internal constant INFLOW_NFT_SYMBOL_TEMPLATE = "CIF"; SuperTokenMock public superTokenMock; - ConstantOutflowNFTMock public constantOutflowNFTLogic; - ConstantInflowNFTMock public constantInflowNFTLogic; - - ConstantOutflowNFTMock public constantOutflowNFT; - ConstantInflowNFTMock public constantInflowNFT; - PoolMemberNFTMock public poolMemberNFTLogic; PoolAdminNFTMock public poolAdminNFTLogic; @@ -51,40 +38,6 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { function setUp() public virtual override { super.setUp(); - // Deploy Flow NFTs - - // deploy outflow NFT contract - UUPSProxy outflowProxy = new UUPSProxy(); - - // deploy inflow NFT contract - UUPSProxy inflowProxy = new UUPSProxy(); - - // we deploy mock NFT contracts for the tests to access internal functions - constantOutflowNFTLogic = new ConstantOutflowNFTMock( - sf.host, - IConstantInflowNFT(address(inflowProxy)) - ); - constantInflowNFTLogic = new ConstantInflowNFTMock( - sf.host, - IConstantOutflowNFT(address(outflowProxy)) - ); - - constantOutflowNFTLogic.castrate(); - constantInflowNFTLogic.castrate(); - - // initialize proxy to point at logic - outflowProxy.initializeProxy(address(constantOutflowNFTLogic)); - - // initialize proxy to point at logic - inflowProxy.initializeProxy(address(constantInflowNFTLogic)); - - constantOutflowNFT = ConstantOutflowNFTMock(address(outflowProxy)); - constantInflowNFT = ConstantInflowNFTMock(address(inflowProxy)); - - constantOutflowNFT.initialize(OUTFLOW_NFT_NAME_TEMPLATE, OUTFLOW_NFT_SYMBOL_TEMPLATE); - - constantInflowNFT.initialize(INFLOW_NFT_NAME_TEMPLATE, INFLOW_NFT_SYMBOL_TEMPLATE); - // Deploy Pool NFTs // deploy pool member NFT contract @@ -94,8 +47,8 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { UUPSProxy poolAdminProxy = new UUPSProxy(); // we deploy mock NFT contracts for the tests to access internal functions - poolMemberNFTLogic = new PoolMemberNFTMock(sf.host); - poolAdminNFTLogic = new PoolAdminNFTMock(sf.host); + poolMemberNFTLogic = new PoolMemberNFTMock(sf.host, sf.gda); + poolAdminNFTLogic = new PoolAdminNFTMock(sf.host, sf.gda); poolMemberNFTLogic.castrate(); poolAdminNFTLogic.castrate(); @@ -114,12 +67,7 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { poolAdminNFT.initialize(POOL_ADMIN_NFT_NAME_TEMPLATE, POOL_ADMIN_NFT_SYMBOL_TEMPLATE); // Deploy TestToken - TestToken testTokenMock = new TestToken( - "Mock Test", - "MT", - 18, - 100000000 - ); + TestToken testTokenMock = new TestToken("Mock Test", "MT", 18, 100000000); // Deploy SuperToken proxy UUPSProxy superTokenMockProxy = new UUPSProxy(); @@ -128,8 +76,8 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { SuperTokenMock superTokenMockLogic = new SuperTokenMock( sf.host, 0, - IConstantOutflowNFT(address(constantOutflowNFT)), - IConstantInflowNFT(address(constantInflowNFT)), + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), IPoolAdminNFT(address(poolAdminNFT)), IPoolMemberNFT(address(poolMemberNFT)) ); @@ -210,8 +158,8 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { IERC721Metadata _nftContract, uint256 _tokenId, address _expectedOwner, - string memory _message - ) public { + string memory _message) public view + { // we use mockOwnerOf to overcome the CFA_NFT_INVALID_TOKEN_ID error address owner = PoolAdminNFTMock(address(_nftContract)).mockOwnerOf(_tokenId); @@ -219,7 +167,7 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { } function _assertApprovalIsExpected(IERC721Metadata _nftContract, uint256 _tokenId, address _expectedApproved) - public + public view { address approved = _nftContract.getApproved(_tokenId); @@ -231,7 +179,7 @@ contract ERC721IntegrationTest is FoundrySuperfluidTester { address _expectedOwner, address _expectedOperator, bool _expectedOperatorApproval - ) public { + ) public view { bool operatorApproval = _nftContract.isApprovedForAll(_expectedOwner, _expectedOperator); assertEq(operatorApproval, _expectedOperatorApproval); diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.sol deleted file mode 100644 index 1dc27a894c..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.prop.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; - -contract FlowNFTBasePropertyTest is FoundrySuperfluidTester { - constructor() FoundrySuperfluidTester(0) { } - - function setUp() public override { - super.setUp(); - } - - function testNoTokenIdCollisionDifferentTokenSameSenderReceiver(address tokenA, address tokenB) public { - vm.assume(tokenA != tokenB); - uint256 tokenIdA = superToken.CONSTANT_OUTFLOW_NFT().getTokenId(tokenA, alice, bob); - uint256 tokenIdB = superToken.CONSTANT_OUTFLOW_NFT().getTokenId(tokenB, alice, bob); - assertNotEq(tokenIdA, tokenIdB, "FlowNFTBaseProperties: Token Ids should differ"); - } - - function testBalanceOfIsAlwaysEqualToOne(address account) public { - uint256 balance = superToken.CONSTANT_OUTFLOW_NFT().balanceOf(account); - assertEq(balance, 1, "FlowNFTBaseProperties: Balance of should always be equal to one"); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol deleted file mode 100644 index 051dd52ebe..0000000000 --- a/packages/ethereum-contracts/test/foundry/superfluid/FlowNFTBase.t.sol +++ /dev/null @@ -1,415 +0,0 @@ -// SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; - -import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; -import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; -import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { - FlowNFTBase, - IFlowNFTBase, - ConstantOutflowNFT, - IConstantOutflowNFT -} from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; -import { IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; -import { IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { SuperToken, SuperTokenMock } from "../../../contracts/mocks/SuperTokenMock.sol"; -import { FlowNFTBaseMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { TestToken } from "../../../contracts/utils/TestToken.sol"; -import { - FlowNFTBaseStorageLayoutMock, - ConstantInflowNFTStorageLayoutMock, - ConstantOutflowNFTStorageLayoutMock -} from "../../../contracts/mocks/CFAv1NFTUpgradabilityMock.sol"; -import { ERC721IntegrationTest } from "./ERC721.t.sol"; - -abstract contract FlowNFTBaseTest is ERC721IntegrationTest { - using Strings for uint256; - using SuperTokenV1Library for SuperTokenMock; - using SuperTokenV1Library for SuperToken; - - string public constant NAME = "Flow NFT Base"; - string public constant SYMBOL = "FNFTB"; - - FlowNFTBaseMock public flowNFTBaseMock; - - function setUp() public virtual override { - super.setUp(); - flowNFTBaseMock = new FlowNFTBaseMock(sf.host); - flowNFTBaseMock.initialize(NAME, SYMBOL); - } - - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - - function testRevertIfContractAlreadyInitialized() public { - vm.expectRevert("Initializable: contract is already initialized"); - - flowNFTBaseMock.initialize(NAME, SYMBOL); - } - - function testRevertIfOwnerOfCalledForNonExistentToken(uint256 tokenId) public { - _helperRevertIfOwnerOf(flowNFTBaseMock, tokenId, IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - } - - function testRevertIfGetApprovedCalledForNonExistentToken(uint256 tokenId) public { - _helperRevertIfGetApproved(flowNFTBaseMock, tokenId, IFlowNFTBase.CFA_NFT_INVALID_TOKEN_ID.selector); - } - - function testRevertIfSetApprovalForAllOperatorApproveToCaller(address _flowSender) public { - vm.assume(_flowSender != address(0)); - - vm.startPrank(_flowSender); - vm.expectRevert(IFlowNFTBase.CFA_NFT_APPROVE_TO_CALLER.selector); - flowNFTBaseMock.setApprovalForAll(_flowSender, true); - vm.stopPrank(); - } - - function testRevertIfApproveToCurrentOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - vm.startPrank(_flowSender); - vm.expectRevert(IFlowNFTBase.CFA_NFT_APPROVE_TO_CURRENT_OWNER.selector); - flowNFTBaseMock.approve(_flowSender, nftId); - vm.stopPrank(); - } - - function testRevertIfApproveAsNonOwner( - address _flowSender, - address _flowReceiver, - address _approver, - address _approvedAccount - ) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - /// @dev _flowSender is owner of outflow NFT - vm.assume(_approver != _flowSender); - vm.assume(_approvedAccount != _flowSender); - - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - vm.expectRevert(IFlowNFTBase.CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector); - vm.startPrank(_approver); - flowNFTBaseMock.approve(_approvedAccount, nftId); - vm.stopPrank(); - } - - function testRevertIfTransferFrom(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfTransferFrom( - flowNFTBaseMock, - _flowSender, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector - ); - } - - function testRevertIfSafeTransferFrom(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowSender, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector - ); - } - - function testRevertIfTransferFromWithData(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowSender, - _flowSender, - _flowReceiver, - nftId, - "0x", - IFlowNFTBase.CFA_NFT_TRANSFER_IS_NOT_ALLOWED.selector - ); - } - - function testRevertIfTransferFromAsNonOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfTransferFrom( - flowNFTBaseMock, - _flowReceiver, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector - ); - } - - function testRevertIfSafeTransferFromAsNonOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowReceiver, - _flowSender, - _flowReceiver, - nftId, - IFlowNFTBase.CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector - ); - } - - function testRevertIfTransferFromWithDataAsNonOwner(address _flowSender, address _flowReceiver) public { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _helperRevertIfSafeTransferFrom( - flowNFTBaseMock, - _flowReceiver, - _flowSender, - _flowReceiver, - nftId, - "0x", - IFlowNFTBase.CFA_NFT_TRANSFER_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL.selector - ); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - function testContractSupportsExpectedInterfaces() public { - assertEq(flowNFTBaseMock.supportsInterface(type(IERC165).interfaceId), true); - assertEq(flowNFTBaseMock.supportsInterface(type(IERC721).interfaceId), true); - assertEq(flowNFTBaseMock.supportsInterface(type(IERC721Metadata).interfaceId), true); - } - - function testNFTBalanceOfIsAlwaysOne(address _owner) public { - assertEq(flowNFTBaseMock.balanceOf(_owner), 1); - } - - function testHostIsProperlySetInConstructor() public { - assertEq(address(flowNFTBaseMock.HOST()), address(sf.host)); - } - - function testCFAv1IsProperlySetInConstructor() public { - assertEq(address(flowNFTBaseMock.CONSTANT_FLOW_AGREEMENT_V1()), address(sf.cfa)); - } - - function testGDAv1IsProperlySetInConstructor() public { - assertEq(address(flowNFTBaseMock.GENERAL_DISTRIBUTION_AGREEMENT_V1()), address(sf.gda)); - } - - function testNFTMetadataIsProperlyInitialized() public { - assertEq(flowNFTBaseMock.name(), NAME); - assertEq(flowNFTBaseMock.symbol(), SYMBOL); - } - - function testTriggerMetadataUpdate(uint256 tokenId) public { - _assertEventMetadataUpdate(address(flowNFTBaseMock), tokenId); - flowNFTBaseMock.triggerMetadataUpdate(tokenId); - } - - function testTokenURI(uint256 tokenId) public { - assertEq(flowNFTBaseMock.tokenURI(tokenId), string(abi.encodePacked("tokenId=", tokenId.toString()))); - } - - function testApprove(address _flowSender, address _flowReceiver, address _approvedAccount) - public - virtual - returns (uint256 nftId) - { - _assumeSenderNEQReceiverAndNeitherAreZeroAddress(_flowSender, _flowReceiver); - vm.assume(_flowSender != _approvedAccount); - - nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - flowNFTBaseMock.mockMint(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventApproval(address(flowNFTBaseMock), _flowSender, _approvedAccount, nftId); - - vm.startPrank(_flowSender); - flowNFTBaseMock.approve(_approvedAccount, nftId); - vm.stopPrank(); - - _assertApprovalIsExpected(flowNFTBaseMock, nftId, _approvedAccount); - } - - /*////////////////////////////////////////////////////////////////////////// - Assertion Helpers - //////////////////////////////////////////////////////////////////////////*/ - function _assertNFTFlowDataStateIsExpected( - uint256 _tokenId, - address _expectedSuperToken, - address _expectedFlowSender, - uint32 _expectedFlowStartDate, - address _expectedFlowReceiver - ) public { - FlowNFTBase.FlowNFTData memory flowData = constantOutflowNFT.flowDataByTokenId(_tokenId); - - assertEq(flowData.superToken, _expectedSuperToken); - - // assert flow sender is equal to expected flow sender - assertEq(flowData.flowSender, _expectedFlowSender); - - // assert flow start date is equal to expected flow start date - assertEq(flowData.flowStartDate, _expectedFlowStartDate); - - // assert flow sender is equal to expected flow sender - assertEq(flowData.flowReceiver, _expectedFlowReceiver); - - // assert owner of outflow nft equal to expected flow sender - _assertOwnerOfIsExpected( - constantOutflowNFT, _tokenId, _expectedFlowSender, "ConstantOutflowNFT: owner of COF nft not as expected" - ); - - // assert owner of inflow nft equal to expected flow receiver - _assertOwnerOfIsExpected( - constantInflowNFT, _tokenId, _expectedFlowReceiver, "ConstantInflowNFT: owner of COF nft not as expected" - ); - } - - function _assertNFTFlowDataStateIsEmpty(uint256 _tokenId) public { - _assertNFTFlowDataStateIsExpected(_tokenId, address(0), address(0), 0, address(0)); - } - - /*////////////////////////////////////////////////////////////////////////// - Helper Functions - //////////////////////////////////////////////////////////////////////////*/ - function _helperGetNFTID(address _superToken, address _flowSender, address _flowReceiver) - public - view - returns (uint256) - { - return constantOutflowNFT.getTokenId(_superToken, _flowSender, _flowReceiver); - } - - function _helperCreateFlowAndAssertNFTInvariants(address _flowSender, address _flowReceiver, int96 _flowRate) - public - { - uint256 nftId = _helperGetNFTID(address(superTokenMock), _flowSender, _flowReceiver); - - _assertEventTransfer(address(constantOutflowNFT), address(0), _flowSender, nftId); - - _assertEventTransfer(address(constantInflowNFT), address(0), _flowReceiver, nftId); - - vm.startPrank(_flowSender); - superTokenMock.createFlow(_flowReceiver, _flowRate); - vm.stopPrank(); - _assertNFTFlowDataStateIsExpected( - nftId, address(superTokenMock), _flowSender, uint32(block.timestamp), _flowReceiver - ); - - (uint256 timestamp, int96 flowRate,,) = sf.cfa.getFlow(superTokenMock, _flowSender, _flowReceiver); - assertEq(timestamp, block.timestamp); - assertEq(flowRate, _flowRate); - } - - /*////////////////////////////////////////////////////////////////////////// - Assume Helpers - //////////////////////////////////////////////////////////////////////////*/ - function _assumeSenderNEQReceiverAndNeitherAreZeroAddress(address _flowSender, address _flowReceiver) public pure { - vm.assume(_flowSender != address(0)); - vm.assume(_flowReceiver != address(0)); - vm.assume(_flowSender != _flowReceiver); - } - - function _assumeCallerIsNotOtherAddress(address caller, address otherAddress) public pure { - vm.assume(caller != otherAddress); - } -} - -/// @title CFAv1NFTUpgradabilityTest -/// @author Superfluid -/// @notice Used for testing storage layout and upgradability of CFAv1 NFT contracts -contract CFAv1NFTUpgradabilityTest is FlowNFTBaseTest { - function setUp() public override { - super.setUp(); - } - - /*////////////////////////////////////////////////////////////////////////// - Storage Layout Tests - //////////////////////////////////////////////////////////////////////////*/ - function testFlowNFTBaseStorageLayout() public { - FlowNFTBaseStorageLayoutMock flowNFTBaseStorageLayoutMock = new FlowNFTBaseStorageLayoutMock( - sf.host - ); - flowNFTBaseStorageLayoutMock.validateStorageLayout(); - } - - function testConstantInflowNFTStorageLayout() public { - ConstantInflowNFTStorageLayoutMock constantInflowNFTBaseStorageLayoutMock = - new ConstantInflowNFTStorageLayoutMock( - sf.host, - constantOutflowNFT - ); - constantInflowNFTBaseStorageLayoutMock.validateStorageLayout(); - } - - function testConstantOutflowNFTStorageLayout() public { - ConstantOutflowNFTStorageLayoutMock constantOutflowNFTBaseStorageLayoutMock = - new ConstantOutflowNFTStorageLayoutMock( - sf.host, - constantInflowNFT - ); - constantOutflowNFTBaseStorageLayoutMock.validateStorageLayout(); - } - - /*////////////////////////////////////////////////////////////////////////// - Revert Tests - //////////////////////////////////////////////////////////////////////////*/ - function testRevertFlowNFTContractsCannotBeUpgradedByNonSuperTokenFactory(address notSuperTokenFactory) public { - vm.assume(notSuperTokenFactory != address(sf.superTokenFactory)); - ConstantOutflowNFT newOutflowLogic = new ConstantOutflowNFT( - sf.host, - constantInflowNFT - ); - vm.expectRevert(IFlowNFTBase.CFA_NFT_ONLY_SUPER_TOKEN_FACTORY.selector); - vm.prank(notSuperTokenFactory); - constantOutflowNFT.updateCode(address(newOutflowLogic)); - - ConstantInflowNFT newInflowLogic = new ConstantInflowNFT( - sf.host, - constantOutflowNFT - ); - vm.expectRevert(IFlowNFTBase.CFA_NFT_ONLY_SUPER_TOKEN_FACTORY.selector); - vm.prank(notSuperTokenFactory); - constantInflowNFT.updateCode(address(newInflowLogic)); - } - - /*////////////////////////////////////////////////////////////////////////// - Passing Tests - //////////////////////////////////////////////////////////////////////////*/ - function testFlowNFTContractsCanBeUpgradedBySuperTokenFactory() public { - ConstantOutflowNFT newOutflowLogic = new ConstantOutflowNFT( - sf.host, - constantInflowNFT - ); - vm.prank(address(sf.superTokenFactory)); - constantOutflowNFT.updateCode(address(newOutflowLogic)); - - ConstantInflowNFT newInflowLogic = new ConstantInflowNFT( - sf.host, - constantOutflowNFT - ); - vm.prank(address(sf.superTokenFactory)); - constantInflowNFT.updateCode(address(newInflowLogic)); - } -} diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol index 53f5d9bec0..1d33ffbea6 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolAdminNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; @@ -42,13 +42,13 @@ contract PoolAdminNFTIntegrationTest is PoolNFTBaseIntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testProxiableUUIDIsExpectedValue() public { + function testProxiableUUIDIsExpectedValue() public view { assertEq( poolAdminNFT.proxiableUUID(), keccak256("org.superfluid-finance.contracts.PoolAdminNFT.implementation") ); } - function testTokenURIForPoolAdminNFT(uint256 tokenId) public { + function testTokenURIForPoolAdminNFT(uint256 tokenId) public view { assertEq(poolAdminNFT.tokenURI(tokenId), string(abi.encodePacked(poolAdminNFT.baseURI()))); } } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol index 069486142d..dad71ff3c9 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolMemberNFT.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; @@ -70,13 +70,13 @@ contract PoolMemberNFTIntegrationTest is PoolNFTBaseIntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testProxiableUUIDIsExpectedValue() public { + function testProxiableUUIDIsExpectedValue() public view { assertEq( poolMemberNFT.proxiableUUID(), keccak256("org.superfluid-finance.contracts.PoolMemberNFT.implementation") ); } - function testTokenURIForPoolMemberNFT(uint256 tokenId) public { + function testTokenURIForPoolMemberNFT(uint256 tokenId) public view { assertEq(poolMemberNFT.tokenURI(tokenId), string(abi.encodePacked(poolMemberNFT.baseURI()))); } } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol index 8d3a7e43d4..03fbf57e29 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTBase.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { IERC165, IERC721, IERC721Metadata } from "@openzeppelin/contracts/interfaces/IERC721Metadata.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; @@ -8,15 +8,12 @@ import { PoolNFTBaseStorageLayoutMock, PoolAdminNFTStorageLayoutMock, PoolMemberNFTStorageLayoutMock -} from "../../../contracts/mocks/PoolNFTUpgradabilityMock.sol"; +} from "./PoolNFTUpgradabilityMock.t.sol"; import { IPoolNFTBase, PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { TestToken } from "../../../contracts/utils/TestToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { ConstantOutflowNFTMock, ConstantInflowNFTMock } from "../../../contracts/mocks/CFAv1NFTMock.sol"; -import { PoolNFTBaseMock } from "../../../contracts/mocks/PoolNFTMock.sol"; +import { PoolNFTBaseMock } from "./PoolNFTMock.t.sol"; import { ISuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; import { ERC721IntegrationTest } from "./ERC721.t.sol"; @@ -36,7 +33,7 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { function setUp() public virtual override { super.setUp(); - poolNFTBaseMock = new PoolNFTBaseMock(sf.host); + poolNFTBaseMock = new PoolNFTBaseMock(sf.host, sf.gda); poolNFTBaseMock.initialize(NAME, SYMBOL); } @@ -211,30 +208,30 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ - function testContractSupportsExpectedInterfaces() public { + function testContractSupportsExpectedInterfaces() public view { assertEq(poolNFTBaseMock.supportsInterface(type(IERC165).interfaceId), true); assertEq(poolNFTBaseMock.supportsInterface(type(IERC721).interfaceId), true); assertEq(poolNFTBaseMock.supportsInterface(type(IERC721Metadata).interfaceId), true); } - function testBalanceOfIsAlwaysOne(address owner) public { + function testBalanceOfIsAlwaysOne(address owner) public view { assertEq(poolNFTBaseMock.balanceOf(owner), 1, "PoolNFTBase: balanceOf is not always one"); } - function testHostIsProperlySetInConstructor() public { + function testHostIsProperlySetInConstructor() public view { assertEq(address(poolNFTBaseMock.HOST()), address(sf.host)); } - function testGDAv1IsProperlySetInConstructor() public { + function testGDAv1IsProperlySetInConstructor() public view { assertEq(address(poolNFTBaseMock.GENERAL_DISTRIBUTION_AGREEMENT_V1()), address(sf.gda)); } - function testNFTMetadataIsProperlyInitialized() public { + function testNFTMetadataIsProperlyInitialized() public view { assertEq(poolNFTBaseMock.name(), NAME); assertEq(poolNFTBaseMock.symbol(), SYMBOL); } - function testTokenURI(uint256 tokenId) public { + function testTokenURI(uint256 tokenId) public view { assertEq(poolNFTBaseMock.tokenURI(tokenId), string(abi.encodePacked("tokenId=", tokenId.toString()))); } @@ -296,7 +293,7 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { Assertion Helpers //////////////////////////////////////////////////////////////////////////*/ function _assertPoolAdminNftStateIsExpected(uint256 _tokenId, address _expectedPool, address _expectedAdmin) - public + public view { PoolAdminNFT.PoolAdminNFTData memory poolAdminNFTData = poolAdminNFT.poolAdminDataByTokenId(_tokenId); @@ -316,7 +313,7 @@ abstract contract PoolNFTBaseIntegrationTest is ERC721IntegrationTest { address _expectedPool, address _expectedMember, uint128 _expectedUnits - ) public { + ) public view { PoolMemberNFT.PoolMemberNFTData memory poolMemberNFTData = poolMemberNFT.poolMemberDataByTokenId(_tokenId); assertEq(poolMemberNFTData.pool, _expectedPool, "PoolMemberNFT: pool address not as expected"); @@ -342,19 +339,20 @@ contract PoolNFTUpgradabilityTest is PoolNFTBaseIntegrationTest { Storage Layout Tests //////////////////////////////////////////////////////////////////////////*/ function testPoolNFTBaseStorageLayout() public { - PoolNFTBaseStorageLayoutMock poolNFTBaseStorageLayoutMock = new PoolNFTBaseStorageLayoutMock(sf.host); + PoolNFTBaseStorageLayoutMock poolNFTBaseStorageLayoutMock = new PoolNFTBaseStorageLayoutMock(sf.host, sf.gda); poolNFTBaseStorageLayoutMock.validateStorageLayout(); } function testPoolMemberNFTStorageLayout() public { - PoolMemberNFTStorageLayoutMock poolMemberNFTStorageLayoutMock = new PoolMemberNFTStorageLayoutMock(sf.host); + PoolMemberNFTStorageLayoutMock poolMemberNFTStorageLayoutMock = + new PoolMemberNFTStorageLayoutMock(sf.host, sf.gda); poolMemberNFTStorageLayoutMock.validateStorageLayout(); } function testPoolAdminNFTStorageLayout() public { - PoolAdminNFTStorageLayoutMock poolAdminNFTStorageLayoutMock = new PoolAdminNFTStorageLayoutMock(sf.host); + PoolAdminNFTStorageLayoutMock poolAdminNFTStorageLayoutMock = new PoolAdminNFTStorageLayoutMock(sf.host, sf.gda); poolAdminNFTStorageLayoutMock.validateStorageLayout(); } @@ -364,16 +362,12 @@ contract PoolNFTUpgradabilityTest is PoolNFTBaseIntegrationTest { //////////////////////////////////////////////////////////////////////////*/ function testRevertPoolNFTContractsCannotBeUpgradedByNonSuperTokenFactory(address notSuperTokenFactory) public { vm.assume(notSuperTokenFactory != address(sf.superTokenFactory)); - PoolAdminNFT newPoolAdminNFT = new PoolAdminNFT( - sf.host - ); + PoolAdminNFT newPoolAdminNFT = new PoolAdminNFT(sf.host, sf.gda); vm.expectRevert(IPoolNFTBase.POOL_NFT_ONLY_SUPER_TOKEN_FACTORY.selector); vm.prank(notSuperTokenFactory); poolAdminNFT.updateCode(address(newPoolAdminNFT)); - PoolMemberNFT newPoolMemberNFT = new PoolMemberNFT( - sf.host - ); + PoolMemberNFT newPoolMemberNFT = new PoolMemberNFT(sf.host, sf.gda); vm.expectRevert(IPoolNFTBase.POOL_NFT_ONLY_SUPER_TOKEN_FACTORY.selector); vm.prank(notSuperTokenFactory); poolMemberNFT.updateCode(address(newPoolMemberNFT)); @@ -383,15 +377,11 @@ contract PoolNFTUpgradabilityTest is PoolNFTBaseIntegrationTest { Passing Tests //////////////////////////////////////////////////////////////////////////*/ function testPoolNFTContractsCanBeUpgradedBySuperTokenFactory() public { - PoolAdminNFT newPoolAdminNFT = new PoolAdminNFT( - sf.host - ); + PoolAdminNFT newPoolAdminNFT = new PoolAdminNFT(sf.host, sf.gda); vm.prank(address(sf.superTokenFactory)); poolAdminNFT.updateCode(address(newPoolAdminNFT)); - PoolMemberNFT newPoolMemberNFT = new PoolMemberNFT( - sf.host - ); + PoolMemberNFT newPoolMemberNFT = new PoolMemberNFT(sf.host, sf.gda); vm.prank(address(sf.superTokenFactory)); poolMemberNFT.updateCode(address(newPoolMemberNFT)); } diff --git a/packages/ethereum-contracts/contracts/mocks/PoolNFTMock.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTMock.t.sol similarity index 80% rename from packages/ethereum-contracts/contracts/mocks/PoolNFTMock.sol rename to packages/ethereum-contracts/test/foundry/superfluid/PoolNFTMock.t.sol index 5e3e642479..04110c4a7c 100644 --- a/packages/ethereum-contracts/contracts/mocks/PoolNFTMock.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTMock.t.sol @@ -1,19 +1,22 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable reason-string -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { PoolAdminNFT } from "../agreements/gdav1/PoolAdminNFT.sol"; -import { PoolMemberNFT } from "../agreements/gdav1/PoolMemberNFT.sol"; -import { PoolNFTBase } from "../agreements/gdav1/PoolNFTBase.sol"; + +import { + IGeneralDistributionAgreementV1, ISuperfluid +} from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { PoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; +import { PoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; +import { PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; contract PoolNFTBaseMock is PoolNFTBase { using Strings for uint256; mapping(uint256 => address) private _owners; - constructor(ISuperfluid host) PoolNFTBase(host) { } + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolNFTBase(host, gdaV1) { } function proxiableUUID() public pure override returns (bytes32) { return keccak256("org.superfluid-finance.contracts.PoolNFTBaseMock.implementation"); @@ -52,7 +55,7 @@ contract PoolNFTBaseMock is PoolNFTBase { } contract PoolAdminNFTMock is PoolAdminNFT { - constructor(ISuperfluid host) PoolAdminNFT(host) { } + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolAdminNFT(host, gdaV1) { } /// @dev a mock mint function that exposes the internal _mint function function mockMint(address _pool) public { @@ -71,7 +74,7 @@ contract PoolAdminNFTMock is PoolAdminNFT { } contract PoolMemberNFTMock is PoolMemberNFT { - constructor(ISuperfluid host) PoolMemberNFT(host) { } + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolMemberNFT(host, gdaV1) { } /// @dev a mock mint function that exposes the internal _mint function function mockMint(address _pool, address _member) public { diff --git a/packages/ethereum-contracts/contracts/mocks/PoolNFTUpgradabilityMock.sol b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol similarity index 83% rename from packages/ethereum-contracts/contracts/mocks/PoolNFTUpgradabilityMock.sol rename to packages/ethereum-contracts/test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol index 2cda01e0f4..f462a8e070 100644 --- a/packages/ethereum-contracts/contracts/mocks/PoolNFTUpgradabilityMock.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/PoolNFTUpgradabilityMock.t.sol @@ -1,15 +1,17 @@ // SPDX-License-Identifier: AGPLv3 // solhint-disable reason-string -pragma solidity 0.8.19; +pragma solidity ^0.8.23; -import { PoolNFTBase } from "../agreements/gdav1/PoolNFTBase.sol"; -import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol"; -import { PoolMemberNFT } from "../agreements/gdav1/PoolMemberNFT.sol"; -import { PoolAdminNFT } from "../agreements/gdav1/PoolAdminNFT.sol"; -import { IStorageLayoutBase } from "./IStorageLayoutBase.sol"; +import { PoolNFTBase } from "../../../contracts/agreements/gdav1/PoolNFTBase.sol"; +import { + IGeneralDistributionAgreementV1, ISuperfluid +} from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { PoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; +import { PoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; +import { StorageLayoutTestBase } from "../StorageLayoutTestBase.t.sol"; -contract PoolNFTBaseStorageLayoutMock is PoolNFTBase, IStorageLayoutBase { - constructor(ISuperfluid host) PoolNFTBase(host) { } +contract PoolNFTBaseStorageLayoutMock is PoolNFTBase, StorageLayoutTestBase { + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolNFTBase(host, gdaV1) { } function validateStorageLayout() public virtual { uint256 slot; @@ -71,8 +73,8 @@ contract PoolNFTBaseStorageLayoutMock is PoolNFTBase, IStorageLayoutBase { } } -contract PoolAdminNFTStorageLayoutMock is PoolAdminNFT, IStorageLayoutBase { - constructor(ISuperfluid host) PoolAdminNFT(host) { } +contract PoolAdminNFTStorageLayoutMock is PoolAdminNFT, StorageLayoutTestBase { + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolAdminNFT(host, gdaV1) { } function validateStorageLayout() public virtual { uint256 slot; @@ -111,8 +113,8 @@ contract PoolAdminNFTStorageLayoutMock is PoolAdminNFT, IStorageLayoutBase { } } -contract PoolMemberNFTStorageLayoutMock is PoolMemberNFT, IStorageLayoutBase { - constructor(ISuperfluid host) PoolMemberNFT(host) { } +contract PoolMemberNFTStorageLayoutMock is PoolMemberNFT, StorageLayoutTestBase { + constructor(ISuperfluid host, IGeneralDistributionAgreementV1 gdaV1) PoolMemberNFT(host, gdaV1) { } function validateStorageLayout() public virtual { uint256 slot; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol index bbd2d120e4..02727ad7aa 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperToken.t.sol @@ -1,12 +1,11 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; import { UUPSProxy } from "../../../contracts/upgradability/UUPSProxy.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; -import { IERC20, ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; +import { IERC20, ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } + from "../../../contracts/superfluid/SuperToken.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; @@ -20,7 +19,7 @@ contract SuperTokenIntegrationTest is FoundrySuperfluidTester { super.setUp(); } - function testUnderlyingTokenDecimals() public { + function testUnderlyingTokenDecimals() public view { assertEq(token.decimals(), superToken.getUnderlyingDecimals()); } @@ -69,79 +68,6 @@ contract SuperTokenIntegrationTest is FoundrySuperfluidTester { ); } - function testRevertSuperTokenUpdateCodeWrongNFTProxies() public { - UUPSProxy cifProxy = new UUPSProxy(); - UUPSProxy cofProxy = new UUPSProxy(); - UUPSProxy paProxy = new UUPSProxy(); - UUPSProxy pmProxy = new UUPSProxy(); - - ConstantInflowNFT cifNFTLogic = new ConstantInflowNFT( - sf.host, - IConstantOutflowNFT(address(cofProxy)) - ); - ConstantOutflowNFT cofNFTLogic = new ConstantOutflowNFT( - sf.host, - IConstantInflowNFT(address(cifProxy)) - ); - PoolAdminNFT paNFTLogic = new PoolAdminNFT( - sf.host - ); - PoolMemberNFT pmNFTLogic = new PoolMemberNFT( - sf.host - ); - - cifNFTLogic.castrate(); - cofNFTLogic.castrate(); - paNFTLogic.castrate(); - pmNFTLogic.castrate(); - - cifProxy.initializeProxy(address(cifNFTLogic)); - cofProxy.initializeProxy(address(cofNFTLogic)); - paProxy.initializeProxy(address(paNFTLogic)); - pmProxy.initializeProxy(address(pmNFTLogic)); - - ConstantInflowNFT(address(cofProxy)).initialize("Constant Outflow NFT", "COF"); - ConstantOutflowNFT(address(cifProxy)).initialize("Constant Inflow NFT", "CIF"); - PoolAdminNFT(address(paProxy)).initialize("Pool Admin NFT", "PA"); - PoolMemberNFT(address(pmProxy)).initialize("Pool Member NFT", "PM"); - - // all nft proxies incorrect - SuperToken superTokenLogic = new SuperToken( - sf.host, - ConstantOutflowNFT(address(cofProxy)), - ConstantInflowNFT(address(cifProxy)), - PoolAdminNFT(address(paProxy)), - PoolMemberNFT(address(pmProxy)) - ); - vm.prank(address(sf.host)); - vm.expectRevert(ISuperToken.SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED.selector); - UUPSProxiable(address(superToken)).updateCode(address(superTokenLogic)); - - // inflow nft proxy incorrect - superTokenLogic = new SuperToken( - sf.host, - superToken.CONSTANT_OUTFLOW_NFT(), - ConstantInflowNFT(address(cifProxy)), - superToken.POOL_ADMIN_NFT(), - superToken.POOL_MEMBER_NFT() - ); - vm.prank(address(sf.host)); - vm.expectRevert(ISuperToken.SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED.selector); - UUPSProxiable(address(superToken)).updateCode(address(superTokenLogic)); - - // outflow nft proxy incorrect - superTokenLogic = new SuperToken( - sf.host, - ConstantOutflowNFT(address(cofProxy)), - superToken.CONSTANT_INFLOW_NFT(), - superToken.POOL_ADMIN_NFT(), - superToken.POOL_MEMBER_NFT() - ); - vm.prank(address(sf.host)); - vm.expectRevert(ISuperToken.SUPER_TOKEN_NFT_PROXY_ADDRESS_CHANGED.selector); - UUPSProxiable(address(superToken)).updateCode(address(superTokenLogic)); - } - function testInitializeSuperTokenWithAndWithoutAdmin(address _admin) public { (, ISuperToken localSuperToken) = sfDeployer.deployWrapperSuperToken("FTT", "FTT", 18, type(uint256).max, _admin); @@ -162,9 +88,7 @@ contract SuperTokenIntegrationTest is FoundrySuperfluidTester { vm.stopPrank(); assertEq( - localSuperToken.getAdmin(), - _admin, - "testOnlyHostCanChangeAdminWhenNoAdmin: admin address not set correctly" + localSuperToken.getAdmin(), _admin, "testOnlyHostCanChangeAdminWhenNoAdmin: admin address not set correctly" ); } @@ -180,11 +104,7 @@ contract SuperTokenIntegrationTest is FoundrySuperfluidTester { localSuperToken.changeAdmin(newAdmin); vm.stopPrank(); - assertEq( - localSuperToken.getAdmin(), - newAdmin, - "testOnlyAdminCanChangeAdmin: admin address not set correctly" - ); + assertEq(localSuperToken.getAdmin(), newAdmin, "testOnlyAdminCanChangeAdmin: admin address not set correctly"); } function testRevertWhenNonAdminTriesToChangeAdmin(address _admin, address nonAdmin) public { diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol index 90c0c991af..068871c872 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperTokenFactory.t.sol @@ -1,13 +1,11 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { SuperTokenFactory } from "../../../contracts/superfluid/SuperTokenFactory.sol"; -import { ConstantOutflowNFT, IConstantOutflowNFT } from "../../../contracts/superfluid/ConstantOutflowNFT.sol"; -import { ConstantInflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/ConstantInflowNFT.sol"; import { PoolAdminNFT, IPoolAdminNFT } from "../../../contracts/agreements/gdav1/PoolAdminNFT.sol"; import { PoolMemberNFT, IPoolMemberNFT } from "../../../contracts/agreements/gdav1/PoolMemberNFT.sol"; -import { ISuperToken, SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; +import { ISuperToken, SuperToken, IConstantOutflowNFT, IConstantInflowNFT } from "../../../contracts/superfluid/SuperToken.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; contract SuperTokenFactoryTest is FoundrySuperfluidTester { @@ -20,34 +18,18 @@ contract SuperTokenFactoryTest is FoundrySuperfluidTester { function testUpdateCodeSetsNewContracts() public { SuperToken newSuperTokenLogic = new SuperToken( sf.host, - superToken.CONSTANT_OUTFLOW_NFT(), - superToken.CONSTANT_INFLOW_NFT(), + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), superToken.POOL_ADMIN_NFT(), superToken.POOL_MEMBER_NFT() ); - ConstantOutflowNFT newConstantOutflowNFTLogic = new ConstantOutflowNFT( - sf.host, - IConstantInflowNFT(address(superToken.CONSTANT_INFLOW_NFT())) - ); - ConstantInflowNFT newConstantInflowNFTLogic = new ConstantInflowNFT( - sf.host, - IConstantOutflowNFT(address(superToken.CONSTANT_OUTFLOW_NFT())) - ); - PoolAdminNFT newPoolAdminNFTLogic = new PoolAdminNFT(sf.host); - PoolMemberNFT newPoolMemberNFTLogic = new PoolMemberNFT(sf.host); - assertEq( - UUPSProxiable(address(superToken.CONSTANT_OUTFLOW_NFT())).getCodeAddress(), - address(sf.superTokenFactory.CONSTANT_OUTFLOW_NFT_LOGIC()) - ); - assertEq( - UUPSProxiable(address(superToken.CONSTANT_INFLOW_NFT())).getCodeAddress(), - address(sf.superTokenFactory.CONSTANT_INFLOW_NFT_LOGIC()) - ); + PoolAdminNFT newPoolAdminNFTLogic = new PoolAdminNFT(sf.host, sf.gda); + PoolMemberNFT newPoolMemberNFTLogic = new PoolMemberNFT(sf.host, sf.gda); SuperTokenFactory newSuperTokenFactoryLogic = new SuperTokenFactory( sf.host, newSuperTokenLogic, - newConstantOutflowNFTLogic, - newConstantInflowNFTLogic, + IConstantOutflowNFT(address(0)), + IConstantInflowNFT(address(0)), newPoolAdminNFTLogic, newPoolMemberNFTLogic ); @@ -58,11 +40,5 @@ contract SuperTokenFactoryTest is FoundrySuperfluidTester { } sf.superTokenFactory.updateCode(address(newSuperTokenFactoryLogic)); vm.stopPrank(); - - // We only assert this if the protocol is upgradable - if (!sf.host.NON_UPGRADABLE_DEPLOYMENT()) { - assertEq(address(newConstantOutflowNFTLogic), address(sf.superTokenFactory.CONSTANT_OUTFLOW_NFT_LOGIC())); - assertEq(address(newConstantInflowNFTLogic), address(sf.superTokenFactory.CONSTANT_INFLOW_NFT_LOGIC())); - } } } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol index 39fe4b2268..ad56918876 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.BatchCall.t.sol @@ -1,21 +1,103 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { stdError } from "forge-std/Test.sol"; import { BatchOperation, ISuperfluid, Superfluid } from "../../../contracts/superfluid/Superfluid.sol"; import { SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; -import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; -import { ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluidToken.sol"; +import { IGeneralDistributionAgreementV1, ISuperfluidPool, PoolConfig } from "../../../contracts/interfaces/agreements/gdav1/IGeneralDistributionAgreementV1.sol"; +import { IConstantFlowAgreementV1, ISuperToken, ISuperfluidToken } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; import { FoundrySuperfluidTester } from "../FoundrySuperfluidTester.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; -import { SuperAppMock } from "../../../contracts/mocks/SuperAppMocks.sol"; +import { SuperAppMock } from "../../../contracts/mocks/SuperAppMocks.t.sol"; +import { DMZForwarder } from "../../../contracts/utils/DMZForwarder.sol"; +import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol'; +import { BaseRelayRecipient } from "../../../contracts/libs/BaseRelayRecipient.sol"; + +// A mock for an arbitrary external contract +contract TestContract { + error SomeError(); + error IncorrectPayment(); + + bool public stateChanged; + + function permissionlessFn() public returns (bool) { + stateChanged = true; + return true; + } + + // accept native coins + receive() external payable {} + + function pay(uint256 expectedAmount) external payable { + if (msg.value != expectedAmount) revert IncorrectPayment(); + } + + function doRevert() external pure { + revert SomeError(); + } +} + +// A mock for an external contract that uses ERC-2771 +contract TestContract2771 is TestContract, Ownable, BaseRelayRecipient { + error NotOwner(); + + // Expects the msgSender to be encoded in calldata as specified by ERC-2771. + // Will revert if relayed for anybody but the contract owner. + function privilegedFn() public returns (bool) { + if (_getTransactionSigner() != owner()) revert NotOwner(); + stateChanged = true; + return true; + } + + // this can be used to check correct association of the payment + function privilegedPay(uint256 expectedAmount) external payable { + if (_getTransactionSigner() != owner()) revert NotOwner(); + if (msg.value != expectedAmount) revert IncorrectPayment(); + } + + /// @dev BaseRelayRecipient.isTrustedForwarder implementation + function isTrustedForwarder(address /*forwarder*/) public view virtual override returns(bool) { + // we don't enforce any restrictions for this test + return true; + } + + /// @dev IRelayRecipient.versionRecipient implementation + function versionRecipient() external override pure returns (string memory) { + return "v1"; + } +} + +// Same as TestContract2771, but only trusts the host's DMZForwarder +contract TestContract2771Checked is TestContract2771 { + Superfluid internal _host; + + constructor(Superfluid host) { + _host = host; + } + + /// @dev BaseRelayRecipient.isTrustedForwarder implementation + function isTrustedForwarder(address forwarder) public view override returns(bool) { + // TODO: shall we add this to ISuperfluid and recommend as general pattern? + return forwarder == address(_host.DMZ_FORWARDER()); + } +} + contract SuperfluidBatchCallTest is FoundrySuperfluidTester { using SuperTokenV1Library for SuperToken; + address someTrustedForwarder = address(0x1a1c); + constructor() FoundrySuperfluidTester(3) { } + function setUp() public override { + super.setUp(); + vm.startPrank(address(sf.governance.owner())); + sf.governance.enableTrustedForwarder(sf.host, ISuperToken(address(0)), someTrustedForwarder); + vm.stopPrank(); + } + function testRevertIfOperationIncreaseAllowanceIsNotCalledByHost(address notHost) public { vm.assume(notHost != address(sf.host)); @@ -208,4 +290,342 @@ contract SuperfluidBatchCallTest is FoundrySuperfluidTester { vm.expectRevert("CallUtils: target revert()"); sf.host.batchCall{value: 42}(ops); } + + function testRevertIfOperationUpgradeToIsNotCalledByHost(address notHost) public { + vm.assume(notHost != address(sf.host)); + + vm.expectRevert(ISuperfluidToken.SF_TOKEN_ONLY_HOST.selector); + vm.prank(notHost); + superToken.operationUpgradeTo(alice, bob, 100); + } + + function testUpgradeTo(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + vm.prank(alice); + token.approve(address(superToken), amount); + + uint256 bobBalanceBefore = superToken.balanceOf(bob); + vm.prank(address(sf.host)); + superToken.operationUpgradeTo(alice, bob, amount); + uint256 bobBalanceAfter = superToken.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testUpgradeToBatchCall(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + vm.prank(alice); + token.approve(address(superToken), amount); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + uint256 bobBalanceBefore = superToken.balanceOf(bob); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO, + target: address(superToken), + data: abi.encode(bob, amount) + }); + vm.prank(alice); + sf.host.batchCall(ops); + uint256 bobBalanceAfter = superToken.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testRevertIfOperationDowngradeToIsNotCalledByHost(address notHost) public { + vm.assume(notHost != address(sf.host)); + + vm.expectRevert(ISuperfluidToken.SF_TOKEN_ONLY_HOST.selector); + vm.prank(notHost); + superToken.operationDowngradeTo(alice, bob, 100); + } + + function testDowngradeTo(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + uint256 bobBalanceBefore = token.balanceOf(bob); + vm.prank(address(sf.host)); + superToken.operationDowngradeTo(alice, bob, amount); + uint256 bobBalanceAfter = token.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testDowngradeToBatchCall(uint256 amount) public { + vm.assume(amount < type(uint64).max); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + uint256 bobBalanceBefore = token.balanceOf(bob); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO, + target: address(superToken), + data: abi.encode(bob, amount) + }); + vm.prank(alice); + sf.host.batchCall(ops); + uint256 bobBalanceAfter = token.balanceOf(bob); + assertEq(bobBalanceAfter, bobBalanceBefore + amount, "Bob has unexpected final balance"); + } + + function testCallAgreementConnectPoolBatchCall() public { + PoolConfig memory config = PoolConfig({ transferabilityForUnitsOwner: true, distributionFromAnyAddress: false }); + ISuperfluidPool pool = _helperCreatePool(superToken, alice, alice, false, config); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + bytes memory connectPoolCallData = + abi.encodeCall(IGeneralDistributionAgreementV1.connectPool, (pool, new bytes(0))); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT, + target: address(sf.gda), + data: abi.encode(connectPoolCallData, new bytes(0)) + }); + + vm.prank(alice); + sf.host.batchCall(ops); + + assertTrue(sf.gda.isMemberConnected(pool, alice), "Alice: Pool is not connected"); + } + + function testSimpleForwardCall() public { + DMZForwarder forwarder = new DMZForwarder(); + TestContract testContract = new TestContract(); + + (bool success, bytes memory returnValue) = forwarder.forwardCall( + address(testContract), + abi.encodeCall(testContract.permissionlessFn, ()) + ); + // decoded return value + bool retVal = abi.decode(returnValue, (bool)); + assertTrue(success, "DMZForwarder: call failed"); + assertEq(retVal, true, "DMZForwarder: unexpected return value"); + } + + function testSimpleForwardCallBatchCall() public { + TestContract testContract = new TestContract(); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + sf.host.batchCall(ops); + assertEq(testContract.stateChanged(), true, "TestContract: unexpected state"); + } + + function testSimpleForwardCallBatchCallRevert() public { + TestContract testContract = new TestContract(); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.doRevert, ()) + }); + + vm.expectRevert(TestContract.SomeError.selector); + sf.host.batchCall(ops); + } + + function test2771ForwardCall() public { + DMZForwarder forwarder = new DMZForwarder(); + + TestContract2771 testContract = new TestContract2771(); + // alice has privileged access to the testContract + testContract.transferOwnership(alice); + + // we relay a call for alice + (bool success, bytes memory returnValue) = forwarder.forward2771Call( + address(testContract), + alice, + abi.encodeCall(testContract.privilegedFn, ()) + ); + // decoded return value + bool retVal = abi.decode(returnValue, (bool)); + assertTrue(success, "DMZForwarder: call failed"); + assertEq(testContract.stateChanged(), true, "TestContract: unexpected state"); + assertEq(retVal, true, "DMZForwarder: unexpected return value"); + + // if relaying for bob, it should fail + (success,) = forwarder.forward2771Call( + address(testContract), + bob, + abi.encodeCall(testContract.privilegedFn, ()) + ); + assertFalse(success, "DMZForwarder: call should have failed"); + + // only the owner of the forwarder shall be allowed to relay + vm.startPrank(eve); + vm.expectRevert("Ownable: caller is not the owner"); + forwarder.forward2771Call( + address(testContract), + alice, + abi.encodeCall(testContract.privilegedFn, ()) + ); + vm.stopPrank(); + } + + function test2771ForwardCallBatchCall() public { + TestContract2771Checked testContract = new TestContract2771Checked(sf.host); + testContract.transferOwnership(alice); + + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](1); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.privilegedFn, ()) + }); + + // should fail if called by bob (not the owner of testContract) + vm.startPrank(bob); + vm.expectRevert(TestContract2771.NotOwner.selector); + sf.host.batchCall(ops); + vm.stopPrank(); + + // should succeed if called by alice + vm.startPrank(alice); + sf.host.batchCall(ops); + assertEq(testContract.stateChanged(), true, "TestContract: unexpected state"); + vm.stopPrank(); + } + + function testSimpleForwardCallBatchCallWithValue() public { + TestContract testContract = new TestContract(); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.pay, (amount)) + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + + // This shall work because we first forward native tokens to the contract, + // then call the non-payable function + sf.host.batchCall{value: amount}(ops); + assertEq(address(testContract).balance, amount, "TestContract: unexpected balance"); + } + + function testSimpleForwardCallBatchCallWithValueUsingReceiveFn() public { + TestContract testContract = new TestContract(); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: "" + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + + // the first operation shall forward the value, the second shall not (and thus succeed) + sf.host.batchCall{value: amount}(ops); + assertEq(address(testContract).balance, amount, "TestContract: unexpected balance"); + } + + function testSimpleForwardCallBatchCallWithValueUnsupportedOpsOrder() public { + TestContract testContract = new TestContract(); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_SIMPLE_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.pay, (amount)) + }); + + // This fails because the native tokens are forwarded to the first operation, + // which calls a non-payable function and thus reverts + vm.expectRevert(); + sf.host.batchCall{value: amount}(ops); + } + + function test2771ForwardCallBatchCallWithValue() public { + TestContract2771Checked testContract = new TestContract2771Checked(sf.host); + testContract.transferOwnership(alice); + + uint256 amount = 42; + ISuperfluid.Operation[] memory ops = new ISuperfluid.Operation[](2); + ops[0] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.privilegedPay, (amount)) + }); + ops[1] = ISuperfluid.Operation({ + operationType: BatchOperation.OPERATION_TYPE_ERC2771_FORWARD_CALL, + target: address(testContract), + data: abi.encodeCall(testContract.permissionlessFn, ()) + }); + + vm.deal(alice, 1 ether); + vm.startPrank(alice); + sf.host.batchCall{value: amount}(ops); + assertEq(address(testContract).balance, amount, "TestContract: unexpected test contract balance"); + vm.stopPrank(); + } + + function testRefundFromBatchCall() public { + uint256 amount = 42; + address sender = alice; + + vm.deal(sender, 1 ether); + uint256 senderBalanceBefore = sender.balance; + vm.startPrank(sender); + sf.host.batchCall{value: amount}(new ISuperfluid.Operation[](0)); + vm.stopPrank(); + // no operation "consumed" the native tokens: we expect full refund + assertEq(sender.balance, senderBalanceBefore, "batchCall sender: unexpected balance"); + assertEq(address(sf.host).balance, 0, "batchCall host: native tokens left"); + } + + function testRefundFromForwardBatchCall() public { + uint256 amount = 42; + + vm.deal(someTrustedForwarder, 1 ether); + vm.startPrank(someTrustedForwarder); + bytes memory data = abi.encodeCall(sf.host.forwardBatchCall, (new ISuperfluid.Operation[](0))); + // bob is 2771-encoded as msgSender + (bool success, ) = address(sf.host).call{value: amount}(abi.encodePacked(data, bob)); + vm.stopPrank(); + // no operation "consumed" the native tokens: we expect full refund to bob + assertTrue(success, "forwardBatchCall: call failed"); + assertEq(bob.balance, amount, "batchCall msgSender: unexpected balance"); + assertEq(address(sf.host).balance, 0, "batchCall host: native tokens left"); + } + + function testWithdrawLostNativeTokensFromDMZForwarder() public { + uint256 amount = 42; + + DMZForwarder forwarder = new DMZForwarder(); + + // failing call which causes `amount` to get stuck in the forwarder contract + (bool success, ) = forwarder.forwardCall{value: amount}( + address(sf.host), new bytes(0x1)); + + assertFalse(success, "DMZForwarder: call should have failed"); + assertEq(address(forwarder).balance, amount, "DMZForwarder: unexpected balance"); + + // eve isn't allowed to withdraw + vm.startPrank(eve); + vm.expectRevert("Ownable: caller is not the owner"); + forwarder.withdrawLostNativeTokens(payable(bob)); + vm.stopPrank(); + + // but we can withdraw + forwarder.withdrawLostNativeTokens(payable(bob)); + assertEq(address(forwarder).balance, 0, "DMZForwarder: balance still not 0"); + assertEq(bob.balance, amount, "DMZForwarder: where did the money go?"); + } } diff --git a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol index ffd5cd1163..68480e9d0b 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/Superfluid.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "../FoundrySuperfluidTester.sol"; import { UUPSProxiable } from "../../../contracts/upgradability/UUPSProxiable.sol"; @@ -7,7 +7,7 @@ import { SuperToken } from "../../../contracts/superfluid/SuperToken.sol"; import { SuperTokenV1Library } from "../../../contracts/apps/SuperTokenV1Library.sol"; import { ISuperAgreement } from "../../../contracts/interfaces/superfluid/ISuperAgreement.sol"; import { ISuperfluid } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; -import { AgreementMock } from "../../../contracts/mocks/AgreementMock.sol"; +import { AgreementMock } from "../../../contracts/mocks/AgreementMock.t.sol"; contract SuperfluidIntegrationTest is FoundrySuperfluidTester { using SuperTokenV1Library for SuperToken; diff --git a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.sol b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol similarity index 89% rename from packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.sol rename to packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol index 1e9f68018f..7a09f8574f 100644 --- a/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.sol +++ b/packages/ethereum-contracts/test/foundry/superfluid/SuperfluidPool.prop.t.sol @@ -1,10 +1,14 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import "@superfluid-finance/solidity-semantic-money/src/SemanticMoney.sol"; import { GeneralDistributionAgreementV1 } from "../../../contracts/agreements/gdav1/GeneralDistributionAgreementV1.sol"; -import { SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; +import { + poolIndexDataToWrappedParticle, + poolIndexDataToPDPoolIndex, + SuperfluidPool +} from "../../../contracts/agreements/gdav1/SuperfluidPool.sol"; /// @title SuperfluidPool Property Tests /// @author Superfluid @@ -14,7 +18,9 @@ import { SuperfluidPool } from "../../../contracts/agreements/gdav1/SuperfluidPo contract SuperfluidPoolProperties is SuperfluidPool, Test { constructor() SuperfluidPool(GeneralDistributionAgreementV1(address(0))) { } - function _helperAssertWrappedParticle(PoolIndexData memory poolIndexData, BasicParticle memory particle) internal { + function _helperAssertWrappedParticle(PoolIndexData memory poolIndexData, BasicParticle memory particle) + internal pure + { assertEq( FlowRate.unwrap(particle.flow_rate()), int128(poolIndexData.wrappedFlowRate), @@ -32,7 +38,7 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { ); } - function _helperAssertWrappedParticle(MemberData memory memberData, BasicParticle memory particle) internal { + function _helperAssertWrappedParticle(MemberData memory memberData, BasicParticle memory particle) internal pure { assertEq( FlowRate.unwrap(particle.flow_rate()), int128(memberData.syncedFlowRate), @@ -50,12 +56,12 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { ); } - function testPoolIndexDataToWrappedParticle(PoolIndexData memory data) public { - BasicParticle memory wrappedParticle = _poolIndexDataToWrappedParticle(data); + function testPoolIndexDataToWrappedParticle(PoolIndexData memory data) public pure { + BasicParticle memory wrappedParticle = poolIndexDataToWrappedParticle(data); _helperAssertWrappedParticle(data, wrappedParticle); } - function testPoolIndexDataToPDPoolIndex(PoolIndexData memory data) public { + function testPoolIndexDataToPDPoolIndex(PoolIndexData memory data) public pure { vm.assume(data.totalUnits < uint128(type(int128).max)); PDPoolIndex memory pdPoolIndex = poolIndexDataToPDPoolIndex(data); @@ -70,7 +76,7 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { uint32 wrappedSettledAt, int96 wrappedFlowRate, int256 wrappedSettledValue - ) public { + ) public pure { vm.assume(totalUnits > 0); PDPoolIndex memory pdPoolIndex = PDPoolIndex( Unit.wrap(totalUnits), @@ -85,7 +91,7 @@ contract SuperfluidPoolProperties is SuperfluidPool, Test { _helperAssertWrappedParticle(poolIndexData, pdPoolIndex._wrapped_particle); } - function testMemberDataToPDPoolMember(MemberData memory data) public { + function testMemberDataToPDPoolMember(MemberData memory data) public pure { vm.assume(data.ownedUnits < uint128(type(int128).max)); PDPoolMember memory pdPoolMember = _memberDataToPDPoolMember(data); diff --git a/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol b/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol index c505fc7522..5117ad87a5 100644 --- a/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol +++ b/packages/ethereum-contracts/test/foundry/upgradability/SuperfluidUpgradeableBeacon.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; diff --git a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol index 11e966caab..60fab41092 100644 --- a/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/BatchLiquidator.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; import { @@ -28,7 +28,7 @@ contract NonTransferableST is SuperToken { // no-empty-blocks { } - function transferFrom(address holder, address recipient, uint256 amount) public override returns (bool) { + function transferFrom(address, address, uint256) public pure override returns (bool) { revert(); } @@ -61,17 +61,17 @@ contract BatchLiquidatorTest is FoundrySuperfluidTester { _helperTransferAll(superToken, sender, admin); } - function _assertNoCFAFlow(address sender, address receiver) internal { + function _assertNoCFAFlow(address sender, address receiver) internal view { (, int96 flowRate,,) = sf.cfa.getFlow(superToken, sender, receiver); assertEq(flowRate, 0, "BatchLiquidator: CFA Flowrate should be 0"); } - function _assertNoGDAFlow(address sender, ISuperfluidPool pool) internal { + function _assertNoGDAFlow(address sender, ISuperfluidPool pool) internal view { int96 flowRate = sf.gda.getFlowRate(superToken, sender, pool); assertEq(flowRate, 0, "BatchLiquidator: GDA Flowrate should be 0"); } - function _assertLiquidatorBalanceGreater(address _liqudidator, uint256 balanceBefore_) internal { + function _assertLiquidatorBalanceGreater(address _liqudidator, uint256 balanceBefore_) internal view { assertGt( superToken.balanceOf(_liqudidator), balanceBefore_, diff --git a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol index 6c7a60ec55..856d7fb504 100644 --- a/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/IDAv1Forwarder.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; @@ -177,7 +177,7 @@ contract IDAv1ForwarderIntegrationTest is FoundrySuperfluidTester { assertEq(pendingDistribution, 0, "testIDAv1ForwarderGetSubscriptionByID: pending distribution mismatch"); } - function testIDAv1ForwarderEmptyListSubscriptions(address subscriber) external { + function testIDAv1ForwarderEmptyListSubscriptions(address subscriber) external view { vm.assume(subscriber != address(0)); (address[] memory publishers, uint32[] memory indexIds, uint128[] memory unitsList) = sf.idaV1Forwarder.listSubscriptions(superToken, subscriber); diff --git a/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol new file mode 100644 index 0000000000..ac72df5219 --- /dev/null +++ b/packages/ethereum-contracts/test/foundry/utils/MacroForwarder.t.sol @@ -0,0 +1,292 @@ +// SPDX-License-Identifier: AGPLv3 +pragma solidity ^0.8.23; + +import { ISuperfluid, BatchOperation } from "../../../contracts/interfaces/superfluid/ISuperfluid.sol"; +import { ISuperToken } from "../../../contracts/superfluid/SuperToken.sol"; +import { IConstantFlowAgreementV1 } from "../../../contracts/interfaces/agreements/IConstantFlowAgreementV1.sol"; +import { MacroForwarder, IUserDefinedMacro } from "../../../contracts/utils/MacroForwarder.sol"; +import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; + +using SuperTokenV1Library for ISuperToken; + +// ============== Macro Contracts ============== + +// not overriding IUserDefinedMacro here in order to avoid the compiler enforcing the function to be view-only. +contract NaugthyMacro { + int naughtyCounter = -1; + + constructor(bool beNaughty) { + if (beNaughty) naughtyCounter = 0; + } + + // if naughtyCounter >= 0, this changes state, which leads to a revert in the context of a macro call + function buildBatchOperations(ISuperfluid, bytes memory, address /*msgSender*/) external + returns (ISuperfluid.Operation[] memory /*operation*/) + { + // Do the naughty thing (updating state as an expected view function) + if (naughtyCounter >= 0) { + naughtyCounter++; + } + return new ISuperfluid.Operation[](0); + } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { } +} + +contract GoodMacro is IUserDefinedMacro { + function buildBatchOperations(ISuperfluid host, bytes memory params, address /*msgSender*/) external override view + returns (ISuperfluid.Operation[] memory operations) + { + // host-agnostic deployment. alternatively, you may hard code cfa too + IConstantFlowAgreementV1 cfa = IConstantFlowAgreementV1(address(host.getAgreementClass( + keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1") + ))); + // parse params + (ISuperToken token, int96 flowRate, address[] memory recipients) = + abi.decode(params, (ISuperToken, int96, address[])); + // construct batch operations + operations = new ISuperfluid.Operation[](recipients.length); + // Build batch call operations here + for (uint i = 0; i < recipients.length; ++i) { + bytes memory callData = abi.encodeCall(cfa.createFlow, + (token, + recipients[i], + flowRate, + new bytes(0) // placeholder + )); + operations[i] = ISuperfluid.Operation({ + operationType : BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT, // type + target: address(cfa), + data: abi.encode(callData, new bytes(0)) + }); + } + } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { } + + // recommended view function for parameter encoding + function getParams(ISuperToken token, int96 flowRate, address[] calldata recipients) external pure returns (bytes memory) { + return abi.encode(token, flowRate, recipients); + } +} + +// deletes a bunch of flows from one sender to muliple receivers +contract MultiFlowDeleteMacro is IUserDefinedMacro { + error InsufficientReward(); + + function buildBatchOperations(ISuperfluid host, bytes memory params, address msgSender) external override view + returns (ISuperfluid.Operation[] memory operations) + { + IConstantFlowAgreementV1 cfa = IConstantFlowAgreementV1(address(host.getAgreementClass( + keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1") + ))); + + // parse params + (ISuperToken token, address sender, address[] memory receivers, uint256 minBalanceAfter) = + abi.decode(params, (ISuperToken, address, address[], uint256)); + + // construct batch operations + operations = new ISuperfluid.Operation[](receivers.length); + for (uint i = 0; i < receivers.length; ++i) { + bytes memory callData = abi.encodeCall(cfa.deleteFlow, + (token, + sender, + receivers[i], + new bytes(0) // placeholder + )); + operations[i] = ISuperfluid.Operation({ + operationType : BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT, // type + target: address(cfa), + data: abi.encode(callData, new bytes(0)) + }); + } + } + + // recommended view function for parameter encoding + function getParams(ISuperToken superToken, address sender, address[] memory receivers, uint256 minBalanceAfter) + external pure + returns (bytes memory) + { + return abi.encode(superToken, sender, receivers, minBalanceAfter); + } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { + // parse params + (ISuperToken superToken,,, uint256 minBalanceAfter) = + abi.decode(params, (ISuperToken, address, address[], uint256)); + if (superToken.balanceOf(msgSender) < minBalanceAfter) { + revert InsufficientReward(); + } + } +} + +/* + * Example for a macro which has all the state needed, thus needs no additional calldata + * in the context of batch calls. + * Important: state changes do NOT take place in the context of macro calls. + */ +contract StatefulMacro is IUserDefinedMacro { + struct Config { + MacroForwarder macroForwarder; + ISuperToken superToken; + int96 flowRate; + address[] recipients; + address referrer; + } + Config public config; + + // imagine this to be permissioned, e.g. using Ownable + function setConfig(Config memory config_) public { + config = config_; + } + + function buildBatchOperations(ISuperfluid host, bytes memory /*params*/, address /*msgSender*/) + external override view + returns (ISuperfluid.Operation[] memory operations) + { + // host-agnostic deployment. alternatively, you may hard code cfa too + IConstantFlowAgreementV1 cfa = IConstantFlowAgreementV1(address(host.getAgreementClass( + keccak256("org.superfluid-finance.agreements.ConstantFlowAgreement.v1") + ))); + + // construct batch operations from persisted config + operations = new ISuperfluid.Operation[](config.recipients.length); + for (uint i = 0; i < config.recipients.length; ++i) { + bytes memory callData = abi.encodeCall(cfa.createFlow, + (config.superToken, + config.recipients[i], + config.flowRate, + new bytes(0) // placeholder + )); + operations[i] = ISuperfluid.Operation({ + operationType : BatchOperation.OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT, // type + target: address(cfa), + data: abi.encode(callData, abi.encode(config.referrer)) + }); + } + } + + function postCheck(ISuperfluid host, bytes memory params, address msgSender) external view { } +} + +// ============== Test Contract ============== + +contract MacroForwarderTest is FoundrySuperfluidTester { + MacroForwarder internal macroForwarder; + + constructor() FoundrySuperfluidTester(5) { + } + + function setUp() public override { + super.setUp(); + macroForwarder = new MacroForwarder(sf.host); + vm.startPrank(address(sf.governance.owner())); + sf.governance.enableTrustedForwarder(sf.host, ISuperToken(address(0)), address(macroForwarder)); + vm.stopPrank(); + } + + function testDummyMacro() external { + NaugthyMacro m = new NaugthyMacro(false /* not naughty */); + macroForwarder.runMacro(IUserDefinedMacro(address(m)), new bytes(0)); + } + + function testNaugtyMacro() external { + NaugthyMacro m = new NaugthyMacro(true /* naughty */); + vm.expectRevert(); + // Note: need to cast the naughty macro + macroForwarder.runMacro(IUserDefinedMacro(address(m)), new bytes(0)); + } + + function testGoodMacro() external { + GoodMacro m = new GoodMacro(); + address[] memory recipients = new address[](2); + recipients[0] = bob; + recipients[1] = carol; + vm.startPrank(admin); + // NOTE! This is different from abi.encode(superToken, int96(42), [bob, carol]), + // which is a fixed array: address[2]. + macroForwarder.runMacro(m, abi.encode(superToken, int96(42), recipients)); + assertEq(sf.cfa.getNetFlow(superToken, bob), 42); + assertEq(sf.cfa.getNetFlow(superToken, carol), 42); + vm.stopPrank(); + } + + function testGoodMacroUsingGetParams() external { + GoodMacro m = new GoodMacro(); + address[] memory recipients = new address[](2); + recipients[0] = bob; + recipients[1] = carol; + vm.startPrank(admin); + // NOTE! This is different from abi.encode(superToken, int96(42), [bob, carol]), + // which is a fixed array: address[2]. + macroForwarder.runMacro(m, m.getParams(superToken, int96(42), recipients)); + assertEq(sf.cfa.getNetFlow(superToken, bob), 42); + assertEq(sf.cfa.getNetFlow(superToken, carol), 42); + vm.stopPrank(); + } + + function testStatefulMacro() external { + address[] memory recipients = new address[](2); + recipients[0] = bob; + recipients[1] = carol; + StatefulMacro m = new StatefulMacro(); + m.setConfig(StatefulMacro.Config( + macroForwarder, superToken, 42, recipients, dan + )); + vm.startPrank(admin); + macroForwarder.runMacro(m, new bytes(0)); + assertEq(sf.cfa.getNetFlow(superToken, bob), 42); + assertEq(sf.cfa.getNetFlow(superToken, carol), 42); + vm.stopPrank(); + } + + function testMultiFlowDeleteMacro() external { + MultiFlowDeleteMacro m = new MultiFlowDeleteMacro(); + address sender = alice; + address[] memory recipients = new address[](3); + recipients[0] = bob; + recipients[1] = carol; + recipients[2] = dan; + + vm.startPrank(sender); + // flows to be deleted need to exist in the first place + for (uint i = 0; i < recipients.length; ++i) { + superToken.createFlow(recipients[i], 42); + } + // now batch-delete them + macroForwarder.runMacro(m, m.getParams(superToken, sender, recipients, 0)); + + for (uint i = 0; i < recipients.length; ++i) { + assertEq(sf.cfa.getNetFlow(superToken, recipients[i]), 0); + } + vm.stopPrank(); + } + + function testPostCheck() external { + MultiFlowDeleteMacro m = new MultiFlowDeleteMacro(); + address[] memory recipients = new address[](2); + recipients[0] = bob; + recipients[1] = carol; + int96 flowRate = 1e18; + + vm.startPrank(alice); + // flows to be deleted need to exist in the first place + for (uint i = 0; i < recipients.length; ++i) { + superToken.createFlow(recipients[i], flowRate); + } + vm.stopPrank(); + + // fast forward 3000 days + vm.warp(block.timestamp + 86400*3000); + + // alice is now insolvent, dan can batch-delete the flows + vm.startPrank(dan); + uint256 danBalanceBefore = superToken.balanceOf(dan); + // unreasonable reward expectation: post check fails + vm.expectRevert(MultiFlowDeleteMacro.InsufficientReward.selector); + macroForwarder.runMacro(m, abi.encode(superToken, alice, recipients, danBalanceBefore + 1e24)); + + // reasonable reward expectation: post check passes + macroForwarder.runMacro(m, abi.encode(superToken, alice, recipients, danBalanceBefore + (uint256(uint96(flowRate)) * 600))); + } +} \ No newline at end of file diff --git a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol index d3db0b4c53..d39afe4456 100644 --- a/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol +++ b/packages/ethereum-contracts/test/foundry/utils/TOGA.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: AGPLv3 -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import "forge-std/Test.sol"; import { FoundrySuperfluidTester, SuperTokenV1Library } from "../FoundrySuperfluidTester.sol"; @@ -49,7 +49,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { * @param account The address of the account to check. * @param expectedNetFlow The expected net flow. */ - function _assertNetFlow(ISuperToken superToken_, address account, int96 expectedNetFlow) internal { + function _assertNetFlow(ISuperToken superToken_, address account, int96 expectedNetFlow) internal view { int96 flowRate = sf.cfa.getNetFlow(superToken_, account); assertEq(flowRate, expectedNetFlow, "_assertNetFlow: net flow not equal"); } @@ -145,7 +145,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { assertEq(exitRate, newExitRate, "_helperChangeExitRate: exit rate not equal"); } - function _boundBondValue(uint256 bond_) internal view returns (uint256 bond) { + function _boundBondValue(uint256 bond_) internal pure returns (uint256 bond) { // User only has 64 bits test super tokens // setting the lower bound > 1 in order to avoid // failures due to the exit stream not having enough min deposit @@ -161,11 +161,11 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { /** * @dev Tests the contract setup. */ - function testContractSetup() public { + function testContractSetup() public view { assertEq(toga.minBondDuration(), MIN_BOND_DURATION, "minBondDuration"); } - function testNoPICExistsInitially() public { + function testNoPICExistsInitially() public view { assertEq( address(0), toga.getCurrentPIC(superToken), "testNoPICExistsInitially: current PIC should be address(0)" ); @@ -207,7 +207,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { _helperSendPICBid(bob, superToken, bobBond, 0); } - function testTOGARegisteredWithERC1820() public { + function testTOGARegisteredWithERC1820() public view { address implementer1 = _ERC1820_REG.getInterfaceImplementer(address(toga), keccak256("TOGAv1")); address implementer2 = _ERC1820_REG.getInterfaceImplementer(address(toga), keccak256("TOGAv2")); @@ -260,7 +260,7 @@ contract TOGAIntegrationTest is FoundrySuperfluidTester { toga.changeExitRate(superToken, exitRate); } - function testMaxExitRateForGreaterThanOrEqualToDefaultExitRate(uint256 bond) public { + function testMaxExitRateForGreaterThanOrEqualToDefaultExitRate(uint256 bond) public view { bond = _boundBondValue(bond); // the max exit rate needs to be greater or equal than default exit rate diff --git a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js index f718d5a168..cc934187fa 100644 --- a/packages/ethereum-contracts/test/ops-scripts/deployment.test.js +++ b/packages/ethereum-contracts/test/ops-scripts/deployment.test.js @@ -124,7 +124,9 @@ contract("Embedded deployment scripts", (accounts) => { // with constructor param const a1 = await web3tx(Superfluid.new, "Superfluid.new 1")( true, // nonUpgradable - false // appWhiteListingEnabled + false, // appWhiteListingEnabled + 3000000, // callbackGasLimit + ZERO_ADDRESS // dmzForwader ); assert.isFalse(await codeChanged(web3, Superfluid, a1.address)); } diff --git a/packages/ethereum-contracts/truffle-config.js b/packages/ethereum-contracts/truffle-config.js index facbf83872..8829a93c28 100644 --- a/packages/ethereum-contracts/truffle-config.js +++ b/packages/ethereum-contracts/truffle-config.js @@ -55,20 +55,16 @@ try { const ALIASES = { "eth-mainnet": ["mainnet"], - "eth-goerli": ["goerli"], "eth-sepolia": ["sepolia"], "xdai-mainnet": ["xdai"], "polygon-mainnet": ["matic"], - "polygon-mumbai": ["mumbai"], "optimism-mainnet": ["opmainnet"], - "optimism-goerli": ["opgoerli"], "optimism-sepolia": ["opsepolia"], "arbitrum-one": ["arbone"], - "arbitrum-goerli": ["arbgoerli"], "avalanche-c": ["avalanche"], "avalanche-fuji": ["avafuji"], @@ -77,27 +73,16 @@ const ALIASES = { "celo-mainnet": ["celo"], - "base-goerli": ["bgoerli"], - - "polygon-zkevm-testnet": ["pzkevmtest"], - "base-mainnet": ["base"], + "base-sepolia": ["bsepolia"], "scroll-sepolia": ["scrsepolia"], "scroll-mainnet": ["scroll"], + "degenchain": ["degen"], + // wildcard for any network "any": ["any"], - - // currently unsupported or deprecated networks - // - "optimism-kovan": ["opkovan"], - - "arbitrum-rinkeby": ["arbrinkeby"], - - "bsc-chapel": ["chapel"], - - "celo-alfajores": ["alfajores"], }; const DEFAULT_NETWORK_TIMEOUT = 60000; @@ -121,6 +106,9 @@ function getEnvValue(networkName, key) { } function getProviderUrlByTemplate(networkName) { + if (process.env.PROVIDER_URL_OVERRIDE !== undefined) { + return process.env.PROVIDER_URL_OVERRIDE; + } if (process.env.PROVIDER_URL_TEMPLATE !== undefined) { if (! process.env.PROVIDER_URL_TEMPLATE.includes("{{NETWORK}}")) { console.error("env var PROVIDER_URL_TEMPLATE has invalid value"); @@ -140,21 +128,25 @@ function createNetworkDefaultConfiguration( networkName, providerWrapper = (a) => a ) { + const providerConfig = { + url: providerWrapper( + getEnvValue(networkName, "PROVIDER_URL") || + getProviderUrlByTemplate(networkName) + ), + addressIndex: 0, + numberOfAddresses: 10, + shareNonce: true, + }; + providerConfig.mnemonic = getEnvValue(networkName, "MNEMONIC"); + if (!providerConfig.mnemonic) { + const pkey = getEnvValue(networkName, "PRIVATE_KEY"); + providerConfig.privateKeys = [pkey]; + } return { - provider: () => - new HDWalletProvider({ - mnemonic: getEnvValue(networkName, "MNEMONIC"), - url: providerWrapper( - getEnvValue(networkName, "PROVIDER_URL") || - getProviderUrlByTemplate(networkName) - ), - addressIndex: 0, - numberOfAddresses: 10, - shareNonce: true, - }), - gasPrice: +getEnvValue(networkName, "GAS_PRICE"), - maxFeePerGas: +getEnvValue(networkName, "MAX_FEE_PER_GAS"), - maxPriorityFeePerGas: +getEnvValue(networkName, "MAX_PRIORITY_FEE_PER_GAS"), + provider: () => new HDWalletProvider(providerConfig), + gasPrice: getEnvValue(networkName, "GAS_PRICE"), + maxFeePerGas: getEnvValue(networkName, "MAX_FEE_PER_GAS"), + maxPriorityFeePerGas: getEnvValue(networkName, "MAX_PRIORITY_FEE_PER_GAS"), timeoutBlocks: 50, // # of blocks before a deployment times out (minimum/default: 50) skipDryRun: false, // Skip dry run before migrations? (default: false for public nets ) networkCheckTimeout: DEFAULT_NETWORK_TIMEOUT, @@ -164,7 +156,7 @@ function createNetworkDefaultConfiguration( const E = (module.exports = { plugins: [ //"truffle-security", - "truffle-plugin-verify", + "@d10r/truffle-plugin-verify", ], /** * Networks define how you connect to your ethereum client and let you set the @@ -189,13 +181,6 @@ const E = (module.exports = { "eth-mainnet": { ...createNetworkDefaultConfiguration("eth-mainnet"), network_id: 1, // mainnet's id - maxPriorityFeePerGas: 200e6, // 0.2 gwei. The default of 2.5 gwei is overpaying - maxFeePerGas: 50e9, - }, - - "eth-goerli": { - ...createNetworkDefaultConfiguration("eth-goerli"), - network_id: 5, }, "eth-sepolia": { @@ -210,18 +195,8 @@ const E = (module.exports = { "polygon-mainnet": { ...createNetworkDefaultConfiguration("polygon-mainnet"), network_id: 137, - maxPriorityFeePerGas: 31e9, - maxFeePerGas: 1500e9, - }, - - "polygon-mumbai": { - ...createNetworkDefaultConfiguration("polygon-mumbai"), - network_id: 80001, - }, - - "polygon-zkevm-testnet": { - ...createNetworkDefaultConfiguration("polygon-zkevm-testnet"), - network_id: 1442, + maxPriorityFeePerGas: 37e9, + maxFeePerGas: 500e9, }, @@ -239,11 +214,8 @@ const E = (module.exports = { "optimism-mainnet": { ...createNetworkDefaultConfiguration("optimism-mainnet"), network_id: 10, - }, - - "optimism-goerli": { - ...createNetworkDefaultConfiguration("optimism-goerli"), - network_id: 420, + maxPriorityFeePerGas: 1e6, // 0.001 gwei + maxFeePerGas: 1e9, // 1 gwei }, "optimism-sepolia": { @@ -259,11 +231,6 @@ const E = (module.exports = { network_id: 42161, }, - "arbitrum-goerli": { - ...createNetworkDefaultConfiguration("arbitrum-goerli"), - network_id: 421613, - }, - // // Avalanche C-Chain: https://docs.avax.network/learn/platform-overview#contract-chain-c-chain // @@ -292,10 +259,6 @@ const E = (module.exports = { ...createNetworkDefaultConfiguration("celo-mainnet"), network_id: 42220, }, - "celo-alfajores": { - ...createNetworkDefaultConfiguration("celo-alfajores"), - network_id: 44787, - }, // // Base: https://base.org/ @@ -306,9 +269,9 @@ const E = (module.exports = { maxPriorityFeePerGas: 1e6, // 0.001 gwei - even 0 may do maxFeePerGas: 1e9, // 1 gwei }, - "base-goerli": { - ...createNetworkDefaultConfiguration("base-goerli"), - network_id: 84531, + "base-sepolia": { + ...createNetworkDefaultConfiguration("base-sepolia"), + network_id: 84532, }, // @@ -324,20 +287,21 @@ const E = (module.exports = { }, // - // Wildcard + // Degen Chain: https://www.degen.tips/ // - "any": { - ...createNetworkDefaultConfiguration("any"), - network_id: "*", + "degenchain": { + ...createNetworkDefaultConfiguration("degenchain"), + network_id: 666666666, + maxPriorityFeePerGas: 1e6, // 0.001 gwei + maxFeePerGas: 100e9, // 100 gwei }, // - // Currently unsupported networks + // Wildcard // - - "bsc-chapel": { - ...createNetworkDefaultConfiguration("bsc-chapel"), - network_id: 97, + "any": { + ...createNetworkDefaultConfiguration("any"), + network_id: "*", }, /// For truffle development environment @@ -413,7 +377,7 @@ const E = (module.exports = { // Fetch exact version from solc-bin (default: truffle's version) // If SOLC environment variable is provided, assuming it is available as "solc", use it instead. // Ref, this maybe possible in the future: https://github.com/trufflesuite/truffle/pull/6007 - version: process.env.SOLC ? "native" : "0.8.19", + version: process.env.SOLC ? "native" : "0.8.26", settings: { // See the solidity docs for advice about optimization and evmVersion optimizer: { diff --git a/packages/ethereum-contracts/utils/supertoken-deployer.html b/packages/ethereum-contracts/utils/supertoken-deployer.html index 238a409095..be849eed48 100644 --- a/packages/ethereum-contracts/utils/supertoken-deployer.html +++ b/packages/ethereum-contracts/utils/supertoken-deployer.html @@ -53,13 +53,6 @@ // TODO: replace with external canonical network list networks = [ - { chainId: 5, hostAddr: "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9" }, // eth-goerli - { chainId: 42, hostAddr: "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3" }, // eth-kovan - { chainId: 4, hostAddr: "0xeD5B5b32110c3Ded02a07c8b8e97513FAfb883B6" }, // eth-rinkeby - { chainId: 3, hostAddr: "0xF2B4E81ba39F5215Db2e05B2F66f482BB8e87FD2" }, // eth-ropsten - { chainId: 80001, hostAddr: "0xEB796bdb90fFA0f28255275e16936D25d3418603" }, // polygon-mumbai - { chainId: 69, hostAddr: "0x74b57883f8ce9F2BD330286E884CfD8BB24AC4ED" }, // optimism-kovan - { chainId: 421611, hostAddr: "0xE01F8743677Da897F4e7De9073b57Bf034FC2433" }, // arbitrum-rinkeby { chainId: 43113, hostAddr: "0xf04F2C525819691ed9ABD3D2B7109E1633795e68" }, // avalanche-fuji { chainId: 137, hostAddr: "0x3E14dC1b13c488a8d5D310918780c983bD5982E7" }, // polygon-mainnet diff --git a/packages/hot-fuzz/.gitignore b/packages/hot-fuzz/.gitignore index a01f4d3006..f8117ea298 100644 --- a/packages/hot-fuzz/.gitignore +++ b/packages/hot-fuzz/.gitignore @@ -3,3 +3,4 @@ /crytic-export /artifacts /packages +/echidna.yaml diff --git a/packages/hot-fuzz/.solhint.json b/packages/hot-fuzz/.solhint.json index 6554ad1885..f127ecd0bb 100644 --- a/packages/hot-fuzz/.solhint.json +++ b/packages/hot-fuzz/.solhint.json @@ -9,7 +9,7 @@ "max-states-count": "off", "no-inline-assembly": "off", "mark-callable-contracts": "off", - "custom-errors": "off", + "gas-custom-errors": "off", "one-contract-per-file": "off", "max-line-length": ["error", 120], "func-param-name-mixedcase": "error", diff --git a/packages/hot-fuzz/README.md b/packages/hot-fuzz/README.md index ddc1dac72e..5e73390d83 100644 --- a/packages/hot-fuzz/README.md +++ b/packages/hot-fuzz/README.md @@ -33,23 +33,14 @@ yarn add --dev 'https://gitpkg.now.sh/api/pkg?url=superfluid-finance/protocol-mo > - https://github.com/yarnpkg/yarn/issues/4725 > - https://gitpkg.vercel.app/ -Also make sure the dependency `@superfluid-finance/ethereum-contracts` is at least version 1.2.2. +Also make sure the dependency `@superfluid-finance/ethereum-contracts` is from the latest dev branch, since it is still +under active development. -3. Extend your `truffle-config.js` +3. Make sure you use foundry and configure it properly: -It is required to link external libraries correctly during the testing. The workaround is provided, all you need to do -is to slightly change your `truffle-config.js`: +(TODO.) -```js -const M = (module.exports = { - // networks, compilers, ... -} -require("@superfluid-finance/hot-fuzz").hotfuzzPatchTruffleConfig(M); -``` - -> :warning: hardhat-config support is currently missing, pull request appreciated! -> -> Note that there is no harm just to create a minimal truffle-config.js in your project if that helps for now! +> :warning: there is no truffle or hardhat support at the moment :star: Congrats! Now you should be all set! diff --git a/packages/hot-fuzz/contracts/HotFuzzBase.sol b/packages/hot-fuzz/contracts/HotFuzzBase.sol index 7f3d776eaa..5e0fb92659 100644 --- a/packages/hot-fuzz/contracts/HotFuzzBase.sol +++ b/packages/hot-fuzz/contracts/HotFuzzBase.sol @@ -36,7 +36,7 @@ contract HotFuzzBase { uint private constant INIT_SUPER_TOKEN_BALANCE = type(uint128).max; // immutables - SuperfluidFrameworkDeployer private immutable _sfDeployer; + SuperfluidFrameworkDeployer internal immutable _sfDeployer; TestToken internal immutable token; SuperToken internal immutable superToken; uint internal immutable nTesters; diff --git a/packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.sol b/packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.t.sol similarity index 100% rename from packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.sol rename to packages/hot-fuzz/contracts/superfluid-tests/ConstantFlowAgreementV1.prop.t.sol diff --git a/packages/hot-fuzz/default.nix b/packages/hot-fuzz/default.nix new file mode 100644 index 0000000000..32b97ed9a4 --- /dev/null +++ b/packages/hot-fuzz/default.nix @@ -0,0 +1,17 @@ +{ + halfBoardModule = { + dependencies = [ ../ethereum-contracts]; + outputs = [ + "build" + "crytic-export" + ]; + includedFiles = [ + ./package.json + ./foundry.toml + ./contracts + ./scripts + ./hot-fuzz + ./Makefile + ]; + }; +} diff --git a/packages/hot-fuzz/echidna.yaml b/packages/hot-fuzz/echidna.yaml deleted file mode 100644 index 814b007eca..0000000000 --- a/packages/hot-fuzz/echidna.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# format: "json" -# testLimit: 1000 -corpusDir: "corpus" -cryticArgs: [ - "--compile-force-framework=${CRYTIC_COMPILE_FRAMEWORK}", - "--truffle-build-directory=build/truffle", - "--foundry-out-directory=build/foundry/out", - # to generate: - # $ (j=$((0xf01));tasks/list-all-linked-libraries.sh | while read i;do echo -n "($i,$(printf "0x%x" $j)),";j=$((j+1));done) - "--compile-libraries=(CFAv1ForwarderDeployerLibrary,0xf01),(GDAv1ForwarderDeployerLibrary,0xf02),(IDAv1ForwarderDeployerLibrary,0xf03),(ProxyDeployerLibrary,0xf04),(SlotsBitmapLibrary,0xf05),(SuperfluidCFAv1DeployerLibrary,0xf06),(SuperfluidFlowNFTLogicDeployerLibrary,0xf07),(SuperfluidGDAv1DeployerLibrary,0xf08),(SuperfluidGovDeployerLibrary,0xf09),(SuperfluidHostDeployerLibrary,0xf0a),(SuperfluidIDAv1DeployerLibrary,0xf0b),(SuperfluidLoaderDeployerLibrary,0xf0c),(SuperfluidPeripheryDeployerLibrary,0xf0d),(SuperfluidPoolDeployerLibrary,0xf0e),(SuperfluidPoolLogicDeployerLibrary,0xf0f),(SuperfluidPoolNFTLogicDeployerLibrary,0xf10),(SuperTokenDeployerLibrary,0xf11),(TokenDeployerLibrary,0xf12)" -] -deployContracts: [ - # to generate: - # $ (j=$((0xf01));tasks/list-all-linked-libraries.sh | while read i;do echo "[\"$(printf "0x%x" $j)\", \"$i\"],";j=$((j+1));done) - ["0xf01", "CFAv1ForwarderDeployerLibrary"], - ["0xf02", "GDAv1ForwarderDeployerLibrary"], - ["0xf03", "IDAv1ForwarderDeployerLibrary"], - ["0xf04", "ProxyDeployerLibrary"], - ["0xf05", "SlotsBitmapLibrary"], - ["0xf06", "SuperfluidCFAv1DeployerLibrary"], - ["0xf07", "SuperfluidFlowNFTLogicDeployerLibrary"], - ["0xf08", "SuperfluidGDAv1DeployerLibrary"], - ["0xf09", "SuperfluidGovDeployerLibrary"], - ["0xf0a", "SuperfluidHostDeployerLibrary"], - ["0xf0b", "SuperfluidIDAv1DeployerLibrary"], - ["0xf0c", "SuperfluidLoaderDeployerLibrary"], - ["0xf0d", "SuperfluidPeripheryDeployerLibrary"], - ["0xf0e", "SuperfluidPoolDeployerLibrary"], - ["0xf0f", "SuperfluidPoolLogicDeployerLibrary"], - ["0xf10", "SuperfluidPoolNFTLogicDeployerLibrary"], - ["0xf11", "SuperTokenDeployerLibrary"], - ["0xf12", "TokenDeployerLibrary"], -] -deployBytecodes: [ - ["0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24", "608060405234801561001057600080fd5b506109c5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a5576000357c010000000000000000000000000000000000000000000000000000000090048063a41e7d5111610078578063a41e7d51146101d4578063aabbb8ca1461020a578063b705676514610236578063f712f3e814610280576100a5565b806329965a1d146100aa5780633d584063146100e25780635df8122f1461012457806365ba36c114610152575b600080fd5b6100e0600480360360608110156100c057600080fd5b50600160a060020a038135811691602081013591604090910135166102b6565b005b610108600480360360208110156100f857600080fd5b5035600160a060020a0316610570565b60408051600160a060020a039092168252519081900360200190f35b6100e06004803603604081101561013a57600080fd5b50600160a060020a03813581169160200135166105bc565b6101c26004803603602081101561016857600080fd5b81019060208101813564010000000081111561018357600080fd5b82018360208201111561019557600080fd5b803590602001918460018302840111640100000000831117156101b757600080fd5b5090925090506106b3565b60408051918252519081900360200190f35b6100e0600480360360408110156101ea57600080fd5b508035600160a060020a03169060200135600160e060020a0319166106ee565b6101086004803603604081101561022057600080fd5b50600160a060020a038135169060200135610778565b61026c6004803603604081101561024c57600080fd5b508035600160a060020a03169060200135600160e060020a0319166107ef565b604080519115158252519081900360200190f35b61026c6004803603604081101561029657600080fd5b508035600160a060020a03169060200135600160e060020a0319166108aa565b6000600160a060020a038416156102cd57836102cf565b335b9050336102db82610570565b600160a060020a031614610339576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b6103428361092a565b15610397576040805160e560020a62461bcd02815260206004820152601a60248201527f4d757374206e6f7420626520616e204552433136352068617368000000000000604482015290519081900360640190fd5b600160a060020a038216158015906103b85750600160a060020a0382163314155b156104ff5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012082600160a060020a031663249cb3fa85846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182600160a060020a0316600160a060020a031681526020019250505060206040518083038186803b15801561047e57600080fd5b505afa158015610492573d6000803e3d6000fd5b505050506040513d60208110156104a857600080fd5b5051146104ff576040805160e560020a62461bcd02815260206004820181905260248201527f446f6573206e6f7420696d706c656d656e742074686520696e74657266616365604482015290519081900360640190fd5b600160a060020a03818116600081815260208181526040808320888452909152808220805473ffffffffffffffffffffffffffffffffffffffff19169487169485179055518692917f93baa6efbd2244243bfee6ce4cfdd1d04fc4c0e9a786abd3a41313bd352db15391a450505050565b600160a060020a03818116600090815260016020526040812054909116151561059a5750806105b7565b50600160a060020a03808216600090815260016020526040902054165b919050565b336105c683610570565b600160a060020a031614610624576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420746865206d616e616765720000000000000000000000000000000000604482015290519081900360640190fd5b81600160a060020a031681600160a060020a0316146106435780610646565b60005b600160a060020a03838116600081815260016020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169585169590951790945592519184169290917f605c2dbf762e5f7d60a546d42e7205dcb1b011ebc62a61736a57c9089d3a43509190a35050565b600082826040516020018083838082843780830192505050925050506040516020818303038152906040528051906020012090505b92915050565b6106f882826107ef565b610703576000610705565b815b600160a060020a03928316600081815260208181526040808320600160e060020a031996909616808452958252808320805473ffffffffffffffffffffffffffffffffffffffff19169590971694909417909555908152600284528181209281529190925220805460ff19166001179055565b600080600160a060020a038416156107905783610792565b335b905061079d8361092a565b156107c357826107ad82826108aa565b6107b85760006107ba565b815b925050506106e8565b600160a060020a0390811660009081526020818152604080832086845290915290205416905092915050565b6000808061081d857f01ffc9a70000000000000000000000000000000000000000000000000000000061094c565b909250905081158061082d575080155b1561083d576000925050506106e8565b61084f85600160e060020a031961094c565b909250905081158061086057508015155b15610870576000925050506106e8565b61087a858561094c565b909250905060018214801561088f5750806001145b1561089f576001925050506106e8565b506000949350505050565b600160a060020a0382166000908152600260209081526040808320600160e060020a03198516845290915281205460ff1615156108f2576108eb83836107ef565b90506106e8565b50600160a060020a03808316600081815260208181526040808320600160e060020a0319871684529091529020549091161492915050565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff161590565b6040517f01ffc9a7000000000000000000000000000000000000000000000000000000008082526004820183905260009182919060208160248189617530fa90519096909550935050505056fea165627a7a72305820377f4a2d4301ede9949f163f319021a6e9c687c292a5e2b2c4734c126b524e6c0029"], -] diff --git a/packages/hot-fuzz/foundry.toml b/packages/hot-fuzz/foundry.toml index f383010324..5cd5230ad1 100644 --- a/packages/hot-fuzz/foundry.toml +++ b/packages/hot-fuzz/foundry.toml @@ -1,7 +1,7 @@ [profile.default] root = '../..' src = 'packages/hot-fuzz/contracts' -solc_version = "0.8.19" +solc_version = "0.8.23" remappings = [ '@superfluid-finance/ethereum-contracts/contracts/=packages/ethereum-contracts/contracts/', '@superfluid-finance/solidity-semantic-money/src/=packages/solidity-semantic-money/src/', diff --git a/packages/hot-fuzz/hot-fuzz b/packages/hot-fuzz/hot-fuzz index 3c85eef5e7..587abe7dfa 100755 --- a/packages/hot-fuzz/hot-fuzz +++ b/packages/hot-fuzz/hot-fuzz @@ -2,66 +2,90 @@ # In all seriousness, this script should be written in perl. To the dearest leader Tim Toady. -D="$(dirname "$0")" -L="$(readlink "$0")" # do not use -f since mac BSD coreutils does not like it - ECHIDNA=${ECHIDNA:-echidna} -HOTFUZZ_DIR=$D/"$(dirname "$L")" +HOTFUZZ_DIR="$(readlink -f "$(dirname "$0")")" set -xe -function apply_crytic_workaround() { - # SEE https://github.com/crytic/echidna/issues/738 - [ -e "node_modules" ] || mkdir -p node_modules - ln -sf ../../../node_modules/\@superfluid-finance node_modules/ - ln -sf ../../../node_modules/\@openzeppelin node_modules/ - ln -sf ../../packages . -} - -function cleanup_crytic_workaround() { - rm -f "node_modules/@superfluid-finance" || true - rm -f "node_modules/@openzeppelin" || true - rm -f packages || true -} - -function digest_last_corpus() { - sleep 2 # wait for corpus dumped, just in case - $HOTFUZZ_DIR/tasks/digest-corpus $(ls corpus/covered.*.txt | tail -n1) -} - function digests() { digest_last_corpus } trap digests SIGINT - -function cleanup() { - cleanup_crytic_workaround -} -trap cleanup EXIT +# trap cleanup EXIT function oops() { echo "$@" >&2 exit 1 } -# TODO: have a commandline option -mode=${HOT_FUZZ_MODE:-truffle} +DIGESTED= +function digest_last_corpus() { + sleep 2 # wait for corpus dumped, just in case + "$HOTFUZZ_DIR"/scripts/digest-corpus "$(find "$PROJECT_DIR"/corpus -name "covered.*.txt" | tail -n1)" +} + +function build_echidna_yaml() { + # to generate --compile-libraries + # $ (j=$((0xf01));tasks/list-all-linked-libraries.sh | while read i;do echo -n "($i,$(printf "0x%x" "$j")),";j=$((j+1));done) + # to generate deployContracts + # $ (j=$((0xf01));tasks/list-all-linked-libraries.sh | while read i;do echo "[\"$(printf "0x%x" "$j")\", \"$i\"],";j=$((j+1));done) + + echo "# This file is auto-generated" + + echo "# Taken from $TEST_CONTRACT_CONFIG" + cat "$TEST_CONTRACT_CONFIG" + + echo "# Generated by build_echidna_yaml" + cat < "$PROJECT_DIR"/echidna.yaml + + "$ECHIDNA" "$PROJECT_DIR" \ + --config "$PROJECT_DIR"/echidna.yaml \ + --contract "$TEST_CONTRACT" \ && digests } TEST_CONTRACT_CONFIG=$1 [ -z "$TEST_CONTRACT_CONFIG" ] && oops "No contract specified." -hott $TEST_CONTRACT_CONFIG +hott "$TEST_CONTRACT_CONFIG" diff --git a/packages/hot-fuzz/index.js b/packages/hot-fuzz/index.js deleted file mode 100644 index e51f45f860..0000000000 --- a/packages/hot-fuzz/index.js +++ /dev/null @@ -1,45 +0,0 @@ -function addr(a) { return "0x" + "0".repeat(40 - a.length) + a; } - -function hotfuzzPatchTruffleConfig(c) { - if (process.env.HOT_FUZZ_MODE) { -// -// // create settings field if not exists -// c.compilers.solc.settings = { -// ...c.compilers.solc.settings, -// }; -// -// // Manual library mappings, these should match deployContracts in "echidna.yaml". -// c.compilers.solc.settings.libraries = { -// ...c.compilers.solc.settings.libraries, -// "@superfluid-finance/ethereum-contracts/contracts/libs/SlotsBitmapLibrary.sol": { -// SlotsBitmapLibrary: addr("f01"), -// }, -// // to generate: -// // $ (j=0;sed -nE 's/^library\s+(\w+)\s+\{/\1/pg' contracts/utils/SuperfluidFrameworkDeploymentSteps.sol | sort | while read i;do echo "$i: addr(\"f1$(printf "%x" $j)\")";j=$((j+1));done) -// "@superfluid-finance/ethereum-contracts/contracts/utils/SuperfluidFrameworkDeploymentSteps.sol": { -// CFAv1ForwarderDeployerLibrary: addr("f10"), -// IDAv1ForwarderDeployerLibrary: addr("f11"), -// ProxyDeployerLibrary: addr("f12"), -// SuperfluidCFAv1DeployerLibrary: addr("f13"), -// SuperfluidGovDeployerLibrary: addr("f14"), -// SuperfluidHostDeployerLibrary: addr("f15"), -// SuperfluidIDAv1DeployerLibrary: addr("f16"), -// SuperfluidLoaderDeployerLibrary: addr("f17"), -// SuperfluidNFTLogicDeployerLibrary: addr("f18"), -// SuperfluidPeripheryDeployerLibrary: addr("f19"), -// SuperTokenDeployerLibrary: addr("f1a"), -// TokenDeployerLibrary: addr("f1b"), -// }, -// "@superfluid-finance/ethereum-contracts/contracts/apps/SuperfluidLoaderLibrary.sol": { -// SuperfluidLoaderLibrary: addr("f20") -// }, -// "@superfluid-finance/ethereum-contracts/contracts/libs/SuperfluidPoolDeployerLibrary.sol": { -// SuperfluidPoolDeployerLibrary: addr("f30") -// }, -// }; - } -} - -module.exports = { - hotfuzzPatchTruffleConfig, -}; diff --git a/packages/hot-fuzz/package.json b/packages/hot-fuzz/package.json index c462bd46d0..6bc9083056 100644 --- a/packages/hot-fuzz/package.json +++ b/packages/hot-fuzz/package.json @@ -1,35 +1,31 @@ { "name": "@superfluid-finance/hot-fuzz", - "version": "0.1.0", "description": "A hot fuzz for testing Superfluid protocol and Super Apps", - "main": "index.js", - "scripts": { - "lint": "run-s lint:*", - "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", - "check-updates": "ncu --target minor" - }, + "version": "0.1.0", "bin": { "hot-fuzz": "./hot-fuzz" }, - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/hot-fuzz" - }, + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", "dependencies": { - "@openzeppelin/contracts": "4.9.3" - }, - "peerDependencies": { - "@superfluid-finance/ethereum-contracts": "1.8.0" + "@openzeppelin/contracts": "4.9.6" }, "devDependencies": { - "@superfluid-finance/ethereum-contracts": "1.9.0" + "@superfluid-finance/ethereum-contracts": "^1.11.0" }, + "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme", "license": "AGPL-3.0", - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" + "main": "index.js", + "peerDependencies": { + "@superfluid-finance/ethereum-contracts": "1.8.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/hot-fuzz" }, - "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme" + "scripts": { + "lint": "run-s lint:*", + "lint:sol": "solhint -w 0 contracts/*.sol contracts/*/*.sol && echo '✔ Your .sol files look good.'", + "check-updates": "ncu --target minor" + } } diff --git a/packages/hot-fuzz/tasks/digest-corpus b/packages/hot-fuzz/scripts/digest-corpus similarity index 100% rename from packages/hot-fuzz/tasks/digest-corpus rename to packages/hot-fuzz/scripts/digest-corpus diff --git a/packages/hot-fuzz/truffle-config.js b/packages/hot-fuzz/truffle-config.js deleted file mode 100644 index 0df9069c43..0000000000 --- a/packages/hot-fuzz/truffle-config.js +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * https://trufflesuite.com/docs/truffle/reference/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); - -const M = (module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ - - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - // development: { - // host: "127.0.0.1", // Localhost (default: none) - // port: 8545, // Standard Ethereum port (default: none) - // network_id: "*", // Any network (default: none) - // }, - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websocket: true // Enable EventEmitter interface for web3 (default: false) - // }, - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, - - // Set default mocha options here, use special reporters etc. - mocha: { - // timeout: 100000 - }, - - // Configure your compilers - compilers: { - solc: { - version: "0.8.19", // Fetch exact version from solc-bin (default: truffle's version) - // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - settings: { - // See the solidity docs for advice about optimization and evmVersion - optimizer: { - enabled: true, - runs: 200, - }, - //evmVersion: "byzantium" - }, - }, - }, - - contracts_build_directory: "./build/truffle", - - // Truffle DB is currently disabled by default; to enable it, change enabled: - // false to enabled: true. The default storage location can also be - // overridden by specifying the adapter settings, as shown in the commented code below. - // - // NOTE: It is not possible to migrate your contracts to truffle DB and you should - // make a backup of your artifacts to a safe location before enabling this feature. - // - // After you backed up your artifacts you can utilize db by running migrate as follows: - // $ truffle migrate --reset --compile-all - // - // db: { - // enabled: false, - // host: "127.0.0.1", - // adapter: { - // name: "sqlite", - // settings: { - // directory: ".db" - // } - // } - // } -}); - -require("@superfluid-finance/hot-fuzz").hotfuzzPatchTruffleConfig(M); diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 8522d11738..bebe476993 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -1,16 +1,24 @@ { "name": "@superfluid-finance/js-sdk", - "version": "0.6.3", "description": "Javascript SDK for building with Superfluid Protocol", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk#readme", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/js-sdk" + "version": "0.6.3", + "browser": { + "fs": false, + "path": false + }, + "dependencies": { + "@superfluid-finance/metadata": "^1.5.0", + "@truffle/contract": "4.6.31", + "auto-bind": "4.0.0", + "node-fetch": "2.7.0" + }, + "devDependencies": { + "@superfluid-finance/ethereum-contracts": "^1.11.0", + "chai-as-promised": "^8.0.0", + "webpack": "^5.94.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.1.4" }, - "license": "MIT", - "main": "src/index.js", - "types": "src/index.d.ts", "files": [ "src/**/*.md", "src/**/*.d.ts", @@ -18,9 +26,13 @@ "src/**/*.js", "dist/index.js" ], - "browser": { - "fs": false, - "path": false + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/js-sdk#readme", + "license": "MIT", + "main": "src/index.js", + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/js-sdk" }, "scripts": { "dev": "nodemon -e js,ts -i build -x 'truffle test 2>&1'", @@ -35,24 +47,9 @@ "stats": "webpack --profile --json > stats.json && webpack-bundle-analyzer ./stats.json", "lint": "run-s lint:*", "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "check-no-focused-tests": "grep -FR .only test || { echo '✔ No test is focused.';exit 0; } && { echo '✘ You have focused tests.'; exit 1; }", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", - "pre-commit:check-no-focused-tests": "yarn check-no-focused-tests", + "lint:check-no-focused-tests": "grep -FR .only test || { echo '✔ No test is focused.';exit 0; } && { echo '✘ You have focused tests.'; exit 1; }", "check-updates": "ncu --target minor --dep prod,dev", "cloc": "sh tasks/cloc.sh" }, - "dependencies": { - "@superfluid-finance/metadata": "1.1.23", - "@truffle/contract": "4.6.29", - "auto-bind": "4.0.0", - "node-fetch": "2.7.0" - }, - "devDependencies": { - "@superfluid-finance/ethereum-contracts": "1.9.0", - "chai-as-promised": "^7.1.1", - "webpack": "^5.88.2", - "webpack-bundle-analyzer": "^4.9.1", - "webpack-cli": "^4.10.0" - } + "types": "src/index.d.ts" } diff --git a/packages/js-sdk/src/Framework.js b/packages/js-sdk/src/Framework.js index fb081c0772..8d70e814f2 100644 --- a/packages/js-sdk/src/Framework.js +++ b/packages/js-sdk/src/Framework.js @@ -7,6 +7,8 @@ const {batchCall} = require("./batchCall"); const ConstantFlowAgreementV1Helper = require("./ConstantFlowAgreementV1Helper"); const InstantDistributionAgreementV1Helper = require("./InstantDistributionAgreementV1Helper"); const fetch = require("node-fetch"); +// yes, this is dirty. truffle is deprecated, so this won't stick forever. +const truffleConfig = require("../../ethereum-contracts/truffle-config"); const User = require("./User"); @@ -57,7 +59,7 @@ module.exports = class Framework { options.gasReportType !== "JSON" ) { throw new Error( - "Unsuported gas report type: " + options.gasReportType + "Unsupported gas report type: " + options.gasReportType ); } console.debug("Enabling gas report type:", options.gasReportType); @@ -92,6 +94,36 @@ module.exports = class Framework { additionalContracts: this._options.additionalContracts, contractLoader: this._options.contractLoader, networkId: this.networkId, + // copy of ethereum-contracts/ops-scripts/libs/common.js:getGasConfig() + gasConfig: ((networkId) => { + let gasConfig = {}; + + const networkConfig = Object.values(truffleConfig.networks) + .filter((e) => e !== undefined) + .find((e) => e.network_id === networkId); + + if (networkConfig !== undefined) { + // gas limit + if (networkConfig.gas !== undefined) { + gasConfig.gas = networkConfig.gas; + } + // legacy gas price + if (networkConfig.gasPrice !== undefined) { + gasConfig.gasPrice = networkConfig.gasPrice; + } + + // EIP-1559 gas price + if (networkConfig.maxPriorityFeePerGas !== undefined) { + gasConfig.maxPriorityFeePerGas = + networkConfig.maxPriorityFeePerGas; + } + if (networkConfig.maxFeePerGas !== undefined) { + gasConfig.maxFeePerGas = networkConfig.maxFeePerGas; + } + } + + return gasConfig; + })(this.networkId), }); const resolverAddress = diff --git a/packages/js-sdk/src/loadContracts.js b/packages/js-sdk/src/loadContracts.js index 52740d12c7..75f6f9c227 100644 --- a/packages/js-sdk/src/loadContracts.js +++ b/packages/js-sdk/src/loadContracts.js @@ -10,11 +10,11 @@ function defaultContractLoader(name) { } else throw Error(`Cannot load contract "${name}"`); } -function setTruffleContractDefaults(c, {networkId, from}) { +function setTruffleContractDefaults(c, {networkId, from, gasConfig}) { c.autoGas = true; c.estimateGas = 1.25; c.setNetwork(networkId); - const defaults = {}; + const defaults = gasConfig || {}; from && (defaults.from = from); c.defaults(defaults); } @@ -26,6 +26,7 @@ const loadContracts = async ({ additionalContracts, contractLoader, networkId, + gasConfig = undefined, }) => { if (!networkId) throw Error("networkId not provided"); // use set to eliminate duplicated entries @@ -51,6 +52,7 @@ const loadContracts = async ({ from ); } + // this is what's being returned await Promise.all( allContractNames.map(async (name) => { const _normalizedObject = await contractLoader(name); @@ -66,6 +68,7 @@ const loadContracts = async ({ setTruffleContractDefaults(c, { networkId, from, + gasConfig, }); }) ); diff --git a/packages/js-sdk/test/getConfig.test.js b/packages/js-sdk/test/getConfig.test.js index 0e2975d501..98706daf60 100644 --- a/packages/js-sdk/test/getConfig.test.js +++ b/packages/js-sdk/test/getConfig.test.js @@ -6,20 +6,18 @@ describe("getConfig", () => { delete process.env.RESOLVER_ADDRESS; }); - it("goerli v1", async () => { - // goerli - const goerliConfig = SuperfluidSDK.getConfig(5, "v1"); - assert.isNotEmpty(goerliConfig.resolverAddress); - assert.isNotEmpty(goerliConfig.subgraphQueryEndpoint); - assert.isUndefined(goerliConfig.versions); + it("polygon v1", async () => { + const config = SuperfluidSDK.getConfig(137, "v1"); + assert.isNotEmpty(config.resolverAddress); + assert.isNotEmpty(config.subgraphQueryEndpoint); + assert.isUndefined(config.versions); }); - it("goerli test", async () => { - // goerli - const goerliConfig = SuperfluidSDK.getConfig(5, "test"); - assert.isNotEmpty(goerliConfig.resolverAddress); - assert.isUndefined(goerliConfig.subgraphQueryEndpoint); - assert.isUndefined(goerliConfig.versions); + it("polygon test", async () => { + const config = SuperfluidSDK.getConfig(137, "test"); + assert.isNotEmpty(config.resolverAddress); + assert.isUndefined(config.subgraphQueryEndpoint); + assert.isUndefined(config.versions); }); it("defaultConfig", async () => { diff --git a/packages/metadata/CHANGELOG.md b/packages/metadata/CHANGELOG.md index 9c4e4e2223..dc1914135e 100644 --- a/packages/metadata/CHANGELOG.md +++ b/packages/metadata/CHANGELOG.md @@ -3,6 +3,92 @@ All notable changes to the metadata will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.5.0] +### Added +- MacroForwarder addresses + +### Changed +- Updated BatchLiquidator addresses + +## [v1.4.1] +### Changed +- New & updated contracts on eth-mainnet + +## [v1.4.0] +### Changed +- Removed FlowNFTs + +## [v1.3.0] +### Added +- VestingScheduler v2 + +## [v1.2.6] +### Changed +- Added native token wrapper address for base-sepolia + +## [v1.2.5] +### Changed +- Use superfluid public subgraph endpoints + +## [v1.2.3] +### Changed +- Use Goldsky automation subgraphs over The Graph's hosted service ones + +## [v1.2.2] +### Added +- Added Base v1 subgraph endpoint + +## [v1.2.1] +### Added +- Added Base automation contracts +- Added OP Sepolia automation contracts + +## [v1.2.0] +### Changed +- Removed Polygon Mumbai + +## [v1.1.30] +### Added +- Degen Chain deployment + +## [v1.1.29] +### Fixed +- Removed subgraph hosted endpoint entry for scroll-mainnet which doesn't exist + +## [v1.1.28] +### Added +- toga and batchLiquidator for scroll-mainnet +### Changed +- removed eth-goerli and Görli based networks: optimism-goerli, arbitrun-goerli, base-goerli, polygon-zkevm-testnet +### Fixed +- Removed subgraph hosted endpoint entry for scroll-sepolia which doesn't exist + +## [v1.1.27] +### Added +- gdaV1 and gdaV1Forwarder for all testnets +### Changed +- loader on those networks (now also loads the gda) +### Fixed +- agreement addresses of scroll-mainnet and scroll-sepolia + +## [v1.1.26] +### Added +- gdaV1 and gdaV1Forwarder for several mainnets +### Changed +- loader on those networks (now also loads the gda) + +## [v1.1.25] +### Changed +- updated gov contract of scroll-mainnet +### Fixed +- invalid networks.json + +## [v1.1.24] +### Changed +- added forwarder addresses for scroll-sepolia, scroll-mainnet +### Fixed +- invalid networks.json + ## [v1.1.23] ### Added - new networks: optimism-sepolia, scroll-sepolia, scroll-mainnet diff --git a/packages/metadata/README.md b/packages/metadata/README.md index d8d72aae7f..804ec0c1de 100644 --- a/packages/metadata/README.md +++ b/packages/metadata/README.md @@ -90,7 +90,7 @@ const network = sfMeta.getNetworkByName("eth-sepolia"); explorer: 'https://optimistic.etherscan.io', subgraphV1: { name: 'protocol-v1-optimism-mainnet', - hostedEndpoint: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet' + hostedEndpoint: 'https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1' }, publicRPCs: [ 'https://mainnet.optimism.io', 'https://rpc.ankr.com/optimism' ], coinGeckoId: 'optimistic-ethereum' diff --git a/packages/metadata/main/networks/list.cjs b/packages/metadata/main/networks/list.cjs index 25bfa51fa2..354d420c26 100644 --- a/packages/metadata/main/networks/list.cjs +++ b/packages/metadata/main/networks/list.cjs @@ -1,218 +1,6 @@ /* eslint-disable */ module.exports = [ - { - "name": "eth-goerli", - "isTestnet": true, - "networkId": 5, - "chainId": 5, - "sfId": 101, - "shortName": "goerli", - "uppercaseName": "ETH_GOERLI", - "humanReadableName": "Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x5943f705abb6834cad767e6e4bb258bc48d9c947", - "contractsV1": { - "resolver": "0x071077b24943D4DC09a6A57B8aFfE2BdE9bD4B89", - "host": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9", - "governance": "0x3a648764a6d66440ca096343937c711a7ac1b1e9", - "cfaV1": "0xEd6BcbF6907D4feEEe8a8875543249bEa9D308E8", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xfDdcdac21D64B639546f3Ce2868C7EF06036990c", - "gdaV1": "0x3dB8Abd8B696F6c4150212A85961f954825Dd4B9", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0x94f26B4c8AD12B18c12f38E878618f7664bdcCE2", - "constantOutflowNFT": "0xB18cbFeA12b5CB2626C74c94920dB1B37Ae91506", - "constantInflowNFT": "0xF07df8b66ed80399B1E00981D61aD34EB4293032", - "superfluidLoader": "0x08C6Ad85c040076dD3e33Bbd963C4c37DBF6fCc4", - "toga": "0xa54FC15FC75693447d70a57262F37a70B614721b", - "flowScheduler": "0xf428308b426D7cD7Ad8eBE549d750f31C8E060Ca", - "vestingScheduler": "0xF9240F930d847F70ad900aBEE8949F25649Bf24a", - "autowrap": { - "manager": "0x0B82D14E9616ca4d260E77454834AdCf5887595F", - "wrapStrategy": "0xea49af829d3e28d3ec49e0e0a0ba1e7860a56f60" - }, - "existentialNFTCloneFactory": "0x3e5e8449477F80a3Dc0bA394882AeAB300c7F807" - }, - "startBlockV1": 3550000, - "logsQueryRange": 10000, - "explorer": "https://goerli.etherscan.io", - "subgraphV1": { - "cliName": "goerli", - "name": "protocol-v1-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli" - }, - "subgraphVesting": { - "name": "vesting-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-goerli" - }, - "subgraphFlowScheduler": { - "name": "scheduling-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-goerli" - }, - "subgraphAutoWrap": { - "name": "auto-wrap-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-goerli" - }, - "publicRPCs": [ - "https://rpc.ankr.com/eth_goerli", - "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161" - ], - "trustedForwarders": [ - "0xE041608922d06a4F26C0d4c27d8bCD01daf1f792", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "polygon-mumbai", - "isTestnet": true, - "networkId": 80001, - "chainId": 80001, - "sfId": 102, - "shortName": "mumbai", - "uppercaseName": "POLYGON_MUMBAI", - "humanReadableName": "Polygon Mumbai", - "nativeTokenSymbol": "MATIC", - "nativeTokenWrapper": "0x96B82B65ACF7072eFEb00502F45757F254c2a0D4", - "contractsV1": { - "resolver": "0x2feFd8B23e4770B674b0d2fAda5EE8a2bE0B525F", - "host": "0xEB796bdb90fFA0f28255275e16936D25d3418603", - "cfaV1": "0x49e565Ed1bdc17F3d220f72DF0857C26FA83F873", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x804348D4960a61f2d5F9ce9103027A3E849E09b8", - "gdaV1": "0x63ab406B6eF6c8be732c1edbd15464de16a8F46D", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xB798553db6EB3D3C56912378409370145E97324B", - "constantOutflowNFT": "0x502CC982947216C0f94e433BC78c413806301C07", - "constantInflowNFT": "0x9906A7e948C642B6bc74b9A5EAfCddB3580b44e0", - "superfluidLoader": "0xFcc617a382988a6d081B1821c8d17C47DFF9EDE1", - "toga": "0x38DD80876DBA048d0050D28828522c313967D073", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", - "flowScheduler": "0x59A3Ba9d34c387FB70b4f4e4Fbc9eD7519194139", - "vestingScheduler": "0x3962EE56c9f7176215D149938BA685F91aBB633B", - "autowrap": { - "manager": "0x3eAB3c6207F488E475b7955B631B564F0E6317B9", - "wrapStrategy": "0x544728AFDBeEafBeC9e1329031788edb53017bC4" - }, - "existentialNFTCloneFactory": "0xfC4E49AfcDDDcc2B90794DC214cc324d17B15619" - }, - "startBlockV1": 8100000, - "logsQueryRange": 10000, - "explorer": "https://mumbai.polygonscan.com", - "subgraphV1": { - "cliName": "mumbai", - "name": "protocol-v1-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai" - }, - "subgraphVesting": { - "name": "vesting-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-polygon-mumbai" - }, - "subgraphFlowScheduler": { - "name": "scheduling-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-polygon-mumbai" - }, - "subgraphAutoWrap": { - "name": "auto-wrap-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-polygon-mumbai" - }, - "publicRPCs": [ - "https://rpc.ankr.com/polygon_mumbai", - "https://matic-mumbai.chainstacklabs.com" - ], - "trustedForwarders": [ - "0x9399bb24dbb5c4b782c70c2969f58716ebbd6a3b", - "0x69015912AA33720b842dCD6aC059Ed623F28d9f7", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "optimism-goerli", - "isTestnet": true, - "networkId": 420, - "chainId": 420, - "sfId": 103, - "shortName": "opgoerli", - "uppercaseName": "OPTIMISM_GOERLI", - "humanReadableName": "Optimism Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0xE01F8743677Da897F4e7De9073b57Bf034FC2433", - "contractsV1": { - "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "host": "0xE40983C2476032A0915600b9472B3141aA5B5Ba9", - "cfaV1": "0xff48668fa670A85e55A7a822b352d5ccF3E7b18C", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x96215257F2FcbB00135578f766c0449d239bd92F", - "gdaV1": "0xe87F46A15C410F151309Bf7516e130087Fc6a5E5", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xfafe31cf998Df4e5D8310B03EBa8fb5bF327Eaf5", - "constantOutflowNFT": "0xDF874BA132D8C68FEb5De513790f7612Fe20dDbd", - "constantInflowNFT": "0xf88dd7208438Fdc5Ad05857eA701b7b51cdae0a9", - "superfluidLoader": "0x5Bb5908dcCC9Bb0fC39a78CfDf9e47B4C08E9521", - "existentialNFTCloneFactory": "0xFCb633f4ff90241391aD92E4678eC2a11a94a990" - }, - "startBlockV1": 340000, - "logsQueryRange": 50000, - "explorer": "https://goerli-optimism.etherscan.io", - "subgraphV1": { - "cliName": "optimism-goerli", - "name": "protocol-v1-optimism-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-goerli" - }, - "publicRPCs": [ - "https://goerli.optimism.io", - "https://opt-goerli.g.alchemy.com/v2/demo" - ], - "trustedForwarders": [ - "0x9C73373C70F23920EA54F7883dCB1F85b162Df40", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "arbitrum-goerli", - "isTestnet": true, - "networkId": 421613, - "chainId": 421613, - "sfId": 104, - "shortName": "arbgoerli", - "uppercaseName": "ARBITRUM_GOERLI", - "humanReadableName": "Arbitrum Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0xE01F8743677Da897F4e7De9073b57Bf034FC2433", - "contractsV1": { - "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "host": "0xE40983C2476032A0915600b9472B3141aA5B5Ba9", - "cfaV1": "0xff48668fa670A85e55A7a822b352d5ccF3E7b18C", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x96215257F2FcbB00135578f766c0449d239bd92F", - "gdaV1": "0xe87F46A15C410F151309Bf7516e130087Fc6a5E5", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xfafe31cf998Df4e5D8310B03EBa8fb5bF327Eaf5", - "constantOutflowNFT": "0xDF874BA132D8C68FEb5De513790f7612Fe20dDbd", - "constantInflowNFT": "0xf88dd7208438Fdc5Ad05857eA701b7b51cdae0a9", - "superfluidLoader": "0x5Bb5908dcCC9Bb0fC39a78CfDf9e47B4C08E9521", - "existentialNFTCloneFactory": "0x22f391AB6755F0A8986AFD543289C43701beaCAa" - }, - "startBlockV1": 93000, - "logsQueryRange": 50000, - "explorer": "https://goerli.arbiscan.io", - "subgraphV1": { - "cliName": "arbitrum-goerli", - "name": "protocol-v1-arbitrum-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-goerli" - }, - "publicRPCs": [ - "https://goerli-rollup.arbitrum.io/rpc", - "https://arb-goerli.g.alchemy.com/v2/demo" - ], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, { "name": "avalanche-fuji", "isTestnet": true, @@ -233,14 +21,14 @@ module.exports = "gdaV1": "0x51f571D934C59185f13d17301a36c07A2268B814", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", - "constantOutflowNFT": "0x49583f57EFeBe733EC872c5d5437116085a3eE3c", - "constantInflowNFT": "0x67d0Efab10b390206b356BA7FB453Ab56AAB7480", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", + "batchLiquidator": "0x85AfCf531aF1a853AC65F6bfa4de99C742B8e432", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" }, - "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888" + "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3220000, "logsQueryRange": 50000, @@ -248,7 +36,7 @@ module.exports = "subgraphV1": { "cliName": "fuji", "name": "protocol-v1-avalanche-fuji", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-fuji/protocol-v1" }, "publicRPCs": [ "https://api.avax-test.network/ext/bc/C/rpc", @@ -277,11 +65,13 @@ module.exports = "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x9823364056BcA85Dc3c4a3b96801314D082C8Eb9", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", - "constantOutflowNFT": "0xfBE332e001D6b54e1F4B63c2343B8E7746d99Ece", - "constantInflowNFT": "0xC95346B7394009ccEfaA62Eca28797804B2bCF1C", - "superfluidLoader": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", - "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" + "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", + "batchLiquidator": "0x79aE8BF8EE9238d8E848F7dbBF74Ddb3365f6c11", + "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3322400, "logsQueryRange": 10000, @@ -289,88 +79,13 @@ module.exports = "subgraphV1": { "cliName": "sepolia", "name": "protocol-v1-eth-sepolia", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1" }, "publicRPCs": [ "https://rpc.sepolia.org", "https://ethereum-sepolia.blockpi.network/v1/rpc/public" ] }, - { - "name": "base-goerli", - "isTestnet": true, - "networkId": 84531, - "chainId": 84531, - "sfId": 107, - "shortName": "bgoerli", - "uppercaseName": "BASE_GOERLI", - "humanReadableName": "Base Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x7fFCE315B2014546bA461d54eDed7AAc70DF4f53", - "contractsV1": { - "resolver": "0x598D5dB9902cbBd6e8Ee9CDb3A231377cdA2f018", - "host": "0x507c3a7C6Ccc253884A2e3a3ee2A211cC7E796a6", - "cfaV1": "0x4C476F2Fb27272680F2f6f2592E94d9e704691bC", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xaa4FCc799B8857FA87b2945Dc6572D5d76b35485", - "superTokenFactory": "0x1015BE31D7711D95d2c3444708FB53cC851ba856", - "constantOutflowNFT": "0x4E89088Cd14064f38E5B2F309cFaB9C864F9a8e6", - "constantInflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "superfluidLoader": "0x15F0Ca26781C3852f8166eD2ebce5D18265cceb7", - "existentialNFTCloneFactory": "0x42B332F56BCD15F0D7cd523E5eC26Cd0734621eD" - }, - "startBlockV1": 5249500, - "logsQueryRange": 10000, - "explorer": "https://goerli.basescan.org/", - "subgraphV1": { - "cliName": "base-testnet", - "name": "protocol-v1-base-goerli" - }, - "publicRPCs": [ - "https://goerli.base.org", - "https://base-goerli.public.blastapi.io" - ], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "polygon-zkevm-testnet", - "isTestnet": true, - "networkId": 1442, - "chainId": 1442, - "sfId": 108, - "shortName": "pzkevmtest", - "uppercaseName": "POLYGON_ZKEVM_TESTNET", - "humanReadableName": "Polygon zkEVM Testnet", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x6345Aa6cec42a85160CF436810F97661e28c1876", - "contractsV1": { - "resolver": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", - "host": "0xe64f81d5dDdA1c7172e5C6d964E8ef1BD82D8704", - "cfaV1": "0x1EAa5ceA064aab2692AF257FB31f5291fdA3Cdee", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xBf22019a4A4430bA67D3B0c8B4d5Edc48F913301", - "superTokenFactory": "0x0F3B163623F05b2BfF42956f7C7bd31456bd83a2", - "constantOutflowNFT": "0xDBD6f113E46A99D7BF95edfa47390c0c8127E922", - "constantInflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "superfluidLoader": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "existentialNFTCloneFactory": "0x70bbB7a057A13070dF11d533e8f299357D778637" - }, - "startBlockV1": 726000, - "logsQueryRange": 20000, - "explorer": "https://testnet-zkevm.polygonscan.org/", - "subgraphV1": { - "cliName": "polygon-zkevm-testnet", - "name": "protocol-v1-polygon-zkevm-testnet" - }, - "publicRPCs": ["https://rpc.public.zkevm-test.net"], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, { "name": "optimism-sepolia", "isTestnet": true, @@ -391,9 +106,16 @@ module.exports = "gdaV1": "0xd453d38A001B47271488886532f1CCeAbf0c7eF3", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xfcF0489488397332579f35b0F711BE570Da0E8f5", - "constantOutflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", - "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c" + "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", + "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", + "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", + "autowrap": { + "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", + "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" + }, + "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "batchLiquidator": "0x9539B21cC67844417E80aE168bc28c831E7Ed271", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6886559, "logsQueryRange": 50000, @@ -401,7 +123,19 @@ module.exports = "subgraphV1": { "cliName": "optimism-sepolia", "name": "protocol-v1-optimism-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1" + }, + "subgraphVesting": { + "name": "vesting-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/vesting-scheduler" + }, + "subgraphFlowScheduler": { + "name": "scheduling-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/flow-scheduler" + }, + "subgraphAutoWrap": { + "name": "auto-wrap-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/auto-wrap" }, "publicRPCs": [ "https://sepolia.optimism.io" @@ -422,14 +156,15 @@ module.exports = "contractsV1": { "resolver": "0xB62446a3006d86f6e9eAa36da773c311E7B8AF91", "host": "0x42b05a6016B9eED232E13fd56a8F0725693DBF8e", - "governance": "0x59282c3ae5480F360429c0344A13e37cE9B13487", - "cfaV1": "0x09168F566EFF50Af1EB21D9BC45C9662fB6e08F1", - "idaV1": "0xD5F7350ad4ae4dA26714Cc95564D9Da31F2830e5", - "gdaV1": "0x7671c9059E085A14935d84E0fdE0df577D893a41", - "constantOutflowNFT": "0xEdB0A24DDb09cFeffF0C5348EB5d6D1C439d36bf", - "constantInflowNFT": "0x1DA4e4F848Cd4D0f528c2D0F19F41226BacB5489", + "cfaV1": "0xbc46B4Aa41c055578306820013d4B65fff42711E", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x296556422F44F19E5d216CBf98348A03BDc445E7", + "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", + "batchLiquidator": "0x70bbB7a057A13070dF11d533e8f299357D778637", "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2823800, "logsQueryRange": 50000, @@ -437,10 +172,44 @@ module.exports = "subgraphV1": { "cliName": "scroll-sepolia", "name": "protocol-v1-scroll-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-scroll-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-sepolia/protocol-v1" }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, + { + "name": "base-sepolia", + "isTestnet": true, + "networkId": 84532, + "chainId": 84532, + "sfId": 111, + "shortName": "bsepolia", + "uppercaseName": "BASE_SEPOLIA", + "humanReadableName": "Base Sepolia", + "nativeTokenSymbol": "ETH", + "nativeTokenWrapper": "0x143ea239159155B408e71CDbE836e8CFD6766732", + "contractsV1": { + "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", + "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f", + "batchLiquidator": "0x95043eC349476B413eF5c369c4d2454a1a65eaB9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" + }, + "startBlockV1": 10604500, + "logsQueryRange": 50000, + "explorer": "https://sepolia.basescan.org", + "subgraphV1": { + "cliName": "base-sepolia" + }, + "publicRPCs": [ + "https://sepolia.base.org" + ] + }, { "name": "xdai-mainnet", "isTestnet": false, @@ -452,6 +221,7 @@ module.exports = "humanReadableName": "Gnosis Chain", "nativeTokenSymbol": "xDAI", "nativeTokenWrapper": "0x59988e47A3503AaFaA0368b9deF095c818Fdca01", + "duneName": "gnosis", "contractsV1": { "resolver": "0x9634Fa35188C59DD3B0ADa0Dd9adD7e4ECefc0a9", "host": "0x2dFe937cD98Ab92e59cF3139138f18c823a4efE7", @@ -459,13 +229,12 @@ module.exports = "cfaV1": "0xEbdA4ceF883A7B12c4E669Ebc58927FBa8447C7D", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x7888ac96F987Eb10E291F34851ae0266eF912081", + "gdaV1": "0xd7992D358A20478c82dDEd98B3D8A9da46e99b82", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", - "constantOutflowNFT": "0xfC00dEE8a980110c5608A823a5B3af3872635456", - "constantInflowNFT": "0x1497440B4E92DC4ca0F76223b28C20Cb9cB8a0f1", - "superfluidLoader": "0xf941528d82D0eD2314FaBBA8bC8f285D1956A657", + "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", - "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", + "batchLiquidator": "0x96C3C2d23d143301cF363a02cB7fe3596d2834d7", "flowScheduler": "0x9cC7fc484fF588926149577e9330fA5b2cA74336", "vestingScheduler": "0x0170FFCC75d178d426EBad5b1a31451d00Ddbd0D", "wrapManager": "0x7a2899D179a8F205C8EDAd2e52954cA5f6d48D1A", @@ -473,7 +242,8 @@ module.exports = "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7" + "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14820000, "logsQueryRange": 20000, @@ -481,20 +251,19 @@ module.exports = "subgraphV1": { "cliName": "gnosis", "name": "protocol-v1-xdai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/auto-wrap" }, "publicRPCs": [ "https://rpc.gnosischain.com", @@ -513,6 +282,7 @@ module.exports = "humanReadableName": "Polygon", "nativeTokenSymbol": "MATIC", "nativeTokenWrapper": "0x3aD736904E9e65189c3000c7DD2c8AC8bB7cD4e3", + "duneName": "polygon", "contractsV1": { "resolver": "0x8bDCb5613153f41B2856F71Bd7A7e0432F6dbe58", "host": "0x3E14dC1b13c488a8d5D310918780c983bD5982E7", @@ -520,19 +290,20 @@ module.exports = "cfaV1": "0x6EeE6060f715257b970700bc2656De21dEdF074C", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xB0aABBA4B2783A72C52956CDEF62d438ecA2d7a1", + "gdaV1": "0x961dd5A052741B49B6CBf6759591f9D8576fCFb0", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", - "constantOutflowNFT": "0x554e2bbaCF43FD87417b7201A9F1649a3ED89d68", - "constantInflowNFT": "0x55909bB8cd8276887Aae35118d60b19755201c68", - "superfluidLoader": "0xA3d2A6Db274722e802AC025d667041ecAb094FE7", + "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", - "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", + "batchLiquidator": "0xA7afDc46999076C295cfC6812dd73d103cF64e19", "flowScheduler": "0x55F7758dd99d5e185f4CC08d4Ad95B71f598264D", "vestingScheduler": "0xcFE6382B33F2AdaFbE46e6A26A88E0182ae32b0c", "autowrap": { "manager": "0x2581c27E7f6D6AF452E63fCe884EDE3EDd716b32", "wrapStrategy": "0xb4afa36BAd8c76976Dc77a21c9Ad711EF720eE4b" }, - "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630" + "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 11650500, "logsQueryRange": 10000, @@ -540,20 +311,19 @@ module.exports = "subgraphV1": { "cliName": "matic", "name": "protocol-v1-matic", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/auto-wrap" }, "publicRPCs": [ "https://polygon-rpc.com", @@ -572,6 +342,7 @@ module.exports = "humanReadableName": "Optimism", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x4ac8bD1bDaE47beeF2D1c6Aa62229509b962Aa0d", + "duneName": "optimism", "contractsV1": { "resolver": "0x743B5f46BC86caF41bE4956d9275721E0531B186", "host": "0x567c4B141ED61923967cA25Ef4906C8781069a10", @@ -579,19 +350,21 @@ module.exports = "cfaV1": "0x204C6f131bb7F258b2Ea1593f5309911d8E458eD", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xc4ce5118C3B20950ee288f086cb7FC166d222D4c", + "gdaV1": "0x68Ae17fa7a31b86F306c383277552fd4813b0d35", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", - "constantOutflowNFT": "0xFb2b126660BE2fdEBa254b1F6e4348644E8482e7", - "constantInflowNFT": "0x0C6D90a98426bfD572a5c5Be572a7f6Bd1C5ED76", - "superfluidLoader": "0x8E310ce29Ab7Fa2878944A65BB0eaF97B1853d40", + "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", - "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", + "batchLiquidator": "0x84956C84c33c38AcE22C9324F1f92028AF2215ce", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", + "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "autowrap": { "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" }, - "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6" + "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 4300000, "logsQueryRange": 50000, @@ -599,19 +372,19 @@ module.exports = "subgraphV1": { "cliName": "optimism", "name": "protocol-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/auto-wrap" }, "publicRPCs": [ "https://mainnet.optimism.io", @@ -630,6 +403,7 @@ module.exports = "humanReadableName": "Arbitrum One", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0xe6C8d111337D0052b9D88BF5d7D55B7f8385ACd3", + "duneName": "arbitrum", "contractsV1": { "resolver": "0x609b9d9d6Ee9C3200745A79B9d3398DBd63d509F", "host": "0xCf8Acb4eF033efF16E8080aed4c7D5B9285D2192", @@ -637,19 +411,20 @@ module.exports = "cfaV1": "0x731FdBB12944973B500518aea61942381d7e240D", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x2319C7e07EB063340D2a0E36709B0D65fda75986", + "gdaV1": "0x1e299701792a2aF01408B122419d65Fd2dF0Ba02", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", - "constantOutflowNFT": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", - "constantInflowNFT": "0x0043d7c85C8b96a49A72A92C0B48CdC4720437d7", - "superfluidLoader": "0xB99cA401e10D277345BcFb281AC148a2e16Db466", + "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", - "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", + "batchLiquidator": "0x9224413b9177E6c1D5721B4a4D1D00eC84B07Ce7", "flowScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "vestingScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "autowrap": { "manager": "0xf01825eAFAe5CD1Dab5593EFAF218efC8968D272", "wrapStrategy": "0x342076aA957B0ec8bC1d3893af719b288eA31e61" }, - "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d" + "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 7600000, "logsQueryRange": 50000, @@ -657,19 +432,19 @@ module.exports = "subgraphV1": { "cliName": "arbitrum-one", "name": "protocol-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/auto-wrap" }, "publicRPCs": [ "https://arb1.arbitrum.io/rpc", @@ -688,6 +463,7 @@ module.exports = "humanReadableName": "Avalanche C", "nativeTokenSymbol": "AVAX", "nativeTokenWrapper": "0xBE916845D8678b5d2F7aD79525A62D7c08ABba7e", + "duneName": "avalanche_c", "contractsV1": { "resolver": "0x24a3F04F70B7f07B9673EadD3e146391BcfEa5c1", "host": "0x60377C7016E4cdB03C87EF474896C11cB560752C", @@ -695,19 +471,20 @@ module.exports = "cfaV1": "0x6946c5B38Ffea373b0a2340b4AEf0De8F6782e58", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x1fA9fFe8Db73F701454B195151Db4Abb18423cf2", + "gdaV1": "0xA7b197cD5b0cEF6d62c4A0a851E3581f5E62e4D2", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", - "constantOutflowNFT": "0x4247bA6C3658Fa5C0F523BAcea8D0b97aF1a175e", - "constantInflowNFT": "0x82b9D8A91A5b333b5A6e78439551ea0E7da153E3", - "superfluidLoader": "0x2601E69a2D16C8Ccc8aEe8cE9F59d24a59986B9E", + "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", - "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", + "batchLiquidator": "0x3b387638a5d33aE8772715642A21345f23Af824c", "flowScheduler": "0xF7AfF590E9DE493D7ACb421Fca7f1E35C1ad4Ce5", "vestingScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "autowrap": { "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7" + "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14700000, "logsQueryRange": 50000, @@ -715,19 +492,19 @@ module.exports = "subgraphV1": { "cliName": "avalanche", "name": "protocol-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/auto-wrap" }, "publicRPCs": [ "https://api.avax.network/ext/bc/C/rpc", @@ -746,6 +523,7 @@ module.exports = "humanReadableName": "BNB Smart Chain", "nativeTokenSymbol": "BNB", "nativeTokenWrapper": "0x529A4116F160c833c61311569D6B33dFF41fD657", + "duneName": "bnb", "contractsV1": { "resolver": "0x69604aA4e9e8BF44A73C680997205Edb03A92E41", "host": "0xd1e2cFb6441680002Eb7A44223160aB9B67d7E6E", @@ -753,19 +531,20 @@ module.exports = "cfaV1": "0x49c38108870e74Cb9420C0991a85D3edd6363F75", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x594ed9Cd773584B645aC1F5B11020d3b32cDF07d", + "gdaV1": "0x3bbFA4C406719424C7f66CD97A8Fe27Af383d3e2", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", - "constantOutflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "constantInflowNFT": "0xbF7BCcE8D60A9C3F6bFaEc9346Aa85B9f781a4e9", - "superfluidLoader": "0x3C26e5bEbc68EaAf4efcd88F8E5A6Aeb77b65579", + "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", - "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", + "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", "flowScheduler": "0x2f9e2A2A59405682d4F86779275CF5525AD7eC2B", "vestingScheduler": "0x9B91c27f78376383003C6A12Ad12B341d016C5b9", "autowrap": { "manager": "0x2AcdD61ac1EFFe1535109449c31889bdE8d7f325", "wrapStrategy": "0x9e308cb079ae130790F604b1030cDf386670f199" }, - "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9" + "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 18800000, "logsQueryRange": 5000, @@ -773,19 +552,19 @@ module.exports = "subgraphV1": { "cliName": "bsc", "name": "protocol-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/auto-wrap" }, "publicRPCs": [ "https://bscrpc.com", @@ -804,6 +583,7 @@ module.exports = "humanReadableName": "Ethereum", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0xC22BeA0Be9872d8B7B3933CEc70Ece4D53A900da", + "duneName": "ethereum", "contractsV1": { "resolver": "0xeE4cD028f5fdaAdeA99f8fc38e8bA8A57c90Be53", "host": "0x4E583d9390082B65Bef884b629DFA426114CED6d", @@ -811,16 +591,19 @@ module.exports = "cfaV1": "0x2844c1BBdA121E9E43105630b9C8310e5c72744b", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xbCF9cfA8Da20B591790dF27DE65C1254Bf91563d", + "gdaV1": "0xAAdBB3Eee3Bd080f5353d86DdF1916aCA3fAC842", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", - "superfluidLoader": "0x9775EEBdfF8AE845e7Ad3d1D04B85e6c6d284aCB", + "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", + "batchLiquidator": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" - } + }, + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 15870000, "logsQueryRange": 10000, @@ -828,20 +611,19 @@ module.exports = "subgraphV1": { "cliName": "mainnet", "name": "protocol-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/auto-wrap" }, "publicRPCs": [ "https://cloudflare-eth.com", @@ -860,6 +642,7 @@ module.exports = "humanReadableName": "Celo", "nativeTokenSymbol": "CELO", "nativeTokenWrapper": "0x671425Ae1f272Bc6F79beC3ed5C4b00e9c628240", + "duneName": "celo", "contractsV1": { "resolver": "0x05eE721BD4D803d6d477Aa7607395452B65373FF", "host": "0xA4Ff07cF81C02CFD356184879D953970cA957585", @@ -867,13 +650,14 @@ module.exports = "cfaV1": "0x9d369e78e1a682cE0F8d9aD849BeA4FE1c3bD3Ad", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x26747Fe93fAC8bF28E1e24A558a2bC7E4d9846cA", + "gdaV1": "0x308b7405272d11494716e30C6E972DbF6fb89555", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", - "constantOutflowNFT": "0xbe49ac1EadAc65dccf204D4Df81d650B50122aB2", - "constantInflowNFT": "0x0FB7694c990CF19001127391Dbe53924dd7a61c7", - "superfluidLoader": "0xAd6e6849d8eEa62AF9271808afb726610fB451a6", + "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", - "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227" + "batchLiquidator": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 16393000, "logsQueryRange": 20000, @@ -881,7 +665,7 @@ module.exports = "subgraphV1": { "cliName": "celo", "name": "protocol-v1-celo-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/celo-mainnet/protocol-v1" }, "publicRPCs": ["https://forno.celo.org", "https://rpc.ankr.com/celo"], "coinGeckoId": "celo" @@ -897,6 +681,7 @@ module.exports = "humanReadableName": "Base", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x46fd5cfB4c12D87acD3a13e92BAa53240C661D93", + "duneName": "base", "contractsV1": { "resolver": "0x6a214c324553F96F04eFBDd66908685525Da0E0d", "host": "0x4C073B3baB6d8826b8C5b229f3cfdC1eC6E47E74", @@ -904,20 +689,40 @@ module.exports = "cfaV1": "0x19ba78B9cDB05A877718841c574325fdB53601bb", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x66DF3f8e14CF870361378d8F61356D15d9F425C4", + "gdaV1": "0xfE6c87BE05feDB2059d2EC41bA0A09826C9FD7aa", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", - "constantOutflowNFT": "0xD3C78bb5a16Ea4ab584844eeb8F90Ac710c16355", - "constantInflowNFT": "0x2d51962A9EE4D3C2819EF585eab7412c2a2C31Ac", - "superfluidLoader": "0x6B24A6F34ab96267Fef9F8AC9fe6CC104C228127", + "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", - "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", - "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC" + "batchLiquidator": "0x6b008BAc0e5846cB5d9Ca02ca0e801fCbF88B6f9", + "flowScheduler": "0xC72CEd15204d02183c83fEbb918b183E400811Ee", + "vestingScheduler": "0xDF92D0E6Bcb9385FDe99aD21Ff5e47Fb47E3c6b2", + "autowrap": { + "manager": "0x5D0acD0864Ad07ba4E1E0474AE69Da87482e14A9", + "wrapStrategy": "0xB29005319B0caB24cF6D4d24e8420E54BB29Cb0d" + }, + "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 1000000, "logsQueryRange": 20000, "explorer": "https://basescan.org", "subgraphV1": { "cliName": "base", - "name": "protocol-v1-base-mainnet" + "name": "protocol-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/protocol-v1" + }, + "subgraphVesting": { + "name": "vesting-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/vesting-scheduler" + }, + "subgraphFlowScheduler": { + "name": "scheduling-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/flow-scheduler" + }, + "subgraphAutoWrap": { + "name": "auto-wrap-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/auto-wrap" }, "publicRPCs": ["https://developer-access-mainnet.base.org"], "coinGeckoId": "base" @@ -933,17 +738,21 @@ module.exports = "humanReadableName": "Scroll", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x483C1716b6133cdA01237ebBF19c5a92898204B7", + "duneName": "scroll", "contractsV1": { "resolver": "0xb25a19c0e7d10c8D37E5b63Ed3213b67f7ebfF80", "host": "0x0F86a21F6216c061B222c224e315d9FC34520bb7", - "governance": "0x43A636A202203e52ea99b6515a191b888ccc57AC", - "cfaV1": "0x9d146055738BD4D258c99927A3188C94dCf4cd18", - "idaV1": "0xC537033813fA474e5f9588114ef2EfBB0564e080", - "gdaV1": "0x2c6dc2f45c9a15512BcF219867eAB804b5737c6a", - "constantOutflowNFT": "0x0de05fe0fF8F5eA9475CA8425e2D05Dd38ccED84", - "constantInflowNFT": "0x8c24Fc82c8fDd763F08E654212fc27e577EbD934", + "governance": "0xC2C9a709A6744816b3712D520BD314fe610AEa33", + "cfaV1": "0xB3bcD6da1eeB6c97258B3806A853A6dcD3B6C00c", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x4112557F0F228A18654d3C39599421DE9F61144d", + "gdaV1": "0x97a9f293d7eD13f3fbD499cE684Ed4F103295a28", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", + "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", + "batchLiquidator": "0x2eaa49BeB4Aa4fcC709DC14c0FA0fF1B292077b5", "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2575000, "logsQueryRange": 50000, @@ -951,8 +760,44 @@ module.exports = "subgraphV1": { "cliName": "scroll", "name": "protocol-v1-scroll-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-scroll-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-mainnet/protocol-v1" }, "publicRPCs": ["https://rpc.scroll.io"] + }, + { + "name": "degenchain", + "isTestnet": false, + "networkId": 666666666, + "chainId": 666666666, + "sfId": 10, + "shortName": "degen", + "uppercaseName": "DEGENCHAIN", + "humanReadableName": "Degen Chain", + "nativeTokenSymbol": "DEGEN", + "nativeTokenWrapper": "0xda58FA9bfc3D3960df33ddD8D4d762Cf8Fa6F7ad", + "contractsV1": { + "resolver": "0x649FB24ed0B983f88500F3C37682714aB96D73c2", + "host": "0xc1314EdcD7e478C831a7a24169F7dEADB2646eD2", + "governance": "0x4D420e94328bF1AEA1b525FDE9e498ADBe60f9B1", + "cfaV1": "0x82cc052d1b17aC554a22A88D5876B56c6b51e95c", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0xb19CE3e7DA9FbAf9De2526BD662A82f26421A53E", + "gdaV1": "0x210a01ad187003603B2287F78579ec103Eb70D9B", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", + "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", + "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", + "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" + }, + "startBlockV1": 6500000, + "logsQueryRange": 50000, + "explorer": "https://explorer.degen.tips/", + "subgraphV1": { + "cliName": "degen", + "name": "protocol-v1-degenchain", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/degenchain/protocol-v1" + }, + "publicRPCs": ["https://rpc.degen.tips"] } ] diff --git a/packages/metadata/module/networks/list.d.ts b/packages/metadata/module/networks/list.d.ts index 7cad88cecf..e7bd38c80c 100644 --- a/packages/metadata/module/networks/list.d.ts +++ b/packages/metadata/module/networks/list.d.ts @@ -12,16 +12,16 @@ interface ContractAddresses { readonly gdaV1?: string; readonly gdaV1Forwarder?: string; readonly superTokenFactory: string; - readonly constantOutflowNFT?: string; - readonly constantInflowNFT?: string; readonly superfluidLoader: string; readonly toga?: string; readonly vestingScheduler?: string; + readonly vestingSchedulerV2?: string; readonly flowScheduler?: string; readonly batchLiquidator?: string; readonly superSpreader?: string; readonly autowrap?: AutowrapAddresses; readonly existentialNFTCloneFactory: string; + readonly macroForwarder?: string; } interface SubgraphData { readonly name: string; @@ -31,6 +31,7 @@ interface SubgraphData { } export interface NetworkMetaData { readonly name: string; // Superfluid canonical network name + readonly isDeprecated: boolean; readonly isTestnet: boolean; readonly networkId: number; readonly chainId: number; @@ -48,6 +49,9 @@ export interface NetworkMetaData { readonly publicRPCs?: string[]; readonly coinGeckoId?: string; readonly trustedForwarders?: string[]; // list of additional trusted forwarders + readonly subgraphVesting?: { name: string, hostedEndpoint: string } + readonly subgraphFlowScheduler?: { name: string, hostedEndpoint: string } + readonly subgraphAutoWrap?: { name: string, hostedEndpoint: string }, } declare const _default: NetworkMetaData[]; export default _default; diff --git a/packages/metadata/module/networks/list.js b/packages/metadata/module/networks/list.js index 8d900c9534..90f9f98640 100644 --- a/packages/metadata/module/networks/list.js +++ b/packages/metadata/module/networks/list.js @@ -1,218 +1,6 @@ /* eslint-disable */ export default [ - { - "name": "eth-goerli", - "isTestnet": true, - "networkId": 5, - "chainId": 5, - "sfId": 101, - "shortName": "goerli", - "uppercaseName": "ETH_GOERLI", - "humanReadableName": "Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x5943f705abb6834cad767e6e4bb258bc48d9c947", - "contractsV1": { - "resolver": "0x071077b24943D4DC09a6A57B8aFfE2BdE9bD4B89", - "host": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9", - "governance": "0x3a648764a6d66440ca096343937c711a7ac1b1e9", - "cfaV1": "0xEd6BcbF6907D4feEEe8a8875543249bEa9D308E8", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xfDdcdac21D64B639546f3Ce2868C7EF06036990c", - "gdaV1": "0x3dB8Abd8B696F6c4150212A85961f954825Dd4B9", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0x94f26B4c8AD12B18c12f38E878618f7664bdcCE2", - "constantOutflowNFT": "0xB18cbFeA12b5CB2626C74c94920dB1B37Ae91506", - "constantInflowNFT": "0xF07df8b66ed80399B1E00981D61aD34EB4293032", - "superfluidLoader": "0x08C6Ad85c040076dD3e33Bbd963C4c37DBF6fCc4", - "toga": "0xa54FC15FC75693447d70a57262F37a70B614721b", - "flowScheduler": "0xf428308b426D7cD7Ad8eBE549d750f31C8E060Ca", - "vestingScheduler": "0xF9240F930d847F70ad900aBEE8949F25649Bf24a", - "autowrap": { - "manager": "0x0B82D14E9616ca4d260E77454834AdCf5887595F", - "wrapStrategy": "0xea49af829d3e28d3ec49e0e0a0ba1e7860a56f60" - }, - "existentialNFTCloneFactory": "0x3e5e8449477F80a3Dc0bA394882AeAB300c7F807" - }, - "startBlockV1": 3550000, - "logsQueryRange": 10000, - "explorer": "https://goerli.etherscan.io", - "subgraphV1": { - "cliName": "goerli", - "name": "protocol-v1-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli" - }, - "subgraphVesting": { - "name": "vesting-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-goerli" - }, - "subgraphFlowScheduler": { - "name": "scheduling-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-goerli" - }, - "subgraphAutoWrap": { - "name": "auto-wrap-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-goerli" - }, - "publicRPCs": [ - "https://rpc.ankr.com/eth_goerli", - "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161" - ], - "trustedForwarders": [ - "0xE041608922d06a4F26C0d4c27d8bCD01daf1f792", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "polygon-mumbai", - "isTestnet": true, - "networkId": 80001, - "chainId": 80001, - "sfId": 102, - "shortName": "mumbai", - "uppercaseName": "POLYGON_MUMBAI", - "humanReadableName": "Polygon Mumbai", - "nativeTokenSymbol": "MATIC", - "nativeTokenWrapper": "0x96B82B65ACF7072eFEb00502F45757F254c2a0D4", - "contractsV1": { - "resolver": "0x2feFd8B23e4770B674b0d2fAda5EE8a2bE0B525F", - "host": "0xEB796bdb90fFA0f28255275e16936D25d3418603", - "cfaV1": "0x49e565Ed1bdc17F3d220f72DF0857C26FA83F873", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x804348D4960a61f2d5F9ce9103027A3E849E09b8", - "gdaV1": "0x63ab406B6eF6c8be732c1edbd15464de16a8F46D", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xB798553db6EB3D3C56912378409370145E97324B", - "constantOutflowNFT": "0x502CC982947216C0f94e433BC78c413806301C07", - "constantInflowNFT": "0x9906A7e948C642B6bc74b9A5EAfCddB3580b44e0", - "superfluidLoader": "0xFcc617a382988a6d081B1821c8d17C47DFF9EDE1", - "toga": "0x38DD80876DBA048d0050D28828522c313967D073", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", - "flowScheduler": "0x59A3Ba9d34c387FB70b4f4e4Fbc9eD7519194139", - "vestingScheduler": "0x3962EE56c9f7176215D149938BA685F91aBB633B", - "autowrap": { - "manager": "0x3eAB3c6207F488E475b7955B631B564F0E6317B9", - "wrapStrategy": "0x544728AFDBeEafBeC9e1329031788edb53017bC4" - }, - "existentialNFTCloneFactory": "0xfC4E49AfcDDDcc2B90794DC214cc324d17B15619" - }, - "startBlockV1": 8100000, - "logsQueryRange": 10000, - "explorer": "https://mumbai.polygonscan.com", - "subgraphV1": { - "cliName": "mumbai", - "name": "protocol-v1-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai" - }, - "subgraphVesting": { - "name": "vesting-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-polygon-mumbai" - }, - "subgraphFlowScheduler": { - "name": "scheduling-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-polygon-mumbai" - }, - "subgraphAutoWrap": { - "name": "auto-wrap-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-polygon-mumbai" - }, - "publicRPCs": [ - "https://rpc.ankr.com/polygon_mumbai", - "https://matic-mumbai.chainstacklabs.com" - ], - "trustedForwarders": [ - "0x9399bb24dbb5c4b782c70c2969f58716ebbd6a3b", - "0x69015912AA33720b842dCD6aC059Ed623F28d9f7", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "optimism-goerli", - "isTestnet": true, - "networkId": 420, - "chainId": 420, - "sfId": 103, - "shortName": "opgoerli", - "uppercaseName": "OPTIMISM_GOERLI", - "humanReadableName": "Optimism Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0xE01F8743677Da897F4e7De9073b57Bf034FC2433", - "contractsV1": { - "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "host": "0xE40983C2476032A0915600b9472B3141aA5B5Ba9", - "cfaV1": "0xff48668fa670A85e55A7a822b352d5ccF3E7b18C", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x96215257F2FcbB00135578f766c0449d239bd92F", - "gdaV1": "0xe87F46A15C410F151309Bf7516e130087Fc6a5E5", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xfafe31cf998Df4e5D8310B03EBa8fb5bF327Eaf5", - "constantOutflowNFT": "0xDF874BA132D8C68FEb5De513790f7612Fe20dDbd", - "constantInflowNFT": "0xf88dd7208438Fdc5Ad05857eA701b7b51cdae0a9", - "superfluidLoader": "0x5Bb5908dcCC9Bb0fC39a78CfDf9e47B4C08E9521", - "existentialNFTCloneFactory": "0xFCb633f4ff90241391aD92E4678eC2a11a94a990" - }, - "startBlockV1": 340000, - "logsQueryRange": 50000, - "explorer": "https://goerli-optimism.etherscan.io", - "subgraphV1": { - "cliName": "optimism-goerli", - "name": "protocol-v1-optimism-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-goerli" - }, - "publicRPCs": [ - "https://goerli.optimism.io", - "https://opt-goerli.g.alchemy.com/v2/demo" - ], - "trustedForwarders": [ - "0x9C73373C70F23920EA54F7883dCB1F85b162Df40", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "arbitrum-goerli", - "isTestnet": true, - "networkId": 421613, - "chainId": 421613, - "sfId": 104, - "shortName": "arbgoerli", - "uppercaseName": "ARBITRUM_GOERLI", - "humanReadableName": "Arbitrum Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0xE01F8743677Da897F4e7De9073b57Bf034FC2433", - "contractsV1": { - "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "host": "0xE40983C2476032A0915600b9472B3141aA5B5Ba9", - "cfaV1": "0xff48668fa670A85e55A7a822b352d5ccF3E7b18C", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x96215257F2FcbB00135578f766c0449d239bd92F", - "gdaV1": "0xe87F46A15C410F151309Bf7516e130087Fc6a5E5", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xfafe31cf998Df4e5D8310B03EBa8fb5bF327Eaf5", - "constantOutflowNFT": "0xDF874BA132D8C68FEb5De513790f7612Fe20dDbd", - "constantInflowNFT": "0xf88dd7208438Fdc5Ad05857eA701b7b51cdae0a9", - "superfluidLoader": "0x5Bb5908dcCC9Bb0fC39a78CfDf9e47B4C08E9521", - "existentialNFTCloneFactory": "0x22f391AB6755F0A8986AFD543289C43701beaCAa" - }, - "startBlockV1": 93000, - "logsQueryRange": 50000, - "explorer": "https://goerli.arbiscan.io", - "subgraphV1": { - "cliName": "arbitrum-goerli", - "name": "protocol-v1-arbitrum-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-goerli" - }, - "publicRPCs": [ - "https://goerli-rollup.arbitrum.io/rpc", - "https://arb-goerli.g.alchemy.com/v2/demo" - ], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, { "name": "avalanche-fuji", "isTestnet": true, @@ -233,14 +21,14 @@ export default "gdaV1": "0x51f571D934C59185f13d17301a36c07A2268B814", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", - "constantOutflowNFT": "0x49583f57EFeBe733EC872c5d5437116085a3eE3c", - "constantInflowNFT": "0x67d0Efab10b390206b356BA7FB453Ab56AAB7480", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", + "batchLiquidator": "0x85AfCf531aF1a853AC65F6bfa4de99C742B8e432", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" }, - "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888" + "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3220000, "logsQueryRange": 50000, @@ -248,7 +36,7 @@ export default "subgraphV1": { "cliName": "fuji", "name": "protocol-v1-avalanche-fuji", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-fuji/protocol-v1" }, "publicRPCs": [ "https://api.avax-test.network/ext/bc/C/rpc", @@ -277,11 +65,13 @@ export default "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x9823364056BcA85Dc3c4a3b96801314D082C8Eb9", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", - "constantOutflowNFT": "0xfBE332e001D6b54e1F4B63c2343B8E7746d99Ece", - "constantInflowNFT": "0xC95346B7394009ccEfaA62Eca28797804B2bCF1C", - "superfluidLoader": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", - "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" + "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", + "batchLiquidator": "0x79aE8BF8EE9238d8E848F7dbBF74Ddb3365f6c11", + "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3322400, "logsQueryRange": 10000, @@ -289,88 +79,13 @@ export default "subgraphV1": { "cliName": "sepolia", "name": "protocol-v1-eth-sepolia", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1" }, "publicRPCs": [ "https://rpc.sepolia.org", "https://ethereum-sepolia.blockpi.network/v1/rpc/public" ] }, - { - "name": "base-goerli", - "isTestnet": true, - "networkId": 84531, - "chainId": 84531, - "sfId": 107, - "shortName": "bgoerli", - "uppercaseName": "BASE_GOERLI", - "humanReadableName": "Base Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x7fFCE315B2014546bA461d54eDed7AAc70DF4f53", - "contractsV1": { - "resolver": "0x598D5dB9902cbBd6e8Ee9CDb3A231377cdA2f018", - "host": "0x507c3a7C6Ccc253884A2e3a3ee2A211cC7E796a6", - "cfaV1": "0x4C476F2Fb27272680F2f6f2592E94d9e704691bC", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xaa4FCc799B8857FA87b2945Dc6572D5d76b35485", - "superTokenFactory": "0x1015BE31D7711D95d2c3444708FB53cC851ba856", - "constantOutflowNFT": "0x4E89088Cd14064f38E5B2F309cFaB9C864F9a8e6", - "constantInflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "superfluidLoader": "0x15F0Ca26781C3852f8166eD2ebce5D18265cceb7", - "existentialNFTCloneFactory": "0x42B332F56BCD15F0D7cd523E5eC26Cd0734621eD" - }, - "startBlockV1": 5249500, - "logsQueryRange": 10000, - "explorer": "https://goerli.basescan.org/", - "subgraphV1": { - "cliName": "base-testnet", - "name": "protocol-v1-base-goerli" - }, - "publicRPCs": [ - "https://goerli.base.org", - "https://base-goerli.public.blastapi.io" - ], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "polygon-zkevm-testnet", - "isTestnet": true, - "networkId": 1442, - "chainId": 1442, - "sfId": 108, - "shortName": "pzkevmtest", - "uppercaseName": "POLYGON_ZKEVM_TESTNET", - "humanReadableName": "Polygon zkEVM Testnet", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x6345Aa6cec42a85160CF436810F97661e28c1876", - "contractsV1": { - "resolver": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", - "host": "0xe64f81d5dDdA1c7172e5C6d964E8ef1BD82D8704", - "cfaV1": "0x1EAa5ceA064aab2692AF257FB31f5291fdA3Cdee", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xBf22019a4A4430bA67D3B0c8B4d5Edc48F913301", - "superTokenFactory": "0x0F3B163623F05b2BfF42956f7C7bd31456bd83a2", - "constantOutflowNFT": "0xDBD6f113E46A99D7BF95edfa47390c0c8127E922", - "constantInflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "superfluidLoader": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "existentialNFTCloneFactory": "0x70bbB7a057A13070dF11d533e8f299357D778637" - }, - "startBlockV1": 726000, - "logsQueryRange": 20000, - "explorer": "https://testnet-zkevm.polygonscan.org/", - "subgraphV1": { - "cliName": "polygon-zkevm-testnet", - "name": "protocol-v1-polygon-zkevm-testnet" - }, - "publicRPCs": ["https://rpc.public.zkevm-test.net"], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, { "name": "optimism-sepolia", "isTestnet": true, @@ -391,9 +106,16 @@ export default "gdaV1": "0xd453d38A001B47271488886532f1CCeAbf0c7eF3", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xfcF0489488397332579f35b0F711BE570Da0E8f5", - "constantOutflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", - "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c" + "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", + "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", + "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", + "autowrap": { + "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", + "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" + }, + "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "batchLiquidator": "0x9539B21cC67844417E80aE168bc28c831E7Ed271", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6886559, "logsQueryRange": 50000, @@ -401,7 +123,19 @@ export default "subgraphV1": { "cliName": "optimism-sepolia", "name": "protocol-v1-optimism-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1" + }, + "subgraphVesting": { + "name": "vesting-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/vesting-scheduler" + }, + "subgraphFlowScheduler": { + "name": "scheduling-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/flow-scheduler" + }, + "subgraphAutoWrap": { + "name": "auto-wrap-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/auto-wrap" }, "publicRPCs": [ "https://sepolia.optimism.io" @@ -422,14 +156,15 @@ export default "contractsV1": { "resolver": "0xB62446a3006d86f6e9eAa36da773c311E7B8AF91", "host": "0x42b05a6016B9eED232E13fd56a8F0725693DBF8e", - "governance": "0x59282c3ae5480F360429c0344A13e37cE9B13487", - "cfaV1": "0x09168F566EFF50Af1EB21D9BC45C9662fB6e08F1", - "idaV1": "0xD5F7350ad4ae4dA26714Cc95564D9Da31F2830e5", - "gdaV1": "0x7671c9059E085A14935d84E0fdE0df577D893a41", - "constantOutflowNFT": "0xEdB0A24DDb09cFeffF0C5348EB5d6D1C439d36bf", - "constantInflowNFT": "0x1DA4e4F848Cd4D0f528c2D0F19F41226BacB5489", + "cfaV1": "0xbc46B4Aa41c055578306820013d4B65fff42711E", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x296556422F44F19E5d216CBf98348A03BDc445E7", + "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", + "batchLiquidator": "0x70bbB7a057A13070dF11d533e8f299357D778637", "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2823800, "logsQueryRange": 50000, @@ -437,10 +172,44 @@ export default "subgraphV1": { "cliName": "scroll-sepolia", "name": "protocol-v1-scroll-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-scroll-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-sepolia/protocol-v1" }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, + { + "name": "base-sepolia", + "isTestnet": true, + "networkId": 84532, + "chainId": 84532, + "sfId": 111, + "shortName": "bsepolia", + "uppercaseName": "BASE_SEPOLIA", + "humanReadableName": "Base Sepolia", + "nativeTokenSymbol": "ETH", + "nativeTokenWrapper": "0x143ea239159155B408e71CDbE836e8CFD6766732", + "contractsV1": { + "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", + "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f", + "batchLiquidator": "0x95043eC349476B413eF5c369c4d2454a1a65eaB9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" + }, + "startBlockV1": 10604500, + "logsQueryRange": 50000, + "explorer": "https://sepolia.basescan.org", + "subgraphV1": { + "cliName": "base-sepolia" + }, + "publicRPCs": [ + "https://sepolia.base.org" + ] + }, { "name": "xdai-mainnet", "isTestnet": false, @@ -452,6 +221,7 @@ export default "humanReadableName": "Gnosis Chain", "nativeTokenSymbol": "xDAI", "nativeTokenWrapper": "0x59988e47A3503AaFaA0368b9deF095c818Fdca01", + "duneName": "gnosis", "contractsV1": { "resolver": "0x9634Fa35188C59DD3B0ADa0Dd9adD7e4ECefc0a9", "host": "0x2dFe937cD98Ab92e59cF3139138f18c823a4efE7", @@ -459,13 +229,12 @@ export default "cfaV1": "0xEbdA4ceF883A7B12c4E669Ebc58927FBa8447C7D", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x7888ac96F987Eb10E291F34851ae0266eF912081", + "gdaV1": "0xd7992D358A20478c82dDEd98B3D8A9da46e99b82", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", - "constantOutflowNFT": "0xfC00dEE8a980110c5608A823a5B3af3872635456", - "constantInflowNFT": "0x1497440B4E92DC4ca0F76223b28C20Cb9cB8a0f1", - "superfluidLoader": "0xf941528d82D0eD2314FaBBA8bC8f285D1956A657", + "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", - "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", + "batchLiquidator": "0x96C3C2d23d143301cF363a02cB7fe3596d2834d7", "flowScheduler": "0x9cC7fc484fF588926149577e9330fA5b2cA74336", "vestingScheduler": "0x0170FFCC75d178d426EBad5b1a31451d00Ddbd0D", "wrapManager": "0x7a2899D179a8F205C8EDAd2e52954cA5f6d48D1A", @@ -473,7 +242,8 @@ export default "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7" + "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14820000, "logsQueryRange": 20000, @@ -481,20 +251,19 @@ export default "subgraphV1": { "cliName": "gnosis", "name": "protocol-v1-xdai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/auto-wrap" }, "publicRPCs": [ "https://rpc.gnosischain.com", @@ -513,6 +282,7 @@ export default "humanReadableName": "Polygon", "nativeTokenSymbol": "MATIC", "nativeTokenWrapper": "0x3aD736904E9e65189c3000c7DD2c8AC8bB7cD4e3", + "duneName": "polygon", "contractsV1": { "resolver": "0x8bDCb5613153f41B2856F71Bd7A7e0432F6dbe58", "host": "0x3E14dC1b13c488a8d5D310918780c983bD5982E7", @@ -520,19 +290,20 @@ export default "cfaV1": "0x6EeE6060f715257b970700bc2656De21dEdF074C", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xB0aABBA4B2783A72C52956CDEF62d438ecA2d7a1", + "gdaV1": "0x961dd5A052741B49B6CBf6759591f9D8576fCFb0", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", - "constantOutflowNFT": "0x554e2bbaCF43FD87417b7201A9F1649a3ED89d68", - "constantInflowNFT": "0x55909bB8cd8276887Aae35118d60b19755201c68", - "superfluidLoader": "0xA3d2A6Db274722e802AC025d667041ecAb094FE7", + "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", - "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", + "batchLiquidator": "0xA7afDc46999076C295cfC6812dd73d103cF64e19", "flowScheduler": "0x55F7758dd99d5e185f4CC08d4Ad95B71f598264D", "vestingScheduler": "0xcFE6382B33F2AdaFbE46e6A26A88E0182ae32b0c", "autowrap": { "manager": "0x2581c27E7f6D6AF452E63fCe884EDE3EDd716b32", "wrapStrategy": "0xb4afa36BAd8c76976Dc77a21c9Ad711EF720eE4b" }, - "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630" + "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 11650500, "logsQueryRange": 10000, @@ -540,20 +311,19 @@ export default "subgraphV1": { "cliName": "matic", "name": "protocol-v1-matic", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/auto-wrap" }, "publicRPCs": [ "https://polygon-rpc.com", @@ -572,6 +342,7 @@ export default "humanReadableName": "Optimism", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x4ac8bD1bDaE47beeF2D1c6Aa62229509b962Aa0d", + "duneName": "optimism", "contractsV1": { "resolver": "0x743B5f46BC86caF41bE4956d9275721E0531B186", "host": "0x567c4B141ED61923967cA25Ef4906C8781069a10", @@ -579,19 +350,21 @@ export default "cfaV1": "0x204C6f131bb7F258b2Ea1593f5309911d8E458eD", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xc4ce5118C3B20950ee288f086cb7FC166d222D4c", + "gdaV1": "0x68Ae17fa7a31b86F306c383277552fd4813b0d35", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", - "constantOutflowNFT": "0xFb2b126660BE2fdEBa254b1F6e4348644E8482e7", - "constantInflowNFT": "0x0C6D90a98426bfD572a5c5Be572a7f6Bd1C5ED76", - "superfluidLoader": "0x8E310ce29Ab7Fa2878944A65BB0eaF97B1853d40", + "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", - "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", + "batchLiquidator": "0x84956C84c33c38AcE22C9324F1f92028AF2215ce", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", + "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "autowrap": { "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" }, - "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6" + "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 4300000, "logsQueryRange": 50000, @@ -599,19 +372,19 @@ export default "subgraphV1": { "cliName": "optimism", "name": "protocol-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/auto-wrap" }, "publicRPCs": [ "https://mainnet.optimism.io", @@ -630,6 +403,7 @@ export default "humanReadableName": "Arbitrum One", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0xe6C8d111337D0052b9D88BF5d7D55B7f8385ACd3", + "duneName": "arbitrum", "contractsV1": { "resolver": "0x609b9d9d6Ee9C3200745A79B9d3398DBd63d509F", "host": "0xCf8Acb4eF033efF16E8080aed4c7D5B9285D2192", @@ -637,19 +411,20 @@ export default "cfaV1": "0x731FdBB12944973B500518aea61942381d7e240D", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x2319C7e07EB063340D2a0E36709B0D65fda75986", + "gdaV1": "0x1e299701792a2aF01408B122419d65Fd2dF0Ba02", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", - "constantOutflowNFT": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", - "constantInflowNFT": "0x0043d7c85C8b96a49A72A92C0B48CdC4720437d7", - "superfluidLoader": "0xB99cA401e10D277345BcFb281AC148a2e16Db466", + "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", - "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", + "batchLiquidator": "0x9224413b9177E6c1D5721B4a4D1D00eC84B07Ce7", "flowScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "vestingScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "autowrap": { "manager": "0xf01825eAFAe5CD1Dab5593EFAF218efC8968D272", "wrapStrategy": "0x342076aA957B0ec8bC1d3893af719b288eA31e61" }, - "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d" + "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 7600000, "logsQueryRange": 50000, @@ -657,19 +432,19 @@ export default "subgraphV1": { "cliName": "arbitrum-one", "name": "protocol-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/auto-wrap" }, "publicRPCs": [ "https://arb1.arbitrum.io/rpc", @@ -688,6 +463,7 @@ export default "humanReadableName": "Avalanche C", "nativeTokenSymbol": "AVAX", "nativeTokenWrapper": "0xBE916845D8678b5d2F7aD79525A62D7c08ABba7e", + "duneName": "avalanche_c", "contractsV1": { "resolver": "0x24a3F04F70B7f07B9673EadD3e146391BcfEa5c1", "host": "0x60377C7016E4cdB03C87EF474896C11cB560752C", @@ -695,19 +471,20 @@ export default "cfaV1": "0x6946c5B38Ffea373b0a2340b4AEf0De8F6782e58", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x1fA9fFe8Db73F701454B195151Db4Abb18423cf2", + "gdaV1": "0xA7b197cD5b0cEF6d62c4A0a851E3581f5E62e4D2", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", - "constantOutflowNFT": "0x4247bA6C3658Fa5C0F523BAcea8D0b97aF1a175e", - "constantInflowNFT": "0x82b9D8A91A5b333b5A6e78439551ea0E7da153E3", - "superfluidLoader": "0x2601E69a2D16C8Ccc8aEe8cE9F59d24a59986B9E", + "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", - "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", + "batchLiquidator": "0x3b387638a5d33aE8772715642A21345f23Af824c", "flowScheduler": "0xF7AfF590E9DE493D7ACb421Fca7f1E35C1ad4Ce5", "vestingScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "autowrap": { "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7" + "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14700000, "logsQueryRange": 50000, @@ -715,19 +492,19 @@ export default "subgraphV1": { "cliName": "avalanche", "name": "protocol-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/auto-wrap" }, "publicRPCs": [ "https://api.avax.network/ext/bc/C/rpc", @@ -746,6 +523,7 @@ export default "humanReadableName": "BNB Smart Chain", "nativeTokenSymbol": "BNB", "nativeTokenWrapper": "0x529A4116F160c833c61311569D6B33dFF41fD657", + "duneName": "bnb", "contractsV1": { "resolver": "0x69604aA4e9e8BF44A73C680997205Edb03A92E41", "host": "0xd1e2cFb6441680002Eb7A44223160aB9B67d7E6E", @@ -753,19 +531,20 @@ export default "cfaV1": "0x49c38108870e74Cb9420C0991a85D3edd6363F75", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x594ed9Cd773584B645aC1F5B11020d3b32cDF07d", + "gdaV1": "0x3bbFA4C406719424C7f66CD97A8Fe27Af383d3e2", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", - "constantOutflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "constantInflowNFT": "0xbF7BCcE8D60A9C3F6bFaEc9346Aa85B9f781a4e9", - "superfluidLoader": "0x3C26e5bEbc68EaAf4efcd88F8E5A6Aeb77b65579", + "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", - "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", + "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", "flowScheduler": "0x2f9e2A2A59405682d4F86779275CF5525AD7eC2B", "vestingScheduler": "0x9B91c27f78376383003C6A12Ad12B341d016C5b9", "autowrap": { "manager": "0x2AcdD61ac1EFFe1535109449c31889bdE8d7f325", "wrapStrategy": "0x9e308cb079ae130790F604b1030cDf386670f199" }, - "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9" + "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 18800000, "logsQueryRange": 5000, @@ -773,19 +552,19 @@ export default "subgraphV1": { "cliName": "bsc", "name": "protocol-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/auto-wrap" }, "publicRPCs": [ "https://bscrpc.com", @@ -804,6 +583,7 @@ export default "humanReadableName": "Ethereum", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0xC22BeA0Be9872d8B7B3933CEc70Ece4D53A900da", + "duneName": "ethereum", "contractsV1": { "resolver": "0xeE4cD028f5fdaAdeA99f8fc38e8bA8A57c90Be53", "host": "0x4E583d9390082B65Bef884b629DFA426114CED6d", @@ -811,16 +591,19 @@ export default "cfaV1": "0x2844c1BBdA121E9E43105630b9C8310e5c72744b", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xbCF9cfA8Da20B591790dF27DE65C1254Bf91563d", + "gdaV1": "0xAAdBB3Eee3Bd080f5353d86DdF1916aCA3fAC842", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", - "superfluidLoader": "0x9775EEBdfF8AE845e7Ad3d1D04B85e6c6d284aCB", + "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", + "batchLiquidator": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" - } + }, + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 15870000, "logsQueryRange": 10000, @@ -828,20 +611,19 @@ export default "subgraphV1": { "cliName": "mainnet", "name": "protocol-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/auto-wrap" }, "publicRPCs": [ "https://cloudflare-eth.com", @@ -860,6 +642,7 @@ export default "humanReadableName": "Celo", "nativeTokenSymbol": "CELO", "nativeTokenWrapper": "0x671425Ae1f272Bc6F79beC3ed5C4b00e9c628240", + "duneName": "celo", "contractsV1": { "resolver": "0x05eE721BD4D803d6d477Aa7607395452B65373FF", "host": "0xA4Ff07cF81C02CFD356184879D953970cA957585", @@ -867,13 +650,14 @@ export default "cfaV1": "0x9d369e78e1a682cE0F8d9aD849BeA4FE1c3bD3Ad", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x26747Fe93fAC8bF28E1e24A558a2bC7E4d9846cA", + "gdaV1": "0x308b7405272d11494716e30C6E972DbF6fb89555", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", - "constantOutflowNFT": "0xbe49ac1EadAc65dccf204D4Df81d650B50122aB2", - "constantInflowNFT": "0x0FB7694c990CF19001127391Dbe53924dd7a61c7", - "superfluidLoader": "0xAd6e6849d8eEa62AF9271808afb726610fB451a6", + "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", - "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227" + "batchLiquidator": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 16393000, "logsQueryRange": 20000, @@ -881,7 +665,7 @@ export default "subgraphV1": { "cliName": "celo", "name": "protocol-v1-celo-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/celo-mainnet/protocol-v1" }, "publicRPCs": ["https://forno.celo.org", "https://rpc.ankr.com/celo"], "coinGeckoId": "celo" @@ -897,6 +681,7 @@ export default "humanReadableName": "Base", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x46fd5cfB4c12D87acD3a13e92BAa53240C661D93", + "duneName": "base", "contractsV1": { "resolver": "0x6a214c324553F96F04eFBDd66908685525Da0E0d", "host": "0x4C073B3baB6d8826b8C5b229f3cfdC1eC6E47E74", @@ -904,20 +689,40 @@ export default "cfaV1": "0x19ba78B9cDB05A877718841c574325fdB53601bb", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x66DF3f8e14CF870361378d8F61356D15d9F425C4", + "gdaV1": "0xfE6c87BE05feDB2059d2EC41bA0A09826C9FD7aa", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", - "constantOutflowNFT": "0xD3C78bb5a16Ea4ab584844eeb8F90Ac710c16355", - "constantInflowNFT": "0x2d51962A9EE4D3C2819EF585eab7412c2a2C31Ac", - "superfluidLoader": "0x6B24A6F34ab96267Fef9F8AC9fe6CC104C228127", + "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", - "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", - "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC" + "batchLiquidator": "0x6b008BAc0e5846cB5d9Ca02ca0e801fCbF88B6f9", + "flowScheduler": "0xC72CEd15204d02183c83fEbb918b183E400811Ee", + "vestingScheduler": "0xDF92D0E6Bcb9385FDe99aD21Ff5e47Fb47E3c6b2", + "autowrap": { + "manager": "0x5D0acD0864Ad07ba4E1E0474AE69Da87482e14A9", + "wrapStrategy": "0xB29005319B0caB24cF6D4d24e8420E54BB29Cb0d" + }, + "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 1000000, "logsQueryRange": 20000, "explorer": "https://basescan.org", "subgraphV1": { "cliName": "base", - "name": "protocol-v1-base-mainnet" + "name": "protocol-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/protocol-v1" + }, + "subgraphVesting": { + "name": "vesting-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/vesting-scheduler" + }, + "subgraphFlowScheduler": { + "name": "scheduling-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/flow-scheduler" + }, + "subgraphAutoWrap": { + "name": "auto-wrap-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/auto-wrap" }, "publicRPCs": ["https://developer-access-mainnet.base.org"], "coinGeckoId": "base" @@ -933,17 +738,21 @@ export default "humanReadableName": "Scroll", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x483C1716b6133cdA01237ebBF19c5a92898204B7", + "duneName": "scroll", "contractsV1": { "resolver": "0xb25a19c0e7d10c8D37E5b63Ed3213b67f7ebfF80", "host": "0x0F86a21F6216c061B222c224e315d9FC34520bb7", - "governance": "0x43A636A202203e52ea99b6515a191b888ccc57AC", - "cfaV1": "0x9d146055738BD4D258c99927A3188C94dCf4cd18", - "idaV1": "0xC537033813fA474e5f9588114ef2EfBB0564e080", - "gdaV1": "0x2c6dc2f45c9a15512BcF219867eAB804b5737c6a", - "constantOutflowNFT": "0x0de05fe0fF8F5eA9475CA8425e2D05Dd38ccED84", - "constantInflowNFT": "0x8c24Fc82c8fDd763F08E654212fc27e577EbD934", + "governance": "0xC2C9a709A6744816b3712D520BD314fe610AEa33", + "cfaV1": "0xB3bcD6da1eeB6c97258B3806A853A6dcD3B6C00c", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x4112557F0F228A18654d3C39599421DE9F61144d", + "gdaV1": "0x97a9f293d7eD13f3fbD499cE684Ed4F103295a28", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", + "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", + "batchLiquidator": "0x2eaa49BeB4Aa4fcC709DC14c0FA0fF1B292077b5", "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2575000, "logsQueryRange": 50000, @@ -951,8 +760,44 @@ export default "subgraphV1": { "cliName": "scroll", "name": "protocol-v1-scroll-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-scroll-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-mainnet/protocol-v1" }, "publicRPCs": ["https://rpc.scroll.io"] + }, + { + "name": "degenchain", + "isTestnet": false, + "networkId": 666666666, + "chainId": 666666666, + "sfId": 10, + "shortName": "degen", + "uppercaseName": "DEGENCHAIN", + "humanReadableName": "Degen Chain", + "nativeTokenSymbol": "DEGEN", + "nativeTokenWrapper": "0xda58FA9bfc3D3960df33ddD8D4d762Cf8Fa6F7ad", + "contractsV1": { + "resolver": "0x649FB24ed0B983f88500F3C37682714aB96D73c2", + "host": "0xc1314EdcD7e478C831a7a24169F7dEADB2646eD2", + "governance": "0x4D420e94328bF1AEA1b525FDE9e498ADBe60f9B1", + "cfaV1": "0x82cc052d1b17aC554a22A88D5876B56c6b51e95c", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0xb19CE3e7DA9FbAf9De2526BD662A82f26421A53E", + "gdaV1": "0x210a01ad187003603B2287F78579ec103Eb70D9B", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", + "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", + "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", + "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" + }, + "startBlockV1": 6500000, + "logsQueryRange": 50000, + "explorer": "https://explorer.degen.tips/", + "subgraphV1": { + "cliName": "degen", + "name": "protocol-v1-degenchain", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/degenchain/protocol-v1" + }, + "publicRPCs": ["https://rpc.degen.tips"] } ] diff --git a/packages/metadata/networks.json b/packages/metadata/networks.json index de44de64ea..656e8216ad 100644 --- a/packages/metadata/networks.json +++ b/packages/metadata/networks.json @@ -1,216 +1,4 @@ [ - { - "name": "eth-goerli", - "isTestnet": true, - "networkId": 5, - "chainId": 5, - "sfId": 101, - "shortName": "goerli", - "uppercaseName": "ETH_GOERLI", - "humanReadableName": "Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x5943f705abb6834cad767e6e4bb258bc48d9c947", - "contractsV1": { - "resolver": "0x071077b24943D4DC09a6A57B8aFfE2BdE9bD4B89", - "host": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9", - "governance": "0x3a648764a6d66440ca096343937c711a7ac1b1e9", - "cfaV1": "0xEd6BcbF6907D4feEEe8a8875543249bEa9D308E8", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xfDdcdac21D64B639546f3Ce2868C7EF06036990c", - "gdaV1": "0x3dB8Abd8B696F6c4150212A85961f954825Dd4B9", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0x94f26B4c8AD12B18c12f38E878618f7664bdcCE2", - "constantOutflowNFT": "0xB18cbFeA12b5CB2626C74c94920dB1B37Ae91506", - "constantInflowNFT": "0xF07df8b66ed80399B1E00981D61aD34EB4293032", - "superfluidLoader": "0x08C6Ad85c040076dD3e33Bbd963C4c37DBF6fCc4", - "toga": "0xa54FC15FC75693447d70a57262F37a70B614721b", - "flowScheduler": "0xf428308b426D7cD7Ad8eBE549d750f31C8E060Ca", - "vestingScheduler": "0xF9240F930d847F70ad900aBEE8949F25649Bf24a", - "autowrap": { - "manager": "0x0B82D14E9616ca4d260E77454834AdCf5887595F", - "wrapStrategy": "0xea49af829d3e28d3ec49e0e0a0ba1e7860a56f60" - }, - "existentialNFTCloneFactory": "0x3e5e8449477F80a3Dc0bA394882AeAB300c7F807" - }, - "startBlockV1": 3550000, - "logsQueryRange": 10000, - "explorer": "https://goerli.etherscan.io", - "subgraphV1": { - "cliName": "goerli", - "name": "protocol-v1-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli" - }, - "subgraphVesting": { - "name": "vesting-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-goerli" - }, - "subgraphFlowScheduler": { - "name": "scheduling-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-goerli" - }, - "subgraphAutoWrap": { - "name": "auto-wrap-v1-eth-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-goerli" - }, - "publicRPCs": [ - "https://rpc.ankr.com/eth_goerli", - "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161" - ], - "trustedForwarders": [ - "0xE041608922d06a4F26C0d4c27d8bCD01daf1f792", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "polygon-mumbai", - "isTestnet": true, - "networkId": 80001, - "chainId": 80001, - "sfId": 102, - "shortName": "mumbai", - "uppercaseName": "POLYGON_MUMBAI", - "humanReadableName": "Polygon Mumbai", - "nativeTokenSymbol": "MATIC", - "nativeTokenWrapper": "0x96B82B65ACF7072eFEb00502F45757F254c2a0D4", - "contractsV1": { - "resolver": "0x2feFd8B23e4770B674b0d2fAda5EE8a2bE0B525F", - "host": "0xEB796bdb90fFA0f28255275e16936D25d3418603", - "cfaV1": "0x49e565Ed1bdc17F3d220f72DF0857C26FA83F873", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x804348D4960a61f2d5F9ce9103027A3E849E09b8", - "gdaV1": "0x63ab406B6eF6c8be732c1edbd15464de16a8F46D", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xB798553db6EB3D3C56912378409370145E97324B", - "constantOutflowNFT": "0x502CC982947216C0f94e433BC78c413806301C07", - "constantInflowNFT": "0x9906A7e948C642B6bc74b9A5EAfCddB3580b44e0", - "superfluidLoader": "0xFcc617a382988a6d081B1821c8d17C47DFF9EDE1", - "toga": "0x38DD80876DBA048d0050D28828522c313967D073", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", - "flowScheduler": "0x59A3Ba9d34c387FB70b4f4e4Fbc9eD7519194139", - "vestingScheduler": "0x3962EE56c9f7176215D149938BA685F91aBB633B", - "autowrap": { - "manager": "0x3eAB3c6207F488E475b7955B631B564F0E6317B9", - "wrapStrategy": "0x544728AFDBeEafBeC9e1329031788edb53017bC4" - }, - "existentialNFTCloneFactory": "0xfC4E49AfcDDDcc2B90794DC214cc324d17B15619" - }, - "startBlockV1": 8100000, - "logsQueryRange": 10000, - "explorer": "https://mumbai.polygonscan.com", - "subgraphV1": { - "cliName": "mumbai", - "name": "protocol-v1-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-mumbai" - }, - "subgraphVesting": { - "name": "vesting-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-polygon-mumbai" - }, - "subgraphFlowScheduler": { - "name": "scheduling-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-polygon-mumbai" - }, - "subgraphAutoWrap": { - "name": "auto-wrap-v1-polygon-mumbai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-polygon-mumbai" - }, - "publicRPCs": [ - "https://rpc.ankr.com/polygon_mumbai", - "https://matic-mumbai.chainstacklabs.com" - ], - "trustedForwarders": [ - "0x9399bb24dbb5c4b782c70c2969f58716ebbd6a3b", - "0x69015912AA33720b842dCD6aC059Ed623F28d9f7", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "optimism-goerli", - "isTestnet": true, - "networkId": 420, - "chainId": 420, - "sfId": 103, - "shortName": "opgoerli", - "uppercaseName": "OPTIMISM_GOERLI", - "humanReadableName": "Optimism Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0xE01F8743677Da897F4e7De9073b57Bf034FC2433", - "contractsV1": { - "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "host": "0xE40983C2476032A0915600b9472B3141aA5B5Ba9", - "cfaV1": "0xff48668fa670A85e55A7a822b352d5ccF3E7b18C", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x96215257F2FcbB00135578f766c0449d239bd92F", - "gdaV1": "0xe87F46A15C410F151309Bf7516e130087Fc6a5E5", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xfafe31cf998Df4e5D8310B03EBa8fb5bF327Eaf5", - "constantOutflowNFT": "0xDF874BA132D8C68FEb5De513790f7612Fe20dDbd", - "constantInflowNFT": "0xf88dd7208438Fdc5Ad05857eA701b7b51cdae0a9", - "superfluidLoader": "0x5Bb5908dcCC9Bb0fC39a78CfDf9e47B4C08E9521", - "existentialNFTCloneFactory": "0xFCb633f4ff90241391aD92E4678eC2a11a94a990" - }, - "startBlockV1": 340000, - "logsQueryRange": 50000, - "explorer": "https://goerli-optimism.etherscan.io", - "subgraphV1": { - "cliName": "optimism-goerli", - "name": "protocol-v1-optimism-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-goerli" - }, - "publicRPCs": [ - "https://goerli.optimism.io", - "https://opt-goerli.g.alchemy.com/v2/demo" - ], - "trustedForwarders": [ - "0x9C73373C70F23920EA54F7883dCB1F85b162Df40", - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "arbitrum-goerli", - "isTestnet": true, - "networkId": 421613, - "chainId": 421613, - "sfId": 104, - "shortName": "arbgoerli", - "uppercaseName": "ARBITRUM_GOERLI", - "humanReadableName": "Arbitrum Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0xE01F8743677Da897F4e7De9073b57Bf034FC2433", - "contractsV1": { - "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "host": "0xE40983C2476032A0915600b9472B3141aA5B5Ba9", - "cfaV1": "0xff48668fa670A85e55A7a822b352d5ccF3E7b18C", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0x96215257F2FcbB00135578f766c0449d239bd92F", - "gdaV1": "0xe87F46A15C410F151309Bf7516e130087Fc6a5E5", - "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", - "superTokenFactory": "0xfafe31cf998Df4e5D8310B03EBa8fb5bF327Eaf5", - "constantOutflowNFT": "0xDF874BA132D8C68FEb5De513790f7612Fe20dDbd", - "constantInflowNFT": "0xf88dd7208438Fdc5Ad05857eA701b7b51cdae0a9", - "superfluidLoader": "0x5Bb5908dcCC9Bb0fC39a78CfDf9e47B4C08E9521", - "existentialNFTCloneFactory": "0x22f391AB6755F0A8986AFD543289C43701beaCAa" - }, - "startBlockV1": 93000, - "logsQueryRange": 50000, - "explorer": "https://goerli.arbiscan.io", - "subgraphV1": { - "cliName": "arbitrum-goerli", - "name": "protocol-v1-arbitrum-goerli", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-goerli" - }, - "publicRPCs": [ - "https://goerli-rollup.arbitrum.io/rpc", - "https://arb-goerli.g.alchemy.com/v2/demo" - ], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, { "name": "avalanche-fuji", "isTestnet": true, @@ -231,14 +19,14 @@ "gdaV1": "0x51f571D934C59185f13d17301a36c07A2268B814", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C92042426B6bAAe497bEf461B6d8342D03aEc92", - "constantOutflowNFT": "0x49583f57EFeBe733EC872c5d5437116085a3eE3c", - "constantInflowNFT": "0x67d0Efab10b390206b356BA7FB453Ab56AAB7480", "superfluidLoader": "0x36446Ec9C7909608065dEB7f491701d815B880e5", + "batchLiquidator": "0x85AfCf531aF1a853AC65F6bfa4de99C742B8e432", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" }, - "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888" + "existentialNFTCloneFactory": "0xF76529ddEE7AA7890323eCa40C212758DD93B888", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3220000, "logsQueryRange": 50000, @@ -246,7 +34,7 @@ "subgraphV1": { "cliName": "fuji", "name": "protocol-v1-avalanche-fuji", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-fuji" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-fuji/protocol-v1" }, "publicRPCs": [ "https://api.avax-test.network/ext/bc/C/rpc", @@ -275,11 +63,13 @@ "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x9823364056BcA85Dc3c4a3b96801314D082C8Eb9", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x254C2e152E8602839D288A7bccdf3d0974597193", - "constantOutflowNFT": "0xfBE332e001D6b54e1F4B63c2343B8E7746d99Ece", - "constantInflowNFT": "0xC95346B7394009ccEfaA62Eca28797804B2bCF1C", - "superfluidLoader": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", - "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9" + "superfluidLoader": "0x862F59081FC7907F940bE4227b9f485d700E6cdD", + "batchLiquidator": "0x79aE8BF8EE9238d8E848F7dbBF74Ddb3365f6c11", + "existentialNFTCloneFactory": "0x0D1F0d4629B722b4dFabd195c14F12f2095418d9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 3322400, "logsQueryRange": 10000, @@ -287,88 +77,13 @@ "subgraphV1": { "cliName": "sepolia", "name": "protocol-v1-eth-sepolia", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-sepolia/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1" }, "publicRPCs": [ "https://rpc.sepolia.org", "https://ethereum-sepolia.blockpi.network/v1/rpc/public" ] }, - { - "name": "base-goerli", - "isTestnet": true, - "networkId": 84531, - "chainId": 84531, - "sfId": 107, - "shortName": "bgoerli", - "uppercaseName": "BASE_GOERLI", - "humanReadableName": "Base Goerli", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x7fFCE315B2014546bA461d54eDed7AAc70DF4f53", - "contractsV1": { - "resolver": "0x598D5dB9902cbBd6e8Ee9CDb3A231377cdA2f018", - "host": "0x507c3a7C6Ccc253884A2e3a3ee2A211cC7E796a6", - "cfaV1": "0x4C476F2Fb27272680F2f6f2592E94d9e704691bC", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xaa4FCc799B8857FA87b2945Dc6572D5d76b35485", - "superTokenFactory": "0x1015BE31D7711D95d2c3444708FB53cC851ba856", - "constantOutflowNFT": "0x4E89088Cd14064f38E5B2F309cFaB9C864F9a8e6", - "constantInflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "superfluidLoader": "0x15F0Ca26781C3852f8166eD2ebce5D18265cceb7", - "existentialNFTCloneFactory": "0x42B332F56BCD15F0D7cd523E5eC26Cd0734621eD" - }, - "startBlockV1": 5249500, - "logsQueryRange": 10000, - "explorer": "https://goerli.basescan.org/", - "subgraphV1": { - "cliName": "base-testnet", - "name": "protocol-v1-base-goerli" - }, - "publicRPCs": [ - "https://goerli.base.org", - "https://base-goerli.public.blastapi.io" - ], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, - { - "name": "polygon-zkevm-testnet", - "isTestnet": true, - "networkId": 1442, - "chainId": 1442, - "sfId": 108, - "shortName": "pzkevmtest", - "uppercaseName": "POLYGON_ZKEVM_TESTNET", - "humanReadableName": "Polygon zkEVM Testnet", - "nativeTokenSymbol": "ETH", - "nativeTokenWrapper": "0x6345Aa6cec42a85160CF436810F97661e28c1876", - "contractsV1": { - "resolver": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", - "host": "0xe64f81d5dDdA1c7172e5C6d964E8ef1BD82D8704", - "cfaV1": "0x1EAa5ceA064aab2692AF257FB31f5291fdA3Cdee", - "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", - "idaV1": "0xBf22019a4A4430bA67D3B0c8B4d5Edc48F913301", - "superTokenFactory": "0x0F3B163623F05b2BfF42956f7C7bd31456bd83a2", - "constantOutflowNFT": "0xDBD6f113E46A99D7BF95edfa47390c0c8127E922", - "constantInflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "superfluidLoader": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "existentialNFTCloneFactory": "0x70bbB7a057A13070dF11d533e8f299357D778637" - }, - "startBlockV1": 726000, - "logsQueryRange": 20000, - "explorer": "https://testnet-zkevm.polygonscan.org/", - "subgraphV1": { - "cliName": "polygon-zkevm-testnet", - "name": "protocol-v1-polygon-zkevm-testnet" - }, - "publicRPCs": ["https://rpc.public.zkevm-test.net"], - "trustedForwarders": [ - "0xb539068872230f20456CF38EC52EF2f91AF4AE49", - "0xd8253782c45a12053594b9deB72d8e8aB2Fca54c" - ] - }, { "name": "optimism-sepolia", "isTestnet": true, @@ -389,9 +104,16 @@ "gdaV1": "0xd453d38A001B47271488886532f1CCeAbf0c7eF3", "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xfcF0489488397332579f35b0F711BE570Da0E8f5", - "constantOutflowNFT": "0xda6db863cb2EE39b196edB8159c38A1ed5c55344", - "constantInflowNFT": "0x87E00Dced5670e01BEe33a9a724B1dac790937eF", - "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c" + "flowScheduler": "0x73B1Ce21d03ad389C2A291B1d1dc4DAFE7B5Dc68", + "vestingScheduler": "0x27444c0235a4D921F3106475faeba0B5e7ABDD7a", + "vestingSchedulerV2": "0x3aa62b96f44D0f8892BeBBC819DE8e02E9DE69A8", + "autowrap": { + "manager": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", + "wrapStrategy": "0xf232f1fd34CE12e24F4391865c2D6E374D2C34d9" + }, + "superfluidLoader": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "batchLiquidator": "0x9539B21cC67844417E80aE168bc28c831E7Ed271", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 6886559, "logsQueryRange": 50000, @@ -399,7 +121,19 @@ "subgraphV1": { "cliName": "optimism-sepolia", "name": "protocol-v1-optimism-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1" + }, + "subgraphVesting": { + "name": "vesting-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/vesting-scheduler" + }, + "subgraphFlowScheduler": { + "name": "scheduling-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/flow-scheduler" + }, + "subgraphAutoWrap": { + "name": "auto-wrap-v1-optimism-sepolia", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-sepolia/auto-wrap" }, "publicRPCs": [ "https://sepolia.optimism.io" @@ -420,14 +154,15 @@ "contractsV1": { "resolver": "0xB62446a3006d86f6e9eAa36da773c311E7B8AF91", "host": "0x42b05a6016B9eED232E13fd56a8F0725693DBF8e", - "governance": "0x59282c3ae5480F360429c0344A13e37cE9B13487", - "cfaV1": "0x09168F566EFF50Af1EB21D9BC45C9662fB6e08F1", - "idaV1": "0xD5F7350ad4ae4dA26714Cc95564D9Da31F2830e5", - "gdaV1": "0x7671c9059E085A14935d84E0fdE0df577D893a41", - "constantOutflowNFT": "0xEdB0A24DDb09cFeffF0C5348EB5d6D1C439d36bf", - "constantInflowNFT": "0x1DA4e4F848Cd4D0f528c2D0F19F41226BacB5489", + "cfaV1": "0xbc46B4Aa41c055578306820013d4B65fff42711E", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x296556422F44F19E5d216CBf98348A03BDc445E7", + "gdaV1": "0x93fA9B627eE016990Fe5e654F923aaE8a480a75b", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0xe25603df330027d91A0BAcc3e80a7f9e84930FC6", + "batchLiquidator": "0x70bbB7a057A13070dF11d533e8f299357D778637", "superTokenFactory": "0x87560833d59Be057aFc63cFFa3fc531589Ba428F", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2823800, "logsQueryRange": 50000, @@ -435,10 +170,44 @@ "subgraphV1": { "cliName": "scroll-sepolia", "name": "protocol-v1-scroll-sepolia", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-scroll-sepolia" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-sepolia/protocol-v1" }, "publicRPCs": ["https://sepolia-rpc.scroll.io"] }, + { + "name": "base-sepolia", + "isTestnet": true, + "networkId": 84532, + "chainId": 84532, + "sfId": 111, + "shortName": "bsepolia", + "uppercaseName": "BASE_SEPOLIA", + "humanReadableName": "Base Sepolia", + "nativeTokenSymbol": "ETH", + "nativeTokenWrapper": "0x143ea239159155B408e71CDbE836e8CFD6766732", + "contractsV1": { + "resolver": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", + "host": "0x109412E3C84f0539b43d39dB691B08c90f58dC7c", + "cfaV1": "0x6836F23d6171D74Ef62FcF776655aBcD2bcd62Ef", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x9358C7dCCc6B8CA6F526311e8ac266F8C861B7ea", + "gdaV1": "0x53F4f44C813Dc380182d0b2b67fe5832A12B97f8", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superTokenFactory": "0x7447E94Dfe3d804a9f46Bf12838d467c912C8F6C", + "superfluidLoader": "0x777Be25F9fdcA87e8a0E06Ad4be93d65429FCb9f", + "batchLiquidator": "0x95043eC349476B413eF5c369c4d2454a1a65eaB9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" + }, + "startBlockV1": 10604500, + "logsQueryRange": 50000, + "explorer": "https://sepolia.basescan.org", + "subgraphV1": { + "cliName": "base-sepolia" + }, + "publicRPCs": [ + "https://sepolia.base.org" + ] + }, { "name": "xdai-mainnet", "isTestnet": false, @@ -450,6 +219,7 @@ "humanReadableName": "Gnosis Chain", "nativeTokenSymbol": "xDAI", "nativeTokenWrapper": "0x59988e47A3503AaFaA0368b9deF095c818Fdca01", + "duneName": "gnosis", "contractsV1": { "resolver": "0x9634Fa35188C59DD3B0ADa0Dd9adD7e4ECefc0a9", "host": "0x2dFe937cD98Ab92e59cF3139138f18c823a4efE7", @@ -457,13 +227,12 @@ "cfaV1": "0xEbdA4ceF883A7B12c4E669Ebc58927FBa8447C7D", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x7888ac96F987Eb10E291F34851ae0266eF912081", + "gdaV1": "0xd7992D358A20478c82dDEd98B3D8A9da46e99b82", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x23410e2659380784498509698ed70E414D384880", - "constantOutflowNFT": "0xfC00dEE8a980110c5608A823a5B3af3872635456", - "constantInflowNFT": "0x1497440B4E92DC4ca0F76223b28C20Cb9cB8a0f1", - "superfluidLoader": "0xf941528d82D0eD2314FaBBA8bC8f285D1956A657", + "superfluidLoader": "0xb688e4Da3100Bcec4b5B3140C8Fb482ad15D2013", "toga": "0xb7DE52F4281a7a276E18C40F94cd93159C4A2d22", - "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", - "superSpreader": "0x74CDF863b00789c29734F8dFd9F83423Bc55E4cE", + "batchLiquidator": "0x96C3C2d23d143301cF363a02cB7fe3596d2834d7", "flowScheduler": "0x9cC7fc484fF588926149577e9330fA5b2cA74336", "vestingScheduler": "0x0170FFCC75d178d426EBad5b1a31451d00Ddbd0D", "wrapManager": "0x7a2899D179a8F205C8EDAd2e52954cA5f6d48D1A", @@ -471,7 +240,8 @@ "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7" + "existentialNFTCloneFactory": "0xCd67c5bC1dfA3FF7d86b5ABc62A65C912Cbd2DA7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14820000, "logsQueryRange": 20000, @@ -479,20 +249,19 @@ "subgraphV1": { "cliName": "gnosis", "name": "protocol-v1-xdai", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-xdai", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/xdai/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-xdai-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-xdai-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/xdai-mainnet/auto-wrap" }, "publicRPCs": [ "https://rpc.gnosischain.com", @@ -511,6 +280,7 @@ "humanReadableName": "Polygon", "nativeTokenSymbol": "MATIC", "nativeTokenWrapper": "0x3aD736904E9e65189c3000c7DD2c8AC8bB7cD4e3", + "duneName": "polygon", "contractsV1": { "resolver": "0x8bDCb5613153f41B2856F71Bd7A7e0432F6dbe58", "host": "0x3E14dC1b13c488a8d5D310918780c983bD5982E7", @@ -518,19 +288,20 @@ "cfaV1": "0x6EeE6060f715257b970700bc2656De21dEdF074C", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xB0aABBA4B2783A72C52956CDEF62d438ecA2d7a1", + "gdaV1": "0x961dd5A052741B49B6CBf6759591f9D8576fCFb0", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x2C90719f25B10Fc5646c82DA3240C76Fa5BcCF34", - "constantOutflowNFT": "0x554e2bbaCF43FD87417b7201A9F1649a3ED89d68", - "constantInflowNFT": "0x55909bB8cd8276887Aae35118d60b19755201c68", - "superfluidLoader": "0xA3d2A6Db274722e802AC025d667041ecAb094FE7", + "superfluidLoader": "0x444A48dA32649Ed03eeC9B9cD416748262c320E6", "toga": "0x6AEAeE5Fd4D05A741723D752D30EE4D72690A8f7", - "batchLiquidator": "0xA6Cdb472e7E22Bf30ae6fB752E4a13eBF3c12165", + "batchLiquidator": "0xA7afDc46999076C295cfC6812dd73d103cF64e19", "flowScheduler": "0x55F7758dd99d5e185f4CC08d4Ad95B71f598264D", "vestingScheduler": "0xcFE6382B33F2AdaFbE46e6A26A88E0182ae32b0c", "autowrap": { "manager": "0x2581c27E7f6D6AF452E63fCe884EDE3EDd716b32", "wrapStrategy": "0xb4afa36BAd8c76976Dc77a21c9Ad711EF720eE4b" }, - "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630" + "existentialNFTCloneFactory": "0x497aa106Da00BFa8f8BC266EF0793131930Fa630", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 11650500, "logsQueryRange": 10000, @@ -538,20 +309,19 @@ "subgraphV1": { "cliName": "matic", "name": "protocol-v1-matic", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/matic/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-polygon-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-polygon-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/polygon-mainnet/auto-wrap" }, "publicRPCs": [ "https://polygon-rpc.com", @@ -570,6 +340,7 @@ "humanReadableName": "Optimism", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x4ac8bD1bDaE47beeF2D1c6Aa62229509b962Aa0d", + "duneName": "optimism", "contractsV1": { "resolver": "0x743B5f46BC86caF41bE4956d9275721E0531B186", "host": "0x567c4B141ED61923967cA25Ef4906C8781069a10", @@ -577,19 +348,21 @@ "cfaV1": "0x204C6f131bb7F258b2Ea1593f5309911d8E458eD", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xc4ce5118C3B20950ee288f086cb7FC166d222D4c", + "gdaV1": "0x68Ae17fa7a31b86F306c383277552fd4813b0d35", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8276469A443D5C6B7146BED45e2abCaD3B6adad9", - "constantOutflowNFT": "0xFb2b126660BE2fdEBa254b1F6e4348644E8482e7", - "constantInflowNFT": "0x0C6D90a98426bfD572a5c5Be572a7f6Bd1C5ED76", - "superfluidLoader": "0x8E310ce29Ab7Fa2878944A65BB0eaF97B1853d40", + "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xA3c8502187fD7a7118eAD59dc811281448946C8f", - "batchLiquidator": "0x36Df169DBf5CE3c6f58D46f0addeF58F01381232", + "batchLiquidator": "0x84956C84c33c38AcE22C9324F1f92028AF2215ce", "flowScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "vestingScheduler": "0x65377d4dfE9c01639A41952B5083D58964782892", + "vestingSchedulerV2": "0xe567b32C10B0dB72d9490eB1B9A409C5ADed192C", "autowrap": { "manager": "0x1fA76f2Cd0C3fe6c399A80111408d9C42C0CAC23", "wrapStrategy": "0x0Cf060a501c0040e9CCC708eFE94079F501c6Bb4" }, - "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6" + "existentialNFTCloneFactory": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 4300000, "logsQueryRange": 50000, @@ -597,19 +370,19 @@ "subgraphV1": { "cliName": "optimism", "name": "protocol-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-optimism-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-optimism-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/auto-wrap" }, "publicRPCs": [ "https://mainnet.optimism.io", @@ -628,6 +401,7 @@ "humanReadableName": "Arbitrum One", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0xe6C8d111337D0052b9D88BF5d7D55B7f8385ACd3", + "duneName": "arbitrum", "contractsV1": { "resolver": "0x609b9d9d6Ee9C3200745A79B9d3398DBd63d509F", "host": "0xCf8Acb4eF033efF16E8080aed4c7D5B9285D2192", @@ -635,19 +409,20 @@ "cfaV1": "0x731FdBB12944973B500518aea61942381d7e240D", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x2319C7e07EB063340D2a0E36709B0D65fda75986", + "gdaV1": "0x1e299701792a2aF01408B122419d65Fd2dF0Ba02", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x1C21Ead77fd45C84a4c916Db7A6635D0C6FF09D6", - "constantOutflowNFT": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", - "constantInflowNFT": "0x0043d7c85C8b96a49A72A92C0B48CdC4720437d7", - "superfluidLoader": "0xB99cA401e10D277345BcFb281AC148a2e16Db466", + "superfluidLoader": "0xe8B40071df98bBEe23833905AFcF7b28fC7Ca3cb", "toga": "0xFC63B7C762B10670Eda15cF3ca3970bCDB28C9eF", - "batchLiquidator": "0x6C66e5c5D201A753ff497F2e9eC5D545631854d0", + "batchLiquidator": "0x9224413b9177E6c1D5721B4a4D1D00eC84B07Ce7", "flowScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "vestingScheduler": "0x55c8fc400833eEa791087cF343Ff2409A39DeBcC", "autowrap": { "manager": "0xf01825eAFAe5CD1Dab5593EFAF218efC8968D272", "wrapStrategy": "0x342076aA957B0ec8bC1d3893af719b288eA31e61" }, - "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d" + "existentialNFTCloneFactory": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 7600000, "logsQueryRange": 50000, @@ -655,19 +430,19 @@ "subgraphV1": { "cliName": "arbitrum-one", "name": "protocol-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-arbitrum-one", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-arbitrum-one" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/arbitrum-one/auto-wrap" }, "publicRPCs": [ "https://arb1.arbitrum.io/rpc", @@ -686,6 +461,7 @@ "humanReadableName": "Avalanche C", "nativeTokenSymbol": "AVAX", "nativeTokenWrapper": "0xBE916845D8678b5d2F7aD79525A62D7c08ABba7e", + "duneName": "avalanche_c", "contractsV1": { "resolver": "0x24a3F04F70B7f07B9673EadD3e146391BcfEa5c1", "host": "0x60377C7016E4cdB03C87EF474896C11cB560752C", @@ -693,19 +469,20 @@ "cfaV1": "0x6946c5B38Ffea373b0a2340b4AEf0De8F6782e58", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x1fA9fFe8Db73F701454B195151Db4Abb18423cf2", + "gdaV1": "0xA7b197cD5b0cEF6d62c4A0a851E3581f5E62e4D2", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x464AADdBB2B80f3Cb666522EB7381bE610F638b4", - "constantOutflowNFT": "0x4247bA6C3658Fa5C0F523BAcea8D0b97aF1a175e", - "constantInflowNFT": "0x82b9D8A91A5b333b5A6e78439551ea0E7da153E3", - "superfluidLoader": "0x2601E69a2D16C8Ccc8aEe8cE9F59d24a59986B9E", + "superfluidLoader": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "toga": "0x3D9A67D5ec1E72CEcA8157e028855056786b6159", - "batchLiquidator": "0xdddaD64A9Fe7709A729C4a5428617e369278e0b6", + "batchLiquidator": "0x3b387638a5d33aE8772715642A21345f23Af824c", "flowScheduler": "0xF7AfF590E9DE493D7ACb421Fca7f1E35C1ad4Ce5", "vestingScheduler": "0x3fA8B653F9abf91428800C0ba0F8D145a71F97A1", "autowrap": { "manager": "0x8082e58681350876aFe8f52d3Bf8672034A03Db0", "wrapStrategy": "0x51FBAbD31A615E14b1bC12E9d887f60997264a4E" }, - "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7" + "existentialNFTCloneFactory": "0x94aE5f52E401A5766b0877d2f030cFb9C3792BD7", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 14700000, "logsQueryRange": 50000, @@ -713,19 +490,19 @@ "subgraphV1": { "cliName": "avalanche", "name": "protocol-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-avalanche-c", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-avalanche-c" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/avalanche-c/auto-wrap" }, "publicRPCs": [ "https://api.avax.network/ext/bc/C/rpc", @@ -744,6 +521,7 @@ "humanReadableName": "BNB Smart Chain", "nativeTokenSymbol": "BNB", "nativeTokenWrapper": "0x529A4116F160c833c61311569D6B33dFF41fD657", + "duneName": "bnb", "contractsV1": { "resolver": "0x69604aA4e9e8BF44A73C680997205Edb03A92E41", "host": "0xd1e2cFb6441680002Eb7A44223160aB9B67d7E6E", @@ -751,19 +529,20 @@ "cfaV1": "0x49c38108870e74Cb9420C0991a85D3edd6363F75", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x594ed9Cd773584B645aC1F5B11020d3b32cDF07d", + "gdaV1": "0x3bbFA4C406719424C7f66CD97A8Fe27Af383d3e2", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x8bde47397301F0Cd31b9000032fD517a39c946Eb", - "constantOutflowNFT": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", - "constantInflowNFT": "0xbF7BCcE8D60A9C3F6bFaEc9346Aa85B9f781a4e9", - "superfluidLoader": "0x3C26e5bEbc68EaAf4efcd88F8E5A6Aeb77b65579", + "superfluidLoader": "0xF353978890204756fc5fa6dfbD16a91eac9E6f4d", "toga": "0xFCD84210f5d51Cd40a30443d44d6A5500d5D10dF", - "batchLiquidator": "0x5487d078CA8933e83d91d5E7AFBe3A7bfC3412d6", + "batchLiquidator": "0x27636F8E129cdd4ccA0F30E2b4C116DDaC773bE5", "flowScheduler": "0x2f9e2A2A59405682d4F86779275CF5525AD7eC2B", "vestingScheduler": "0x9B91c27f78376383003C6A12Ad12B341d016C5b9", "autowrap": { "manager": "0x2AcdD61ac1EFFe1535109449c31889bdE8d7f325", "wrapStrategy": "0x9e308cb079ae130790F604b1030cDf386670f199" }, - "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9" + "existentialNFTCloneFactory": "0xe9F27eb8cdAaA0B01a4034e109496C3026b01bd9", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 18800000, "logsQueryRange": 5000, @@ -771,19 +550,19 @@ "subgraphV1": { "cliName": "bsc", "name": "protocol-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-bsc-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-bsc-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/bsc-mainnet/auto-wrap" }, "publicRPCs": [ "https://bscrpc.com", @@ -802,6 +581,7 @@ "humanReadableName": "Ethereum", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0xC22BeA0Be9872d8B7B3933CEc70Ece4D53A900da", + "duneName": "ethereum", "contractsV1": { "resolver": "0xeE4cD028f5fdaAdeA99f8fc38e8bA8A57c90Be53", "host": "0x4E583d9390082B65Bef884b629DFA426114CED6d", @@ -809,16 +589,19 @@ "cfaV1": "0x2844c1BBdA121E9E43105630b9C8310e5c72744b", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0xbCF9cfA8Da20B591790dF27DE65C1254Bf91563d", + "gdaV1": "0xAAdBB3Eee3Bd080f5353d86DdF1916aCA3fAC842", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x0422689cc4087b6B7280e0a7e7F655200ec86Ae1", - "superfluidLoader": "0x9775EEBdfF8AE845e7Ad3d1D04B85e6c6d284aCB", + "superfluidLoader": "0xcb05535bd212eCFC4B7b9db81d6C2C768b726776", "toga": "0x8B5a2CF69a56d7F8Fa027edcA23594cdDF544dDc", - "batchLiquidator": "0x554c06487bEc8c890A0345eb05a5292C1b1017Bd", + "batchLiquidator": "0x42B709822F18595443c308c1BE5E63CbFEf06481", "flowScheduler": "0xAA0cD305eD020137E302CeCede7b18c0A05aCCDA", "vestingScheduler": "0x39D5cBBa9adEBc25085a3918d36D5325546C001B", "autowrap": { "manager": "0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1", "wrapStrategy": "0x1D65c6d3AD39d454Ea8F682c49aE7744706eA96d" - } + }, + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 15870000, "logsQueryRange": 10000, @@ -826,20 +609,19 @@ "subgraphV1": { "cliName": "mainnet", "name": "protocol-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-eth-mainnet", - "satsumaEndpoint": "https://subgraph.satsuma-prod.com/c5br3jaVlJI6/superfluid/eth-mainnet/api" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/protocol-v1" }, "subgraphVesting": { "name": "vesting-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/vesting-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/vesting-scheduler" }, "subgraphFlowScheduler": { "name": "scheduling-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/scheduling-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/flow-scheduler" }, "subgraphAutoWrap": { "name": "auto-wrap-v1-eth-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/auto-wrap-v1-eth-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/eth-mainnet/auto-wrap" }, "publicRPCs": [ "https://cloudflare-eth.com", @@ -858,6 +640,7 @@ "humanReadableName": "Celo", "nativeTokenSymbol": "CELO", "nativeTokenWrapper": "0x671425Ae1f272Bc6F79beC3ed5C4b00e9c628240", + "duneName": "celo", "contractsV1": { "resolver": "0x05eE721BD4D803d6d477Aa7607395452B65373FF", "host": "0xA4Ff07cF81C02CFD356184879D953970cA957585", @@ -865,13 +648,14 @@ "cfaV1": "0x9d369e78e1a682cE0F8d9aD849BeA4FE1c3bD3Ad", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x26747Fe93fAC8bF28E1e24A558a2bC7E4d9846cA", + "gdaV1": "0x308b7405272d11494716e30C6E972DbF6fb89555", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0x36be86dEe6BC726Ed0Cbd170ccD2F21760BC73D9", - "constantOutflowNFT": "0xbe49ac1EadAc65dccf204D4Df81d650B50122aB2", - "constantInflowNFT": "0x0FB7694c990CF19001127391Dbe53924dd7a61c7", - "superfluidLoader": "0xAd6e6849d8eEa62AF9271808afb726610fB451a6", + "superfluidLoader": "0xF0d7d1D47109bA426B9D8A3Cde1941327af1eea3", "toga": "0x9bCa3a623e7b2e248510d88B2894F54898d88F91", - "batchLiquidator": "0x21d4E9fbB9DB742E6ef4f29d189a7C18B0b59136", - "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227" + "batchLiquidator": "0xCb0Ff4D0cA186f0Fc0301258066Fe3fA258417a6", + "existentialNFTCloneFactory": "0x051e766e2d8dc65ae2bFCF084A50AD0447634227", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 16393000, "logsQueryRange": 20000, @@ -879,7 +663,7 @@ "subgraphV1": { "cliName": "celo", "name": "protocol-v1-celo-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-celo-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/celo-mainnet/protocol-v1" }, "publicRPCs": ["https://forno.celo.org", "https://rpc.ankr.com/celo"], "coinGeckoId": "celo" @@ -895,6 +679,7 @@ "humanReadableName": "Base", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x46fd5cfB4c12D87acD3a13e92BAa53240C661D93", + "duneName": "base", "contractsV1": { "resolver": "0x6a214c324553F96F04eFBDd66908685525Da0E0d", "host": "0x4C073B3baB6d8826b8C5b229f3cfdC1eC6E47E74", @@ -902,20 +687,40 @@ "cfaV1": "0x19ba78B9cDB05A877718841c574325fdB53601bb", "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", "idaV1": "0x66DF3f8e14CF870361378d8F61356D15d9F425C4", + "gdaV1": "0xfE6c87BE05feDB2059d2EC41bA0A09826C9FD7aa", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superTokenFactory": "0xe20B9a38E0c96F61d1bA6b42a61512D56Fea1Eb3", - "constantOutflowNFT": "0xD3C78bb5a16Ea4ab584844eeb8F90Ac710c16355", - "constantInflowNFT": "0x2d51962A9EE4D3C2819EF585eab7412c2a2C31Ac", - "superfluidLoader": "0x6B24A6F34ab96267Fef9F8AC9fe6CC104C228127", + "superfluidLoader": "0x9F9EEd9Bbc38E9e0514fD9dFcc0Bca9869A9c534", "toga": "0xA87F76e99f6C8Ff8996d14f550ceF47f193D9A09", - "batchLiquidator": "0x889ebeCaD5F8C34Fd96023456d0fC5cE54eb74Cb", - "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC" + "batchLiquidator": "0x6b008BAc0e5846cB5d9Ca02ca0e801fCbF88B6f9", + "flowScheduler": "0xC72CEd15204d02183c83fEbb918b183E400811Ee", + "vestingScheduler": "0xDF92D0E6Bcb9385FDe99aD21Ff5e47Fb47E3c6b2", + "autowrap": { + "manager": "0x5D0acD0864Ad07ba4E1E0474AE69Da87482e14A9", + "wrapStrategy": "0xB29005319B0caB24cF6D4d24e8420E54BB29Cb0d" + }, + "existentialNFTCloneFactory": "0x642332562BC60a4Bd9681E7bb1588f7456A497aC", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 1000000, "logsQueryRange": 20000, "explorer": "https://basescan.org", "subgraphV1": { "cliName": "base", - "name": "protocol-v1-base-mainnet" + "name": "protocol-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/protocol-v1" + }, + "subgraphVesting": { + "name": "vesting-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/vesting-scheduler" + }, + "subgraphFlowScheduler": { + "name": "scheduling-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/flow-scheduler" + }, + "subgraphAutoWrap": { + "name": "auto-wrap-v1-base-mainnet", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/base-mainnet/auto-wrap" }, "publicRPCs": ["https://developer-access-mainnet.base.org"], "coinGeckoId": "base" @@ -931,17 +736,21 @@ "humanReadableName": "Scroll", "nativeTokenSymbol": "ETH", "nativeTokenWrapper": "0x483C1716b6133cdA01237ebBF19c5a92898204B7", + "duneName": "scroll", "contractsV1": { "resolver": "0xb25a19c0e7d10c8D37E5b63Ed3213b67f7ebfF80", "host": "0x0F86a21F6216c061B222c224e315d9FC34520bb7", - "governance": "0x43A636A202203e52ea99b6515a191b888ccc57AC", - "cfaV1": "0x9d146055738BD4D258c99927A3188C94dCf4cd18", - "idaV1": "0xC537033813fA474e5f9588114ef2EfBB0564e080", - "gdaV1": "0x2c6dc2f45c9a15512BcF219867eAB804b5737c6a", - "constantOutflowNFT": "0x0de05fe0fF8F5eA9475CA8425e2D05Dd38ccED84", - "constantInflowNFT": "0x8c24Fc82c8fDd763F08E654212fc27e577EbD934", + "governance": "0xC2C9a709A6744816b3712D520BD314fe610AEa33", + "cfaV1": "0xB3bcD6da1eeB6c97258B3806A853A6dcD3B6C00c", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0x4112557F0F228A18654d3C39599421DE9F61144d", + "gdaV1": "0x97a9f293d7eD13f3fbD499cE684Ed4F103295a28", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", "superfluidLoader": "0x7613030429E95cDFC76FE70f9573037068B51815", + "toga": "0x1bF9D75d50fD828a93f69ECB06f2B85767792CEB", + "batchLiquidator": "0x2eaa49BeB4Aa4fcC709DC14c0FA0fF1B292077b5", "superTokenFactory": "0xacFBED2bC9344C158DD3dC229b84Bd7220e7c673", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" }, "startBlockV1": 2575000, "logsQueryRange": 50000, @@ -949,8 +758,44 @@ "subgraphV1": { "cliName": "scroll", "name": "protocol-v1-scroll-mainnet", - "hostedEndpoint": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-scroll-mainnet" + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/scroll-mainnet/protocol-v1" }, "publicRPCs": ["https://rpc.scroll.io"] + }, + { + "name": "degenchain", + "isTestnet": false, + "networkId": 666666666, + "chainId": 666666666, + "sfId": 10, + "shortName": "degen", + "uppercaseName": "DEGENCHAIN", + "humanReadableName": "Degen Chain", + "nativeTokenSymbol": "DEGEN", + "nativeTokenWrapper": "0xda58FA9bfc3D3960df33ddD8D4d762Cf8Fa6F7ad", + "contractsV1": { + "resolver": "0x649FB24ed0B983f88500F3C37682714aB96D73c2", + "host": "0xc1314EdcD7e478C831a7a24169F7dEADB2646eD2", + "governance": "0x4D420e94328bF1AEA1b525FDE9e498ADBe60f9B1", + "cfaV1": "0x82cc052d1b17aC554a22A88D5876B56c6b51e95c", + "cfaV1Forwarder": "0xcfA132E353cB4E398080B9700609bb008eceB125", + "idaV1": "0xb19CE3e7DA9FbAf9De2526BD662A82f26421A53E", + "gdaV1": "0x210a01ad187003603B2287F78579ec103Eb70D9B", + "gdaV1Forwarder": "0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", + "superfluidLoader": "0x5fb676d66eAb8E0c22Ae24C5c10eD7E4A6397c1C", + "toga": "0x38ed5512Ac11926bB697F4CF4eE0DD04358E2E7e", + "batchLiquidator": "0x7BCE8e8401dc98E3Da26F1D701c3C2168b8e466c", + "superTokenFactory": "0x184D999ea60e9b16fE4cCC1f756422114E9B663f", + "macroForwarder": "0xfD01285b9435bc45C243E5e7F978E288B2912de6" + }, + "startBlockV1": 6500000, + "logsQueryRange": 50000, + "explorer": "https://explorer.degen.tips/", + "subgraphV1": { + "cliName": "degen", + "name": "protocol-v1-degenchain", + "hostedEndpoint": "https://subgraph-endpoints.superfluid.dev/degenchain/protocol-v1" + }, + "publicRPCs": ["https://rpc.degen.tips"] } ] diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 4cd6ed2ebd..4333ce8a3b 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -1,32 +1,28 @@ { - "name": "@superfluid-finance/metadata", - "version": "1.1.23", - "description": "Superfluid Metadata", - "main": "main/index.cjs", - "module": "module/index.js", - "type": "module", - "types": "module/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/metadata" - }, - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "scripts": { - "build": "./build.sh && echo '@superfluid-finance/metadata build successfully'", - "bump-version-to": "./bump-version-to.sh $@", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", - "pre-commit:check": "./tasks/compare-committed-against-build.sh", - "lint": "run-s lint:*", - "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "fix": "run-s fix:*", - "fix:eslint": "yarn lint:js-eslint --fix", - "check-updates": "ncu --target minor" - }, - "author": "Superfluid", - "license": "MIT", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/metadata#readme" + "name": "@superfluid-finance/metadata", + "description": "Superfluid Metadata", + "version": "1.5.0", + "author": "Superfluid", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/metadata#readme", + "license": "MIT", + "main": "main/index.cjs", + "module": "module/index.js", + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/metadata" + }, + "scripts": { + "build": "./build.sh && echo '@superfluid-finance/metadata build successfully'", + "bump-version-to": "./bump-version-to.sh $@", + "lint": "run-s lint:*", + "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", + "lint:consistency": "./tasks/compare-committed-against-build.sh", + "fix": "run-s fix:*", + "fix:eslint": "yarn lint:js-eslint --fix", + "check-updates": "ncu --target minor" + }, + "type": "module", + "types": "module/index.d.ts" } diff --git a/packages/metadata/tasks/compare-committed-against-build.sh b/packages/metadata/tasks/compare-committed-against-build.sh index 2048bde312..8b52b38376 100755 --- a/packages/metadata/tasks/compare-committed-against-build.sh +++ b/packages/metadata/tasks/compare-committed-against-build.sh @@ -10,7 +10,10 @@ function hashFiles() { sha256sum "$1" | cut -d ' ' -f 1 } -# Hash the commited files +# first of all, ensure that we have valid json +jq empty networks.json + +# Hash the committed files main_list_committed_hash=$(hashFiles ./main/networks/list.cjs) module_list_committed_hash=$(hashFiles ./module/networks/list.js) diff --git a/packages/sdk-core/.eslintrc.json b/packages/sdk-core/.eslintrc.json index 23c20004f9..600135a0a2 100644 --- a/packages/sdk-core/.eslintrc.json +++ b/packages/sdk-core/.eslintrc.json @@ -33,6 +33,7 @@ "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-object-type": "off", "eslint-comments/disable-enable-pair": [ "error", { diff --git a/packages/sdk-core/CHANGELOG.md b/packages/sdk-core/CHANGELOG.md index f6b7afaffa..256e301e42 100644 --- a/packages/sdk-core/CHANGELOG.md +++ b/packages/sdk-core/CHANGELOG.md @@ -6,8 +6,36 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +### Added +### Changed +### Fixed + +## [0.8.0] - 2024-08-01 + +### Breaking + +- Removed all FlowNFT related functionality, because deprecated from the protocol + +## [0.7.1] - 2024-06-19 + +### Updated + +- Metadata changes for recently added networks + +## [0.7.0] - 2023-05-01 + +### Added + +- Added Degen chain support +- Added `getTotalAmountReceivedByMember` + ### Changed + - Map the name from subgraph to an unknown event, instead of "\_Unknown". +- Don't lock metadata version to a specific version, use semver (^). +- Allow infinite pagination with 'skip: 0' value (previously had to be undefined) +- Add subgraphs queries for Pools, PoolMembers and PoolDistributors +- Map `isNFTApproval` and `isNFTTransfer` onto events ## [0.6.12] - 2023-10-23 diff --git a/packages/sdk-core/contracts/NoGetUnderlyingToken.sol b/packages/sdk-core/contracts/NoGetUnderlyingToken.sol index cad87d06a9..a8d58ede86 100644 --- a/packages/sdk-core/contracts/NoGetUnderlyingToken.sol +++ b/packages/sdk-core/contracts/NoGetUnderlyingToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.23; contract NoGetUnderlyingToken { diff --git a/packages/sdk-core/contracts/SuperAppTester.sol b/packages/sdk-core/contracts/SuperAppTester.sol index cac4fd65c6..32b46a0037 100644 --- a/packages/sdk-core/contracts/SuperAppTester.sol +++ b/packages/sdk-core/contracts/SuperAppTester.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ISuperfluid, diff --git a/packages/sdk-core/default.nix b/packages/sdk-core/default.nix new file mode 100644 index 0000000000..2a218b68d1 --- /dev/null +++ b/packages/sdk-core/default.nix @@ -0,0 +1,29 @@ +{ + halfBoardModule = { + dependencies = [ + ../.. + ../ethereum-contracts + ]; + outputs = [ + "dist" + "coverage" + ]; + includedFiles = [ + # source code + ./tasks + ./src + ./test + ./previous-versions-testing + ./scripts + # configurations + ./package.json + ./hardhat.config.ts + ./subgraph-codegen.yml + ./tsconfig.json + ./tsconfig.module.json + ./tsconfig.test.json + ./tsconfig.typechain.json + ./typedoc.js + ]; + }; +} diff --git a/packages/sdk-core/hardhat.config.ts b/packages/sdk-core/hardhat.config.ts index 252ac6e5db..4b83a26a24 100644 --- a/packages/sdk-core/hardhat.config.ts +++ b/packages/sdk-core/hardhat.config.ts @@ -38,7 +38,7 @@ subtask(TASK_COMPILE_SOLIDITY_GET_SOLC_BUILD).setAction( */ const config: HardhatUserConfig = { solidity: { - version: "0.8.19", + version: "0.8.23", settings: { optimizer: { enabled: true, diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index c5d74472a4..981a24703b 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -1,17 +1,28 @@ { "name": "@superfluid-finance/sdk-core", - "version": "0.6.13", "description": "SDK Core for building with Superfluid Protocol", - "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/sdk-core" + "version": "0.8.0", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "dependencies": { + "@superfluid-finance/ethereum-contracts": "1.11.0", + "@superfluid-finance/metadata": "^1.5.0", + "browserify": "17.0.0", + "graphql-request": "6.1.0", + "lodash": "4.17.21", + "tsify": "5.0.4" + }, + "devDependencies": { + "@graphql-codegen/cli": "^5.0.2", + "@graphql-codegen/near-operation-file-preset": "^3.0.0", + "@graphql-typed-document-node/core": "^3.2.0", + "ajv": "^8.17.1", + "ethers": "^5.7.2", + "get-graphql-schema": "^2.1.2", + "mocha": "^10.7.3" + }, + "engines": { + "node": ">=12" }, - "license": "MIT", - "main": "dist/main/index.js", - "module": "dist/module/index.js", - "types": "dist/module/index.d.ts", "files": [ "dist/main", "dist/module", @@ -20,6 +31,19 @@ "LICENSE", "README.md" ], + "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme", + "license": "MIT", + "main": "dist/main/index.js", + "module": "dist/module/index.js", + "peerDependencies": { + "ethers": "^5.7.2", + "graphql": "^16.0.0" + }, + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/sdk-core" + }, "scripts": { "build": "yarn generate && rm -rf dist && run-s build:*", "build:typechain-types": "./tasks/build-types.sh", @@ -31,6 +55,7 @@ "pretest": "yarn testenv:start", "test": "hardhat test --tsconfig \"tsconfig.test.json\"", "dev": "nodemon -e ts -x yarn test", + "clean": "rm -rf node_modules; rm -rf dist; rm -rf src/typechain-types; rm -rf src/typechain; rm -rf src/abi; find . -type f -name '*.generated.ts' -exec rm {} +", "test-coverage": "nyc --reporter=html --reporter=lcov --reporter=json yarn test", "posttest": "yarn testenv:stop", "check-updates": "ncu --target minor --dep prod,dev", @@ -39,51 +64,17 @@ "lint:eslint": "eslint src --ext .ts", "fix": "run-s fix:*", "fix:eslint": "yarn lint:eslint --fix", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s lint:*;else true;fi", "set-default-subgraph-release-tag": "node scripts/setDefaultSubgraphReleaseTag.js", "start-node": "hardhat node", "generate": "run-s generate:*", "generate:ajv-validations": "ts-node scripts/ajv.ts", "generate:graphql-types": "graphql-codegen --config subgraph-codegen.yml", - "generate-graphql-schema": "yarn generate-graphql-schema:v1", - "generate-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql", - "generate-graphql-schema:v1": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic > src/subgraph/schema.graphql", - "generate-graphql-schema:dev": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-goerli > src/subgraph/schema.graphql", - "generate-graphql-schema:feature": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-goerli > src/subgraph/schema.graphql", + "get-graphql-schema": "yarn get-graphql-schema:v1", + "get-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql", + "get-graphql-schema:v1": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1 > src/subgraph/schema.graphql", + "get-graphql-schema:dev": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1 > src/subgraph/schema.graphql", + "get-graphql-schema:custom-url": "get-graphql-schema $1 > src/subgraph/schema.graphql", "cloc": "sh tasks/cloc.sh" }, - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "dependencies": { - "@superfluid-finance/ethereum-contracts": "1.9.0", - "@superfluid-finance/metadata": "1.1.23", - "browserify": "^17.0.0", - "graphql-request": "^6.1.0", - "lodash": "^4.17.21", - "tsify": "^5.0.4" - }, - "devDependencies": { - "@graphql-codegen/cli": "^5.0.0", - "@graphql-codegen/introspection": "^4.0.0", - "@graphql-codegen/near-operation-file-preset": "^2.5.0", - "@graphql-codegen/typed-document-node": "^5.0.1", - "@graphql-codegen/typescript": "^4.0.1", - "@graphql-codegen/typescript-operations": "^4.0.1", - "@graphql-typed-document-node/core": "^3.2.0", - "ajv": "^8.12.0", - "ethers": "^5.7.2", - "get-graphql-schema": "^2.1.2", - "mocha": "^10.2.0" - }, - "peerDependencies": { - "ethers": "^5.7.2", - "graphql": "^16.0.0" - }, - "resolutions": { - "graphql": "^16.0.0" - }, - "engines": { - "node": ">=12" - } + "types": "dist/module/index.d.ts" } diff --git a/packages/sdk-core/previous-versions-testing/package.json b/packages/sdk-core/previous-versions-testing/package.json index 4bf0329c11..7bb012d58e 100644 --- a/packages/sdk-core/previous-versions-testing/package.json +++ b/packages/sdk-core/previous-versions-testing/package.json @@ -6,6 +6,9 @@ "run-query-tests": "npx hardhat test ./queryTests.ts" }, "devDependencies": { - "@superfluid-finance/sdk-core": "0.4.3" + "@superfluid-finance/sdk-core": "0.8.0" + }, + "resolutions": { + "@superfluid-finance/metadata": ">1.2.0" } } diff --git a/packages/sdk-core/previous-versions-testing/queryTests.ts b/packages/sdk-core/previous-versions-testing/queryTests.ts index 2fa783e905..ce69cedae7 100644 --- a/packages/sdk-core/previous-versions-testing/queryTests.ts +++ b/packages/sdk-core/previous-versions-testing/queryTests.ts @@ -5,21 +5,26 @@ import metadata from "@superfluid-finance/metadata"; /** * We only use matic network endpoints for v1 release tests - * otherwise, we use goerli + * otherwise, we use avalanche fuji * @returns chainId */ export const getChainId = () => { // null coalesce, but this should NEVER return null for either return process.env.SUBGRAPH_RELEASE_TAG == "v1" ? metadata.getNetworkByShortName("matic")?.chainId ?? 0 - : metadata.getNetworkByShortName("goerli")?.chainId ?? 0; + : metadata.getNetworkByShortName("fuji")?.chainId ?? 0; }; export const testQueryClassFunctions = async (query: Query) => { + console.log("query listAllSuperTokens..."); await query.listAllSuperTokens({}, { take: 10 }); + console.log("query listIndexes..."); await query.listIndexes({}, { take: 10 }); + console.log("query listIndexSubscriptions..."); await query.listIndexSubscriptions({}, { take: 10 }); + console.log("query listStreams..."); await query.listStreams({}, { take: 10 }); + console.log("query listUserInteractedSuperTokens..."); await query.listUserInteractedSuperTokens({}, { take: 10 }); }; diff --git a/packages/sdk-core/previous-versions-testing/yarn.lock b/packages/sdk-core/previous-versions-testing/yarn.lock index b927199b2a..4c650c964e 100644 --- a/packages/sdk-core/previous-versions-testing/yarn.lock +++ b/packages/sdk-core/previous-versions-testing/yarn.lock @@ -2,345 +2,352 @@ # yarn lockfile v1 -"@ethersproject/abi@5.6.2", "@ethersproject/abi@^5.6.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.2.tgz#f2956f2ac724cd720e581759d9e3840cd9744818" - integrity sha512-40Ixjhy+YzFtnvzIqFU13FW9hd1gMoLa3cJfSDnfnL4o8EnEG1qLiV8sNJo3sHYi9UYMfFeRuZ7kv5+vhzU7gQ== - dependencies: - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/abstract-provider@5.6.0", "@ethersproject/abstract-provider@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz#0c4ac7054650dbd9c476cf5907f588bbb6ef3061" - integrity sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/web" "^5.6.0" - -"@ethersproject/abstract-signer@5.6.1", "@ethersproject/abstract-signer@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.1.tgz#54df786bdf1aabe20d0ed508ec05e0aa2d06674f" - integrity sha512-xhSLo6y0nGJS7NxfvOSzCaWKvWb1TLT7dQ0nnpHZrDnC67xfnWm9NXflTMFPUXXMtjr33CdV0kWDEmnbrQZ74Q== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - -"@ethersproject/address@5.6.0", "@ethersproject/address@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.0.tgz#13c49836d73e7885fc148ad633afad729da25012" - integrity sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - -"@ethersproject/base64@5.6.0", "@ethersproject/base64@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.0.tgz#a12c4da2a6fb86d88563216b0282308fc15907c9" - integrity sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw== - dependencies: - "@ethersproject/bytes" "^5.6.0" - -"@ethersproject/basex@5.6.0", "@ethersproject/basex@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.0.tgz#9ea7209bf0a1c3ddc2a90f180c3a7f0d7d2e8a69" - integrity sha512-qN4T+hQd/Md32MoJpc69rOwLYRUXwjTlhHDIeUkUmiN/JyWkkLLMoG0TqvSQKNqZOMgN5stbUYN6ILC+eD7MEQ== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - -"@ethersproject/bignumber@5.6.1", "@ethersproject/bignumber@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.1.tgz#d5e0da518eb82ab8d08ca9db501888bbf5f0c8fb" - integrity sha512-UtMeZ3GaUuF9sx2u9nPZiPP3ULcAFmXyvynR7oHl/tPrM+vldZh7ocMsoa1PqKYGnQnqUZJoqxZnGN6J0qdipA== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - bn.js "^4.11.9" +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" -"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" - integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/constants@5.6.0", "@ethersproject/constants@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.0.tgz#55e3eb0918584d3acc0688e9958b0cedef297088" - integrity sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - -"@ethersproject/contracts@5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.1.tgz#c0eba3f8a2226456f92251a547344fd0593281d2" - integrity sha512-0fpBBDoPqJMsutE6sNjg6pvCJaIcl7tliMQTMRcoUWDACfjO68CpKOJBlsEhEhmzdnu/41KbrfAeg+sB3y35MQ== - dependencies: - "@ethersproject/abi" "^5.6.0" - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - -"@ethersproject/hash@5.6.0", "@ethersproject/hash@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.0.tgz#d24446a5263e02492f9808baa99b6e2b4c3429a2" - integrity sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/hdnode@5.6.1", "@ethersproject/hdnode@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.1.tgz#37fa1eb91f6e20ca39cc5fcb7acd3da263d85dab" - integrity sha512-6IuYDmbH5Bv/WH/A2cUd0FjNr4qTLAvyHAECiFZhNZp69pPvU7qIDwJ7CU7VAkwm4IVBzqdYy9mpMAGhQdwCDA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/basex" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/wordlists" "^5.6.0" - -"@ethersproject/json-wallets@5.6.0", "@ethersproject/json-wallets@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.0.tgz#4c2fc27f17e36c583e7a252fb938bc46f98891e5" - integrity sha512-fmh86jViB9r0ibWXTQipxpAGMiuxoqUf78oqJDlCAJXgnJF024hOOX7qVgqsjtbeoxmcLwpPsXNU0WEe/16qPQ== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hdnode" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.6.0", "@ethersproject/keccak256@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.0.tgz#fea4bb47dbf8f131c2e1774a1cecbfeb9d606459" - integrity sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w== +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@5.6.0", "@ethersproject/logger@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" - integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== - -"@ethersproject/networks@5.6.2", "@ethersproject/networks@^5.6.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.2.tgz#2bacda62102c0b1fcee408315f2bed4f6fbdf336" - integrity sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/pbkdf2@5.6.0", "@ethersproject/pbkdf2@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz#04fcc2d7c6bff88393f5b4237d906a192426685a" - integrity sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - -"@ethersproject/properties@5.6.0", "@ethersproject/properties@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" - integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/providers@5.6.6": - version "5.6.6" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.6.tgz#1967149cb4557d253f8c176a44aabda155f228cd" - integrity sha512-6X6agj3NeQ4tgnvBMCjHK+CjQbz+Qmn20JTxCYZ/uymrgCEOpJtY9zeRxJIDsSi0DPw8xNAxypj95JMCsapUfA== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/basex" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/web" "^5.6.0" +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" bech32 "1.1.4" ws "7.4.6" -"@ethersproject/random@5.6.0", "@ethersproject/random@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.0.tgz#1505d1ab6a250e0ee92f436850fa3314b2cb5ae6" - integrity sha512-si0PLcLjq+NG/XHSZz90asNf+YfKEqJGVdxoEkSukzbnBgC8rydbgbUgBbBGLeHN4kAJwUFEKsu3sCXT93YMsw== +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@5.6.0", "@ethersproject/rlp@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.0.tgz#55a7be01c6f5e64d6e6e7edb6061aa120962a717" - integrity sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g== +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" -"@ethersproject/sha2@5.6.0", "@ethersproject/sha2@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.0.tgz#364c4c11cc753bda36f31f001628706ebadb64d9" - integrity sha512-1tNWCPFLu1n3JM9t4/kytz35DkuF9MxqkGGEHNauEbaARdm2fafnOyw1s0tIQDPKF/7bkP1u3dbrmjpn5CelyA== +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" hash.js "1.1.7" -"@ethersproject/signing-key@5.6.1", "@ethersproject/signing-key@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.1.tgz#31b0a531520616254eb0465b9443e49515c4d457" - integrity sha512-XvqQ20DH0D+bS3qlrrgh+axRMth5kD1xuvqUQUTeezxUTXBOeR6hWz2/C6FBEu39FRytyybIWrYf7YLSAKr1LQ== +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - bn.js "^4.11.9" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.0.tgz#64657362a596bf7f5630bdc921c07dd78df06dc3" - integrity sha512-YwF52vTNd50kjDzqKaoNNbC/r9kMDPq3YzDWmsjFTRBcIF1y4JCQJ8gB30wsTfHbaxgxelI5BfxQSxD/PbJOww== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/strings@5.6.0", "@ethersproject/strings@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.0.tgz#9891b26709153d996bf1303d39a7f4bc047878fd" - integrity sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/transactions@5.6.0", "@ethersproject/transactions@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.0.tgz#4b594d73a868ef6e1529a2f8f94a785e6791ae4e" - integrity sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg== - dependencies: - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - -"@ethersproject/units@5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.0.tgz#e5cbb1906988f5740254a21b9ded6bd51e826d9c" - integrity sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw== - dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/wallet@5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.1.tgz#5df4f75f848ed84ca30fd6ca75d2c66b19c5552b" - integrity sha512-oXWoOslEWtwZiViIMlGVjeKDQz/tI7JF9UkyzN9jaGj8z7sXt2SyFMb0Ev6vSAqjIzrCrNrJ/+MkAhtKnGOfZw== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/hdnode" "^5.6.0" - "@ethersproject/json-wallets" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/wordlists" "^5.6.0" - -"@ethersproject/web@5.6.0", "@ethersproject/web@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.0.tgz#4bf8b3cbc17055027e1a5dd3c357e37474eaaeb8" - integrity sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg== - dependencies: - "@ethersproject/base64" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - -"@ethersproject/wordlists@5.6.0", "@ethersproject/wordlists@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.0.tgz#79e62c5276e091d8575f6930ba01a29218ded032" - integrity sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q== - dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@superfluid-finance/metadata@>1.2.0": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@superfluid-finance/metadata/-/metadata-1.2.4.tgz#b9d55c6bc80c78b8e76215d01196759b889f891d" + integrity sha512-M0OxHuDjwCE0kfHMr0CfXzKvOH7TXCoL8ZaDamVdU6Y1LZzVkwb7UyDNZw+VNG7r8NBlmpDVLYhuKFBBHL6d9w== "@superfluid-finance/sdk-core@0.4.3": version "0.4.3" @@ -387,14 +394,14 @@ aes-js@3.0.0: integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== ajv@^8.11.0: - version "8.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" - integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + version "8.16.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" + integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" + uri-js "^4.4.1" any-promise@^1.3.0: version "1.3.0" @@ -741,11 +748,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: sha.js "^2.4.8" cross-fetch@^3.0.6: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== dependencies: - node-fetch "2.6.7" + node-fetch "^2.6.12" crypto-browserify@^3.0.0: version "3.12.0" @@ -894,40 +901,40 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" ethers@^5.6.2: - version "5.6.6" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.6.tgz#a37aa7e265a484a1b4d2ef91d4d89d6b43808a57" - integrity sha512-2B2ZmSGvRcJpHnFMBk58mkXP50njFipUBCgLK8jUTFbomhVs501cLzyMU6+Vx8YnUDQxywC3qkZvd33xWS+2FA== - dependencies: - "@ethersproject/abi" "5.6.2" - "@ethersproject/abstract-provider" "5.6.0" - "@ethersproject/abstract-signer" "5.6.1" - "@ethersproject/address" "5.6.0" - "@ethersproject/base64" "5.6.0" - "@ethersproject/basex" "5.6.0" - "@ethersproject/bignumber" "5.6.1" - "@ethersproject/bytes" "5.6.1" - "@ethersproject/constants" "5.6.0" - "@ethersproject/contracts" "5.6.1" - "@ethersproject/hash" "5.6.0" - "@ethersproject/hdnode" "5.6.1" - "@ethersproject/json-wallets" "5.6.0" - "@ethersproject/keccak256" "5.6.0" - "@ethersproject/logger" "5.6.0" - "@ethersproject/networks" "5.6.2" - "@ethersproject/pbkdf2" "5.6.0" - "@ethersproject/properties" "5.6.0" - "@ethersproject/providers" "5.6.6" - "@ethersproject/random" "5.6.0" - "@ethersproject/rlp" "5.6.0" - "@ethersproject/sha2" "5.6.0" - "@ethersproject/signing-key" "5.6.1" - "@ethersproject/solidity" "5.6.0" - "@ethersproject/strings" "5.6.0" - "@ethersproject/transactions" "5.6.0" - "@ethersproject/units" "5.6.0" - "@ethersproject/wallet" "5.6.1" - "@ethersproject/web" "5.6.0" - "@ethersproject/wordlists" "5.6.0" + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" events@^3.0.0: version "3.3.0" @@ -947,7 +954,7 @@ extract-files@^9.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -1401,10 +1408,10 @@ module-deps@^6.2.3: through2 "^2.0.0" xtend "^4.0.0" -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== +node-fetch@^2.6.12: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -1881,7 +1888,7 @@ undeclared-identifiers@^1.1.2: simple-concat "^1.0.0" xtend "^4.0.1" -uri-js@^4.2.2: +uri-js@^4.4.1: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== diff --git a/packages/sdk-core/src/ConstantInflowNFT.ts b/packages/sdk-core/src/ConstantInflowNFT.ts deleted file mode 100644 index 85abb311d8..0000000000 --- a/packages/sdk-core/src/ConstantInflowNFT.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ethers } from "ethers"; - -import FlowNFTBase from "./FlowNFTBase"; -import { - ConstantInflowNFT__factory, - IConstantInflowNFT, -} from "./typechain-types"; - -export default class ConstantInflowNFT extends FlowNFTBase { - override readonly contract: IConstantInflowNFT; - constructor(address: string) { - super(address); - this.contract = new ethers.Contract( - address, - ConstantInflowNFT__factory.abi - ) as IConstantInflowNFT; - } -} diff --git a/packages/sdk-core/src/ConstantOutflowNFT.ts b/packages/sdk-core/src/ConstantOutflowNFT.ts deleted file mode 100644 index e081da27df..0000000000 --- a/packages/sdk-core/src/ConstantOutflowNFT.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ethers } from "ethers"; - -import FlowNFTBase from "./FlowNFTBase"; -import { - ConstantOutflowNFT__factory, - IConstantOutflowNFT, -} from "./typechain-types"; - -export default class ConstantOutflowNFT extends FlowNFTBase { - override readonly contract: IConstantOutflowNFT; - constructor(address: string) { - super(address); - this.contract = new ethers.Contract( - address, - ConstantOutflowNFT__factory.abi - ) as IConstantOutflowNFT; - } -} diff --git a/packages/sdk-core/src/ERC721Token.ts b/packages/sdk-core/src/ERC721Token.ts index f7feee9647..aafb6d5473 100644 --- a/packages/sdk-core/src/ERC721Token.ts +++ b/packages/sdk-core/src/ERC721Token.ts @@ -12,15 +12,10 @@ import { ERC721SetApprovalForAllParams, ERC721TokenURIParams, ERC721TransferFromParams, - NFTFlowData, ProviderOrSigner, } from "./interfaces"; -import { - IERC721Metadata, - IERC721Metadata__factory, - IFlowNFTBase, -} from "./typechain-types"; -import { getSanitizedTimestamp, normalizeAddress } from "./utils"; +import { IERC721Metadata, IERC721Metadata__factory } from "./typechain-types"; +import { normalizeAddress } from "./utils"; export default class ERC721MetadataToken { readonly address: string; @@ -292,19 +287,4 @@ export default class ERC721MetadataToken { ); return new Operation(txn, "UNSUPPORTED"); }; - - /** - * Sanitizes NFTFlowData, converting number to Date. - * @param params NFTFlowData - * @returns {NFTFlowData} sanitized NFTFlowData - */ - _sanitizeNFTFlowData = ( - params: IFlowNFTBase.FlowNFTDataStructOutput - ): NFTFlowData => { - return { - flowSender: params.flowSender, - flowStartDate: getSanitizedTimestamp(params.flowStartDate), - flowReceiver: params.flowReceiver, - }; - }; } diff --git a/packages/sdk-core/src/FlowNFTBase.ts b/packages/sdk-core/src/FlowNFTBase.ts deleted file mode 100644 index 9b95fd2872..0000000000 --- a/packages/sdk-core/src/FlowNFTBase.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { ethers } from "ethers"; - -import ERC721MetadataToken from "./ERC721Token"; -import { SFError } from "./SFError"; -import { NFTFlowData } from "./interfaces"; -import { FlowNFTBase__factory, IFlowNFTBase } from "./typechain-types"; -import { normalizeAddress } from "./utils"; - -export default class FlowNFTBase extends ERC721MetadataToken { - override readonly contract: IFlowNFTBase; - constructor(address: string) { - super(address); - this.contract = new ethers.Contract( - address, - FlowNFTBase__factory.abi - ) as IFlowNFTBase; - } - - /** ### ConstantInflowNFT Contract Read Functions ### */ - - /** - * Returns the computed `tokenId` of a flow NFT given a sender and receiver. - * @param sender the flow sender - * @param receiver the flow receiver - * @returns - */ - getTokenId = async ({ - superToken, - sender, - receiver, - providerOrSigner, - }: { - superToken: string; - sender: string; - receiver: string; - providerOrSigner: ethers.providers.Provider | ethers.Signer; - }): Promise => { - const normalizedSuperToken = normalizeAddress(superToken); - const normalizedSender = normalizeAddress(sender); - const normalizedReceiver = normalizeAddress(receiver); - try { - const tokenId = await this.contract - - .connect(providerOrSigner) - .getTokenId( - normalizedSuperToken, - normalizedSender, - normalizedReceiver - ); - return tokenId.toString(); - } catch (err) { - throw new SFError({ - type: "NFT_READ", - message: "There was an error getting token id", - cause: err, - }); - } - }; - - /** - * Returns the NFT flow data of the NFT with `tokenId`. - * @param tokenId the token id - * @returns {NFTFlowData} the NFT flow data - */ - flowDataByTokenId = async ({ - tokenId, - providerOrSigner, - }: { - tokenId: string; - providerOrSigner: ethers.providers.Provider | ethers.Signer; - }): Promise => { - try { - const flowData = await this.contract - .connect(providerOrSigner) - .flowDataByTokenId(tokenId); - return this._sanitizeNFTFlowData(flowData); - } catch (err) { - throw new SFError({ - type: "NFT_READ", - message: "There was an error getting flow data by token id", - cause: err, - }); - } - }; -} diff --git a/packages/sdk-core/src/Framework.ts b/packages/sdk-core/src/Framework.ts index 0331be0b44..d88e3897ad 100644 --- a/packages/sdk-core/src/Framework.ts +++ b/packages/sdk-core/src/Framework.ts @@ -199,14 +199,12 @@ export default class Framework { hostAddress: networkData.addresses.host, cfaV1Address: networkData.addresses.cfaV1, idaV1Address: networkData.addresses.idaV1, - // @note TODO - remove the any once you add gdaV1 and gdaV1Forwarder to metadata - // add idaV1Forwarder to metadata as well gdaV1Address: - (networkData.addresses as any).gdaV1 || - networkData.addresses.idaV1, + networkData.addresses.gdaV1 || + ethers.constants.AddressZero, gdaV1ForwarderAddress: - (networkData.addresses as any).gdaV1Forwarder || - networkData.addresses.idaV1, + networkData.addresses.gdaV1Forwarder || + ethers.constants.AddressZero, governanceAddress, cfaV1ForwarderAddress: networkData.addresses.cfaV1Forwarder, diff --git a/packages/sdk-core/src/SuperToken.ts b/packages/sdk-core/src/SuperToken.ts index b44286b5d4..51c7965842 100644 --- a/packages/sdk-core/src/SuperToken.ts +++ b/packages/sdk-core/src/SuperToken.ts @@ -1,8 +1,6 @@ import { BytesLike, ethers, Overrides } from "ethers"; import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1"; -import ConstantInflowNFT from "./ConstantInflowNFT"; -import ConstantOutflowNFT from "./ConstantOutflowNFT"; import ERC20Token from "./ERC20Token"; import GeneralDistributionAgreementV1 from "./GeneralDistributionAgreementV1"; import Governance from "./Governance"; @@ -72,11 +70,6 @@ import { tryGet, } from "./utils"; -export interface NFTAddresses { - readonly constantInflowNFTProxy: string; - readonly constantOutflowNFTProxy: string; -} - export interface ITokenSettings { readonly address: string; readonly config: IConfig; @@ -105,10 +98,6 @@ export default abstract class SuperToken extends ERC20Token { readonly gdaV1: GeneralDistributionAgreementV1; readonly governance: Governance; readonly underlyingToken?: ERC20Token; - readonly constantOutflowNFTProxy?: ConstantOutflowNFT; - readonly constantInflowNFTProxy?: ConstantInflowNFT; - readonly constantOutflowNFTLogic?: string; - readonly constantInflowNFTLogic?: string; override readonly contract: ISuperToken; protected constructor(options: ITokenOptions, settings: ITokenSettings) { @@ -183,73 +172,21 @@ export default abstract class SuperToken extends ERC20Token { const nativeTokenSymbol = resolverData.nativeTokenSymbol || "ETH"; const nativeSuperTokenSymbol = nativeTokenSymbol + "x"; - // @note This is tech debt and should be reverted once GoodDollar upgrades their token contract - // @note We are using tryGet here just to handle GoodDollar not having - // CONSTANT_OUTFLOW_NFT in its SuperToken implementation. - let constantOutflowNFTProxy = await tryGet( - superToken.CONSTANT_OUTFLOW_NFT(), - ethers.constants.AddressZero - ); - let constantInflowNFTProxy = await tryGet( - superToken.CONSTANT_INFLOW_NFT(), - ethers.constants.AddressZero - ); - - // @note We only want to run this bit of code for GoodDollar SuperTokens - // (dev and mainnet) - const GOOD_DOLLAR_SYMBOL = "G$"; - if (tokenSymbol === GOOD_DOLLAR_SYMBOL) { - // @note we need to create a new interface for the old GoodDollar SuperToken - // which contains the functions for constantInflowNFT and constantOutflowNFT - const oldSuperTokenInterface = new ethers.utils.Interface([ - "function constantInflowNFT() view returns (address)", - "function constantOutflowNFT() view returns (address)", - ]); - const goodDollarSpecificToken = new ethers.Contract( - superToken.address, - oldSuperTokenInterface - ); - - // @note we attempt to get the constantInflowNFT and constantOutflowNFT - if (constantOutflowNFTProxy === ethers.constants.AddressZero) { - constantOutflowNFTProxy = await tryGet( - goodDollarSpecificToken.constantOutflowNFT(), - ethers.constants.AddressZero - ); - } - if (constantInflowNFTProxy === ethers.constants.AddressZero) { - constantInflowNFTProxy = await tryGet( - goodDollarSpecificToken.constantInflowNFT(), - ethers.constants.AddressZero - ); - } - } - - const nftAddresses: NFTAddresses = { - constantOutflowNFTProxy, - constantInflowNFTProxy, - }; - if (nativeSuperTokenSymbol === tokenSymbol) { return new NativeAssetSuperToken( options, settings, - nativeTokenSymbol, - nftAddresses + nativeTokenSymbol ); } if (underlyingTokenAddress !== ethers.constants.AddressZero) { - return new WrapperSuperToken( - options, - { - ...settings, - underlyingTokenAddress, - }, - nftAddresses - ); + return new WrapperSuperToken(options, { + ...settings, + underlyingTokenAddress, + }); } - return new PureSuperToken(options, settings, nftAddresses); + return new PureSuperToken(options, settings); } catch (err) { throw new SFError({ type: "SUPERTOKEN_INITIALIZATION", @@ -1042,22 +979,13 @@ export default abstract class SuperToken extends ERC20Token { */ export class WrapperSuperToken extends SuperToken { override readonly underlyingToken: ERC20Token; - override readonly constantOutflowNFTProxy: ConstantOutflowNFT; - override readonly constantInflowNFTProxy: ConstantInflowNFT; constructor( options: ITokenOptions, - settings: ITokenSettings & { underlyingTokenAddress: string }, - nftAddresses: NFTAddresses + settings: ITokenSettings & { underlyingTokenAddress: string } ) { super(options, settings); this.underlyingToken = new ERC20Token(settings.underlyingTokenAddress); - this.constantInflowNFTProxy = new ConstantInflowNFT( - nftAddresses.constantInflowNFTProxy - ); - this.constantOutflowNFTProxy = new ConstantOutflowNFT( - nftAddresses.constantOutflowNFTProxy - ); } /** ### WrapperSuperToken Contract Write Functions ### */ @@ -1159,21 +1087,8 @@ export class WrapperSuperToken extends SuperToken { * PureSuperToken doesn't have any underlying ERC20 token. */ export class PureSuperToken extends SuperToken { - override readonly constantOutflowNFTProxy: ConstantOutflowNFT; - override readonly constantInflowNFTProxy: ConstantInflowNFT; - - constructor( - options: ITokenOptions, - settings: ITokenSettings, - nftAddresses: NFTAddresses - ) { + constructor(options: ITokenOptions, settings: ITokenSettings) { super(options, settings); - this.constantInflowNFTProxy = new ConstantInflowNFT( - nftAddresses.constantInflowNFTProxy - ); - this.constantOutflowNFTProxy = new ConstantOutflowNFT( - nftAddresses.constantOutflowNFTProxy - ); } } @@ -1182,23 +1097,14 @@ export class PureSuperToken extends SuperToken { */ export class NativeAssetSuperToken extends SuperToken { readonly nativeTokenSymbol: string; - override readonly constantOutflowNFTProxy: ConstantOutflowNFT; - override readonly constantInflowNFTProxy: ConstantInflowNFT; constructor( options: ITokenOptions, settings: ITokenSettings, - nativeTokenSymbol: string, - nftAddresses: NFTAddresses + nativeTokenSymbol: string ) { super(options, settings); this.nativeTokenSymbol = nativeTokenSymbol; - this.constantInflowNFTProxy = new ConstantInflowNFT( - nftAddresses.constantInflowNFTProxy - ); - this.constantOutflowNFTProxy = new ConstantOutflowNFT( - nftAddresses.constantOutflowNFTProxy - ); } get nativeAssetContract() { diff --git a/packages/sdk-core/src/SuperfluidPool.ts b/packages/sdk-core/src/SuperfluidPool.ts index 62312f1cfe..dbe642aac9 100644 --- a/packages/sdk-core/src/SuperfluidPool.ts +++ b/packages/sdk-core/src/SuperfluidPool.ts @@ -13,6 +13,7 @@ import { GetClaimableParams, GetDisconnectedBalanceParams, GetMemberFlowRateParams, + GetTotalAmountReceivedByMemberParams, GetUnitsParams, SuperfluidPoolDecreaseAllowanceParams, SuperfluidPoolIncreaseAllowanceParams, @@ -236,6 +237,31 @@ export default class SuperfluidPoolClass { } }; + /** + * Retrieves the flow rate for a specific member. + * @param member The member's address. + * @param providerOrSigner A provider or signer object + * @returns The total amount received by the member. + */ + getTotalAmountReceivedByMember = async ( + params: GetTotalAmountReceivedByMemberParams + ): Promise => { + try { + return ( + await this.contract + .connect(params.providerOrSigner) + .getTotalAmountReceivedByMember(params.member) + ).toString(); + } catch (err) { + throw new SFError({ + type: "SUPERFLUID_POOL_READ", + message: + "There was an error getting the total amount received by member.", + cause: err, + }); + } + }; + /** * Retrieves the claimable amount for a specific member and time. * @param member The member's address. diff --git a/packages/sdk-core/src/events.ts b/packages/sdk-core/src/events.ts index 6f06fa367d..03c9c8a07a 100644 --- a/packages/sdk-core/src/events.ts +++ b/packages/sdk-core/src/events.ts @@ -60,6 +60,14 @@ export type OtherEvents = | PPPConfigurationChangedEvent | TrustedForwarderChangedEvent | SuperTokenMinimumDepositChangedEvent + | PoolCreatedEvent + | PoolConnectionUpdatedEvent + | BufferAdjustedEvent + | InstantDistributionUpdatedEvent + | FlowDistributionUpdatedEvent + | DistributionClaimedEvent + | MemberUnitsUpdatedEvent + | ApprovalEvent | UnknownEvent; export type AllEvents = AccountEvents | OtherEvents; @@ -435,6 +443,31 @@ export interface BondIncreasedEvent extends EventBase { additionalBond: string; } +export interface PoolCreatedEvent extends EventBase { + name: "PoolCreatedEvent"; +} +export interface PoolConnectionUpdatedEvent extends EventBase { + name: "PoolConnectionUpdatedEvent"; +} +export interface BufferAdjustedEvent extends EventBase { + name: "BufferAdjustedEvent"; +} +export interface InstantDistributionUpdatedEvent extends EventBase { + name: "InstantDistributionUpdatedEvent"; +} +export interface FlowDistributionUpdatedEvent extends EventBase { + name: "FlowDistributionUpdatedEvent"; +} +export interface DistributionClaimedEvent extends EventBase { + name: "DistributionClaimedEvent"; +} +export interface MemberUnitsUpdatedEvent extends EventBase { + name: "MemberUnitsUpdatedEvent"; +} +export interface ApprovalEvent extends EventBase { + name: "ApprovalEvent"; +} + export interface UnknownEvent extends EventBase { // @note using the string type breaks the type guard name: ""; diff --git a/packages/sdk-core/src/index.ts b/packages/sdk-core/src/index.ts index 6834a8bc16..4e12a39c19 100644 --- a/packages/sdk-core/src/index.ts +++ b/packages/sdk-core/src/index.ts @@ -52,7 +52,10 @@ export * from "./subgraph/entities/streamPeriod/streamPeriod"; export * from "./subgraph/entities/token/token"; export * from "./subgraph/entities/tokenStatistic/tokenStatistic"; export * from "./subgraph/entities/tokenStatisticLog/tokenStatisticLog"; -export * from "./subgraph/entities/flowOperator/flowOperators"; +export * from "./subgraph/entities/flowOperator/flowOperator"; +export * from "./subgraph/entities/pool/pool"; +export * from "./subgraph/entities/poolMember/poolMember"; +export * from "./subgraph/entities/poolDistributor/poolDistributor"; export * from "./subgraph/events/events"; export * from "./subgraph/events/flowUpdatedEvent"; diff --git a/packages/sdk-core/src/interfaces.ts b/packages/sdk-core/src/interfaces.ts index 5207ecc4f2..9093b9ed39 100644 --- a/packages/sdk-core/src/interfaces.ts +++ b/packages/sdk-core/src/interfaces.ts @@ -778,6 +778,11 @@ export interface GetMemberFlowRateParams { readonly providerOrSigner: ethers.providers.Provider | ethers.Signer; } +export interface GetTotalAmountReceivedByMemberParams { + readonly member: string; + readonly providerOrSigner: ethers.providers.Provider | ethers.Signer; +} + export interface ClaimAllForMemberParams { readonly member: string; readonly signer: ethers.Signer; diff --git a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts index 4323613dae..dabd3f5969 100644 --- a/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts +++ b/packages/sdk-core/src/mapGetAllEventsQueryEvents.ts @@ -673,12 +673,97 @@ export const mapGetAllEventsQueryEvents = ( token: x.token, additionalBond: x.additionalBond, }); + case "PoolCreatedEvent": + return typeGuard({ + name: "PoolCreatedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "PoolConnectionUpdatedEvent": + return typeGuard({ + name: "PoolConnectionUpdatedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "BufferAdjustedEvent": + return typeGuard({ + name: "BufferAdjustedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "InstantDistributionUpdatedEvent": + return typeGuard({ + name: "InstantDistributionUpdatedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "FlowDistributionUpdatedEvent": + return typeGuard({ + name: "FlowDistributionUpdatedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "DistributionClaimedEvent": + return typeGuard({ + name: "DistributionClaimedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "MemberUnitsUpdatedEvent": + return typeGuard({ + name: "MemberUnitsUpdatedEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); + case "ApprovalEvent": + return typeGuard({ + name: "ApprovalEvent", + id: x.id, + blockNumber: Number(x.blockNumber), + transactionHash: x.transactionHash, + gasPrice: x.gasPrice, + order: Number(x.order), + timestamp: Number(x.timestamp), + logIndex: Number(x.logIndex), + }); default: // eslint-disable-next-line no-case-declarations const eventBase = x as events.EventBase; - console.warn( - `An unknown event [${eventBase.name}] was detected which couldn't be properly mapped. Please update to the latest version of @superfluid-finance/sdk-core.` - ); return typeGuard({ // force casted as empty string for the type system name: eventBase.name as "", diff --git a/packages/sdk-core/src/pagination.ts b/packages/sdk-core/src/pagination.ts index 1e6bef1ed8..a4b8c1df21 100644 --- a/packages/sdk-core/src/pagination.ts +++ b/packages/sdk-core/src/pagination.ts @@ -121,7 +121,7 @@ export function isLastIdPaging(paging?: Paging): paging is LastIdPaging { export function isAllPaging(paging?: Paging): paging is AllPaging { return ( paging !== undefined && - paging.skip === undefined && + !paging.skip && paging.lastId === undefined && paging.take === Infinity ); diff --git a/packages/sdk-core/src/subgraph/.graphqlconfig b/packages/sdk-core/src/subgraph/.graphqlconfig index fe91d7d5a0..09ca050d76 100644 --- a/packages/sdk-core/src/subgraph/.graphqlconfig +++ b/packages/sdk-core/src/subgraph/.graphqlconfig @@ -4,7 +4,7 @@ "extensions": { "endpoints": { "Default GraphQL Endpoint": { - "url": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-goerli", + "url": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1", "headers": { "user-agent": "JS GraphQL" }, diff --git a/packages/sdk-core/src/subgraph/SubgraphClient.ts b/packages/sdk-core/src/subgraph/SubgraphClient.ts index ee3ed1a43b..9cc8505483 100644 --- a/packages/sdk-core/src/subgraph/SubgraphClient.ts +++ b/packages/sdk-core/src/subgraph/SubgraphClient.ts @@ -22,7 +22,7 @@ export class SubgraphClient { variables: variables ? cleanVariables(variables) : undefined, // TODO: explicit casting is semi-dirty and not recommended // but I am not sure how to fix this right now - } as RequestExtendedOptions); + } as unknown as RequestExtendedOptions); } } diff --git a/packages/sdk-core/src/subgraph/entities/flowOperator/flowOperators.ts b/packages/sdk-core/src/subgraph/entities/flowOperator/flowOperator.ts similarity index 100% rename from packages/sdk-core/src/subgraph/entities/flowOperator/flowOperators.ts rename to packages/sdk-core/src/subgraph/entities/flowOperator/flowOperator.ts diff --git a/packages/sdk-core/src/subgraph/entities/pool/pool.ts b/packages/sdk-core/src/subgraph/entities/pool/pool.ts new file mode 100644 index 0000000000..7516d14c07 --- /dev/null +++ b/packages/sdk-core/src/subgraph/entities/pool/pool.ts @@ -0,0 +1,122 @@ +import { + Address, + BigNumber, + BlockNumber, + Timestamp, +} from "../../mappedSubgraphTypes"; +import { Pool_Filter, Pool_OrderBy } from "../../schema.generated"; +import { + RelevantAddressesIntermediate, + SubgraphListQuery, + SubgraphQueryHandler, +} from "../../subgraphQueryHandler"; + +import { + GetPoolQuery, + PoolsDocument, + PoolsQuery, + PoolsQueryVariables, +} from "./pools.generated"; + +export type PoolListQuery = SubgraphListQuery; + +export interface Pool { + id: Address; + createdAtTimestamp: Timestamp; + createdAtBlockNumber: BlockNumber; + updatedAtTimestamp: Timestamp; + updatedAtBlockNumber: BlockNumber; + totalAmountInstantlyDistributedUntilUpdatedAt: BigNumber; + totalAmountFlowedDistributedUntilUpdatedAt: BigNumber; + totalAmountDistributedUntilUpdatedAt: BigNumber; + totalFlowAdjustmentAmountDistributedUntilUpdatedAt: BigNumber; + totalUnits: BigNumber; + totalConnectedUnits: BigNumber; + totalDisconnectedUnits: BigNumber; + perUnitSettledValue: BigNumber; + perUnitFlowRate: BigNumber; + /** + * A member is any account which has more than 0 units in the pool. + */ + totalMembers: number; + /** + * A connected member is any account which has more than 0 units in the pool and is connected. + */ + totalConnectedMembers: number; + /** + * A disconnected member is any account which has more than 0 units in the pool and is not connected. + */ + totalDisconnectedMembers: number; + adjustmentFlowRate: BigNumber; + flowRate: BigNumber; + totalBuffer: BigNumber; + token: Address; + admin: Address; +} + +export type SubgraphPool = NonNullable["pool"]>; + +export const mapSubgraphGDAPool = (x: SubgraphPool): Pool => { + const mappedPool = { + ...x, + createdAtTimestamp: Number(x.createdAtTimestamp), + createdAtBlockNumber: Number(x.createdAtBlockNumber), + updatedAtTimestamp: Number(x.updatedAtTimestamp), + updatedAtBlockNumber: Number(x.updatedAtBlockNumber), + totalAmountInstantlyDistributedUntilUpdatedAt: + x.totalAmountInstantlyDistributedUntilUpdatedAt, + totalAmountFlowedDistributedUntilUpdatedAt: + x.totalAmountFlowedDistributedUntilUpdatedAt, + totalAmountDistributedUntilUpdatedAt: + x.totalAmountDistributedUntilUpdatedAt, + admin: x.admin.id, + token: x.token.id, + }; + + return mappedPool; +}; + +export class PoolQueryHandler extends SubgraphQueryHandler< + Pool, + PoolListQuery, + PoolsQuery, + PoolsQueryVariables +> { + getAddressFieldKeysFromFilter = (): { + accountKeys: (keyof Pool_Filter)[]; + tokenKeys: (keyof Pool_Filter)[]; + } => ({ + accountKeys: ["admin", "id"], + tokenKeys: ["token"], + }); + + getRelevantAddressesFromResultCore = ( + result: Pool + ): RelevantAddressesIntermediate => ({ + tokens: [result.token], + accounts: [result.admin, result.id], + }); + + mapFromSubgraphResponse = (response: PoolsQuery): Pool[] => + response.pools.map((x) => ({ + ...x, + createdAtTimestamp: Number(x.createdAtTimestamp), + createdAtBlockNumber: Number(x.createdAtBlockNumber), + updatedAtTimestamp: Number(x.updatedAtTimestamp), + updatedAtBlockNumber: Number(x.updatedAtBlockNumber), + totalAmountInstantlyDistributedUntilUpdatedAt: + x.totalAmountInstantlyDistributedUntilUpdatedAt, + totalAmountFlowedDistributedUntilUpdatedAt: + x.totalAmountFlowedDistributedUntilUpdatedAt, + totalAmountDistributedUntilUpdatedAt: + x.totalAmountDistributedUntilUpdatedAt, + totalFlowAdjustmentAmountDistributedUntilUpdatedAt: + x.totalFlowAdjustmentAmountDistributedUntilUpdatedAt, + perUnitFlowRate: x.perUnitFlowRate, + perUnitSettledValue: x.perUnitSettledValue, + admin: x.admin.id, + token: x.token.id, + })); + + requestDocument = PoolsDocument; +} diff --git a/packages/sdk-core/src/subgraph/entities/pool/pools.graphql b/packages/sdk-core/src/subgraph/entities/pool/pools.graphql new file mode 100644 index 0000000000..1492b3e102 --- /dev/null +++ b/packages/sdk-core/src/subgraph/entities/pool/pools.graphql @@ -0,0 +1,54 @@ +query getPool($id: ID!) { + pool(id: $id) { + ...PoolPart + } +} + +query pools( + $first: Int = 10 + $orderBy: Pool_orderBy = id + $orderDirection: OrderDirection = asc + $skip: Int = 0 + $where: Pool_filter = {} + $block: Block_height +) { + pools( + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + where: $where + block: $block + ) { + ...PoolPart + } +} + +fragment PoolPart on Pool { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + admin { + id + } + token { + id + } + totalMembers + totalUnits + totalConnectedMembers + totalConnectedUnits + totalDisconnectedMembers + totalDisconnectedUnits + totalAmountInstantlyDistributedUntilUpdatedAt + flowRate + perUnitSettledValue + perUnitFlowRate + totalBuffer + totalAmountFlowedDistributedUntilUpdatedAt + totalAmountDistributedUntilUpdatedAt + adjustmentFlowRate + totalFlowAdjustmentAmountDistributedUntilUpdatedAt +} diff --git a/packages/sdk-core/src/subgraph/entities/poolDistributor/poolDistributor.ts b/packages/sdk-core/src/subgraph/entities/poolDistributor/poolDistributor.ts new file mode 100644 index 0000000000..2f8894ccd2 --- /dev/null +++ b/packages/sdk-core/src/subgraph/entities/poolDistributor/poolDistributor.ts @@ -0,0 +1,81 @@ +import { + Address, + BigNumber, + BlockNumber, + SubgraphId, + Timestamp, +} from "../../mappedSubgraphTypes"; +import { + PoolDistributor_Filter, + PoolDistributor_OrderBy, +} from "../../schema.generated"; +import { + RelevantAddressesIntermediate, + SubgraphListQuery, + SubgraphQueryHandler, +} from "../../subgraphQueryHandler"; + +import { + PoolDistributorsDocument, + PoolDistributorsQuery, + PoolDistributorsQueryVariables, +} from "./poolDistributors.generated"; + +export interface PoolDistributor { + id: SubgraphId; + createdAtTimestamp: Timestamp; + createdAtBlockNumber: BlockNumber; + updatedAtTimestamp: Timestamp; + updatedAtBlockNumber: BlockNumber; + totalBuffer: BigNumber; + totalAmountInstantlyDistributedUntilUpdatedAt: BigNumber; + totalAmountFlowedDistributedUntilUpdatedAt: BigNumber; + totalAmountDistributedUntilUpdatedAt: BigNumber; + flowRate: BigNumber; + account: Address; + pool: Address; + token: Address; +} + +export type PoolDistributorsListQuery = SubgraphListQuery< + PoolDistributor_Filter, + PoolDistributor_OrderBy +>; + +export class PoolDistributorQueryHandler extends SubgraphQueryHandler< + PoolDistributor, + PoolDistributorsListQuery, + PoolDistributorsQuery, + PoolDistributorsQueryVariables +> { + getAddressFieldKeysFromFilter = (): { + accountKeys: (keyof PoolDistributor_Filter)[]; + tokenKeys: (keyof PoolDistributor_Filter)[]; + } => ({ + accountKeys: ["account", "pool"], + tokenKeys: [], + }); + + getRelevantAddressesFromResultCore = ( + result: PoolDistributor + ): RelevantAddressesIntermediate => ({ + tokens: [result.token], + accounts: [result.account, result.pool], + }); + + mapFromSubgraphResponse = ( + response: PoolDistributorsQuery + ): PoolDistributor[] => + response.poolDistributors.map((x) => ({ + ...x, + createdAtTimestamp: Number(x.createdAtTimestamp), + createdAtBlockNumber: Number(x.createdAtBlockNumber), + updatedAtTimestamp: Number(x.updatedAtTimestamp), + updatedAtBlockNumber: Number(x.updatedAtBlockNumber), + pool: x.pool.id, + token: x.pool.token.id, + account: x.account.id, + })); + + requestDocument = PoolDistributorsDocument; +} diff --git a/packages/sdk-core/src/subgraph/entities/poolDistributor/poolDistributors.graphql b/packages/sdk-core/src/subgraph/entities/poolDistributor/poolDistributors.graphql new file mode 100644 index 0000000000..beed5a215b --- /dev/null +++ b/packages/sdk-core/src/subgraph/entities/poolDistributor/poolDistributors.graphql @@ -0,0 +1,37 @@ +query poolDistributors( + $first: Int = 10 + $skip: Int = 0 + $orderBy: PoolDistributor_orderBy = id + $orderDirection: OrderDirection = asc + $where: PoolDistributor_filter = {} + $block: Block_height +) { + poolDistributors( + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + where: $where + block: $block + ) { + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + totalBuffer + totalAmountInstantlyDistributedUntilUpdatedAt + totalAmountFlowedDistributedUntilUpdatedAt + totalAmountDistributedUntilUpdatedAt + id + flowRate + account { + id + } + pool { + id + token { + id + } + } + } +} diff --git a/packages/sdk-core/src/subgraph/entities/poolMember/poolMember.ts b/packages/sdk-core/src/subgraph/entities/poolMember/poolMember.ts new file mode 100644 index 0000000000..553235723a --- /dev/null +++ b/packages/sdk-core/src/subgraph/entities/poolMember/poolMember.ts @@ -0,0 +1,80 @@ +import { + Address, + BigNumber, + BlockNumber, + SubgraphId, + Timestamp, +} from "../../mappedSubgraphTypes"; +import { PoolMember_Filter, PoolMember_OrderBy } from "../../schema.generated"; +import { + RelevantAddressesIntermediate, + SubgraphListQuery, + SubgraphQueryHandler, +} from "../../subgraphQueryHandler"; + +import { + PoolMembersDocument, + PoolMembersQuery, + PoolMembersQueryVariables, +} from "./poolMembers.generated"; + +export interface PoolMember { + id: SubgraphId; + createdAtBlockNumber: BlockNumber; + createdAtTimestamp: Timestamp; + updatedAtTimestamp: Timestamp; + updatedAtBlockNumber: BlockNumber; + units: BigNumber; + account: Address; + isConnected: boolean; + totalAmountClaimed: BigNumber; + token: Address; + totalAmountReceivedUntilUpdatedAt: BigNumber; + poolTotalAmountDistributedUntilUpdatedAt: BigNumber; + pool: Address; + syncedPerUnitFlowRate: BigNumber; + syncedPerUnitSettledValue: BigNumber; +} + +export type PoolMembersListQuery = SubgraphListQuery< + PoolMember_Filter, + PoolMember_OrderBy +>; + +export class PoolMemberQueryHandler extends SubgraphQueryHandler< + PoolMember, + PoolMembersListQuery, + PoolMembersQuery, + PoolMembersQueryVariables +> { + getAddressFieldKeysFromFilter = (): { + accountKeys: (keyof PoolMember_Filter)[]; + tokenKeys: (keyof PoolMember_Filter)[]; + } => ({ + accountKeys: ["account", "pool"], + tokenKeys: [], + }); + + getRelevantAddressesFromResultCore = ( + result: PoolMember + ): RelevantAddressesIntermediate => ({ + tokens: [result.token], + accounts: [result.account, result.pool], + }); + + mapFromSubgraphResponse = (response: PoolMembersQuery): PoolMember[] => + response.poolMembers.map((x) => ({ + ...x, + account: x.account.id, + createdAtTimestamp: Number(x.createdAtTimestamp), + createdAtBlockNumber: Number(x.createdAtBlockNumber), + updatedAtTimestamp: Number(x.updatedAtTimestamp), + updatedAtBlockNumber: Number(x.updatedAtBlockNumber), + pool: x.pool.id, + token: x.pool.token.id, + syncedPerUnitFlowRate: x.syncedPerUnitFlowRate, + syncedPerUnitSettledValue: x.syncedPerUnitSettledValue, + })); + + requestDocument = PoolMembersDocument; +} diff --git a/packages/sdk-core/src/subgraph/entities/poolMember/poolMembers.graphql b/packages/sdk-core/src/subgraph/entities/poolMember/poolMembers.graphql new file mode 100644 index 0000000000..90e9cd5bec --- /dev/null +++ b/packages/sdk-core/src/subgraph/entities/poolMember/poolMembers.graphql @@ -0,0 +1,39 @@ +query poolMembers( + $first: Int = 10 + $skip: Int = 0 + $orderBy: PoolMember_orderBy = id + $orderDirection: OrderDirection = asc + $where: PoolMember_filter = {} + $block: Block_height +) { + poolMembers( + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + where: $where + block: $block + ) { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + units + pool { + id + token { + id + } + } + account { + id + } + isConnected + totalAmountClaimed + totalAmountReceivedUntilUpdatedAt + poolTotalAmountDistributedUntilUpdatedAt + syncedPerUnitFlowRate + syncedPerUnitSettledValue + } +} diff --git a/packages/sdk-core/src/subgraph/events/events.graphql b/packages/sdk-core/src/subgraph/events/events.graphql index cd7e4b9828..b3e583d42e 100644 --- a/packages/sdk-core/src/subgraph/events/events.graphql +++ b/packages/sdk-core/src/subgraph/events/events.graphql @@ -14,6 +14,7 @@ query flowUpdatedEvents( where: $where block: $block ) { + name ...flowUpdatedEvent } } @@ -34,6 +35,7 @@ query flowOperatorUpdatedEvents( where: $where block: $block ) { + name ...flowOperatorUpdatedEvent } } @@ -54,6 +56,7 @@ query indexCreatedEvents( where: $where block: $block ) { + name ...indexCreatedEvent } } @@ -74,6 +77,7 @@ query indexDistributionClaimedEvents( where: $where block: $block ) { + name ...indexDistributionClaimedEvent } } @@ -94,6 +98,7 @@ query indexUpdatedEvents( where: $where block: $block ) { + name ...indexUpdatedEvent } } @@ -114,6 +119,7 @@ query indexSubscribedEvents( where: $where block: $block ) { + name ...indexSubscribedEvent } } @@ -134,6 +140,7 @@ query indexUnitsUpdatedEvents( where: $where block: $block ) { + name ...indexUnitsUpdatedEvent } } @@ -154,6 +161,7 @@ query indexUnsubscribedEvents( where: $where block: $block ) { + name ...indexUnsubscribedEvent } } @@ -174,6 +182,7 @@ query subscriptionApprovedEvents( where: $where block: $block ) { + name ...subscriptionApprovedEvent } } @@ -194,6 +203,7 @@ query subscriptionDistributionClaimedEvents( where: $where block: $block ) { + name ...subscriptionDistributionClaimedEvent } } @@ -214,6 +224,7 @@ query subscriptionRevokedEvents( where: $where block: $block ) { + name ...subscriptionRevokedEvent } } @@ -234,6 +245,7 @@ query subscriptionUnitsUpdatedEvents( where: $where block: $block ) { + name ...subscriptionUnitsUpdatedEvent } } @@ -254,6 +266,7 @@ query transferEvents( where: $where block: $block ) { + name ...transferEvent } } @@ -274,6 +287,7 @@ query tokenUpgradedEvents( where: $where block: $block ) { + name ...tokenUpgradedEvent } } @@ -294,6 +308,7 @@ query tokenDowngradedEvents( where: $where block: $block ) { + name ...tokenDowngradedEvent } } @@ -314,6 +329,7 @@ query agreementClassRegisteredEvents( where: $where block: $block ) { + name ...agreementClassRegisteredEvent } } @@ -334,6 +350,7 @@ query agreementClassUpdatedEvents( where: $where block: $block ) { + name ...agreementClassUpdatedEvent } } @@ -354,6 +371,7 @@ query appRegisteredEvents( where: $where block: $block ) { + name ...appRegisteredEvent } } @@ -374,6 +392,7 @@ query governanceReplacedEvents( where: $where block: $block ) { + name ...governanceReplacedEvent } } @@ -394,6 +413,7 @@ query jailEvents( where: $where block: $block ) { + name ...jailEvent } } @@ -414,6 +434,7 @@ query superTokenFactoryUpdatedEvents( where: $where block: $block ) { + name ...superTokenFactoryUpdatedEvent } } @@ -434,6 +455,7 @@ query superTokenLogicUpdatedEvents( where: $where block: $block ) { + name ...superTokenLogicUpdatedEvent } } @@ -454,6 +476,7 @@ query roleAdminChangedEvents( where: $where block: $block ) { + name ...roleAdminChangedEvent } } @@ -474,6 +497,7 @@ query roleGrantedEvents( where: $where block: $block ) { + name ...roleGrantedEvent } } @@ -494,6 +518,7 @@ query roleRevokedEvents( where: $where block: $block ) { + name ...roleRevokedEvent } } @@ -514,6 +539,7 @@ query setEvents( where: $where block: $block ) { + name ...setEvent } } @@ -534,6 +560,7 @@ query cfaV1LiquidationPeriodChangedEvents( where: $where block: $block ) { + name ...cfaV1LiquidationPeriodChangedEvent } } @@ -554,6 +581,7 @@ query configChangedEvents( where: $where block: $block ) { + name ...configChangedEvent } } @@ -574,6 +602,7 @@ query rewardAddressChangedEvents( where: $where block: $block ) { + name ...rewardAddressChangedEvent } } @@ -594,6 +623,7 @@ query superTokenMinimumDepositChangedEvents( where: $where block: $block ) { + name ...superTokenMinimumDepositChangedEvent } } @@ -614,6 +644,7 @@ query trustedForwarderChangedEvents( where: $where block: $block ) { + name ...trustedForwarderChangedEvent } } @@ -634,6 +665,7 @@ query agreementLiquidatedByEvents( where: $where block: $block ) { + name ...agreementLiquidatedByEvent } } @@ -654,6 +686,7 @@ query burnedEvents( where: $where block: $block ) { + name ...burnedEvent } } @@ -674,6 +707,7 @@ query mintedEvents( where: $where block: $block ) { + name ...mintedEvent } } @@ -694,6 +728,7 @@ query sentEvents( where: $where block: $block ) { + name ...sentEvent } } @@ -714,6 +749,7 @@ query customSuperTokenCreatedEvents( where: $where block: $block ) { + name ...customSuperTokenCreatedEvent } } @@ -734,6 +770,7 @@ query superTokenCreatedEvents( where: $where block: $block ) { + name ...superTokenCreatedEvent } } @@ -754,6 +791,7 @@ query superTokenLogicCreatedEvents( where: $where block: $block ) { + name ...superTokenLogicCreatedEvent } } @@ -774,6 +812,7 @@ query newPICEvents( where: $where block: $block ) { + name ...newPICEvent } } @@ -794,6 +833,7 @@ query exitRateChangedEvents( where: $where block: $block ) { + name ...newExitRateChangedEvent } } @@ -814,6 +854,7 @@ query bondIncreasedEvents( where: $where block: $block ) { + name ...newBondIncreasedEvent } } @@ -838,6 +879,7 @@ query events( blockNumber transactionHash timestamp + name ... on FlowUpdatedEvent { ...flowUpdatedEvent } @@ -967,6 +1009,30 @@ query events( ... on BondIncreasedEvent { ...newBondIncreasedEvent } + ... on PoolCreatedEvent { + ...poolCreatedEvent + } + ... on PoolConnectionUpdatedEvent { + ...poolConnectionUpdatedEvent + } + ... on BufferAdjustedEvent { + ...bufferAdjustedEvent + } + ... on InstantDistributionUpdatedEvent { + ...instantDistributionUpdatedEvent + } + ... on FlowDistributionUpdatedEvent { + ...flowDistributionUpdatedEvent + } + ... on DistributionClaimedEvent { + ...distributionClaimedEvent + } + ... on MemberUnitsUpdatedEvent { + ...memberUnitsUpdatedEvent + } + ... on ApprovalEvent { + ...approvalEvent + } } } @@ -1383,3 +1449,27 @@ fragment newBondIncreasedEvent on BondIncreasedEvent { token additionalBond } +fragment poolCreatedEvent on PoolCreatedEvent { + ...eventFields +} +fragment poolConnectionUpdatedEvent on PoolConnectionUpdatedEvent { + ...eventFields +} +fragment bufferAdjustedEvent on BufferAdjustedEvent { + ...eventFields +} +fragment instantDistributionUpdatedEvent on InstantDistributionUpdatedEvent { + ...eventFields +} +fragment flowDistributionUpdatedEvent on FlowDistributionUpdatedEvent { + ...eventFields +} +fragment distributionClaimedEvent on DistributionClaimedEvent { + ...eventFields +} +fragment memberUnitsUpdatedEvent on MemberUnitsUpdatedEvent { + ...eventFields +} +fragment approvalEvent on ApprovalEvent { + ...eventFields +} \ No newline at end of file diff --git a/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql b/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql index 13832c95d7..a4d132a140 100644 --- a/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql +++ b/packages/sdk-core/src/subgraph/queries/getAllEvents.graphql @@ -12,6 +12,7 @@ query getAllEvents( orderBy: $orderBy orderDirection: $orderDirection ) { + name ... on FlowUpdatedEvent { # we repeat `...eventFields` in each event so it throws an error in the mapper when an expected event isn't included here ...eventFields @@ -290,7 +291,7 @@ query getAllEvents( minimumDeposit superToken } - + ... on AgreementLiquidatedByEvent { ...eventFields token @@ -374,6 +375,30 @@ query getAllEvents( token additionalBond } + ... on PoolCreatedEvent { + ...eventFields + } + ... on PoolConnectionUpdatedEvent { + ...eventFields + } + ... on BufferAdjustedEvent { + ...eventFields + } + ... on InstantDistributionUpdatedEvent { + ...eventFields + } + ... on FlowDistributionUpdatedEvent { + ...eventFields + } + ... on DistributionClaimedEvent { + ...eventFields + } + ... on MemberUnitsUpdatedEvent { + ...eventFields + } + ... on ApprovalEvent { + ...eventFields + } } } diff --git a/packages/sdk-core/src/subgraph/schema.graphql b/packages/sdk-core/src/subgraph/schema.graphql index 5a73b46bcb..7781fd8a42 100644 --- a/packages/sdk-core/src/subgraph/schema.graphql +++ b/packages/sdk-core/src/subgraph/schema.graphql @@ -21,6 +21,9 @@ type _Block_ { """Integer representation of the timestamp stored in blocks for the chain""" timestamp: Int + + """The hash of the parent block""" + parentHash: Bytes } """The type for the top-level _meta field""" @@ -71,6 +74,8 @@ type Account { outflows(skip: Int = 0, first: Int = 100, orderBy: Stream_orderBy, orderDirection: OrderDirection, where: Stream_filter): [Stream!]! subscriptions(skip: Int = 0, first: Int = 100, orderBy: IndexSubscription_orderBy, orderDirection: OrderDirection, where: IndexSubscription_filter): [IndexSubscription!]! publishedIndexes(skip: Int = 0, first: Int = 100, orderBy: Index_orderBy, orderDirection: OrderDirection, where: Index_filter): [Index!]! + pools(skip: Int = 0, first: Int = 100, orderBy: Pool_orderBy, orderDirection: OrderDirection, where: Pool_filter): [Pool!]! + poolMemberships(skip: Int = 0, first: Int = 100, orderBy: PoolMember_orderBy, orderDirection: OrderDirection, where: PoolMember_filter): [PoolMember!]! sentTransferEvents(skip: Int = 0, first: Int = 100, orderBy: TransferEvent_orderBy, orderDirection: OrderDirection, where: TransferEvent_filter): [TransferEvent!]! receivedTransferEvents(skip: Int = 0, first: Int = 100, orderBy: TransferEvent_orderBy, orderDirection: OrderDirection, where: TransferEvent_filter): [TransferEvent!]! tokenUpgradedEvents(skip: Int = 0, first: Int = 100, orderBy: TokenUpgradedEvent_orderBy, orderDirection: OrderDirection, where: TokenUpgradedEvent_filter): [TokenUpgradedEvent!]! @@ -127,6 +132,8 @@ input Account_filter { outflows_: Stream_filter subscriptions_: IndexSubscription_filter publishedIndexes_: Index_filter + pools_: Pool_filter + poolMemberships_: PoolMember_filter sentTransferEvents_: TransferEvent_filter receivedTransferEvents_: TransferEvent_filter tokenUpgradedEvents_: TokenUpgradedEvent_filter @@ -150,6 +157,8 @@ enum Account_orderBy { outflows subscriptions publishedIndexes + pools + poolMemberships sentTransferEvents receivedTransferEvents tokenUpgradedEvents @@ -167,6 +176,8 @@ type AccountTokenSnapshot { """ id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! updatedAtTimestamp: BigInt! updatedAtBlockNumber: BigInt! @@ -186,37 +197,87 @@ type AccountTokenSnapshot { maybeCriticalAtTimestamp: BigInt """ - The count of currently open streams for an account, both incoming and outgoing. + The count of currently open streams for an account, both incoming and outgoing for all agreements. """ totalNumberOfActiveStreams: Int! """ - The count of active outgoing streams from this account. + The count of currently open streams for an account, both incoming and outgoing for the CFA. + + """ + totalCFANumberOfActiveStreams: Int! + + """ + The count of currently open streams for an account, both incoming and outgoing for the GDA. + + """ + totalGDANumberOfActiveStreams: Int! + + """ + The count of active outgoing streams from this account for all agreements. """ activeOutgoingStreamCount: Int! """ - The count of active incoming streams to this account. + The count of active outgoing streams from this account for the CFA. + + """ + activeCFAOutgoingStreamCount: Int! + + """ + The count of active outgoing streams from this account for the GDA. + + """ + activeGDAOutgoingStreamCount: Int! + + """ + The count of active incoming streams to this account for the CFA. + GDA incoming streams are *NOT* counted here. """ activeIncomingStreamCount: Int! """ - The count of closed streams by `account`, both incoming and outgoing. + The count of closed streams by `account`, both incoming and outgoing for all agreements. """ totalNumberOfClosedStreams: Int! """ - The count of closed outgoing streams by `account`. + The count of closed streams by `account`, both incoming and outgoing for the CFA. + + """ + totalCFANumberOfClosedStreams: Int! + + """ + The count of closed streams by `account`, both incoming and outgoing for the GDA. + + """ + totalGDANumberOfClosedStreams: Int! + + """ + The count of closed outgoing streams by `account` for all agreements. """ inactiveOutgoingStreamCount: Int! """ - The count of closed incoming streams by `account`. + The count of closed outgoing streams by `account` for the CFA. + + """ + inactiveCFAOutgoingStreamCount: Int! + + """ + The count of closed outgoing streams by `account` for the GDA. + + """ + inactiveGDAOutgoingStreamCount: Int! + + """ + The count of closed incoming streams by `account` for the CFA. + Close incoming GDA streams are *NOT* counted here. """ inactiveIncomingStreamCount: Int! @@ -233,6 +294,18 @@ type AccountTokenSnapshot { """ totalApprovedSubscriptions: Int! + """ + The current (as of updatedAt) number of membership with units allocated to them tied to this `account`. + + """ + totalMembershipsWithUnits: Int! + + """ + Counts all currently (as of updatedAt) approved membership whether or not they have units. + + """ + totalConnectedMemberships: Int! + """ Balance of `account` as of `updatedAtTimestamp`/`updatedAtBlock`. @@ -240,47 +313,94 @@ type AccountTokenSnapshot { balanceUntilUpdatedAt: BigInt! """ - The total deposit this account has held by the CFA agreement for `account` active streams. + The total deposit this account has held by all flow agreements for `account` active streams. """ totalDeposit: BigInt! """ - The total net flow rate of the `account` as of `updatedAtTimestamp`/`updatedAtBlock`. + The total deposit this account has held by the CFA agreement for `account` active streams. + + """ + totalCFADeposit: BigInt! + + """ + The total deposit this account has held by the GDA agreement for `account` active streams. + + """ + totalGDADeposit: BigInt! + + """ + The total net flow rate of the `account` as of `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. + This can be obtained by: `totalInflowRate - totalOutflowRate`. + NOTE: this property will NOT be 100% accurate all the time for receivers of GDA flows. """ totalNetFlowRate: BigInt! """ - The total inflow rate (receive flowRate per second) of the `account`. + The total net flow rate of the `account` as of `updatedAtTimestamp`/`updatedAtBlock` for the CFA. + + """ + totalCFANetFlowRate: BigInt! + + """ + The total inflow rate (receive flowRate per second) of the `account` for the CFA. + GDA inflow rate is *NOT* included here. """ totalInflowRate: BigInt! """ - The total outflow rate (send flowrate per second) of the `account`. + The total outflow rate (send flowrate per second) of the `account` for all flow agreements. """ totalOutflowRate: BigInt! """ - The total amount of `token` streamed into this `account` until the `updatedAtTimestamp`/`updatedAtBlock`. + The total outflow rate (send flowrate per second) of the `account` for the CFA. + + """ + totalCFAOutflowRate: BigInt! + + """ + The total outflow rate (send flowrate per second) of the `account` for the GDA. + + """ + totalGDAOutflowRate: BigInt! + + """ + The total amount of `token` streamed into this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the CFA. """ totalAmountStreamedInUntilUpdatedAt: BigInt! """ - The total amount of `token` streamed from this `account` until the `updatedAtTimestamp`/`updatedAtBlock`. + The total amount of `token` streamed from this `account` until the + `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. """ totalAmountStreamedOutUntilUpdatedAt: BigInt! """ - The total amount of `token` streamed through this `account` until the `updatedAtTimestamp`/`updatedAtBlock`. + The total amount of `token` streamed from this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the CFA. + + """ + totalCFAAmountStreamedOutUntilUpdatedAt: BigInt! + + """ + The total amount of `token` streamed through this `account` until the + `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. """ totalAmountStreamedUntilUpdatedAt: BigInt! + """ + The total amount of `token` streamed through this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the CFA. + + """ + totalCFAAmountStreamedUntilUpdatedAt: BigInt! + """ The total amount of `token` this `account` has transferred. @@ -301,6 +421,22 @@ input AccountTokenSnapshot_filter { id_lte: ID id_in: [ID!] id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] updatedAtTimestamp: BigInt updatedAtTimestamp_not: BigInt updatedAtTimestamp_gt: BigInt @@ -337,6 +473,22 @@ input AccountTokenSnapshot_filter { totalNumberOfActiveStreams_lte: Int totalNumberOfActiveStreams_in: [Int!] totalNumberOfActiveStreams_not_in: [Int!] + totalCFANumberOfActiveStreams: Int + totalCFANumberOfActiveStreams_not: Int + totalCFANumberOfActiveStreams_gt: Int + totalCFANumberOfActiveStreams_lt: Int + totalCFANumberOfActiveStreams_gte: Int + totalCFANumberOfActiveStreams_lte: Int + totalCFANumberOfActiveStreams_in: [Int!] + totalCFANumberOfActiveStreams_not_in: [Int!] + totalGDANumberOfActiveStreams: Int + totalGDANumberOfActiveStreams_not: Int + totalGDANumberOfActiveStreams_gt: Int + totalGDANumberOfActiveStreams_lt: Int + totalGDANumberOfActiveStreams_gte: Int + totalGDANumberOfActiveStreams_lte: Int + totalGDANumberOfActiveStreams_in: [Int!] + totalGDANumberOfActiveStreams_not_in: [Int!] activeOutgoingStreamCount: Int activeOutgoingStreamCount_not: Int activeOutgoingStreamCount_gt: Int @@ -345,6 +497,22 @@ input AccountTokenSnapshot_filter { activeOutgoingStreamCount_lte: Int activeOutgoingStreamCount_in: [Int!] activeOutgoingStreamCount_not_in: [Int!] + activeCFAOutgoingStreamCount: Int + activeCFAOutgoingStreamCount_not: Int + activeCFAOutgoingStreamCount_gt: Int + activeCFAOutgoingStreamCount_lt: Int + activeCFAOutgoingStreamCount_gte: Int + activeCFAOutgoingStreamCount_lte: Int + activeCFAOutgoingStreamCount_in: [Int!] + activeCFAOutgoingStreamCount_not_in: [Int!] + activeGDAOutgoingStreamCount: Int + activeGDAOutgoingStreamCount_not: Int + activeGDAOutgoingStreamCount_gt: Int + activeGDAOutgoingStreamCount_lt: Int + activeGDAOutgoingStreamCount_gte: Int + activeGDAOutgoingStreamCount_lte: Int + activeGDAOutgoingStreamCount_in: [Int!] + activeGDAOutgoingStreamCount_not_in: [Int!] activeIncomingStreamCount: Int activeIncomingStreamCount_not: Int activeIncomingStreamCount_gt: Int @@ -361,6 +529,22 @@ input AccountTokenSnapshot_filter { totalNumberOfClosedStreams_lte: Int totalNumberOfClosedStreams_in: [Int!] totalNumberOfClosedStreams_not_in: [Int!] + totalCFANumberOfClosedStreams: Int + totalCFANumberOfClosedStreams_not: Int + totalCFANumberOfClosedStreams_gt: Int + totalCFANumberOfClosedStreams_lt: Int + totalCFANumberOfClosedStreams_gte: Int + totalCFANumberOfClosedStreams_lte: Int + totalCFANumberOfClosedStreams_in: [Int!] + totalCFANumberOfClosedStreams_not_in: [Int!] + totalGDANumberOfClosedStreams: Int + totalGDANumberOfClosedStreams_not: Int + totalGDANumberOfClosedStreams_gt: Int + totalGDANumberOfClosedStreams_lt: Int + totalGDANumberOfClosedStreams_gte: Int + totalGDANumberOfClosedStreams_lte: Int + totalGDANumberOfClosedStreams_in: [Int!] + totalGDANumberOfClosedStreams_not_in: [Int!] inactiveOutgoingStreamCount: Int inactiveOutgoingStreamCount_not: Int inactiveOutgoingStreamCount_gt: Int @@ -369,6 +553,22 @@ input AccountTokenSnapshot_filter { inactiveOutgoingStreamCount_lte: Int inactiveOutgoingStreamCount_in: [Int!] inactiveOutgoingStreamCount_not_in: [Int!] + inactiveCFAOutgoingStreamCount: Int + inactiveCFAOutgoingStreamCount_not: Int + inactiveCFAOutgoingStreamCount_gt: Int + inactiveCFAOutgoingStreamCount_lt: Int + inactiveCFAOutgoingStreamCount_gte: Int + inactiveCFAOutgoingStreamCount_lte: Int + inactiveCFAOutgoingStreamCount_in: [Int!] + inactiveCFAOutgoingStreamCount_not_in: [Int!] + inactiveGDAOutgoingStreamCount: Int + inactiveGDAOutgoingStreamCount_not: Int + inactiveGDAOutgoingStreamCount_gt: Int + inactiveGDAOutgoingStreamCount_lt: Int + inactiveGDAOutgoingStreamCount_gte: Int + inactiveGDAOutgoingStreamCount_lte: Int + inactiveGDAOutgoingStreamCount_in: [Int!] + inactiveGDAOutgoingStreamCount_not_in: [Int!] inactiveIncomingStreamCount: Int inactiveIncomingStreamCount_not: Int inactiveIncomingStreamCount_gt: Int @@ -393,6 +593,22 @@ input AccountTokenSnapshot_filter { totalApprovedSubscriptions_lte: Int totalApprovedSubscriptions_in: [Int!] totalApprovedSubscriptions_not_in: [Int!] + totalMembershipsWithUnits: Int + totalMembershipsWithUnits_not: Int + totalMembershipsWithUnits_gt: Int + totalMembershipsWithUnits_lt: Int + totalMembershipsWithUnits_gte: Int + totalMembershipsWithUnits_lte: Int + totalMembershipsWithUnits_in: [Int!] + totalMembershipsWithUnits_not_in: [Int!] + totalConnectedMemberships: Int + totalConnectedMemberships_not: Int + totalConnectedMemberships_gt: Int + totalConnectedMemberships_lt: Int + totalConnectedMemberships_gte: Int + totalConnectedMemberships_lte: Int + totalConnectedMemberships_in: [Int!] + totalConnectedMemberships_not_in: [Int!] balanceUntilUpdatedAt: BigInt balanceUntilUpdatedAt_not: BigInt balanceUntilUpdatedAt_gt: BigInt @@ -409,6 +625,22 @@ input AccountTokenSnapshot_filter { totalDeposit_lte: BigInt totalDeposit_in: [BigInt!] totalDeposit_not_in: [BigInt!] + totalCFADeposit: BigInt + totalCFADeposit_not: BigInt + totalCFADeposit_gt: BigInt + totalCFADeposit_lt: BigInt + totalCFADeposit_gte: BigInt + totalCFADeposit_lte: BigInt + totalCFADeposit_in: [BigInt!] + totalCFADeposit_not_in: [BigInt!] + totalGDADeposit: BigInt + totalGDADeposit_not: BigInt + totalGDADeposit_gt: BigInt + totalGDADeposit_lt: BigInt + totalGDADeposit_gte: BigInt + totalGDADeposit_lte: BigInt + totalGDADeposit_in: [BigInt!] + totalGDADeposit_not_in: [BigInt!] totalNetFlowRate: BigInt totalNetFlowRate_not: BigInt totalNetFlowRate_gt: BigInt @@ -417,6 +649,14 @@ input AccountTokenSnapshot_filter { totalNetFlowRate_lte: BigInt totalNetFlowRate_in: [BigInt!] totalNetFlowRate_not_in: [BigInt!] + totalCFANetFlowRate: BigInt + totalCFANetFlowRate_not: BigInt + totalCFANetFlowRate_gt: BigInt + totalCFANetFlowRate_lt: BigInt + totalCFANetFlowRate_gte: BigInt + totalCFANetFlowRate_lte: BigInt + totalCFANetFlowRate_in: [BigInt!] + totalCFANetFlowRate_not_in: [BigInt!] totalInflowRate: BigInt totalInflowRate_not: BigInt totalInflowRate_gt: BigInt @@ -433,6 +673,22 @@ input AccountTokenSnapshot_filter { totalOutflowRate_lte: BigInt totalOutflowRate_in: [BigInt!] totalOutflowRate_not_in: [BigInt!] + totalCFAOutflowRate: BigInt + totalCFAOutflowRate_not: BigInt + totalCFAOutflowRate_gt: BigInt + totalCFAOutflowRate_lt: BigInt + totalCFAOutflowRate_gte: BigInt + totalCFAOutflowRate_lte: BigInt + totalCFAOutflowRate_in: [BigInt!] + totalCFAOutflowRate_not_in: [BigInt!] + totalGDAOutflowRate: BigInt + totalGDAOutflowRate_not: BigInt + totalGDAOutflowRate_gt: BigInt + totalGDAOutflowRate_lt: BigInt + totalGDAOutflowRate_gte: BigInt + totalGDAOutflowRate_lte: BigInt + totalGDAOutflowRate_in: [BigInt!] + totalGDAOutflowRate_not_in: [BigInt!] totalAmountStreamedInUntilUpdatedAt: BigInt totalAmountStreamedInUntilUpdatedAt_not: BigInt totalAmountStreamedInUntilUpdatedAt_gt: BigInt @@ -449,6 +705,14 @@ input AccountTokenSnapshot_filter { totalAmountStreamedOutUntilUpdatedAt_lte: BigInt totalAmountStreamedOutUntilUpdatedAt_in: [BigInt!] totalAmountStreamedOutUntilUpdatedAt_not_in: [BigInt!] + totalCFAAmountStreamedOutUntilUpdatedAt: BigInt + totalCFAAmountStreamedOutUntilUpdatedAt_not: BigInt + totalCFAAmountStreamedOutUntilUpdatedAt_gt: BigInt + totalCFAAmountStreamedOutUntilUpdatedAt_lt: BigInt + totalCFAAmountStreamedOutUntilUpdatedAt_gte: BigInt + totalCFAAmountStreamedOutUntilUpdatedAt_lte: BigInt + totalCFAAmountStreamedOutUntilUpdatedAt_in: [BigInt!] + totalCFAAmountStreamedOutUntilUpdatedAt_not_in: [BigInt!] totalAmountStreamedUntilUpdatedAt: BigInt totalAmountStreamedUntilUpdatedAt_not: BigInt totalAmountStreamedUntilUpdatedAt_gt: BigInt @@ -457,6 +721,14 @@ input AccountTokenSnapshot_filter { totalAmountStreamedUntilUpdatedAt_lte: BigInt totalAmountStreamedUntilUpdatedAt_in: [BigInt!] totalAmountStreamedUntilUpdatedAt_not_in: [BigInt!] + totalCFAAmountStreamedUntilUpdatedAt: BigInt + totalCFAAmountStreamedUntilUpdatedAt_not: BigInt + totalCFAAmountStreamedUntilUpdatedAt_gt: BigInt + totalCFAAmountStreamedUntilUpdatedAt_lt: BigInt + totalCFAAmountStreamedUntilUpdatedAt_gte: BigInt + totalCFAAmountStreamedUntilUpdatedAt_lte: BigInt + totalCFAAmountStreamedUntilUpdatedAt_in: [BigInt!] + totalCFAAmountStreamedUntilUpdatedAt_not_in: [BigInt!] totalAmountTransferredUntilUpdatedAt: BigInt totalAmountTransferredUntilUpdatedAt_not: BigInt totalAmountTransferredUntilUpdatedAt_gt: BigInt @@ -518,26 +790,45 @@ input AccountTokenSnapshot_filter { enum AccountTokenSnapshot_orderBy { id + createdAtTimestamp + createdAtBlockNumber updatedAtTimestamp updatedAtBlockNumber isLiquidationEstimateOptimistic maybeCriticalAtTimestamp totalNumberOfActiveStreams + totalCFANumberOfActiveStreams + totalGDANumberOfActiveStreams activeOutgoingStreamCount + activeCFAOutgoingStreamCount + activeGDAOutgoingStreamCount activeIncomingStreamCount totalNumberOfClosedStreams + totalCFANumberOfClosedStreams + totalGDANumberOfClosedStreams inactiveOutgoingStreamCount + inactiveCFAOutgoingStreamCount + inactiveGDAOutgoingStreamCount inactiveIncomingStreamCount totalSubscriptionsWithUnits totalApprovedSubscriptions + totalMembershipsWithUnits + totalConnectedMemberships balanceUntilUpdatedAt totalDeposit + totalCFADeposit + totalGDADeposit totalNetFlowRate + totalCFANetFlowRate totalInflowRate totalOutflowRate + totalCFAOutflowRate + totalGDAOutflowRate totalAmountStreamedInUntilUpdatedAt totalAmountStreamedOutUntilUpdatedAt + totalCFAAmountStreamedOutUntilUpdatedAt totalAmountStreamedUntilUpdatedAt + totalCFAAmountStreamedUntilUpdatedAt totalAmountTransferredUntilUpdatedAt account account__id @@ -581,37 +872,86 @@ type AccountTokenSnapshotLog { maybeCriticalAtTimestamp: BigInt """ - The current (as of timestamp) number of open streams. + The current (as of timestamp) number of open streams for all agreements. """ totalNumberOfActiveStreams: Int! """ - The count of active outgoing streams from this account. + The current (as of timestamp) number of open streams. + + """ + totalCFANumberOfActiveStreams: Int! + + """ + The current (as of timestamp) number of open streams. + + """ + totalGDANumberOfActiveStreams: Int! + + """ + The count of active outgoing streams from this account for all agreements. """ activeOutgoingStreamCount: Int! """ - The count of active incoming streams to this account. + The count of active outgoing streams from this account. + + """ + activeCFAOutgoingStreamCount: Int! + + """ + The count of active outgoing streams from this account. + + """ + activeGDAOutgoingStreamCount: Int! + + """ + The count of active incoming streams to this account for all agreements. """ activeIncomingStreamCount: Int! """ - The current (as of timestamp) count of closed streams. + The current (as of timestamp) count of closed streams for all agreements. """ totalNumberOfClosedStreams: Int! """ - The count of closed outgoing streams by `account`. + The current (as of timestamp) count of closed streams for the CFA. + + """ + totalCFANumberOfClosedStreams: Int! + + """ + The current (as of timestamp) count of closed streams for the GDA. + + """ + totalGDANumberOfClosedStreams: Int! + + """ + The count of closed outgoing streams by `account` for all agreements. """ inactiveOutgoingStreamCount: Int! """ - The count of closed incoming streams by `account`. + The count of closed outgoing streams by `account` for the CFA. + + """ + inactiveCFAOutgoingStreamCount: Int! + + """ + The count of closed outgoing streams by `account` for the GDA. + + """ + inactiveGDAOutgoingStreamCount: Int! + + """ + The count of closed incoming streams by `account` for the CFA. + Close incoming GDA streams are *NOT* counted here. """ inactiveIncomingStreamCount: Int! @@ -628,6 +968,18 @@ type AccountTokenSnapshotLog { """ totalApprovedSubscriptions: Int! + """ + The current (as of timestamp) number of membership with units allocated to them tied to this `account`. + + """ + totalMembershipsWithUnits: Int! + + """ + Counts all currently (as of timestamp) connected membership whether or not they have units. + + """ + totalConnectedMemberships: Int! + """ Balance of `account` as of `timestamp`/`block`. @@ -635,11 +987,23 @@ type AccountTokenSnapshotLog { balance: BigInt! """ - The total (as of timestamp) deposit this account has held by the CFA agreement for `account` active streams. + The total (as of timestamp) deposit this account has held by all flow agreements for `account` active streams. """ totalDeposit: BigInt! + """ + The total (as of timestamp) deposit this account has held by the CFA agreement for `account` active streams. + + """ + totalCFADeposit: BigInt! + + """ + The total (as of timestamp) deposit this account has held by the GDA agreement for `account` active streams. + + """ + totalGDADeposit: BigInt! + """ The total (as of timestamp) net flow rate of the `account` as of `timestamp`/`block`. This can be obtained by: `totalInflowRate - totalOutflowRate` @@ -647,6 +1011,12 @@ type AccountTokenSnapshotLog { """ totalNetFlowRate: BigInt! + """ + The total (as of timestamp) net flow rate of the `account` as of `timestamp`/`block` for the CFA. + + """ + totalCFANetFlowRate: BigInt! + """ The total (as of timestamp) inflow rate (receive flowRate per second) of the `account`. @@ -659,6 +1029,18 @@ type AccountTokenSnapshotLog { """ totalOutflowRate: BigInt! + """ + The total (as of timestamp) outflow rate (send flowrate per second) of the `account` for the CFA. + + """ + totalCFAOutflowRate: BigInt! + + """ + The total (as of timestamp) outflow rate (send flowrate per second) of the `account` for the GDA. + + """ + totalGDAOutflowRate: BigInt! + """ The total (as of timestamp) amount of `token` streamed into this `account` until the `timestamp`/`block`. @@ -671,12 +1053,25 @@ type AccountTokenSnapshotLog { """ totalAmountStreamedOut: BigInt! + """ + The total (as of timestamp) amount of `token` streamed from this `account` until the `timestamp`/`block` for the CFA. + + """ + totalCFAAmountStreamedOut: BigInt! + """ The total (as of timestamp) net amount of `token` streamed through this `account` until the `timestamp`/`block`. """ totalAmountStreamed: BigInt! + """ + The total (as of timestamp) net amount of `token` streamed through this + `account` until the `timestamp`/`block` for the CFA. + + """ + totalCFAAmountStreamed: BigInt! + """ The total (as of timestamp) amount of `token` this `account` has transferred out until the `timestamp`/`block`. @@ -774,6 +1169,22 @@ input AccountTokenSnapshotLog_filter { totalNumberOfActiveStreams_lte: Int totalNumberOfActiveStreams_in: [Int!] totalNumberOfActiveStreams_not_in: [Int!] + totalCFANumberOfActiveStreams: Int + totalCFANumberOfActiveStreams_not: Int + totalCFANumberOfActiveStreams_gt: Int + totalCFANumberOfActiveStreams_lt: Int + totalCFANumberOfActiveStreams_gte: Int + totalCFANumberOfActiveStreams_lte: Int + totalCFANumberOfActiveStreams_in: [Int!] + totalCFANumberOfActiveStreams_not_in: [Int!] + totalGDANumberOfActiveStreams: Int + totalGDANumberOfActiveStreams_not: Int + totalGDANumberOfActiveStreams_gt: Int + totalGDANumberOfActiveStreams_lt: Int + totalGDANumberOfActiveStreams_gte: Int + totalGDANumberOfActiveStreams_lte: Int + totalGDANumberOfActiveStreams_in: [Int!] + totalGDANumberOfActiveStreams_not_in: [Int!] activeOutgoingStreamCount: Int activeOutgoingStreamCount_not: Int activeOutgoingStreamCount_gt: Int @@ -782,6 +1193,22 @@ input AccountTokenSnapshotLog_filter { activeOutgoingStreamCount_lte: Int activeOutgoingStreamCount_in: [Int!] activeOutgoingStreamCount_not_in: [Int!] + activeCFAOutgoingStreamCount: Int + activeCFAOutgoingStreamCount_not: Int + activeCFAOutgoingStreamCount_gt: Int + activeCFAOutgoingStreamCount_lt: Int + activeCFAOutgoingStreamCount_gte: Int + activeCFAOutgoingStreamCount_lte: Int + activeCFAOutgoingStreamCount_in: [Int!] + activeCFAOutgoingStreamCount_not_in: [Int!] + activeGDAOutgoingStreamCount: Int + activeGDAOutgoingStreamCount_not: Int + activeGDAOutgoingStreamCount_gt: Int + activeGDAOutgoingStreamCount_lt: Int + activeGDAOutgoingStreamCount_gte: Int + activeGDAOutgoingStreamCount_lte: Int + activeGDAOutgoingStreamCount_in: [Int!] + activeGDAOutgoingStreamCount_not_in: [Int!] activeIncomingStreamCount: Int activeIncomingStreamCount_not: Int activeIncomingStreamCount_gt: Int @@ -798,6 +1225,22 @@ input AccountTokenSnapshotLog_filter { totalNumberOfClosedStreams_lte: Int totalNumberOfClosedStreams_in: [Int!] totalNumberOfClosedStreams_not_in: [Int!] + totalCFANumberOfClosedStreams: Int + totalCFANumberOfClosedStreams_not: Int + totalCFANumberOfClosedStreams_gt: Int + totalCFANumberOfClosedStreams_lt: Int + totalCFANumberOfClosedStreams_gte: Int + totalCFANumberOfClosedStreams_lte: Int + totalCFANumberOfClosedStreams_in: [Int!] + totalCFANumberOfClosedStreams_not_in: [Int!] + totalGDANumberOfClosedStreams: Int + totalGDANumberOfClosedStreams_not: Int + totalGDANumberOfClosedStreams_gt: Int + totalGDANumberOfClosedStreams_lt: Int + totalGDANumberOfClosedStreams_gte: Int + totalGDANumberOfClosedStreams_lte: Int + totalGDANumberOfClosedStreams_in: [Int!] + totalGDANumberOfClosedStreams_not_in: [Int!] inactiveOutgoingStreamCount: Int inactiveOutgoingStreamCount_not: Int inactiveOutgoingStreamCount_gt: Int @@ -806,6 +1249,22 @@ input AccountTokenSnapshotLog_filter { inactiveOutgoingStreamCount_lte: Int inactiveOutgoingStreamCount_in: [Int!] inactiveOutgoingStreamCount_not_in: [Int!] + inactiveCFAOutgoingStreamCount: Int + inactiveCFAOutgoingStreamCount_not: Int + inactiveCFAOutgoingStreamCount_gt: Int + inactiveCFAOutgoingStreamCount_lt: Int + inactiveCFAOutgoingStreamCount_gte: Int + inactiveCFAOutgoingStreamCount_lte: Int + inactiveCFAOutgoingStreamCount_in: [Int!] + inactiveCFAOutgoingStreamCount_not_in: [Int!] + inactiveGDAOutgoingStreamCount: Int + inactiveGDAOutgoingStreamCount_not: Int + inactiveGDAOutgoingStreamCount_gt: Int + inactiveGDAOutgoingStreamCount_lt: Int + inactiveGDAOutgoingStreamCount_gte: Int + inactiveGDAOutgoingStreamCount_lte: Int + inactiveGDAOutgoingStreamCount_in: [Int!] + inactiveGDAOutgoingStreamCount_not_in: [Int!] inactiveIncomingStreamCount: Int inactiveIncomingStreamCount_not: Int inactiveIncomingStreamCount_gt: Int @@ -830,6 +1289,22 @@ input AccountTokenSnapshotLog_filter { totalApprovedSubscriptions_lte: Int totalApprovedSubscriptions_in: [Int!] totalApprovedSubscriptions_not_in: [Int!] + totalMembershipsWithUnits: Int + totalMembershipsWithUnits_not: Int + totalMembershipsWithUnits_gt: Int + totalMembershipsWithUnits_lt: Int + totalMembershipsWithUnits_gte: Int + totalMembershipsWithUnits_lte: Int + totalMembershipsWithUnits_in: [Int!] + totalMembershipsWithUnits_not_in: [Int!] + totalConnectedMemberships: Int + totalConnectedMemberships_not: Int + totalConnectedMemberships_gt: Int + totalConnectedMemberships_lt: Int + totalConnectedMemberships_gte: Int + totalConnectedMemberships_lte: Int + totalConnectedMemberships_in: [Int!] + totalConnectedMemberships_not_in: [Int!] balance: BigInt balance_not: BigInt balance_gt: BigInt @@ -846,6 +1321,22 @@ input AccountTokenSnapshotLog_filter { totalDeposit_lte: BigInt totalDeposit_in: [BigInt!] totalDeposit_not_in: [BigInt!] + totalCFADeposit: BigInt + totalCFADeposit_not: BigInt + totalCFADeposit_gt: BigInt + totalCFADeposit_lt: BigInt + totalCFADeposit_gte: BigInt + totalCFADeposit_lte: BigInt + totalCFADeposit_in: [BigInt!] + totalCFADeposit_not_in: [BigInt!] + totalGDADeposit: BigInt + totalGDADeposit_not: BigInt + totalGDADeposit_gt: BigInt + totalGDADeposit_lt: BigInt + totalGDADeposit_gte: BigInt + totalGDADeposit_lte: BigInt + totalGDADeposit_in: [BigInt!] + totalGDADeposit_not_in: [BigInt!] totalNetFlowRate: BigInt totalNetFlowRate_not: BigInt totalNetFlowRate_gt: BigInt @@ -854,6 +1345,14 @@ input AccountTokenSnapshotLog_filter { totalNetFlowRate_lte: BigInt totalNetFlowRate_in: [BigInt!] totalNetFlowRate_not_in: [BigInt!] + totalCFANetFlowRate: BigInt + totalCFANetFlowRate_not: BigInt + totalCFANetFlowRate_gt: BigInt + totalCFANetFlowRate_lt: BigInt + totalCFANetFlowRate_gte: BigInt + totalCFANetFlowRate_lte: BigInt + totalCFANetFlowRate_in: [BigInt!] + totalCFANetFlowRate_not_in: [BigInt!] totalInflowRate: BigInt totalInflowRate_not: BigInt totalInflowRate_gt: BigInt @@ -870,6 +1369,22 @@ input AccountTokenSnapshotLog_filter { totalOutflowRate_lte: BigInt totalOutflowRate_in: [BigInt!] totalOutflowRate_not_in: [BigInt!] + totalCFAOutflowRate: BigInt + totalCFAOutflowRate_not: BigInt + totalCFAOutflowRate_gt: BigInt + totalCFAOutflowRate_lt: BigInt + totalCFAOutflowRate_gte: BigInt + totalCFAOutflowRate_lte: BigInt + totalCFAOutflowRate_in: [BigInt!] + totalCFAOutflowRate_not_in: [BigInt!] + totalGDAOutflowRate: BigInt + totalGDAOutflowRate_not: BigInt + totalGDAOutflowRate_gt: BigInt + totalGDAOutflowRate_lt: BigInt + totalGDAOutflowRate_gte: BigInt + totalGDAOutflowRate_lte: BigInt + totalGDAOutflowRate_in: [BigInt!] + totalGDAOutflowRate_not_in: [BigInt!] totalAmountStreamedIn: BigInt totalAmountStreamedIn_not: BigInt totalAmountStreamedIn_gt: BigInt @@ -886,6 +1401,14 @@ input AccountTokenSnapshotLog_filter { totalAmountStreamedOut_lte: BigInt totalAmountStreamedOut_in: [BigInt!] totalAmountStreamedOut_not_in: [BigInt!] + totalCFAAmountStreamedOut: BigInt + totalCFAAmountStreamedOut_not: BigInt + totalCFAAmountStreamedOut_gt: BigInt + totalCFAAmountStreamedOut_lt: BigInt + totalCFAAmountStreamedOut_gte: BigInt + totalCFAAmountStreamedOut_lte: BigInt + totalCFAAmountStreamedOut_in: [BigInt!] + totalCFAAmountStreamedOut_not_in: [BigInt!] totalAmountStreamed: BigInt totalAmountStreamed_not: BigInt totalAmountStreamed_gt: BigInt @@ -894,6 +1417,14 @@ input AccountTokenSnapshotLog_filter { totalAmountStreamed_lte: BigInt totalAmountStreamed_in: [BigInt!] totalAmountStreamed_not_in: [BigInt!] + totalCFAAmountStreamed: BigInt + totalCFAAmountStreamed_not: BigInt + totalCFAAmountStreamed_gt: BigInt + totalCFAAmountStreamed_lt: BigInt + totalCFAAmountStreamed_gte: BigInt + totalCFAAmountStreamed_lte: BigInt + totalCFAAmountStreamed_in: [BigInt!] + totalCFAAmountStreamed_not_in: [BigInt!] totalAmountTransferred: BigInt totalAmountTransferred_not: BigInt totalAmountTransferred_gt: BigInt @@ -982,21 +1513,38 @@ enum AccountTokenSnapshotLog_orderBy { triggeredByEventName maybeCriticalAtTimestamp totalNumberOfActiveStreams + totalCFANumberOfActiveStreams + totalGDANumberOfActiveStreams activeOutgoingStreamCount + activeCFAOutgoingStreamCount + activeGDAOutgoingStreamCount activeIncomingStreamCount totalNumberOfClosedStreams + totalCFANumberOfClosedStreams + totalGDANumberOfClosedStreams inactiveOutgoingStreamCount + inactiveCFAOutgoingStreamCount + inactiveGDAOutgoingStreamCount inactiveIncomingStreamCount totalSubscriptionsWithUnits totalApprovedSubscriptions + totalMembershipsWithUnits + totalConnectedMemberships balance totalDeposit + totalCFADeposit + totalGDADeposit totalNetFlowRate + totalCFANetFlowRate totalInflowRate totalOutflowRate + totalCFAOutflowRate + totalGDAOutflowRate totalAmountStreamedIn totalAmountStreamedOut + totalCFAAmountStreamedOut totalAmountStreamed + totalCFAAmountStreamed totalAmountTransferred account account__id @@ -1018,29 +1566,53 @@ enum AccountTokenSnapshotLog_orderBy { token__underlyingAddress accountTokenSnapshot accountTokenSnapshot__id + accountTokenSnapshot__createdAtTimestamp + accountTokenSnapshot__createdAtBlockNumber accountTokenSnapshot__updatedAtTimestamp accountTokenSnapshot__updatedAtBlockNumber accountTokenSnapshot__isLiquidationEstimateOptimistic accountTokenSnapshot__maybeCriticalAtTimestamp accountTokenSnapshot__totalNumberOfActiveStreams + accountTokenSnapshot__totalCFANumberOfActiveStreams + accountTokenSnapshot__totalGDANumberOfActiveStreams accountTokenSnapshot__activeOutgoingStreamCount + accountTokenSnapshot__activeCFAOutgoingStreamCount + accountTokenSnapshot__activeGDAOutgoingStreamCount accountTokenSnapshot__activeIncomingStreamCount accountTokenSnapshot__totalNumberOfClosedStreams + accountTokenSnapshot__totalCFANumberOfClosedStreams + accountTokenSnapshot__totalGDANumberOfClosedStreams accountTokenSnapshot__inactiveOutgoingStreamCount + accountTokenSnapshot__inactiveCFAOutgoingStreamCount + accountTokenSnapshot__inactiveGDAOutgoingStreamCount accountTokenSnapshot__inactiveIncomingStreamCount accountTokenSnapshot__totalSubscriptionsWithUnits accountTokenSnapshot__totalApprovedSubscriptions + accountTokenSnapshot__totalMembershipsWithUnits + accountTokenSnapshot__totalConnectedMemberships accountTokenSnapshot__balanceUntilUpdatedAt accountTokenSnapshot__totalDeposit + accountTokenSnapshot__totalCFADeposit + accountTokenSnapshot__totalGDADeposit accountTokenSnapshot__totalNetFlowRate + accountTokenSnapshot__totalCFANetFlowRate accountTokenSnapshot__totalInflowRate accountTokenSnapshot__totalOutflowRate + accountTokenSnapshot__totalCFAOutflowRate + accountTokenSnapshot__totalGDAOutflowRate accountTokenSnapshot__totalAmountStreamedInUntilUpdatedAt accountTokenSnapshot__totalAmountStreamedOutUntilUpdatedAt + accountTokenSnapshot__totalCFAAmountStreamedOutUntilUpdatedAt accountTokenSnapshot__totalAmountStreamedUntilUpdatedAt + accountTokenSnapshot__totalCFAAmountStreamedUntilUpdatedAt accountTokenSnapshot__totalAmountTransferredUntilUpdatedAt } +enum Aggregation_interval { + hour + day +} + type AgreementClassRegisteredEvent implements Event { id: ID! transactionHash: Bytes! @@ -1050,7 +1622,8 @@ type AgreementClassRegisteredEvent implements Event { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `code` """ addresses: [Bytes!]! @@ -1205,7 +1778,8 @@ type AgreementClassUpdatedEvent implements Event { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `code` """ addresses: [Bytes!]! @@ -1918,7 +2492,8 @@ type AppRegisteredEvent implements Event { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `app` """ addresses: [Bytes!]! @@ -2052,21 +2627,7 @@ enum AppRegisteredEvent_orderBy { app } -scalar BigDecimal - -scalar BigInt - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -input BlockChangedFilter { - number_gte: Int! -} - -type BondIncreasedEvent implements Event { +type ApprovalEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -2077,6 +2638,8 @@ type BondIncreasedEvent implements Event { """ Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) + addresses[1] = `owner` + addresses[2] = `to` """ addresses: [Bytes!]! @@ -2085,19 +2648,26 @@ type BondIncreasedEvent implements Event { order: BigInt! """ - The address of the `token` (supertoken). + The address that will be granting allowance to transfer ERC20. """ - token: Bytes! + owner: Account! """ - The additional amount added to the bond by the current Patrician In Charge (PIC). + The address that will be granted allowance to transfer ERC20. """ - additionalBond: BigInt! + to: Account! + + """ + If `amount` is non-zero, this event was emitted for the approval of an ERC20. + Tne amount of ERC20 tokens that will be granted allowance to transfer. + + """ + amount: BigInt! } -input BondIncreasedEvent_filter { +input ApprovalEvent_filter { id: ID id_not: ID id_gt: ID @@ -2190,32 +2760,64 @@ input BondIncreasedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - token: Bytes - token_not: Bytes - token_gt: Bytes - token_lt: Bytes - token_gte: Bytes - token_lte: Bytes - token_in: [Bytes!] - token_not_in: [Bytes!] - token_contains: Bytes - token_not_contains: Bytes - additionalBond: BigInt - additionalBond_not: BigInt - additionalBond_gt: BigInt - additionalBond_lt: BigInt - additionalBond_gte: BigInt - additionalBond_lte: BigInt - additionalBond_in: [BigInt!] - additionalBond_not_in: [BigInt!] + owner: String + owner_not: String + owner_gt: String + owner_lt: String + owner_gte: String + owner_lte: String + owner_in: [String!] + owner_not_in: [String!] + owner_contains: String + owner_contains_nocase: String + owner_not_contains: String + owner_not_contains_nocase: String + owner_starts_with: String + owner_starts_with_nocase: String + owner_not_starts_with: String + owner_not_starts_with_nocase: String + owner_ends_with: String + owner_ends_with_nocase: String + owner_not_ends_with: String + owner_not_ends_with_nocase: String + owner_: Account_filter + to: String + to_not: String + to_gt: String + to_lt: String + to_gte: String + to_lte: String + to_in: [String!] + to_not_in: [String!] + to_contains: String + to_contains_nocase: String + to_not_contains: String + to_not_contains_nocase: String + to_starts_with: String + to_starts_with_nocase: String + to_not_starts_with: String + to_not_starts_with_nocase: String + to_ends_with: String + to_ends_with_nocase: String + to_not_ends_with: String + to_not_ends_with_nocase: String + to_: Account_filter + amount: BigInt + amount_not: BigInt + amount_gt: BigInt + amount_lt: BigInt + amount_gte: BigInt + amount_lte: BigInt + amount_in: [BigInt!] + amount_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [BondIncreasedEvent_filter] - or: [BondIncreasedEvent_filter] + and: [ApprovalEvent_filter] + or: [ApprovalEvent_filter] } -enum BondIncreasedEvent_orderBy { +enum ApprovalEvent_orderBy { id transactionHash gasPrice @@ -2226,11 +2828,38 @@ enum BondIncreasedEvent_orderBy { blockNumber logIndex order - token - additionalBond -} + owner + owner__id + owner__createdAtTimestamp + owner__createdAtBlockNumber + owner__updatedAtTimestamp + owner__updatedAtBlockNumber + owner__isSuperApp + to + to__id + to__createdAtTimestamp + to__createdAtBlockNumber + to__updatedAtTimestamp + to__updatedAtBlockNumber + to__isSuperApp + amount +} -type BurnedEvent implements Event { +scalar BigDecimal + +scalar BigInt + +input Block_height { + hash: Bytes + number: Int + number_gte: Int +} + +input BlockChangedFilter { + number_gte: Int! +} + +type BondIncreasedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -2241,22 +2870,27 @@ type BurnedEvent implements Event { """ Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) - addresses[1] = `from` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - operator: Bytes! - from: Bytes! + + """ + The address of the `token` (supertoken). + + """ token: Bytes! - amount: BigInt! - data: Bytes! - operatorData: Bytes! + + """ + The additional amount added to the bond by the current Patrician In Charge (PIC). + + """ + additionalBond: BigInt! } -input BurnedEvent_filter { +input BondIncreasedEvent_filter { id: ID id_not: ID id_gt: ID @@ -2349,26 +2983,6 @@ input BurnedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - operator: Bytes - operator_not: Bytes - operator_gt: Bytes - operator_lt: Bytes - operator_gte: Bytes - operator_lte: Bytes - operator_in: [Bytes!] - operator_not_in: [Bytes!] - operator_contains: Bytes - operator_not_contains: Bytes - from: Bytes - from_not: Bytes - from_gt: Bytes - from_lt: Bytes - from_gte: Bytes - from_lte: Bytes - from_in: [Bytes!] - from_not_in: [Bytes!] - from_contains: Bytes - from_not_contains: Bytes token: Bytes token_not: Bytes token_gt: Bytes @@ -2379,42 +2993,22 @@ input BurnedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - data: Bytes - data_not: Bytes - data_gt: Bytes - data_lt: Bytes - data_gte: Bytes - data_lte: Bytes - data_in: [Bytes!] - data_not_in: [Bytes!] - data_contains: Bytes - data_not_contains: Bytes - operatorData: Bytes - operatorData_not: Bytes - operatorData_gt: Bytes - operatorData_lt: Bytes - operatorData_gte: Bytes - operatorData_lte: Bytes - operatorData_in: [Bytes!] - operatorData_not_in: [Bytes!] - operatorData_contains: Bytes - operatorData_not_contains: Bytes + additionalBond: BigInt + additionalBond_not: BigInt + additionalBond_gt: BigInt + additionalBond_lt: BigInt + additionalBond_gte: BigInt + additionalBond_lte: BigInt + additionalBond_in: [BigInt!] + additionalBond_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [BurnedEvent_filter] - or: [BurnedEvent_filter] + and: [BondIncreasedEvent_filter] + or: [BondIncreasedEvent_filter] } -enum BurnedEvent_orderBy { +enum BondIncreasedEvent_orderBy { id transactionHash gasPrice @@ -2425,17 +3019,11 @@ enum BurnedEvent_orderBy { blockNumber logIndex order - operator - from token - amount - data - operatorData + additionalBond } -scalar Bytes - -type CFAv1LiquidationPeriodChangedEvent implements Event { +type BufferAdjustedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -2444,26 +3032,26 @@ type CFAv1LiquidationPeriodChangedEvent implements Event { name: String! """ - The address of the governance contract the event was emitted from. - - """ - governanceAddress: Bytes! - - """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `distributor` + addresses[3] = `operator` """ addresses: [Bytes!]! blockNumber: BigInt! - order: BigInt! logIndex: BigInt! - host: Bytes! - superToken: Bytes! - isKeySet: Boolean! - liquidationPeriod: BigInt! + order: BigInt! + token: Bytes! + bufferDelta: BigInt! + newBufferAmount: BigInt! + totalBufferAmount: BigInt! + pool: Pool! + poolDistributor: PoolDistributor! } -input CFAv1LiquidationPeriodChangedEvent_filter { +input BufferAdjustedEvent_filter { id: ID id_not: ID id_gt: ID @@ -2526,16 +3114,6 @@ input CFAv1LiquidationPeriodChangedEvent_filter { name_ends_with_nocase: String name_not_ends_with: String name_not_ends_with_nocase: String - governanceAddress: Bytes - governanceAddress_not: Bytes - governanceAddress_gt: Bytes - governanceAddress_lt: Bytes - governanceAddress_gte: Bytes - governanceAddress_lte: Bytes - governanceAddress_in: [Bytes!] - governanceAddress_not_in: [Bytes!] - governanceAddress_contains: Bytes - governanceAddress_not_contains: Bytes addresses: [Bytes!] addresses_not: [Bytes!] addresses_contains: [Bytes!] @@ -2550,14 +3128,6 @@ input CFAv1LiquidationPeriodChangedEvent_filter { blockNumber_lte: BigInt blockNumber_in: [BigInt!] blockNumber_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] logIndex: BigInt logIndex_not: BigInt logIndex_gt: BigInt @@ -2566,64 +3136,147 @@ input CFAv1LiquidationPeriodChangedEvent_filter { logIndex_lte: BigInt logIndex_in: [BigInt!] logIndex_not_in: [BigInt!] - host: Bytes - host_not: Bytes - host_gt: Bytes - host_lt: Bytes - host_gte: Bytes - host_lte: Bytes - host_in: [Bytes!] - host_not_in: [Bytes!] - host_contains: Bytes - host_not_contains: Bytes - superToken: Bytes - superToken_not: Bytes - superToken_gt: Bytes - superToken_lt: Bytes - superToken_gte: Bytes - superToken_lte: Bytes - superToken_in: [Bytes!] - superToken_not_in: [Bytes!] - superToken_contains: Bytes - superToken_not_contains: Bytes - isKeySet: Boolean - isKeySet_not: Boolean - isKeySet_in: [Boolean!] - isKeySet_not_in: [Boolean!] - liquidationPeriod: BigInt - liquidationPeriod_not: BigInt - liquidationPeriod_gt: BigInt - liquidationPeriod_lt: BigInt - liquidationPeriod_gte: BigInt - liquidationPeriod_lte: BigInt - liquidationPeriod_in: [BigInt!] - liquidationPeriod_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + bufferDelta: BigInt + bufferDelta_not: BigInt + bufferDelta_gt: BigInt + bufferDelta_lt: BigInt + bufferDelta_gte: BigInt + bufferDelta_lte: BigInt + bufferDelta_in: [BigInt!] + bufferDelta_not_in: [BigInt!] + newBufferAmount: BigInt + newBufferAmount_not: BigInt + newBufferAmount_gt: BigInt + newBufferAmount_lt: BigInt + newBufferAmount_gte: BigInt + newBufferAmount_lte: BigInt + newBufferAmount_in: [BigInt!] + newBufferAmount_not_in: [BigInt!] + totalBufferAmount: BigInt + totalBufferAmount_not: BigInt + totalBufferAmount_gt: BigInt + totalBufferAmount_lt: BigInt + totalBufferAmount_gte: BigInt + totalBufferAmount_lte: BigInt + totalBufferAmount_in: [BigInt!] + totalBufferAmount_not_in: [BigInt!] + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolDistributor: String + poolDistributor_not: String + poolDistributor_gt: String + poolDistributor_lt: String + poolDistributor_gte: String + poolDistributor_lte: String + poolDistributor_in: [String!] + poolDistributor_not_in: [String!] + poolDistributor_contains: String + poolDistributor_contains_nocase: String + poolDistributor_not_contains: String + poolDistributor_not_contains_nocase: String + poolDistributor_starts_with: String + poolDistributor_starts_with_nocase: String + poolDistributor_not_starts_with: String + poolDistributor_not_starts_with_nocase: String + poolDistributor_ends_with: String + poolDistributor_ends_with_nocase: String + poolDistributor_not_ends_with: String + poolDistributor_not_ends_with_nocase: String + poolDistributor_: PoolDistributor_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [CFAv1LiquidationPeriodChangedEvent_filter] - or: [CFAv1LiquidationPeriodChangedEvent_filter] + and: [BufferAdjustedEvent_filter] + or: [BufferAdjustedEvent_filter] } -enum CFAv1LiquidationPeriodChangedEvent_orderBy { +enum BufferAdjustedEvent_orderBy { id transactionHash gasPrice gasUsed timestamp name - governanceAddress addresses blockNumber - order logIndex - host - superToken - isKeySet - liquidationPeriod + order + token + bufferDelta + newBufferAmount + totalBufferAmount + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolDistributor + poolDistributor__id + poolDistributor__createdAtTimestamp + poolDistributor__createdAtBlockNumber + poolDistributor__updatedAtTimestamp + poolDistributor__updatedAtBlockNumber + poolDistributor__totalAmountInstantlyDistributedUntilUpdatedAt + poolDistributor__totalAmountFlowedDistributedUntilUpdatedAt + poolDistributor__totalAmountDistributedUntilUpdatedAt + poolDistributor__totalBuffer + poolDistributor__flowRate } -type ConfigChangedEvent implements Event { +type BurnedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -2632,27 +3285,24 @@ type ConfigChangedEvent implements Event { name: String! """ - The address of the governance contract the event was emitted from. - - """ - governanceAddress: Bytes! - - """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `from` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - host: Bytes! - superToken: Bytes! - key: Bytes! - isKeySet: Boolean! - value: BigInt! + operator: Bytes! + from: Bytes! + token: Bytes! + amount: BigInt! + data: Bytes! + operatorData: Bytes! } -input ConfigChangedEvent_filter { +input BurnedEvent_filter { id: ID id_not: ID id_gt: ID @@ -2715,16 +3365,6 @@ input ConfigChangedEvent_filter { name_ends_with_nocase: String name_not_ends_with: String name_not_ends_with_nocase: String - governanceAddress: Bytes - governanceAddress_not: Bytes - governanceAddress_gt: Bytes - governanceAddress_lt: Bytes - governanceAddress_gte: Bytes - governanceAddress_lte: Bytes - governanceAddress_in: [Bytes!] - governanceAddress_not_in: [Bytes!] - governanceAddress_contains: Bytes - governanceAddress_not_contains: Bytes addresses: [Bytes!] addresses_not: [Bytes!] addresses_contains: [Bytes!] @@ -2755,75 +3395,93 @@ input ConfigChangedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - host: Bytes - host_not: Bytes - host_gt: Bytes - host_lt: Bytes - host_gte: Bytes - host_lte: Bytes - host_in: [Bytes!] - host_not_in: [Bytes!] - host_contains: Bytes - host_not_contains: Bytes - superToken: Bytes - superToken_not: Bytes - superToken_gt: Bytes - superToken_lt: Bytes - superToken_gte: Bytes - superToken_lte: Bytes - superToken_in: [Bytes!] - superToken_not_in: [Bytes!] - superToken_contains: Bytes - superToken_not_contains: Bytes - key: Bytes - key_not: Bytes - key_gt: Bytes - key_lt: Bytes - key_gte: Bytes - key_lte: Bytes - key_in: [Bytes!] - key_not_in: [Bytes!] - key_contains: Bytes - key_not_contains: Bytes - isKeySet: Boolean - isKeySet_not: Boolean - isKeySet_in: [Boolean!] - isKeySet_not_in: [Boolean!] - value: BigInt - value_not: BigInt - value_gt: BigInt - value_lt: BigInt - value_gte: BigInt - value_lte: BigInt - value_in: [BigInt!] - value_not_in: [BigInt!] + operator: Bytes + operator_not: Bytes + operator_gt: Bytes + operator_lt: Bytes + operator_gte: Bytes + operator_lte: Bytes + operator_in: [Bytes!] + operator_not_in: [Bytes!] + operator_contains: Bytes + operator_not_contains: Bytes + from: Bytes + from_not: Bytes + from_gt: Bytes + from_lt: Bytes + from_gte: Bytes + from_lte: Bytes + from_in: [Bytes!] + from_not_in: [Bytes!] + from_contains: Bytes + from_not_contains: Bytes + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + amount: BigInt + amount_not: BigInt + amount_gt: BigInt + amount_lt: BigInt + amount_gte: BigInt + amount_lte: BigInt + amount_in: [BigInt!] + amount_not_in: [BigInt!] + data: Bytes + data_not: Bytes + data_gt: Bytes + data_lt: Bytes + data_gte: Bytes + data_lte: Bytes + data_in: [Bytes!] + data_not_in: [Bytes!] + data_contains: Bytes + data_not_contains: Bytes + operatorData: Bytes + operatorData_not: Bytes + operatorData_gt: Bytes + operatorData_lt: Bytes + operatorData_gte: Bytes + operatorData_lte: Bytes + operatorData_in: [Bytes!] + operatorData_not_in: [Bytes!] + operatorData_contains: Bytes + operatorData_not_contains: Bytes """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [ConfigChangedEvent_filter] - or: [ConfigChangedEvent_filter] + and: [BurnedEvent_filter] + or: [BurnedEvent_filter] } -enum ConfigChangedEvent_orderBy { +enum BurnedEvent_orderBy { id transactionHash gasPrice gasUsed timestamp name - governanceAddress addresses blockNumber logIndex order - host - superToken - key - isKeySet - value + operator + from + token + amount + data + operatorData } -type CustomSuperTokenCreatedEvent implements Event { +scalar Bytes + +type CFAv1LiquidationPeriodChangedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -2831,19 +3489,30 @@ type CustomSuperTokenCreatedEvent implements Event { timestamp: BigInt! name: String! + """ + The address of the governance contract the event was emitted from. + + """ + governanceAddress: Bytes! + """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken) + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ addresses: [Bytes!]! blockNumber: BigInt! - logIndex: BigInt! order: BigInt! - token: Bytes! + logIndex: BigInt! + host: Bytes! + superToken: Bytes! + isKeySet: Boolean! + liquidationPeriod: BigInt! } -input CustomSuperTokenCreatedEvent_filter { +input CFAv1LiquidationPeriodChangedEvent_filter { id: ID id_not: ID id_gt: ID @@ -2906,6 +3575,16 @@ input CustomSuperTokenCreatedEvent_filter { name_ends_with_nocase: String name_not_ends_with: String name_not_ends_with_nocase: String + governanceAddress: Bytes + governanceAddress_not: Bytes + governanceAddress_gt: Bytes + governanceAddress_lt: Bytes + governanceAddress_gte: Bytes + governanceAddress_lte: Bytes + governanceAddress_in: [Bytes!] + governanceAddress_not_in: [Bytes!] + governanceAddress_contains: Bytes + governanceAddress_not_contains: Bytes addresses: [Bytes!] addresses_not: [Bytes!] addresses_contains: [Bytes!] @@ -2920,14 +3599,6 @@ input CustomSuperTokenCreatedEvent_filter { blockNumber_lte: BigInt blockNumber_in: [BigInt!] blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] order: BigInt order_not: BigInt order_gt: BigInt @@ -2936,107 +3607,104 @@ input CustomSuperTokenCreatedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - token: Bytes - token_not: Bytes - token_gt: Bytes - token_lt: Bytes - token_gte: Bytes - token_lte: Bytes - token_in: [Bytes!] - token_not_in: [Bytes!] - token_contains: Bytes - token_not_contains: Bytes + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + host: Bytes + host_not: Bytes + host_gt: Bytes + host_lt: Bytes + host_gte: Bytes + host_lte: Bytes + host_in: [Bytes!] + host_not_in: [Bytes!] + host_contains: Bytes + host_not_contains: Bytes + superToken: Bytes + superToken_not: Bytes + superToken_gt: Bytes + superToken_lt: Bytes + superToken_gte: Bytes + superToken_lte: Bytes + superToken_in: [Bytes!] + superToken_not_in: [Bytes!] + superToken_contains: Bytes + superToken_not_contains: Bytes + isKeySet: Boolean + isKeySet_not: Boolean + isKeySet_in: [Boolean!] + isKeySet_not_in: [Boolean!] + liquidationPeriod: BigInt + liquidationPeriod_not: BigInt + liquidationPeriod_gt: BigInt + liquidationPeriod_lt: BigInt + liquidationPeriod_gte: BigInt + liquidationPeriod_lte: BigInt + liquidationPeriod_in: [BigInt!] + liquidationPeriod_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [CustomSuperTokenCreatedEvent_filter] - or: [CustomSuperTokenCreatedEvent_filter] + and: [CFAv1LiquidationPeriodChangedEvent_filter] + or: [CFAv1LiquidationPeriodChangedEvent_filter] } -enum CustomSuperTokenCreatedEvent_orderBy { +enum CFAv1LiquidationPeriodChangedEvent_orderBy { id transactionHash gasPrice gasUsed timestamp name + governanceAddress addresses blockNumber - logIndex order - token + logIndex + host + superToken + isKeySet + liquidationPeriod } -""" -Event: An interface which is shared by all event entities and contains basic transaction data. - -""" -interface Event { - """ - The id of the event entity. - - """ +type ConfigChangedEvent implements Event { id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! """ - The block number which the event was logged in. + The address of the governance contract the event was emitted from. """ - blockNumber: BigInt! + governanceAddress: Bytes! """ - The index of the event, e.g. first event emitted would have `logIndex` of 0. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ + addresses: [Bytes!]! + blockNumber: BigInt! logIndex: BigInt! - - """ - A number used internally to sort the order of transactions. - The formula: `blockNumber * ORDER_MULTIPLIER + logIndex` - where: ORDER_MULTIPLIER = 10000 - - """ order: BigInt! + host: Bytes! + superToken: Bytes! + key: Bytes! + isKeySet: Boolean! + value: BigInt! +} - """ - The name of the event - is a 1-to-1 match with the name in our smart contracts. - - """ - name: String! - - """ - Contains the addresses for accounts that were "impacted" by the event. - This typically involves accounts which experienced a state change as a result of the transaction which emitted this event. - - """ - addresses: [Bytes!]! - - """ - The block timestamp which the event was logged in. - - """ - timestamp: BigInt! - - """ - The transaction hash of the transaction that the event was logged in. - - """ - transactionHash: Bytes! - - """ - The gas price of the transaction that the event was logged in. - - """ - gasPrice: BigInt! - - """ - The gas used for this transaction. - - """ - gasUsed: BigInt! -} - -input Event_filter { +input ConfigChangedEvent_filter { id: ID id_not: ID id_gt: ID @@ -3045,64 +3713,6 @@ input Event_filter { id_lte: ID id_in: [ID!] id_not_in: [ID!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] transactionHash: Bytes transactionHash_not: Bytes transactionHash_gt: Bytes @@ -3129,27 +3739,143 @@ input Event_filter { gasUsed_lte: BigInt gasUsed_in: [BigInt!] gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + governanceAddress: Bytes + governanceAddress_not: Bytes + governanceAddress_gt: Bytes + governanceAddress_lt: Bytes + governanceAddress_gte: Bytes + governanceAddress_lte: Bytes + governanceAddress_in: [Bytes!] + governanceAddress_not_in: [Bytes!] + governanceAddress_contains: Bytes + governanceAddress_not_contains: Bytes + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + host: Bytes + host_not: Bytes + host_gt: Bytes + host_lt: Bytes + host_gte: Bytes + host_lte: Bytes + host_in: [Bytes!] + host_not_in: [Bytes!] + host_contains: Bytes + host_not_contains: Bytes + superToken: Bytes + superToken_not: Bytes + superToken_gt: Bytes + superToken_lt: Bytes + superToken_gte: Bytes + superToken_lte: Bytes + superToken_in: [Bytes!] + superToken_not_in: [Bytes!] + superToken_contains: Bytes + superToken_not_contains: Bytes + key: Bytes + key_not: Bytes + key_gt: Bytes + key_lt: Bytes + key_gte: Bytes + key_lte: Bytes + key_in: [Bytes!] + key_not_in: [Bytes!] + key_contains: Bytes + key_not_contains: Bytes + isKeySet: Boolean + isKeySet_not: Boolean + isKeySet_in: [Boolean!] + isKeySet_not_in: [Boolean!] + value: BigInt + value_not: BigInt + value_gt: BigInt + value_lt: BigInt + value_gte: BigInt + value_lte: BigInt + value_in: [BigInt!] + value_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [Event_filter] - or: [Event_filter] + and: [ConfigChangedEvent_filter] + or: [ConfigChangedEvent_filter] } -enum Event_orderBy { +enum ConfigChangedEvent_orderBy { id - blockNumber - logIndex - order - name - addresses - timestamp transactionHash gasPrice gasUsed + timestamp + name + governanceAddress + addresses + blockNumber + logIndex + order + host + superToken + key + isKeySet + value } -type ExitRateChangedEvent implements Event { +type CustomSuperTokenCreatedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -3166,21 +3892,10 @@ type ExitRateChangedEvent implements Event { blockNumber: BigInt! logIndex: BigInt! order: BigInt! - - """ - The address of the `token` (supertoken). - - """ token: Bytes! - - """ - The flowrate at which the bond is streamed back to the Patrician In Charge. - - """ - exitRate: BigInt! } -input ExitRateChangedEvent_filter { +input CustomSuperTokenCreatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -3283,22 +3998,14 @@ input ExitRateChangedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - exitRate: BigInt - exitRate_not: BigInt - exitRate_gt: BigInt - exitRate_lt: BigInt - exitRate_gte: BigInt - exitRate_lte: BigInt - exitRate_in: [BigInt!] - exitRate_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [ExitRateChangedEvent_filter] - or: [ExitRateChangedEvent_filter] + and: [CustomSuperTokenCreatedEvent_filter] + or: [CustomSuperTokenCreatedEvent_filter] } -enum ExitRateChangedEvent_orderBy { +enum CustomSuperTokenCreatedEvent_orderBy { id transactionHash gasPrice @@ -3310,64 +4017,322 @@ enum ExitRateChangedEvent_orderBy { logIndex order token - exitRate } -""" -FlowOperator: A higher order entity that of a flow operator for an `AccountTokenSnapshot`. - -""" -type FlowOperator { +type DistributionClaimedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + """ - ID composed of: flowOperator-token-sender + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `member` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + token: Bytes! + claimedAmount: BigInt! + totalClaimed: BigInt! + pool: Pool! + poolMember: PoolMember! +} + +input DistributionClaimedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + claimedAmount: BigInt + claimedAmount_not: BigInt + claimedAmount_gt: BigInt + claimedAmount_lt: BigInt + claimedAmount_gte: BigInt + claimedAmount_lte: BigInt + claimedAmount_in: [BigInt!] + claimedAmount_not_in: [BigInt!] + totalClaimed: BigInt + totalClaimed_not: BigInt + totalClaimed_gt: BigInt + totalClaimed_lt: BigInt + totalClaimed_gte: BigInt + totalClaimed_lte: BigInt + totalClaimed_in: [BigInt!] + totalClaimed_not_in: [BigInt!] + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolMember: String + poolMember_not: String + poolMember_gt: String + poolMember_lt: String + poolMember_gte: String + poolMember_lte: String + poolMember_in: [String!] + poolMember_not_in: [String!] + poolMember_contains: String + poolMember_contains_nocase: String + poolMember_not_contains: String + poolMember_not_contains_nocase: String + poolMember_starts_with: String + poolMember_starts_with_nocase: String + poolMember_not_starts_with: String + poolMember_not_starts_with_nocase: String + poolMember_ends_with: String + poolMember_ends_with_nocase: String + poolMember_not_ends_with: String + poolMember_not_ends_with_nocase: String + poolMember_: PoolMember_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [DistributionClaimedEvent_filter] + or: [DistributionClaimedEvent_filter] +} + +enum DistributionClaimedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + claimedAmount + totalClaimed + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolMember + poolMember__id + poolMember__createdAtTimestamp + poolMember__createdAtBlockNumber + poolMember__updatedAtTimestamp + poolMember__updatedAtBlockNumber + poolMember__units + poolMember__isConnected + poolMember__totalAmountClaimed + poolMember__poolTotalAmountDistributedUntilUpdatedAt + poolMember__totalAmountReceivedUntilUpdatedAt + poolMember__syncedPerUnitSettledValue + poolMember__syncedPerUnitFlowRate +} + +""" +Event: An interface which is shared by all event entities and contains basic transaction data. + +""" +interface Event { + """ + The id of the event entity. """ id: ID! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - updatedAtTimestamp: BigInt! - updatedAtBlockNumber: BigInt! """ - The permissions granted to the `flowOperator`. - Bitmask representation: - Delete | Update | Create - | D | U | C | - | 0 | 0 | 0 | + The block number which the event was logged in. """ - permissions: Int! + blockNumber: BigInt! """ - The flow rate allowance granted to the `flowOperator` by the `sender`. This - can be reset if the `sender` updates the `flowOperator` flow rate allowance. + The index of the event, e.g. first event emitted would have `logIndex` of 0. """ - flowRateAllowanceGranted: BigInt! + logIndex: BigInt! """ - The remaining flow rate allowance the `flowOperator` has. - This will go down every time when the `flowOperator` uses the allowance, that - is, if they increase flowRate for `sender` or create a new flow on behalf of `sender`. - It can only be reset if the `sender` updates the flow rate allowance. - NOTE: this value will NOT go down if max flow rate allowance is set. + A number used internally to sort the order of transactions. + The formula: `blockNumber * ORDER_MULTIPLIER + logIndex` + where: ORDER_MULTIPLIER = 10000 """ - flowRateAllowanceRemaining: BigInt! + order: BigInt! """ - The transfer allowance granted to the `flowOperator` by the `sender`. + The name of the event - is a 1-to-1 match with the name in our smart contracts. """ - allowance: BigInt! - flowOperator: Bytes! - sender: Account! - token: Token! - accountTokenSnapshot: AccountTokenSnapshot! - flowOperatorUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: FlowOperatorUpdatedEvent_orderBy, orderDirection: OrderDirection, where: FlowOperatorUpdatedEvent_filter): [FlowOperatorUpdatedEvent!]! + name: String! + + """ + Contains the addresses for accounts that were "impacted" by the event. + This typically involves accounts which experienced a state change as a result of the transaction which emitted this event. + + """ + addresses: [Bytes!]! + + """ + The block timestamp which the event was logged in. + + """ + timestamp: BigInt! + + """ + The transaction hash of the transaction that the event was logged in. + + """ + transactionHash: Bytes! + + """ + The gas price of the transaction that the event was logged in. + + """ + gasPrice: BigInt! + + """ + The gas used for this transaction. + + """ + gasUsed: BigInt! } -input FlowOperator_filter { +input Event_filter { id: ID id_not: ID id_gt: ID @@ -3376,207 +4341,111 @@ input FlowOperator_filter { id_lte: ID id_in: [ID!] id_not_in: [ID!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - createdAtBlockNumber: BigInt - createdAtBlockNumber_not: BigInt - createdAtBlockNumber_gt: BigInt - createdAtBlockNumber_lt: BigInt - createdAtBlockNumber_gte: BigInt - createdAtBlockNumber_lte: BigInt - createdAtBlockNumber_in: [BigInt!] - createdAtBlockNumber_not_in: [BigInt!] - updatedAtTimestamp: BigInt - updatedAtTimestamp_not: BigInt - updatedAtTimestamp_gt: BigInt - updatedAtTimestamp_lt: BigInt - updatedAtTimestamp_gte: BigInt - updatedAtTimestamp_lte: BigInt - updatedAtTimestamp_in: [BigInt!] - updatedAtTimestamp_not_in: [BigInt!] - updatedAtBlockNumber: BigInt - updatedAtBlockNumber_not: BigInt - updatedAtBlockNumber_gt: BigInt - updatedAtBlockNumber_lt: BigInt - updatedAtBlockNumber_gte: BigInt - updatedAtBlockNumber_lte: BigInt - updatedAtBlockNumber_in: [BigInt!] - updatedAtBlockNumber_not_in: [BigInt!] - permissions: Int - permissions_not: Int - permissions_gt: Int - permissions_lt: Int - permissions_gte: Int - permissions_lte: Int - permissions_in: [Int!] - permissions_not_in: [Int!] - flowRateAllowanceGranted: BigInt - flowRateAllowanceGranted_not: BigInt - flowRateAllowanceGranted_gt: BigInt - flowRateAllowanceGranted_lt: BigInt - flowRateAllowanceGranted_gte: BigInt - flowRateAllowanceGranted_lte: BigInt - flowRateAllowanceGranted_in: [BigInt!] - flowRateAllowanceGranted_not_in: [BigInt!] - flowRateAllowanceRemaining: BigInt - flowRateAllowanceRemaining_not: BigInt - flowRateAllowanceRemaining_gt: BigInt - flowRateAllowanceRemaining_lt: BigInt - flowRateAllowanceRemaining_gte: BigInt - flowRateAllowanceRemaining_lte: BigInt - flowRateAllowanceRemaining_in: [BigInt!] - flowRateAllowanceRemaining_not_in: [BigInt!] - allowance: BigInt - allowance_not: BigInt - allowance_gt: BigInt - allowance_lt: BigInt - allowance_gte: BigInt - allowance_lte: BigInt - allowance_in: [BigInt!] - allowance_not_in: [BigInt!] - flowOperator: Bytes - flowOperator_not: Bytes - flowOperator_gt: Bytes - flowOperator_lt: Bytes - flowOperator_gte: Bytes - flowOperator_lte: Bytes - flowOperator_in: [Bytes!] - flowOperator_not_in: [Bytes!] - flowOperator_contains: Bytes - flowOperator_not_contains: Bytes - sender: String - sender_not: String - sender_gt: String - sender_lt: String - sender_gte: String - sender_lte: String - sender_in: [String!] - sender_not_in: [String!] - sender_contains: String - sender_contains_nocase: String - sender_not_contains: String - sender_not_contains_nocase: String - sender_starts_with: String - sender_starts_with_nocase: String - sender_not_starts_with: String - sender_not_starts_with_nocase: String - sender_ends_with: String - sender_ends_with_nocase: String - sender_not_ends_with: String - sender_not_ends_with_nocase: String - sender_: Account_filter - token: String - token_not: String - token_gt: String - token_lt: String - token_gte: String - token_lte: String - token_in: [String!] - token_not_in: [String!] - token_contains: String - token_contains_nocase: String - token_not_contains: String - token_not_contains_nocase: String - token_starts_with: String - token_starts_with_nocase: String - token_not_starts_with: String - token_not_starts_with_nocase: String - token_ends_with: String - token_ends_with_nocase: String - token_not_ends_with: String - token_not_ends_with_nocase: String - token_: Token_filter - accountTokenSnapshot: String - accountTokenSnapshot_not: String - accountTokenSnapshot_gt: String - accountTokenSnapshot_lt: String - accountTokenSnapshot_gte: String - accountTokenSnapshot_lte: String - accountTokenSnapshot_in: [String!] - accountTokenSnapshot_not_in: [String!] - accountTokenSnapshot_contains: String - accountTokenSnapshot_contains_nocase: String - accountTokenSnapshot_not_contains: String - accountTokenSnapshot_not_contains_nocase: String - accountTokenSnapshot_starts_with: String - accountTokenSnapshot_starts_with_nocase: String - accountTokenSnapshot_not_starts_with: String - accountTokenSnapshot_not_starts_with_nocase: String - accountTokenSnapshot_ends_with: String - accountTokenSnapshot_ends_with_nocase: String - accountTokenSnapshot_not_ends_with: String - accountTokenSnapshot_not_ends_with_nocase: String - accountTokenSnapshot_: AccountTokenSnapshot_filter - flowOperatorUpdatedEvents_: FlowOperatorUpdatedEvent_filter + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [FlowOperator_filter] - or: [FlowOperator_filter] + and: [Event_filter] + or: [Event_filter] } -enum FlowOperator_orderBy { +enum Event_orderBy { id - createdAtTimestamp - createdAtBlockNumber - updatedAtTimestamp - updatedAtBlockNumber - permissions - flowRateAllowanceGranted - flowRateAllowanceRemaining - allowance - flowOperator - sender - sender__id - sender__createdAtTimestamp - sender__createdAtBlockNumber - sender__updatedAtTimestamp - sender__updatedAtBlockNumber - sender__isSuperApp - token - token__id - token__createdAtTimestamp - token__createdAtBlockNumber - token__decimals - token__name - token__symbol - token__isSuperToken - token__isNativeAssetSuperToken - token__isListed - token__underlyingAddress - accountTokenSnapshot - accountTokenSnapshot__id - accountTokenSnapshot__updatedAtTimestamp - accountTokenSnapshot__updatedAtBlockNumber - accountTokenSnapshot__isLiquidationEstimateOptimistic - accountTokenSnapshot__maybeCriticalAtTimestamp - accountTokenSnapshot__totalNumberOfActiveStreams - accountTokenSnapshot__activeOutgoingStreamCount - accountTokenSnapshot__activeIncomingStreamCount - accountTokenSnapshot__totalNumberOfClosedStreams - accountTokenSnapshot__inactiveOutgoingStreamCount - accountTokenSnapshot__inactiveIncomingStreamCount - accountTokenSnapshot__totalSubscriptionsWithUnits - accountTokenSnapshot__totalApprovedSubscriptions - accountTokenSnapshot__balanceUntilUpdatedAt - accountTokenSnapshot__totalDeposit - accountTokenSnapshot__totalNetFlowRate - accountTokenSnapshot__totalInflowRate - accountTokenSnapshot__totalOutflowRate - accountTokenSnapshot__totalAmountStreamedInUntilUpdatedAt - accountTokenSnapshot__totalAmountStreamedOutUntilUpdatedAt - accountTokenSnapshot__totalAmountStreamedUntilUpdatedAt - accountTokenSnapshot__totalAmountTransferredUntilUpdatedAt - flowOperatorUpdatedEvents + blockNumber + logIndex + order + name + addresses + timestamp + transactionHash + gasPrice + gasUsed } -type FlowOperatorUpdatedEvent implements Event { +type ExitRateChangedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -3587,8 +4456,6 @@ type FlowOperatorUpdatedEvent implements Event { """ Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) - addresses[1] = sender - addresses[2] = `flowOperator` """ addresses: [Bytes!]! @@ -3597,23 +4464,19 @@ type FlowOperatorUpdatedEvent implements Event { order: BigInt! """ - The address of the `token` being streamed. + The address of the `token` (supertoken). """ token: Bytes! - sender: Bytes! """ - The permissions granted to the `flowOperator`. - Octo bitmask representation. + The flowrate at which the bond is streamed back to the Patrician In Charge. """ - permissions: Int! - flowRateAllowance: BigInt! - flowOperator: FlowOperator! + exitRate: BigInt! } -input FlowOperatorUpdatedEvent_filter { +input ExitRateChangedEvent_filter { id: ID id_not: ID id_gt: ID @@ -3716,61 +4579,22 @@ input FlowOperatorUpdatedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - permissions: Int - permissions_not: Int - permissions_gt: Int - permissions_lt: Int - permissions_gte: Int - permissions_lte: Int - permissions_in: [Int!] - permissions_not_in: [Int!] - flowRateAllowance: BigInt - flowRateAllowance_not: BigInt - flowRateAllowance_gt: BigInt - flowRateAllowance_lt: BigInt - flowRateAllowance_gte: BigInt - flowRateAllowance_lte: BigInt - flowRateAllowance_in: [BigInt!] - flowRateAllowance_not_in: [BigInt!] - flowOperator: String - flowOperator_not: String - flowOperator_gt: String - flowOperator_lt: String - flowOperator_gte: String - flowOperator_lte: String - flowOperator_in: [String!] - flowOperator_not_in: [String!] - flowOperator_contains: String - flowOperator_contains_nocase: String - flowOperator_not_contains: String - flowOperator_not_contains_nocase: String - flowOperator_starts_with: String - flowOperator_starts_with_nocase: String - flowOperator_not_starts_with: String - flowOperator_not_starts_with_nocase: String - flowOperator_ends_with: String - flowOperator_ends_with_nocase: String - flowOperator_not_ends_with: String - flowOperator_not_ends_with_nocase: String - flowOperator_: FlowOperator_filter + exitRate: BigInt + exitRate_not: BigInt + exitRate_gt: BigInt + exitRate_lt: BigInt + exitRate_gte: BigInt + exitRate_lte: BigInt + exitRate_in: [BigInt!] + exitRate_not_in: [BigInt!] """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [FlowOperatorUpdatedEvent_filter] - or: [FlowOperatorUpdatedEvent_filter] + and: [ExitRateChangedEvent_filter] + or: [ExitRateChangedEvent_filter] } -enum FlowOperatorUpdatedEvent_orderBy { +enum ExitRateChangedEvent_orderBy { id transactionHash gasPrice @@ -3782,28 +4606,10 @@ enum FlowOperatorUpdatedEvent_orderBy { logIndex order token - sender - permissions - flowRateAllowance - flowOperator - flowOperator__id - flowOperator__createdAtTimestamp - flowOperator__createdAtBlockNumber - flowOperator__updatedAtTimestamp - flowOperator__updatedAtBlockNumber - flowOperator__permissions - flowOperator__flowRateAllowanceGranted - flowOperator__flowRateAllowanceRemaining - flowOperator__allowance - flowOperator__flowOperator + exitRate } -""" -FlowUpdated: An `Event` entity that is emitted -when a flow is created, updated, or deleted. - -""" -type FlowUpdatedEvent implements Event { +type FlowDistributionUpdatedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -3813,101 +4619,30 @@ type FlowUpdatedEvent implements Event { """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (supertoken) - addresses[1] = `sender` - addresses[2] = `receiver` + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `poolDistributor` + addresses[3] = `operator` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - - """ - The address of the `token` (supertoken) being streamed. - - """ token: Bytes! - - """ - The address of the flow sender. - - """ - sender: Bytes! - - """ - The address of the flow receiver. - - """ - receiver: Bytes! - - """ - The address that is executing the flow update transaction. - This will be the zero address until the flowOperator feature is live. - - """ - flowOperator: Bytes! - - """ - The flow rate per second. - - """ - flowRate: BigInt! - - """ - The total (global/account level) flow rate of `sender` for `token` as of this event. - - """ - totalSenderFlowRate: BigInt! - - """ - The total (global/account level) flow rate of `receiver` for `token` as of this event. - - """ - totalReceiverFlowRate: BigInt! - - """ - The deposit amount put up for the creation of the flow. - - """ - deposit: BigInt! - - """ - Arbitrary bytes (additional data) passed upon flow creation. - - """ - userData: Bytes! - - """ - The previous flow rate, the absolute (positive) value. - - """ + operator: Bytes! oldFlowRate: BigInt! - - """ - The "type" of the `FlowUpdated` event. - 0 = create - 1 = update - 2 = terminate - - """ - type: Int! - - """ - The total amount streamed until the timestamp - for the Stream entity linked to this event. - - """ - totalAmountStreamedUntilTimestamp: BigInt! - - """ - The stream entity which is being modified. - - """ - stream: Stream! + newDistributorToPoolFlowRate: BigInt! + newTotalDistributionFlowRate: BigInt! + adjustmentFlowRecipient: Bytes! + adjustmentFlowRate: BigInt! + totalUnits: BigInt! + userData: Bytes! + pool: Pool! + poolDistributor: PoolDistributor! } -input FlowUpdatedEvent_filter { +input FlowDistributionUpdatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -4010,131 +4745,126 @@ input FlowUpdatedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - receiver: Bytes - receiver_not: Bytes - receiver_gt: Bytes - receiver_lt: Bytes - receiver_gte: Bytes - receiver_lte: Bytes - receiver_in: [Bytes!] - receiver_not_in: [Bytes!] - receiver_contains: Bytes - receiver_not_contains: Bytes - flowOperator: Bytes - flowOperator_not: Bytes - flowOperator_gt: Bytes - flowOperator_lt: Bytes - flowOperator_gte: Bytes - flowOperator_lte: Bytes - flowOperator_in: [Bytes!] - flowOperator_not_in: [Bytes!] - flowOperator_contains: Bytes - flowOperator_not_contains: Bytes - flowRate: BigInt - flowRate_not: BigInt - flowRate_gt: BigInt - flowRate_lt: BigInt - flowRate_gte: BigInt - flowRate_lte: BigInt - flowRate_in: [BigInt!] - flowRate_not_in: [BigInt!] - totalSenderFlowRate: BigInt - totalSenderFlowRate_not: BigInt - totalSenderFlowRate_gt: BigInt - totalSenderFlowRate_lt: BigInt - totalSenderFlowRate_gte: BigInt - totalSenderFlowRate_lte: BigInt - totalSenderFlowRate_in: [BigInt!] - totalSenderFlowRate_not_in: [BigInt!] - totalReceiverFlowRate: BigInt - totalReceiverFlowRate_not: BigInt - totalReceiverFlowRate_gt: BigInt - totalReceiverFlowRate_lt: BigInt - totalReceiverFlowRate_gte: BigInt - totalReceiverFlowRate_lte: BigInt - totalReceiverFlowRate_in: [BigInt!] - totalReceiverFlowRate_not_in: [BigInt!] - deposit: BigInt - deposit_not: BigInt - deposit_gt: BigInt - deposit_lt: BigInt - deposit_gte: BigInt - deposit_lte: BigInt - deposit_in: [BigInt!] - deposit_not_in: [BigInt!] - userData: Bytes - userData_not: Bytes - userData_gt: Bytes - userData_lt: Bytes - userData_gte: Bytes - userData_lte: Bytes - userData_in: [Bytes!] - userData_not_in: [Bytes!] - userData_contains: Bytes - userData_not_contains: Bytes - oldFlowRate: BigInt - oldFlowRate_not: BigInt - oldFlowRate_gt: BigInt - oldFlowRate_lt: BigInt - oldFlowRate_gte: BigInt + operator: Bytes + operator_not: Bytes + operator_gt: Bytes + operator_lt: Bytes + operator_gte: Bytes + operator_lte: Bytes + operator_in: [Bytes!] + operator_not_in: [Bytes!] + operator_contains: Bytes + operator_not_contains: Bytes + oldFlowRate: BigInt + oldFlowRate_not: BigInt + oldFlowRate_gt: BigInt + oldFlowRate_lt: BigInt + oldFlowRate_gte: BigInt oldFlowRate_lte: BigInt oldFlowRate_in: [BigInt!] oldFlowRate_not_in: [BigInt!] - type: Int - type_not: Int - type_gt: Int - type_lt: Int - type_gte: Int - type_lte: Int - type_in: [Int!] - type_not_in: [Int!] - totalAmountStreamedUntilTimestamp: BigInt - totalAmountStreamedUntilTimestamp_not: BigInt - totalAmountStreamedUntilTimestamp_gt: BigInt - totalAmountStreamedUntilTimestamp_lt: BigInt - totalAmountStreamedUntilTimestamp_gte: BigInt - totalAmountStreamedUntilTimestamp_lte: BigInt - totalAmountStreamedUntilTimestamp_in: [BigInt!] - totalAmountStreamedUntilTimestamp_not_in: [BigInt!] - stream: String - stream_not: String - stream_gt: String - stream_lt: String - stream_gte: String - stream_lte: String - stream_in: [String!] - stream_not_in: [String!] - stream_contains: String - stream_contains_nocase: String - stream_not_contains: String - stream_not_contains_nocase: String - stream_starts_with: String - stream_starts_with_nocase: String - stream_not_starts_with: String - stream_not_starts_with_nocase: String - stream_ends_with: String - stream_ends_with_nocase: String - stream_not_ends_with: String - stream_not_ends_with_nocase: String - stream_: Stream_filter + newDistributorToPoolFlowRate: BigInt + newDistributorToPoolFlowRate_not: BigInt + newDistributorToPoolFlowRate_gt: BigInt + newDistributorToPoolFlowRate_lt: BigInt + newDistributorToPoolFlowRate_gte: BigInt + newDistributorToPoolFlowRate_lte: BigInt + newDistributorToPoolFlowRate_in: [BigInt!] + newDistributorToPoolFlowRate_not_in: [BigInt!] + newTotalDistributionFlowRate: BigInt + newTotalDistributionFlowRate_not: BigInt + newTotalDistributionFlowRate_gt: BigInt + newTotalDistributionFlowRate_lt: BigInt + newTotalDistributionFlowRate_gte: BigInt + newTotalDistributionFlowRate_lte: BigInt + newTotalDistributionFlowRate_in: [BigInt!] + newTotalDistributionFlowRate_not_in: [BigInt!] + adjustmentFlowRecipient: Bytes + adjustmentFlowRecipient_not: Bytes + adjustmentFlowRecipient_gt: Bytes + adjustmentFlowRecipient_lt: Bytes + adjustmentFlowRecipient_gte: Bytes + adjustmentFlowRecipient_lte: Bytes + adjustmentFlowRecipient_in: [Bytes!] + adjustmentFlowRecipient_not_in: [Bytes!] + adjustmentFlowRecipient_contains: Bytes + adjustmentFlowRecipient_not_contains: Bytes + adjustmentFlowRate: BigInt + adjustmentFlowRate_not: BigInt + adjustmentFlowRate_gt: BigInt + adjustmentFlowRate_lt: BigInt + adjustmentFlowRate_gte: BigInt + adjustmentFlowRate_lte: BigInt + adjustmentFlowRate_in: [BigInt!] + adjustmentFlowRate_not_in: [BigInt!] + totalUnits: BigInt + totalUnits_not: BigInt + totalUnits_gt: BigInt + totalUnits_lt: BigInt + totalUnits_gte: BigInt + totalUnits_lte: BigInt + totalUnits_in: [BigInt!] + totalUnits_not_in: [BigInt!] + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolDistributor: String + poolDistributor_not: String + poolDistributor_gt: String + poolDistributor_lt: String + poolDistributor_gte: String + poolDistributor_lte: String + poolDistributor_in: [String!] + poolDistributor_not_in: [String!] + poolDistributor_contains: String + poolDistributor_contains_nocase: String + poolDistributor_not_contains: String + poolDistributor_not_contains_nocase: String + poolDistributor_starts_with: String + poolDistributor_starts_with_nocase: String + poolDistributor_not_starts_with: String + poolDistributor_not_starts_with_nocase: String + poolDistributor_ends_with: String + poolDistributor_ends_with_nocase: String + poolDistributor_not_ends_with: String + poolDistributor_not_ends_with_nocase: String + poolDistributor_: PoolDistributor_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [FlowUpdatedEvent_filter] - or: [FlowUpdatedEvent_filter] + and: [FlowDistributionUpdatedEvent_filter] + or: [FlowDistributionUpdatedEvent_filter] } -enum FlowUpdatedEvent_orderBy { +enum FlowDistributionUpdatedEvent_orderBy { id transactionHash gasPrice @@ -4146,261 +4876,103 @@ enum FlowUpdatedEvent_orderBy { logIndex order token - sender - receiver - flowOperator - flowRate - totalSenderFlowRate - totalReceiverFlowRate - deposit - userData + operator oldFlowRate - type - totalAmountStreamedUntilTimestamp - stream - stream__id - stream__createdAtTimestamp - stream__createdAtBlockNumber - stream__updatedAtTimestamp - stream__updatedAtBlockNumber - stream__currentFlowRate - stream__deposit - stream__streamedUntilUpdatedAt - stream__userData + newDistributorToPoolFlowRate + newTotalDistributionFlowRate + adjustmentFlowRecipient + adjustmentFlowRate + totalUnits + userData + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolDistributor + poolDistributor__id + poolDistributor__createdAtTimestamp + poolDistributor__createdAtBlockNumber + poolDistributor__updatedAtTimestamp + poolDistributor__updatedAtBlockNumber + poolDistributor__totalAmountInstantlyDistributedUntilUpdatedAt + poolDistributor__totalAmountFlowedDistributedUntilUpdatedAt + poolDistributor__totalAmountDistributedUntilUpdatedAt + poolDistributor__totalBuffer + poolDistributor__flowRate } -type GovernanceReplacedEvent implements Event { +""" +FlowOperator: A higher order entity that of a flow operator for an `AccountTokenSnapshot`. + +""" +type FlowOperator { + """ + ID composed of: flowOperator-token-sender + + """ id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! """ - Empty addresses array. + The permissions granted to the `flowOperator`. + Bitmask representation: + Delete | Update | Create + | D | U | C | + | 0 | 0 | 0 | """ - addresses: [Bytes!]! - oldGovernance: Bytes! - newGovernance: Bytes! + permissions: Int! + + """ + The flow rate allowance granted to the `flowOperator` by the `sender`. This + can be reset if the `sender` updates the `flowOperator` flow rate allowance. + + """ + flowRateAllowanceGranted: BigInt! + + """ + The remaining flow rate allowance the `flowOperator` has. + This will go down every time when the `flowOperator` uses the allowance, that + is, if they increase flowRate for `sender` or create a new flow on behalf of `sender`. + It can only be reset if the `sender` updates the flow rate allowance. + NOTE: this value will NOT go down if max flow rate allowance is set. + + """ + flowRateAllowanceRemaining: BigInt! + + """ + The transfer allowance granted to the `flowOperator` by the `sender`. + + """ + allowance: BigInt! + flowOperator: Bytes! + sender: Account! + token: Token! + accountTokenSnapshot: AccountTokenSnapshot! + flowOperatorUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: FlowOperatorUpdatedEvent_orderBy, orderDirection: OrderDirection, where: FlowOperatorUpdatedEvent_filter): [FlowOperatorUpdatedEvent!]! } -input GovernanceReplacedEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - oldGovernance: Bytes - oldGovernance_not: Bytes - oldGovernance_gt: Bytes - oldGovernance_lt: Bytes - oldGovernance_gte: Bytes - oldGovernance_lte: Bytes - oldGovernance_in: [Bytes!] - oldGovernance_not_in: [Bytes!] - oldGovernance_contains: Bytes - oldGovernance_not_contains: Bytes - newGovernance: Bytes - newGovernance_not: Bytes - newGovernance_gt: Bytes - newGovernance_lt: Bytes - newGovernance_gte: Bytes - newGovernance_lte: Bytes - newGovernance_in: [Bytes!] - newGovernance_not_in: [Bytes!] - newGovernance_contains: Bytes - newGovernance_not_contains: Bytes - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [GovernanceReplacedEvent_filter] - or: [GovernanceReplacedEvent_filter] -} - -enum GovernanceReplacedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - blockNumber - logIndex - order - addresses - oldGovernance - newGovernance -} - -""" -Index: An Index higher order entity. - -""" -type Index { - """ - ID composed of: publisherAddress-tokenAddress-indexId - - """ - id: ID! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - updatedAtTimestamp: BigInt! - updatedAtBlockNumber: BigInt! - - """ - NOTE: indexId is not the same as the id of the `Index` entity. - An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. - - """ - indexId: BigInt! - indexValue: BigInt! - - """ - The number of subscriptions which have units allocated to them on the `Index`. - - """ - totalSubscriptionsWithUnits: Int! - - """ - The number of units allocated by the `Index` that are pending. - This refers to the current (as of updatedAt) `totalUnitsPending`-not all that has ever been pending. - - """ - totalUnitsPending: BigInt! - - """ - The number of units allocated by the `Index` that are approved. - This refers to the current (as of updatedAt) `totalUnitsApproved`-not all that has ever been approved. - - """ - totalUnitsApproved: BigInt! - - """ - The sum of `totalUnitsPending` and `totalUnitsApproved`. - - """ - totalUnits: BigInt! - - """ - The total amount distributed from this `Index`. - - """ - totalAmountDistributedUntilUpdatedAt: BigInt! - token: Token! - publisher: Account! - - """ - The subscriptions of the index, it will include approved, unapproved - and deleted subscriptions. - - """ - subscriptions(skip: Int = 0, first: Int = 100, orderBy: IndexSubscription_orderBy, orderDirection: OrderDirection, where: IndexSubscription_filter): [IndexSubscription!]! - - """ - IndexCreated event, there will only be one. - - """ - indexCreatedEvent: IndexCreatedEvent! - indexDistributionClaimedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexDistributionClaimedEvent_orderBy, orderDirection: OrderDirection, where: IndexDistributionClaimedEvent_filter): [IndexDistributionClaimedEvent!]! - indexUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexUpdatedEvent_orderBy, orderDirection: OrderDirection, where: IndexUpdatedEvent_filter): [IndexUpdatedEvent!]! - indexSubscribedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexSubscribedEvent_orderBy, orderDirection: OrderDirection, where: IndexSubscribedEvent_filter): [IndexSubscribedEvent!]! - indexUnitsUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexUnitsUpdatedEvent_orderBy, orderDirection: OrderDirection, where: IndexUnitsUpdatedEvent_filter): [IndexUnitsUpdatedEvent!]! - indexUnsubscribedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexUnsubscribedEvent_orderBy, orderDirection: OrderDirection, where: IndexUnsubscribedEvent_filter): [IndexUnsubscribedEvent!]! -} - -input Index_filter { +input FlowOperator_filter { id: ID id_not: ID id_gt: ID @@ -4441,62 +5013,69 @@ input Index_filter { updatedAtBlockNumber_lte: BigInt updatedAtBlockNumber_in: [BigInt!] updatedAtBlockNumber_not_in: [BigInt!] - indexId: BigInt - indexId_not: BigInt - indexId_gt: BigInt - indexId_lt: BigInt - indexId_gte: BigInt - indexId_lte: BigInt - indexId_in: [BigInt!] - indexId_not_in: [BigInt!] - indexValue: BigInt - indexValue_not: BigInt - indexValue_gt: BigInt - indexValue_lt: BigInt - indexValue_gte: BigInt - indexValue_lte: BigInt - indexValue_in: [BigInt!] - indexValue_not_in: [BigInt!] - totalSubscriptionsWithUnits: Int - totalSubscriptionsWithUnits_not: Int - totalSubscriptionsWithUnits_gt: Int - totalSubscriptionsWithUnits_lt: Int - totalSubscriptionsWithUnits_gte: Int - totalSubscriptionsWithUnits_lte: Int - totalSubscriptionsWithUnits_in: [Int!] - totalSubscriptionsWithUnits_not_in: [Int!] - totalUnitsPending: BigInt - totalUnitsPending_not: BigInt - totalUnitsPending_gt: BigInt - totalUnitsPending_lt: BigInt - totalUnitsPending_gte: BigInt - totalUnitsPending_lte: BigInt - totalUnitsPending_in: [BigInt!] - totalUnitsPending_not_in: [BigInt!] - totalUnitsApproved: BigInt - totalUnitsApproved_not: BigInt - totalUnitsApproved_gt: BigInt - totalUnitsApproved_lt: BigInt - totalUnitsApproved_gte: BigInt - totalUnitsApproved_lte: BigInt - totalUnitsApproved_in: [BigInt!] - totalUnitsApproved_not_in: [BigInt!] - totalUnits: BigInt - totalUnits_not: BigInt - totalUnits_gt: BigInt - totalUnits_lt: BigInt - totalUnits_gte: BigInt - totalUnits_lte: BigInt - totalUnits_in: [BigInt!] - totalUnits_not_in: [BigInt!] - totalAmountDistributedUntilUpdatedAt: BigInt - totalAmountDistributedUntilUpdatedAt_not: BigInt - totalAmountDistributedUntilUpdatedAt_gt: BigInt - totalAmountDistributedUntilUpdatedAt_lt: BigInt - totalAmountDistributedUntilUpdatedAt_gte: BigInt - totalAmountDistributedUntilUpdatedAt_lte: BigInt - totalAmountDistributedUntilUpdatedAt_in: [BigInt!] - totalAmountDistributedUntilUpdatedAt_not_in: [BigInt!] + permissions: Int + permissions_not: Int + permissions_gt: Int + permissions_lt: Int + permissions_gte: Int + permissions_lte: Int + permissions_in: [Int!] + permissions_not_in: [Int!] + flowRateAllowanceGranted: BigInt + flowRateAllowanceGranted_not: BigInt + flowRateAllowanceGranted_gt: BigInt + flowRateAllowanceGranted_lt: BigInt + flowRateAllowanceGranted_gte: BigInt + flowRateAllowanceGranted_lte: BigInt + flowRateAllowanceGranted_in: [BigInt!] + flowRateAllowanceGranted_not_in: [BigInt!] + flowRateAllowanceRemaining: BigInt + flowRateAllowanceRemaining_not: BigInt + flowRateAllowanceRemaining_gt: BigInt + flowRateAllowanceRemaining_lt: BigInt + flowRateAllowanceRemaining_gte: BigInt + flowRateAllowanceRemaining_lte: BigInt + flowRateAllowanceRemaining_in: [BigInt!] + flowRateAllowanceRemaining_not_in: [BigInt!] + allowance: BigInt + allowance_not: BigInt + allowance_gt: BigInt + allowance_lt: BigInt + allowance_gte: BigInt + allowance_lte: BigInt + allowance_in: [BigInt!] + allowance_not_in: [BigInt!] + flowOperator: Bytes + flowOperator_not: Bytes + flowOperator_gt: Bytes + flowOperator_lt: Bytes + flowOperator_gte: Bytes + flowOperator_lte: Bytes + flowOperator_in: [Bytes!] + flowOperator_not_in: [Bytes!] + flowOperator_contains: Bytes + flowOperator_not_contains: Bytes + sender: String + sender_not: String + sender_gt: String + sender_lt: String + sender_gte: String + sender_lte: String + sender_in: [String!] + sender_not_in: [String!] + sender_contains: String + sender_contains_nocase: String + sender_not_contains: String + sender_not_contains_nocase: String + sender_starts_with: String + sender_starts_with_nocase: String + sender_not_starts_with: String + sender_not_starts_with_nocase: String + sender_ends_with: String + sender_ends_with_nocase: String + sender_not_ends_with: String + sender_not_ends_with_nocase: String + sender_: Account_filter token: String token_not: String token_gt: String @@ -4518,74 +5097,53 @@ input Index_filter { token_not_ends_with: String token_not_ends_with_nocase: String token_: Token_filter - publisher: String - publisher_not: String - publisher_gt: String - publisher_lt: String - publisher_gte: String - publisher_lte: String - publisher_in: [String!] - publisher_not_in: [String!] - publisher_contains: String - publisher_contains_nocase: String - publisher_not_contains: String - publisher_not_contains_nocase: String - publisher_starts_with: String - publisher_starts_with_nocase: String - publisher_not_starts_with: String - publisher_not_starts_with_nocase: String - publisher_ends_with: String - publisher_ends_with_nocase: String - publisher_not_ends_with: String - publisher_not_ends_with_nocase: String - publisher_: Account_filter - subscriptions_: IndexSubscription_filter - indexCreatedEvent: String - indexCreatedEvent_not: String - indexCreatedEvent_gt: String - indexCreatedEvent_lt: String - indexCreatedEvent_gte: String - indexCreatedEvent_lte: String - indexCreatedEvent_in: [String!] - indexCreatedEvent_not_in: [String!] - indexCreatedEvent_contains: String - indexCreatedEvent_contains_nocase: String - indexCreatedEvent_not_contains: String - indexCreatedEvent_not_contains_nocase: String - indexCreatedEvent_starts_with: String - indexCreatedEvent_starts_with_nocase: String - indexCreatedEvent_not_starts_with: String - indexCreatedEvent_not_starts_with_nocase: String - indexCreatedEvent_ends_with: String - indexCreatedEvent_ends_with_nocase: String - indexCreatedEvent_not_ends_with: String - indexCreatedEvent_not_ends_with_nocase: String - indexCreatedEvent_: IndexCreatedEvent_filter - indexDistributionClaimedEvents_: IndexDistributionClaimedEvent_filter - indexUpdatedEvents_: IndexUpdatedEvent_filter - indexSubscribedEvents_: IndexSubscribedEvent_filter - indexUnitsUpdatedEvents_: IndexUnitsUpdatedEvent_filter - indexUnsubscribedEvents_: IndexUnsubscribedEvent_filter + accountTokenSnapshot: String + accountTokenSnapshot_not: String + accountTokenSnapshot_gt: String + accountTokenSnapshot_lt: String + accountTokenSnapshot_gte: String + accountTokenSnapshot_lte: String + accountTokenSnapshot_in: [String!] + accountTokenSnapshot_not_in: [String!] + accountTokenSnapshot_contains: String + accountTokenSnapshot_contains_nocase: String + accountTokenSnapshot_not_contains: String + accountTokenSnapshot_not_contains_nocase: String + accountTokenSnapshot_starts_with: String + accountTokenSnapshot_starts_with_nocase: String + accountTokenSnapshot_not_starts_with: String + accountTokenSnapshot_not_starts_with_nocase: String + accountTokenSnapshot_ends_with: String + accountTokenSnapshot_ends_with_nocase: String + accountTokenSnapshot_not_ends_with: String + accountTokenSnapshot_not_ends_with_nocase: String + accountTokenSnapshot_: AccountTokenSnapshot_filter + flowOperatorUpdatedEvents_: FlowOperatorUpdatedEvent_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [Index_filter] - or: [Index_filter] + and: [FlowOperator_filter] + or: [FlowOperator_filter] } -enum Index_orderBy { +enum FlowOperator_orderBy { id createdAtTimestamp createdAtBlockNumber updatedAtTimestamp updatedAtBlockNumber - indexId - indexValue - totalSubscriptionsWithUnits - totalUnitsPending - totalUnitsApproved - totalUnits - totalAmountDistributedUntilUpdatedAt + permissions + flowRateAllowanceGranted + flowRateAllowanceRemaining + allowance + flowOperator + sender + sender__id + sender__createdAtTimestamp + sender__createdAtBlockNumber + sender__updatedAtTimestamp + sender__updatedAtBlockNumber + sender__isSuperApp token token__id token__createdAtTimestamp @@ -4597,36 +5155,52 @@ enum Index_orderBy { token__isNativeAssetSuperToken token__isListed token__underlyingAddress - publisher - publisher__id - publisher__createdAtTimestamp - publisher__createdAtBlockNumber - publisher__updatedAtTimestamp - publisher__updatedAtBlockNumber - publisher__isSuperApp - subscriptions - indexCreatedEvent - indexCreatedEvent__id - indexCreatedEvent__transactionHash - indexCreatedEvent__gasPrice - indexCreatedEvent__gasUsed - indexCreatedEvent__timestamp - indexCreatedEvent__name - indexCreatedEvent__blockNumber - indexCreatedEvent__logIndex - indexCreatedEvent__order - indexCreatedEvent__token - indexCreatedEvent__publisher - indexCreatedEvent__indexId - indexCreatedEvent__userData - indexDistributionClaimedEvents - indexUpdatedEvents - indexSubscribedEvents - indexUnitsUpdatedEvents - indexUnsubscribedEvents + accountTokenSnapshot + accountTokenSnapshot__id + accountTokenSnapshot__createdAtTimestamp + accountTokenSnapshot__createdAtBlockNumber + accountTokenSnapshot__updatedAtTimestamp + accountTokenSnapshot__updatedAtBlockNumber + accountTokenSnapshot__isLiquidationEstimateOptimistic + accountTokenSnapshot__maybeCriticalAtTimestamp + accountTokenSnapshot__totalNumberOfActiveStreams + accountTokenSnapshot__totalCFANumberOfActiveStreams + accountTokenSnapshot__totalGDANumberOfActiveStreams + accountTokenSnapshot__activeOutgoingStreamCount + accountTokenSnapshot__activeCFAOutgoingStreamCount + accountTokenSnapshot__activeGDAOutgoingStreamCount + accountTokenSnapshot__activeIncomingStreamCount + accountTokenSnapshot__totalNumberOfClosedStreams + accountTokenSnapshot__totalCFANumberOfClosedStreams + accountTokenSnapshot__totalGDANumberOfClosedStreams + accountTokenSnapshot__inactiveOutgoingStreamCount + accountTokenSnapshot__inactiveCFAOutgoingStreamCount + accountTokenSnapshot__inactiveGDAOutgoingStreamCount + accountTokenSnapshot__inactiveIncomingStreamCount + accountTokenSnapshot__totalSubscriptionsWithUnits + accountTokenSnapshot__totalApprovedSubscriptions + accountTokenSnapshot__totalMembershipsWithUnits + accountTokenSnapshot__totalConnectedMemberships + accountTokenSnapshot__balanceUntilUpdatedAt + accountTokenSnapshot__totalDeposit + accountTokenSnapshot__totalCFADeposit + accountTokenSnapshot__totalGDADeposit + accountTokenSnapshot__totalNetFlowRate + accountTokenSnapshot__totalCFANetFlowRate + accountTokenSnapshot__totalInflowRate + accountTokenSnapshot__totalOutflowRate + accountTokenSnapshot__totalCFAOutflowRate + accountTokenSnapshot__totalGDAOutflowRate + accountTokenSnapshot__totalAmountStreamedInUntilUpdatedAt + accountTokenSnapshot__totalAmountStreamedOutUntilUpdatedAt + accountTokenSnapshot__totalCFAAmountStreamedOutUntilUpdatedAt + accountTokenSnapshot__totalAmountStreamedUntilUpdatedAt + accountTokenSnapshot__totalCFAAmountStreamedUntilUpdatedAt + accountTokenSnapshot__totalAmountTransferredUntilUpdatedAt + flowOperatorUpdatedEvents } -type IndexCreatedEvent implements Event { +type FlowOperatorUpdatedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -4637,31 +5211,33 @@ type IndexCreatedEvent implements Event { """ Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) - addresses[1] = `publisher` + addresses[1] = sender + addresses[2] = `flowOperator` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - token: Bytes! """ - The creator of the `index`. + The address of the `token` being streamed. """ - publisher: Bytes! + token: Bytes! + sender: Bytes! """ - An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. + The permissions granted to the `flowOperator`. + Octo bitmask representation. """ - indexId: BigInt! - userData: Bytes! - index: Index! + permissions: Int! + flowRateAllowance: BigInt! + flowOperator: FlowOperator! } -input IndexCreatedEvent_filter { +input FlowOperatorUpdatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -4764,63 +5340,61 @@ input IndexCreatedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - publisher: Bytes - publisher_not: Bytes - publisher_gt: Bytes - publisher_lt: Bytes - publisher_gte: Bytes - publisher_lte: Bytes - publisher_in: [Bytes!] - publisher_not_in: [Bytes!] - publisher_contains: Bytes - publisher_not_contains: Bytes - indexId: BigInt - indexId_not: BigInt - indexId_gt: BigInt - indexId_lt: BigInt - indexId_gte: BigInt - indexId_lte: BigInt - indexId_in: [BigInt!] - indexId_not_in: [BigInt!] - userData: Bytes - userData_not: Bytes - userData_gt: Bytes - userData_lt: Bytes - userData_gte: Bytes - userData_lte: Bytes - userData_in: [Bytes!] - userData_not_in: [Bytes!] - userData_contains: Bytes - userData_not_contains: Bytes - index: String - index_not: String - index_gt: String - index_lt: String - index_gte: String - index_lte: String - index_in: [String!] - index_not_in: [String!] - index_contains: String - index_contains_nocase: String - index_not_contains: String - index_not_contains_nocase: String - index_starts_with: String - index_starts_with_nocase: String - index_not_starts_with: String - index_not_starts_with_nocase: String - index_ends_with: String - index_ends_with_nocase: String - index_not_ends_with: String - index_not_ends_with_nocase: String - index_: Index_filter + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + permissions: Int + permissions_not: Int + permissions_gt: Int + permissions_lt: Int + permissions_gte: Int + permissions_lte: Int + permissions_in: [Int!] + permissions_not_in: [Int!] + flowRateAllowance: BigInt + flowRateAllowance_not: BigInt + flowRateAllowance_gt: BigInt + flowRateAllowance_lt: BigInt + flowRateAllowance_gte: BigInt + flowRateAllowance_lte: BigInt + flowRateAllowance_in: [BigInt!] + flowRateAllowance_not_in: [BigInt!] + flowOperator: String + flowOperator_not: String + flowOperator_gt: String + flowOperator_lt: String + flowOperator_gte: String + flowOperator_lte: String + flowOperator_in: [String!] + flowOperator_not_in: [String!] + flowOperator_contains: String + flowOperator_contains_nocase: String + flowOperator_not_contains: String + flowOperator_not_contains_nocase: String + flowOperator_starts_with: String + flowOperator_starts_with_nocase: String + flowOperator_not_starts_with: String + flowOperator_not_starts_with_nocase: String + flowOperator_ends_with: String + flowOperator_ends_with_nocase: String + flowOperator_not_ends_with: String + flowOperator_not_ends_with_nocase: String + flowOperator_: FlowOperator_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [IndexCreatedEvent_filter] - or: [IndexCreatedEvent_filter] + and: [FlowOperatorUpdatedEvent_filter] + or: [FlowOperatorUpdatedEvent_filter] } -enum IndexCreatedEvent_orderBy { +enum FlowOperatorUpdatedEvent_orderBy { id transactionHash gasPrice @@ -4832,25 +5406,28 @@ enum IndexCreatedEvent_orderBy { logIndex order token - publisher - indexId - userData - index - index__id - index__createdAtTimestamp - index__createdAtBlockNumber - index__updatedAtTimestamp - index__updatedAtBlockNumber - index__indexId - index__indexValue - index__totalSubscriptionsWithUnits - index__totalUnitsPending - index__totalUnitsApproved - index__totalUnits - index__totalAmountDistributedUntilUpdatedAt + sender + permissions + flowRateAllowance + flowOperator + flowOperator__id + flowOperator__createdAtTimestamp + flowOperator__createdAtBlockNumber + flowOperator__updatedAtTimestamp + flowOperator__updatedAtBlockNumber + flowOperator__permissions + flowOperator__flowRateAllowanceGranted + flowOperator__flowRateAllowanceRemaining + flowOperator__allowance + flowOperator__flowOperator } -type IndexDistributionClaimedEvent implements Event { +""" +FlowUpdated: An `Event` entity that is emitted +when a flow is created, updated, or deleted. + +""" +type FlowUpdatedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -4860,40 +5437,101 @@ type IndexDistributionClaimedEvent implements Event { """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken) - addresses[1] = `publisher` - addresses[2] = `subscriber` + addresses[0] = `token` (supertoken) + addresses[1] = `sender` + addresses[2] = `receiver` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! + + """ + The address of the `token` (supertoken) being streamed. + + """ token: Bytes! """ - The creator of the `index`. + The address of the flow sender. """ - publisher: Bytes! + sender: Bytes! """ - An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. + The address of the flow receiver. """ - indexId: BigInt! + receiver: Bytes! """ - The account that is subscribed to `index`. A possible recipient of distributions from the `publisher`. - `subscriber` only receives tokens if they have been allocated units (can be thought of as shares). + The address that is executing the flow update transaction. + This will be the zero address until the flowOperator feature is live. """ - subscriber: Bytes! - amount: BigInt! - index: Index! + flowOperator: Bytes! + + """ + The flow rate per second. + + """ + flowRate: BigInt! + + """ + The total (global/account level) flow rate of `sender` for `token` as of this event. + + """ + totalSenderFlowRate: BigInt! + + """ + The total (global/account level) flow rate of `receiver` for `token` as of this event. + + """ + totalReceiverFlowRate: BigInt! + + """ + The deposit amount put up for the creation of the flow. + + """ + deposit: BigInt! + + """ + Arbitrary bytes (additional data) passed upon flow creation. + + """ + userData: Bytes! + + """ + The previous flow rate, the absolute (positive) value. + + """ + oldFlowRate: BigInt! + + """ + The "type" of the `FlowUpdated` event. + 0 = create + 1 = update + 2 = terminate + + """ + type: Int! + + """ + The total amount streamed until the timestamp + for the Stream entity linked to this event. + + """ + totalAmountStreamedUntilTimestamp: BigInt! + + """ + The stream entity which is being modified. + + """ + stream: Stream! } -input IndexDistributionClaimedEvent_filter { +input FlowUpdatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -4996,148 +5634,191 @@ input IndexDistributionClaimedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - publisher: Bytes - publisher_not: Bytes - publisher_gt: Bytes - publisher_lt: Bytes - publisher_gte: Bytes - publisher_lte: Bytes - publisher_in: [Bytes!] - publisher_not_in: [Bytes!] - publisher_contains: Bytes - publisher_not_contains: Bytes - indexId: BigInt - indexId_not: BigInt - indexId_gt: BigInt - indexId_lt: BigInt - indexId_gte: BigInt - indexId_lte: BigInt - indexId_in: [BigInt!] - indexId_not_in: [BigInt!] - subscriber: Bytes - subscriber_not: Bytes - subscriber_gt: Bytes - subscriber_lt: Bytes - subscriber_gte: Bytes - subscriber_lte: Bytes - subscriber_in: [Bytes!] - subscriber_not_in: [Bytes!] - subscriber_contains: Bytes - subscriber_not_contains: Bytes - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - index: String - index_not: String - index_gt: String - index_lt: String - index_gte: String - index_lte: String - index_in: [String!] - index_not_in: [String!] - index_contains: String - index_contains_nocase: String - index_not_contains: String - index_not_contains_nocase: String - index_starts_with: String - index_starts_with_nocase: String - index_not_starts_with: String - index_not_starts_with_nocase: String - index_ends_with: String - index_ends_with_nocase: String - index_not_ends_with: String - index_not_ends_with_nocase: String - index_: Index_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [IndexDistributionClaimedEvent_filter] - or: [IndexDistributionClaimedEvent_filter] -} - -enum IndexDistributionClaimedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - token - publisher - indexId - subscriber - amount - index - index__id - index__createdAtTimestamp - index__createdAtBlockNumber - index__updatedAtTimestamp - index__updatedAtBlockNumber - index__indexId - index__indexValue - index__totalSubscriptionsWithUnits - index__totalUnitsPending - index__totalUnitsApproved - index__totalUnits - index__totalAmountDistributedUntilUpdatedAt -} - -type IndexSubscribedEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken) - addresses[1] = `publisher` - addresses[2] = `subscriber` - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - token: Bytes! - - """ - The creator of the `index`. - - """ - publisher: Bytes! - - """ - An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. - - """ - indexId: BigInt! - - """ - The account that is subscribed to `index`. A possible recipient of distributions from the `publisher`. - `subscriber` only receives tokens if they have been allocated units (can be thought of as shares). - - """ - subscriber: Bytes! - userData: Bytes! - index: Index! -} - -input IndexSubscribedEvent_filter { - id: ID - id_not: ID - id_gt: ID + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + receiver: Bytes + receiver_not: Bytes + receiver_gt: Bytes + receiver_lt: Bytes + receiver_gte: Bytes + receiver_lte: Bytes + receiver_in: [Bytes!] + receiver_not_in: [Bytes!] + receiver_contains: Bytes + receiver_not_contains: Bytes + flowOperator: Bytes + flowOperator_not: Bytes + flowOperator_gt: Bytes + flowOperator_lt: Bytes + flowOperator_gte: Bytes + flowOperator_lte: Bytes + flowOperator_in: [Bytes!] + flowOperator_not_in: [Bytes!] + flowOperator_contains: Bytes + flowOperator_not_contains: Bytes + flowRate: BigInt + flowRate_not: BigInt + flowRate_gt: BigInt + flowRate_lt: BigInt + flowRate_gte: BigInt + flowRate_lte: BigInt + flowRate_in: [BigInt!] + flowRate_not_in: [BigInt!] + totalSenderFlowRate: BigInt + totalSenderFlowRate_not: BigInt + totalSenderFlowRate_gt: BigInt + totalSenderFlowRate_lt: BigInt + totalSenderFlowRate_gte: BigInt + totalSenderFlowRate_lte: BigInt + totalSenderFlowRate_in: [BigInt!] + totalSenderFlowRate_not_in: [BigInt!] + totalReceiverFlowRate: BigInt + totalReceiverFlowRate_not: BigInt + totalReceiverFlowRate_gt: BigInt + totalReceiverFlowRate_lt: BigInt + totalReceiverFlowRate_gte: BigInt + totalReceiverFlowRate_lte: BigInt + totalReceiverFlowRate_in: [BigInt!] + totalReceiverFlowRate_not_in: [BigInt!] + deposit: BigInt + deposit_not: BigInt + deposit_gt: BigInt + deposit_lt: BigInt + deposit_gte: BigInt + deposit_lte: BigInt + deposit_in: [BigInt!] + deposit_not_in: [BigInt!] + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + oldFlowRate: BigInt + oldFlowRate_not: BigInt + oldFlowRate_gt: BigInt + oldFlowRate_lt: BigInt + oldFlowRate_gte: BigInt + oldFlowRate_lte: BigInt + oldFlowRate_in: [BigInt!] + oldFlowRate_not_in: [BigInt!] + type: Int + type_not: Int + type_gt: Int + type_lt: Int + type_gte: Int + type_lte: Int + type_in: [Int!] + type_not_in: [Int!] + totalAmountStreamedUntilTimestamp: BigInt + totalAmountStreamedUntilTimestamp_not: BigInt + totalAmountStreamedUntilTimestamp_gt: BigInt + totalAmountStreamedUntilTimestamp_lt: BigInt + totalAmountStreamedUntilTimestamp_gte: BigInt + totalAmountStreamedUntilTimestamp_lte: BigInt + totalAmountStreamedUntilTimestamp_in: [BigInt!] + totalAmountStreamedUntilTimestamp_not_in: [BigInt!] + stream: String + stream_not: String + stream_gt: String + stream_lt: String + stream_gte: String + stream_lte: String + stream_in: [String!] + stream_not_in: [String!] + stream_contains: String + stream_contains_nocase: String + stream_not_contains: String + stream_not_contains_nocase: String + stream_starts_with: String + stream_starts_with_nocase: String + stream_not_starts_with: String + stream_not_starts_with_nocase: String + stream_ends_with: String + stream_ends_with_nocase: String + stream_not_ends_with: String + stream_not_ends_with_nocase: String + stream_: Stream_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [FlowUpdatedEvent_filter] + or: [FlowUpdatedEvent_filter] +} + +enum FlowUpdatedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + sender + receiver + flowOperator + flowRate + totalSenderFlowRate + totalReceiverFlowRate + deposit + userData + oldFlowRate + type + totalAmountStreamedUntilTimestamp + stream + stream__id + stream__createdAtTimestamp + stream__createdAtBlockNumber + stream__updatedAtTimestamp + stream__updatedAtBlockNumber + stream__currentFlowRate + stream__deposit + stream__streamedUntilUpdatedAt + stream__userData +} + +type GovernanceReplacedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `oldGovernance` + addresses[1] = `newGovernance` + + """ + addresses: [Bytes!]! + oldGovernance: Bytes! + newGovernance: Bytes! +} + +input GovernanceReplacedEvent_filter { + id: ID + id_not: ID + id_gt: ID id_lt: ID id_gte: ID id_lte: ID @@ -5197,12 +5878,6 @@ input IndexSubscribedEvent_filter { name_ends_with_nocase: String name_not_ends_with: String name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] blockNumber: BigInt blockNumber_not: BigInt blockNumber_gt: BigInt @@ -5227,120 +5902,61 @@ input IndexSubscribedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - token: Bytes - token_not: Bytes - token_gt: Bytes - token_lt: Bytes - token_gte: Bytes - token_lte: Bytes - token_in: [Bytes!] - token_not_in: [Bytes!] - token_contains: Bytes - token_not_contains: Bytes - publisher: Bytes - publisher_not: Bytes - publisher_gt: Bytes - publisher_lt: Bytes - publisher_gte: Bytes - publisher_lte: Bytes - publisher_in: [Bytes!] - publisher_not_in: [Bytes!] - publisher_contains: Bytes - publisher_not_contains: Bytes - indexId: BigInt - indexId_not: BigInt - indexId_gt: BigInt - indexId_lt: BigInt - indexId_gte: BigInt - indexId_lte: BigInt - indexId_in: [BigInt!] - indexId_not_in: [BigInt!] - subscriber: Bytes - subscriber_not: Bytes - subscriber_gt: Bytes - subscriber_lt: Bytes - subscriber_gte: Bytes - subscriber_lte: Bytes - subscriber_in: [Bytes!] - subscriber_not_in: [Bytes!] - subscriber_contains: Bytes - subscriber_not_contains: Bytes - userData: Bytes - userData_not: Bytes - userData_gt: Bytes - userData_lt: Bytes - userData_gte: Bytes - userData_lte: Bytes - userData_in: [Bytes!] - userData_not_in: [Bytes!] - userData_contains: Bytes - userData_not_contains: Bytes - index: String - index_not: String - index_gt: String - index_lt: String - index_gte: String - index_lte: String - index_in: [String!] - index_not_in: [String!] - index_contains: String - index_contains_nocase: String - index_not_contains: String - index_not_contains_nocase: String - index_starts_with: String - index_starts_with_nocase: String - index_not_starts_with: String - index_not_starts_with_nocase: String - index_ends_with: String - index_ends_with_nocase: String - index_not_ends_with: String - index_not_ends_with_nocase: String - index_: Index_filter + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + oldGovernance: Bytes + oldGovernance_not: Bytes + oldGovernance_gt: Bytes + oldGovernance_lt: Bytes + oldGovernance_gte: Bytes + oldGovernance_lte: Bytes + oldGovernance_in: [Bytes!] + oldGovernance_not_in: [Bytes!] + oldGovernance_contains: Bytes + oldGovernance_not_contains: Bytes + newGovernance: Bytes + newGovernance_not: Bytes + newGovernance_gt: Bytes + newGovernance_lt: Bytes + newGovernance_gte: Bytes + newGovernance_lte: Bytes + newGovernance_in: [Bytes!] + newGovernance_not_in: [Bytes!] + newGovernance_contains: Bytes + newGovernance_not_contains: Bytes """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [IndexSubscribedEvent_filter] - or: [IndexSubscribedEvent_filter] + and: [GovernanceReplacedEvent_filter] + or: [GovernanceReplacedEvent_filter] } -enum IndexSubscribedEvent_orderBy { +enum GovernanceReplacedEvent_orderBy { id transactionHash gasPrice gasUsed timestamp name - addresses blockNumber logIndex order - token - publisher - indexId - subscriber - userData - index - index__id - index__createdAtTimestamp - index__createdAtBlockNumber - index__updatedAtTimestamp - index__updatedAtBlockNumber - index__indexId - index__indexValue - index__totalSubscriptionsWithUnits - index__totalUnitsPending - index__totalUnitsApproved - index__totalUnits - index__totalAmountDistributedUntilUpdatedAt + addresses + oldGovernance + newGovernance } """ -IndexSubscription: A higher order entity that contains subscription data for a `subscriber` account of a particular `Index`. +Index: An Index higher order entity. """ -type IndexSubscription { +type Index { """ - ID composed of: subscriberAddress-publisherAddress-tokenAddress-IndexId + ID composed of: publisherAddress-tokenAddress-indexId """ id: ID! @@ -5348,51 +5964,69 @@ type IndexSubscription { createdAtBlockNumber: BigInt! updatedAtTimestamp: BigInt! updatedAtBlockNumber: BigInt! - subscriber: Account! """ - A boolean indicating whether the `IndexSubscription` is approved. - Approved subscriptions don't require `subscriber` to claim tokens that are distributed from the publisher. + NOTE: indexId is not the same as the id of the `Index` entity. + An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. """ - approved: Boolean! + indexId: BigInt! + indexValue: BigInt! """ - If `units` is `0`, it indicates that the subscription is "deleted" and `subscriber` is no longer subscribed to `index`. + The number of subscriptions which have units allocated to them on the `Index`. """ - units: BigInt! + totalSubscriptionsWithUnits: Int! """ - The total amount of tokens you've received via IDA until - `updatedAtTimestamp`/`updatedAtBlock`. + The number of units allocated by the `Index` that are pending. + This refers to the current (as of updatedAt) `totalUnitsPending`-not all that has ever been pending. """ - totalAmountReceivedUntilUpdatedAt: BigInt! + totalUnitsPending: BigInt! """ - The previous index value - used to calculate - `totalAmountReceivedUntilUpdatedAt` field as of the - `index.updatedAtTimestamp`. - The formula to get this value is: - `IndexSubscription.totalAmountReceivedUntilUpdatedAt + ((index.newIndexValue - - indexSubscription.indexValueUntilUpdatedAt) * indexSubscription.units)`. + The number of units allocated by the `Index` that are approved. + This refers to the current (as of updatedAt) `totalUnitsApproved`-not all that has ever been approved. """ - indexValueUntilUpdatedAt: BigInt! - index: Index! + totalUnitsApproved: BigInt! """ - IndexSubscription approved events on the subscription. + The sum of `totalUnitsPending` and `totalUnitsApproved`. """ - subscriptionApprovedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionApprovedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionApprovedEvent_filter): [SubscriptionApprovedEvent!]! - subscriptionDistributionClaimedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionDistributionClaimedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionDistributionClaimedEvent_filter): [SubscriptionDistributionClaimedEvent!]! - subscriptionRevokedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionRevokedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionRevokedEvent_filter): [SubscriptionRevokedEvent!]! - subscriptionUnitsUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionUnitsUpdatedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionUnitsUpdatedEvent_filter): [SubscriptionUnitsUpdatedEvent!]! + totalUnits: BigInt! + + """ + The total amount distributed from this `Index`. + + """ + totalAmountDistributedUntilUpdatedAt: BigInt! + token: Token! + publisher: Account! + + """ + The subscriptions of the index, it will include approved, unapproved + and deleted subscriptions. + + """ + subscriptions(skip: Int = 0, first: Int = 100, orderBy: IndexSubscription_orderBy, orderDirection: OrderDirection, where: IndexSubscription_filter): [IndexSubscription!]! + + """ + IndexCreated event, there will only be one. + + """ + indexCreatedEvent: IndexCreatedEvent! + indexDistributionClaimedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexDistributionClaimedEvent_orderBy, orderDirection: OrderDirection, where: IndexDistributionClaimedEvent_filter): [IndexDistributionClaimedEvent!]! + indexUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexUpdatedEvent_orderBy, orderDirection: OrderDirection, where: IndexUpdatedEvent_filter): [IndexUpdatedEvent!]! + indexSubscribedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexSubscribedEvent_orderBy, orderDirection: OrderDirection, where: IndexSubscribedEvent_filter): [IndexSubscribedEvent!]! + indexUnitsUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexUnitsUpdatedEvent_orderBy, orderDirection: OrderDirection, where: IndexUnitsUpdatedEvent_filter): [IndexUnitsUpdatedEvent!]! + indexUnsubscribedEvents(skip: Int = 0, first: Int = 100, orderBy: IndexUnsubscribedEvent_orderBy, orderDirection: OrderDirection, where: IndexUnsubscribedEvent_filter): [IndexUnsubscribedEvent!]! } -input IndexSubscription_filter { +input Index_filter { id: ID id_not: ID id_gt: ID @@ -5433,136 +6067,203 @@ input IndexSubscription_filter { updatedAtBlockNumber_lte: BigInt updatedAtBlockNumber_in: [BigInt!] updatedAtBlockNumber_not_in: [BigInt!] - subscriber: String - subscriber_not: String - subscriber_gt: String - subscriber_lt: String - subscriber_gte: String - subscriber_lte: String - subscriber_in: [String!] - subscriber_not_in: [String!] - subscriber_contains: String - subscriber_contains_nocase: String - subscriber_not_contains: String - subscriber_not_contains_nocase: String - subscriber_starts_with: String - subscriber_starts_with_nocase: String - subscriber_not_starts_with: String - subscriber_not_starts_with_nocase: String - subscriber_ends_with: String - subscriber_ends_with_nocase: String - subscriber_not_ends_with: String - subscriber_not_ends_with_nocase: String - subscriber_: Account_filter - approved: Boolean - approved_not: Boolean - approved_in: [Boolean!] - approved_not_in: [Boolean!] - units: BigInt - units_not: BigInt - units_gt: BigInt - units_lt: BigInt - units_gte: BigInt - units_lte: BigInt - units_in: [BigInt!] - units_not_in: [BigInt!] - totalAmountReceivedUntilUpdatedAt: BigInt - totalAmountReceivedUntilUpdatedAt_not: BigInt - totalAmountReceivedUntilUpdatedAt_gt: BigInt - totalAmountReceivedUntilUpdatedAt_lt: BigInt - totalAmountReceivedUntilUpdatedAt_gte: BigInt - totalAmountReceivedUntilUpdatedAt_lte: BigInt - totalAmountReceivedUntilUpdatedAt_in: [BigInt!] - totalAmountReceivedUntilUpdatedAt_not_in: [BigInt!] - indexValueUntilUpdatedAt: BigInt - indexValueUntilUpdatedAt_not: BigInt - indexValueUntilUpdatedAt_gt: BigInt - indexValueUntilUpdatedAt_lt: BigInt - indexValueUntilUpdatedAt_gte: BigInt - indexValueUntilUpdatedAt_lte: BigInt - indexValueUntilUpdatedAt_in: [BigInt!] - indexValueUntilUpdatedAt_not_in: [BigInt!] - index: String - index_not: String - index_gt: String - index_lt: String - index_gte: String - index_lte: String - index_in: [String!] - index_not_in: [String!] - index_contains: String - index_contains_nocase: String - index_not_contains: String - index_not_contains_nocase: String - index_starts_with: String - index_starts_with_nocase: String - index_not_starts_with: String - index_not_starts_with_nocase: String - index_ends_with: String - index_ends_with_nocase: String - index_not_ends_with: String - index_not_ends_with_nocase: String - index_: Index_filter - subscriptionApprovedEvents_: SubscriptionApprovedEvent_filter - subscriptionDistributionClaimedEvents_: SubscriptionDistributionClaimedEvent_filter - subscriptionRevokedEvents_: SubscriptionRevokedEvent_filter - subscriptionUnitsUpdatedEvents_: SubscriptionUnitsUpdatedEvent_filter - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [IndexSubscription_filter] - or: [IndexSubscription_filter] -} - -enum IndexSubscription_orderBy { - id - createdAtTimestamp - createdAtBlockNumber - updatedAtTimestamp - updatedAtBlockNumber - subscriber - subscriber__id - subscriber__createdAtTimestamp - subscriber__createdAtBlockNumber - subscriber__updatedAtTimestamp - subscriber__updatedAtBlockNumber - subscriber__isSuperApp - approved - units - totalAmountReceivedUntilUpdatedAt - indexValueUntilUpdatedAt - index - index__id - index__createdAtTimestamp - index__createdAtBlockNumber - index__updatedAtTimestamp - index__updatedAtBlockNumber - index__indexId - index__indexValue - index__totalSubscriptionsWithUnits - index__totalUnitsPending - index__totalUnitsApproved - index__totalUnits - index__totalAmountDistributedUntilUpdatedAt - subscriptionApprovedEvents - subscriptionDistributionClaimedEvents - subscriptionRevokedEvents - subscriptionUnitsUpdatedEvents -} - -type IndexUnitsUpdatedEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken) - addresses[1] = `publisher` - addresses[2] = `subscriber` + indexId: BigInt + indexId_not: BigInt + indexId_gt: BigInt + indexId_lt: BigInt + indexId_gte: BigInt + indexId_lte: BigInt + indexId_in: [BigInt!] + indexId_not_in: [BigInt!] + indexValue: BigInt + indexValue_not: BigInt + indexValue_gt: BigInt + indexValue_lt: BigInt + indexValue_gte: BigInt + indexValue_lte: BigInt + indexValue_in: [BigInt!] + indexValue_not_in: [BigInt!] + totalSubscriptionsWithUnits: Int + totalSubscriptionsWithUnits_not: Int + totalSubscriptionsWithUnits_gt: Int + totalSubscriptionsWithUnits_lt: Int + totalSubscriptionsWithUnits_gte: Int + totalSubscriptionsWithUnits_lte: Int + totalSubscriptionsWithUnits_in: [Int!] + totalSubscriptionsWithUnits_not_in: [Int!] + totalUnitsPending: BigInt + totalUnitsPending_not: BigInt + totalUnitsPending_gt: BigInt + totalUnitsPending_lt: BigInt + totalUnitsPending_gte: BigInt + totalUnitsPending_lte: BigInt + totalUnitsPending_in: [BigInt!] + totalUnitsPending_not_in: [BigInt!] + totalUnitsApproved: BigInt + totalUnitsApproved_not: BigInt + totalUnitsApproved_gt: BigInt + totalUnitsApproved_lt: BigInt + totalUnitsApproved_gte: BigInt + totalUnitsApproved_lte: BigInt + totalUnitsApproved_in: [BigInt!] + totalUnitsApproved_not_in: [BigInt!] + totalUnits: BigInt + totalUnits_not: BigInt + totalUnits_gt: BigInt + totalUnits_lt: BigInt + totalUnits_gte: BigInt + totalUnits_lte: BigInt + totalUnits_in: [BigInt!] + totalUnits_not_in: [BigInt!] + totalAmountDistributedUntilUpdatedAt: BigInt + totalAmountDistributedUntilUpdatedAt_not: BigInt + totalAmountDistributedUntilUpdatedAt_gt: BigInt + totalAmountDistributedUntilUpdatedAt_lt: BigInt + totalAmountDistributedUntilUpdatedAt_gte: BigInt + totalAmountDistributedUntilUpdatedAt_lte: BigInt + totalAmountDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountDistributedUntilUpdatedAt_not_in: [BigInt!] + token: String + token_not: String + token_gt: String + token_lt: String + token_gte: String + token_lte: String + token_in: [String!] + token_not_in: [String!] + token_contains: String + token_contains_nocase: String + token_not_contains: String + token_not_contains_nocase: String + token_starts_with: String + token_starts_with_nocase: String + token_not_starts_with: String + token_not_starts_with_nocase: String + token_ends_with: String + token_ends_with_nocase: String + token_not_ends_with: String + token_not_ends_with_nocase: String + token_: Token_filter + publisher: String + publisher_not: String + publisher_gt: String + publisher_lt: String + publisher_gte: String + publisher_lte: String + publisher_in: [String!] + publisher_not_in: [String!] + publisher_contains: String + publisher_contains_nocase: String + publisher_not_contains: String + publisher_not_contains_nocase: String + publisher_starts_with: String + publisher_starts_with_nocase: String + publisher_not_starts_with: String + publisher_not_starts_with_nocase: String + publisher_ends_with: String + publisher_ends_with_nocase: String + publisher_not_ends_with: String + publisher_not_ends_with_nocase: String + publisher_: Account_filter + subscriptions_: IndexSubscription_filter + indexCreatedEvent: String + indexCreatedEvent_not: String + indexCreatedEvent_gt: String + indexCreatedEvent_lt: String + indexCreatedEvent_gte: String + indexCreatedEvent_lte: String + indexCreatedEvent_in: [String!] + indexCreatedEvent_not_in: [String!] + indexCreatedEvent_contains: String + indexCreatedEvent_contains_nocase: String + indexCreatedEvent_not_contains: String + indexCreatedEvent_not_contains_nocase: String + indexCreatedEvent_starts_with: String + indexCreatedEvent_starts_with_nocase: String + indexCreatedEvent_not_starts_with: String + indexCreatedEvent_not_starts_with_nocase: String + indexCreatedEvent_ends_with: String + indexCreatedEvent_ends_with_nocase: String + indexCreatedEvent_not_ends_with: String + indexCreatedEvent_not_ends_with_nocase: String + indexCreatedEvent_: IndexCreatedEvent_filter + indexDistributionClaimedEvents_: IndexDistributionClaimedEvent_filter + indexUpdatedEvents_: IndexUpdatedEvent_filter + indexSubscribedEvents_: IndexSubscribedEvent_filter + indexUnitsUpdatedEvents_: IndexUnitsUpdatedEvent_filter + indexUnsubscribedEvents_: IndexUnsubscribedEvent_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Index_filter] + or: [Index_filter] +} + +enum Index_orderBy { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + indexId + indexValue + totalSubscriptionsWithUnits + totalUnitsPending + totalUnitsApproved + totalUnits + totalAmountDistributedUntilUpdatedAt + token + token__id + token__createdAtTimestamp + token__createdAtBlockNumber + token__decimals + token__name + token__symbol + token__isSuperToken + token__isNativeAssetSuperToken + token__isListed + token__underlyingAddress + publisher + publisher__id + publisher__createdAtTimestamp + publisher__createdAtBlockNumber + publisher__updatedAtTimestamp + publisher__updatedAtBlockNumber + publisher__isSuperApp + subscriptions + indexCreatedEvent + indexCreatedEvent__id + indexCreatedEvent__transactionHash + indexCreatedEvent__gasPrice + indexCreatedEvent__gasUsed + indexCreatedEvent__timestamp + indexCreatedEvent__name + indexCreatedEvent__blockNumber + indexCreatedEvent__logIndex + indexCreatedEvent__order + indexCreatedEvent__token + indexCreatedEvent__publisher + indexCreatedEvent__indexId + indexCreatedEvent__userData + indexDistributionClaimedEvents + indexUpdatedEvents + indexSubscribedEvents + indexUnitsUpdatedEvents + indexUnsubscribedEvents +} + +type IndexCreatedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `publisher` """ addresses: [Bytes!]! @@ -5582,20 +6283,11 @@ type IndexUnitsUpdatedEvent implements Event { """ indexId: BigInt! - - """ - The account that is subscribed to `index`. A possible recipient of distributions from the `publisher`. - `subscriber` only receives tokens if they have been allocated units (can be thought of as shares). - - """ - subscriber: Bytes! - units: BigInt! userData: Bytes! - oldUnits: BigInt! index: Index! } -input IndexUnitsUpdatedEvent_filter { +input IndexCreatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -5716,24 +6408,6 @@ input IndexUnitsUpdatedEvent_filter { indexId_lte: BigInt indexId_in: [BigInt!] indexId_not_in: [BigInt!] - subscriber: Bytes - subscriber_not: Bytes - subscriber_gt: Bytes - subscriber_lt: Bytes - subscriber_gte: Bytes - subscriber_lte: Bytes - subscriber_in: [Bytes!] - subscriber_not_in: [Bytes!] - subscriber_contains: Bytes - subscriber_not_contains: Bytes - units: BigInt - units_not: BigInt - units_gt: BigInt - units_lt: BigInt - units_gte: BigInt - units_lte: BigInt - units_in: [BigInt!] - units_not_in: [BigInt!] userData: Bytes userData_not: Bytes userData_gt: Bytes @@ -5744,14 +6418,6 @@ input IndexUnitsUpdatedEvent_filter { userData_not_in: [Bytes!] userData_contains: Bytes userData_not_contains: Bytes - oldUnits: BigInt - oldUnits_not: BigInt - oldUnits_gt: BigInt - oldUnits_lt: BigInt - oldUnits_gte: BigInt - oldUnits_lte: BigInt - oldUnits_in: [BigInt!] - oldUnits_not_in: [BigInt!] index: String index_not: String index_gt: String @@ -5776,11 +6442,11 @@ input IndexUnitsUpdatedEvent_filter { """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [IndexUnitsUpdatedEvent_filter] - or: [IndexUnitsUpdatedEvent_filter] + and: [IndexCreatedEvent_filter] + or: [IndexCreatedEvent_filter] } -enum IndexUnitsUpdatedEvent_orderBy { +enum IndexCreatedEvent_orderBy { id transactionHash gasPrice @@ -5794,10 +6460,7 @@ enum IndexUnitsUpdatedEvent_orderBy { token publisher indexId - subscriber - units userData - oldUnits index index__id index__createdAtTimestamp @@ -5813,7 +6476,7 @@ enum IndexUnitsUpdatedEvent_orderBy { index__totalAmountDistributedUntilUpdatedAt } -type IndexUnsubscribedEvent implements Event { +type IndexDistributionClaimedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -5852,11 +6515,11 @@ type IndexUnsubscribedEvent implements Event { """ subscriber: Bytes! - userData: Bytes! + amount: BigInt! index: Index! } -input IndexUnsubscribedEvent_filter { +input IndexDistributionClaimedEvent_filter { id: ID id_not: ID id_gt: ID @@ -5987,16 +6650,14 @@ input IndexUnsubscribedEvent_filter { subscriber_not_in: [Bytes!] subscriber_contains: Bytes subscriber_not_contains: Bytes - userData: Bytes - userData_not: Bytes - userData_gt: Bytes - userData_lt: Bytes - userData_gte: Bytes - userData_lte: Bytes - userData_in: [Bytes!] - userData_not_in: [Bytes!] - userData_contains: Bytes - userData_not_contains: Bytes + amount: BigInt + amount_not: BigInt + amount_gt: BigInt + amount_lt: BigInt + amount_gte: BigInt + amount_lte: BigInt + amount_in: [BigInt!] + amount_not_in: [BigInt!] index: String index_not: String index_gt: String @@ -6021,11 +6682,11 @@ input IndexUnsubscribedEvent_filter { """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [IndexUnsubscribedEvent_filter] - or: [IndexUnsubscribedEvent_filter] + and: [IndexDistributionClaimedEvent_filter] + or: [IndexDistributionClaimedEvent_filter] } -enum IndexUnsubscribedEvent_orderBy { +enum IndexDistributionClaimedEvent_orderBy { id transactionHash gasPrice @@ -6040,7 +6701,7 @@ enum IndexUnsubscribedEvent_orderBy { publisher indexId subscriber - userData + amount index index__id index__createdAtTimestamp @@ -6056,7 +6717,7 @@ enum IndexUnsubscribedEvent_orderBy { index__totalAmountDistributedUntilUpdatedAt } -type IndexUpdatedEvent implements Event { +type IndexSubscribedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -6068,6 +6729,7 @@ type IndexUpdatedEvent implements Event { Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) addresses[1] = `publisher` + addresses[2] = `subscriber` """ addresses: [Bytes!]! @@ -6087,15 +6749,18 @@ type IndexUpdatedEvent implements Event { """ indexId: BigInt! - oldIndexValue: BigInt! - newIndexValue: BigInt! - totalUnitsPending: BigInt! - totalUnitsApproved: BigInt! + + """ + The account that is subscribed to `index`. A possible recipient of distributions from the `publisher`. + `subscriber` only receives tokens if they have been allocated units (can be thought of as shares). + + """ + subscriber: Bytes! userData: Bytes! index: Index! } -input IndexUpdatedEvent_filter { +input IndexSubscribedEvent_filter { id: ID id_not: ID id_gt: ID @@ -6216,38 +6881,16 @@ input IndexUpdatedEvent_filter { indexId_lte: BigInt indexId_in: [BigInt!] indexId_not_in: [BigInt!] - oldIndexValue: BigInt - oldIndexValue_not: BigInt - oldIndexValue_gt: BigInt - oldIndexValue_lt: BigInt - oldIndexValue_gte: BigInt - oldIndexValue_lte: BigInt - oldIndexValue_in: [BigInt!] - oldIndexValue_not_in: [BigInt!] - newIndexValue: BigInt - newIndexValue_not: BigInt - newIndexValue_gt: BigInt - newIndexValue_lt: BigInt - newIndexValue_gte: BigInt - newIndexValue_lte: BigInt - newIndexValue_in: [BigInt!] - newIndexValue_not_in: [BigInt!] - totalUnitsPending: BigInt - totalUnitsPending_not: BigInt - totalUnitsPending_gt: BigInt - totalUnitsPending_lt: BigInt - totalUnitsPending_gte: BigInt - totalUnitsPending_lte: BigInt - totalUnitsPending_in: [BigInt!] - totalUnitsPending_not_in: [BigInt!] - totalUnitsApproved: BigInt - totalUnitsApproved_not: BigInt - totalUnitsApproved_gt: BigInt - totalUnitsApproved_lt: BigInt - totalUnitsApproved_gte: BigInt - totalUnitsApproved_lte: BigInt - totalUnitsApproved_in: [BigInt!] - totalUnitsApproved_not_in: [BigInt!] + subscriber: Bytes + subscriber_not: Bytes + subscriber_gt: Bytes + subscriber_lt: Bytes + subscriber_gte: Bytes + subscriber_lte: Bytes + subscriber_in: [Bytes!] + subscriber_not_in: [Bytes!] + subscriber_contains: Bytes + subscriber_not_contains: Bytes userData: Bytes userData_not: Bytes userData_gt: Bytes @@ -6282,11 +6925,11 @@ input IndexUpdatedEvent_filter { """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [IndexUpdatedEvent_filter] - or: [IndexUpdatedEvent_filter] + and: [IndexSubscribedEvent_filter] + or: [IndexSubscribedEvent_filter] } -enum IndexUpdatedEvent_orderBy { +enum IndexSubscribedEvent_orderBy { id transactionHash gasPrice @@ -6300,10 +6943,7 @@ enum IndexUpdatedEvent_orderBy { token publisher indexId - oldIndexValue - newIndexValue - totalUnitsPending - totalUnitsApproved + subscriber userData index index__id @@ -6320,27 +6960,65 @@ enum IndexUpdatedEvent_orderBy { index__totalAmountDistributedUntilUpdatedAt } -type JailEvent implements Event { +""" +IndexSubscription: A higher order entity that contains subscription data for a `subscriber` account of a particular `Index`. + +""" +type IndexSubscription { + """ + ID composed of: subscriberAddress-publisherAddress-tokenAddress-IndexId + + """ id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! + subscriber: Account! """ - Empty addresses array. + A boolean indicating whether the `IndexSubscription` is approved. + Approved subscriptions don't require `subscriber` to claim tokens that are distributed from the publisher. """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - app: Bytes! - reason: BigInt! + approved: Boolean! + + """ + If `units` is `0`, it indicates that the subscription is "deleted" and `subscriber` is no longer subscribed to `index`. + + """ + units: BigInt! + + """ + The total amount of tokens you've received via IDA until + `updatedAtTimestamp`/`updatedAtBlock`. + + """ + totalAmountReceivedUntilUpdatedAt: BigInt! + + """ + The previous index value - used to calculate + `totalAmountReceivedUntilUpdatedAt` field as of the + `index.updatedAtTimestamp`. + The formula to get this value is: + `IndexSubscription.totalAmountReceivedUntilUpdatedAt + ((index.newIndexValue - + indexSubscription.indexValueUntilUpdatedAt) * indexSubscription.units)`. + + """ + indexValueUntilUpdatedAt: BigInt! + index: Index! + + """ + IndexSubscription approved events on the subscription. + + """ + subscriptionApprovedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionApprovedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionApprovedEvent_filter): [SubscriptionApprovedEvent!]! + subscriptionDistributionClaimedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionDistributionClaimedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionDistributionClaimedEvent_filter): [SubscriptionDistributionClaimedEvent!]! + subscriptionRevokedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionRevokedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionRevokedEvent_filter): [SubscriptionRevokedEvent!]! + subscriptionUnitsUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: SubscriptionUnitsUpdatedEvent_orderBy, orderDirection: OrderDirection, where: SubscriptionUnitsUpdatedEvent_filter): [SubscriptionUnitsUpdatedEvent!]! } -input JailEvent_filter { +input IndexSubscription_filter { id: ID id_not: ID id_gt: ID @@ -6349,131 +7027,156 @@ input JailEvent_filter { id_lte: ID id_in: [ID!] id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - app: Bytes - app_not: Bytes - app_gt: Bytes - app_lt: Bytes - app_gte: Bytes - app_lte: Bytes - app_in: [Bytes!] - app_not_in: [Bytes!] - app_contains: Bytes - app_not_contains: Bytes - reason: BigInt - reason_not: BigInt - reason_gt: BigInt - reason_lt: BigInt - reason_gte: BigInt - reason_lte: BigInt - reason_in: [BigInt!] - reason_not_in: [BigInt!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] + updatedAtTimestamp: BigInt + updatedAtTimestamp_not: BigInt + updatedAtTimestamp_gt: BigInt + updatedAtTimestamp_lt: BigInt + updatedAtTimestamp_gte: BigInt + updatedAtTimestamp_lte: BigInt + updatedAtTimestamp_in: [BigInt!] + updatedAtTimestamp_not_in: [BigInt!] + updatedAtBlockNumber: BigInt + updatedAtBlockNumber_not: BigInt + updatedAtBlockNumber_gt: BigInt + updatedAtBlockNumber_lt: BigInt + updatedAtBlockNumber_gte: BigInt + updatedAtBlockNumber_lte: BigInt + updatedAtBlockNumber_in: [BigInt!] + updatedAtBlockNumber_not_in: [BigInt!] + subscriber: String + subscriber_not: String + subscriber_gt: String + subscriber_lt: String + subscriber_gte: String + subscriber_lte: String + subscriber_in: [String!] + subscriber_not_in: [String!] + subscriber_contains: String + subscriber_contains_nocase: String + subscriber_not_contains: String + subscriber_not_contains_nocase: String + subscriber_starts_with: String + subscriber_starts_with_nocase: String + subscriber_not_starts_with: String + subscriber_not_starts_with_nocase: String + subscriber_ends_with: String + subscriber_ends_with_nocase: String + subscriber_not_ends_with: String + subscriber_not_ends_with_nocase: String + subscriber_: Account_filter + approved: Boolean + approved_not: Boolean + approved_in: [Boolean!] + approved_not_in: [Boolean!] + units: BigInt + units_not: BigInt + units_gt: BigInt + units_lt: BigInt + units_gte: BigInt + units_lte: BigInt + units_in: [BigInt!] + units_not_in: [BigInt!] + totalAmountReceivedUntilUpdatedAt: BigInt + totalAmountReceivedUntilUpdatedAt_not: BigInt + totalAmountReceivedUntilUpdatedAt_gt: BigInt + totalAmountReceivedUntilUpdatedAt_lt: BigInt + totalAmountReceivedUntilUpdatedAt_gte: BigInt + totalAmountReceivedUntilUpdatedAt_lte: BigInt + totalAmountReceivedUntilUpdatedAt_in: [BigInt!] + totalAmountReceivedUntilUpdatedAt_not_in: [BigInt!] + indexValueUntilUpdatedAt: BigInt + indexValueUntilUpdatedAt_not: BigInt + indexValueUntilUpdatedAt_gt: BigInt + indexValueUntilUpdatedAt_lt: BigInt + indexValueUntilUpdatedAt_gte: BigInt + indexValueUntilUpdatedAt_lte: BigInt + indexValueUntilUpdatedAt_in: [BigInt!] + indexValueUntilUpdatedAt_not_in: [BigInt!] + index: String + index_not: String + index_gt: String + index_lt: String + index_gte: String + index_lte: String + index_in: [String!] + index_not_in: [String!] + index_contains: String + index_contains_nocase: String + index_not_contains: String + index_not_contains_nocase: String + index_starts_with: String + index_starts_with_nocase: String + index_not_starts_with: String + index_not_starts_with_nocase: String + index_ends_with: String + index_ends_with_nocase: String + index_not_ends_with: String + index_not_ends_with_nocase: String + index_: Index_filter + subscriptionApprovedEvents_: SubscriptionApprovedEvent_filter + subscriptionDistributionClaimedEvents_: SubscriptionDistributionClaimedEvent_filter + subscriptionRevokedEvents_: SubscriptionRevokedEvent_filter + subscriptionUnitsUpdatedEvents_: SubscriptionUnitsUpdatedEvent_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [JailEvent_filter] - or: [JailEvent_filter] + and: [IndexSubscription_filter] + or: [IndexSubscription_filter] } -enum JailEvent_orderBy { +enum IndexSubscription_orderBy { id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - app - reason + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + subscriber + subscriber__id + subscriber__createdAtTimestamp + subscriber__createdAtBlockNumber + subscriber__updatedAtTimestamp + subscriber__updatedAtBlockNumber + subscriber__isSuperApp + approved + units + totalAmountReceivedUntilUpdatedAt + indexValueUntilUpdatedAt + index + index__id + index__createdAtTimestamp + index__createdAtBlockNumber + index__updatedAtTimestamp + index__updatedAtBlockNumber + index__indexId + index__indexValue + index__totalSubscriptionsWithUnits + index__totalUnitsPending + index__totalUnitsApproved + index__totalUnits + index__totalAmountDistributedUntilUpdatedAt + subscriptionApprovedEvents + subscriptionDistributionClaimedEvents + subscriptionRevokedEvents + subscriptionUnitsUpdatedEvents } -type MintedEvent implements Event { +type IndexUnitsUpdatedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -6484,23 +7187,41 @@ type MintedEvent implements Event { """ Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) - addresses[1] = `operator` - addresses[2] = `to` + addresses[1] = `publisher` + addresses[2] = `subscriber` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - operator: Bytes! - to: Bytes! - amount: BigInt! - data: Bytes! token: Bytes! - operatorData: Bytes! + + """ + The creator of the `index`. + + """ + publisher: Bytes! + + """ + An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. + + """ + indexId: BigInt! + + """ + The account that is subscribed to `index`. A possible recipient of distributions from the `publisher`. + `subscriber` only receives tokens if they have been allocated units (can be thought of as shares). + + """ + subscriber: Bytes! + units: BigInt! + userData: Bytes! + oldUnits: BigInt! + index: Index! } -input MintedEvent_filter { +input IndexUnitsUpdatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -6593,44 +7314,6 @@ input MintedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - operator: Bytes - operator_not: Bytes - operator_gt: Bytes - operator_lt: Bytes - operator_gte: Bytes - operator_lte: Bytes - operator_in: [Bytes!] - operator_not_in: [Bytes!] - operator_contains: Bytes - operator_not_contains: Bytes - to: Bytes - to_not: Bytes - to_gt: Bytes - to_lt: Bytes - to_gte: Bytes - to_lte: Bytes - to_in: [Bytes!] - to_not_in: [Bytes!] - to_contains: Bytes - to_not_contains: Bytes - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - data: Bytes - data_not: Bytes - data_gt: Bytes - data_lt: Bytes - data_gte: Bytes - data_lte: Bytes - data_in: [Bytes!] - data_not_in: [Bytes!] - data_contains: Bytes - data_not_contains: Bytes token: Bytes token_not: Bytes token_gt: Bytes @@ -6641,43 +7324,122 @@ input MintedEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - operatorData: Bytes - operatorData_not: Bytes - operatorData_gt: Bytes - operatorData_lt: Bytes - operatorData_gte: Bytes - operatorData_lte: Bytes - operatorData_in: [Bytes!] - operatorData_not_in: [Bytes!] - operatorData_contains: Bytes - operatorData_not_contains: Bytes - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [MintedEvent_filter] - or: [MintedEvent_filter] -} - -enum MintedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex + publisher: Bytes + publisher_not: Bytes + publisher_gt: Bytes + publisher_lt: Bytes + publisher_gte: Bytes + publisher_lte: Bytes + publisher_in: [Bytes!] + publisher_not_in: [Bytes!] + publisher_contains: Bytes + publisher_not_contains: Bytes + indexId: BigInt + indexId_not: BigInt + indexId_gt: BigInt + indexId_lt: BigInt + indexId_gte: BigInt + indexId_lte: BigInt + indexId_in: [BigInt!] + indexId_not_in: [BigInt!] + subscriber: Bytes + subscriber_not: Bytes + subscriber_gt: Bytes + subscriber_lt: Bytes + subscriber_gte: Bytes + subscriber_lte: Bytes + subscriber_in: [Bytes!] + subscriber_not_in: [Bytes!] + subscriber_contains: Bytes + subscriber_not_contains: Bytes + units: BigInt + units_not: BigInt + units_gt: BigInt + units_lt: BigInt + units_gte: BigInt + units_lte: BigInt + units_in: [BigInt!] + units_not_in: [BigInt!] + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + oldUnits: BigInt + oldUnits_not: BigInt + oldUnits_gt: BigInt + oldUnits_lt: BigInt + oldUnits_gte: BigInt + oldUnits_lte: BigInt + oldUnits_in: [BigInt!] + oldUnits_not_in: [BigInt!] + index: String + index_not: String + index_gt: String + index_lt: String + index_gte: String + index_lte: String + index_in: [String!] + index_not_in: [String!] + index_contains: String + index_contains_nocase: String + index_not_contains: String + index_not_contains_nocase: String + index_starts_with: String + index_starts_with_nocase: String + index_not_starts_with: String + index_not_starts_with_nocase: String + index_ends_with: String + index_ends_with_nocase: String + index_not_ends_with: String + index_not_ends_with_nocase: String + index_: Index_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [IndexUnitsUpdatedEvent_filter] + or: [IndexUnitsUpdatedEvent_filter] +} + +enum IndexUnitsUpdatedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex order - operator - to - amount - data token - operatorData + publisher + indexId + subscriber + units + userData + oldUnits + index + index__id + index__createdAtTimestamp + index__createdAtBlockNumber + index__updatedAtTimestamp + index__updatedAtBlockNumber + index__indexId + index__indexValue + index__totalSubscriptionsWithUnits + index__totalUnitsPending + index__totalUnitsApproved + index__totalUnits + index__totalAmountDistributedUntilUpdatedAt } -type NewPICEvent implements Event { +type IndexUnsubscribedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -6688,40 +7450,39 @@ type NewPICEvent implements Event { """ Contains the addresses that were impacted by this event: addresses[0] = `token` (superToken) - addresses[1] = `pic` (new Patrician In Charge) + addresses[1] = `publisher` + addresses[2] = `subscriber` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - - """ - The address of the `token` (supertoken) the PIC is posting a bond for. - - """ token: Bytes! """ - The address of the new Patrician In Charge (PIC). + The creator of the `index`. """ - pic: Bytes! + publisher: Bytes! """ - The bond the new PIC staked in order to claim the position. + An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. """ - bond: BigInt! + indexId: BigInt! """ - The flowrate at which the bond is streamed back to the PIC. + The account that is subscribed to `index`. A possible recipient of distributions from the `publisher`. + `subscriber` only receives tokens if they have been allocated units (can be thought of as shares). """ - exitRate: BigInt! + subscriber: Bytes! + userData: Bytes! + index: Index! } -input NewPICEvent_filter { +input IndexUnsubscribedEvent_filter { id: ID id_not: ID id_gt: ID @@ -6824,40 +7585,73 @@ input NewPICEvent_filter { token_not_in: [Bytes!] token_contains: Bytes token_not_contains: Bytes - pic: Bytes - pic_not: Bytes - pic_gt: Bytes - pic_lt: Bytes - pic_gte: Bytes - pic_lte: Bytes - pic_in: [Bytes!] - pic_not_in: [Bytes!] - pic_contains: Bytes - pic_not_contains: Bytes - bond: BigInt - bond_not: BigInt - bond_gt: BigInt - bond_lt: BigInt - bond_gte: BigInt - bond_lte: BigInt - bond_in: [BigInt!] - bond_not_in: [BigInt!] - exitRate: BigInt - exitRate_not: BigInt - exitRate_gt: BigInt - exitRate_lt: BigInt - exitRate_gte: BigInt - exitRate_lte: BigInt - exitRate_in: [BigInt!] - exitRate_not_in: [BigInt!] + publisher: Bytes + publisher_not: Bytes + publisher_gt: Bytes + publisher_lt: Bytes + publisher_gte: Bytes + publisher_lte: Bytes + publisher_in: [Bytes!] + publisher_not_in: [Bytes!] + publisher_contains: Bytes + publisher_not_contains: Bytes + indexId: BigInt + indexId_not: BigInt + indexId_gt: BigInt + indexId_lt: BigInt + indexId_gte: BigInt + indexId_lte: BigInt + indexId_in: [BigInt!] + indexId_not_in: [BigInt!] + subscriber: Bytes + subscriber_not: Bytes + subscriber_gt: Bytes + subscriber_lt: Bytes + subscriber_gte: Bytes + subscriber_lte: Bytes + subscriber_in: [Bytes!] + subscriber_not_in: [Bytes!] + subscriber_contains: Bytes + subscriber_not_contains: Bytes + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + index: String + index_not: String + index_gt: String + index_lt: String + index_gte: String + index_lte: String + index_in: [String!] + index_not_in: [String!] + index_contains: String + index_contains_nocase: String + index_not_contains: String + index_not_contains_nocase: String + index_starts_with: String + index_starts_with_nocase: String + index_not_starts_with: String + index_not_starts_with_nocase: String + index_ends_with: String + index_ends_with_nocase: String + index_not_ends_with: String + index_not_ends_with_nocase: String + index_: Index_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [NewPICEvent_filter] - or: [NewPICEvent_filter] + and: [IndexUnsubscribedEvent_filter] + or: [IndexUnsubscribedEvent_filter] } -enum NewPICEvent_orderBy { +enum IndexUnsubscribedEvent_orderBy { id transactionHash gasPrice @@ -6869,18 +7663,26 @@ enum NewPICEvent_orderBy { logIndex order token - pic - bond - exitRate + publisher + indexId + subscriber + userData + index + index__id + index__createdAtTimestamp + index__createdAtBlockNumber + index__updatedAtTimestamp + index__updatedAtBlockNumber + index__indexId + index__indexValue + index__totalSubscriptionsWithUnits + index__totalUnitsPending + index__totalUnitsApproved + index__totalUnits + index__totalAmountDistributedUntilUpdatedAt } -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type PPPConfigurationChangedEvent implements Event { +type IndexUpdatedEvent implements Event { id: ID! transactionHash: Bytes! gasPrice: BigInt! @@ -6889,27 +7691,37 @@ type PPPConfigurationChangedEvent implements Event { name: String! """ - The address of the governance contract the event was emitted from. - - """ - governanceAddress: Bytes! - - """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `publisher` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - host: Bytes! - superToken: Bytes! - isKeySet: Boolean! - liquidationPeriod: BigInt! - patricianPeriod: BigInt! + token: Bytes! + + """ + The creator of the `index`. + + """ + publisher: Bytes! + + """ + An arbitrary uint32 value used to allow a publisher to create multiple indexes for a specific `token`. + + """ + indexId: BigInt! + oldIndexValue: BigInt! + newIndexValue: BigInt! + totalUnitsPending: BigInt! + totalUnitsApproved: BigInt! + userData: Bytes! + index: Index! } -input PPPConfigurationChangedEvent_filter { +input IndexUpdatedEvent_filter { id: ID id_not: ID id_gt: ID @@ -6972,16 +7784,6 @@ input PPPConfigurationChangedEvent_filter { name_ends_with_nocase: String name_not_ends_with: String name_not_ends_with_nocase: String - governanceAddress: Bytes - governanceAddress_not: Bytes - governanceAddress_gt: Bytes - governanceAddress_lt: Bytes - governanceAddress_gte: Bytes - governanceAddress_lte: Bytes - governanceAddress_in: [Bytes!] - governanceAddress_not_in: [Bytes!] - governanceAddress_contains: Bytes - governanceAddress_not_contains: Bytes addresses: [Bytes!] addresses_not: [Bytes!] addresses_contains: [Bytes!] @@ -7012,954 +7814,2643 @@ input PPPConfigurationChangedEvent_filter { order_lte: BigInt order_in: [BigInt!] order_not_in: [BigInt!] - host: Bytes - host_not: Bytes - host_gt: Bytes - host_lt: Bytes - host_gte: Bytes - host_lte: Bytes - host_in: [Bytes!] - host_not_in: [Bytes!] - host_contains: Bytes - host_not_contains: Bytes - superToken: Bytes - superToken_not: Bytes - superToken_gt: Bytes - superToken_lt: Bytes - superToken_gte: Bytes - superToken_lte: Bytes - superToken_in: [Bytes!] - superToken_not_in: [Bytes!] - superToken_contains: Bytes - superToken_not_contains: Bytes - isKeySet: Boolean - isKeySet_not: Boolean - isKeySet_in: [Boolean!] - isKeySet_not_in: [Boolean!] - liquidationPeriod: BigInt - liquidationPeriod_not: BigInt - liquidationPeriod_gt: BigInt - liquidationPeriod_lt: BigInt - liquidationPeriod_gte: BigInt - liquidationPeriod_lte: BigInt - liquidationPeriod_in: [BigInt!] - liquidationPeriod_not_in: [BigInt!] - patricianPeriod: BigInt - patricianPeriod_not: BigInt - patricianPeriod_gt: BigInt - patricianPeriod_lt: BigInt - patricianPeriod_gte: BigInt - patricianPeriod_lte: BigInt - patricianPeriod_in: [BigInt!] - patricianPeriod_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + publisher: Bytes + publisher_not: Bytes + publisher_gt: Bytes + publisher_lt: Bytes + publisher_gte: Bytes + publisher_lte: Bytes + publisher_in: [Bytes!] + publisher_not_in: [Bytes!] + publisher_contains: Bytes + publisher_not_contains: Bytes + indexId: BigInt + indexId_not: BigInt + indexId_gt: BigInt + indexId_lt: BigInt + indexId_gte: BigInt + indexId_lte: BigInt + indexId_in: [BigInt!] + indexId_not_in: [BigInt!] + oldIndexValue: BigInt + oldIndexValue_not: BigInt + oldIndexValue_gt: BigInt + oldIndexValue_lt: BigInt + oldIndexValue_gte: BigInt + oldIndexValue_lte: BigInt + oldIndexValue_in: [BigInt!] + oldIndexValue_not_in: [BigInt!] + newIndexValue: BigInt + newIndexValue_not: BigInt + newIndexValue_gt: BigInt + newIndexValue_lt: BigInt + newIndexValue_gte: BigInt + newIndexValue_lte: BigInt + newIndexValue_in: [BigInt!] + newIndexValue_not_in: [BigInt!] + totalUnitsPending: BigInt + totalUnitsPending_not: BigInt + totalUnitsPending_gt: BigInt + totalUnitsPending_lt: BigInt + totalUnitsPending_gte: BigInt + totalUnitsPending_lte: BigInt + totalUnitsPending_in: [BigInt!] + totalUnitsPending_not_in: [BigInt!] + totalUnitsApproved: BigInt + totalUnitsApproved_not: BigInt + totalUnitsApproved_gt: BigInt + totalUnitsApproved_lt: BigInt + totalUnitsApproved_gte: BigInt + totalUnitsApproved_lte: BigInt + totalUnitsApproved_in: [BigInt!] + totalUnitsApproved_not_in: [BigInt!] + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + index: String + index_not: String + index_gt: String + index_lt: String + index_gte: String + index_lte: String + index_in: [String!] + index_not_in: [String!] + index_contains: String + index_contains_nocase: String + index_not_contains: String + index_not_contains_nocase: String + index_starts_with: String + index_starts_with_nocase: String + index_not_starts_with: String + index_not_starts_with_nocase: String + index_ends_with: String + index_ends_with_nocase: String + index_not_ends_with: String + index_not_ends_with_nocase: String + index_: Index_filter """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [PPPConfigurationChangedEvent_filter] - or: [PPPConfigurationChangedEvent_filter] + and: [IndexUpdatedEvent_filter] + or: [IndexUpdatedEvent_filter] } -enum PPPConfigurationChangedEvent_orderBy { +enum IndexUpdatedEvent_orderBy { id transactionHash gasPrice gasUsed timestamp name - governanceAddress addresses blockNumber logIndex order - host - superToken - isKeySet - liquidationPeriod - patricianPeriod + token + publisher + indexId + oldIndexValue + newIndexValue + totalUnitsPending + totalUnitsApproved + userData + index + index__id + index__createdAtTimestamp + index__createdAtBlockNumber + index__updatedAtTimestamp + index__updatedAtBlockNumber + index__indexId + index__indexValue + index__totalSubscriptionsWithUnits + index__totalUnitsPending + index__totalUnitsApproved + index__totalUnits + index__totalAmountDistributedUntilUpdatedAt } -type Query { - flowUpdatedEvent( - id: ID! +type InstantDistributionUpdatedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `poolDistributor` + addresses[3] = `operator` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + token: Bytes! + operator: Bytes! + requestedAmount: BigInt! + actualAmount: BigInt! + totalUnits: BigInt! + userData: Bytes! + pool: Pool! + poolDistributor: PoolDistributor! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): FlowUpdatedEvent - flowUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: FlowUpdatedEvent_orderBy - orderDirection: OrderDirection - where: FlowUpdatedEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [FlowUpdatedEvent!]! - flowOperatorUpdatedEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +input InstantDistributionUpdatedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + operator: Bytes + operator_not: Bytes + operator_gt: Bytes + operator_lt: Bytes + operator_gte: Bytes + operator_lte: Bytes + operator_in: [Bytes!] + operator_not_in: [Bytes!] + operator_contains: Bytes + operator_not_contains: Bytes + requestedAmount: BigInt + requestedAmount_not: BigInt + requestedAmount_gt: BigInt + requestedAmount_lt: BigInt + requestedAmount_gte: BigInt + requestedAmount_lte: BigInt + requestedAmount_in: [BigInt!] + requestedAmount_not_in: [BigInt!] + actualAmount: BigInt + actualAmount_not: BigInt + actualAmount_gt: BigInt + actualAmount_lt: BigInt + actualAmount_gte: BigInt + actualAmount_lte: BigInt + actualAmount_in: [BigInt!] + actualAmount_not_in: [BigInt!] + totalUnits: BigInt + totalUnits_not: BigInt + totalUnits_gt: BigInt + totalUnits_lt: BigInt + totalUnits_gte: BigInt + totalUnits_lte: BigInt + totalUnits_in: [BigInt!] + totalUnits_not_in: [BigInt!] + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolDistributor: String + poolDistributor_not: String + poolDistributor_gt: String + poolDistributor_lt: String + poolDistributor_gte: String + poolDistributor_lte: String + poolDistributor_in: [String!] + poolDistributor_not_in: [String!] + poolDistributor_contains: String + poolDistributor_contains_nocase: String + poolDistributor_not_contains: String + poolDistributor_not_contains_nocase: String + poolDistributor_starts_with: String + poolDistributor_starts_with_nocase: String + poolDistributor_not_starts_with: String + poolDistributor_not_starts_with_nocase: String + poolDistributor_ends_with: String + poolDistributor_ends_with_nocase: String + poolDistributor_not_ends_with: String + poolDistributor_not_ends_with_nocase: String + poolDistributor_: PoolDistributor_filter - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): FlowOperatorUpdatedEvent - flowOperatorUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: FlowOperatorUpdatedEvent_orderBy - orderDirection: OrderDirection - where: FlowOperatorUpdatedEvent_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [InstantDistributionUpdatedEvent_filter] + or: [InstantDistributionUpdatedEvent_filter] +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +enum InstantDistributionUpdatedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + operator + requestedAmount + actualAmount + totalUnits + userData + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolDistributor + poolDistributor__id + poolDistributor__createdAtTimestamp + poolDistributor__createdAtBlockNumber + poolDistributor__updatedAtTimestamp + poolDistributor__updatedAtBlockNumber + poolDistributor__totalAmountInstantlyDistributedUntilUpdatedAt + poolDistributor__totalAmountFlowedDistributedUntilUpdatedAt + poolDistributor__totalAmountDistributedUntilUpdatedAt + poolDistributor__totalBuffer + poolDistributor__flowRate +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [FlowOperatorUpdatedEvent!]! - indexCreatedEvent( - id: ID! +""" +8 bytes signed integer - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +""" +scalar Int8 - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexCreatedEvent - indexCreatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IndexCreatedEvent_orderBy - orderDirection: OrderDirection - where: IndexCreatedEvent_filter +type JailEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + Contains the addresses that were impacted by this event: + addresses[0] = `app` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + app: Bytes! + reason: BigInt! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexCreatedEvent!]! - indexDistributionClaimedEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexDistributionClaimedEvent - indexDistributionClaimedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IndexDistributionClaimedEvent_orderBy - orderDirection: OrderDirection - where: IndexDistributionClaimedEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexDistributionClaimedEvent!]! - indexUpdatedEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexUpdatedEvent - indexUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IndexUpdatedEvent_orderBy - orderDirection: OrderDirection - where: IndexUpdatedEvent_filter +input JailEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + app: Bytes + app_not: Bytes + app_gt: Bytes + app_lt: Bytes + app_gte: Bytes + app_lte: Bytes + app_in: [Bytes!] + app_not_in: [Bytes!] + app_contains: Bytes + app_not_contains: Bytes + reason: BigInt + reason_not: BigInt + reason_gt: BigInt + reason_lt: BigInt + reason_gte: BigInt + reason_lte: BigInt + reason_in: [BigInt!] + reason_not_in: [BigInt!] - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [JailEvent_filter] + or: [JailEvent_filter] +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexUpdatedEvent!]! - indexSubscribedEvent( - id: ID! +enum JailEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + app + reason +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +type MemberUnitsUpdatedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexSubscribedEvent - indexSubscribedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IndexSubscribedEvent_orderBy - orderDirection: OrderDirection - where: IndexSubscribedEvent_filter + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `member` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + token: Bytes! + oldUnits: BigInt! + units: BigInt! + totalUnits: BigInt! + pool: Pool! + poolMember: PoolMember! +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexSubscribedEvent!]! - indexUnitsUpdatedEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexUnitsUpdatedEvent - indexUnitsUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IndexUnitsUpdatedEvent_orderBy - orderDirection: OrderDirection - where: IndexUnitsUpdatedEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +input MemberUnitsUpdatedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + oldUnits: BigInt + oldUnits_not: BigInt + oldUnits_gt: BigInt + oldUnits_lt: BigInt + oldUnits_gte: BigInt + oldUnits_lte: BigInt + oldUnits_in: [BigInt!] + oldUnits_not_in: [BigInt!] + units: BigInt + units_not: BigInt + units_gt: BigInt + units_lt: BigInt + units_gte: BigInt + units_lte: BigInt + units_in: [BigInt!] + units_not_in: [BigInt!] + totalUnits: BigInt + totalUnits_not: BigInt + totalUnits_gt: BigInt + totalUnits_lt: BigInt + totalUnits_gte: BigInt + totalUnits_lte: BigInt + totalUnits_in: [BigInt!] + totalUnits_not_in: [BigInt!] + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolMember: String + poolMember_not: String + poolMember_gt: String + poolMember_lt: String + poolMember_gte: String + poolMember_lte: String + poolMember_in: [String!] + poolMember_not_in: [String!] + poolMember_contains: String + poolMember_contains_nocase: String + poolMember_not_contains: String + poolMember_not_contains_nocase: String + poolMember_starts_with: String + poolMember_starts_with_nocase: String + poolMember_not_starts_with: String + poolMember_not_starts_with_nocase: String + poolMember_ends_with: String + poolMember_ends_with_nocase: String + poolMember_not_ends_with: String + poolMember_not_ends_with_nocase: String + poolMember_: PoolMember_filter - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexUnitsUpdatedEvent!]! - indexUnsubscribedEvent( - id: ID! + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [MemberUnitsUpdatedEvent_filter] + or: [MemberUnitsUpdatedEvent_filter] +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +enum MemberUnitsUpdatedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + oldUnits + units + totalUnits + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolMember + poolMember__id + poolMember__createdAtTimestamp + poolMember__createdAtBlockNumber + poolMember__updatedAtTimestamp + poolMember__updatedAtBlockNumber + poolMember__units + poolMember__isConnected + poolMember__totalAmountClaimed + poolMember__poolTotalAmountDistributedUntilUpdatedAt + poolMember__totalAmountReceivedUntilUpdatedAt + poolMember__syncedPerUnitSettledValue + poolMember__syncedPerUnitFlowRate +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexUnsubscribedEvent - indexUnsubscribedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: IndexUnsubscribedEvent_orderBy - orderDirection: OrderDirection - where: IndexUnsubscribedEvent_filter +type MintedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `operator` + addresses[2] = `to` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + operator: Bytes! + to: Bytes! + amount: BigInt! + data: Bytes! + token: Bytes! + operatorData: Bytes! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexUnsubscribedEvent!]! - subscriptionApprovedEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +input MintedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + operator: Bytes + operator_not: Bytes + operator_gt: Bytes + operator_lt: Bytes + operator_gte: Bytes + operator_lte: Bytes + operator_in: [Bytes!] + operator_not_in: [Bytes!] + operator_contains: Bytes + operator_not_contains: Bytes + to: Bytes + to_not: Bytes + to_gt: Bytes + to_lt: Bytes + to_gte: Bytes + to_lte: Bytes + to_in: [Bytes!] + to_not_in: [Bytes!] + to_contains: Bytes + to_not_contains: Bytes + amount: BigInt + amount_not: BigInt + amount_gt: BigInt + amount_lt: BigInt + amount_gte: BigInt + amount_lte: BigInt + amount_in: [BigInt!] + amount_not_in: [BigInt!] + data: Bytes + data_not: Bytes + data_gt: Bytes + data_lt: Bytes + data_gte: Bytes + data_lte: Bytes + data_in: [Bytes!] + data_not_in: [Bytes!] + data_contains: Bytes + data_not_contains: Bytes + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + operatorData: Bytes + operatorData_not: Bytes + operatorData_gt: Bytes + operatorData_lt: Bytes + operatorData_gte: Bytes + operatorData_lte: Bytes + operatorData_in: [Bytes!] + operatorData_not_in: [Bytes!] + operatorData_contains: Bytes + operatorData_not_contains: Bytes - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionApprovedEvent - subscriptionApprovedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SubscriptionApprovedEvent_orderBy - orderDirection: OrderDirection - where: SubscriptionApprovedEvent_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [MintedEvent_filter] + or: [MintedEvent_filter] +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +enum MintedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + operator + to + amount + data + token + operatorData +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionApprovedEvent!]! - subscriptionDistributionClaimedEvent( - id: ID! +type NewPICEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pic` (new Patrician In Charge) + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionDistributionClaimedEvent - subscriptionDistributionClaimedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SubscriptionDistributionClaimedEvent_orderBy - orderDirection: OrderDirection - where: SubscriptionDistributionClaimedEvent_filter + """ + The address of the `token` (supertoken) the PIC is posting a bond for. + + """ + token: Bytes! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + The address of the new Patrician In Charge (PIC). + + """ + pic: Bytes! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionDistributionClaimedEvent!]! - subscriptionRevokedEvent( - id: ID! + """ + The bond the new PIC staked in order to claim the position. + + """ + bond: BigInt! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + The flowrate at which the bond is streamed back to the PIC. + + """ + exitRate: BigInt! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionRevokedEvent - subscriptionRevokedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SubscriptionRevokedEvent_orderBy - orderDirection: OrderDirection - where: SubscriptionRevokedEvent_filter +input NewPICEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + pic: Bytes + pic_not: Bytes + pic_gt: Bytes + pic_lt: Bytes + pic_gte: Bytes + pic_lte: Bytes + pic_in: [Bytes!] + pic_not_in: [Bytes!] + pic_contains: Bytes + pic_not_contains: Bytes + bond: BigInt + bond_not: BigInt + bond_gt: BigInt + bond_lt: BigInt + bond_gte: BigInt + bond_lte: BigInt + bond_in: [BigInt!] + bond_not_in: [BigInt!] + exitRate: BigInt + exitRate_not: BigInt + exitRate_gt: BigInt + exitRate_lt: BigInt + exitRate_gte: BigInt + exitRate_lte: BigInt + exitRate_in: [BigInt!] + exitRate_not_in: [BigInt!] - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [NewPICEvent_filter] + or: [NewPICEvent_filter] +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionRevokedEvent!]! - subscriptionUnitsUpdatedEvent( - id: ID! +enum NewPICEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + pic + bond + exitRate +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +"""Defines the order direction, either ascending or descending""" +enum OrderDirection { + asc + desc +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionUnitsUpdatedEvent - subscriptionUnitsUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SubscriptionUnitsUpdatedEvent_orderBy - orderDirection: OrderDirection - where: SubscriptionUnitsUpdatedEvent_filter +type Pool { + """ + ID: poolAddress + + """ + id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! + totalUnits: BigInt! + totalConnectedUnits: BigInt! + totalDisconnectedUnits: BigInt! + totalAmountInstantlyDistributedUntilUpdatedAt: BigInt! + totalAmountFlowedDistributedUntilUpdatedAt: BigInt! + totalAmountDistributedUntilUpdatedAt: BigInt! + totalFlowAdjustmentAmountDistributedUntilUpdatedAt: BigInt! + perUnitSettledValue: BigInt! + perUnitFlowRate: BigInt! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionUnitsUpdatedEvent!]! - agreementClassRegisteredEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): AgreementClassRegisteredEvent - agreementClassRegisteredEvents( - skip: Int = 0 - first: Int = 100 - orderBy: AgreementClassRegisteredEvent_orderBy - orderDirection: OrderDirection - where: AgreementClassRegisteredEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + A member is any account which has more than 0 units in the pool. + + """ + totalMembers: Int! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [AgreementClassRegisteredEvent!]! - agreementClassUpdatedEvent( - id: ID! + """ + A connected member is any account which has more than 0 units in the pool and is connected. + + """ + totalConnectedMembers: Int! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + A disconnected member is any account which has more than 0 units in the pool and is not connected. + + """ + totalDisconnectedMembers: Int! + adjustmentFlowRate: BigInt! + flowRate: BigInt! + totalBuffer: BigInt! + token: Token! + admin: Account! + poolDistributors(skip: Int = 0, first: Int = 100, orderBy: PoolDistributor_orderBy, orderDirection: OrderDirection, where: PoolDistributor_filter): [PoolDistributor!]! + poolMembers(skip: Int = 0, first: Int = 100, orderBy: PoolMember_orderBy, orderDirection: OrderDirection, where: PoolMember_filter): [PoolMember!]! + poolCreatedEvent: PoolCreatedEvent! + poolConnectionUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: PoolConnectionUpdatedEvent_orderBy, orderDirection: OrderDirection, where: PoolConnectionUpdatedEvent_filter): [PoolConnectionUpdatedEvent!]! + bufferAdjustedEvents(skip: Int = 0, first: Int = 100, orderBy: BufferAdjustedEvent_orderBy, orderDirection: OrderDirection, where: BufferAdjustedEvent_filter): [BufferAdjustedEvent!]! + instantDistributionUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: InstantDistributionUpdatedEvent_orderBy, orderDirection: OrderDirection, where: InstantDistributionUpdatedEvent_filter): [InstantDistributionUpdatedEvent!]! + flowDistributionUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: FlowDistributionUpdatedEvent_orderBy, orderDirection: OrderDirection, where: FlowDistributionUpdatedEvent_filter): [FlowDistributionUpdatedEvent!]! + memberUnitsUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: MemberUnitsUpdatedEvent_orderBy, orderDirection: OrderDirection, where: MemberUnitsUpdatedEvent_filter): [MemberUnitsUpdatedEvent!]! + distributionClaimedEvents(skip: Int = 0, first: Int = 100, orderBy: DistributionClaimedEvent_orderBy, orderDirection: OrderDirection, where: DistributionClaimedEvent_filter): [DistributionClaimedEvent!]! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): AgreementClassUpdatedEvent - agreementClassUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: AgreementClassUpdatedEvent_orderBy - orderDirection: OrderDirection - where: AgreementClassUpdatedEvent_filter +input Pool_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] + updatedAtTimestamp: BigInt + updatedAtTimestamp_not: BigInt + updatedAtTimestamp_gt: BigInt + updatedAtTimestamp_lt: BigInt + updatedAtTimestamp_gte: BigInt + updatedAtTimestamp_lte: BigInt + updatedAtTimestamp_in: [BigInt!] + updatedAtTimestamp_not_in: [BigInt!] + updatedAtBlockNumber: BigInt + updatedAtBlockNumber_not: BigInt + updatedAtBlockNumber_gt: BigInt + updatedAtBlockNumber_lt: BigInt + updatedAtBlockNumber_gte: BigInt + updatedAtBlockNumber_lte: BigInt + updatedAtBlockNumber_in: [BigInt!] + updatedAtBlockNumber_not_in: [BigInt!] + totalUnits: BigInt + totalUnits_not: BigInt + totalUnits_gt: BigInt + totalUnits_lt: BigInt + totalUnits_gte: BigInt + totalUnits_lte: BigInt + totalUnits_in: [BigInt!] + totalUnits_not_in: [BigInt!] + totalConnectedUnits: BigInt + totalConnectedUnits_not: BigInt + totalConnectedUnits_gt: BigInt + totalConnectedUnits_lt: BigInt + totalConnectedUnits_gte: BigInt + totalConnectedUnits_lte: BigInt + totalConnectedUnits_in: [BigInt!] + totalConnectedUnits_not_in: [BigInt!] + totalDisconnectedUnits: BigInt + totalDisconnectedUnits_not: BigInt + totalDisconnectedUnits_gt: BigInt + totalDisconnectedUnits_lt: BigInt + totalDisconnectedUnits_gte: BigInt + totalDisconnectedUnits_lte: BigInt + totalDisconnectedUnits_in: [BigInt!] + totalDisconnectedUnits_not_in: [BigInt!] + totalAmountInstantlyDistributedUntilUpdatedAt: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_not: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_gt: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_lt: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_gte: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_lte: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountInstantlyDistributedUntilUpdatedAt_not_in: [BigInt!] + totalAmountFlowedDistributedUntilUpdatedAt: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_not: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_gt: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_lt: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_gte: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_lte: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountFlowedDistributedUntilUpdatedAt_not_in: [BigInt!] + totalAmountDistributedUntilUpdatedAt: BigInt + totalAmountDistributedUntilUpdatedAt_not: BigInt + totalAmountDistributedUntilUpdatedAt_gt: BigInt + totalAmountDistributedUntilUpdatedAt_lt: BigInt + totalAmountDistributedUntilUpdatedAt_gte: BigInt + totalAmountDistributedUntilUpdatedAt_lte: BigInt + totalAmountDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountDistributedUntilUpdatedAt_not_in: [BigInt!] + totalFlowAdjustmentAmountDistributedUntilUpdatedAt: BigInt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_not: BigInt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_gt: BigInt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_lt: BigInt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_gte: BigInt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_lte: BigInt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_in: [BigInt!] + totalFlowAdjustmentAmountDistributedUntilUpdatedAt_not_in: [BigInt!] + perUnitSettledValue: BigInt + perUnitSettledValue_not: BigInt + perUnitSettledValue_gt: BigInt + perUnitSettledValue_lt: BigInt + perUnitSettledValue_gte: BigInt + perUnitSettledValue_lte: BigInt + perUnitSettledValue_in: [BigInt!] + perUnitSettledValue_not_in: [BigInt!] + perUnitFlowRate: BigInt + perUnitFlowRate_not: BigInt + perUnitFlowRate_gt: BigInt + perUnitFlowRate_lt: BigInt + perUnitFlowRate_gte: BigInt + perUnitFlowRate_lte: BigInt + perUnitFlowRate_in: [BigInt!] + perUnitFlowRate_not_in: [BigInt!] + totalMembers: Int + totalMembers_not: Int + totalMembers_gt: Int + totalMembers_lt: Int + totalMembers_gte: Int + totalMembers_lte: Int + totalMembers_in: [Int!] + totalMembers_not_in: [Int!] + totalConnectedMembers: Int + totalConnectedMembers_not: Int + totalConnectedMembers_gt: Int + totalConnectedMembers_lt: Int + totalConnectedMembers_gte: Int + totalConnectedMembers_lte: Int + totalConnectedMembers_in: [Int!] + totalConnectedMembers_not_in: [Int!] + totalDisconnectedMembers: Int + totalDisconnectedMembers_not: Int + totalDisconnectedMembers_gt: Int + totalDisconnectedMembers_lt: Int + totalDisconnectedMembers_gte: Int + totalDisconnectedMembers_lte: Int + totalDisconnectedMembers_in: [Int!] + totalDisconnectedMembers_not_in: [Int!] + adjustmentFlowRate: BigInt + adjustmentFlowRate_not: BigInt + adjustmentFlowRate_gt: BigInt + adjustmentFlowRate_lt: BigInt + adjustmentFlowRate_gte: BigInt + adjustmentFlowRate_lte: BigInt + adjustmentFlowRate_in: [BigInt!] + adjustmentFlowRate_not_in: [BigInt!] + flowRate: BigInt + flowRate_not: BigInt + flowRate_gt: BigInt + flowRate_lt: BigInt + flowRate_gte: BigInt + flowRate_lte: BigInt + flowRate_in: [BigInt!] + flowRate_not_in: [BigInt!] + totalBuffer: BigInt + totalBuffer_not: BigInt + totalBuffer_gt: BigInt + totalBuffer_lt: BigInt + totalBuffer_gte: BigInt + totalBuffer_lte: BigInt + totalBuffer_in: [BigInt!] + totalBuffer_not_in: [BigInt!] + token: String + token_not: String + token_gt: String + token_lt: String + token_gte: String + token_lte: String + token_in: [String!] + token_not_in: [String!] + token_contains: String + token_contains_nocase: String + token_not_contains: String + token_not_contains_nocase: String + token_starts_with: String + token_starts_with_nocase: String + token_not_starts_with: String + token_not_starts_with_nocase: String + token_ends_with: String + token_ends_with_nocase: String + token_not_ends_with: String + token_not_ends_with_nocase: String + token_: Token_filter + admin: String + admin_not: String + admin_gt: String + admin_lt: String + admin_gte: String + admin_lte: String + admin_in: [String!] + admin_not_in: [String!] + admin_contains: String + admin_contains_nocase: String + admin_not_contains: String + admin_not_contains_nocase: String + admin_starts_with: String + admin_starts_with_nocase: String + admin_not_starts_with: String + admin_not_starts_with_nocase: String + admin_ends_with: String + admin_ends_with_nocase: String + admin_not_ends_with: String + admin_not_ends_with_nocase: String + admin_: Account_filter + poolDistributors_: PoolDistributor_filter + poolMembers_: PoolMember_filter + poolCreatedEvent_: PoolCreatedEvent_filter + poolConnectionUpdatedEvents_: PoolConnectionUpdatedEvent_filter + bufferAdjustedEvents_: BufferAdjustedEvent_filter + instantDistributionUpdatedEvents_: InstantDistributionUpdatedEvent_filter + flowDistributionUpdatedEvents_: FlowDistributionUpdatedEvent_filter + memberUnitsUpdatedEvents_: MemberUnitsUpdatedEvent_filter + distributionClaimedEvents_: DistributionClaimedEvent_filter - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Pool_filter] + or: [Pool_filter] +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [AgreementClassUpdatedEvent!]! - appRegisteredEvent( - id: ID! +enum Pool_orderBy { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + totalUnits + totalConnectedUnits + totalDisconnectedUnits + totalAmountInstantlyDistributedUntilUpdatedAt + totalAmountFlowedDistributedUntilUpdatedAt + totalAmountDistributedUntilUpdatedAt + totalFlowAdjustmentAmountDistributedUntilUpdatedAt + perUnitSettledValue + perUnitFlowRate + totalMembers + totalConnectedMembers + totalDisconnectedMembers + adjustmentFlowRate + flowRate + totalBuffer + token + token__id + token__createdAtTimestamp + token__createdAtBlockNumber + token__decimals + token__name + token__symbol + token__isSuperToken + token__isNativeAssetSuperToken + token__isListed + token__underlyingAddress + admin + admin__id + admin__createdAtTimestamp + admin__createdAtBlockNumber + admin__updatedAtTimestamp + admin__updatedAtBlockNumber + admin__isSuperApp + poolDistributors + poolMembers + poolCreatedEvent + poolCreatedEvent__id + poolCreatedEvent__transactionHash + poolCreatedEvent__gasPrice + poolCreatedEvent__gasUsed + poolCreatedEvent__timestamp + poolCreatedEvent__name + poolCreatedEvent__blockNumber + poolCreatedEvent__logIndex + poolCreatedEvent__order + poolCreatedEvent__token + poolCreatedEvent__caller + poolCreatedEvent__admin + poolConnectionUpdatedEvents + bufferAdjustedEvents + instantDistributionUpdatedEvents + flowDistributionUpdatedEvents + memberUnitsUpdatedEvents + distributionClaimedEvents +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +type PoolConnectionUpdatedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): AppRegisteredEvent - appRegisteredEvents( - skip: Int = 0 - first: Int = 100 - orderBy: AppRegisteredEvent_orderBy - orderDirection: OrderDirection - where: AppRegisteredEvent_filter + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `poolMember` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + token: Bytes! + connected: Boolean! + userData: Bytes! + pool: Pool! + poolMember: PoolMember! +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [AppRegisteredEvent!]! - governanceReplacedEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): GovernanceReplacedEvent - governanceReplacedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: GovernanceReplacedEvent_orderBy - orderDirection: OrderDirection - where: GovernanceReplacedEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [GovernanceReplacedEvent!]! - jailEvent( - id: ID! - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): JailEvent - jailEvents( - skip: Int = 0 - first: Int = 100 - orderBy: JailEvent_orderBy - orderDirection: OrderDirection - where: JailEvent_filter +input PoolConnectionUpdatedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + connected: Boolean + connected_not: Boolean + connected_in: [Boolean!] + connected_not_in: [Boolean!] + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolMember: String + poolMember_not: String + poolMember_gt: String + poolMember_lt: String + poolMember_gte: String + poolMember_lte: String + poolMember_in: [String!] + poolMember_not_in: [String!] + poolMember_contains: String + poolMember_contains_nocase: String + poolMember_not_contains: String + poolMember_not_contains_nocase: String + poolMember_starts_with: String + poolMember_starts_with_nocase: String + poolMember_not_starts_with: String + poolMember_not_starts_with_nocase: String + poolMember_ends_with: String + poolMember_ends_with_nocase: String + poolMember_not_ends_with: String + poolMember_not_ends_with_nocase: String + poolMember_: PoolMember_filter - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PoolConnectionUpdatedEvent_filter] + or: [PoolConnectionUpdatedEvent_filter] +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [JailEvent!]! - superTokenFactoryUpdatedEvent( - id: ID! +enum PoolConnectionUpdatedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + connected + userData + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolMember + poolMember__id + poolMember__createdAtTimestamp + poolMember__createdAtBlockNumber + poolMember__updatedAtTimestamp + poolMember__updatedAtBlockNumber + poolMember__units + poolMember__isConnected + poolMember__totalAmountClaimed + poolMember__poolTotalAmountDistributedUntilUpdatedAt + poolMember__totalAmountReceivedUntilUpdatedAt + poolMember__syncedPerUnitSettledValue + poolMember__syncedPerUnitFlowRate +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +type PoolCreatedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenFactoryUpdatedEvent - superTokenFactoryUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SuperTokenFactoryUpdatedEvent_orderBy - orderDirection: OrderDirection - where: SuperTokenFactoryUpdatedEvent_filter + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `pool` + addresses[2] = `caller` + addresses[3] = `admin` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + token: Bytes! + caller: Bytes! + admin: Bytes! + pool: Pool! +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +input PoolCreatedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + caller: Bytes + caller_not: Bytes + caller_gt: Bytes + caller_lt: Bytes + caller_gte: Bytes + caller_lte: Bytes + caller_in: [Bytes!] + caller_not_in: [Bytes!] + caller_contains: Bytes + caller_not_contains: Bytes + admin: Bytes + admin_not: Bytes + admin_gt: Bytes + admin_lt: Bytes + admin_gte: Bytes + admin_lte: Bytes + admin_in: [Bytes!] + admin_not_in: [Bytes!] + admin_contains: Bytes + admin_not_contains: Bytes + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenFactoryUpdatedEvent!]! - superTokenLogicUpdatedEvent( - id: ID! + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PoolCreatedEvent_filter] + or: [PoolCreatedEvent_filter] +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +enum PoolCreatedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + token + caller + admin + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenLogicUpdatedEvent - superTokenLogicUpdatedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: SuperTokenLogicUpdatedEvent_orderBy - orderDirection: OrderDirection - where: SuperTokenLogicUpdatedEvent_filter +type PoolDistributor { + """ + ID composed of: "poolDistributor"-pool-poolDistributorAddress + + """ + id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! + totalAmountInstantlyDistributedUntilUpdatedAt: BigInt! + totalAmountFlowedDistributedUntilUpdatedAt: BigInt! + totalAmountDistributedUntilUpdatedAt: BigInt! + totalBuffer: BigInt! + flowRate: BigInt! + account: Account! + pool: Pool! + bufferAdjustedEvents(skip: Int = 0, first: Int = 100, orderBy: BufferAdjustedEvent_orderBy, orderDirection: OrderDirection, where: BufferAdjustedEvent_filter): [BufferAdjustedEvent!]! + instantDistributionUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: InstantDistributionUpdatedEvent_orderBy, orderDirection: OrderDirection, where: InstantDistributionUpdatedEvent_filter): [InstantDistributionUpdatedEvent!]! + flowDistributionUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: FlowDistributionUpdatedEvent_orderBy, orderDirection: OrderDirection, where: FlowDistributionUpdatedEvent_filter): [FlowDistributionUpdatedEvent!]! +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +input PoolDistributor_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] + updatedAtTimestamp: BigInt + updatedAtTimestamp_not: BigInt + updatedAtTimestamp_gt: BigInt + updatedAtTimestamp_lt: BigInt + updatedAtTimestamp_gte: BigInt + updatedAtTimestamp_lte: BigInt + updatedAtTimestamp_in: [BigInt!] + updatedAtTimestamp_not_in: [BigInt!] + updatedAtBlockNumber: BigInt + updatedAtBlockNumber_not: BigInt + updatedAtBlockNumber_gt: BigInt + updatedAtBlockNumber_lt: BigInt + updatedAtBlockNumber_gte: BigInt + updatedAtBlockNumber_lte: BigInt + updatedAtBlockNumber_in: [BigInt!] + updatedAtBlockNumber_not_in: [BigInt!] + totalAmountInstantlyDistributedUntilUpdatedAt: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_not: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_gt: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_lt: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_gte: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_lte: BigInt + totalAmountInstantlyDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountInstantlyDistributedUntilUpdatedAt_not_in: [BigInt!] + totalAmountFlowedDistributedUntilUpdatedAt: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_not: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_gt: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_lt: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_gte: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_lte: BigInt + totalAmountFlowedDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountFlowedDistributedUntilUpdatedAt_not_in: [BigInt!] + totalAmountDistributedUntilUpdatedAt: BigInt + totalAmountDistributedUntilUpdatedAt_not: BigInt + totalAmountDistributedUntilUpdatedAt_gt: BigInt + totalAmountDistributedUntilUpdatedAt_lt: BigInt + totalAmountDistributedUntilUpdatedAt_gte: BigInt + totalAmountDistributedUntilUpdatedAt_lte: BigInt + totalAmountDistributedUntilUpdatedAt_in: [BigInt!] + totalAmountDistributedUntilUpdatedAt_not_in: [BigInt!] + totalBuffer: BigInt + totalBuffer_not: BigInt + totalBuffer_gt: BigInt + totalBuffer_lt: BigInt + totalBuffer_gte: BigInt + totalBuffer_lte: BigInt + totalBuffer_in: [BigInt!] + totalBuffer_not_in: [BigInt!] + flowRate: BigInt + flowRate_not: BigInt + flowRate_gt: BigInt + flowRate_lt: BigInt + flowRate_gte: BigInt + flowRate_lte: BigInt + flowRate_in: [BigInt!] + flowRate_not_in: [BigInt!] + account: String + account_not: String + account_gt: String + account_lt: String + account_gte: String + account_lte: String + account_in: [String!] + account_not_in: [String!] + account_contains: String + account_contains_nocase: String + account_not_contains: String + account_not_contains_nocase: String + account_starts_with: String + account_starts_with_nocase: String + account_not_starts_with: String + account_not_starts_with_nocase: String + account_ends_with: String + account_ends_with_nocase: String + account_not_ends_with: String + account_not_ends_with_nocase: String + account_: Account_filter + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + bufferAdjustedEvents_: BufferAdjustedEvent_filter + instantDistributionUpdatedEvents_: InstantDistributionUpdatedEvent_filter + flowDistributionUpdatedEvents_: FlowDistributionUpdatedEvent_filter - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenLogicUpdatedEvent!]! - roleAdminChangedEvent( - id: ID! + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PoolDistributor_filter] + or: [PoolDistributor_filter] +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): RoleAdminChangedEvent - roleAdminChangedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: RoleAdminChangedEvent_orderBy - orderDirection: OrderDirection - where: RoleAdminChangedEvent_filter - - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height - - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [RoleAdminChangedEvent!]! - roleGrantedEvent( - id: ID! +enum PoolDistributor_orderBy { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + totalAmountInstantlyDistributedUntilUpdatedAt + totalAmountFlowedDistributedUntilUpdatedAt + totalAmountDistributedUntilUpdatedAt + totalBuffer + flowRate + account + account__id + account__createdAtTimestamp + account__createdAtBlockNumber + account__updatedAtTimestamp + account__updatedAtBlockNumber + account__isSuperApp + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + bufferAdjustedEvents + instantDistributionUpdatedEvents + flowDistributionUpdatedEvents +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +type PoolMember { + """ + ID composed of: "poolMember"-poolAddress-poolMemberAddress + + """ + id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! + units: BigInt! + isConnected: Boolean! + totalAmountClaimed: BigInt! + poolTotalAmountDistributedUntilUpdatedAt: BigInt! + totalAmountReceivedUntilUpdatedAt: BigInt! + syncedPerUnitSettledValue: BigInt! + syncedPerUnitFlowRate: BigInt! + account: Account! + pool: Pool! + poolConnectionUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: PoolConnectionUpdatedEvent_orderBy, orderDirection: OrderDirection, where: PoolConnectionUpdatedEvent_filter): [PoolConnectionUpdatedEvent!]! + memberUnitsUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: MemberUnitsUpdatedEvent_orderBy, orderDirection: OrderDirection, where: MemberUnitsUpdatedEvent_filter): [MemberUnitsUpdatedEvent!]! + distributionClaimedEvents(skip: Int = 0, first: Int = 100, orderBy: DistributionClaimedEvent_orderBy, orderDirection: OrderDirection, where: DistributionClaimedEvent_filter): [DistributionClaimedEvent!]! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): RoleGrantedEvent - roleGrantedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: RoleGrantedEvent_orderBy - orderDirection: OrderDirection - where: RoleGrantedEvent_filter +input PoolMember_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] + updatedAtTimestamp: BigInt + updatedAtTimestamp_not: BigInt + updatedAtTimestamp_gt: BigInt + updatedAtTimestamp_lt: BigInt + updatedAtTimestamp_gte: BigInt + updatedAtTimestamp_lte: BigInt + updatedAtTimestamp_in: [BigInt!] + updatedAtTimestamp_not_in: [BigInt!] + updatedAtBlockNumber: BigInt + updatedAtBlockNumber_not: BigInt + updatedAtBlockNumber_gt: BigInt + updatedAtBlockNumber_lt: BigInt + updatedAtBlockNumber_gte: BigInt + updatedAtBlockNumber_lte: BigInt + updatedAtBlockNumber_in: [BigInt!] + updatedAtBlockNumber_not_in: [BigInt!] + units: BigInt + units_not: BigInt + units_gt: BigInt + units_lt: BigInt + units_gte: BigInt + units_lte: BigInt + units_in: [BigInt!] + units_not_in: [BigInt!] + isConnected: Boolean + isConnected_not: Boolean + isConnected_in: [Boolean!] + isConnected_not_in: [Boolean!] + totalAmountClaimed: BigInt + totalAmountClaimed_not: BigInt + totalAmountClaimed_gt: BigInt + totalAmountClaimed_lt: BigInt + totalAmountClaimed_gte: BigInt + totalAmountClaimed_lte: BigInt + totalAmountClaimed_in: [BigInt!] + totalAmountClaimed_not_in: [BigInt!] + poolTotalAmountDistributedUntilUpdatedAt: BigInt + poolTotalAmountDistributedUntilUpdatedAt_not: BigInt + poolTotalAmountDistributedUntilUpdatedAt_gt: BigInt + poolTotalAmountDistributedUntilUpdatedAt_lt: BigInt + poolTotalAmountDistributedUntilUpdatedAt_gte: BigInt + poolTotalAmountDistributedUntilUpdatedAt_lte: BigInt + poolTotalAmountDistributedUntilUpdatedAt_in: [BigInt!] + poolTotalAmountDistributedUntilUpdatedAt_not_in: [BigInt!] + totalAmountReceivedUntilUpdatedAt: BigInt + totalAmountReceivedUntilUpdatedAt_not: BigInt + totalAmountReceivedUntilUpdatedAt_gt: BigInt + totalAmountReceivedUntilUpdatedAt_lt: BigInt + totalAmountReceivedUntilUpdatedAt_gte: BigInt + totalAmountReceivedUntilUpdatedAt_lte: BigInt + totalAmountReceivedUntilUpdatedAt_in: [BigInt!] + totalAmountReceivedUntilUpdatedAt_not_in: [BigInt!] + syncedPerUnitSettledValue: BigInt + syncedPerUnitSettledValue_not: BigInt + syncedPerUnitSettledValue_gt: BigInt + syncedPerUnitSettledValue_lt: BigInt + syncedPerUnitSettledValue_gte: BigInt + syncedPerUnitSettledValue_lte: BigInt + syncedPerUnitSettledValue_in: [BigInt!] + syncedPerUnitSettledValue_not_in: [BigInt!] + syncedPerUnitFlowRate: BigInt + syncedPerUnitFlowRate_not: BigInt + syncedPerUnitFlowRate_gt: BigInt + syncedPerUnitFlowRate_lt: BigInt + syncedPerUnitFlowRate_gte: BigInt + syncedPerUnitFlowRate_lte: BigInt + syncedPerUnitFlowRate_in: [BigInt!] + syncedPerUnitFlowRate_not_in: [BigInt!] + account: String + account_not: String + account_gt: String + account_lt: String + account_gte: String + account_lte: String + account_in: [String!] + account_not_in: [String!] + account_contains: String + account_contains_nocase: String + account_not_contains: String + account_not_contains_nocase: String + account_starts_with: String + account_starts_with_nocase: String + account_not_starts_with: String + account_not_starts_with_nocase: String + account_ends_with: String + account_ends_with_nocase: String + account_not_ends_with: String + account_not_ends_with_nocase: String + account_: Account_filter + pool: String + pool_not: String + pool_gt: String + pool_lt: String + pool_gte: String + pool_lte: String + pool_in: [String!] + pool_not_in: [String!] + pool_contains: String + pool_contains_nocase: String + pool_not_contains: String + pool_not_contains_nocase: String + pool_starts_with: String + pool_starts_with_nocase: String + pool_not_starts_with: String + pool_not_starts_with_nocase: String + pool_ends_with: String + pool_ends_with_nocase: String + pool_not_ends_with: String + pool_not_ends_with_nocase: String + pool_: Pool_filter + poolConnectionUpdatedEvents_: PoolConnectionUpdatedEvent_filter + memberUnitsUpdatedEvents_: MemberUnitsUpdatedEvent_filter + distributionClaimedEvents_: DistributionClaimedEvent_filter - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PoolMember_filter] + or: [PoolMember_filter] +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [RoleGrantedEvent!]! - roleRevokedEvent( - id: ID! +enum PoolMember_orderBy { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + units + isConnected + totalAmountClaimed + poolTotalAmountDistributedUntilUpdatedAt + totalAmountReceivedUntilUpdatedAt + syncedPerUnitSettledValue + syncedPerUnitFlowRate + account + account__id + account__createdAtTimestamp + account__createdAtBlockNumber + account__updatedAtTimestamp + account__updatedAtBlockNumber + account__isSuperApp + pool + pool__id + pool__createdAtTimestamp + pool__createdAtBlockNumber + pool__updatedAtTimestamp + pool__updatedAtBlockNumber + pool__totalUnits + pool__totalConnectedUnits + pool__totalDisconnectedUnits + pool__totalAmountInstantlyDistributedUntilUpdatedAt + pool__totalAmountFlowedDistributedUntilUpdatedAt + pool__totalAmountDistributedUntilUpdatedAt + pool__totalFlowAdjustmentAmountDistributedUntilUpdatedAt + pool__perUnitSettledValue + pool__perUnitFlowRate + pool__totalMembers + pool__totalConnectedMembers + pool__totalDisconnectedMembers + pool__adjustmentFlowRate + pool__flowRate + pool__totalBuffer + poolConnectionUpdatedEvents + memberUnitsUpdatedEvents + distributionClaimedEvents +} - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height +type PPPConfigurationChangedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): RoleRevokedEvent - roleRevokedEvents( - skip: Int = 0 - first: Int = 100 - orderBy: RoleRevokedEvent_orderBy - orderDirection: OrderDirection - where: RoleRevokedEvent_filter + """ + The address of the governance contract the event was emitted from. + + """ + governanceAddress: Bytes! - """ - The block at which the query should be executed. Can either be a `{ hash: - Bytes }` value containing a block hash, a `{ number: Int }` containing the - block number, or a `{ number_gte: Int }` containing the minimum block - number. In the case of `number_gte`, the query will be executed on the - latest block only if the subgraph has progressed to or past the minimum - block number. Defaults to the latest block when omitted. - """ - block: Block_height + """ + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + host: Bytes! + superToken: Bytes! + isKeySet: Boolean! + liquidationPeriod: BigInt! + patricianPeriod: BigInt! +} - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [RoleRevokedEvent!]! - setEvent( +input PPPConfigurationChangedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + governanceAddress: Bytes + governanceAddress_not: Bytes + governanceAddress_gt: Bytes + governanceAddress_lt: Bytes + governanceAddress_gte: Bytes + governanceAddress_lte: Bytes + governanceAddress_in: [Bytes!] + governanceAddress_not_in: [Bytes!] + governanceAddress_contains: Bytes + governanceAddress_not_contains: Bytes + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + host: Bytes + host_not: Bytes + host_gt: Bytes + host_lt: Bytes + host_gte: Bytes + host_lte: Bytes + host_in: [Bytes!] + host_not_in: [Bytes!] + host_contains: Bytes + host_not_contains: Bytes + superToken: Bytes + superToken_not: Bytes + superToken_gt: Bytes + superToken_lt: Bytes + superToken_gte: Bytes + superToken_lte: Bytes + superToken_in: [Bytes!] + superToken_not_in: [Bytes!] + superToken_contains: Bytes + superToken_not_contains: Bytes + isKeySet: Boolean + isKeySet_not: Boolean + isKeySet_in: [Boolean!] + isKeySet_not_in: [Boolean!] + liquidationPeriod: BigInt + liquidationPeriod_not: BigInt + liquidationPeriod_gt: BigInt + liquidationPeriod_lt: BigInt + liquidationPeriod_gte: BigInt + liquidationPeriod_lte: BigInt + liquidationPeriod_in: [BigInt!] + liquidationPeriod_not_in: [BigInt!] + patricianPeriod: BigInt + patricianPeriod_not: BigInt + patricianPeriod_gt: BigInt + patricianPeriod_lt: BigInt + patricianPeriod_gte: BigInt + patricianPeriod_lte: BigInt + patricianPeriod_in: [BigInt!] + patricianPeriod_not_in: [BigInt!] + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PPPConfigurationChangedEvent_filter] + or: [PPPConfigurationChangedEvent_filter] +} + +enum PPPConfigurationChangedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + governanceAddress + addresses + blockNumber + logIndex + order + host + superToken + isKeySet + liquidationPeriod + patricianPeriod +} + +type Query { + flowUpdatedEvent( id: ID! """ @@ -7976,13 +10467,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SetEvent - setEvents( + ): FlowUpdatedEvent + flowUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: SetEvent_orderBy + orderBy: FlowUpdatedEvent_orderBy orderDirection: OrderDirection - where: SetEvent_filter + where: FlowUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -7998,8 +10489,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SetEvent!]! - cfav1LiquidationPeriodChangedEvent( + ): [FlowUpdatedEvent!]! + flowOperatorUpdatedEvent( id: ID! """ @@ -8016,13 +10507,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): CFAv1LiquidationPeriodChangedEvent - cfav1LiquidationPeriodChangedEvents( + ): FlowOperatorUpdatedEvent + flowOperatorUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: CFAv1LiquidationPeriodChangedEvent_orderBy + orderBy: FlowOperatorUpdatedEvent_orderBy orderDirection: OrderDirection - where: CFAv1LiquidationPeriodChangedEvent_filter + where: FlowOperatorUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8038,8 +10529,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [CFAv1LiquidationPeriodChangedEvent!]! - configChangedEvent( + ): [FlowOperatorUpdatedEvent!]! + indexCreatedEvent( id: ID! """ @@ -8056,13 +10547,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): ConfigChangedEvent - configChangedEvents( + ): IndexCreatedEvent + indexCreatedEvents( skip: Int = 0 first: Int = 100 - orderBy: ConfigChangedEvent_orderBy + orderBy: IndexCreatedEvent_orderBy orderDirection: OrderDirection - where: ConfigChangedEvent_filter + where: IndexCreatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8078,8 +10569,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [ConfigChangedEvent!]! - rewardAddressChangedEvent( + ): [IndexCreatedEvent!]! + indexDistributionClaimedEvent( id: ID! """ @@ -8096,13 +10587,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): RewardAddressChangedEvent - rewardAddressChangedEvents( + ): IndexDistributionClaimedEvent + indexDistributionClaimedEvents( skip: Int = 0 first: Int = 100 - orderBy: RewardAddressChangedEvent_orderBy + orderBy: IndexDistributionClaimedEvent_orderBy orderDirection: OrderDirection - where: RewardAddressChangedEvent_filter + where: IndexDistributionClaimedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8118,8 +10609,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [RewardAddressChangedEvent!]! - pppconfigurationChangedEvent( + ): [IndexDistributionClaimedEvent!]! + indexUpdatedEvent( id: ID! """ @@ -8136,13 +10627,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): PPPConfigurationChangedEvent - pppconfigurationChangedEvents( + ): IndexUpdatedEvent + indexUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: PPPConfigurationChangedEvent_orderBy + orderBy: IndexUpdatedEvent_orderBy orderDirection: OrderDirection - where: PPPConfigurationChangedEvent_filter + where: IndexUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8158,8 +10649,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [PPPConfigurationChangedEvent!]! - superTokenMinimumDepositChangedEvent( + ): [IndexUpdatedEvent!]! + indexSubscribedEvent( id: ID! """ @@ -8176,13 +10667,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenMinimumDepositChangedEvent - superTokenMinimumDepositChangedEvents( + ): IndexSubscribedEvent + indexSubscribedEvents( skip: Int = 0 first: Int = 100 - orderBy: SuperTokenMinimumDepositChangedEvent_orderBy + orderBy: IndexSubscribedEvent_orderBy orderDirection: OrderDirection - where: SuperTokenMinimumDepositChangedEvent_filter + where: IndexSubscribedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8198,8 +10689,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenMinimumDepositChangedEvent!]! - trustedForwarderChangedEvent( + ): [IndexSubscribedEvent!]! + indexUnitsUpdatedEvent( id: ID! """ @@ -8216,13 +10707,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TrustedForwarderChangedEvent - trustedForwarderChangedEvents( + ): IndexUnitsUpdatedEvent + indexUnitsUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: TrustedForwarderChangedEvent_orderBy + orderBy: IndexUnitsUpdatedEvent_orderBy orderDirection: OrderDirection - where: TrustedForwarderChangedEvent_filter + where: IndexUnitsUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8238,9 +10729,9 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TrustedForwarderChangedEvent!]! - agreementLiquidatedByEvent( - id: ID! + ): [IndexUnitsUpdatedEvent!]! + indexUnsubscribedEvent( + id: ID! """ The block at which the query should be executed. Can either be a `{ hash: @@ -8256,13 +10747,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): AgreementLiquidatedByEvent - agreementLiquidatedByEvents( + ): IndexUnsubscribedEvent + indexUnsubscribedEvents( skip: Int = 0 first: Int = 100 - orderBy: AgreementLiquidatedByEvent_orderBy + orderBy: IndexUnsubscribedEvent_orderBy orderDirection: OrderDirection - where: AgreementLiquidatedByEvent_filter + where: IndexUnsubscribedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8278,8 +10769,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [AgreementLiquidatedByEvent!]! - agreementLiquidatedV2Event( + ): [IndexUnsubscribedEvent!]! + subscriptionApprovedEvent( id: ID! """ @@ -8296,13 +10787,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): AgreementLiquidatedV2Event - agreementLiquidatedV2Events( + ): SubscriptionApprovedEvent + subscriptionApprovedEvents( skip: Int = 0 first: Int = 100 - orderBy: AgreementLiquidatedV2Event_orderBy + orderBy: SubscriptionApprovedEvent_orderBy orderDirection: OrderDirection - where: AgreementLiquidatedV2Event_filter + where: SubscriptionApprovedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8318,8 +10809,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [AgreementLiquidatedV2Event!]! - burnedEvent( + ): [SubscriptionApprovedEvent!]! + subscriptionDistributionClaimedEvent( id: ID! """ @@ -8336,13 +10827,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): BurnedEvent - burnedEvents( + ): SubscriptionDistributionClaimedEvent + subscriptionDistributionClaimedEvents( skip: Int = 0 first: Int = 100 - orderBy: BurnedEvent_orderBy + orderBy: SubscriptionDistributionClaimedEvent_orderBy orderDirection: OrderDirection - where: BurnedEvent_filter + where: SubscriptionDistributionClaimedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8358,8 +10849,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [BurnedEvent!]! - mintedEvent( + ): [SubscriptionDistributionClaimedEvent!]! + subscriptionRevokedEvent( id: ID! """ @@ -8376,13 +10867,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): MintedEvent - mintedEvents( + ): SubscriptionRevokedEvent + subscriptionRevokedEvents( skip: Int = 0 first: Int = 100 - orderBy: MintedEvent_orderBy + orderBy: SubscriptionRevokedEvent_orderBy orderDirection: OrderDirection - where: MintedEvent_filter + where: SubscriptionRevokedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8398,8 +10889,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [MintedEvent!]! - sentEvent( + ): [SubscriptionRevokedEvent!]! + subscriptionUnitsUpdatedEvent( id: ID! """ @@ -8416,13 +10907,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SentEvent - sentEvents( + ): SubscriptionUnitsUpdatedEvent + subscriptionUnitsUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: SentEvent_orderBy + orderBy: SubscriptionUnitsUpdatedEvent_orderBy orderDirection: OrderDirection - where: SentEvent_filter + where: SubscriptionUnitsUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8438,8 +10929,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SentEvent!]! - transferEvent( + ): [SubscriptionUnitsUpdatedEvent!]! + poolCreatedEvent( id: ID! """ @@ -8456,13 +10947,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TransferEvent - transferEvents( + ): PoolCreatedEvent + poolCreatedEvents( skip: Int = 0 first: Int = 100 - orderBy: TransferEvent_orderBy + orderBy: PoolCreatedEvent_orderBy orderDirection: OrderDirection - where: TransferEvent_filter + where: PoolCreatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8478,8 +10969,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TransferEvent!]! - tokenDowngradedEvent( + ): [PoolCreatedEvent!]! + poolConnectionUpdatedEvent( id: ID! """ @@ -8496,13 +10987,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenDowngradedEvent - tokenDowngradedEvents( + ): PoolConnectionUpdatedEvent + poolConnectionUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenDowngradedEvent_orderBy + orderBy: PoolConnectionUpdatedEvent_orderBy orderDirection: OrderDirection - where: TokenDowngradedEvent_filter + where: PoolConnectionUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8518,8 +11009,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenDowngradedEvent!]! - tokenUpgradedEvent( + ): [PoolConnectionUpdatedEvent!]! + bufferAdjustedEvent( id: ID! """ @@ -8536,13 +11027,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenUpgradedEvent - tokenUpgradedEvents( + ): BufferAdjustedEvent + bufferAdjustedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenUpgradedEvent_orderBy + orderBy: BufferAdjustedEvent_orderBy orderDirection: OrderDirection - where: TokenUpgradedEvent_filter + where: BufferAdjustedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8558,8 +11049,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenUpgradedEvent!]! - customSuperTokenCreatedEvent( + ): [BufferAdjustedEvent!]! + instantDistributionUpdatedEvent( id: ID! """ @@ -8576,13 +11067,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): CustomSuperTokenCreatedEvent - customSuperTokenCreatedEvents( + ): InstantDistributionUpdatedEvent + instantDistributionUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: CustomSuperTokenCreatedEvent_orderBy + orderBy: InstantDistributionUpdatedEvent_orderBy orderDirection: OrderDirection - where: CustomSuperTokenCreatedEvent_filter + where: InstantDistributionUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8598,8 +11089,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [CustomSuperTokenCreatedEvent!]! - superTokenCreatedEvent( + ): [InstantDistributionUpdatedEvent!]! + flowDistributionUpdatedEvent( id: ID! """ @@ -8616,13 +11107,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenCreatedEvent - superTokenCreatedEvents( + ): FlowDistributionUpdatedEvent + flowDistributionUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: SuperTokenCreatedEvent_orderBy + orderBy: FlowDistributionUpdatedEvent_orderBy orderDirection: OrderDirection - where: SuperTokenCreatedEvent_filter + where: FlowDistributionUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8638,8 +11129,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenCreatedEvent!]! - superTokenLogicCreatedEvent( + ): [FlowDistributionUpdatedEvent!]! + distributionClaimedEvent( id: ID! """ @@ -8656,13 +11147,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenLogicCreatedEvent - superTokenLogicCreatedEvents( + ): DistributionClaimedEvent + distributionClaimedEvents( skip: Int = 0 first: Int = 100 - orderBy: SuperTokenLogicCreatedEvent_orderBy + orderBy: DistributionClaimedEvent_orderBy orderDirection: OrderDirection - where: SuperTokenLogicCreatedEvent_filter + where: DistributionClaimedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8678,8 +11169,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenLogicCreatedEvent!]! - newPICEvent( + ): [DistributionClaimedEvent!]! + memberUnitsUpdatedEvent( id: ID! """ @@ -8696,13 +11187,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): NewPICEvent - newPICEvents( + ): MemberUnitsUpdatedEvent + memberUnitsUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: NewPICEvent_orderBy + orderBy: MemberUnitsUpdatedEvent_orderBy orderDirection: OrderDirection - where: NewPICEvent_filter + where: MemberUnitsUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8718,8 +11209,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [NewPICEvent!]! - exitRateChangedEvent( + ): [MemberUnitsUpdatedEvent!]! + agreementClassRegisteredEvent( id: ID! """ @@ -8736,13 +11227,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): ExitRateChangedEvent - exitRateChangedEvents( + ): AgreementClassRegisteredEvent + agreementClassRegisteredEvents( skip: Int = 0 first: Int = 100 - orderBy: ExitRateChangedEvent_orderBy + orderBy: AgreementClassRegisteredEvent_orderBy orderDirection: OrderDirection - where: ExitRateChangedEvent_filter + where: AgreementClassRegisteredEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8758,8 +11249,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [ExitRateChangedEvent!]! - bondIncreasedEvent( + ): [AgreementClassRegisteredEvent!]! + agreementClassUpdatedEvent( id: ID! """ @@ -8776,13 +11267,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): BondIncreasedEvent - bondIncreasedEvents( + ): AgreementClassUpdatedEvent + agreementClassUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: BondIncreasedEvent_orderBy + orderBy: AgreementClassUpdatedEvent_orderBy orderDirection: OrderDirection - where: BondIncreasedEvent_filter + where: AgreementClassUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8798,8 +11289,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [BondIncreasedEvent!]! - account( + ): [AgreementClassUpdatedEvent!]! + appRegisteredEvent( id: ID! """ @@ -8816,13 +11307,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Account - accounts( + ): AppRegisteredEvent + appRegisteredEvents( skip: Int = 0 first: Int = 100 - orderBy: Account_orderBy + orderBy: AppRegisteredEvent_orderBy orderDirection: OrderDirection - where: Account_filter + where: AppRegisteredEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8838,8 +11329,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Account!]! - index( + ): [AppRegisteredEvent!]! + governanceReplacedEvent( id: ID! """ @@ -8856,13 +11347,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Index - indexes( + ): GovernanceReplacedEvent + governanceReplacedEvents( skip: Int = 0 first: Int = 100 - orderBy: Index_orderBy + orderBy: GovernanceReplacedEvent_orderBy orderDirection: OrderDirection - where: Index_filter + where: GovernanceReplacedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8878,8 +11369,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Index!]! - indexSubscription( + ): [GovernanceReplacedEvent!]! + jailEvent( id: ID! """ @@ -8896,13 +11387,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexSubscription - indexSubscriptions( + ): JailEvent + jailEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexSubscription_orderBy + orderBy: JailEvent_orderBy orderDirection: OrderDirection - where: IndexSubscription_filter + where: JailEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8918,8 +11409,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexSubscription!]! - stream( + ): [JailEvent!]! + superTokenFactoryUpdatedEvent( id: ID! """ @@ -8936,13 +11427,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Stream - streams( + ): SuperTokenFactoryUpdatedEvent + superTokenFactoryUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: Stream_orderBy + orderBy: SuperTokenFactoryUpdatedEvent_orderBy orderDirection: OrderDirection - where: Stream_filter + where: SuperTokenFactoryUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8958,8 +11449,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Stream!]! - flowOperator( + ): [SuperTokenFactoryUpdatedEvent!]! + superTokenLogicUpdatedEvent( id: ID! """ @@ -8976,13 +11467,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): FlowOperator - flowOperators( + ): SuperTokenLogicUpdatedEvent + superTokenLogicUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: FlowOperator_orderBy + orderBy: SuperTokenLogicUpdatedEvent_orderBy orderDirection: OrderDirection - where: FlowOperator_filter + where: SuperTokenLogicUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -8998,8 +11489,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [FlowOperator!]! - streamPeriod( + ): [SuperTokenLogicUpdatedEvent!]! + roleAdminChangedEvent( id: ID! """ @@ -9016,13 +11507,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): StreamPeriod - streamPeriods( + ): RoleAdminChangedEvent + roleAdminChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: StreamPeriod_orderBy + orderBy: RoleAdminChangedEvent_orderBy orderDirection: OrderDirection - where: StreamPeriod_filter + where: RoleAdminChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9038,8 +11529,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [StreamPeriod!]! - tokenGovernanceConfig( + ): [RoleAdminChangedEvent!]! + roleGrantedEvent( id: ID! """ @@ -9056,13 +11547,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenGovernanceConfig - tokenGovernanceConfigs( + ): RoleGrantedEvent + roleGrantedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenGovernanceConfig_orderBy + orderBy: RoleGrantedEvent_orderBy orderDirection: OrderDirection - where: TokenGovernanceConfig_filter + where: RoleGrantedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9078,8 +11569,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenGovernanceConfig!]! - streamRevision( + ): [RoleGrantedEvent!]! + roleRevokedEvent( id: ID! """ @@ -9096,13 +11587,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): StreamRevision - streamRevisions( + ): RoleRevokedEvent + roleRevokedEvents( skip: Int = 0 first: Int = 100 - orderBy: StreamRevision_orderBy + orderBy: RoleRevokedEvent_orderBy orderDirection: OrderDirection - where: StreamRevision_filter + where: RoleRevokedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9118,8 +11609,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [StreamRevision!]! - token( + ): [RoleRevokedEvent!]! + setEvent( id: ID! """ @@ -9136,13 +11627,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Token - tokens( + ): SetEvent + setEvents( skip: Int = 0 first: Int = 100 - orderBy: Token_orderBy + orderBy: SetEvent_orderBy orderDirection: OrderDirection - where: Token_filter + where: SetEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9158,8 +11649,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Token!]! - resolverEntry( + ): [SetEvent!]! + cfav1LiquidationPeriodChangedEvent( id: ID! """ @@ -9176,13 +11667,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): ResolverEntry - resolverEntries( + ): CFAv1LiquidationPeriodChangedEvent + cfav1LiquidationPeriodChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: ResolverEntry_orderBy + orderBy: CFAv1LiquidationPeriodChangedEvent_orderBy orderDirection: OrderDirection - where: ResolverEntry_filter + where: CFAv1LiquidationPeriodChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9198,8 +11689,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [ResolverEntry!]! - accountTokenSnapshot( + ): [CFAv1LiquidationPeriodChangedEvent!]! + configChangedEvent( id: ID! """ @@ -9216,13 +11707,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): AccountTokenSnapshot - accountTokenSnapshots( + ): ConfigChangedEvent + configChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: AccountTokenSnapshot_orderBy + orderBy: ConfigChangedEvent_orderBy orderDirection: OrderDirection - where: AccountTokenSnapshot_filter + where: ConfigChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9238,8 +11729,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [AccountTokenSnapshot!]! - accountTokenSnapshotLog( + ): [ConfigChangedEvent!]! + rewardAddressChangedEvent( id: ID! """ @@ -9256,13 +11747,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): AccountTokenSnapshotLog - accountTokenSnapshotLogs( + ): RewardAddressChangedEvent + rewardAddressChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: AccountTokenSnapshotLog_orderBy + orderBy: RewardAddressChangedEvent_orderBy orderDirection: OrderDirection - where: AccountTokenSnapshotLog_filter + where: RewardAddressChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9278,8 +11769,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [AccountTokenSnapshotLog!]! - tokenStatistic( + ): [RewardAddressChangedEvent!]! + pppconfigurationChangedEvent( id: ID! """ @@ -9296,13 +11787,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenStatistic - tokenStatistics( + ): PPPConfigurationChangedEvent + pppconfigurationChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenStatistic_orderBy + orderBy: PPPConfigurationChangedEvent_orderBy orderDirection: OrderDirection - where: TokenStatistic_filter + where: PPPConfigurationChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9318,8 +11809,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenStatistic!]! - tokenStatisticLog( + ): [PPPConfigurationChangedEvent!]! + superTokenMinimumDepositChangedEvent( id: ID! """ @@ -9336,13 +11827,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenStatisticLog - tokenStatisticLogs( + ): SuperTokenMinimumDepositChangedEvent + superTokenMinimumDepositChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenStatisticLog_orderBy + orderBy: SuperTokenMinimumDepositChangedEvent_orderBy orderDirection: OrderDirection - where: TokenStatisticLog_filter + where: SuperTokenMinimumDepositChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9358,8 +11849,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenStatisticLog!]! - sfmeta( + ): [SuperTokenMinimumDepositChangedEvent!]! + trustedForwarderChangedEvent( id: ID! """ @@ -9376,13 +11867,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SFMeta - sfmetas( + ): TrustedForwarderChangedEvent + trustedForwarderChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: SFMeta_orderBy + orderBy: TrustedForwarderChangedEvent_orderBy orderDirection: OrderDirection - where: SFMeta_filter + where: TrustedForwarderChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9398,8 +11889,8 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SFMeta!]! - event( + ): [TrustedForwarderChangedEvent!]! + agreementLiquidatedByEvent( id: ID! """ @@ -9416,13 +11907,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Event - events( + ): AgreementLiquidatedByEvent + agreementLiquidatedByEvents( skip: Int = 0 first: Int = 100 - orderBy: Event_orderBy + orderBy: AgreementLiquidatedByEvent_orderBy orderDirection: OrderDirection - where: Event_filter + where: AgreementLiquidatedByEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -9438,1595 +11929,2952 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Event!]! + ): [AgreementLiquidatedByEvent!]! + agreementLiquidatedV2Event( + id: ID! - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -type ResolverEntry { - """ - ID: the keccak256 hash of the set name - - """ - id: ID! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - updatedAtTimestamp: BigInt! - updatedAtBlockNumber: BigInt! - targetAddress: Bytes! - isToken: Boolean! - isListed: Boolean! - setEvents(skip: Int = 0, first: Int = 100, orderBy: SetEvent_orderBy, orderDirection: OrderDirection, where: SetEvent_filter): [SetEvent!]! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): AgreementLiquidatedV2Event + agreementLiquidatedV2Events( + skip: Int = 0 + first: Int = 100 + orderBy: AgreementLiquidatedV2Event_orderBy + orderDirection: OrderDirection + where: AgreementLiquidatedV2Event_filter -input ResolverEntry_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - createdAtBlockNumber: BigInt - createdAtBlockNumber_not: BigInt - createdAtBlockNumber_gt: BigInt - createdAtBlockNumber_lt: BigInt - createdAtBlockNumber_gte: BigInt - createdAtBlockNumber_lte: BigInt - createdAtBlockNumber_in: [BigInt!] - createdAtBlockNumber_not_in: [BigInt!] - updatedAtTimestamp: BigInt - updatedAtTimestamp_not: BigInt - updatedAtTimestamp_gt: BigInt - updatedAtTimestamp_lt: BigInt - updatedAtTimestamp_gte: BigInt - updatedAtTimestamp_lte: BigInt - updatedAtTimestamp_in: [BigInt!] - updatedAtTimestamp_not_in: [BigInt!] - updatedAtBlockNumber: BigInt - updatedAtBlockNumber_not: BigInt - updatedAtBlockNumber_gt: BigInt - updatedAtBlockNumber_lt: BigInt - updatedAtBlockNumber_gte: BigInt - updatedAtBlockNumber_lte: BigInt - updatedAtBlockNumber_in: [BigInt!] - updatedAtBlockNumber_not_in: [BigInt!] - targetAddress: Bytes - targetAddress_not: Bytes - targetAddress_gt: Bytes - targetAddress_lt: Bytes - targetAddress_gte: Bytes - targetAddress_lte: Bytes - targetAddress_in: [Bytes!] - targetAddress_not_in: [Bytes!] - targetAddress_contains: Bytes - targetAddress_not_contains: Bytes - isToken: Boolean - isToken_not: Boolean - isToken_in: [Boolean!] - isToken_not_in: [Boolean!] - isListed: Boolean - isListed_not: Boolean - isListed_in: [Boolean!] - isListed_not_in: [Boolean!] - setEvents_: SetEvent_filter + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [ResolverEntry_filter] - or: [ResolverEntry_filter] -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [AgreementLiquidatedV2Event!]! + burnedEvent( + id: ID! -enum ResolverEntry_orderBy { - id - createdAtTimestamp - createdAtBlockNumber - updatedAtTimestamp - updatedAtBlockNumber - targetAddress - isToken - isListed - setEvents -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -type RewardAddressChangedEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): BurnedEvent + burnedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: BurnedEvent_orderBy + orderDirection: OrderDirection + where: BurnedEvent_filter - """ - The address of the governance contract the event was emitted from. - - """ - governanceAddress: Bytes! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Empty addresses array. - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - host: Bytes! - superToken: Bytes! - isKeySet: Boolean! - rewardAddress: Bytes! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [BurnedEvent!]! + mintedEvent( + id: ID! -input RewardAddressChangedEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - governanceAddress: Bytes - governanceAddress_not: Bytes - governanceAddress_gt: Bytes - governanceAddress_lt: Bytes - governanceAddress_gte: Bytes - governanceAddress_lte: Bytes - governanceAddress_in: [Bytes!] - governanceAddress_not_in: [Bytes!] - governanceAddress_contains: Bytes - governanceAddress_not_contains: Bytes - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - host: Bytes - host_not: Bytes - host_gt: Bytes - host_lt: Bytes - host_gte: Bytes - host_lte: Bytes - host_in: [Bytes!] - host_not_in: [Bytes!] - host_contains: Bytes - host_not_contains: Bytes - superToken: Bytes - superToken_not: Bytes - superToken_gt: Bytes - superToken_lt: Bytes - superToken_gte: Bytes - superToken_lte: Bytes - superToken_in: [Bytes!] - superToken_not_in: [Bytes!] - superToken_contains: Bytes - superToken_not_contains: Bytes - isKeySet: Boolean - isKeySet_not: Boolean - isKeySet_in: [Boolean!] - isKeySet_not_in: [Boolean!] - rewardAddress: Bytes - rewardAddress_not: Bytes - rewardAddress_gt: Bytes - rewardAddress_lt: Bytes - rewardAddress_gte: Bytes - rewardAddress_lte: Bytes - rewardAddress_in: [Bytes!] - rewardAddress_not_in: [Bytes!] - rewardAddress_contains: Bytes - rewardAddress_not_contains: Bytes + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [RewardAddressChangedEvent_filter] - or: [RewardAddressChangedEvent_filter] -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): MintedEvent + mintedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: MintedEvent_orderBy + orderDirection: OrderDirection + where: MintedEvent_filter -enum RewardAddressChangedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - governanceAddress - addresses - blockNumber - logIndex - order - host - superToken - isKeySet - rewardAddress -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -type RoleAdminChangedEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [MintedEvent!]! + sentEvent( + id: ID! - """ - Empty addresses array. - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - role: Bytes! - previousAdminRole: Bytes! - newAdminRole: Bytes! -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -input RoleAdminChangedEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - role: Bytes - role_not: Bytes - role_gt: Bytes - role_lt: Bytes - role_gte: Bytes - role_lte: Bytes - role_in: [Bytes!] - role_not_in: [Bytes!] - role_contains: Bytes - role_not_contains: Bytes - previousAdminRole: Bytes - previousAdminRole_not: Bytes - previousAdminRole_gt: Bytes - previousAdminRole_lt: Bytes - previousAdminRole_gte: Bytes - previousAdminRole_lte: Bytes - previousAdminRole_in: [Bytes!] - previousAdminRole_not_in: [Bytes!] - previousAdminRole_contains: Bytes - previousAdminRole_not_contains: Bytes - newAdminRole: Bytes - newAdminRole_not: Bytes - newAdminRole_gt: Bytes - newAdminRole_lt: Bytes - newAdminRole_gte: Bytes - newAdminRole_lte: Bytes - newAdminRole_in: [Bytes!] - newAdminRole_not_in: [Bytes!] - newAdminRole_contains: Bytes - newAdminRole_not_contains: Bytes + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): SentEvent + sentEvents( + skip: Int = 0 + first: Int = 100 + orderBy: SentEvent_orderBy + orderDirection: OrderDirection + where: SentEvent_filter - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [RoleAdminChangedEvent_filter] - or: [RoleAdminChangedEvent_filter] -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -enum RoleAdminChangedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - role - previousAdminRole - newAdminRole -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [SentEvent!]! + transferEvent( + id: ID! -type RoleGrantedEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Empty addresses array. - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - role: Bytes! - account: Bytes! - sender: Bytes! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TransferEvent + transferEvents( + skip: Int = 0 + first: Int = 100 + orderBy: TransferEvent_orderBy + orderDirection: OrderDirection + where: TransferEvent_filter -input RoleGrantedEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - role: Bytes - role_not: Bytes - role_gt: Bytes - role_lt: Bytes - role_gte: Bytes - role_lte: Bytes - role_in: [Bytes!] - role_not_in: [Bytes!] - role_contains: Bytes - role_not_contains: Bytes - account: Bytes - account_not: Bytes - account_gt: Bytes - account_lt: Bytes - account_gte: Bytes - account_lte: Bytes - account_in: [Bytes!] - account_not_in: [Bytes!] - account_contains: Bytes - account_not_contains: Bytes - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [RoleGrantedEvent_filter] - or: [RoleGrantedEvent_filter] -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -enum RoleGrantedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - role - account - sender -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TransferEvent!]! + tokenDowngradedEvent( + id: ID! -type RoleRevokedEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Empty addresses array. - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - role: Bytes! - account: Bytes! - sender: Bytes! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenDowngradedEvent + tokenDowngradedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: TokenDowngradedEvent_orderBy + orderDirection: OrderDirection + where: TokenDowngradedEvent_filter -input RoleRevokedEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - role: Bytes - role_not: Bytes - role_gt: Bytes - role_lt: Bytes - role_gte: Bytes - role_lte: Bytes - role_in: [Bytes!] - role_not_in: [Bytes!] - role_contains: Bytes - role_not_contains: Bytes - account: Bytes - account_not: Bytes - account_gt: Bytes - account_lt: Bytes - account_gte: Bytes - account_lte: Bytes - account_in: [Bytes!] - account_not_in: [Bytes!] - account_contains: Bytes - account_not_contains: Bytes - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [RoleRevokedEvent_filter] - or: [RoleRevokedEvent_filter] -} - -enum RoleRevokedEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - role - account - sender -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TokenDowngradedEvent!]! + tokenUpgradedEvent( + id: ID! -type SentEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken) - addresses[1] = `operator` - addresses[2] = `from` - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - operator: Bytes! - from: Bytes! - to: Bytes! - token: Bytes! - amount: BigInt! - data: Bytes! - operatorData: Bytes! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenUpgradedEvent + tokenUpgradedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: TokenUpgradedEvent_orderBy + orderDirection: OrderDirection + where: TokenUpgradedEvent_filter -input SentEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - operator: Bytes - operator_not: Bytes - operator_gt: Bytes - operator_lt: Bytes - operator_gte: Bytes - operator_lte: Bytes - operator_in: [Bytes!] - operator_not_in: [Bytes!] - operator_contains: Bytes - operator_not_contains: Bytes - from: Bytes - from_not: Bytes - from_gt: Bytes - from_lt: Bytes - from_gte: Bytes - from_lte: Bytes - from_in: [Bytes!] - from_not_in: [Bytes!] - from_contains: Bytes - from_not_contains: Bytes - to: Bytes - to_not: Bytes - to_gt: Bytes - to_lt: Bytes - to_gte: Bytes - to_lte: Bytes - to_in: [Bytes!] - to_not_in: [Bytes!] - to_contains: Bytes - to_not_contains: Bytes - token: Bytes - token_not: Bytes - token_gt: Bytes - token_lt: Bytes - token_gte: Bytes - token_lte: Bytes - token_in: [Bytes!] - token_not_in: [Bytes!] - token_contains: Bytes - token_not_contains: Bytes - amount: BigInt - amount_not: BigInt - amount_gt: BigInt - amount_lt: BigInt - amount_gte: BigInt - amount_lte: BigInt - amount_in: [BigInt!] - amount_not_in: [BigInt!] - data: Bytes - data_not: Bytes - data_gt: Bytes - data_lt: Bytes - data_gte: Bytes - data_lte: Bytes - data_in: [Bytes!] - data_not_in: [Bytes!] - data_contains: Bytes - data_not_contains: Bytes - operatorData: Bytes - operatorData_not: Bytes - operatorData_gt: Bytes - operatorData_lt: Bytes - operatorData_gte: Bytes - operatorData_lte: Bytes - operatorData_in: [Bytes!] - operatorData_not_in: [Bytes!] - operatorData_contains: Bytes - operatorData_not_contains: Bytes + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [SentEvent_filter] - or: [SentEvent_filter] -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TokenUpgradedEvent!]! + approvalEvent( + id: ID! -enum SentEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - operator - from - to - token - amount - data - operatorData -} - -type SetEvent implements Event { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Empty addresses array. - - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ApprovalEvent + approvalEvents( + skip: Int = 0 + first: Int = 100 + orderBy: ApprovalEvent_orderBy + orderDirection: OrderDirection + where: ApprovalEvent_filter - """ - Because the name property is indexed, the - returned value will be a keccak256 hash - of the string. - - """ - hashedName: Bytes! - target: Bytes! - resolverEntry: ResolverEntry! -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -input SetEvent_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - gasPrice: BigInt - gasPrice_not: BigInt - gasPrice_gt: BigInt - gasPrice_lt: BigInt - gasPrice_gte: BigInt - gasPrice_lte: BigInt - gasPrice_in: [BigInt!] - gasPrice_not_in: [BigInt!] - gasUsed: BigInt - gasUsed_not: BigInt - gasUsed_gt: BigInt - gasUsed_lt: BigInt - gasUsed_gte: BigInt - gasUsed_lte: BigInt - gasUsed_in: [BigInt!] - gasUsed_not_in: [BigInt!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - name: String - name_not: String - name_gt: String - name_lt: String - name_gte: String - name_lte: String - name_in: [String!] - name_not_in: [String!] - name_contains: String - name_contains_nocase: String - name_not_contains: String - name_not_contains_nocase: String - name_starts_with: String - name_starts_with_nocase: String - name_not_starts_with: String - name_not_starts_with_nocase: String - name_ends_with: String - name_ends_with_nocase: String - name_not_ends_with: String - name_not_ends_with_nocase: String - addresses: [Bytes!] - addresses_not: [Bytes!] - addresses_contains: [Bytes!] - addresses_contains_nocase: [Bytes!] - addresses_not_contains: [Bytes!] - addresses_not_contains_nocase: [Bytes!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - logIndex: BigInt - logIndex_not: BigInt - logIndex_gt: BigInt - logIndex_lt: BigInt - logIndex_gte: BigInt - logIndex_lte: BigInt - logIndex_in: [BigInt!] - logIndex_not_in: [BigInt!] - order: BigInt - order_not: BigInt - order_gt: BigInt - order_lt: BigInt - order_gte: BigInt - order_lte: BigInt - order_in: [BigInt!] - order_not_in: [BigInt!] - hashedName: Bytes - hashedName_not: Bytes - hashedName_gt: Bytes - hashedName_lt: Bytes - hashedName_gte: Bytes - hashedName_lte: Bytes - hashedName_in: [Bytes!] - hashedName_not_in: [Bytes!] - hashedName_contains: Bytes - hashedName_not_contains: Bytes - target: Bytes - target_not: Bytes - target_gt: Bytes - target_lt: Bytes - target_gte: Bytes - target_lte: Bytes - target_in: [Bytes!] - target_not_in: [Bytes!] - target_contains: Bytes - target_not_contains: Bytes - resolverEntry: String - resolverEntry_not: String - resolverEntry_gt: String - resolverEntry_lt: String - resolverEntry_gte: String - resolverEntry_lte: String - resolverEntry_in: [String!] - resolverEntry_not_in: [String!] - resolverEntry_contains: String - resolverEntry_contains_nocase: String - resolverEntry_not_contains: String - resolverEntry_not_contains_nocase: String - resolverEntry_starts_with: String - resolverEntry_starts_with_nocase: String - resolverEntry_not_starts_with: String - resolverEntry_not_starts_with_nocase: String - resolverEntry_ends_with: String - resolverEntry_ends_with_nocase: String - resolverEntry_not_ends_with: String - resolverEntry_not_ends_with_nocase: String - resolverEntry_: ResolverEntry_filter + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ApprovalEvent!]! + customSuperTokenCreatedEvent( + id: ID! - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [SetEvent_filter] - or: [SetEvent_filter] -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -enum SetEvent_orderBy { - id - transactionHash - gasPrice - gasUsed - timestamp - name - addresses - blockNumber - logIndex - order - hashedName - target - resolverEntry - resolverEntry__id - resolverEntry__createdAtTimestamp - resolverEntry__createdAtBlockNumber - resolverEntry__updatedAtTimestamp - resolverEntry__updatedAtBlockNumber - resolverEntry__targetAddress - resolverEntry__isToken - resolverEntry__isListed -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): CustomSuperTokenCreatedEvent + customSuperTokenCreatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: CustomSuperTokenCreatedEvent_orderBy + orderDirection: OrderDirection + where: CustomSuperTokenCreatedEvent_filter -type SFMeta { - """ - The id is the commit hash. - - """ - id: ID! - timestamp: BigInt! - blockNumber: BigInt! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Whether the branch is feature/dev/v1. - - """ - configuration: String! + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [CustomSuperTokenCreatedEvent!]! + superTokenCreatedEvent( + id: ID! - """ - The branch the current deployment is coming from. - - """ - branch: String! -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -input SFMeta_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - timestamp: BigInt - timestamp_not: BigInt - timestamp_gt: BigInt - timestamp_lt: BigInt - timestamp_gte: BigInt - timestamp_lte: BigInt - timestamp_in: [BigInt!] - timestamp_not_in: [BigInt!] - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - configuration: String - configuration_not: String - configuration_gt: String - configuration_lt: String - configuration_gte: String - configuration_lte: String - configuration_in: [String!] - configuration_not_in: [String!] - configuration_contains: String - configuration_contains_nocase: String - configuration_not_contains: String - configuration_not_contains_nocase: String - configuration_starts_with: String - configuration_starts_with_nocase: String - configuration_not_starts_with: String - configuration_not_starts_with_nocase: String - configuration_ends_with: String - configuration_ends_with_nocase: String - configuration_not_ends_with: String - configuration_not_ends_with_nocase: String - branch: String - branch_not: String - branch_gt: String - branch_lt: String - branch_gte: String - branch_lte: String - branch_in: [String!] - branch_not_in: [String!] - branch_contains: String - branch_contains_nocase: String - branch_not_contains: String - branch_not_contains_nocase: String - branch_starts_with: String - branch_starts_with_nocase: String - branch_not_starts_with: String - branch_not_starts_with_nocase: String - branch_ends_with: String - branch_ends_with_nocase: String - branch_not_ends_with: String - branch_not_ends_with_nocase: String + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): SuperTokenCreatedEvent + superTokenCreatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: SuperTokenCreatedEvent_orderBy + orderDirection: OrderDirection + where: SuperTokenCreatedEvent_filter - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [SFMeta_filter] - or: [SFMeta_filter] -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -enum SFMeta_orderBy { - id - timestamp - blockNumber - configuration - branch -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [SuperTokenCreatedEvent!]! + superTokenLogicCreatedEvent( + id: ID! -""" -Stream: A higher order entity that represents the lifetime of a stream between a `sender` and a `receiver`. -A account can start a stream, update the flow rate, but when they close it, it is considered "dead". -The next stream you create with the same `sender` and `receiver` will create a new stream entity. -Therefore, multiple stream entities can be created between the same `sender` and `receiver`. + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -""" -type Stream { - """ - ID composed of: senderAddress-receiverAddress-tokenAddress-revisionIndex - - """ - id: ID! - createdAtTimestamp: BigInt! - createdAtBlockNumber: BigInt! - updatedAtTimestamp: BigInt! - updatedAtBlockNumber: BigInt! - currentFlowRate: BigInt! - deposit: BigInt! + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): SuperTokenLogicCreatedEvent + superTokenLogicCreatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: SuperTokenLogicCreatedEvent_orderBy + orderDirection: OrderDirection + where: SuperTokenLogicCreatedEvent_filter - """ - The amount streamed until `updatedAtTimestamp`/`updatedAtBlock`. - The formula to get the current streamed amount is: - `streamedUntilUpdatedAt + ((currentTime in seconds) - updatedAtTimestamp) * currentFlowRate`. - - """ - streamedUntilUpdatedAt: BigInt! - token: Token! - sender: Account! - receiver: Account! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - The `userData` stored on the Stream is the last `userData` that was set in a `FlowUpdatedEvent`, - for this particular stream. To see the historical `userData` for this stream, you can query the `flowUpdatedEvents` field. - - """ - userData: Bytes! - flowUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: FlowUpdatedEvent_orderBy, orderDirection: OrderDirection, where: FlowUpdatedEvent_filter): [FlowUpdatedEvent!]! - streamPeriods(skip: Int = 0, first: Int = 100, orderBy: StreamPeriod_orderBy, orderDirection: OrderDirection, where: StreamPeriod_filter): [StreamPeriod!]! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [SuperTokenLogicCreatedEvent!]! + newPICEvent( + id: ID! -input Stream_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - createdAtTimestamp: BigInt - createdAtTimestamp_not: BigInt - createdAtTimestamp_gt: BigInt - createdAtTimestamp_lt: BigInt - createdAtTimestamp_gte: BigInt - createdAtTimestamp_lte: BigInt - createdAtTimestamp_in: [BigInt!] - createdAtTimestamp_not_in: [BigInt!] - createdAtBlockNumber: BigInt - createdAtBlockNumber_not: BigInt - createdAtBlockNumber_gt: BigInt - createdAtBlockNumber_lt: BigInt - createdAtBlockNumber_gte: BigInt - createdAtBlockNumber_lte: BigInt - createdAtBlockNumber_in: [BigInt!] - createdAtBlockNumber_not_in: [BigInt!] - updatedAtTimestamp: BigInt - updatedAtTimestamp_not: BigInt - updatedAtTimestamp_gt: BigInt - updatedAtTimestamp_lt: BigInt - updatedAtTimestamp_gte: BigInt - updatedAtTimestamp_lte: BigInt - updatedAtTimestamp_in: [BigInt!] - updatedAtTimestamp_not_in: [BigInt!] - updatedAtBlockNumber: BigInt - updatedAtBlockNumber_not: BigInt - updatedAtBlockNumber_gt: BigInt - updatedAtBlockNumber_lt: BigInt - updatedAtBlockNumber_gte: BigInt - updatedAtBlockNumber_lte: BigInt - updatedAtBlockNumber_in: [BigInt!] - updatedAtBlockNumber_not_in: [BigInt!] - currentFlowRate: BigInt - currentFlowRate_not: BigInt - currentFlowRate_gt: BigInt - currentFlowRate_lt: BigInt - currentFlowRate_gte: BigInt - currentFlowRate_lte: BigInt - currentFlowRate_in: [BigInt!] - currentFlowRate_not_in: [BigInt!] - deposit: BigInt - deposit_not: BigInt - deposit_gt: BigInt - deposit_lt: BigInt - deposit_gte: BigInt - deposit_lte: BigInt - deposit_in: [BigInt!] - deposit_not_in: [BigInt!] - streamedUntilUpdatedAt: BigInt - streamedUntilUpdatedAt_not: BigInt - streamedUntilUpdatedAt_gt: BigInt - streamedUntilUpdatedAt_lt: BigInt - streamedUntilUpdatedAt_gte: BigInt - streamedUntilUpdatedAt_lte: BigInt - streamedUntilUpdatedAt_in: [BigInt!] - streamedUntilUpdatedAt_not_in: [BigInt!] - token: String - token_not: String - token_gt: String - token_lt: String - token_gte: String - token_lte: String - token_in: [String!] - token_not_in: [String!] - token_contains: String - token_contains_nocase: String - token_not_contains: String - token_not_contains_nocase: String - token_starts_with: String - token_starts_with_nocase: String - token_not_starts_with: String - token_not_starts_with_nocase: String - token_ends_with: String - token_ends_with_nocase: String - token_not_ends_with: String - token_not_ends_with_nocase: String - token_: Token_filter - sender: String - sender_not: String - sender_gt: String - sender_lt: String - sender_gte: String - sender_lte: String - sender_in: [String!] - sender_not_in: [String!] - sender_contains: String - sender_contains_nocase: String - sender_not_contains: String - sender_not_contains_nocase: String - sender_starts_with: String - sender_starts_with_nocase: String - sender_not_starts_with: String - sender_not_starts_with_nocase: String - sender_ends_with: String - sender_ends_with_nocase: String - sender_not_ends_with: String - sender_not_ends_with_nocase: String - sender_: Account_filter - receiver: String - receiver_not: String - receiver_gt: String - receiver_lt: String - receiver_gte: String - receiver_lte: String - receiver_in: [String!] - receiver_not_in: [String!] - receiver_contains: String - receiver_contains_nocase: String - receiver_not_contains: String - receiver_not_contains_nocase: String - receiver_starts_with: String - receiver_starts_with_nocase: String - receiver_not_starts_with: String - receiver_not_starts_with_nocase: String - receiver_ends_with: String - receiver_ends_with_nocase: String - receiver_not_ends_with: String - receiver_not_ends_with_nocase: String - receiver_: Account_filter - userData: Bytes - userData_not: Bytes - userData_gt: Bytes - userData_lt: Bytes - userData_gte: Bytes - userData_lte: Bytes - userData_in: [Bytes!] - userData_not_in: [Bytes!] - userData_contains: Bytes - userData_not_contains: Bytes - flowUpdatedEvents_: FlowUpdatedEvent_filter - streamPeriods_: StreamPeriod_filter + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Stream_filter] - or: [Stream_filter] -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): NewPICEvent + newPICEvents( + skip: Int = 0 + first: Int = 100 + orderBy: NewPICEvent_orderBy + orderDirection: OrderDirection + where: NewPICEvent_filter -enum Stream_orderBy { - id - createdAtTimestamp - createdAtBlockNumber - updatedAtTimestamp - updatedAtBlockNumber - currentFlowRate - deposit - streamedUntilUpdatedAt - token - token__id - token__createdAtTimestamp - token__createdAtBlockNumber - token__decimals - token__name - token__symbol - token__isSuperToken - token__isNativeAssetSuperToken - token__isListed - token__underlyingAddress - sender - sender__id - sender__createdAtTimestamp - sender__createdAtBlockNumber - sender__updatedAtTimestamp - sender__updatedAtBlockNumber - sender__isSuperApp - receiver - receiver__id - receiver__createdAtTimestamp - receiver__createdAtBlockNumber - receiver__updatedAtTimestamp - receiver__updatedAtBlockNumber - receiver__isSuperApp - userData - flowUpdatedEvents - streamPeriods -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -""" -StreamPeriod: A higher order entity that represents a period of time in a Stream with a constant flowRate. + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [NewPICEvent!]! + exitRateChangedEvent( + id: ID! -""" -type StreamPeriod { - """ - ID composed of: streamId - periodRevisionIndex - - """ - id: ID! - stream: Stream! - sender: Account! - receiver: Account! - token: Token! - flowRate: BigInt! - deposit: BigInt! - startedAtTimestamp: BigInt! - startedAtBlockNumber: BigInt! - startedAtEvent: FlowUpdatedEvent! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - Following values are null until the StreamPeriod is terminated - - """ - stoppedAtTimestamp: BigInt - stoppedAtBlockNumber: BigInt - stoppedAtEvent: FlowUpdatedEvent - totalAmountStreamed: BigInt -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ExitRateChangedEvent + exitRateChangedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: ExitRateChangedEvent_orderBy + orderDirection: OrderDirection + where: ExitRateChangedEvent_filter -input StreamPeriod_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - stream: String - stream_not: String - stream_gt: String - stream_lt: String - stream_gte: String - stream_lte: String - stream_in: [String!] - stream_not_in: [String!] - stream_contains: String - stream_contains_nocase: String - stream_not_contains: String - stream_not_contains_nocase: String - stream_starts_with: String - stream_starts_with_nocase: String - stream_not_starts_with: String - stream_not_starts_with_nocase: String - stream_ends_with: String - stream_ends_with_nocase: String - stream_not_ends_with: String - stream_not_ends_with_nocase: String + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ExitRateChangedEvent!]! + bondIncreasedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): BondIncreasedEvent + bondIncreasedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: BondIncreasedEvent_orderBy + orderDirection: OrderDirection + where: BondIncreasedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [BondIncreasedEvent!]! + account( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Account + accounts( + skip: Int = 0 + first: Int = 100 + orderBy: Account_orderBy + orderDirection: OrderDirection + where: Account_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Account!]! + pool( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Pool + pools( + skip: Int = 0 + first: Int = 100 + orderBy: Pool_orderBy + orderDirection: OrderDirection + where: Pool_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Pool!]! + poolMember( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PoolMember + poolMembers( + skip: Int = 0 + first: Int = 100 + orderBy: PoolMember_orderBy + orderDirection: OrderDirection + where: PoolMember_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PoolMember!]! + poolDistributor( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PoolDistributor + poolDistributors( + skip: Int = 0 + first: Int = 100 + orderBy: PoolDistributor_orderBy + orderDirection: OrderDirection + where: PoolDistributor_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PoolDistributor!]! + index( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Index + indexes( + skip: Int = 0 + first: Int = 100 + orderBy: Index_orderBy + orderDirection: OrderDirection + where: Index_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Index!]! + indexSubscription( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): IndexSubscription + indexSubscriptions( + skip: Int = 0 + first: Int = 100 + orderBy: IndexSubscription_orderBy + orderDirection: OrderDirection + where: IndexSubscription_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [IndexSubscription!]! + stream( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Stream + streams( + skip: Int = 0 + first: Int = 100 + orderBy: Stream_orderBy + orderDirection: OrderDirection + where: Stream_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Stream!]! + flowOperator( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): FlowOperator + flowOperators( + skip: Int = 0 + first: Int = 100 + orderBy: FlowOperator_orderBy + orderDirection: OrderDirection + where: FlowOperator_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [FlowOperator!]! + streamPeriod( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): StreamPeriod + streamPeriods( + skip: Int = 0 + first: Int = 100 + orderBy: StreamPeriod_orderBy + orderDirection: OrderDirection + where: StreamPeriod_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [StreamPeriod!]! + tokenGovernanceConfig( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenGovernanceConfig + tokenGovernanceConfigs( + skip: Int = 0 + first: Int = 100 + orderBy: TokenGovernanceConfig_orderBy + orderDirection: OrderDirection + where: TokenGovernanceConfig_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TokenGovernanceConfig!]! + streamRevision( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): StreamRevision + streamRevisions( + skip: Int = 0 + first: Int = 100 + orderBy: StreamRevision_orderBy + orderDirection: OrderDirection + where: StreamRevision_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [StreamRevision!]! + token( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Token + tokens( + skip: Int = 0 + first: Int = 100 + orderBy: Token_orderBy + orderDirection: OrderDirection + where: Token_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Token!]! + resolverEntry( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ResolverEntry + resolverEntries( + skip: Int = 0 + first: Int = 100 + orderBy: ResolverEntry_orderBy + orderDirection: OrderDirection + where: ResolverEntry_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ResolverEntry!]! + accountTokenSnapshot( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): AccountTokenSnapshot + accountTokenSnapshots( + skip: Int = 0 + first: Int = 100 + orderBy: AccountTokenSnapshot_orderBy + orderDirection: OrderDirection + where: AccountTokenSnapshot_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [AccountTokenSnapshot!]! + accountTokenSnapshotLog( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): AccountTokenSnapshotLog + accountTokenSnapshotLogs( + skip: Int = 0 + first: Int = 100 + orderBy: AccountTokenSnapshotLog_orderBy + orderDirection: OrderDirection + where: AccountTokenSnapshotLog_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [AccountTokenSnapshotLog!]! + tokenStatistic( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenStatistic + tokenStatistics( + skip: Int = 0 + first: Int = 100 + orderBy: TokenStatistic_orderBy + orderDirection: OrderDirection + where: TokenStatistic_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TokenStatistic!]! + tokenStatisticLog( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenStatisticLog + tokenStatisticLogs( + skip: Int = 0 + first: Int = 100 + orderBy: TokenStatisticLog_orderBy + orderDirection: OrderDirection + where: TokenStatisticLog_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TokenStatisticLog!]! + sfmeta( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): SFMeta + sfmetas( + skip: Int = 0 + first: Int = 100 + orderBy: SFMeta_orderBy + orderDirection: OrderDirection + where: SFMeta_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [SFMeta!]! + event( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Event + events( + skip: Int = 0 + first: Int = 100 + orderBy: Event_orderBy + orderDirection: OrderDirection + where: Event_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Event!]! + + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +type ResolverEntry { + """ + ID: the keccak256 hash of the set name + + """ + id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! + targetAddress: Bytes! + isToken: Boolean! + isListed: Boolean! + setEvents(skip: Int = 0, first: Int = 100, orderBy: SetEvent_orderBy, orderDirection: OrderDirection, where: SetEvent_filter): [SetEvent!]! +} + +input ResolverEntry_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] + updatedAtTimestamp: BigInt + updatedAtTimestamp_not: BigInt + updatedAtTimestamp_gt: BigInt + updatedAtTimestamp_lt: BigInt + updatedAtTimestamp_gte: BigInt + updatedAtTimestamp_lte: BigInt + updatedAtTimestamp_in: [BigInt!] + updatedAtTimestamp_not_in: [BigInt!] + updatedAtBlockNumber: BigInt + updatedAtBlockNumber_not: BigInt + updatedAtBlockNumber_gt: BigInt + updatedAtBlockNumber_lt: BigInt + updatedAtBlockNumber_gte: BigInt + updatedAtBlockNumber_lte: BigInt + updatedAtBlockNumber_in: [BigInt!] + updatedAtBlockNumber_not_in: [BigInt!] + targetAddress: Bytes + targetAddress_not: Bytes + targetAddress_gt: Bytes + targetAddress_lt: Bytes + targetAddress_gte: Bytes + targetAddress_lte: Bytes + targetAddress_in: [Bytes!] + targetAddress_not_in: [Bytes!] + targetAddress_contains: Bytes + targetAddress_not_contains: Bytes + isToken: Boolean + isToken_not: Boolean + isToken_in: [Boolean!] + isToken_not_in: [Boolean!] + isListed: Boolean + isListed_not: Boolean + isListed_in: [Boolean!] + isListed_not_in: [Boolean!] + setEvents_: SetEvent_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [ResolverEntry_filter] + or: [ResolverEntry_filter] +} + +enum ResolverEntry_orderBy { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + targetAddress + isToken + isListed + setEvents +} + +type RewardAddressChangedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + The address of the governance contract the event was emitted from. + + """ + governanceAddress: Bytes! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` + addresses[3] = `rewardAddress` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + host: Bytes! + superToken: Bytes! + isKeySet: Boolean! + rewardAddress: Bytes! +} + +input RewardAddressChangedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + governanceAddress: Bytes + governanceAddress_not: Bytes + governanceAddress_gt: Bytes + governanceAddress_lt: Bytes + governanceAddress_gte: Bytes + governanceAddress_lte: Bytes + governanceAddress_in: [Bytes!] + governanceAddress_not_in: [Bytes!] + governanceAddress_contains: Bytes + governanceAddress_not_contains: Bytes + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + host: Bytes + host_not: Bytes + host_gt: Bytes + host_lt: Bytes + host_gte: Bytes + host_lte: Bytes + host_in: [Bytes!] + host_not_in: [Bytes!] + host_contains: Bytes + host_not_contains: Bytes + superToken: Bytes + superToken_not: Bytes + superToken_gt: Bytes + superToken_lt: Bytes + superToken_gte: Bytes + superToken_lte: Bytes + superToken_in: [Bytes!] + superToken_not_in: [Bytes!] + superToken_contains: Bytes + superToken_not_contains: Bytes + isKeySet: Boolean + isKeySet_not: Boolean + isKeySet_in: [Boolean!] + isKeySet_not_in: [Boolean!] + rewardAddress: Bytes + rewardAddress_not: Bytes + rewardAddress_gt: Bytes + rewardAddress_lt: Bytes + rewardAddress_gte: Bytes + rewardAddress_lte: Bytes + rewardAddress_in: [Bytes!] + rewardAddress_not_in: [Bytes!] + rewardAddress_contains: Bytes + rewardAddress_not_contains: Bytes + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [RewardAddressChangedEvent_filter] + or: [RewardAddressChangedEvent_filter] +} + +enum RewardAddressChangedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + governanceAddress + addresses + blockNumber + logIndex + order + host + superToken + isKeySet + rewardAddress +} + +type RoleAdminChangedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `previousAdminRole` + addresses[1] = `newAdminRole` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + role: Bytes! + previousAdminRole: Bytes! + newAdminRole: Bytes! +} + +input RoleAdminChangedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + role: Bytes + role_not: Bytes + role_gt: Bytes + role_lt: Bytes + role_gte: Bytes + role_lte: Bytes + role_in: [Bytes!] + role_not_in: [Bytes!] + role_contains: Bytes + role_not_contains: Bytes + previousAdminRole: Bytes + previousAdminRole_not: Bytes + previousAdminRole_gt: Bytes + previousAdminRole_lt: Bytes + previousAdminRole_gte: Bytes + previousAdminRole_lte: Bytes + previousAdminRole_in: [Bytes!] + previousAdminRole_not_in: [Bytes!] + previousAdminRole_contains: Bytes + previousAdminRole_not_contains: Bytes + newAdminRole: Bytes + newAdminRole_not: Bytes + newAdminRole_gt: Bytes + newAdminRole_lt: Bytes + newAdminRole_gte: Bytes + newAdminRole_lte: Bytes + newAdminRole_in: [Bytes!] + newAdminRole_not_in: [Bytes!] + newAdminRole_contains: Bytes + newAdminRole_not_contains: Bytes + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [RoleAdminChangedEvent_filter] + or: [RoleAdminChangedEvent_filter] +} + +enum RoleAdminChangedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + role + previousAdminRole + newAdminRole +} + +type RoleGrantedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `account` + addresses[1] = `sender` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + role: Bytes! + account: Bytes! + sender: Bytes! +} + +input RoleGrantedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + role: Bytes + role_not: Bytes + role_gt: Bytes + role_lt: Bytes + role_gte: Bytes + role_lte: Bytes + role_in: [Bytes!] + role_not_in: [Bytes!] + role_contains: Bytes + role_not_contains: Bytes + account: Bytes + account_not: Bytes + account_gt: Bytes + account_lt: Bytes + account_gte: Bytes + account_lte: Bytes + account_in: [Bytes!] + account_not_in: [Bytes!] + account_contains: Bytes + account_not_contains: Bytes + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [RoleGrantedEvent_filter] + or: [RoleGrantedEvent_filter] +} + +enum RoleGrantedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + role + account + sender +} + +type RoleRevokedEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `account` + addresses[1] = `sender` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + role: Bytes! + account: Bytes! + sender: Bytes! +} + +input RoleRevokedEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + role: Bytes + role_not: Bytes + role_gt: Bytes + role_lt: Bytes + role_gte: Bytes + role_lte: Bytes + role_in: [Bytes!] + role_not_in: [Bytes!] + role_contains: Bytes + role_not_contains: Bytes + account: Bytes + account_not: Bytes + account_gt: Bytes + account_lt: Bytes + account_gte: Bytes + account_lte: Bytes + account_in: [Bytes!] + account_not_in: [Bytes!] + account_contains: Bytes + account_not_contains: Bytes + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [RoleRevokedEvent_filter] + or: [RoleRevokedEvent_filter] +} + +enum RoleRevokedEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + role + account + sender +} + +type SentEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `operator` + addresses[2] = `from` + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + operator: Bytes! + from: Bytes! + to: Bytes! + token: Bytes! + amount: BigInt! + data: Bytes! + operatorData: Bytes! +} + +input SentEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + operator: Bytes + operator_not: Bytes + operator_gt: Bytes + operator_lt: Bytes + operator_gte: Bytes + operator_lte: Bytes + operator_in: [Bytes!] + operator_not_in: [Bytes!] + operator_contains: Bytes + operator_not_contains: Bytes + from: Bytes + from_not: Bytes + from_gt: Bytes + from_lt: Bytes + from_gte: Bytes + from_lte: Bytes + from_in: [Bytes!] + from_not_in: [Bytes!] + from_contains: Bytes + from_not_contains: Bytes + to: Bytes + to_not: Bytes + to_gt: Bytes + to_lt: Bytes + to_gte: Bytes + to_lte: Bytes + to_in: [Bytes!] + to_not_in: [Bytes!] + to_contains: Bytes + to_not_contains: Bytes + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + amount: BigInt + amount_not: BigInt + amount_gt: BigInt + amount_lt: BigInt + amount_gte: BigInt + amount_lte: BigInt + amount_in: [BigInt!] + amount_not_in: [BigInt!] + data: Bytes + data_not: Bytes + data_gt: Bytes + data_lt: Bytes + data_gte: Bytes + data_lte: Bytes + data_in: [Bytes!] + data_not_in: [Bytes!] + data_contains: Bytes + data_not_contains: Bytes + operatorData: Bytes + operatorData_not: Bytes + operatorData_gt: Bytes + operatorData_lt: Bytes + operatorData_gte: Bytes + operatorData_lte: Bytes + operatorData_in: [Bytes!] + operatorData_not_in: [Bytes!] + operatorData_contains: Bytes + operatorData_not_contains: Bytes + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [SentEvent_filter] + or: [SentEvent_filter] +} + +enum SentEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + operator + from + to + token + amount + data + operatorData +} + +type SetEvent implements Event { + id: ID! + transactionHash: Bytes! + gasPrice: BigInt! + gasUsed: BigInt! + timestamp: BigInt! + name: String! + + """ + Empty addresses array. + + """ + addresses: [Bytes!]! + blockNumber: BigInt! + logIndex: BigInt! + order: BigInt! + + """ + Because the name property is indexed, the + returned value will be a keccak256 hash + of the string. + + """ + hashedName: Bytes! + target: Bytes! + resolverEntry: ResolverEntry! +} + +input SetEvent_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + transactionHash: Bytes + transactionHash_not: Bytes + transactionHash_gt: Bytes + transactionHash_lt: Bytes + transactionHash_gte: Bytes + transactionHash_lte: Bytes + transactionHash_in: [Bytes!] + transactionHash_not_in: [Bytes!] + transactionHash_contains: Bytes + transactionHash_not_contains: Bytes + gasPrice: BigInt + gasPrice_not: BigInt + gasPrice_gt: BigInt + gasPrice_lt: BigInt + gasPrice_gte: BigInt + gasPrice_lte: BigInt + gasPrice_in: [BigInt!] + gasPrice_not_in: [BigInt!] + gasUsed: BigInt + gasUsed_not: BigInt + gasUsed_gt: BigInt + gasUsed_lt: BigInt + gasUsed_gte: BigInt + gasUsed_lte: BigInt + gasUsed_in: [BigInt!] + gasUsed_not_in: [BigInt!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + name: String + name_not: String + name_gt: String + name_lt: String + name_gte: String + name_lte: String + name_in: [String!] + name_not_in: [String!] + name_contains: String + name_contains_nocase: String + name_not_contains: String + name_not_contains_nocase: String + name_starts_with: String + name_starts_with_nocase: String + name_not_starts_with: String + name_not_starts_with_nocase: String + name_ends_with: String + name_ends_with_nocase: String + name_not_ends_with: String + name_not_ends_with_nocase: String + addresses: [Bytes!] + addresses_not: [Bytes!] + addresses_contains: [Bytes!] + addresses_contains_nocase: [Bytes!] + addresses_not_contains: [Bytes!] + addresses_not_contains_nocase: [Bytes!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + logIndex: BigInt + logIndex_not: BigInt + logIndex_gt: BigInt + logIndex_lt: BigInt + logIndex_gte: BigInt + logIndex_lte: BigInt + logIndex_in: [BigInt!] + logIndex_not_in: [BigInt!] + order: BigInt + order_not: BigInt + order_gt: BigInt + order_lt: BigInt + order_gte: BigInt + order_lte: BigInt + order_in: [BigInt!] + order_not_in: [BigInt!] + hashedName: Bytes + hashedName_not: Bytes + hashedName_gt: Bytes + hashedName_lt: Bytes + hashedName_gte: Bytes + hashedName_lte: Bytes + hashedName_in: [Bytes!] + hashedName_not_in: [Bytes!] + hashedName_contains: Bytes + hashedName_not_contains: Bytes + target: Bytes + target_not: Bytes + target_gt: Bytes + target_lt: Bytes + target_gte: Bytes + target_lte: Bytes + target_in: [Bytes!] + target_not_in: [Bytes!] + target_contains: Bytes + target_not_contains: Bytes + resolverEntry: String + resolverEntry_not: String + resolverEntry_gt: String + resolverEntry_lt: String + resolverEntry_gte: String + resolverEntry_lte: String + resolverEntry_in: [String!] + resolverEntry_not_in: [String!] + resolverEntry_contains: String + resolverEntry_contains_nocase: String + resolverEntry_not_contains: String + resolverEntry_not_contains_nocase: String + resolverEntry_starts_with: String + resolverEntry_starts_with_nocase: String + resolverEntry_not_starts_with: String + resolverEntry_not_starts_with_nocase: String + resolverEntry_ends_with: String + resolverEntry_ends_with_nocase: String + resolverEntry_not_ends_with: String + resolverEntry_not_ends_with_nocase: String + resolverEntry_: ResolverEntry_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [SetEvent_filter] + or: [SetEvent_filter] +} + +enum SetEvent_orderBy { + id + transactionHash + gasPrice + gasUsed + timestamp + name + addresses + blockNumber + logIndex + order + hashedName + target + resolverEntry + resolverEntry__id + resolverEntry__createdAtTimestamp + resolverEntry__createdAtBlockNumber + resolverEntry__updatedAtTimestamp + resolverEntry__updatedAtBlockNumber + resolverEntry__targetAddress + resolverEntry__isToken + resolverEntry__isListed +} + +type SFMeta { + """ + The id is the commit hash. + + """ + id: ID! + timestamp: BigInt! + blockNumber: BigInt! + + """ + Whether the branch is feature/dev/v1. + + """ + configuration: String! + + """ + The branch the current deployment is coming from. + + """ + branch: String! + + """ + The subgraph package.json semver version of the current deployment. + + """ + packageVersion: String! +} + +input SFMeta_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + timestamp: BigInt + timestamp_not: BigInt + timestamp_gt: BigInt + timestamp_lt: BigInt + timestamp_gte: BigInt + timestamp_lte: BigInt + timestamp_in: [BigInt!] + timestamp_not_in: [BigInt!] + blockNumber: BigInt + blockNumber_not: BigInt + blockNumber_gt: BigInt + blockNumber_lt: BigInt + blockNumber_gte: BigInt + blockNumber_lte: BigInt + blockNumber_in: [BigInt!] + blockNumber_not_in: [BigInt!] + configuration: String + configuration_not: String + configuration_gt: String + configuration_lt: String + configuration_gte: String + configuration_lte: String + configuration_in: [String!] + configuration_not_in: [String!] + configuration_contains: String + configuration_contains_nocase: String + configuration_not_contains: String + configuration_not_contains_nocase: String + configuration_starts_with: String + configuration_starts_with_nocase: String + configuration_not_starts_with: String + configuration_not_starts_with_nocase: String + configuration_ends_with: String + configuration_ends_with_nocase: String + configuration_not_ends_with: String + configuration_not_ends_with_nocase: String + branch: String + branch_not: String + branch_gt: String + branch_lt: String + branch_gte: String + branch_lte: String + branch_in: [String!] + branch_not_in: [String!] + branch_contains: String + branch_contains_nocase: String + branch_not_contains: String + branch_not_contains_nocase: String + branch_starts_with: String + branch_starts_with_nocase: String + branch_not_starts_with: String + branch_not_starts_with_nocase: String + branch_ends_with: String + branch_ends_with_nocase: String + branch_not_ends_with: String + branch_not_ends_with_nocase: String + packageVersion: String + packageVersion_not: String + packageVersion_gt: String + packageVersion_lt: String + packageVersion_gte: String + packageVersion_lte: String + packageVersion_in: [String!] + packageVersion_not_in: [String!] + packageVersion_contains: String + packageVersion_contains_nocase: String + packageVersion_not_contains: String + packageVersion_not_contains_nocase: String + packageVersion_starts_with: String + packageVersion_starts_with_nocase: String + packageVersion_not_starts_with: String + packageVersion_not_starts_with_nocase: String + packageVersion_ends_with: String + packageVersion_ends_with_nocase: String + packageVersion_not_ends_with: String + packageVersion_not_ends_with_nocase: String + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [SFMeta_filter] + or: [SFMeta_filter] +} + +enum SFMeta_orderBy { + id + timestamp + blockNumber + configuration + branch + packageVersion +} + +""" +Stream: A higher order entity that represents the lifetime of a stream between a `sender` and a `receiver`. +A account can start a stream, update the flow rate, but when they close it, it is considered "dead". +The next stream you create with the same `sender` and `receiver` will create a new stream entity. +Therefore, multiple stream entities can be created between the same `sender` and `receiver`. + +""" +type Stream { + """ + ID composed of: senderAddress-receiverAddress-tokenAddress-revisionIndex + + """ + id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! + updatedAtTimestamp: BigInt! + updatedAtBlockNumber: BigInt! + currentFlowRate: BigInt! + deposit: BigInt! + + """ + The amount streamed until `updatedAtTimestamp`/`updatedAtBlock`. + The formula to get the current streamed amount is: + `streamedUntilUpdatedAt + ((currentTime in seconds) - updatedAtTimestamp) * currentFlowRate`. + + """ + streamedUntilUpdatedAt: BigInt! + token: Token! + sender: Account! + receiver: Account! + + """ + The `userData` stored on the Stream is the last `userData` that was set in a `FlowUpdatedEvent`, + for this particular stream. To see the historical `userData` for this stream, you can query the `flowUpdatedEvents` field. + + """ + userData: Bytes! + flowUpdatedEvents(skip: Int = 0, first: Int = 100, orderBy: FlowUpdatedEvent_orderBy, orderDirection: OrderDirection, where: FlowUpdatedEvent_filter): [FlowUpdatedEvent!]! + streamPeriods(skip: Int = 0, first: Int = 100, orderBy: StreamPeriod_orderBy, orderDirection: OrderDirection, where: StreamPeriod_filter): [StreamPeriod!]! +} + +input Stream_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] + updatedAtTimestamp: BigInt + updatedAtTimestamp_not: BigInt + updatedAtTimestamp_gt: BigInt + updatedAtTimestamp_lt: BigInt + updatedAtTimestamp_gte: BigInt + updatedAtTimestamp_lte: BigInt + updatedAtTimestamp_in: [BigInt!] + updatedAtTimestamp_not_in: [BigInt!] + updatedAtBlockNumber: BigInt + updatedAtBlockNumber_not: BigInt + updatedAtBlockNumber_gt: BigInt + updatedAtBlockNumber_lt: BigInt + updatedAtBlockNumber_gte: BigInt + updatedAtBlockNumber_lte: BigInt + updatedAtBlockNumber_in: [BigInt!] + updatedAtBlockNumber_not_in: [BigInt!] + currentFlowRate: BigInt + currentFlowRate_not: BigInt + currentFlowRate_gt: BigInt + currentFlowRate_lt: BigInt + currentFlowRate_gte: BigInt + currentFlowRate_lte: BigInt + currentFlowRate_in: [BigInt!] + currentFlowRate_not_in: [BigInt!] + deposit: BigInt + deposit_not: BigInt + deposit_gt: BigInt + deposit_lt: BigInt + deposit_gte: BigInt + deposit_lte: BigInt + deposit_in: [BigInt!] + deposit_not_in: [BigInt!] + streamedUntilUpdatedAt: BigInt + streamedUntilUpdatedAt_not: BigInt + streamedUntilUpdatedAt_gt: BigInt + streamedUntilUpdatedAt_lt: BigInt + streamedUntilUpdatedAt_gte: BigInt + streamedUntilUpdatedAt_lte: BigInt + streamedUntilUpdatedAt_in: [BigInt!] + streamedUntilUpdatedAt_not_in: [BigInt!] + token: String + token_not: String + token_gt: String + token_lt: String + token_gte: String + token_lte: String + token_in: [String!] + token_not_in: [String!] + token_contains: String + token_contains_nocase: String + token_not_contains: String + token_not_contains_nocase: String + token_starts_with: String + token_starts_with_nocase: String + token_not_starts_with: String + token_not_starts_with_nocase: String + token_ends_with: String + token_ends_with_nocase: String + token_not_ends_with: String + token_not_ends_with_nocase: String + token_: Token_filter + sender: String + sender_not: String + sender_gt: String + sender_lt: String + sender_gte: String + sender_lte: String + sender_in: [String!] + sender_not_in: [String!] + sender_contains: String + sender_contains_nocase: String + sender_not_contains: String + sender_not_contains_nocase: String + sender_starts_with: String + sender_starts_with_nocase: String + sender_not_starts_with: String + sender_not_starts_with_nocase: String + sender_ends_with: String + sender_ends_with_nocase: String + sender_not_ends_with: String + sender_not_ends_with_nocase: String + sender_: Account_filter + receiver: String + receiver_not: String + receiver_gt: String + receiver_lt: String + receiver_gte: String + receiver_lte: String + receiver_in: [String!] + receiver_not_in: [String!] + receiver_contains: String + receiver_contains_nocase: String + receiver_not_contains: String + receiver_not_contains_nocase: String + receiver_starts_with: String + receiver_starts_with_nocase: String + receiver_not_starts_with: String + receiver_not_starts_with_nocase: String + receiver_ends_with: String + receiver_ends_with_nocase: String + receiver_not_ends_with: String + receiver_not_ends_with_nocase: String + receiver_: Account_filter + userData: Bytes + userData_not: Bytes + userData_gt: Bytes + userData_lt: Bytes + userData_gte: Bytes + userData_lte: Bytes + userData_in: [Bytes!] + userData_not_in: [Bytes!] + userData_contains: Bytes + userData_not_contains: Bytes + flowUpdatedEvents_: FlowUpdatedEvent_filter + streamPeriods_: StreamPeriod_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Stream_filter] + or: [Stream_filter] +} + +enum Stream_orderBy { + id + createdAtTimestamp + createdAtBlockNumber + updatedAtTimestamp + updatedAtBlockNumber + currentFlowRate + deposit + streamedUntilUpdatedAt + token + token__id + token__createdAtTimestamp + token__createdAtBlockNumber + token__decimals + token__name + token__symbol + token__isSuperToken + token__isNativeAssetSuperToken + token__isListed + token__underlyingAddress + sender + sender__id + sender__createdAtTimestamp + sender__createdAtBlockNumber + sender__updatedAtTimestamp + sender__updatedAtBlockNumber + sender__isSuperApp + receiver + receiver__id + receiver__createdAtTimestamp + receiver__createdAtBlockNumber + receiver__updatedAtTimestamp + receiver__updatedAtBlockNumber + receiver__isSuperApp + userData + flowUpdatedEvents + streamPeriods +} + +""" +StreamPeriod: A higher order entity that represents a period of time in a Stream with a constant flowRate. + +""" +type StreamPeriod { + """ + ID composed of: streamId - periodRevisionIndex + + """ + id: ID! + stream: Stream! + sender: Account! + receiver: Account! + token: Token! + flowRate: BigInt! + deposit: BigInt! + startedAtTimestamp: BigInt! + startedAtBlockNumber: BigInt! + startedAtEvent: FlowUpdatedEvent! + + """ + Following values are null until the StreamPeriod is terminated + + """ + stoppedAtTimestamp: BigInt + stoppedAtBlockNumber: BigInt + stoppedAtEvent: FlowUpdatedEvent + totalAmountStreamed: BigInt +} + +input StreamPeriod_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + stream: String + stream_not: String + stream_gt: String + stream_lt: String + stream_gte: String + stream_lte: String + stream_in: [String!] + stream_not_in: [String!] + stream_contains: String + stream_contains_nocase: String + stream_not_contains: String + stream_not_contains_nocase: String + stream_starts_with: String + stream_starts_with_nocase: String + stream_not_starts_with: String + stream_not_starts_with_nocase: String + stream_ends_with: String + stream_ends_with_nocase: String + stream_not_ends_with: String + stream_not_ends_with_nocase: String stream_: Stream_filter sender: String sender_not: String @@ -11190,192 +15038,472 @@ input StreamPeriod_filter { totalAmountStreamed_in: [BigInt!] totalAmountStreamed_not_in: [BigInt!] - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [StreamPeriod_filter] - or: [StreamPeriod_filter] -} + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [StreamPeriod_filter] + or: [StreamPeriod_filter] +} + +enum StreamPeriod_orderBy { + id + stream + stream__id + stream__createdAtTimestamp + stream__createdAtBlockNumber + stream__updatedAtTimestamp + stream__updatedAtBlockNumber + stream__currentFlowRate + stream__deposit + stream__streamedUntilUpdatedAt + stream__userData + sender + sender__id + sender__createdAtTimestamp + sender__createdAtBlockNumber + sender__updatedAtTimestamp + sender__updatedAtBlockNumber + sender__isSuperApp + receiver + receiver__id + receiver__createdAtTimestamp + receiver__createdAtBlockNumber + receiver__updatedAtTimestamp + receiver__updatedAtBlockNumber + receiver__isSuperApp + token + token__id + token__createdAtTimestamp + token__createdAtBlockNumber + token__decimals + token__name + token__symbol + token__isSuperToken + token__isNativeAssetSuperToken + token__isListed + token__underlyingAddress + flowRate + deposit + startedAtTimestamp + startedAtBlockNumber + startedAtEvent + startedAtEvent__id + startedAtEvent__transactionHash + startedAtEvent__gasPrice + startedAtEvent__gasUsed + startedAtEvent__timestamp + startedAtEvent__name + startedAtEvent__blockNumber + startedAtEvent__logIndex + startedAtEvent__order + startedAtEvent__token + startedAtEvent__sender + startedAtEvent__receiver + startedAtEvent__flowOperator + startedAtEvent__flowRate + startedAtEvent__totalSenderFlowRate + startedAtEvent__totalReceiverFlowRate + startedAtEvent__deposit + startedAtEvent__userData + startedAtEvent__oldFlowRate + startedAtEvent__type + startedAtEvent__totalAmountStreamedUntilTimestamp + stoppedAtTimestamp + stoppedAtBlockNumber + stoppedAtEvent + stoppedAtEvent__id + stoppedAtEvent__transactionHash + stoppedAtEvent__gasPrice + stoppedAtEvent__gasUsed + stoppedAtEvent__timestamp + stoppedAtEvent__name + stoppedAtEvent__blockNumber + stoppedAtEvent__logIndex + stoppedAtEvent__order + stoppedAtEvent__token + stoppedAtEvent__sender + stoppedAtEvent__receiver + stoppedAtEvent__flowOperator + stoppedAtEvent__flowRate + stoppedAtEvent__totalSenderFlowRate + stoppedAtEvent__totalReceiverFlowRate + stoppedAtEvent__deposit + stoppedAtEvent__userData + stoppedAtEvent__oldFlowRate + stoppedAtEvent__type + stoppedAtEvent__totalAmountStreamedUntilTimestamp + totalAmountStreamed +} + +type StreamRevision { + """ + ID composed of: keccak256(abi.encode(sender,receiver))-tokenAddress + + """ + id: ID! + revisionIndex: Int! + periodRevisionIndex: Int! + + """ + The "most recently alive" stream between a sender and receiver. + Note: The `revisionIndex` property may not be the same as the `revisionIndex` + of `mostRecentStream`. Which means `mostRecentStream` has been closed and no + new stream has been opened. + + """ + mostRecentStream: Stream! +} + +input StreamRevision_filter { + id: ID + id_not: ID + id_gt: ID + id_lt: ID + id_gte: ID + id_lte: ID + id_in: [ID!] + id_not_in: [ID!] + revisionIndex: Int + revisionIndex_not: Int + revisionIndex_gt: Int + revisionIndex_lt: Int + revisionIndex_gte: Int + revisionIndex_lte: Int + revisionIndex_in: [Int!] + revisionIndex_not_in: [Int!] + periodRevisionIndex: Int + periodRevisionIndex_not: Int + periodRevisionIndex_gt: Int + periodRevisionIndex_lt: Int + periodRevisionIndex_gte: Int + periodRevisionIndex_lte: Int + periodRevisionIndex_in: [Int!] + periodRevisionIndex_not_in: [Int!] + mostRecentStream: String + mostRecentStream_not: String + mostRecentStream_gt: String + mostRecentStream_lt: String + mostRecentStream_gte: String + mostRecentStream_lte: String + mostRecentStream_in: [String!] + mostRecentStream_not_in: [String!] + mostRecentStream_contains: String + mostRecentStream_contains_nocase: String + mostRecentStream_not_contains: String + mostRecentStream_not_contains_nocase: String + mostRecentStream_starts_with: String + mostRecentStream_starts_with_nocase: String + mostRecentStream_not_starts_with: String + mostRecentStream_not_starts_with_nocase: String + mostRecentStream_ends_with: String + mostRecentStream_ends_with_nocase: String + mostRecentStream_not_ends_with: String + mostRecentStream_not_ends_with_nocase: String + mostRecentStream_: Stream_filter + + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [StreamRevision_filter] + or: [StreamRevision_filter] +} + +enum StreamRevision_orderBy { + id + revisionIndex + periodRevisionIndex + mostRecentStream + mostRecentStream__id + mostRecentStream__createdAtTimestamp + mostRecentStream__createdAtBlockNumber + mostRecentStream__updatedAtTimestamp + mostRecentStream__updatedAtBlockNumber + mostRecentStream__currentFlowRate + mostRecentStream__deposit + mostRecentStream__streamedUntilUpdatedAt + mostRecentStream__userData +} + +type Subscription { + flowUpdatedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): FlowUpdatedEvent + flowUpdatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: FlowUpdatedEvent_orderBy + orderDirection: OrderDirection + where: FlowUpdatedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [FlowUpdatedEvent!]! + flowOperatorUpdatedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): FlowOperatorUpdatedEvent + flowOperatorUpdatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: FlowOperatorUpdatedEvent_orderBy + orderDirection: OrderDirection + where: FlowOperatorUpdatedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [FlowOperatorUpdatedEvent!]! + indexCreatedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): IndexCreatedEvent + indexCreatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: IndexCreatedEvent_orderBy + orderDirection: OrderDirection + where: IndexCreatedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [IndexCreatedEvent!]! + indexDistributionClaimedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): IndexDistributionClaimedEvent + indexDistributionClaimedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: IndexDistributionClaimedEvent_orderBy + orderDirection: OrderDirection + where: IndexDistributionClaimedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [IndexDistributionClaimedEvent!]! + indexUpdatedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): IndexUpdatedEvent + indexUpdatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: IndexUpdatedEvent_orderBy + orderDirection: OrderDirection + where: IndexUpdatedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [IndexUpdatedEvent!]! + indexSubscribedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -enum StreamPeriod_orderBy { - id - stream - stream__id - stream__createdAtTimestamp - stream__createdAtBlockNumber - stream__updatedAtTimestamp - stream__updatedAtBlockNumber - stream__currentFlowRate - stream__deposit - stream__streamedUntilUpdatedAt - stream__userData - sender - sender__id - sender__createdAtTimestamp - sender__createdAtBlockNumber - sender__updatedAtTimestamp - sender__updatedAtBlockNumber - sender__isSuperApp - receiver - receiver__id - receiver__createdAtTimestamp - receiver__createdAtBlockNumber - receiver__updatedAtTimestamp - receiver__updatedAtBlockNumber - receiver__isSuperApp - token - token__id - token__createdAtTimestamp - token__createdAtBlockNumber - token__decimals - token__name - token__symbol - token__isSuperToken - token__isNativeAssetSuperToken - token__isListed - token__underlyingAddress - flowRate - deposit - startedAtTimestamp - startedAtBlockNumber - startedAtEvent - startedAtEvent__id - startedAtEvent__transactionHash - startedAtEvent__gasPrice - startedAtEvent__gasUsed - startedAtEvent__timestamp - startedAtEvent__name - startedAtEvent__blockNumber - startedAtEvent__logIndex - startedAtEvent__order - startedAtEvent__token - startedAtEvent__sender - startedAtEvent__receiver - startedAtEvent__flowOperator - startedAtEvent__flowRate - startedAtEvent__totalSenderFlowRate - startedAtEvent__totalReceiverFlowRate - startedAtEvent__deposit - startedAtEvent__userData - startedAtEvent__oldFlowRate - startedAtEvent__type - startedAtEvent__totalAmountStreamedUntilTimestamp - stoppedAtTimestamp - stoppedAtBlockNumber - stoppedAtEvent - stoppedAtEvent__id - stoppedAtEvent__transactionHash - stoppedAtEvent__gasPrice - stoppedAtEvent__gasUsed - stoppedAtEvent__timestamp - stoppedAtEvent__name - stoppedAtEvent__blockNumber - stoppedAtEvent__logIndex - stoppedAtEvent__order - stoppedAtEvent__token - stoppedAtEvent__sender - stoppedAtEvent__receiver - stoppedAtEvent__flowOperator - stoppedAtEvent__flowRate - stoppedAtEvent__totalSenderFlowRate - stoppedAtEvent__totalReceiverFlowRate - stoppedAtEvent__deposit - stoppedAtEvent__userData - stoppedAtEvent__oldFlowRate - stoppedAtEvent__type - stoppedAtEvent__totalAmountStreamedUntilTimestamp - totalAmountStreamed -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): IndexSubscribedEvent + indexSubscribedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: IndexSubscribedEvent_orderBy + orderDirection: OrderDirection + where: IndexSubscribedEvent_filter -type StreamRevision { - """ - ID composed of: keccak256(abi.encode(sender,receiver))-tokenAddress - - """ - id: ID! - revisionIndex: Int! - periodRevisionIndex: Int! + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """ - The "most recently alive" stream between a sender and receiver. - Note: The `revisionIndex` property may not be the same as the `revisionIndex` - of `mostRecentStream`. Which means `mostRecentStream` has been closed and no - new stream has been opened. - - """ - mostRecentStream: Stream! -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [IndexSubscribedEvent!]! + indexUnitsUpdatedEvent( + id: ID! -input StreamRevision_filter { - id: ID - id_not: ID - id_gt: ID - id_lt: ID - id_gte: ID - id_lte: ID - id_in: [ID!] - id_not_in: [ID!] - revisionIndex: Int - revisionIndex_not: Int - revisionIndex_gt: Int - revisionIndex_lt: Int - revisionIndex_gte: Int - revisionIndex_lte: Int - revisionIndex_in: [Int!] - revisionIndex_not_in: [Int!] - periodRevisionIndex: Int - periodRevisionIndex_not: Int - periodRevisionIndex_gt: Int - periodRevisionIndex_lt: Int - periodRevisionIndex_gte: Int - periodRevisionIndex_lte: Int - periodRevisionIndex_in: [Int!] - periodRevisionIndex_not_in: [Int!] - mostRecentStream: String - mostRecentStream_not: String - mostRecentStream_gt: String - mostRecentStream_lt: String - mostRecentStream_gte: String - mostRecentStream_lte: String - mostRecentStream_in: [String!] - mostRecentStream_not_in: [String!] - mostRecentStream_contains: String - mostRecentStream_contains_nocase: String - mostRecentStream_not_contains: String - mostRecentStream_not_contains_nocase: String - mostRecentStream_starts_with: String - mostRecentStream_starts_with_nocase: String - mostRecentStream_not_starts_with: String - mostRecentStream_not_starts_with_nocase: String - mostRecentStream_ends_with: String - mostRecentStream_ends_with_nocase: String - mostRecentStream_not_ends_with: String - mostRecentStream_not_ends_with_nocase: String - mostRecentStream_: Stream_filter + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [StreamRevision_filter] - or: [StreamRevision_filter] -} + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): IndexUnitsUpdatedEvent + indexUnitsUpdatedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: IndexUnitsUpdatedEvent_orderBy + orderDirection: OrderDirection + where: IndexUnitsUpdatedEvent_filter -enum StreamRevision_orderBy { - id - revisionIndex - periodRevisionIndex - mostRecentStream - mostRecentStream__id - mostRecentStream__createdAtTimestamp - mostRecentStream__createdAtBlockNumber - mostRecentStream__updatedAtTimestamp - mostRecentStream__updatedAtBlockNumber - mostRecentStream__currentFlowRate - mostRecentStream__deposit - mostRecentStream__streamedUntilUpdatedAt - mostRecentStream__userData -} + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height -type Subscription { - flowUpdatedEvent( + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [IndexUnitsUpdatedEvent!]! + indexUnsubscribedEvent( id: ID! """ @@ -11392,13 +15520,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): FlowUpdatedEvent - flowUpdatedEvents( + ): IndexUnsubscribedEvent + indexUnsubscribedEvents( skip: Int = 0 first: Int = 100 - orderBy: FlowUpdatedEvent_orderBy + orderBy: IndexUnsubscribedEvent_orderBy orderDirection: OrderDirection - where: FlowUpdatedEvent_filter + where: IndexUnsubscribedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11414,8 +15542,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [FlowUpdatedEvent!]! - flowOperatorUpdatedEvent( + ): [IndexUnsubscribedEvent!]! + subscriptionApprovedEvent( id: ID! """ @@ -11432,13 +15560,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): FlowOperatorUpdatedEvent - flowOperatorUpdatedEvents( + ): SubscriptionApprovedEvent + subscriptionApprovedEvents( skip: Int = 0 first: Int = 100 - orderBy: FlowOperatorUpdatedEvent_orderBy + orderBy: SubscriptionApprovedEvent_orderBy orderDirection: OrderDirection - where: FlowOperatorUpdatedEvent_filter + where: SubscriptionApprovedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11454,8 +15582,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [FlowOperatorUpdatedEvent!]! - indexCreatedEvent( + ): [SubscriptionApprovedEvent!]! + subscriptionDistributionClaimedEvent( id: ID! """ @@ -11472,13 +15600,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexCreatedEvent - indexCreatedEvents( + ): SubscriptionDistributionClaimedEvent + subscriptionDistributionClaimedEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexCreatedEvent_orderBy + orderBy: SubscriptionDistributionClaimedEvent_orderBy orderDirection: OrderDirection - where: IndexCreatedEvent_filter + where: SubscriptionDistributionClaimedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11494,8 +15622,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexCreatedEvent!]! - indexDistributionClaimedEvent( + ): [SubscriptionDistributionClaimedEvent!]! + subscriptionRevokedEvent( id: ID! """ @@ -11512,13 +15640,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexDistributionClaimedEvent - indexDistributionClaimedEvents( + ): SubscriptionRevokedEvent + subscriptionRevokedEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexDistributionClaimedEvent_orderBy + orderBy: SubscriptionRevokedEvent_orderBy orderDirection: OrderDirection - where: IndexDistributionClaimedEvent_filter + where: SubscriptionRevokedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11534,8 +15662,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexDistributionClaimedEvent!]! - indexUpdatedEvent( + ): [SubscriptionRevokedEvent!]! + subscriptionUnitsUpdatedEvent( id: ID! """ @@ -11552,13 +15680,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexUpdatedEvent - indexUpdatedEvents( + ): SubscriptionUnitsUpdatedEvent + subscriptionUnitsUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexUpdatedEvent_orderBy + orderBy: SubscriptionUnitsUpdatedEvent_orderBy orderDirection: OrderDirection - where: IndexUpdatedEvent_filter + where: SubscriptionUnitsUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11574,8 +15702,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexUpdatedEvent!]! - indexSubscribedEvent( + ): [SubscriptionUnitsUpdatedEvent!]! + poolCreatedEvent( id: ID! """ @@ -11592,13 +15720,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexSubscribedEvent - indexSubscribedEvents( + ): PoolCreatedEvent + poolCreatedEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexSubscribedEvent_orderBy + orderBy: PoolCreatedEvent_orderBy orderDirection: OrderDirection - where: IndexSubscribedEvent_filter + where: PoolCreatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11614,8 +15742,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexSubscribedEvent!]! - indexUnitsUpdatedEvent( + ): [PoolCreatedEvent!]! + poolConnectionUpdatedEvent( id: ID! """ @@ -11632,13 +15760,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexUnitsUpdatedEvent - indexUnitsUpdatedEvents( + ): PoolConnectionUpdatedEvent + poolConnectionUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexUnitsUpdatedEvent_orderBy + orderBy: PoolConnectionUpdatedEvent_orderBy orderDirection: OrderDirection - where: IndexUnitsUpdatedEvent_filter + where: PoolConnectionUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11654,8 +15782,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexUnitsUpdatedEvent!]! - indexUnsubscribedEvent( + ): [PoolConnectionUpdatedEvent!]! + bufferAdjustedEvent( id: ID! """ @@ -11672,13 +15800,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): IndexUnsubscribedEvent - indexUnsubscribedEvents( + ): BufferAdjustedEvent + bufferAdjustedEvents( skip: Int = 0 first: Int = 100 - orderBy: IndexUnsubscribedEvent_orderBy + orderBy: BufferAdjustedEvent_orderBy orderDirection: OrderDirection - where: IndexUnsubscribedEvent_filter + where: BufferAdjustedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11694,8 +15822,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [IndexUnsubscribedEvent!]! - subscriptionApprovedEvent( + ): [BufferAdjustedEvent!]! + instantDistributionUpdatedEvent( id: ID! """ @@ -11712,13 +15840,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionApprovedEvent - subscriptionApprovedEvents( + ): InstantDistributionUpdatedEvent + instantDistributionUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: SubscriptionApprovedEvent_orderBy + orderBy: InstantDistributionUpdatedEvent_orderBy orderDirection: OrderDirection - where: SubscriptionApprovedEvent_filter + where: InstantDistributionUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11734,8 +15862,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionApprovedEvent!]! - subscriptionDistributionClaimedEvent( + ): [InstantDistributionUpdatedEvent!]! + flowDistributionUpdatedEvent( id: ID! """ @@ -11752,13 +15880,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionDistributionClaimedEvent - subscriptionDistributionClaimedEvents( + ): FlowDistributionUpdatedEvent + flowDistributionUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: SubscriptionDistributionClaimedEvent_orderBy + orderBy: FlowDistributionUpdatedEvent_orderBy orderDirection: OrderDirection - where: SubscriptionDistributionClaimedEvent_filter + where: FlowDistributionUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11774,8 +15902,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionDistributionClaimedEvent!]! - subscriptionRevokedEvent( + ): [FlowDistributionUpdatedEvent!]! + distributionClaimedEvent( id: ID! """ @@ -11792,13 +15920,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionRevokedEvent - subscriptionRevokedEvents( + ): DistributionClaimedEvent + distributionClaimedEvents( skip: Int = 0 first: Int = 100 - orderBy: SubscriptionRevokedEvent_orderBy + orderBy: DistributionClaimedEvent_orderBy orderDirection: OrderDirection - where: SubscriptionRevokedEvent_filter + where: DistributionClaimedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11814,8 +15942,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionRevokedEvent!]! - subscriptionUnitsUpdatedEvent( + ): [DistributionClaimedEvent!]! + memberUnitsUpdatedEvent( id: ID! """ @@ -11832,13 +15960,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SubscriptionUnitsUpdatedEvent - subscriptionUnitsUpdatedEvents( + ): MemberUnitsUpdatedEvent + memberUnitsUpdatedEvents( skip: Int = 0 first: Int = 100 - orderBy: SubscriptionUnitsUpdatedEvent_orderBy + orderBy: MemberUnitsUpdatedEvent_orderBy orderDirection: OrderDirection - where: SubscriptionUnitsUpdatedEvent_filter + where: MemberUnitsUpdatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -11854,7 +15982,7 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SubscriptionUnitsUpdatedEvent!]! + ): [MemberUnitsUpdatedEvent!]! agreementClassRegisteredEvent( id: ID! @@ -12676,9 +16804,169 @@ type Subscription { mintedEvents( skip: Int = 0 first: Int = 100 - orderBy: MintedEvent_orderBy + orderBy: MintedEvent_orderBy + orderDirection: OrderDirection + where: MintedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [MintedEvent!]! + sentEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): SentEvent + sentEvents( + skip: Int = 0 + first: Int = 100 + orderBy: SentEvent_orderBy + orderDirection: OrderDirection + where: SentEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [SentEvent!]! + transferEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TransferEvent + transferEvents( + skip: Int = 0 + first: Int = 100 + orderBy: TransferEvent_orderBy + orderDirection: OrderDirection + where: TransferEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TransferEvent!]! + tokenDowngradedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenDowngradedEvent + tokenDowngradedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: TokenDowngradedEvent_orderBy + orderDirection: OrderDirection + where: TokenDowngradedEvent_filter + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TokenDowngradedEvent!]! + tokenUpgradedEvent( + id: ID! + + """ + The block at which the query should be executed. Can either be a `{ hash: + Bytes }` value containing a block hash, a `{ number: Int }` containing the + block number, or a `{ number_gte: Int }` containing the minimum block + number. In the case of `number_gte`, the query will be executed on the + latest block only if the subgraph has progressed to or past the minimum + block number. Defaults to the latest block when omitted. + """ + block: Block_height + + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TokenUpgradedEvent + tokenUpgradedEvents( + skip: Int = 0 + first: Int = 100 + orderBy: TokenUpgradedEvent_orderBy orderDirection: OrderDirection - where: MintedEvent_filter + where: TokenUpgradedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12694,8 +16982,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [MintedEvent!]! - sentEvent( + ): [TokenUpgradedEvent!]! + approvalEvent( id: ID! """ @@ -12712,13 +17000,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SentEvent - sentEvents( + ): ApprovalEvent + approvalEvents( skip: Int = 0 first: Int = 100 - orderBy: SentEvent_orderBy + orderBy: ApprovalEvent_orderBy orderDirection: OrderDirection - where: SentEvent_filter + where: ApprovalEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12734,8 +17022,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SentEvent!]! - transferEvent( + ): [ApprovalEvent!]! + customSuperTokenCreatedEvent( id: ID! """ @@ -12752,13 +17040,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TransferEvent - transferEvents( + ): CustomSuperTokenCreatedEvent + customSuperTokenCreatedEvents( skip: Int = 0 first: Int = 100 - orderBy: TransferEvent_orderBy + orderBy: CustomSuperTokenCreatedEvent_orderBy orderDirection: OrderDirection - where: TransferEvent_filter + where: CustomSuperTokenCreatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12774,8 +17062,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TransferEvent!]! - tokenDowngradedEvent( + ): [CustomSuperTokenCreatedEvent!]! + superTokenCreatedEvent( id: ID! """ @@ -12792,13 +17080,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenDowngradedEvent - tokenDowngradedEvents( + ): SuperTokenCreatedEvent + superTokenCreatedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenDowngradedEvent_orderBy + orderBy: SuperTokenCreatedEvent_orderBy orderDirection: OrderDirection - where: TokenDowngradedEvent_filter + where: SuperTokenCreatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12814,8 +17102,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenDowngradedEvent!]! - tokenUpgradedEvent( + ): [SuperTokenCreatedEvent!]! + superTokenLogicCreatedEvent( id: ID! """ @@ -12832,13 +17120,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): TokenUpgradedEvent - tokenUpgradedEvents( + ): SuperTokenLogicCreatedEvent + superTokenLogicCreatedEvents( skip: Int = 0 first: Int = 100 - orderBy: TokenUpgradedEvent_orderBy + orderBy: SuperTokenLogicCreatedEvent_orderBy orderDirection: OrderDirection - where: TokenUpgradedEvent_filter + where: SuperTokenLogicCreatedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12854,8 +17142,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [TokenUpgradedEvent!]! - customSuperTokenCreatedEvent( + ): [SuperTokenLogicCreatedEvent!]! + newPICEvent( id: ID! """ @@ -12872,13 +17160,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): CustomSuperTokenCreatedEvent - customSuperTokenCreatedEvents( + ): NewPICEvent + newPICEvents( skip: Int = 0 first: Int = 100 - orderBy: CustomSuperTokenCreatedEvent_orderBy + orderBy: NewPICEvent_orderBy orderDirection: OrderDirection - where: CustomSuperTokenCreatedEvent_filter + where: NewPICEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12894,8 +17182,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [CustomSuperTokenCreatedEvent!]! - superTokenCreatedEvent( + ): [NewPICEvent!]! + exitRateChangedEvent( id: ID! """ @@ -12912,13 +17200,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenCreatedEvent - superTokenCreatedEvents( + ): ExitRateChangedEvent + exitRateChangedEvents( skip: Int = 0 first: Int = 100 - orderBy: SuperTokenCreatedEvent_orderBy + orderBy: ExitRateChangedEvent_orderBy orderDirection: OrderDirection - where: SuperTokenCreatedEvent_filter + where: ExitRateChangedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12934,8 +17222,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenCreatedEvent!]! - superTokenLogicCreatedEvent( + ): [ExitRateChangedEvent!]! + bondIncreasedEvent( id: ID! """ @@ -12952,13 +17240,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): SuperTokenLogicCreatedEvent - superTokenLogicCreatedEvents( + ): BondIncreasedEvent + bondIncreasedEvents( skip: Int = 0 first: Int = 100 - orderBy: SuperTokenLogicCreatedEvent_orderBy + orderBy: BondIncreasedEvent_orderBy orderDirection: OrderDirection - where: SuperTokenLogicCreatedEvent_filter + where: BondIncreasedEvent_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -12974,8 +17262,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [SuperTokenLogicCreatedEvent!]! - newPICEvent( + ): [BondIncreasedEvent!]! + account( id: ID! """ @@ -12992,13 +17280,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): NewPICEvent - newPICEvents( + ): Account + accounts( skip: Int = 0 first: Int = 100 - orderBy: NewPICEvent_orderBy + orderBy: Account_orderBy orderDirection: OrderDirection - where: NewPICEvent_filter + where: Account_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -13014,8 +17302,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [NewPICEvent!]! - exitRateChangedEvent( + ): [Account!]! + pool( id: ID! """ @@ -13032,13 +17320,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): ExitRateChangedEvent - exitRateChangedEvents( + ): Pool + pools( skip: Int = 0 first: Int = 100 - orderBy: ExitRateChangedEvent_orderBy + orderBy: Pool_orderBy orderDirection: OrderDirection - where: ExitRateChangedEvent_filter + where: Pool_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -13054,8 +17342,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [ExitRateChangedEvent!]! - bondIncreasedEvent( + ): [Pool!]! + poolMember( id: ID! """ @@ -13072,13 +17360,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): BondIncreasedEvent - bondIncreasedEvents( + ): PoolMember + poolMembers( skip: Int = 0 first: Int = 100 - orderBy: BondIncreasedEvent_orderBy + orderBy: PoolMember_orderBy orderDirection: OrderDirection - where: BondIncreasedEvent_filter + where: PoolMember_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -13094,8 +17382,8 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [BondIncreasedEvent!]! - account( + ): [PoolMember!]! + poolDistributor( id: ID! """ @@ -13112,13 +17400,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Account - accounts( + ): PoolDistributor + poolDistributors( skip: Int = 0 first: Int = 100 - orderBy: Account_orderBy + orderBy: PoolDistributor_orderBy orderDirection: OrderDirection - where: Account_filter + where: PoolDistributor_filter """ The block at which the query should be executed. Can either be a `{ hash: @@ -13134,7 +17422,7 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Account!]! + ): [PoolDistributor!]! index( id: ID! @@ -14871,7 +19159,8 @@ type SuperTokenFactoryUpdatedEvent implements Event { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `newFactory` """ addresses: [Bytes!]! @@ -15014,7 +19303,8 @@ type SuperTokenLogicCreatedEvent implements Event { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `tokenLogic` """ addresses: [Bytes!]! @@ -15157,7 +19447,9 @@ type SuperTokenLogicUpdatedEvent implements Event { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `token` + addresses[1] = `code` """ addresses: [Bytes!]! @@ -15318,7 +19610,10 @@ type SuperTokenMinimumDepositChangedEvent implements Event { governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ addresses: [Bytes!]! @@ -15491,6 +19786,12 @@ enum SuperTokenMinimumDepositChangedEvent_orderBy { minimumDeposit } +""" +A string representation of microseconds UNIX timestamp (16 digits) + +""" +scalar Timestamp + """ Token: A higher order entity created for super tokens (and underlying tokens) that are "valid" (tokens that have Superfluid's host contract address set as the host). @@ -15532,6 +19833,11 @@ type Token { """ underlyingToken: Token + + """ + If `governanceConfig.id` is the zero address, the token uses the default governance config. + + """ governanceConfig: TokenGovernanceConfig } @@ -16108,12 +20414,36 @@ type TokenStatistic { """ totalNumberOfActiveStreams: Int! + """ + The total number of currently active `token` streams for the CFA. + + """ + totalCFANumberOfActiveStreams: Int! + + """ + The total number of currently active `token` streams for the GDA. + + """ + totalGDANumberOfActiveStreams: Int! + """ The count of closed streams for `token`. """ totalNumberOfClosedStreams: Int! + """ + The count of closed streams for `token` for the CFA. + + """ + totalCFANumberOfClosedStreams: Int! + + """ + The count of closed streams for `token` for the GDA. + + """ + totalGDANumberOfClosedStreams: Int! + """ The total number of Indexes created with `token`. @@ -16139,23 +20469,77 @@ type TokenStatistic { totalApprovedSubscriptions: Int! """ - The total deposit held by the CFA agreement for this particular `token`. + The total number of Pools created with `token`. + + """ + totalNumberOfPools: Int! + + """ + The total number of "active" (has greater than 0 units and has distributed it at least once) Pools created with `token`. + + """ + totalNumberOfActivePools: Int! + + """ + The number of memberships which have units allocated to them created with Pools that distribute `token`. + + """ + totalMembershipsWithUnits: Int! + + """ + Counts all approved memberships whether or not they have units. + + """ + totalConnectedMemberships: Int! + + """ + The total deposit held by all flow agreements for this particular `token`. """ totalDeposit: BigInt! """ - The total outflow rate of the `token` (how much value is being moved). + The total deposit held by the CFA for this particular `token`. + + """ + totalCFADeposit: BigInt! + + """ + The total deposit held by the GDA agreement for this particular `token`. + + """ + totalGDADeposit: BigInt! + + """ + The total outflow rate of the `token` (how much value is being moved) for all flow agreements. """ totalOutflowRate: BigInt! """ - The all-time total amount streamed (outflows) until the `updatedAtTimestamp`/`updatedAtBlock`. + The total outflow rate of the `token` (how much value is being moved) for the CFA. + + """ + totalCFAOutflowRate: BigInt! + + """ + The total outflow rate of the `token` (how much value is being moved) for the GDA. + + """ + totalGDAOutflowRate: BigInt! + + """ + The all-time total amount streamed (outflows) until the `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. """ totalAmountStreamedUntilUpdatedAt: BigInt! + """ + The all-time total amount streamed (outflows) until the `updatedAtTimestamp`/`updatedAtBlock` for the CFA. + + """ + totalCFAAmountStreamedUntilUpdatedAt: BigInt! + """ The all-time total amount transferred until the `updatedAtTimestamp`/`updatedAtBlock`. @@ -16173,6 +20557,18 @@ type TokenStatistic { """ totalSupply: BigInt! + + """ + The total number of accounts that have interacted with the token (but might not hold a balance anymore). + + """ + totalNumberOfAccounts: Int! + + """ + The total number of accounts holding a non-zero balance of the token. + + """ + totalNumberOfHolders: Int! token: Token! tokenStatisticLogs(skip: Int = 0, first: Int = 100, orderBy: TokenStatisticLog_orderBy, orderDirection: OrderDirection, where: TokenStatisticLog_filter): [TokenStatisticLog!]! } @@ -16210,6 +20606,22 @@ input TokenStatistic_filter { totalNumberOfActiveStreams_lte: Int totalNumberOfActiveStreams_in: [Int!] totalNumberOfActiveStreams_not_in: [Int!] + totalCFANumberOfActiveStreams: Int + totalCFANumberOfActiveStreams_not: Int + totalCFANumberOfActiveStreams_gt: Int + totalCFANumberOfActiveStreams_lt: Int + totalCFANumberOfActiveStreams_gte: Int + totalCFANumberOfActiveStreams_lte: Int + totalCFANumberOfActiveStreams_in: [Int!] + totalCFANumberOfActiveStreams_not_in: [Int!] + totalGDANumberOfActiveStreams: Int + totalGDANumberOfActiveStreams_not: Int + totalGDANumberOfActiveStreams_gt: Int + totalGDANumberOfActiveStreams_lt: Int + totalGDANumberOfActiveStreams_gte: Int + totalGDANumberOfActiveStreams_lte: Int + totalGDANumberOfActiveStreams_in: [Int!] + totalGDANumberOfActiveStreams_not_in: [Int!] totalNumberOfClosedStreams: Int totalNumberOfClosedStreams_not: Int totalNumberOfClosedStreams_gt: Int @@ -16218,6 +20630,22 @@ input TokenStatistic_filter { totalNumberOfClosedStreams_lte: Int totalNumberOfClosedStreams_in: [Int!] totalNumberOfClosedStreams_not_in: [Int!] + totalCFANumberOfClosedStreams: Int + totalCFANumberOfClosedStreams_not: Int + totalCFANumberOfClosedStreams_gt: Int + totalCFANumberOfClosedStreams_lt: Int + totalCFANumberOfClosedStreams_gte: Int + totalCFANumberOfClosedStreams_lte: Int + totalCFANumberOfClosedStreams_in: [Int!] + totalCFANumberOfClosedStreams_not_in: [Int!] + totalGDANumberOfClosedStreams: Int + totalGDANumberOfClosedStreams_not: Int + totalGDANumberOfClosedStreams_gt: Int + totalGDANumberOfClosedStreams_lt: Int + totalGDANumberOfClosedStreams_gte: Int + totalGDANumberOfClosedStreams_lte: Int + totalGDANumberOfClosedStreams_in: [Int!] + totalGDANumberOfClosedStreams_not_in: [Int!] totalNumberOfIndexes: Int totalNumberOfIndexes_not: Int totalNumberOfIndexes_gt: Int @@ -16250,6 +20678,38 @@ input TokenStatistic_filter { totalApprovedSubscriptions_lte: Int totalApprovedSubscriptions_in: [Int!] totalApprovedSubscriptions_not_in: [Int!] + totalNumberOfPools: Int + totalNumberOfPools_not: Int + totalNumberOfPools_gt: Int + totalNumberOfPools_lt: Int + totalNumberOfPools_gte: Int + totalNumberOfPools_lte: Int + totalNumberOfPools_in: [Int!] + totalNumberOfPools_not_in: [Int!] + totalNumberOfActivePools: Int + totalNumberOfActivePools_not: Int + totalNumberOfActivePools_gt: Int + totalNumberOfActivePools_lt: Int + totalNumberOfActivePools_gte: Int + totalNumberOfActivePools_lte: Int + totalNumberOfActivePools_in: [Int!] + totalNumberOfActivePools_not_in: [Int!] + totalMembershipsWithUnits: Int + totalMembershipsWithUnits_not: Int + totalMembershipsWithUnits_gt: Int + totalMembershipsWithUnits_lt: Int + totalMembershipsWithUnits_gte: Int + totalMembershipsWithUnits_lte: Int + totalMembershipsWithUnits_in: [Int!] + totalMembershipsWithUnits_not_in: [Int!] + totalConnectedMemberships: Int + totalConnectedMemberships_not: Int + totalConnectedMemberships_gt: Int + totalConnectedMemberships_lt: Int + totalConnectedMemberships_gte: Int + totalConnectedMemberships_lte: Int + totalConnectedMemberships_in: [Int!] + totalConnectedMemberships_not_in: [Int!] totalDeposit: BigInt totalDeposit_not: BigInt totalDeposit_gt: BigInt @@ -16258,6 +20718,22 @@ input TokenStatistic_filter { totalDeposit_lte: BigInt totalDeposit_in: [BigInt!] totalDeposit_not_in: [BigInt!] + totalCFADeposit: BigInt + totalCFADeposit_not: BigInt + totalCFADeposit_gt: BigInt + totalCFADeposit_lt: BigInt + totalCFADeposit_gte: BigInt + totalCFADeposit_lte: BigInt + totalCFADeposit_in: [BigInt!] + totalCFADeposit_not_in: [BigInt!] + totalGDADeposit: BigInt + totalGDADeposit_not: BigInt + totalGDADeposit_gt: BigInt + totalGDADeposit_lt: BigInt + totalGDADeposit_gte: BigInt + totalGDADeposit_lte: BigInt + totalGDADeposit_in: [BigInt!] + totalGDADeposit_not_in: [BigInt!] totalOutflowRate: BigInt totalOutflowRate_not: BigInt totalOutflowRate_gt: BigInt @@ -16266,6 +20742,22 @@ input TokenStatistic_filter { totalOutflowRate_lte: BigInt totalOutflowRate_in: [BigInt!] totalOutflowRate_not_in: [BigInt!] + totalCFAOutflowRate: BigInt + totalCFAOutflowRate_not: BigInt + totalCFAOutflowRate_gt: BigInt + totalCFAOutflowRate_lt: BigInt + totalCFAOutflowRate_gte: BigInt + totalCFAOutflowRate_lte: BigInt + totalCFAOutflowRate_in: [BigInt!] + totalCFAOutflowRate_not_in: [BigInt!] + totalGDAOutflowRate: BigInt + totalGDAOutflowRate_not: BigInt + totalGDAOutflowRate_gt: BigInt + totalGDAOutflowRate_lt: BigInt + totalGDAOutflowRate_gte: BigInt + totalGDAOutflowRate_lte: BigInt + totalGDAOutflowRate_in: [BigInt!] + totalGDAOutflowRate_not_in: [BigInt!] totalAmountStreamedUntilUpdatedAt: BigInt totalAmountStreamedUntilUpdatedAt_not: BigInt totalAmountStreamedUntilUpdatedAt_gt: BigInt @@ -16274,6 +20766,14 @@ input TokenStatistic_filter { totalAmountStreamedUntilUpdatedAt_lte: BigInt totalAmountStreamedUntilUpdatedAt_in: [BigInt!] totalAmountStreamedUntilUpdatedAt_not_in: [BigInt!] + totalCFAAmountStreamedUntilUpdatedAt: BigInt + totalCFAAmountStreamedUntilUpdatedAt_not: BigInt + totalCFAAmountStreamedUntilUpdatedAt_gt: BigInt + totalCFAAmountStreamedUntilUpdatedAt_lt: BigInt + totalCFAAmountStreamedUntilUpdatedAt_gte: BigInt + totalCFAAmountStreamedUntilUpdatedAt_lte: BigInt + totalCFAAmountStreamedUntilUpdatedAt_in: [BigInt!] + totalCFAAmountStreamedUntilUpdatedAt_not_in: [BigInt!] totalAmountTransferredUntilUpdatedAt: BigInt totalAmountTransferredUntilUpdatedAt_not: BigInt totalAmountTransferredUntilUpdatedAt_gt: BigInt @@ -16298,6 +20798,22 @@ input TokenStatistic_filter { totalSupply_lte: BigInt totalSupply_in: [BigInt!] totalSupply_not_in: [BigInt!] + totalNumberOfAccounts: Int + totalNumberOfAccounts_not: Int + totalNumberOfAccounts_gt: Int + totalNumberOfAccounts_lt: Int + totalNumberOfAccounts_gte: Int + totalNumberOfAccounts_lte: Int + totalNumberOfAccounts_in: [Int!] + totalNumberOfAccounts_not_in: [Int!] + totalNumberOfHolders: Int + totalNumberOfHolders_not: Int + totalNumberOfHolders_gt: Int + totalNumberOfHolders_lt: Int + totalNumberOfHolders_gte: Int + totalNumberOfHolders_lte: Int + totalNumberOfHolders_in: [Int!] + totalNumberOfHolders_not_in: [Int!] token: String token_not: String token_gt: String @@ -16332,17 +20848,32 @@ enum TokenStatistic_orderBy { updatedAtTimestamp updatedAtBlockNumber totalNumberOfActiveStreams + totalCFANumberOfActiveStreams + totalGDANumberOfActiveStreams totalNumberOfClosedStreams + totalCFANumberOfClosedStreams + totalGDANumberOfClosedStreams totalNumberOfIndexes totalNumberOfActiveIndexes totalSubscriptionsWithUnits totalApprovedSubscriptions + totalNumberOfPools + totalNumberOfActivePools + totalMembershipsWithUnits + totalConnectedMemberships totalDeposit + totalCFADeposit + totalGDADeposit totalOutflowRate + totalCFAOutflowRate + totalGDAOutflowRate totalAmountStreamedUntilUpdatedAt + totalCFAAmountStreamedUntilUpdatedAt totalAmountTransferredUntilUpdatedAt totalAmountDistributedUntilUpdatedAt totalSupply + totalNumberOfAccounts + totalNumberOfHolders token token__id token__createdAtTimestamp @@ -16371,17 +20902,41 @@ type TokenStatisticLog { triggeredByEventName: String! """ - The total number of currently active `token` streams. + The total number of currently active `token` streams for all flow agreements. """ totalNumberOfActiveStreams: Int! """ - The count of closed streams for `token`. + The total number of currently active `token` streams for the CFA. + + """ + totalCFANumberOfActiveStreams: Int! + + """ + The total number of currently active `token` streams for the GDA. + + """ + totalGDANumberOfActiveStreams: Int! + + """ + The count of closed streams for `token` for all flow agreements. """ totalNumberOfClosedStreams: Int! + """ + The count of closed streams for `token` for the CFA. + + """ + totalCFANumberOfClosedStreams: Int! + + """ + The count of closed streams for `token` for the GDA. + + """ + totalGDANumberOfClosedStreams: Int! + """ The total number of Indexes created with `token`. @@ -16407,23 +20962,77 @@ type TokenStatisticLog { totalApprovedSubscriptions: Int! """ - The total deposit held by the CFA agreement for this particular `token`. + The total number of Pools created with `token`. + + """ + totalNumberOfPools: Int! + + """ + The total number of "active" (has greater than 0 units and has distributed it at least once) Pools created with `token`. + + """ + totalNumberOfActivePools: Int! + + """ + The number of memberships which have units allocated to them created with Pools that distribute `token`. + + """ + totalMembershipsWithUnits: Int! + + """ + Counts all connected memberships whether or not they have units. + + """ + totalConnectedMemberships: Int! + + """ + The total deposit held by the CFA agreement for this particular `token` for all flow agreements. """ totalDeposit: BigInt! """ - The total outflow rate of the `token` (how much value is being moved). + The total deposit held by the CFA agreement for this particular `token` for the CFA. + + """ + totalCFADeposit: BigInt! + + """ + The total deposit held by the CFA agreement for this particular `token` for the GDA. + + """ + totalGDADeposit: BigInt! + + """ + The total outflow rate of the `token` (how much value is being moved) for all flow agreements. """ totalOutflowRate: BigInt! """ - The all-time total amount of `token` streamed (outflows) until the `timestamp`/`block`. + The total outflow rate of the `token` (how much value is being moved) for the CFA. + + """ + totalCFAOutflowRate: BigInt! + + """ + The total outflow rate of the `token` (how much value is being moved) for the GDA. + + """ + totalGDAOutflowRate: BigInt! + + """ + The all-time total amount of `token` streamed (outflows) until the `timestamp`/`block` for all flow agreements. """ totalAmountStreamed: BigInt! + """ + The all-time total amount of `token` streamed (outflows) until the `timestamp`/`block` for the CFA. + + """ + totalCFAAmountStreamed: BigInt! + """ The all-time total amount of `token` transferred until the `timestamp`/`block`. @@ -16441,6 +21050,18 @@ type TokenStatisticLog { """ totalSupply: BigInt! + + """ + The total number of accounts that have interacted with the token (but might not hold a balance anymore). + + """ + totalNumberOfAccounts: Int! + + """ + The total number of accounts holding a non-zero balance of the token. + + """ + totalNumberOfHolders: Int! token: Token! tokenStatistic: TokenStatistic! } @@ -16524,6 +21145,22 @@ input TokenStatisticLog_filter { totalNumberOfActiveStreams_lte: Int totalNumberOfActiveStreams_in: [Int!] totalNumberOfActiveStreams_not_in: [Int!] + totalCFANumberOfActiveStreams: Int + totalCFANumberOfActiveStreams_not: Int + totalCFANumberOfActiveStreams_gt: Int + totalCFANumberOfActiveStreams_lt: Int + totalCFANumberOfActiveStreams_gte: Int + totalCFANumberOfActiveStreams_lte: Int + totalCFANumberOfActiveStreams_in: [Int!] + totalCFANumberOfActiveStreams_not_in: [Int!] + totalGDANumberOfActiveStreams: Int + totalGDANumberOfActiveStreams_not: Int + totalGDANumberOfActiveStreams_gt: Int + totalGDANumberOfActiveStreams_lt: Int + totalGDANumberOfActiveStreams_gte: Int + totalGDANumberOfActiveStreams_lte: Int + totalGDANumberOfActiveStreams_in: [Int!] + totalGDANumberOfActiveStreams_not_in: [Int!] totalNumberOfClosedStreams: Int totalNumberOfClosedStreams_not: Int totalNumberOfClosedStreams_gt: Int @@ -16532,6 +21169,22 @@ input TokenStatisticLog_filter { totalNumberOfClosedStreams_lte: Int totalNumberOfClosedStreams_in: [Int!] totalNumberOfClosedStreams_not_in: [Int!] + totalCFANumberOfClosedStreams: Int + totalCFANumberOfClosedStreams_not: Int + totalCFANumberOfClosedStreams_gt: Int + totalCFANumberOfClosedStreams_lt: Int + totalCFANumberOfClosedStreams_gte: Int + totalCFANumberOfClosedStreams_lte: Int + totalCFANumberOfClosedStreams_in: [Int!] + totalCFANumberOfClosedStreams_not_in: [Int!] + totalGDANumberOfClosedStreams: Int + totalGDANumberOfClosedStreams_not: Int + totalGDANumberOfClosedStreams_gt: Int + totalGDANumberOfClosedStreams_lt: Int + totalGDANumberOfClosedStreams_gte: Int + totalGDANumberOfClosedStreams_lte: Int + totalGDANumberOfClosedStreams_in: [Int!] + totalGDANumberOfClosedStreams_not_in: [Int!] totalNumberOfIndexes: Int totalNumberOfIndexes_not: Int totalNumberOfIndexes_gt: Int @@ -16564,6 +21217,38 @@ input TokenStatisticLog_filter { totalApprovedSubscriptions_lte: Int totalApprovedSubscriptions_in: [Int!] totalApprovedSubscriptions_not_in: [Int!] + totalNumberOfPools: Int + totalNumberOfPools_not: Int + totalNumberOfPools_gt: Int + totalNumberOfPools_lt: Int + totalNumberOfPools_gte: Int + totalNumberOfPools_lte: Int + totalNumberOfPools_in: [Int!] + totalNumberOfPools_not_in: [Int!] + totalNumberOfActivePools: Int + totalNumberOfActivePools_not: Int + totalNumberOfActivePools_gt: Int + totalNumberOfActivePools_lt: Int + totalNumberOfActivePools_gte: Int + totalNumberOfActivePools_lte: Int + totalNumberOfActivePools_in: [Int!] + totalNumberOfActivePools_not_in: [Int!] + totalMembershipsWithUnits: Int + totalMembershipsWithUnits_not: Int + totalMembershipsWithUnits_gt: Int + totalMembershipsWithUnits_lt: Int + totalMembershipsWithUnits_gte: Int + totalMembershipsWithUnits_lte: Int + totalMembershipsWithUnits_in: [Int!] + totalMembershipsWithUnits_not_in: [Int!] + totalConnectedMemberships: Int + totalConnectedMemberships_not: Int + totalConnectedMemberships_gt: Int + totalConnectedMemberships_lt: Int + totalConnectedMemberships_gte: Int + totalConnectedMemberships_lte: Int + totalConnectedMemberships_in: [Int!] + totalConnectedMemberships_not_in: [Int!] totalDeposit: BigInt totalDeposit_not: BigInt totalDeposit_gt: BigInt @@ -16572,6 +21257,22 @@ input TokenStatisticLog_filter { totalDeposit_lte: BigInt totalDeposit_in: [BigInt!] totalDeposit_not_in: [BigInt!] + totalCFADeposit: BigInt + totalCFADeposit_not: BigInt + totalCFADeposit_gt: BigInt + totalCFADeposit_lt: BigInt + totalCFADeposit_gte: BigInt + totalCFADeposit_lte: BigInt + totalCFADeposit_in: [BigInt!] + totalCFADeposit_not_in: [BigInt!] + totalGDADeposit: BigInt + totalGDADeposit_not: BigInt + totalGDADeposit_gt: BigInt + totalGDADeposit_lt: BigInt + totalGDADeposit_gte: BigInt + totalGDADeposit_lte: BigInt + totalGDADeposit_in: [BigInt!] + totalGDADeposit_not_in: [BigInt!] totalOutflowRate: BigInt totalOutflowRate_not: BigInt totalOutflowRate_gt: BigInt @@ -16580,6 +21281,22 @@ input TokenStatisticLog_filter { totalOutflowRate_lte: BigInt totalOutflowRate_in: [BigInt!] totalOutflowRate_not_in: [BigInt!] + totalCFAOutflowRate: BigInt + totalCFAOutflowRate_not: BigInt + totalCFAOutflowRate_gt: BigInt + totalCFAOutflowRate_lt: BigInt + totalCFAOutflowRate_gte: BigInt + totalCFAOutflowRate_lte: BigInt + totalCFAOutflowRate_in: [BigInt!] + totalCFAOutflowRate_not_in: [BigInt!] + totalGDAOutflowRate: BigInt + totalGDAOutflowRate_not: BigInt + totalGDAOutflowRate_gt: BigInt + totalGDAOutflowRate_lt: BigInt + totalGDAOutflowRate_gte: BigInt + totalGDAOutflowRate_lte: BigInt + totalGDAOutflowRate_in: [BigInt!] + totalGDAOutflowRate_not_in: [BigInt!] totalAmountStreamed: BigInt totalAmountStreamed_not: BigInt totalAmountStreamed_gt: BigInt @@ -16588,6 +21305,14 @@ input TokenStatisticLog_filter { totalAmountStreamed_lte: BigInt totalAmountStreamed_in: [BigInt!] totalAmountStreamed_not_in: [BigInt!] + totalCFAAmountStreamed: BigInt + totalCFAAmountStreamed_not: BigInt + totalCFAAmountStreamed_gt: BigInt + totalCFAAmountStreamed_lt: BigInt + totalCFAAmountStreamed_gte: BigInt + totalCFAAmountStreamed_lte: BigInt + totalCFAAmountStreamed_in: [BigInt!] + totalCFAAmountStreamed_not_in: [BigInt!] totalAmountTransferred: BigInt totalAmountTransferred_not: BigInt totalAmountTransferred_gt: BigInt @@ -16612,6 +21337,22 @@ input TokenStatisticLog_filter { totalSupply_lte: BigInt totalSupply_in: [BigInt!] totalSupply_not_in: [BigInt!] + totalNumberOfAccounts: Int + totalNumberOfAccounts_not: Int + totalNumberOfAccounts_gt: Int + totalNumberOfAccounts_lt: Int + totalNumberOfAccounts_gte: Int + totalNumberOfAccounts_lte: Int + totalNumberOfAccounts_in: [Int!] + totalNumberOfAccounts_not_in: [Int!] + totalNumberOfHolders: Int + totalNumberOfHolders_not: Int + totalNumberOfHolders_gt: Int + totalNumberOfHolders_lt: Int + totalNumberOfHolders_gte: Int + totalNumberOfHolders_lte: Int + totalNumberOfHolders_in: [Int!] + totalNumberOfHolders_not_in: [Int!] token: String token_not: String token_gt: String @@ -16670,17 +21411,32 @@ enum TokenStatisticLog_orderBy { order triggeredByEventName totalNumberOfActiveStreams + totalCFANumberOfActiveStreams + totalGDANumberOfActiveStreams totalNumberOfClosedStreams + totalCFANumberOfClosedStreams + totalGDANumberOfClosedStreams totalNumberOfIndexes totalNumberOfActiveIndexes totalSubscriptionsWithUnits totalApprovedSubscriptions + totalNumberOfPools + totalNumberOfActivePools + totalMembershipsWithUnits + totalConnectedMemberships totalDeposit + totalCFADeposit + totalGDADeposit totalOutflowRate + totalCFAOutflowRate + totalGDAOutflowRate totalAmountStreamed + totalCFAAmountStreamed totalAmountTransferred totalAmountDistributed totalSupply + totalNumberOfAccounts + totalNumberOfHolders token token__id token__createdAtTimestamp @@ -16697,17 +21453,32 @@ enum TokenStatisticLog_orderBy { tokenStatistic__updatedAtTimestamp tokenStatistic__updatedAtBlockNumber tokenStatistic__totalNumberOfActiveStreams + tokenStatistic__totalCFANumberOfActiveStreams + tokenStatistic__totalGDANumberOfActiveStreams tokenStatistic__totalNumberOfClosedStreams + tokenStatistic__totalCFANumberOfClosedStreams + tokenStatistic__totalGDANumberOfClosedStreams tokenStatistic__totalNumberOfIndexes tokenStatistic__totalNumberOfActiveIndexes tokenStatistic__totalSubscriptionsWithUnits tokenStatistic__totalApprovedSubscriptions + tokenStatistic__totalNumberOfPools + tokenStatistic__totalNumberOfActivePools + tokenStatistic__totalMembershipsWithUnits + tokenStatistic__totalConnectedMemberships tokenStatistic__totalDeposit + tokenStatistic__totalCFADeposit + tokenStatistic__totalGDADeposit tokenStatistic__totalOutflowRate + tokenStatistic__totalCFAOutflowRate + tokenStatistic__totalGDAOutflowRate tokenStatistic__totalAmountStreamedUntilUpdatedAt + tokenStatistic__totalCFAAmountStreamedUntilUpdatedAt tokenStatistic__totalAmountTransferredUntilUpdatedAt tokenStatistic__totalAmountDistributedUntilUpdatedAt tokenStatistic__totalSupply + tokenStatistic__totalNumberOfAccounts + tokenStatistic__totalNumberOfHolders } type TokenUpgradedEvent implements Event { @@ -16904,7 +21675,7 @@ type TransferEvent implements Event { """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken) + addresses[0] = `token` addresses[1] = `from` addresses[2] = `to` @@ -17123,7 +21894,11 @@ type TrustedForwarderChangedEvent implements Event { governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` + addresses[3] = `forwarder` """ addresses: [Bytes!]! diff --git a/packages/sdk-core/src/subgraph/subgraphQueryHandler.ts b/packages/sdk-core/src/subgraph/subgraphQueryHandler.ts index 34a201198b..2ca63dd88b 100644 --- a/packages/sdk-core/src/subgraph/subgraphQueryHandler.ts +++ b/packages/sdk-core/src/subgraph/subgraphQueryHandler.ts @@ -1,4 +1,5 @@ import { TypedDocumentNode } from "@graphql-typed-document-node/core"; +import { ethers } from "ethers"; import _ from "lodash"; import { listAllResults } from "../Query"; @@ -224,7 +225,9 @@ export abstract class SubgraphQueryHandler< const response = await this.querySubgraph(subgraphClient, { where: { - id: query.id.toLowerCase(), + id: ethers.utils.isAddress(query.id) + ? query.id.toLowerCase() + : query.id, }, skip: 0, take: 1, diff --git a/packages/sdk-core/src/types.ts b/packages/sdk-core/src/types.ts index 70a02cc864..59f5c840b1 100644 --- a/packages/sdk-core/src/types.ts +++ b/packages/sdk-core/src/types.ts @@ -15,6 +15,8 @@ export type NetworkData = { cfaV1: string; cfaV1Forwarder: string; idaV1: string; + gdaV1?: string; + gdaV1Forwarder?: string; superTokenFactory: string; superfluidLoader: string; toga?: string; diff --git a/packages/sdk-core/tasks/testSchemasAndQueries.sh b/packages/sdk-core/tasks/testSchemasAndQueries.sh index dc085a9838..2076d4f0dc 100755 --- a/packages/sdk-core/tasks/testSchemasAndQueries.sh +++ b/packages/sdk-core/tasks/testSchemasAndQueries.sh @@ -1,19 +1,15 @@ #!/usr/bin/env bash -JQ="npx --package=node-jq -- jq" - # make sure that if any step fails, the script fails set -xe if [ "$SUBGRAPH_RELEASE_TAG" == "feature" ];then - # we only support matic and goerli feature endpoints - # however, we don't want to be blocked by matic for feature - NETWORKS=("goerli") + NETWORKS=("matic") fi if [ "$SUBGRAPH_RELEASE_TAG" == "dev" ] || [ "$SUBGRAPH_RELEASE_TAG" == "v1" ];then # shellcheck disable=SC2207 - NETWORKS=( $($JQ -r .[] ../subgraph/hosted-service-networks.json) ) + NETWORKS=( $(jq -r .[] ../subgraph/hosted-service-networks.json) ) fi function testSchemaAndQueries() { @@ -27,18 +23,7 @@ function testSchemaAndQueries() { # for sdk-core releases: test deployed subgraphs for i in "${NETWORKS[@]}";do - # name mapping for subgraphs created before introducing canonical names - declare -A LEGACY_NETWORK_NAMES=( - ["xdai-mainnet"]="xdai" - ["polygon-mainnet"]="matic" - ["eth-goerli"]="goerli" - ["polygon-mumbai"]="mumbai" - ) - - GRAPH_NETWORK="${LEGACY_NETWORK_NAMES[$i]:-$i}" - - SUBGRAPH_ENDPOINT=https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-$SUBGRAPH_RELEASE_TAG-$GRAPH_NETWORK + SUBGRAPH_ENDPOINT="https://subgraph-endpoints.superfluid.dev/$i/protocol-v1" testSchemaAndQueries - done diff --git a/packages/sdk-core/test/0_framework.test.ts b/packages/sdk-core/test/0_framework.test.ts index 36b96f5860..c218fd03bd 100644 --- a/packages/sdk-core/test/0_framework.test.ts +++ b/packages/sdk-core/test/0_framework.test.ts @@ -27,7 +27,7 @@ makeSuite("Framework Tests", (testEnv: TestEnvironment) => { try { await Framework.create({ // force cast because we know this exists - chainId: networkNameToChainIdMap.get("eth-goerli")!, + chainId: networkNameToChainIdMap.get("polygon-mainnet")!, provider: testEnv.provider, }); } catch (err: any) { @@ -36,7 +36,7 @@ makeSuite("Framework Tests", (testEnv: TestEnvironment) => { "Network Mismatch Error: Your provider network chainId is: " + chainId + " whereas your desired chainId is: " + - networkNameToChainIdMap.get("eth-goerli")! + networkNameToChainIdMap.get("polygon-mainnet")! ); } }); diff --git a/packages/sdk-core/test/1.4_supertoken_nft.test.ts b/packages/sdk-core/test/1.4_supertoken_nft.test.ts deleted file mode 100644 index 8ff3085f3a..0000000000 --- a/packages/sdk-core/test/1.4_supertoken_nft.test.ts +++ /dev/null @@ -1,348 +0,0 @@ -import { expect } from "chai"; - -import { makeSuite, TestEnvironment } from "./TestEnvironment"; -import { getPerSecondFlowRateByMonth } from "../src"; - -const createFlow = async (testEnv: TestEnvironment) => { - const flowRate = getPerSecondFlowRateByMonth("1000"); - await testEnv.wrapperSuperToken - .createFlow({ - sender: testEnv.alice.address, - receiver: testEnv.bob.address, - flowRate, - }) - .exec(testEnv.alice); - - return await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getTokenId({ - superToken: testEnv.wrapperSuperToken.address, - sender: testEnv.alice.address, - receiver: testEnv.bob.address, - providerOrSigner: testEnv.alice, - }); -}; - -makeSuite("SuperToken-NFT Tests", (testEnv: TestEnvironment) => { - describe("Revert cases", () => { - it("Should revert when trying to transferFrom", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .transferFrom({ - from: testEnv.alice.address, - to: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_TRANSFER_IS_NOT_ALLOWED" - ); - }); - - it("Should revert when trying to safeTransferFrom", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .safeTransferFrom({ - from: testEnv.alice.address, - to: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_TRANSFER_IS_NOT_ALLOWED" - ); - }); - - it("Should revert when trying to safeTransferFromWithData", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .safeTransferFromWithData({ - from: testEnv.alice.address, - to: testEnv.bob.address, - tokenId, - data: "0x", - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_TRANSFER_IS_NOT_ALLOWED" - ); - }); - - it("Should revert if ownerOf token does not exist", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.ownerOf( - { - tokenId: "69", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain("CFA_NFT_INVALID_TOKEN_ID"); - } - }); - - it("Should revert if approve to owner", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .approve({ - approved: testEnv.alice.address, - tokenId, - }) - .exec(testEnv.alice) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_APPROVE_TO_CURRENT_OWNER" - ); - }); - - it("Should revert if approve on behalf of someone else", async () => { - const tokenId = await createFlow(testEnv); - - await expect( - testEnv.wrapperSuperToken.constantOutflowNFTProxy - .approve({ - approved: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.bob) - ).to.be.revertedWithCustomError( - testEnv.wrapperSuperToken.constantOutflowNFTProxy.contract, - "CFA_NFT_APPROVE_CALLER_NOT_OWNER_OR_APPROVED_FOR_ALL" - ); - }); - - it("Should catch error in balanceOf", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.balanceOf( - { - owner: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting balanceOf" - ); - } - }); - - it("Should catch error in getApproved", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getApproved( - { - tokenId: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting getApproved" - ); - } - }); - - it("Should catch error in isApprovedForAll", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.isApprovedForAll( - { - owner: "0x", - operator: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting isApprovedForAll" - ); - } - }); - - it("Should catch error in name", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.name({ - providerOrSigner: testEnv.alice, - }); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting name" - ); - } - }); - - it("Should catch error in symbol", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.symbol({ - providerOrSigner: testEnv.alice, - }); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting symbol" - ); - } - }); - - it("Should catch error in tokenURI", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.tokenURI( - { - tokenId: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting tokenURI" - ); - } - }); - - it("Should catch error in getTokenId", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getTokenId( - { - superToken: testEnv.wrapperSuperToken.address, - sender: testEnv.alice.address, - receiver: testEnv.bob.address, - providerOrSigner: "testEnv.alice" as any, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting token id" - ); - } - }); - - it("Should catch error in flowDataByTokenId", async () => { - try { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.flowDataByTokenId( - { - tokenId: "0x", - providerOrSigner: testEnv.alice, - } - ); - } catch (err: any) { - expect(err.message).to.contain( - "There was an error getting flow data by token id" - ); - } - }); - }); - - describe("Happy Path Tests", () => { - it("Should be able to get flowDataByTokenId", async () => { - const tokenId = await createFlow(testEnv); - - const flowData = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.flowDataByTokenId( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(flowData.flowSender).to.equal(testEnv.alice.address); - expect(flowData.flowReceiver).to.equal(testEnv.bob.address); - }); - - it("Should be able to approve", async () => { - const tokenId = await createFlow(testEnv); - - await testEnv.wrapperSuperToken.constantOutflowNFTProxy - .approve({ - approved: testEnv.bob.address, - tokenId, - }) - .exec(testEnv.alice); - - const approved = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.getApproved( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(approved).to.equal(testEnv.bob.address); - }); - - it("Should be able to setApprovalForAll", async () => { - await testEnv.wrapperSuperToken.constantOutflowNFTProxy - .setApprovalForAll({ - operator: testEnv.bob.address, - approved: true, - }) - .exec(testEnv.alice); - - const approved = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.isApprovedForAll( - { - owner: testEnv.alice.address, - operator: testEnv.bob.address, - providerOrSigner: testEnv.alice, - } - ); - expect(approved).to.equal(true); - }); - - it("Should be able to get ownerOf", async () => { - const tokenId = await createFlow(testEnv); - - const owner = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.ownerOf( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(owner).to.equal(testEnv.alice.address); - }); - - it("Should be able to get balanceOf (always returns 1)", async () => { - const balance = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.balanceOf( - { - owner: testEnv.alice.address, - providerOrSigner: testEnv.alice, - } - ); - expect(balance.toString()).to.equal("1"); - }); - - it("Should be able to get name", async () => { - const name = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.name({ - providerOrSigner: testEnv.alice, - }); - expect(name).to.equal("Constant Outflow NFT"); - }); - - it("Should be able to get tokenURI", async () => { - const tokenId = await createFlow(testEnv); - - const tokenURI = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.tokenURI( - { - tokenId, - providerOrSigner: testEnv.alice, - } - ); - expect(tokenURI).to.not.be.empty; - }); - - it("Should be able to get symbol", async () => { - const symbol = - await testEnv.wrapperSuperToken.constantOutflowNFTProxy.symbol({ - providerOrSigner: testEnv.alice, - }); - expect(symbol.toString()).to.equal("COF"); - }); - }); -}); diff --git a/packages/sdk-redux/CHANGELOG.md b/packages/sdk-redux/CHANGELOG.md index 6ef753e3fb..b35a69bd06 100644 --- a/packages/sdk-redux/CHANGELOG.md +++ b/packages/sdk-redux/CHANGELOG.md @@ -3,9 +3,25 @@ All notable changes to the SDK-redux will be documented in this file. ## [Unreleased] +### Added +### Changed +### Fixed + +## [0.6.1] - 2024-08-01 + +### Changed + +- sdk-core dependency update + +## [0.6.0] - 2023-05-01 + ### Changed -- Node dependency updates. +- Node dependency updates +- Reduce transaction tracking expiration from 10 minutes to 3 minutes + +### Added +- Support for `Pool`, `PoolMember` and `PoolDistributor` queries ## [0.5.1] - 2023-05-17 diff --git a/packages/sdk-redux/package.json b/packages/sdk-redux/package.json index ea67783a39..f43c44071b 100644 --- a/packages/sdk-redux/package.json +++ b/packages/sdk-redux/package.json @@ -1,21 +1,56 @@ { "name": "@superfluid-finance/sdk-redux", - "version": "0.5.1", "description": "SDK Redux for streamlined front-end application development with Superfluid Protocol", + "version": "0.6.1", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "config": { + "commitizen": { + "path": "cz-conventional-changelog" + } + }, + "dependencies": { + "graphql-request": "6.1.0", + "lodash": "4.17.21", + "promise-retry": "2.0.1" + }, + "devDependencies": { + "@reduxjs/toolkit": "^1.9.7", + "@types/promise-retry": "^1.1.6", + "@types/react": "^18", + "@types/react-dom": "^18", + "react": "^18", + "react-dom": "^18", + "react-redux": "^8.1.3" + }, + "directories": { + "test": "test" + }, + "engines": { + "node": ">=12" + }, + "files": [ + "dist/main", + "dist/module", + "CHANGELOG.md", + "LICENSE", + "README.md" + ], "homepage": "https://docs.superfluid.finance/", + "keywords": [], + "license": "MIT", + "main": "dist/main/index.js", + "module": "dist/module/index.js", + "peerDependencies": { + "@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0", + "@superfluid-finance/sdk-core": ">0.7.0" + }, "repository": { "type": "git", "url": "https://github.com/superfluid-finance/protocol-monorepo.git", "directory": "packages/sdk-redux" }, - "license": "MIT", - "main": "dist/main/index.js", - "typings": "dist/module/index.d.ts", - "module": "dist/module/index.js", - "keywords": [], "scripts": { - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s lint:*;else true;fi", - "build": "rm -rf dist && run-p build:*", + "build": "rm -rf dist && run-p -l build:*", "build:main": "tsc -p tsconfig.json", "build:module": "tsc -p tsconfig.module.json", "lint": "run-s lint:*", @@ -33,43 +68,5 @@ "sideEffects": [ "./src/sdkReduxConfig.ts" ], - "engines": { - "node": ">=12" - }, - "dependencies": { - "graphql-request": "^5.2.0", - "lodash": "^4.17.21", - "promise-retry": "^2.0.1" - }, - "devDependencies": { - "@reduxjs/toolkit": "^1.9.5", - "@types/promise-retry": "^1.1.3", - "@types/react": "^18", - "@types/react-dom": "^18", - "react": "^18", - "react-dom": "^18", - "react-redux": "^8.1.2" - }, - "peerDependencies": { - "@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0", - "@superfluid-finance/sdk-core": "^0.6.9" - }, - "files": [ - "dist/main", - "dist/module", - "CHANGELOG.md", - "LICENSE", - "README.md" - ], - "config": { - "commitizen": { - "path": "cz-conventional-changelog" - } - }, - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "directories": { - "test": "test" - } + "typings": "dist/module/index.d.ts" } diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts index dabc837607..b6bfcd6406 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/cacheTags/invalidateSpecificCacheTagsForEvents.ts @@ -153,8 +153,9 @@ const getEventSpecificTags = (event: AllEvents, chainId: number) => { return []; default: console.warn( - `Unknown event [${(event as any) - ?.name}] in "invalidateCacheTagsForEvents" for @superfluid-finance/sdk-redux. Cache might not be invalidated properly.` + `Unknown event [${ + (event as any)?.name + }] in "invalidateCacheTagsForEvents" for @superfluid-finance/sdk-redux. Cache might not be invalidated properly.` ); return []; } diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts index 3aeddb1ce3..b351e97114 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityArgs.ts @@ -5,6 +5,9 @@ import { FlowOperatorListQuery, IndexListQuery, IndexSubscriptionsListQuery, + PoolDistributorsListQuery, + PoolListQuery, + PoolMembersListQuery, StreamListQuery, StreamPeriodListQuery, SubgraphGetQuery, @@ -100,3 +103,27 @@ export interface FlowOperatorQuery extends SubgraphGetQuery { export interface FlowOperatorsQuery extends FlowOperatorListQuery { chainId: number; } + +export interface PoolQuery extends SubgraphGetQuery { + chainId: number; +} + +export interface PoolsQuery extends PoolListQuery { + chainId: number; +} + +export interface PoolMemberQuery extends SubgraphGetQuery { + chainId: number; +} + +export interface PoolMembersQuery extends PoolMembersListQuery { + chainId: number; +} + +export interface PoolDistributorQuery extends SubgraphGetQuery { + chainId: number; +} + +export interface PoolDistributorsQuery extends PoolDistributorsListQuery { + chainId: number; +} diff --git a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts index d5785d2452..666a254e84 100644 --- a/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts +++ b/packages/sdk-redux/src/reduxSlices/rtkQuery/subgraphApiSlice/endpoints/entityEndpoints.ts @@ -13,6 +13,12 @@ import { IndexSubscription, IndexSubscriptionQueryHandler, PagedResult, + Pool, + PoolDistributor, + PoolDistributorQueryHandler, + PoolMember, + PoolMemberQueryHandler, + PoolQueryHandler, RelevantAddressProviderFromFilter, RelevantAddressProviderFromResult, Stream, @@ -50,6 +56,12 @@ import { IndexQuery, IndexSubscriptionQuery, IndexSubscriptionsQuery, + PoolDistributorQuery, + PoolDistributorsQuery, + PoolMemberQuery, + PoolMembersQuery, + PoolQuery, + PoolsQuery, StreamPeriodQuery, StreamPeriodsQuery, StreamQuery, @@ -88,6 +100,12 @@ export const createEntityEndpoints = (builder: SubgraphEndpointBuilder) => { tokenStatisticLogs: list(builder, new TokenStatisticLogQueryHandler()), flowOperator: get(builder, new FlowOperatorQueryHandler()), flowOperators: list(builder, new FlowOperatorQueryHandler()), + pool: get(builder, new PoolQueryHandler()), + pools: list(builder, new PoolQueryHandler()), + poolMember: get(builder, new PoolMemberQueryHandler()), + poolMembers: list(builder, new PoolMemberQueryHandler()), + poolDistributor: get(builder, new PoolDistributorQueryHandler()), + poolDistributors: list(builder, new PoolDistributorQueryHandler()), }; }; diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts index e931659aac..e30d8b4c2a 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/thunks/trackPendingTransactionThunk.ts @@ -40,7 +40,7 @@ export const trackPendingTransactionThunk = createAsyncThunk< const framework = await getFramework(chainId); const waitForOneConfirmation = wait ? () => wait(1) - : () => framework.settings.provider.waitForTransaction(transactionHash, 1, MillisecondTimes.TenMinutes); + : () => framework.settings.provider.waitForTransaction(transactionHash, 1, MillisecondTimes.ThreeMinutes); await waitForOneConfirmation() .then(async (transactionReceipt: ethers.providers.TransactionReceipt) => { diff --git a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts index 283e736a50..a4d9905d80 100644 --- a/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts +++ b/packages/sdk-redux/src/reduxSlices/transactionTrackerSlice/trySerializeTransaction.ts @@ -1,17 +1,34 @@ import {SignatureLike} from '@ethersproject/bytes'; -import {ethers, UnsignedTransaction} from 'ethers'; +import {ethers, Transaction} from 'ethers'; /** * The use-case arose from Gnosis Safe transaction serialization failing. */ export const trySerializeTransaction = ( - transaction: UnsignedTransaction, + transaction: Partial, signature?: SignatureLike ): string | undefined => { try { return ethers.utils.serializeTransaction(transaction, signature); } catch (error) { // This tends to happen with Gnosis Safe which changes the transaction response structure. + + if (transaction.hash) { + // Check if the transaction hash contains a prefix (e.g. chainId) followed by colon + const parts = transaction.hash.split(':'); + if (parts.length === 2) { + // Remove the prefix and set the plain transaction hash + transaction.hash = parts[1]; + // Second attempt to serialize the transaction with the correct (?) hash + try { + return ethers.utils.serializeTransaction(transaction, signature); + } catch { + // Log the first error instead + console.warn(error); + } + } + } + console.warn(error); } return undefined; diff --git a/packages/solidity-semantic-money/.solhint.json b/packages/solidity-semantic-money/.solhint.json index 8011799317..f4923a5b6f 100644 --- a/packages/solidity-semantic-money/.solhint.json +++ b/packages/solidity-semantic-money/.solhint.json @@ -5,9 +5,9 @@ "func-named-parameters": "off", "func-name-mixedcase": "off", "const-name-snakecase": "off", + "gas-custom-errors": "off", "func-param-name-mixedcase": "error", "modifier-name-mixedcase": "error", - "custom-errors": "off", "one-contract-per-file": "off", "immutable-vars-naming": ["off", { "immutablesAsConstants" : false }], "explicit-types": ["off"], diff --git a/packages/solidity-semantic-money/Makefile b/packages/solidity-semantic-money/Makefile index 17c98062bb..e4fb1b01a5 100644 --- a/packages/solidity-semantic-money/Makefile +++ b/packages/solidity-semantic-money/Makefile @@ -4,7 +4,7 @@ CERTORA_OPTS = \ --packages @openzeppelin=../../node_modules/@openzeppelin @superfluid-finance/solidity-semantic-money/src=src \ --optimistic_loop \ --loop_iter 3 \ - --solc solc-0.8.19 + --solc solc-0.8.23 FORGE_TEST = FOUNDRY_PROFILE=test forge test # Other CERTORA_OPTS fragments: diff --git a/packages/solidity-semantic-money/default.nix b/packages/solidity-semantic-money/default.nix new file mode 100644 index 0000000000..a71e97068a --- /dev/null +++ b/packages/solidity-semantic-money/default.nix @@ -0,0 +1,14 @@ +{ + halfBoardModule = { + dependencies = [ ../.. ]; + outputs = [ "out" ]; + includedFiles = [ + ./package.json + ./foundry.toml + ./src + ./test + ./.solhint.json + ./Makefile + ]; + }; +} diff --git a/packages/solidity-semantic-money/foundry.toml b/packages/solidity-semantic-money/foundry.toml index 8b66955805..1dd24e4df7 100644 --- a/packages/solidity-semantic-money/foundry.toml +++ b/packages/solidity-semantic-money/foundry.toml @@ -3,8 +3,9 @@ root = '../..' src = 'packages/solidity-semantic-money/src' out = 'packages/solidity-semantic-money/out/default' cache_path = 'packages/solidity-semantic-money/out/default.cache' -solc_version = '0.8.19' +solc_version = '0.8.26' evm_version = 'paris' # no PUSH0 for now +deny_warnings = true via_ir = false remappings = [ '@superfluid-finance/solidity-semantic-money/src/=packages/solidity-semantic-money/src/', diff --git a/packages/solidity-semantic-money/package.json b/packages/solidity-semantic-money/package.json index cefd339c33..a83fa185dd 100644 --- a/packages/solidity-semantic-money/package.json +++ b/packages/solidity-semantic-money/package.json @@ -1,37 +1,34 @@ { - "name": "@superfluid-finance/solidity-semantic-money", - "version": "0.1.0", - "description": "Semantic money implementation in solidity.", - "main": "index.js", - "directories": { - "src": "src", - "test": "test" - }, - "scripts": { - "test": "make test-all", - "lint": "run-s lint:*", - "lint:sol": "solhint -w 0 `find src test -name *.sol` && echo '✔ Your .sol files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", - "check-updates": "ncu --target minor" - }, - "dependencies": { - "@openzeppelin/contracts": "4.9.3" - }, - "repository": { - "type": "git", - "url": "https://github.com/superfluid-finance/protocol-monorepo.git", - "directory": "packages/solidity-semantic-money" - }, - "keywords": [ - "money", - "finance", - "semantic money", - "solidity" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/superfluid-finance/protocol-monorepo/issues" - }, - "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme" + "name": "@superfluid-finance/solidity-semantic-money", + "description": "Semantic money implementation in solidity.", + "version": "0.1.0", + "bugs": "https://github.com/superfluid-finance/protocol-monorepo/issues", + "dependencies": { + "@openzeppelin/contracts": "4.9.6" + }, + "directories": { + "src": "src", + "test": "test" + }, + "homepage": "https://github.com/superfluid-finance/protocol-monorepo#readme", + "keywords": [ + "money", + "finance", + "semantic money", + "solidity" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "https://github.com/superfluid-finance/protocol-monorepo.git", + "directory": "packages/solidity-semantic-money" + }, + "scripts": { + "build": "make build-all", + "test": "make test-all", + "lint": "run-s lint:*", + "lint:sol": "solhint -w 0 `find src test -name *.sol` && echo '✔ Your .sol files look good.'", + "check-updates": "ncu --target minor" + } } diff --git a/packages/solidity-semantic-money/src/SemanticMoney.sol b/packages/solidity-semantic-money/src/SemanticMoney.sol index d0188cf662..63d390a272 100644 --- a/packages/solidity-semantic-money/src/SemanticMoney.sol +++ b/packages/solidity-semantic-money/src/SemanticMoney.sol @@ -68,42 +68,67 @@ pragma solidity ^0.8.19; */ type Time is uint32; function mt_t_eq(Time a, Time b) pure returns (bool) { return Time.unwrap(a) == Time.unwrap(b); } +function mt_t_neq(Time a, Time b) pure returns (bool) { return Time.unwrap(a) != Time.unwrap(b); } +function mt_t_le(Time a, Time b) pure returns (bool) { return Time.unwrap(a) < Time.unwrap(b); } +function mt_t_lte(Time a, Time b) pure returns (bool) { return Time.unwrap(a) <= Time.unwrap(b); } +function mt_t_gt(Time a, Time b) pure returns (bool) { return Time.unwrap(a) > Time.unwrap(b); } +function mt_t_gte(Time a, Time b) pure returns (bool) { return Time.unwrap(a) >= Time.unwrap(b); } function mt_t_add_t(Time a, Time b) pure returns (Time) { return Time.wrap(Time.unwrap(a) + Time.unwrap(b)); } function mt_t_sub_t(Time a, Time b) pure returns (Time) { return Time.wrap(Time.unwrap(a) - Time.unwrap(b)); } -using { mt_t_eq as ==, mt_t_add_t as +, mt_t_sub_t as - } for Time global; +using { mt_t_eq as ==, mt_t_neq as !=, mt_t_le as <, mt_t_lte as <=, mt_t_gt as >, mt_t_gte as >=, + mt_t_add_t as +, mt_t_sub_t as - } for Time global; /** * @title Unit value of monetary value represented with 256bits of signed integer. */ type Value is int256; function mt_v_eq(Value a, Value b) pure returns (bool) { return Value.unwrap(a) == Value.unwrap(b); } +function mt_v_neq(Value a, Value b) pure returns (bool) { return Value.unwrap(a) != Value.unwrap(b); } +function mt_v_le(Value a, Value b) pure returns (bool) { return Value.unwrap(a) < Value.unwrap(b); } +function mt_v_lte(Value a, Value b) pure returns (bool) { return Value.unwrap(a) <= Value.unwrap(b); } +function mt_v_gt(Value a, Value b) pure returns (bool) { return Value.unwrap(a) > Value.unwrap(b); } +function mt_v_gte(Value a, Value b) pure returns (bool) { return Value.unwrap(a) >= Value.unwrap(b); } function mt_v_add_v(Value a, Value b) pure returns (Value) { return Value.wrap(Value.unwrap(a) + Value.unwrap(b)); } function mt_v_sub_v(Value a, Value b) pure returns (Value) { return Value.wrap(Value.unwrap(a) - Value.unwrap(b)); } function mt_v_inv(Value a) pure returns (Value) { return Value.wrap(-Value.unwrap(a)); } -using { mt_v_eq as ==, mt_v_add_v as +, mt_v_sub_v as -, mt_v_inv as - } for Value global; +using { mt_v_eq as ==, mt_v_neq as !=, mt_v_le as <, mt_v_lte as <=, mt_v_gt as >, mt_v_gte as >=, + mt_v_add_v as +, mt_v_sub_v as -, mt_v_inv as - } for Value global; /** * @title Number of units represented with half the size of `Value`. */ type Unit is int128; function mt_u_eq(Unit a, Unit b) pure returns (bool) { return Unit.unwrap(a) == Unit.unwrap(b); } +function mt_u_neq(Unit a, Unit b) pure returns (bool) { return Unit.unwrap(a) != Unit.unwrap(b); } +function mt_u_le(Unit a, Unit b) pure returns (bool) { return Unit.unwrap(a) < Unit.unwrap(b); } +function mt_u_lte(Unit a, Unit b) pure returns (bool) { return Unit.unwrap(a) <= Unit.unwrap(b); } +function mt_u_gt(Unit a, Unit b) pure returns (bool) { return Unit.unwrap(a) > Unit.unwrap(b); } +function mt_u_gte(Unit a, Unit b) pure returns (bool) { return Unit.unwrap(a) >= Unit.unwrap(b); } function mt_u_add_u(Unit a, Unit b) pure returns (Unit) { return Unit.wrap(Unit.unwrap(a) + Unit.unwrap(b)); } function mt_u_sub_u(Unit a, Unit b) pure returns (Unit) { return Unit.wrap(Unit.unwrap(a) - Unit.unwrap(b)); } function mt_u_inv(Unit a) pure returns (Unit) { return Unit.wrap(-Unit.unwrap(a)); } -using { mt_u_eq as ==, mt_u_add_u as +, mt_u_sub_u as -, mt_u_inv as - } for Unit global; +using { mt_u_eq as ==, mt_u_neq as !=, mt_u_le as <, mt_u_lte as <=, mt_u_gt as >, mt_u_gte as >=, + mt_u_add_u as +, mt_u_sub_u as -, mt_u_inv as - } for Unit global; /** * @title FlowRate value represented with half the size of `Value`. */ type FlowRate is int128; function mt_r_eq(FlowRate a, FlowRate b) pure returns (bool) { return FlowRate.unwrap(a) == FlowRate.unwrap(b); } +function mt_r_neq(FlowRate a, FlowRate b) pure returns (bool) { return FlowRate.unwrap(a) != FlowRate.unwrap(b); } +function mt_r_le(FlowRate a, FlowRate b) pure returns (bool) { return FlowRate.unwrap(a) < FlowRate.unwrap(b); } +function mt_r_lte(FlowRate a, FlowRate b) pure returns (bool) { return FlowRate.unwrap(a) <= FlowRate.unwrap(b); } +function mt_r_gt(FlowRate a, FlowRate b) pure returns (bool) { return FlowRate.unwrap(a) > FlowRate.unwrap(b); } +function mt_r_gte(FlowRate a, FlowRate b) pure returns (bool) { return FlowRate.unwrap(a) >= FlowRate.unwrap(b); } function mt_r_add_r(FlowRate a, FlowRate b) pure returns (FlowRate) { return FlowRate.wrap(FlowRate.unwrap(a) + FlowRate.unwrap(b)); } function mt_r_sub_r(FlowRate a, FlowRate b) pure returns (FlowRate) { return FlowRate.wrap(FlowRate.unwrap(a) - FlowRate.unwrap(b)); } -using { mt_r_eq as ==, mt_r_add_r as +, mt_r_sub_r as - } for FlowRate global; +function mt_r_inv(FlowRate a) pure returns (FlowRate) { return FlowRate.wrap(-FlowRate.unwrap(a)); } +using { mt_r_eq as ==, mt_r_neq as !=, mt_r_le as <, mt_r_lte as <=, mt_r_gt as >, mt_r_gte as >=, + mt_r_add_r as +, mt_r_sub_r as -, mt_r_inv as - } for FlowRate global; /** * @dev Additional helper functions for the monetary types @@ -113,22 +138,34 @@ using { mt_r_eq as ==, mt_r_add_r as +, mt_r_sub_r as - } for FlowRate global; * Read more at: https://github.com/ethereum/solidity/issues/11969#issuecomment-1448445474 */ library AdditionalMonetaryTypeHelpers { - function inv(Value x) internal pure returns (Value) { - return Value.wrap(-Value.unwrap(x)); + // Additional Time operators + // + function quotrem(Time a, Time b) internal pure returns (uint256 quot, uint256 rem) { + quot = Time.unwrap(a) / Time.unwrap(b); + rem = Time.unwrap(a) - quot * Time.unwrap(b); + } + + // Additional Value operators + // + function quotrem(Value a, Value b) internal pure returns (int256 quot, int256 rem) { + quot = Value.unwrap(a) / Value.unwrap(b); + rem = Value.unwrap(a) - quot * Value.unwrap(b); } function mul(Value a, Unit b) internal pure returns (Value) { - return Value.wrap(Value.unwrap(a) * int256(Unit.unwrap(b))); + return Value.wrap(Value.unwrap(a) * Unit.unwrap(b)); } function div(Value a, Unit b) internal pure returns (Value) { - return Value.wrap(Value.unwrap(a) / int256(Unit.unwrap(b))); + return Value.wrap(Value.unwrap(a) / Unit.unwrap(b)); } - function inv(FlowRate r) internal pure returns (FlowRate) { - return FlowRate.wrap(-FlowRate.unwrap(r)); + // Additional FlowRate operators + // + function quotrem(FlowRate a, FlowRate b) internal pure returns (int256 quot, int256 rem) { + quot = FlowRate.unwrap(a) / FlowRate.unwrap(b); + rem = FlowRate.unwrap(a) - quot * FlowRate.unwrap(b); } - function mul(FlowRate r, Time t) internal pure returns (Value) { - return Value.wrap(int256(FlowRate.unwrap(r)) * int256(uint256(Time.unwrap(t)))); + return Value.wrap(FlowRate.unwrap(r) * int256(uint256(Time.unwrap(t)))); } function mul(FlowRate r, Unit u) internal pure returns (FlowRate) { return FlowRate.wrap(FlowRate.unwrap(r) * Unit.unwrap(u)); @@ -144,6 +181,13 @@ library AdditionalMonetaryTypeHelpers { function mul_quotrem(FlowRate r, Unit u1, Unit u2) internal pure returns (FlowRate nr, FlowRate er) { return r.mul(u1).quotrem(u2); } + + // Additional Unit operators + // + function quotrem(Unit a, Unit b) internal pure returns (int256 quot, int256 rem) { + quot = Unit.unwrap(a) / Unit.unwrap(b); + rem = Unit.unwrap(a) - quot * Unit.unwrap(b); + } } using AdditionalMonetaryTypeHelpers for Time global; using AdditionalMonetaryTypeHelpers for Value global; @@ -404,14 +448,14 @@ library SemanticMoney { function shift2(BasicParticle memory a, BasicParticle memory b, Value x) internal pure returns (BasicParticle memory m, BasicParticle memory n) { - m = a.shift1(x.inv()); + m = a.shift1(-x); n = b.shift1(x); } function flow2(BasicParticle memory a, BasicParticle memory b, FlowRate r, Time t) internal pure returns (BasicParticle memory m, BasicParticle memory n) { - m = a.settle(t).flow1(r.inv()); + m = a.settle(t).flow1(-r); n = b.settle(t).flow1(r); } @@ -422,7 +466,7 @@ library SemanticMoney { BasicParticle memory a1; BasicParticle memory a2; FlowRate r = b.flow_rate(); - (a1, ) = mempty.flow2(b, r.inv(), t); + (a1, ) = mempty.flow2(b, -r, t); (a2, n) = mempty.flow2(b, r + dr, t); m = a.mappend(a1).mappend(a2); } @@ -435,9 +479,9 @@ library SemanticMoney { BasicParticle memory mempty; BasicParticle memory b1; BasicParticle memory b2; - FlowRate r = b.flow_rate(); + FlowRate r = a.flow_rate(); ( , b1) = a.flow2(mempty, r, t); - (m, b2) = a.flow2(mempty, r.inv() + dr, t); + (m, b2) = a.flow2(mempty, -r + dr, t); n = b.mappend(b1).mappend(b2); } @@ -445,14 +489,14 @@ library SemanticMoney { returns (BasicParticle memory m, PDPoolIndex memory n, Value x1) { (n, x1) = b.shift1(x); - m = a.shift1(x1.inv()); + m = a.shift1(-x1); } function flow2(BasicParticle memory a, PDPoolIndex memory b, FlowRate r, Time t) internal pure returns (BasicParticle memory m, PDPoolIndex memory n, FlowRate r1) { (n, r1) = b.settle(t).flow1(r); - m = a.settle(t).flow1(r1.inv()); + m = a.settle(t).flow1(-r1); } function shift_flow2b(BasicParticle memory a, PDPoolIndex memory b, FlowRate dr, Time t) internal pure @@ -462,7 +506,7 @@ library SemanticMoney { BasicParticle memory a1; BasicParticle memory a2; FlowRate r = b.flow_rate(); - (a1, , ) = mempty.flow2(b, r.inv(), t); + (a1, , ) = mempty.flow2(b, -r, t); (a2, n, r1) = mempty.flow2(b, r + dr, t); m = a.mappend(a1).mappend(a2); } diff --git a/packages/solidity-semantic-money/src/TokenEff.sol b/packages/solidity-semantic-money/src/TokenEff.sol index fd62f4f7e7..755e5eda80 100644 --- a/packages/solidity-semantic-money/src/TokenEff.sol +++ b/packages/solidity-semantic-money/src/TokenEff.sol @@ -91,7 +91,7 @@ library TokenEffLib { FlowRate flowRateDelta = flowRate - eff.getFlowRate(flowHash); BasicParticle memory a = eff.getUIndex(from); BasicParticle memory b = eff.getUIndex(to); - (a, b) = a.shift_flow2a(b, flowRateDelta, t); + (a, b) = a.shift_flow2b(b, flowRateDelta, t); return eff.setUIndex(from, a) .setUIndex(to, b) .setFlowInfo(eff, flowHash, from, to, flowRate); diff --git a/packages/solidity-semantic-money/src/TokenMonad.sol b/packages/solidity-semantic-money/src/TokenMonad.sol index 9b33f08234..a14a09046f 100644 --- a/packages/solidity-semantic-money/src/TokenMonad.sol +++ b/packages/solidity-semantic-money/src/TokenMonad.sol @@ -122,7 +122,7 @@ abstract contract TokenMonad { vars.newAdjustmentFlowRate = FlowRate.wrap(0); } else { // previous adjustment flow still needed - vars.newAdjustmentFlowRate = newActualFlowRate.inv(); + vars.newAdjustmentFlowRate = -newActualFlowRate; newActualFlowRate = FlowRate.wrap(0); } diff --git a/packages/solidity-semantic-money/src/examples/Aqueduct.sol b/packages/solidity-semantic-money/src/examples/Aqueduct.sol index 191b1fdba4..794b81bc09 100644 --- a/packages/solidity-semantic-money/src/examples/Aqueduct.sol +++ b/packages/solidity-semantic-money/src/examples/Aqueduct.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { diff --git a/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol b/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol index 3fc204bd40..074eb05147 100644 --- a/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol +++ b/packages/solidity-semantic-money/src/ref-impl/ToySuperToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time diff --git a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol index fc82343ee0..ab23129214 100644 --- a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol +++ b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidPool.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time diff --git a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol index 6c7e599485..5c999ae717 100644 --- a/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol +++ b/packages/solidity-semantic-money/src/ref-impl/ToySuperfluidToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time diff --git a/packages/solidity-semantic-money/test/SemanticMoney.t.sol b/packages/solidity-semantic-money/test/SemanticMoney.t.sol index 03957bce8b..267a5e3970 100644 --- a/packages/solidity-semantic-money/test/SemanticMoney.t.sol +++ b/packages/solidity-semantic-money/test/SemanticMoney.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { Test } from "forge-std/Test.sol"; import { @@ -16,19 +16,19 @@ contract SemanticMoneyTest is Test { p._flow_rate = FlowRate.wrap(FlowRate.unwrap(p._flow_rate) >> 2); } - function assertEq(FlowRate a, FlowRate b, string memory e) internal { + function assertEq(FlowRate a, FlowRate b, string memory e) internal pure { assertEq(FlowRate.unwrap(a), FlowRate.unwrap(b), e); } - function assertEq(Unit a, Unit b, string memory e) internal { + function assertEq(Unit a, Unit b, string memory e) internal pure { assertEq(Unit.unwrap(a), Unit.unwrap(b), e); } - function assertEq(Value a, Value b, string memory e) internal { + function assertEq(Value a, Value b, string memory e) internal pure { assertEq(Value.unwrap(a), Value.unwrap(b), e); } - function assertEq(Time a, Time b, string memory e) internal { + function assertEq(Time a, Time b, string memory e) internal pure { assertEq(Time.unwrap(a), Time.unwrap(b), e); } - function assertEq(BasicParticle memory a, BasicParticle memory b, string memory e) internal { + function assertEq(BasicParticle memory a, BasicParticle memory b, string memory e) internal pure { assertEq(a._settled_at, b._settled_at, e); assertEq(a._settled_value, b._settled_value, e); assertEq(a._flow_rate, b._flow_rate, e); @@ -39,7 +39,7 @@ contract SemanticMoneyTest is Test { //////////////////////////////////////////////////////////////////////////////// /// value `mul` unit distributive law: v * (u1 + u2) = v * u1 + v * u2 - function test_value_mul_unit_distributive_law(int128 x_, Unit u1, Unit u2) external { + function test_value_mul_unit_distributive_law(int128 x_, Unit u1, Unit u2) external pure { Value x = Value.wrap(x_); int256 tu = int256(Unit.unwrap(u1)) + int256(Unit.unwrap(u2)); // FIXME NB! vm.assume crashes solc/yul 0.8.19 @@ -48,14 +48,14 @@ contract SemanticMoneyTest is Test { } /// Value `mul.div` unit is a fixed-point function - function test_value_muldiv_unit_fixed(int128 x_, Unit u) external { + function test_value_muldiv_unit_fixed(int128 x_, Unit u) external pure { if (Unit.unwrap(u) == 0) return; Value x = Value.wrap(x_); assertEq(x.div(u).mul(u), x.div(u).mul(u).div(u).mul(u), "e1"); } /// flowrate `mul` unit distributive law: r * (u1 + u2) = r * u1 + r * u2 - function test_flowrate_mul_unit_distributive_law(int64 r_, int64 u1_, int64 u2_) external { + function test_flowrate_mul_unit_distributive_law(int64 r_, int64 u1_, int64 u2_) external pure { // eliminate the signed integer overflow case if (int256(r_) * (int256(u1_) + int256(u2_)) > type(int128).max || int256(r_) * (int256(u1_) + int256(u2_)) < type(int128).min) return; @@ -66,7 +66,7 @@ contract SemanticMoneyTest is Test { } /// FlowRate `mul.div` unit is a fixed-point function - function test_flowrate_muldiv_unit_fixed(int64 r_, int64 u_) external { + function test_flowrate_muldiv_unit_fixed(int64 r_, int64 u_) external pure { if (u_ == 0) return; FlowRate r = FlowRate.wrap(r_); Unit u = Unit.wrap(u_); @@ -74,7 +74,7 @@ contract SemanticMoneyTest is Test { } /// flowrate and unit quotien remainder law: (q, e) = r \ u => q * u + e = r - function test_flowrate_quotrem_unit(FlowRate r, Unit u) external { + function test_flowrate_quotrem_unit(FlowRate r, Unit u) external pure { // FIXME NB! vm.assume crashes solc/yul 0.8.19 atm, using simpler prunings if (Unit.unwrap(u) == 0) return; // eliminate the div by 0 case if (FlowRate.unwrap(r) == type(int128).min) return; // eliminate the signed integer overflow case @@ -82,24 +82,101 @@ contract SemanticMoneyTest is Test { assertEq(q.mul(u) + e, r, "e1"); } + function test_operators() external pure { + assertTrue(Time.wrap(0) == Time.wrap(0)); + assertTrue(Time.wrap(0) != Time.wrap(1)); + assertTrue(Time.wrap(0) < Time.wrap(1)); + assertFalse(Time.wrap(1) < Time.wrap(1)); + assertTrue(Time.wrap(0) <= Time.wrap(1)); + assertTrue(Time.wrap(1) <= Time.wrap(1)); + assertTrue(Time.wrap(1) > Time.wrap(0)); + assertFalse(Time.wrap(1) > Time.wrap(1)); + assertTrue(Time.wrap(1) >= Time.wrap(0)); + assertTrue(Time.wrap(1) >= Time.wrap(1)); + { + (uint256 quot, uint256 rem) = Time.wrap(5).quotrem(Time.wrap(2)); + assertEq(quot, 2); + assertEq(rem, 1); + } + + assertTrue(FlowRate.wrap(0) == FlowRate.wrap(0)); + assertTrue(FlowRate.wrap(0) != FlowRate.wrap(1)); + assertTrue(FlowRate.wrap(0) < FlowRate.wrap(1)); + assertFalse(FlowRate.wrap(1) < FlowRate.wrap(1)); + assertTrue(FlowRate.wrap(0) <= FlowRate.wrap(1)); + assertTrue(FlowRate.wrap(1) <= FlowRate.wrap(1)); + assertTrue(FlowRate.wrap(1) > FlowRate.wrap(0)); + assertFalse(FlowRate.wrap(1) > FlowRate.wrap(1)); + assertTrue(FlowRate.wrap(1) >= FlowRate.wrap(0)); + assertTrue(FlowRate.wrap(1) >= FlowRate.wrap(1)); + { + (int256 quot, int256 rem) = FlowRate.wrap(5).quotrem(FlowRate.wrap(2)); + assertEq(quot, 2); + assertEq(rem, 1); + (quot, rem) = FlowRate.wrap(-5).quotrem(FlowRate.wrap(2)); + assertEq(quot, -2); + assertEq(rem, -1); + (quot, rem) = FlowRate.wrap(5).quotrem(FlowRate.wrap(-2)); + assertEq(quot, -2); + assertEq(rem, 1); + (quot, rem) = FlowRate.wrap(-5).quotrem(FlowRate.wrap(-2)); + assertEq(quot, 2); + assertEq(rem, -1); + } + + assertTrue(Value.wrap(0) == Value.wrap(0)); + assertTrue(Value.wrap(0) != Value.wrap(1)); + assertTrue(Value.wrap(0) < Value.wrap(1)); + assertFalse(Value.wrap(1) < Value.wrap(1)); + assertTrue(Value.wrap(0) <= Value.wrap(1)); + assertTrue(Value.wrap(1) <= Value.wrap(1)); + assertTrue(Value.wrap(1) > Value.wrap(0)); + assertFalse(Value.wrap(1) > Value.wrap(1)); + assertTrue(Value.wrap(1) >= Value.wrap(0)); + assertTrue(Value.wrap(1) >= Value.wrap(1)); + { + (int256 quot, int256 rem) = Value.wrap(5).quotrem(Value.wrap(2)); + assertEq(quot, 2); + assertEq(rem, 1); + } + + assertTrue(Unit.wrap(0) == Unit.wrap(0)); + assertTrue(Unit.wrap(0) != Unit.wrap(1)); + assertTrue(Unit.wrap(0) < Unit.wrap(1)); + assertFalse(Unit.wrap(1) < Unit.wrap(1)); + assertTrue(Unit.wrap(0) <= Unit.wrap(1)); + assertTrue(Unit.wrap(1) <= Unit.wrap(1)); + assertTrue(Unit.wrap(1) > Unit.wrap(0)); + assertFalse(Unit.wrap(1) > Unit.wrap(1)); + assertTrue(Unit.wrap(1) >= Unit.wrap(0)); + assertTrue(Unit.wrap(1) >= Unit.wrap(1)); + { + (int256 quot, int256 rem) = Unit.wrap(5).quotrem(Unit.wrap(2)); + assertEq(quot, 2); + assertEq(rem, 1); + } + } + //////////////////////////////////////////////////////////////////////////////// // Particle/Universal Index Properties: Monoidal Laws & Monetary Unit Laws //////////////////////////////////////////////////////////////////////////////// - function test_u_monoid_identity(BasicParticle memory p1) external { + function test_u_monoid_identity(BasicParticle memory p1) external pure { BasicParticle memory id; assertEq(p1, p1.mappend(id), "e1"); assertEq(p1, id.mappend(p1), "e2"); } - function test_u_monoid_assoc(BasicParticle memory p1, BasicParticle memory p2, BasicParticle memory p3) external { + function test_u_monoid_assoc(BasicParticle memory p1, BasicParticle memory p2, BasicParticle memory p3) + external pure + { limitToSafeParticle(p1); limitToSafeParticle(p2); limitToSafeParticle(p3); assertEq(p1.mappend(p2).mappend(p3), p1.mappend(p2.mappend(p3)), "e2"); } - function test_u_settle_idempotence(BasicParticle memory p, uint16 m) external { + function test_u_settle_idempotence(BasicParticle memory p, uint16 m) external pure { limitToSafeParticle(p); Time t1 = p.settled_at() + Time.wrap(m); @@ -109,7 +186,7 @@ contract SemanticMoneyTest is Test { assertEq(p1, p2, "e2"); } - function test_u_constant_rtb(BasicParticle memory p, uint16 m1, uint16 m2, uint16 m3) external { + function test_u_constant_rtb(BasicParticle memory p, uint16 m1, uint16 m2, uint16 m3) external pure { limitToSafeParticle(p); Time t1 = p.settled_at() + Time.wrap(m1); @@ -145,7 +222,7 @@ contract SemanticMoneyTest is Test { function (BasicParticle memory, BasicParticle memory, Time, int64) internal pure returns (BasicParticle memory, BasicParticle memory) op1, function (BasicParticle memory, BasicParticle memory, Time, int64) - internal pure returns (BasicParticle memory, BasicParticle memory) op2) internal { + internal pure returns (BasicParticle memory, BasicParticle memory) op2) internal pure { UUTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -155,19 +232,19 @@ contract SemanticMoneyTest is Test { (d.a, d.b) = op2(d.a, d.b, d.t2, x2); assertEq(0, Value.unwrap(d.a.rtb(d.t3) + d.b.rtb(d.t3))); } - function test_uu_ss(uint16 m1, int64 x1, uint16 m2, int64 x2, uint16 m3) external { + function test_uu_ss(uint16 m1, int64 x1, uint16 m2, int64 x2, uint16 m3) external pure { run_uu_test(m1, x1, m2, x2, m3, uu_shift2, uu_shift2); } - function test_uu_ff(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_ff(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { run_uu_test(m1, r1, m2, r2, m3, uu_flow2, uu_flow2); } - function test_uu_fs(uint16 m1, int64 r1, uint16 m2, int64 x2, uint16 m3) external { + function test_uu_fs(uint16 m1, int64 r1, uint16 m2, int64 x2, uint16 m3) external pure { run_uu_test(m1, r1, m2, x2, m3, uu_flow2, uu_shift2); } - function test_uu_sf(uint16 m1, int64 x1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_sf(uint16 m1, int64 x1, uint16 m2, int64 r2, uint16 m3) external pure { run_uu_test(m1, x1, m2, r2, m3, uu_shift2, uu_flow2); } - function test_uu_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_uu_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { UUTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -176,9 +253,39 @@ contract SemanticMoneyTest is Test { (d.a, d.b) = d.a.flow2(d.b, FlowRate.wrap(r1), d.t1); (d.a, d.b) = d.a.flow2(d.b, FlowRate.wrap(r2), d.t2); + assertEq(Value.unwrap(-d.a.rtb(d.t3)), Value.unwrap(d.b.rtb(d.t3))); assertEq(Value.unwrap(d.b.rtb(d.t3)), int256(r1) * int256(uint256(m2)) + int256(r2) * int256(uint256(m3))); } + function test_uu_shift_flow2b(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { + UUTestVars memory d; + d.t1 = Time.wrap(m1); + d.t2 = d.t1 + Time.wrap(m2); + d.t3 = d.t2 + Time.wrap(m3); + + (d.a, d.b) = d.a.shift_flow2b(d.b, FlowRate.wrap(r1), d.t1); + (d.a, d.b) = d.a.shift_flow2b(d.b, FlowRate.wrap(r2), d.t2); + + assertEq(Value.unwrap(-d.a.rtb(d.t3)), Value.unwrap(d.b.rtb(d.t3))); + assertEq(Value.unwrap(d.b.rtb(d.t3)), + int256(r1) * int256(uint256(m2)) + (int256(r1) + int256(r2)) * int256(uint256(m3))); + } + function test_uu_shift_flow2ab_equiv(int64 r1, uint16 m1, int64 r2, uint16 m2) external pure { + Time t1 = Time.wrap(m1); + Time t2 = Time.wrap(m1) + Time.wrap(m2); + BasicParticle memory a0; + BasicParticle memory b0; + + (BasicParticle memory a1a, BasicParticle memory b1a) = a0.shift_flow2a(b0, FlowRate.wrap(r1), t1); + (BasicParticle memory a1b, BasicParticle memory b1b) = a0.shift_flow2b(b0, FlowRate.wrap(r1), t1); + assertEq(a1a, a1b, "a1"); + assertEq(b1a, b1b, "b1"); + + (BasicParticle memory a2a, BasicParticle memory b2a) = a1a.shift_flow2a(b1a, FlowRate.wrap(r2), t2); + (BasicParticle memory a2b, BasicParticle memory b2b) = a1b.shift_flow2b(b1b, FlowRate.wrap(r2), t2); + assertEq(a2a, a2b, "a2"); + assertEq(b2a, b2b, "b2"); + } // Universal Index to Proportional Distribution Pool function updp_shift2(BasicParticle memory a, PDPoolIndex memory b, Time /* t */, int64 v) @@ -213,7 +320,7 @@ contract SemanticMoneyTest is Test { function (BasicParticle memory, PDPoolIndex memory, Time, int64) internal pure returns (BasicParticle memory, PDPoolIndex memory) op2, // final test time - uint16 m5) internal { + uint16 m5) internal pure { UPDPTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -240,28 +347,28 @@ contract SemanticMoneyTest is Test { uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, x4, updp_shift2, m5); } function test_updp_1m_ff(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_1m_sf(uint16 m1, int64 u1, // update unit uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_1m_fs(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_1m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, x4, updp_shift2, m5); } @@ -278,7 +385,7 @@ contract SemanticMoneyTest is Test { function (BasicParticle memory, PDPoolIndex memory, Time, int64) internal pure returns (BasicParticle memory, PDPoolIndex memory) op2, // final test time - uint16 m5) internal { + uint16 m5) internal pure { UPDPTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); @@ -307,31 +414,31 @@ contract SemanticMoneyTest is Test { uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, x4, updp_shift2, m5); } function test_updp_2m_ff(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_2m_sf(uint16 m1, int64 u1, // update unit uint16 m2, int64 x2, // distribute uint16 m3, int64 u2, // update unit uint16 m4, int64 r4, // distribute flow - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, x2, updp_shift2, m3, u2, m4, r4, updp_flow2, m5); } function test_updp_2m_fs(uint16 m1, int64 u1, // update unit uint16 m2, int64 r2, // distribute flow uint16 m3, int64 u2, // update unit uint16 m4, int64 x4, // distribute - uint16 m5) external { + uint16 m5) external pure { run_updp_2m_test(m1, u1, m2, r2, updp_flow2, m3, u2, m4, x4, updp_shift2, m5); } - function test_updp_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external { + function test_updp_flow2(uint16 m1, int64 r1, uint16 m2, int64 r2, uint16 m3) external pure { UPDPTestVars memory d; d.t1 = Time.wrap(m1); d.t2 = d.t1 + Time.wrap(m2); diff --git a/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol b/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol index e471d2823b..acb77a4a7b 100644 --- a/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol +++ b/packages/solidity-semantic-money/test/examples/Aqueduct.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time @@ -57,7 +57,7 @@ contract AqueductTest is Test { } } - function assertEq(Value a, Value b, string memory e) internal { + function assertEq(Value a, Value b, string memory e) internal pure { assertEq(Value.unwrap(a), Value.unwrap(b), e); } diff --git a/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol b/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol index e6cca5399f..f0060bce85 100644 --- a/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol +++ b/packages/solidity-semantic-money/test/ref-impl/CertoraHarness.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; import { ToySuperfluidPool } from "../../src/ref-impl/ToySuperfluidToken.sol"; diff --git a/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol b/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol index 12b361ce57..28e70aa6b2 100644 --- a/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol +++ b/packages/solidity-semantic-money/test/ref-impl/ToySuperToken.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.19; +pragma solidity ^0.8.23; // solhint-disable not-rely-on-time @@ -62,17 +62,17 @@ contract ToySuperTokenTest is Test { vm.stopPrank(); } - function assertEq(FlowRate a, FlowRate b, string memory e) internal { + function assertEq(FlowRate a, FlowRate b, string memory e) internal pure { assertEq(FlowRate.unwrap(a), FlowRate.unwrap(b), e); } - function assertEq(Unit a, Unit b, string memory e) internal { + function assertEq(Unit a, Unit b, string memory e) internal pure { assertEq(Unit.unwrap(a), Unit.unwrap(b), e); } - function assertEq(Value a, Value b, string memory e) internal { + function assertEq(Value a, Value b, string memory e) internal pure { assertEq(Value.unwrap(a), Value.unwrap(b), e); } function getAdjustmentFlowRate(ToySuperfluidPool pool, address expectedRecipient) - internal returns (FlowRate) + internal view returns (FlowRate) { (address recipient, ,FlowRate r) = token.getPoolAdjustmentFlowInfo(pool); assertEq(recipient, expectedRecipient, "expectedRecipient fail"); @@ -117,7 +117,7 @@ contract ToySuperTokenTest is Test { vm.startPrank(alice); token.flow(alice, bob, FlowId.wrap(0), rr1); vm.stopPrank(); - assertEq(token.getNetFlowRate(alice), rr1.inv(), "e1.1"); + assertEq(token.getNetFlowRate(alice), -rr1, "e1.1"); assertEq(token.getNetFlowRate(bob), rr1, "e1.2"); assertEq(token.getFlowRate(alice, bob, FlowId.wrap(0)), rr1, "e1.3"); @@ -126,7 +126,7 @@ contract ToySuperTokenTest is Test { vm.startPrank(alice); token.flow(alice, bob, FlowId.wrap(0), rr2); vm.stopPrank(); - assertEq(token.getNetFlowRate(alice), rr2.inv(), "e2.1"); + assertEq(token.getNetFlowRate(alice), -rr2, "e2.1"); assertEq(token.getNetFlowRate(bob), rr2, "e2.2"); assertEq(token.getFlowRate(alice, bob, FlowId.wrap(0)), rr2, "e2.3"); @@ -162,7 +162,7 @@ contract ToySuperTokenTest is Test { assertEq(token.getFlowRate(alice, bob, FlowId.wrap(0)), rr1, "e1.1"); assertEq(token.getFlowRate(alice, carol, FlowId.wrap(0)), rr2, "e1.2"); assertEq(token.getFlowRate(bob, carol, FlowId.wrap(0)), FlowRate.wrap(0), "e1.3"); - assertEq(token.getNetFlowRate(alice).inv(), + assertEq(-token.getNetFlowRate(alice), token.getNetFlowRate(bob) + token.getNetFlowRate(carol), "e2"); assertEq(a1 - a2, k2 + (uint256(r1) + uint256(r2)) * uint256(dt1), "e3.1"); assertEq(a1 - a2, k2 + b2 - b1 + c2 - c1, "e3.2"); @@ -197,7 +197,7 @@ contract ToySuperTokenTest is Test { assertEq(token.getFlowRate(bob, carol, FlowId.wrap(0)), rr2, "e1.2"); assertEq(token.getFlowRate(alice, bob, FlowId.wrap(0)), FlowRate.wrap(0), "e1.3"); assertEq(token.getNetFlowRate(alice) + token.getNetFlowRate(bob), - token.getNetFlowRate(carol).inv(), "e2"); + -token.getNetFlowRate(carol), "e2"); assertEq(a1 - a2, k1 + uint256(r1) * uint256(t2), "e3.1"); assertEq(b1 - b2, k2 + uint256(r2) * uint256(t2), "e3.2"); assertEq(a1 - a2 + b1 - b2, k1 + k2 + c2 - c1, "e3.3"); @@ -309,11 +309,11 @@ contract ToySuperTokenTest is Test { emit log_named_int("cnr1", FlowRate.unwrap(cnr1)); assertEq(pdr, pdr1, "e4.1"); - assertEq(anr1, ar.inv() + ajr1, "e4.2"); + assertEq(anr1, -ar + ajr1, "e4.2"); assertEq(pdr, rrr1, "e4.3"); - assertEq(anr1, rrr1.inv() + ajr1, "e4.4"); + assertEq(anr1, -rrr1 + ajr1, "e4.4"); assertEq(bnr1 + cnr1, rrr1, "e4.5"); - assertEq(pnr1, ajr1.inv(), "e4.6"); + assertEq(pnr1, -ajr1, "e4.6"); assertEq(anr1 + bnr1 + cnr1 + pnr1, FlowRate.wrap(0), "e4.7"); } @@ -340,11 +340,11 @@ contract ToySuperTokenTest is Test { emit log_named_int("cnr2", FlowRate.unwrap(cnr2)); assertEq(pdr, pdr2, "e5.1"); - assertEq(ar.inv() + ajr2, anr2, "e5.2"); + assertEq(-ar + ajr2, anr2, "e5.2"); assertEq(pdr, rrr2, "e5.3"); - assertEq(rrr2.inv() + ajr2, anr2, "e5.4"); + assertEq(-rrr2 + ajr2, anr2, "e5.4"); assertEq(bnr2 + cnr2, rrr2, "e5.5"); - assertEq(pnr2, ajr2.inv(), "e5.6"); + assertEq(pnr2, -ajr2, "e5.6"); assertEq(anr2 + bnr2 + cnr2 + pnr2, FlowRate.wrap(0), "e5.7"); } { @@ -424,7 +424,7 @@ contract ToySuperTokenTest is Test { FlowRate pr2 = token.getNetFlowRate(address(pl)); assertEq(pl.getConnectedFlowRate(), rrr, "e4.1"); - assertEq(ar2, rrr.inv(), "e4.2"); + assertEq(ar2, -rrr, "e4.2"); assertEq(br2 + pl.getDisconnectedFlowRate(), rrr, "e4.3"); assertEq(pr2, pl.getDisconnectedFlowRate(), "e4.4"); assertEq(ar2 + br2 + cr2 + pr2, FlowRate.wrap(0), "e4.5"); @@ -505,7 +505,7 @@ contract ToySuperTokenTest is Test { emit log_named_int("pnr4", FlowRate.unwrap(pnr4)); assertEq(pl.getConnectedFlowRate(), rrr, "e3.1"); - assertEq(anr4, rrr.inv(), "e3.2"); + assertEq(anr4, -rrr, "e3.2"); assertEq(bnr4 + pl.getDisconnectedFlowRate(), rrr, "e3.3"); assertEq(pnr4, pl.getDisconnectedFlowRate(), "e3.4"); assertEq(anr4 + bnr4 + pnr4, FlowRate.wrap(0), "e3.5"); @@ -619,8 +619,8 @@ contract ToySuperTokenTest is Test { assertEq(pr2, FlowRate.wrap(0), "e4.5"); assertEq(ar2 + br2 + cr2 + pr2, FlowRate.wrap(0), "e4.6"); assertEq(pdr2, pdr, "e4.7"); - assertEq(ar2.inv(), ar, "e4.8"); - assertEq(br2.inv(), br, "e4.9"); + assertEq(-ar2, ar, "e4.8"); + assertEq(-br2, br, "e4.9"); } { diff --git a/packages/spec-haskell/cabal.project.freeze b/packages/spec-haskell/cabal.project.freeze new file mode 100644 index 0000000000..bc446b87e0 --- /dev/null +++ b/packages/spec-haskell/cabal.project.freeze @@ -0,0 +1,51 @@ +active-repositories: hackage.haskell.org:merge +constraints: any.HUnit ==1.6.2.0, + any.QuickCheck ==2.14.2, + QuickCheck -old-random +templatehaskell, + any.ansi-terminal ==0.11.4, + ansi-terminal -example +win32-2-13-1, + any.array ==0.5.4.0, + any.base ==4.17.2.1, + any.binary ==0.8.9.1, + any.bytestring ==0.11.5.3, + any.call-stack ==0.4.0, + any.colour ==2.3.6, + any.containers ==0.6.7, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.deepseq ==1.4.8.0, + any.directory ==1.3.7.1, + any.dlist ==1.0, + dlist -werror, + any.filepath ==1.4.2.2, + any.ghc-bignum ==1.3, + any.ghc-boot-th ==9.4.8, + any.ghc-prim ==0.9.1, + any.haskell-lexer ==1.1.1, + any.hspec ==2.10.8, + any.hspec-core ==2.10.8, + any.hspec-discover ==2.10.8, + any.hspec-expectations ==0.8.2, + any.math-extras ==0.1.1.0, + any.microlens ==0.4.13.1, + any.mtl ==2.2.2, + any.old-locale ==1.0.0.7, + any.pretty ==1.1.3.6, + any.primitive ==0.7.4.0, + any.process ==1.6.18.0, + any.quickcheck-io ==0.2.0, + any.random ==1.2.1.1, + any.rts ==1.0.2, + any.setenv ==0.1.1.3, + any.splitmix ==0.1.0.4, + splitmix -optimised-mixer, + any.stm ==2.5.1.0, + any.template-haskell ==2.19.0.0, + any.tf-random ==0.5, + any.time ==1.12.2, + any.transformers ==0.5.6.2, + any.unix ==2.7.3 +index-state: hackage.haskell.org 2022-12-31T20:54:02Z diff --git a/packages/spec-haskell/default.nix b/packages/spec-haskell/default.nix new file mode 100644 index 0000000000..1e78d2a40f --- /dev/null +++ b/packages/spec-haskell/default.nix @@ -0,0 +1,17 @@ +{ + halfBoardModule = { + dependencies = [ ]; + outputs = [ + "dist-test" + "dist-docs" + ]; + includedFiles = [ + ../../flake.nix + ../../flake.lock + ./cabal.project + ./cabal.project.freeze + ./Makefile + ./pkgs + ]; + }; +} diff --git a/packages/spec-haskell/pkgs/core/superfluid-protocol-spec-core.cabal b/packages/spec-haskell/pkgs/core/superfluid-protocol-spec-core.cabal index 494888f220..745a9ef259 100644 --- a/packages/spec-haskell/pkgs/core/superfluid-protocol-spec-core.cabal +++ b/packages/spec-haskell/pkgs/core/superfluid-protocol-spec-core.cabal @@ -4,7 +4,7 @@ version: 0.0.1.0 license: MIT maintainer: miao@superfluid.finance author: Miao, ZhiCheng -tested-with: ghc ==9.2.4, ghc ==9.4.5 +tested-with: ghc ==9.2.4, ghc ==9.4.8 homepage: https://www.superfluid.finance/ synopsis: Superfluid protocol core specifications in Haskell. description: diff --git a/packages/spec-haskell/pkgs/semantic-money/semantic-money.cabal b/packages/spec-haskell/pkgs/semantic-money/semantic-money.cabal index 8d3f573ede..b8e545aa45 100644 --- a/packages/spec-haskell/pkgs/semantic-money/semantic-money.cabal +++ b/packages/spec-haskell/pkgs/semantic-money/semantic-money.cabal @@ -4,7 +4,7 @@ version: 0.0.1.0 license: MIT maintainer: miao@superfluid.finance author: Miao, ZhiCheng -tested-with: ghc ==9.2.4, ghc ==9.4.5 +tested-with: ghc ==9.2.4, ghc ==9.4.8 homepage: https://www.superfluid.finance/ synopsis: Semantic money - generalizing payment primitives. description: diff --git a/packages/spec-haskell/pkgs/simple/superfluid-protocol-system-simple.cabal b/packages/spec-haskell/pkgs/simple/superfluid-protocol-system-simple.cabal index 3489adc19f..bc4b627fe3 100644 --- a/packages/spec-haskell/pkgs/simple/superfluid-protocol-system-simple.cabal +++ b/packages/spec-haskell/pkgs/simple/superfluid-protocol-system-simple.cabal @@ -4,7 +4,7 @@ version: 0.0.1.0 license: MIT maintainer: miao@superfluid.finance author: Miao, ZhiCheng -tested-with: ghc ==9.2.4, ghc ==9.4.5 +tested-with: ghc ==9.2.4, ghc ==9.4.8 homepage: https://www.superfluid.finance/ synopsis: Superfluid protocol simple system instances. description: diff --git a/packages/spec-haskell/pkgs/validator/superfluid-protocol-spec-validator.cabal b/packages/spec-haskell/pkgs/validator/superfluid-protocol-spec-validator.cabal index 43cb909ade..2a2b4d3362 100644 --- a/packages/spec-haskell/pkgs/validator/superfluid-protocol-spec-validator.cabal +++ b/packages/spec-haskell/pkgs/validator/superfluid-protocol-spec-validator.cabal @@ -4,7 +4,7 @@ version: 0.0.1.0 license: MIT maintainer: miao@superfluid.finance author: Miao, ZhiCheng -tested-with: ghc ==9.2.4, ghc ==9.4.5 +tested-with: ghc ==9.2.4, ghc ==9.4.8 homepage: https://www.superfluid.finance/ synopsis: Superfluid protocol specifications validator. description: diff --git a/packages/subgraph/.env.example b/packages/subgraph/.env.example index 9171ebc8fe..b2b68d565e 100644 --- a/packages/subgraph/.env.example +++ b/packages/subgraph/.env.example @@ -4,6 +4,4 @@ MATIC_PROVIDER_URL= ARBITRUM_ONE_PROVIDER_URL= AVALANCHE_C_PROVIDER_URL= BSC_MAINNET_PROVIDER_URL= -GOERLI_PROVIDER_URL= -AVAFUJI_PROVIDER_URL= -MUMBAI_PROVIDER_URL= \ No newline at end of file +AVAFUJI_PROVIDER_URL= \ No newline at end of file diff --git a/packages/subgraph/.gitignore b/packages/subgraph/.gitignore index ece682f377..07d42023ea 100644 --- a/packages/subgraph/.gitignore +++ b/packages/subgraph/.gitignore @@ -1,3 +1,4 @@ +/cache/ build/ generated/ abis/ @@ -9,4 +10,6 @@ src/addresses.ts **/*.wasm **/*.latest.json tests/.bin -hosted-service-networks.json \ No newline at end of file +hosted-service-networks.json +config/*.json +!config/mock.json diff --git a/packages/subgraph/CHANGELOG.md b/packages/subgraph/CHANGELOG.md new file mode 100644 index 0000000000..dfaa232bb8 --- /dev/null +++ b/packages/subgraph/CHANGELOG.md @@ -0,0 +1,288 @@ +# Changelog + +All notable changes to the Subgraph will be documented in this file. + +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [2.1.0] + +## Breaking + +- Removed FlowNFT related entities and attributes + +## [2.0.0] + +### Changed +- Enabled history pruning which disables perfect time-travel queries. + +## [1.7.1] - 2024-04-22 + +### Added +- Support for vendor "airstack" + +### Fixes +- Various GDA related fixes + +## [1.7.0] - 2024-02-05 + +### Added +- NFT specific event entities +- GDA event entities +- GDA HOL entities +- New properties on aggregate entities to distinguish between CFA and GDA data where applicable +- `scripts/buildNetworkConfig.ts` added for building network config from metadata in place of hardcoded config json files +- `getHostedServiceNetworks.ts` added for getting the list of networks in place of hardcoded `networks.json`, improves maintenance + adding + +## [1.6.1] - 2023-08-15 + +### Added +- `totalNumberOfAccounts` and `totalNumberOfHolders` added to `TokenStatistic` and `TokenStatisticLog` entities + +## [1.6.0] - 2023-07-13 + +## Changed + +- Deployment bash scripts refactored to explicitly handle subgraphs deployed to hosted service vs. satsuma + +## Added + +- `SuperTokenMinimumDepositChangedEvent` event entity +- `userData` property added to `Stream` HOL entity +- `TokenGovernanceConfig` HOL entity added +- `activeOutgoingStreamCount`, `activeIncomingStreamCount`, `inactiveOutgoingStreamCount` and `inactiveIncomingStreamCount` properties added to `AccountTokenSnapshot` aggregate entity + +### Added + +## [1.5.0] - 2022-12-19 + +## Added + +- TOGA events added +- `gasUsed` property on event entities +- `mostRecentStream` on `StreamRevision` entity +- data integrity tests: validates subgraph data against blockchain data (RPC calls) +- balance validation: validates feature subgraph balance data against v1 subgraph balance data +- Implemented Matchstick Unit tests in favor of slowly deprecating integration tests +- Added support for Satsuma deployment + +## Changed + +- Updated README given all the changes +- Moved over from ganache to hardhat running tests +- Using docker-compose instead of graph-node fork for integration tests +- Updated `schema.graphql` documentation +- Removed hardcoded addresses and utilize new `deploy-test-framework` script +- Simplified `addresses.template.ts` +- Bumped specVersion (0.0.3 => 0.0.5) and apiVersion (0.0.6 => 0.0.7) in manifest file (`subgraph.template.yaml`) and include receipts in eventHandlers +- Removed unnecessary `test-subgraph.template.yaml` duplicate file + +## Fixes + +- Minor mapping fixes + +## [1.4.5] - 2022-07-26 + +## Added + +- Support for `arbitrum-goerli`, `optimism-goerli` added + +## Breaking + +- Support for `kovan`, `arbitrum-rinkeby`, `optimism-kovan` removed + +## [1.4.5] - 2022-07-26 + +### Added + +- isNativeAssetSuperToken property added to Token entity + +## [1.4.4] - 2022-07-12 + +### Added + +- Handle `Set` event from Resolver contract +- New `SetEvent` and `ResolverEntry` entities + +### Fixes + +- Handles unlisting of tokens in resolver + +## [1.4.3] - 2022-06-30 + +### Breaking + +- `totalAmountStreamedUntilUpdatedAt` on `AccountTokenSnapshot` and `totalAmountStreamed` on `AccountTokenSnapshotLog` are no longer calculating the total amount streamed out from an account, but the net amount streamed through an account + - Migration: replace this with `totalAmountStreamedOutUntilUpdatedAt` and `totalAmountStreamedOut`, respectively + +### Added + +- `gasPrice` added to event entities +- `governanceAddress` added to governance related entities +- `totalAmountStreamedInUntilUpdatedAt`, `totalAmountStreamedOutUntilUpdatedAt` added to `AccountTokenSnapshot` +- `totalAmountStreamedIn`, `totalAmountStreamedOut` added to `AccountTokenSnapshotLog` +- `TokenStatisticLog` entity added + +### Fixes + +- GovernanceAddress is no longer hardcoded and subgraph detects new events from newly set governance contracts +- `token` property added to `BurnedEvent`, `MintedEvent` and `SentEvent` + +## [1.4.2] - 2022-06-29 + +### Added + +- BNB Chain support added + +## [1.4.1] - 2022-06-11 + +### Changed + +- `maybeCriticalAtTimestamp` is nullable + +### Fixes + +- Add back deprecated `rewardAccount` field on `AgreementLiquidatedV2Event` entity (use `rewardAmountReceiver`) + +## [1.4.0] - 2022-05-31 + +### Breaking + +- `rewardAccount` renamed to `rewardAmountReceiver` on `AgreementLiquidatedV2Event` entity + +### Fixes + +- Was not properly updating `updatedAtTimestamp` and `updatedAtBlockNumber` +- Wasn't updating `totalAmountStreamedUntilUpdatedAt` for `TokenStats` whenever it was updated for `AccountTokenSnapshot` + +### Changed + +- README updated to remove dead legacy endpoints, new v1/dev endpoints added +- Subgraph tests use hardhat node, config changed in `hardhat.config.ts` + +### Added + +- Script to check if subgraph is deployed on every network +- `logIndex` and `order` properties added to all `Event` entities +- `maybeCriticalAtTimestamp` and `isLiquidationEstimateOptimistic` properties added to `AccountTokenSnapshot` entity +- `AccountTokenSnapshotLog` entity added (created on every update to `AccountTokenSnapshot`) +- Tests added for new properties/entities +- Tests fixed up given subgraph logic + +## [1.3.4] - 2022-05-16 + +### Added + +- Avalanche C-Chain network support + +## [1.3.3] - 2022-05-13 + +### Changed + +- Removed tests as they were not catching the [issue](https://github.com/graphprotocol/graph-node/issues/3553) + +### Fixes + +- Removed (immutable: true) from `FlowOperatorUpdated` entity - No operators should + +## [1.3.2] - 2022-05-11 + +### Changed + +- Zero address `Account` and `AccountTokenSnapshot` entities are not filtered out + +### Fixes + +- Global `events` query fixed: global `events` query was breaking due to the `FlowUpdatedEvent` entity implementing the `Event` interface, but not having the immutable property like the other events +- `AccountTokenSnapshot` query with `account { id }` fixed. Was breaking due to faulty logic of creating an `AccountTokenSnapshot` without creating an `Account` entity +- Tests added to ensure this will be caught + +## [1.3.1] - 2022-05-06 + +### Changed + +- Most event entities are immutable (except FlowUpdated) + +### Added + +- New Access Control List (ACL) entities and properties added + - `FlowOperator` entity + - `flowOperator` property + - `deposit` and `totalDeposit` properties added to entities + +### Fixes + +- Properly handle zero address throughout + +## [1.3.0] - 2022-05-04 + +### Changed + +- Package updates (#550, #604) +- Subgraph tests use `sdk-core` instead of `js-sdk` and general refactoring (#594, #621) + +### Added + +- Subgraph supports new entities: `PPPConfigurationChangedEvent`, `AgreementLiquidatedV2Event` (#558) +- Added complementary liquidation tests + +### Fixed + +- +1 to `getRandomFlowRate` so flowRate is never 0 (#538) +- `getLiquidations` script null case fix (#557) +- handle updating of total supply for native super token (#584) + +## [1.2.0] - 2021-12-13 + +### Added + +- Support for new test networks: `arbitrum-rinkeby`, `optimism-kovan` and `avalanche-fuji`. + +## [1.1.1] - 2021-11-30 + +### Added + +- from property onto SentEvent (#493) + Subgraph sfmeta entity (#491) + +### Changed + +- Subgraph test added to canary build (#512) +- using js-sdk@0.5.7 +- update subgraph dependency versions (target minor) (#509) + +### Fixed + +ci cd cleanup (#500) + +- single network deploy implemented (#506) + +### Breaking + +- Due to subgraph schema version upgrades, isSet is now also a reserved keyword in the schema. Superfluid events + that had isSet argument are all changed to using isKeySet instead. + - Migration: use `isKeySet` instead + +## [1.1.0] - 2021-11-15 + +### Added + +- Add stream period entity +- Name and addresses properties added to event entities + +### Changed + +- Subgraph v1 underlying token added to Token entity +- Decimals and underlying token added to Token entity +- Tests added for new entity and properties: StreamPeriod entity, name and addresses properties on events, decimal and underlyingToken properties on Token + +## [1.0.0] - 2021-10-29 + +### Added + +- Complete set of Superfluid event entities +- HOL (Higher order level) entities +- Aggregate entities +- System testing suite for all entities +- Shiny new docs coming to you soon diff --git a/packages/subgraph/README.md b/packages/subgraph/README.md index 928095a5d8..3c560b8b13 100644 --- a/packages/subgraph/README.md +++ b/packages/subgraph/README.md @@ -20,51 +20,10 @@ Get started using the Subgraphs with an introduction and query examples: https://docs.superfluid.finance/superfluid/docs/subgraph -# 👨‍🚀 Hosted Subgraphs - -All subgraphs are available via The Graph's hosted service: - -**V1 Endpoints** -| Network | URL | -| --- | --- | -| Matic | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-matic | -| Gnosis | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-xdai | -| Optimism Mainnet | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-optimism-mainnet | -| Arbitrum One | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-arbitrum-one | -| Avalanche C-Chain | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-avalanche-c | -| BNB Chain | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-bsc-mainnet | -| Goerli | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-goerli | -| Mumbai | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-mumbai | -| Optimism Goerli | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-optimism-goerli | -| Arbitrum Goerli | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-arbitrum-goerli | -| Avalanche Fuji | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-v1-avalanche-fuji | - -**Development Endpoints** -| Network | URL | -| --- | --- | -| Matic | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-matic | -| Gnosis | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-xdai | -| Optimism Mainnet | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-optimism-mainnet | -| Arbitrum One | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-arbitrum-one | -| Avalanche C-Chain | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-avalanche-c | -| BNB Chain | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-bsc-mainnet | -| Mumbai | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-mumbai | -| Goerli| https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-goerli | -| Optimism Goerli | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-optimism-goerli | -| Arbitrum Goerli | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-arbitrum-goerli | -| Avalanche Fuji | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-dev-avalanche-fuji | - -**Feature Endpoints** -| Network | URL | -| --- | --- | -| Matic | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-feature-matic | -| Goerli | https://thegraph.com/explorer/subgraph/superfluid-finance/protocol-feature-goerli | - -\*Note: Development endpoints will include features that are still in progress. Documentation will not reflect new features yet to be released in V1 - # 🤓 Local development -🛑 **STOP - Do not pass Go** 🛑 You probably don't need this repo. If you need data for Superfluid on Optimism, Arbitrum-One, Avalanche-C, Gnosis, Polygon (Matic), or testnet, we already deployed them for you! Head over to the **Docs** to get started. +🛑 **STOP - Do not pass Go** 🛑 You probably don't need this repo. If you need data for a supported Superfluid deployment, we already deployed them for you! +Head over to the **Docs** to get started. In this section we will cover the following: @@ -79,7 +38,7 @@ If you get stuck, see The Graph [docs](https://thegraph.com/docs/quick-start#loc First install these dependencies: - [docker](https://docs.docker.com/install/) -- [docker-compose](https://docs.docker.com/compose/install/) +- [docker compose](https://docs.docker.com/compose/install/) Now install the necessary node packages with the following commands: @@ -97,7 +56,7 @@ npx hardhat node --hostname 0.0.0.0 ### Setting up a local Subgraph node instance -Run `docker-compose up` in `packages/subgraph`. There is a `docker-compose.yml` file which sets up a local graph node container. +Run `docker compose up` in `packages/subgraph`. There is a `docker-compose.yml` file which sets up a local graph node container. You should see logs start coming in on the same terminal window once everything is set up: @@ -121,7 +80,7 @@ Open another terminal window and navigate to `packages/ethereum-contracts` and r yarn build ``` -Now go to to `packages/ethereum-contracts` and run the following command to deploy contracts: +Now go to `packages/ethereum-contracts` and run the following command to deploy contracts: ```bash npx hardhat run dev-scripts/run-deploy-contracts-and-token.js @@ -283,7 +242,7 @@ The tests look something like this: - you create a mock event with the desired parameters for a specific entity - you pass this event to its complementary event handler -- you assert that the values on the created entity in the graph store have been created +- you assert that the values on the created entity in the graph store have been created #### Integration Tests The integration tests have been scaled down drastically and are no longer responsible for validating the mapping logic as this is handled in the unit tests. This solely serves to ensure that transactions executed against a local blockchain connected to a local subgraph instance will index events and create entities which can be retrieved by querying the exposed API endpoint from the local subgraph. At its core, we are testing the full lifecycle from transaction => event => indexed event => entity => entity is queryable. In addition, we still need these tests to ensure that new changes made to our schema won't break the SDK's query feature. diff --git a/packages/subgraph/cache/solidity-files-cache.json b/packages/subgraph/cache/solidity-files-cache.json deleted file mode 100644 index cb236ef8bf..0000000000 --- a/packages/subgraph/cache/solidity-files-cache.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "_format": "hh-sol-cache-2", - "files": {} -} diff --git a/packages/subgraph/config/mock.json b/packages/subgraph/config/mock.json index 0a91e0f421..0fa37532d9 100644 --- a/packages/subgraph/config/mock.json +++ b/packages/subgraph/config/mock.json @@ -7,7 +7,5 @@ "gdaAddress": "0x0000000000000000000000000000000000000000", "superTokenFactoryAddress": "0x0000000000000000000000000000000000000000", "resolverV1Address": "0x0000000000000000000000000000000000000000", - "nativeAssetSuperTokenAddress": "0x0000000000000000000000000000000000000000", - "constantOutflowNFTAddress": "0x0000000000000000000000000000000000000000", - "constantInflowNFTAddress": "0x0000000000000000000000000000000000000000" + "nativeAssetSuperTokenAddress": "0x0000000000000000000000000000000000000000" } diff --git a/packages/subgraph/default.nix b/packages/subgraph/default.nix new file mode 100644 index 0000000000..9e528f88da --- /dev/null +++ b/packages/subgraph/default.nix @@ -0,0 +1,26 @@ +{ + halfBoardModule = { + dependencies = [ + ../ethereum-contracts + ../sdk-core + ]; + outputs = [ + "abi" + "generate" + ]; + includedFiles = [ + ./package.json + ./config + ./schema.graphql + ./tsconfig.json + ./types + ./src + ./scripts + # for testing + ./docker-compose.yml + ./matchstick.yaml + ./tests + ./tasks + ]; + }; +} diff --git a/packages/subgraph/docker-compose.yml b/packages/subgraph/docker-compose.yml index 60f65f18cd..2950fc4e79 100644 --- a/packages/subgraph/docker-compose.yml +++ b/packages/subgraph/docker-compose.yml @@ -1,7 +1,6 @@ -version: "3" services: graph-node: - image: graphprotocol/graph-node:v0.27.0 + image: graphprotocol/graph-node:v0.35.0 ports: - "8000:8000" - "8001:8001" @@ -11,15 +10,13 @@ services: depends_on: - ipfs - postgres - extra_hosts: - - host.docker.internal:host-gateway environment: postgres_host: postgres postgres_user: graph-node postgres_pass: let-me-in postgres_db: graph-node ipfs: "ipfs:5001" - ethereum: "mainnet:http://host.docker.internal:8545" + ethereum: "mainnet:http://${DOCKER_HOST_IP}:8545" GRAPH_LOG: info ipfs: image: ipfs/go-ipfs:v0.4.23 diff --git a/packages/subgraph/hardhat.config.ts b/packages/subgraph/hardhat.config.ts index 7f434d4af6..c4953478a2 100644 --- a/packages/subgraph/hardhat.config.ts +++ b/packages/subgraph/hardhat.config.ts @@ -21,48 +21,7 @@ const config: HardhatUserConfig = { }, }, }, - networks: { - "optimism-mainnet": { - url: process.env.OPTIMISM_PROVIDER_URL || "", - chainId: 10, - }, - gnosis: { - url: process.env.GNOSIS_PROVIDER_URL || "", - chainId: 100, - }, - matic: { - url: process.env.MATIC_PROVIDER_URL || "", - chainId: 137, - }, - "arbitrum-one": { - url: process.env.ARBITRUM_ONE_PROVIDER_URL || "", - chainId: 42161, - }, - "avalanche-c": { - url: process.env.AVALANCHE_C_PROVIDER_URL || "", - chainId: 43114, - }, - "bsc-mainnet": { - url: process.env.BSC_MAINNET_PROVIDER_URL || "", - chainId: 56, - }, - "celo-mainnet": { - url: process.env.CELO_MAINNET_PROVIDER_URL || "", - chainId: 42220, - }, - goerli: { - url: process.env.GOERLI_PROVIDER_URL || "", - chainId: 5, - }, - avafuji: { - url: process.env.AVAFUJI_PROVIDER_URL || "", - chainId: 43113, - }, - mumbai: { - url: process.env.MUMBAI_PROVIDER_URL || "", - chainId: 80001, - }, - }, + mocha: { timeout: 500000, }, diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index a77363f331..b61a4dd2f6 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,14 +1,28 @@ { "name": "@superfluid-finance/subgraph", - "version": "1.6.1", "description": "Subgraph for the Superfluid Ethereum contracts.", + "version": "2.1.0", + "dependencies": { + "@graphprotocol/graph-cli": "0.80.1", + "@graphprotocol/graph-ts": "0.35.1", + "@superfluid-finance/sdk-core": "0.8.0", + "mustache": "4.2.0" + }, + "devDependencies": { + "@superfluid-finance/metadata": "^1.5.0", + "coingecko-api": "^1.0.10", + "graphql": "^16.9.0", + "graphql-request": "^6.1.0", + "lodash": "^4.17.21", + "matchstick-as": "^0.6.0" + }, "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph", + "license": "MIT", "repository": { "type": "git", "url": "https://github.com/superfluid-finance/protocol-monorepo.git", "directory": "packages/subgraph" }, - "license": "MIT", "scripts": { "getAbi": "node scripts/getAbi", "codegen": "graph codegen", @@ -42,25 +56,9 @@ "watch": "graph deploy superfluid-test --node http://localhost:8020/ --ipfs http://localhost:5001 --watch", "lint": "run-s lint:*", "lint:js-eslint": "eslint . --max-warnings=0 --report-unused-disable-directives && echo '✔ Your .js files look good.'", - "pre-commit": "if [ ! -z \"$(git status -s .)\" ];then run-s pre-commit:*;else true;fi", - "pre-commit:lint": "yarn lint", "generate-sf-meta": "./tasks/getSFMeta.sh", "generate-sf-meta-local": "COMMIT_HASH=local CONFIGURATION=local BRANCH=local TAG=local ./tasks/getSFMeta.sh", "check-updates": "ncu --target minor --dep prod,dev", "cloc": "cloc src" - }, - "dependencies": { - "@graphprotocol/graph-cli": "0.64.1", - "@graphprotocol/graph-ts": "0.32.0", - "@superfluid-finance/sdk-core": "0.6.13", - "mustache": "^4.2.0" - }, - "devDependencies": { - "@superfluid-finance/metadata": "1.1.23", - "coingecko-api": "^1.0.10", - "graphql": "^16.8.1", - "graphql-request": "^6.1.0", - "lodash": "^4.17.21", - "matchstick-as": "^0.6.0" } } diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index f8e8c990c6..6e81290bf0 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -830,7 +830,8 @@ type AgreementClassRegisteredEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `code` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -849,7 +850,8 @@ type AgreementClassUpdatedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `code` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -868,7 +870,8 @@ type AppRegisteredEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `app` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -889,7 +892,9 @@ type GovernanceReplacedEvent implements Event @entity(immutable: true) { order: BigInt! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `oldGovernance` + addresses[1] = `newGovernance` """ addresses: [Bytes!]! oldGovernance: Bytes! @@ -905,7 +910,8 @@ type JailEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `app` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -924,7 +930,8 @@ type SuperTokenFactoryUpdatedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `newFactory` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -942,7 +949,9 @@ type SuperTokenLogicUpdatedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `token` + addresses[1] = `code` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -963,7 +972,9 @@ type RoleAdminChangedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `previousAdminRole` + addresses[1] = `newAdminRole` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -983,7 +994,9 @@ type RoleGrantedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `account` + addresses[1] = `sender` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1003,7 +1016,9 @@ type RoleRevokedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `account` + addresses[1] = `sender` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1057,7 +1072,10 @@ type CFAv1LiquidationPeriodChangedEvent implements Event governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1083,7 +1101,10 @@ type ConfigChangedEvent implements Event @entity(immutable: true) { governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1110,7 +1131,11 @@ type RewardAddressChangedEvent implements Event @entity(immutable: true) { governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` + addresses[3] = `rewardAddress` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1136,7 +1161,10 @@ type PPPConfigurationChangedEvent implements Event @entity(immutable: true) { governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1164,7 +1192,10 @@ type SuperTokenMinimumDepositChangedEvent implements Event governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1190,7 +1221,11 @@ type TrustedForwarderChangedEvent implements Event @entity(immutable: true) { governanceAddress: Bytes! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `governanceAddress` + addresses[1] = `host` + addresses[2] = `superToken` + addresses[3] = `forwarder` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1388,7 +1423,7 @@ type TransferEvent implements Event @entity(immutable: true) { """ Contains the addresses that were impacted by this event: - addresses[0] = `token` (superToken if `isNFTTransfer` is false, otherwise the ConstantOutflowNFT or ConstantInflowNFT) + addresses[0] = `token` addresses[1] = `from` addresses[2] = `to` """ @@ -1399,15 +1434,8 @@ type TransferEvent implements Event @entity(immutable: true) { from: Account! to: Account! - isNFTTransfer: Boolean! - """ - If `isNFTTransfer` is true, value is the `tokenId` of the NFT transferred. - """ value: BigInt! - """ - If `isNFTTransfer` is true, value is the NFT address, else it is the SuperToken address. - """ token: Bytes! } @@ -1457,8 +1485,6 @@ type TokenUpgradedEvent implements Event @entity(immutable: true) { amount: BigInt! } - -# NFTs # type ApprovalEvent implements Event @entity(immutable: true) { id: ID! transactionHash: Bytes! @@ -1468,75 +1494,31 @@ type ApprovalEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `token` (superToken) + addresses[1] = `owner` + addresses[2] = `to` """ addresses: [Bytes!]! blockNumber: BigInt! logIndex: BigInt! order: BigInt! - owner: Account! - """ - The address that will be granted allowance to transfer the NFT. + The address that will be granting allowance to transfer ERC20. """ - to: Account! - """ - The id of the NFT that will be granted allowance to transfer. - The id is: uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))) - """ - tokenId: BigInt! -} - -type ApprovalForAllEvent implements Event @entity(immutable: true) { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Empty addresses array. - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! - owner: Account! """ - The address that will be granted operator permissions for the all of the owner's tokens. - """ - operator: Account! - """ - Whether the operator is enabled or disabled for `owner`. + The address that will be granted allowance to transfer ERC20. """ - approved: Boolean! -} - -type MetadataUpdateEvent implements Event @entity(immutable: true) { - id: ID! - transactionHash: Bytes! - gasPrice: BigInt! - gasUsed: BigInt! - timestamp: BigInt! - name: String! - - """ - Empty addresses array. - """ - addresses: [Bytes!]! - blockNumber: BigInt! - logIndex: BigInt! - order: BigInt! + to: Account! """ - The id of the NFT that will be granted allowance to transfer. - The id is: uint256(keccak256(abi.encode(block.chainid, superToken, sender, receiver))) + If `amount` is non-zero, this event was emitted for the approval of an ERC20. + Tne amount of ERC20 tokens that will be granted allowance to transfer. """ - tokenId: BigInt! + amount: BigInt! } # SuperTokenFactory # @@ -1590,7 +1572,8 @@ type SuperTokenLogicCreatedEvent implements Event @entity(immutable: true) { name: String! """ - Empty addresses array. + Contains the addresses that were impacted by this event: + addresses[0] = `tokenLogic` """ addresses: [Bytes!]! blockNumber: BigInt! @@ -1757,6 +1740,11 @@ type Pool @entity { totalAmountInstantlyDistributedUntilUpdatedAt: BigInt! totalAmountFlowedDistributedUntilUpdatedAt: BigInt! totalAmountDistributedUntilUpdatedAt: BigInt! + totalFlowAdjustmentAmountDistributedUntilUpdatedAt: BigInt! + + perUnitSettledValue: BigInt! + perUnitFlowRate: BigInt! + """ A member is any account which has more than 0 units in the pool. """ @@ -1812,6 +1800,9 @@ type PoolMember @entity { poolTotalAmountDistributedUntilUpdatedAt: BigInt! totalAmountReceivedUntilUpdatedAt: BigInt! + syncedPerUnitSettledValue: BigInt! + syncedPerUnitFlowRate: BigInt! + account: Account! pool: Pool! @@ -2206,6 +2197,7 @@ type Token @entity { underlyingToken: Token """ + If `governanceConfig.id` is the zero address, the token uses the default governance config. """ governanceConfig: TokenGovernanceConfig } @@ -2237,6 +2229,8 @@ type AccountTokenSnapshot @entity { ID composed of: accountID-tokenID """ id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! updatedAtTimestamp: BigInt! updatedAtBlockNumber: BigInt! # ---------------------------------- state ---------------------------------- @@ -2281,20 +2275,11 @@ type AccountTokenSnapshot @entity { """ activeGDAOutgoingStreamCount: Int! - """ - The count of active incoming streams to this account for all agreements. - """ - activeIncomingStreamCount: Int! - """ The count of active incoming streams to this account for the CFA. + GDA incoming streams are *NOT* counted here. """ - activeCFAIncomingStreamCount: Int! - - """ - The count of active incoming streams to this account for the GDA. - """ - activeGDAIncomingStreamCount: Int! + activeIncomingStreamCount: Int! """ The count of closed streams by `account`, both incoming and outgoing for all agreements. @@ -2326,20 +2311,11 @@ type AccountTokenSnapshot @entity { """ inactiveGDAOutgoingStreamCount: Int! - """ - The count of closed incoming streams by `account` for all agreements. - """ - inactiveIncomingStreamCount: Int! - """ The count of closed incoming streams by `account` for the CFA. + Close incoming GDA streams are *NOT* counted here. """ - inactiveCFAIncomingStreamCount: Int! - - """ - The count of closed incoming streams by `account` for the GDA. - """ - inactiveGDAIncomingStreamCount: Int! + inactiveIncomingStreamCount: Int! """ The current (as of updatedAt) number of subscriptions with units allocated to them tied to this `account`. @@ -2384,6 +2360,7 @@ type AccountTokenSnapshot @entity { """ The total net flow rate of the `account` as of `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. This can be obtained by: `totalInflowRate - totalOutflowRate`. + NOTE: this property will NOT be 100% accurate all the time for receivers of GDA flows. """ totalNetFlowRate: BigInt! @@ -2392,25 +2369,11 @@ type AccountTokenSnapshot @entity { """ totalCFANetFlowRate: BigInt! - """ - The total net flow rate of the `account` as of `updatedAtTimestamp`/`updatedAtBlock` for the GDA. - """ - totalGDANetFlowRate: BigInt! - - """ - The total inflow rate (receive flowRate per second) of the `account` for all flow agreements. - """ - totalInflowRate: BigInt! - """ The total inflow rate (receive flowRate per second) of the `account` for the CFA. + GDA inflow rate is *NOT* included here. """ - totalCFAInflowRate: BigInt! - - """ - The total inflow rate (receive flowRate per second) of the `account` for the GDA. - """ - totalGDAInflowRate: BigInt! + totalInflowRate: BigInt! """ The total outflow rate (send flowrate per second) of the `account` for all flow agreements. @@ -2427,20 +2390,10 @@ type AccountTokenSnapshot @entity { """ totalGDAOutflowRate: BigInt! - """ - The total amount of `token` streamed into this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. - """ - totalAmountStreamedInUntilUpdatedAt: BigInt! - """ The total amount of `token` streamed into this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the CFA. """ - totalCFAAmountStreamedInUntilUpdatedAt: BigInt! - - """ - The total amount of `token` streamed into this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the GDA. - """ - totalGDAAmountStreamedInUntilUpdatedAt: BigInt! + totalAmountStreamedInUntilUpdatedAt: BigInt! """ The total amount of `token` streamed from this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. @@ -2452,11 +2405,6 @@ type AccountTokenSnapshot @entity { """ totalCFAAmountStreamedOutUntilUpdatedAt: BigInt! - """ - The total amount of `token` streamed from this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the GDA. - """ - totalGDAAmountStreamedOutUntilUpdatedAt: BigInt! - """ The total amount of `token` streamed through this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for all flow agreements. """ @@ -2467,11 +2415,6 @@ type AccountTokenSnapshot @entity { """ totalCFAAmountStreamedUntilUpdatedAt: BigInt! - """ - The total amount of `token` streamed through this `account` until the `updatedAtTimestamp`/`updatedAtBlock` for the GDA. - """ - totalGDAAmountStreamedUntilUpdatedAt: BigInt! - """ The total amount of `token` this `account` has transferred. """ @@ -2538,16 +2481,6 @@ type AccountTokenSnapshotLog @entity { """ activeIncomingStreamCount: Int! - """ - The count of active incoming streams to this account for the CFA. - """ - activeCFAIncomingStreamCount: Int! - - """ - The count of active incoming streams to this account for the GDA. - """ - activeGDAIncomingStreamCount: Int! - """ The current (as of timestamp) count of closed streams for all agreements. """ @@ -2578,20 +2511,11 @@ type AccountTokenSnapshotLog @entity { """ inactiveGDAOutgoingStreamCount: Int! - """ - The count of closed incoming streams by `account` for all agreements. - """ - inactiveIncomingStreamCount: Int! - """ The count of closed incoming streams by `account` for the CFA. + Close incoming GDA streams are *NOT* counted here. """ - inactiveCFAIncomingStreamCount: Int! - - """ - The count of closed incoming streams by `account` for the GDA. - """ - inactiveGDAIncomingStreamCount: Int! + inactiveIncomingStreamCount: Int! """ The current (as of timestamp) number of subscriptions with units allocated to them tied to this `account`. @@ -2641,31 +2565,14 @@ type AccountTokenSnapshotLog @entity { """ The total (as of timestamp) net flow rate of the `account` as of `timestamp`/`block` for the CFA. - This can be obtained by: `totalCFAInflowRate - totalCFAOutflowRate` """ totalCFANetFlowRate: BigInt! - """ - The total (as of timestamp) net flow rate of the `account` as of `timestamp`/`block` for the GDA. - This can be obtained by: `totalGDAInflowRate - totalGDAOutflowRate` - """ - totalGDANetFlowRate: BigInt! - """ The total (as of timestamp) inflow rate (receive flowRate per second) of the `account`. """ totalInflowRate: BigInt! - """ - The total (as of timestamp) inflow rate (receive flowRate per second) of the `account` for the CFA. - """ - totalCFAInflowRate: BigInt! - - """ - The total (as of timestamp) inflow rate (receive flowRate per second) of the `account` for the GDA. - """ - totalGDAInflowRate: BigInt! - """ The total (as of timestamp) outflow rate (send flowrate per second) of the `account`. """ @@ -2686,16 +2593,6 @@ type AccountTokenSnapshotLog @entity { """ totalAmountStreamedIn: BigInt! - """ - The total (as of timestamp) amount of `token` streamed into this `account` until the `timestamp`/`block` for the CFA. - """ - totalCFAAmountStreamedIn: BigInt! - - """ - The total (as of timestamp) amount of `token` streamed into this `account` until the `timestamp`/`block` for the GDA. - """ - totalGDAAmountStreamedIn: BigInt! - """ The total (as of timestamp) amount of `token` streamed from this `account` until the `timestamp`/`block`. """ @@ -2706,11 +2603,6 @@ type AccountTokenSnapshotLog @entity { """ totalCFAAmountStreamedOut: BigInt! - """ - The total (as of timestamp) amount of `token` streamed from this `account` until the `timestamp`/`block` for the GDA. - """ - totalGDAAmountStreamedOut: BigInt! - """ The total (as of timestamp) net amount of `token` streamed through this `account` until the `timestamp`/`block`. """ @@ -2721,11 +2613,6 @@ type AccountTokenSnapshotLog @entity { """ totalCFAAmountStreamed: BigInt! - """ - The total (as of timestamp) net amount of `token` streamed through this `account` until the `timestamp`/`block` for the GDA. - """ - totalGDAAmountStreamed: BigInt! - """ The total (as of timestamp) amount of `token` this `account` has transferred out until the `timestamp`/`block`. """ @@ -2857,11 +2744,6 @@ type TokenStatistic @entity { """ totalCFAAmountStreamedUntilUpdatedAt: BigInt! - """ - The all-time total amount streamed (outflows) until the `updatedAtTimestamp`/`updatedAtBlock` for the GDA. - """ - totalGDAAmountStreamedUntilUpdatedAt: BigInt! - """ The all-time total amount transferred until the `updatedAtTimestamp`/`updatedAtBlock`. """ @@ -3016,11 +2898,6 @@ type TokenStatisticLog @entity { """ totalCFAAmountStreamed: BigInt! - """ - The all-time total amount of `token` streamed (outflows) until the `timestamp`/`block` for the GDA. - """ - totalGDAAmountStreamed: BigInt! - """ The all-time total amount of `token` transferred until the `timestamp`/`block`. """ @@ -3062,12 +2939,19 @@ type SFMeta @entity { id: ID! timestamp: BigInt! blockNumber: BigInt! + """ Whether the branch is feature/dev/v1. """ configuration: String! + """ The branch the current deployment is coming from. """ branch: String! + + """ + The subgraph package.json semver version of the current deployment. + """ + packageVersion: String! } diff --git a/packages/subgraph/scripts/balanceValidation.ts b/packages/subgraph/scripts/balanceValidation.ts index b5fc6ddf98..88edf0197d 100644 --- a/packages/subgraph/scripts/balanceValidation.ts +++ b/packages/subgraph/scripts/balanceValidation.ts @@ -14,9 +14,9 @@ import { DataIntegrityAccountTokenSnapshot } from "./dataIntegrity/interfaces"; */ async function main() { const endpointA = - "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-goerli"; + "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-matic"; const endpointB = - "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli"; + "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-matic"; const endpointARecentBlock = await getMostRecentIndexedBlockNumber( endpointA ); diff --git a/packages/subgraph/scripts/buildNetworkConfig.ts b/packages/subgraph/scripts/buildNetworkConfig.ts index d9e0a0cd76..d89d5f56f7 100644 --- a/packages/subgraph/scripts/buildNetworkConfig.ts +++ b/packages/subgraph/scripts/buildNetworkConfig.ts @@ -12,15 +12,26 @@ interface SubgraphConfig { readonly superTokenFactoryAddress: string; readonly resolverV1Address: string; readonly nativeAssetSuperTokenAddress: string; - readonly constantOutflowNFTAddress: string; - readonly constantInflowNFTAddress: string; + readonly indexerHints_prune: string; } const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"; -// script usage: npx ts-node ./scripts/buildNetworkConfig.ts +const vendorCliNameExceptions: Record> = { + "goldsky": { + "xdai-mainnet": "xdai", + "avalanche-fuji": "avalanche-testnet" + } +} + +const vendorHistoryPruning: Record = { + "goldsky": "auto" +}; + +// script usage: npx ts-node ./scripts/buildNetworkConfig.ts function main() { const networkName = process.argv[2]; + const vendorName = process.argv[3]; const networkMetadata = metadata.getNetworkByName(networkName); @@ -29,8 +40,7 @@ function main() { } const subgraphConfig: SubgraphConfig = { - // cliName exists for networks supported by the hosted service - network: networkMetadata.subgraphV1.cliName || networkMetadata.shortName, + network: vendorCliNameExceptions[vendorName]?.[networkMetadata.name] || networkMetadata.subgraphV1.cliName || networkMetadata.shortName, hostStartBlock: networkMetadata.startBlockV1, hostAddress: networkMetadata.contractsV1.host, cfaAddress: networkMetadata.contractsV1.cfaV1, @@ -39,8 +49,7 @@ function main() { superTokenFactoryAddress: networkMetadata.contractsV1.superTokenFactory, resolverV1Address: networkMetadata.contractsV1.resolver, nativeAssetSuperTokenAddress: networkMetadata.nativeTokenWrapper, - constantOutflowNFTAddress: networkMetadata.contractsV1.constantOutflowNFT || ADDRESS_ZERO, - constantInflowNFTAddress: networkMetadata.contractsV1.constantInflowNFT || ADDRESS_ZERO, + indexerHints_prune: vendorHistoryPruning[vendorName] || "never", }; const writeToDir = join(__dirname, '..', `config/${networkName}.json`); diff --git a/packages/subgraph/scripts/getAbi.js b/packages/subgraph/scripts/getAbi.js index b3502b1385..924c0cdfe9 100755 --- a/packages/subgraph/scripts/getAbi.js +++ b/packages/subgraph/scripts/getAbi.js @@ -4,7 +4,6 @@ const path = require("path"); const contracts = [ "ERC20", "IConstantFlowAgreementV1", - "IFlowNFTBase", "ISuperTokenFactory", "ISuperToken", "ISuperfluid", diff --git a/packages/subgraph/src/addresses.template.ts b/packages/subgraph/src/addresses.template.ts index ad6559454c..4edf31d65b 100644 --- a/packages/subgraph/src/addresses.template.ts +++ b/packages/subgraph/src/addresses.template.ts @@ -15,3 +15,7 @@ export function getResolverAddress(): Address { export function getNativeAssetSuperTokenAddress(): Address { return Address.fromString("{{nativeAssetSuperTokenAddress}}"); } + +export function getIsLocalIntegrationTesting(): boolean { + return "{{testNetwork}}".length > 0; +} \ No newline at end of file diff --git a/packages/subgraph/src/mappingHelpers.ts b/packages/subgraph/src/mappingHelpers.ts index 8b01207d90..91a1a6e6db 100644 --- a/packages/subgraph/src/mappingHelpers.ts +++ b/packages/subgraph/src/mappingHelpers.ts @@ -1,4 +1,5 @@ import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; +import { FlowUpdated } from "../generated/ConstantFlowAgreementV1/IConstantFlowAgreementV1"; import { ISuperfluid as Superfluid } from "../generated/Host/ISuperfluid"; import { Account, @@ -10,7 +11,6 @@ import { Pool, PoolDistributor, PoolMember, - ResolverEntry, Stream, StreamRevision, Token, @@ -18,34 +18,33 @@ import { TokenStatistic, TokenStatisticLog, } from "../generated/schema"; +import { SuperToken as SuperTokenTemplate } from "../generated/templates"; +import { ISuperToken as SuperToken } from "../generated/templates/SuperToken/ISuperToken"; +import { + getHostAddress, + getNativeAssetSuperTokenAddress, + getResolverAddress, +} from "./addresses"; import { BIG_INT_ZERO, - createLogID, + ZERO_ADDRESS, calculateMaybeCriticalAtTimestamp, + createLogID, getAccountTokenSnapshotID, + getActiveStreamsDelta, getAmountStreamedSinceLastUpdatedAt, + getClosedStreamsDelta, getFlowOperatorID, getIndexID, + getIsTokenListed, getOrder, + getPoolDistributorID, + getPoolMemberID, getStreamID, getStreamRevisionID, getSubscriptionID, - getInitialTotalSupplyForSuperToken, - ZERO_ADDRESS, - handleTokenRPCCalls, - getPoolMemberID, - getPoolDistributorID, - getActiveStreamsDelta, - getClosedStreamsDelta, + handleTokenRPCCalls } from "./utils"; -import { SuperToken as SuperTokenTemplate } from "../generated/templates"; -import { ISuperToken as SuperToken } from "../generated/templates/SuperToken/ISuperToken"; -import { - getHostAddress, - getNativeAssetSuperTokenAddress, - getResolverAddress, -} from "./addresses"; -import { FlowUpdated } from "../generated/ConstantFlowAgreementV1/IConstantFlowAgreementV1"; /************************************************************************** * HOL initializer functions @@ -118,20 +117,17 @@ export function getOrInitSuperToken( nativeAssetSuperTokenAddress ); - token = handleTokenRPCCalls(token, resolverAddress); - token.isListed = false; + token = handleTokenRPCCalls(token); + token.isListed = getIsTokenListed(token, resolverAddress); const underlyingAddress = token.underlyingAddress; token.underlyingToken = underlyingAddress.toHexString(); + token.governanceConfig = ZERO_ADDRESS.toHexString(); token.save(); // Note: we initialize and create tokenStatistic whenever we create a // token as well. let tokenStatistic = getOrInitTokenStatistic(tokenAddress, block); - tokenStatistic = getInitialTotalSupplyForSuperToken( - tokenStatistic, - tokenAddress - ); tokenStatistic.save(); // Per our TokenStatistic Invariant: whenever we create TokenStatistic, we must create TokenStatisticLog @@ -152,11 +148,11 @@ export function getOrInitSuperToken( return token as Token; } - // @note - this is currently being called every single time to handle list/unlist of tokens - // because we don't have the Resolver Set event on some networks - // We can remove this once we have migrated data to a new resolver which emits this event on - // all networks. - token = handleTokenRPCCalls(token, resolverAddress); + if (token.symbol == "") { + const tokenContract = SuperToken.bind(tokenAddress); + const symbolResult = tokenContract.try_symbol(); + token.symbol = symbolResult.reverted ? "" : symbolResult.value; + } token.save(); @@ -208,6 +204,12 @@ export function getOrInitTokenGovernanceConfig( governanceConfig.token = superTokenAddress.toHexString(); governanceConfig.save(); + + const superToken = Token.load(superTokenAddress.toHexString()); + if (superToken) { + superToken.governanceConfig = governanceConfig.id; + superToken.save(); + } } return governanceConfig; } @@ -238,7 +240,7 @@ export function getOrInitToken( token.isNativeAssetSuperToken = false; token.isListed = false; - token = handleTokenRPCCalls(token, resolverAddress); + token = handleTokenRPCCalls(token); token.save(); } @@ -461,30 +463,6 @@ export function getOrInitSubscription( return subscription as IndexSubscription; } -export function getOrInitResolverEntry( - id: string, - target: Address, - block: ethereum.Block -): ResolverEntry { - let resolverEntry = ResolverEntry.load(id); - - if (resolverEntry == null) { - resolverEntry = new ResolverEntry(id); - resolverEntry.createdAtBlockNumber = block.number; - resolverEntry.createdAtTimestamp = block.timestamp; - resolverEntry.targetAddress = target; - - const superToken = Token.load(target.toHex()); - resolverEntry.isToken = superToken != null; - } - resolverEntry.updatedAtBlockNumber = block.number; - resolverEntry.updatedAtTimestamp = block.timestamp; - resolverEntry.isListed = target.notEqual(ZERO_ADDRESS); - - resolverEntry.save(); - return resolverEntry as ResolverEntry; -} - export function getOrInitPool(event: ethereum.Event, poolId: string): Pool { // get existing pool let pool = Pool.load(poolId); @@ -503,6 +481,11 @@ export function getOrInitPool(event: ethereum.Event, poolId: string): Pool { pool.totalAmountInstantlyDistributedUntilUpdatedAt = BIG_INT_ZERO; pool.totalAmountFlowedDistributedUntilUpdatedAt = BIG_INT_ZERO; pool.totalAmountDistributedUntilUpdatedAt = BIG_INT_ZERO; + pool.totalFlowAdjustmentAmountDistributedUntilUpdatedAt = BIG_INT_ZERO; + + pool.perUnitSettledValue = BIG_INT_ZERO; + pool.perUnitFlowRate = BIG_INT_ZERO; + pool.totalMembers = 0; pool.totalConnectedMembers = 0; pool.totalDisconnectedMembers = 0; @@ -523,9 +506,6 @@ export function updatePoolTotalAmountFlowedAndDistributed( const timeDelta = event.block.timestamp.minus(pool.updatedAtTimestamp); const amountFlowedSinceLastUpdate = pool.flowRate.times(timeDelta); - pool.updatedAtBlockNumber = event.block.number; - pool.updatedAtTimestamp = event.block.timestamp; - pool.totalAmountFlowedDistributedUntilUpdatedAt = pool.totalAmountFlowedDistributedUntilUpdatedAt.plus( amountFlowedSinceLastUpdate @@ -540,7 +520,7 @@ export function updatePoolTotalAmountFlowedAndDistributed( return pool; } -export function getOrInitPoolMember( +export function getOrInitOrUpdatePoolMember( event: ethereum.Event, poolAddress: Address, poolMemberAddress: Address @@ -552,19 +532,25 @@ export function getOrInitPoolMember( poolMember = new PoolMember(poolMemberID); poolMember.createdAtTimestamp = event.block.timestamp; poolMember.createdAtBlockNumber = event.block.number; - poolMember.updatedAtTimestamp = event.block.timestamp; - poolMember.updatedAtBlockNumber = event.block.number; - + poolMember.units = BIG_INT_ZERO; poolMember.isConnected = false; poolMember.totalAmountClaimed = BIG_INT_ZERO; poolMember.poolTotalAmountDistributedUntilUpdatedAt = BIG_INT_ZERO; poolMember.totalAmountReceivedUntilUpdatedAt = BIG_INT_ZERO; + poolMember.syncedPerUnitSettledValue = BIG_INT_ZERO; + poolMember.syncedPerUnitFlowRate = BIG_INT_ZERO; + poolMember.account = poolMemberAddress.toHex(); poolMember.pool = poolAddress.toHex(); } - + poolMember.updatedAtTimestamp = event.block.timestamp; + poolMember.updatedAtBlockNumber = event.block.number; + + poolMember.updatedAtTimestamp = event.block.timestamp; + poolMember.updatedAtBlockNumber = event.block.number; + return poolMember; } @@ -640,20 +626,18 @@ export function getOrInitAccountTokenSnapshot( if (accountTokenSnapshot == null) { accountTokenSnapshot = new AccountTokenSnapshot(atsId); + accountTokenSnapshot.createdAtTimestamp = block.timestamp; + accountTokenSnapshot.createdAtBlockNumber = block.number; accountTokenSnapshot.updatedAtTimestamp = block.timestamp; accountTokenSnapshot.updatedAtBlockNumber = block.number; accountTokenSnapshot.totalNumberOfActiveStreams = 0; accountTokenSnapshot.totalCFANumberOfActiveStreams = 0; accountTokenSnapshot.totalGDANumberOfActiveStreams = 0; accountTokenSnapshot.activeIncomingStreamCount = 0; - accountTokenSnapshot.activeCFAIncomingStreamCount = 0; - accountTokenSnapshot.activeGDAIncomingStreamCount = 0; accountTokenSnapshot.activeOutgoingStreamCount = 0; accountTokenSnapshot.activeCFAOutgoingStreamCount = 0; accountTokenSnapshot.activeGDAOutgoingStreamCount = 0; accountTokenSnapshot.inactiveIncomingStreamCount = 0; - accountTokenSnapshot.inactiveCFAIncomingStreamCount = 0; - accountTokenSnapshot.inactiveGDAIncomingStreamCount = 0; accountTokenSnapshot.inactiveOutgoingStreamCount = 0; accountTokenSnapshot.inactiveCFAOutgoingStreamCount = 0; accountTokenSnapshot.inactiveGDAOutgoingStreamCount = 0; @@ -668,29 +652,18 @@ if (accountTokenSnapshot == null) { accountTokenSnapshot.balanceUntilUpdatedAt = BIG_INT_ZERO; accountTokenSnapshot.totalNetFlowRate = BIG_INT_ZERO; accountTokenSnapshot.totalCFANetFlowRate = BIG_INT_ZERO; - accountTokenSnapshot.totalGDANetFlowRate = BIG_INT_ZERO; accountTokenSnapshot.totalInflowRate = BIG_INT_ZERO; - accountTokenSnapshot.totalCFAInflowRate = BIG_INT_ZERO; - accountTokenSnapshot.totalGDAInflowRate = BIG_INT_ZERO; accountTokenSnapshot.totalOutflowRate = BIG_INT_ZERO; accountTokenSnapshot.totalCFAOutflowRate = BIG_INT_ZERO; accountTokenSnapshot.totalGDAOutflowRate = BIG_INT_ZERO; accountTokenSnapshot.totalAmountStreamedInUntilUpdatedAt = BIG_INT_ZERO; - accountTokenSnapshot.totalCFAAmountStreamedInUntilUpdatedAt = - BIG_INT_ZERO; - accountTokenSnapshot.totalGDAAmountStreamedInUntilUpdatedAt = - BIG_INT_ZERO; accountTokenSnapshot.totalAmountStreamedOutUntilUpdatedAt = BIG_INT_ZERO; accountTokenSnapshot.totalCFAAmountStreamedOutUntilUpdatedAt = BIG_INT_ZERO; - accountTokenSnapshot.totalGDAAmountStreamedOutUntilUpdatedAt = - BIG_INT_ZERO; accountTokenSnapshot.totalAmountStreamedUntilUpdatedAt = BIG_INT_ZERO; accountTokenSnapshot.totalCFAAmountStreamedUntilUpdatedAt = BIG_INT_ZERO; - accountTokenSnapshot.totalGDAAmountStreamedUntilUpdatedAt = - BIG_INT_ZERO; accountTokenSnapshot.totalAmountTransferredUntilUpdatedAt = BIG_INT_ZERO; accountTokenSnapshot.totalDeposit = BIG_INT_ZERO; @@ -739,8 +712,6 @@ export function _createAccountTokenSnapshotLogEntity( atsLog.totalCFANumberOfActiveStreams = ats.totalCFANumberOfActiveStreams; atsLog.totalGDANumberOfActiveStreams = ats.totalGDANumberOfActiveStreams; atsLog.activeIncomingStreamCount = ats.activeIncomingStreamCount; - atsLog.activeCFAIncomingStreamCount = ats.activeCFAIncomingStreamCount; - atsLog.activeGDAIncomingStreamCount = ats.activeGDAIncomingStreamCount; atsLog.activeOutgoingStreamCount = ats.activeOutgoingStreamCount; atsLog.activeCFAOutgoingStreamCount = ats.activeCFAOutgoingStreamCount; atsLog.activeGDAOutgoingStreamCount = ats.activeGDAOutgoingStreamCount; @@ -748,8 +719,6 @@ export function _createAccountTokenSnapshotLogEntity( atsLog.totalCFANumberOfClosedStreams = ats.totalCFANumberOfClosedStreams; atsLog.totalGDANumberOfClosedStreams = ats.totalGDANumberOfClosedStreams; atsLog.inactiveIncomingStreamCount = ats.inactiveIncomingStreamCount; - atsLog.inactiveCFAIncomingStreamCount = ats.inactiveCFAIncomingStreamCount; - atsLog.inactiveGDAIncomingStreamCount = ats.inactiveGDAIncomingStreamCount; atsLog.inactiveOutgoingStreamCount = ats.inactiveOutgoingStreamCount; atsLog.inactiveCFAOutgoingStreamCount = ats.inactiveCFAOutgoingStreamCount; atsLog.inactiveGDAOutgoingStreamCount = ats.inactiveGDAOutgoingStreamCount; @@ -760,26 +729,16 @@ export function _createAccountTokenSnapshotLogEntity( atsLog.balance = ats.balanceUntilUpdatedAt; atsLog.totalNetFlowRate = ats.totalNetFlowRate; atsLog.totalCFANetFlowRate = ats.totalCFANetFlowRate; - atsLog.totalGDANetFlowRate = ats.totalGDANetFlowRate; atsLog.totalInflowRate = ats.totalInflowRate; - atsLog.totalCFAInflowRate = ats.totalCFAInflowRate; - atsLog.totalGDAInflowRate = ats.totalGDAInflowRate; atsLog.totalOutflowRate = ats.totalOutflowRate; atsLog.totalCFAOutflowRate = ats.totalCFAOutflowRate; atsLog.totalGDAOutflowRate = ats.totalGDAOutflowRate; atsLog.totalAmountStreamed = ats.totalAmountStreamedUntilUpdatedAt; atsLog.totalCFAAmountStreamed = ats.totalCFAAmountStreamedUntilUpdatedAt; - atsLog.totalGDAAmountStreamed = ats.totalGDAAmountStreamedUntilUpdatedAt; atsLog.totalAmountStreamedIn = ats.totalAmountStreamedInUntilUpdatedAt; - atsLog.totalCFAAmountStreamedIn = - ats.totalCFAAmountStreamedInUntilUpdatedAt; atsLog.totalAmountStreamedOut = ats.totalAmountStreamedOutUntilUpdatedAt; - atsLog.totalGDAAmountStreamedIn = - ats.totalGDAAmountStreamedInUntilUpdatedAt; atsLog.totalCFAAmountStreamedOut = ats.totalCFAAmountStreamedOutUntilUpdatedAt; - atsLog.totalGDAAmountStreamedOut = - ats.totalGDAAmountStreamedOutUntilUpdatedAt; atsLog.totalAmountTransferred = ats.totalAmountTransferredUntilUpdatedAt; atsLog.totalDeposit = ats.totalDeposit; atsLog.totalCFADeposit = ats.totalCFADeposit; @@ -821,7 +780,6 @@ export function getOrInitTokenStatistic( tokenStatistic.totalNumberOfAccounts = 0; tokenStatistic.totalAmountStreamedUntilUpdatedAt = BIG_INT_ZERO; tokenStatistic.totalCFAAmountStreamedUntilUpdatedAt = BIG_INT_ZERO; - tokenStatistic.totalGDAAmountStreamedUntilUpdatedAt = BIG_INT_ZERO; tokenStatistic.totalAmountTransferredUntilUpdatedAt = BIG_INT_ZERO; tokenStatistic.totalAmountDistributedUntilUpdatedAt = BIG_INT_ZERO; tokenStatistic.totalSupply = BIG_INT_ZERO; @@ -891,8 +849,6 @@ export function _createTokenStatisticLogEntity( tokenStatistic.totalAmountStreamedUntilUpdatedAt; tokenStatisticLog.totalCFAAmountStreamed = tokenStatistic.totalCFAAmountStreamedUntilUpdatedAt; - tokenStatisticLog.totalGDAAmountStreamed = - tokenStatistic.totalGDAAmountStreamedUntilUpdatedAt; tokenStatisticLog.totalAmountTransferred = tokenStatistic.totalAmountTransferredUntilUpdatedAt; tokenStatisticLog.totalAmountDistributed = @@ -1139,12 +1095,6 @@ export function updateATSStreamedAndBalanceUntilUpdatedAt( accountTokenSnapshot.updatedAtTimestamp, accountTokenSnapshot.totalCFANetFlowRate ); - const totalCFAAmountStreamedInSinceLastUpdatedAt = - getAmountStreamedSinceLastUpdatedAt( - block.timestamp, - accountTokenSnapshot.updatedAtTimestamp, - accountTokenSnapshot.totalCFAInflowRate - ); const totalCFAAmountStreamedOutSinceLastUpdatedAt = getAmountStreamedSinceLastUpdatedAt( block.timestamp, @@ -1158,56 +1108,12 @@ export function updateATSStreamedAndBalanceUntilUpdatedAt( totalCFAAmountStreamedSinceLastUpdatedAt ); - // update the totalCFAStreamedUntilUpdatedAt (in) - accountTokenSnapshot.totalCFAAmountStreamedInUntilUpdatedAt = - accountTokenSnapshot.totalCFAAmountStreamedInUntilUpdatedAt.plus( - totalCFAAmountStreamedInSinceLastUpdatedAt - ); - // update the totalCFAStreamedUntilUpdatedAt (out) accountTokenSnapshot.totalCFAAmountStreamedOutUntilUpdatedAt = accountTokenSnapshot.totalCFAAmountStreamedOutUntilUpdatedAt.plus( totalCFAAmountStreamedOutSinceLastUpdatedAt ); - //////////////// GDA streamed amounts //////////////// - const totalGDAAmountStreamedSinceLastUpdatedAt = - getAmountStreamedSinceLastUpdatedAt( - block.timestamp, - accountTokenSnapshot.updatedAtTimestamp, - accountTokenSnapshot.totalGDANetFlowRate - ); - const totalGDAAmountStreamedInSinceLastUpdatedAt = - getAmountStreamedSinceLastUpdatedAt( - block.timestamp, - accountTokenSnapshot.updatedAtTimestamp, - accountTokenSnapshot.totalGDAInflowRate - ); - const totalGDAAmountStreamedOutSinceLastUpdatedAt = - getAmountStreamedSinceLastUpdatedAt( - block.timestamp, - accountTokenSnapshot.updatedAtTimestamp, - accountTokenSnapshot.totalGDAOutflowRate - ); - - // update the totalGDAStreamedUntilUpdatedAt (net) - accountTokenSnapshot.totalGDAAmountStreamedUntilUpdatedAt = - accountTokenSnapshot.totalGDAAmountStreamedUntilUpdatedAt.plus( - totalGDAAmountStreamedSinceLastUpdatedAt - ); - - // update the totalGDAStreamedUntilUpdatedAt (in) - accountTokenSnapshot.totalGDAAmountStreamedInUntilUpdatedAt = - accountTokenSnapshot.totalGDAAmountStreamedInUntilUpdatedAt.plus( - totalGDAAmountStreamedInSinceLastUpdatedAt - ); - - // update the totalGDAStreamedUntilUpdatedAt (out) - accountTokenSnapshot.totalGDAAmountStreamedOutUntilUpdatedAt = - accountTokenSnapshot.totalGDAAmountStreamedOutUntilUpdatedAt.plus( - totalGDAAmountStreamedOutSinceLastUpdatedAt - ); - accountTokenSnapshot.save(); const balanceUntilUpdatedAtAfterUpdate = accountTokenSnapshot.balanceUntilUpdatedAt; @@ -1276,18 +1182,6 @@ export function updateTokenStatsStreamedUntilUpdatedAt( cfaAmountStreamedSinceLastUpdatedAt ); - //// GDA streamed amounts //// - const gdaAmountStreamedSinceLastUpdatedAt = - getAmountStreamedSinceLastUpdatedAt( - block.timestamp, - tokenStats.updatedAtTimestamp, - tokenStats.totalGDAOutflowRate - ); - tokenStats.totalGDAAmountStreamedUntilUpdatedAt = - tokenStats.totalGDAAmountStreamedUntilUpdatedAt.plus( - gdaAmountStreamedSinceLastUpdatedAt - ); - tokenStats.updatedAtTimestamp = block.timestamp; tokenStats.updatedAtBlockNumber = block.number; tokenStats.save(); @@ -1446,9 +1340,6 @@ export function updateSenderATSStreamData( senderATS.totalCFADeposit = senderATS.totalCFADeposit.plus(depositDelta); } else { - senderATS.totalGDANetFlowRate = - senderATS.totalGDANetFlowRate.minus(flowRateDelta); - // the outflow rate should never go below 0. senderATS.totalGDAOutflowRate = senderATS.totalGDAOutflowRate .plus(flowRateDelta) @@ -1488,7 +1379,6 @@ export function updateReceiverATSStreamData( flowRateDelta: BigInt, isCreate: boolean, isDelete: boolean, - isCFA: boolean, block: ethereum.Block ): void { const totalNumberOfActiveStreamsDelta = getActiveStreamsDelta( @@ -1531,55 +1421,17 @@ export function updateReceiverATSStreamData( receiverATS.maybeCriticalAtTimestamp ); - if (isCFA) { - receiverATS.totalCFANetFlowRate = - receiverATS.totalCFANetFlowRate.plus(flowRateDelta); - - // the inflow rate should never go below 0. - receiverATS.totalCFAInflowRate = receiverATS.totalCFAInflowRate - .plus(flowRateDelta) - .lt(BIG_INT_ZERO) - ? newFlowRate - : receiverATS.totalCFAInflowRate.plus(flowRateDelta); - - receiverATS.totalCFANumberOfActiveStreams = - receiverATS.totalCFANumberOfActiveStreams + - totalNumberOfActiveStreamsDelta; - receiverATS.activeCFAIncomingStreamCount = - receiverATS.activeCFAIncomingStreamCount + - totalNumberOfActiveStreamsDelta; - receiverATS.inactiveCFAIncomingStreamCount = - receiverATS.inactiveCFAIncomingStreamCount + - totalNumberOfClosedStreamsDelta; - - receiverATS.totalCFANumberOfClosedStreams = - receiverATS.totalCFANumberOfClosedStreams + - totalNumberOfClosedStreamsDelta; - } else { - receiverATS.totalGDANetFlowRate = - receiverATS.totalGDANetFlowRate.plus(flowRateDelta); + receiverATS.totalCFANetFlowRate = + receiverATS.totalCFANetFlowRate.plus(flowRateDelta); - // the inflow rate should never go below 0. - receiverATS.totalGDAInflowRate = receiverATS.totalGDAInflowRate - .plus(flowRateDelta) - .lt(BIG_INT_ZERO) - ? newFlowRate - : receiverATS.totalGDAInflowRate.plus(flowRateDelta); - - receiverATS.totalGDANumberOfActiveStreams = - receiverATS.totalGDANumberOfActiveStreams + - totalNumberOfActiveStreamsDelta; - receiverATS.activeGDAIncomingStreamCount = - receiverATS.activeGDAIncomingStreamCount + - totalNumberOfActiveStreamsDelta; - receiverATS.inactiveGDAIncomingStreamCount = - receiverATS.inactiveGDAIncomingStreamCount + - totalNumberOfClosedStreamsDelta; + receiverATS.totalCFANumberOfActiveStreams = + receiverATS.totalCFANumberOfActiveStreams + + totalNumberOfActiveStreamsDelta; + totalNumberOfClosedStreamsDelta; - receiverATS.totalGDANumberOfClosedStreams = - receiverATS.totalGDANumberOfClosedStreams + - totalNumberOfClosedStreamsDelta; - } + receiverATS.totalCFANumberOfClosedStreams = + receiverATS.totalCFANumberOfClosedStreams + + totalNumberOfClosedStreamsDelta; receiverATS.save(); } @@ -1611,24 +1463,80 @@ export function updateAggregateEntitiesTransferData( tokenStatistic.save(); } + +export function particleRTB( + perUnitSettledValue: BigInt, + perUnitFlowRate: BigInt, + currentTimestamp: BigInt, + lastUpdatedTimestamp: BigInt +): BigInt { + const amountFlowedPerUnit = perUnitFlowRate.times(currentTimestamp.minus(lastUpdatedTimestamp)); + return perUnitSettledValue.plus(amountFlowedPerUnit); +} + +export function monetaryUnitPoolMemberRTB(pool: Pool, poolMember: PoolMember, currentTimestamp: BigInt): BigInt { + const poolPerUnitRTB = particleRTB( + pool.perUnitSettledValue, + pool.perUnitFlowRate, + currentTimestamp, + pool.updatedAtTimestamp + ); + const poolMemberPerUnitRTB = particleRTB( + poolMember.syncedPerUnitSettledValue, + poolMember.syncedPerUnitFlowRate, + currentTimestamp, + poolMember.updatedAtTimestamp + ); + + return poolMember.totalAmountReceivedUntilUpdatedAt.plus( + poolPerUnitRTB.minus(poolMemberPerUnitRTB).times(poolMember.units) + ); +} + /** - * Updates `totalAmountReceivedUntilUpdatedAt` and `poolTotalAmountDistributedUntilUpdatedAt` fields - * Requires an explicit save on the PoolMember entity. - * Requires `pool.totalAmountDistributedUntilUpdatedAt` to be updated prior to calling this function. - * @param pool the pool entity - * @param poolMember the pool member entity - * @returns the updated pool member entity to be saved + * Updates the pool.perUnitSettledValue to the up to date value based on the current block, + * and updates the updatedAtTimestamp and updatedAtBlockNumber. + * @param pool pool entity + * @param block current block + * @returns updated pool entity */ -export function updatePoolMemberTotalAmountUntilUpdatedAtFields(pool: Pool, poolMember: PoolMember): PoolMember { - const amountReceivedDelta = pool.totalUnits.equals(BIG_INT_ZERO) - ? BIG_INT_ZERO - : pool.totalAmountDistributedUntilUpdatedAt - .minus(poolMember.poolTotalAmountDistributedUntilUpdatedAt) - .div(pool.totalUnits) - .times(poolMember.units); - poolMember.totalAmountReceivedUntilUpdatedAt = - poolMember.totalAmountReceivedUntilUpdatedAt.plus(amountReceivedDelta); - poolMember.poolTotalAmountDistributedUntilUpdatedAt = pool.totalAmountDistributedUntilUpdatedAt; +export function settlePoolParticle(pool: Pool, block: ethereum.Block): Pool { + pool.perUnitSettledValue = particleRTB( + pool.perUnitSettledValue, + pool.perUnitFlowRate, + block.timestamp, + pool.updatedAtTimestamp + ); + pool.updatedAtTimestamp = block.timestamp; + pool.updatedAtBlockNumber = block.number; + + return pool; +} + +export function settlePoolMemberParticle(poolMember: PoolMember, block: ethereum.Block): PoolMember { + poolMember.syncedPerUnitSettledValue = particleRTB( + poolMember.syncedPerUnitSettledValue, + poolMember.syncedPerUnitFlowRate, + block.timestamp, + poolMember.updatedAtTimestamp + ); + poolMember.updatedAtTimestamp = block.timestamp; + poolMember.updatedAtBlockNumber = block.number; return poolMember; -} \ No newline at end of file +} + +export function syncPoolMemberParticle(pool: Pool, poolMember: PoolMember): PoolMember { + poolMember.syncedPerUnitSettledValue = pool.perUnitSettledValue; + poolMember.syncedPerUnitFlowRate = pool.perUnitFlowRate; + poolMember.updatedAtTimestamp = pool.updatedAtTimestamp; + poolMember.updatedAtBlockNumber = pool.updatedAtBlockNumber; + + return poolMember; +} + +export function settlePDPoolMemberMU(pool: Pool, poolMember: PoolMember, block: ethereum.Block): void { + pool = settlePoolParticle(pool, block); + poolMember.totalAmountReceivedUntilUpdatedAt = monetaryUnitPoolMemberRTB(pool, poolMember, block.timestamp); + poolMember = syncPoolMemberParticle(pool, poolMember); +} diff --git a/packages/subgraph/src/mappings/cfav1.ts b/packages/subgraph/src/mappings/cfav1.ts index fa548d6091..6fd69406bd 100644 --- a/packages/subgraph/src/mappings/cfav1.ts +++ b/packages/subgraph/src/mappings/cfav1.ts @@ -163,7 +163,6 @@ export function handleFlowUpdated(event: FlowUpdated): void { flowRateDelta, isCreate, isDelete, - true, event.block ); diff --git a/packages/subgraph/src/mappings/flowNFT.ts b/packages/subgraph/src/mappings/flowNFT.ts deleted file mode 100644 index a070abf8dd..0000000000 --- a/packages/subgraph/src/mappings/flowNFT.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - Approval, - ApprovalForAll, - Transfer, - MetadataUpdate, -} from "../../generated/ConstantInflowNFT/IFlowNFTBase"; -import { - ApprovalEvent, - ApprovalForAllEvent, - MetadataUpdateEvent, - TransferEvent, -} from "../../generated/schema"; -import { createEventID, initializeEventEntity } from "../utils"; - -export function handleApproval(event: Approval): void { - const eventId = createEventID("Approval", event); - const ev = new ApprovalEvent(eventId); - initializeEventEntity(ev, event, []); - ev.owner = event.params.owner.toHex(); - ev.to = event.params.approved.toHex(); - ev.tokenId = event.params.tokenId; - - ev.save(); -} - -export function handleApprovalForAll(event: ApprovalForAll): void { - const eventId = createEventID("ApprovalForAll", event); - const ev = new ApprovalForAllEvent(eventId); - initializeEventEntity(ev, event, []); - ev.owner = event.params.owner.toHex(); - ev.operator = event.params.operator.toHex(); - ev.approved = event.params.approved; - - ev.save(); -} - -export function handleTransfer(event: Transfer): void { - const eventId = createEventID("Transfer", event); - const ev = new TransferEvent(eventId); - initializeEventEntity(ev, event, [ - event.address, - event.params.from, - event.params.to, - ]); - ev.isNFTTransfer = true; - ev.from = event.params.from.toHex(); - ev.to = event.params.to.toHex(); - ev.value = event.params.tokenId; - ev.token = event.address; - - ev.save(); -} - -export function handleMetadataUpdate(event: MetadataUpdate): void { - const eventId = createEventID("MetadataUpdate", event); - const ev = new MetadataUpdateEvent(eventId); - initializeEventEntity(ev, event, []); - ev.tokenId = event.params.tokenId; - - ev.save(); -} \ No newline at end of file diff --git a/packages/subgraph/src/mappings/gdav1.ts b/packages/subgraph/src/mappings/gdav1.ts index 69577afe1d..19762416f7 100644 --- a/packages/subgraph/src/mappings/gdav1.ts +++ b/packages/subgraph/src/mappings/gdav1.ts @@ -19,12 +19,13 @@ import { _createTokenStatisticLogEntity, getOrInitPool, getOrInitPoolDistributor, - getOrInitPoolMember, + getOrInitOrUpdatePoolMember, getOrInitTokenStatistic, + settlePDPoolMemberMU, + settlePoolParticle, updateATSStreamedAndBalanceUntilUpdatedAt, updateAggregateDistributionAgreementData, updatePoolDistributorTotalAmountFlowedAndDistributed, - updatePoolMemberTotalAmountUntilUpdatedAtFields, updatePoolTotalAmountFlowedAndDistributed, updateSenderATSStreamData, updateTokenStatisticStreamData, @@ -33,6 +34,7 @@ import { import { BIG_INT_ZERO, createEventID, + divideOrZero, initializeEventEntity, membershipWithUnitsExists, } from "../utils"; @@ -84,7 +86,7 @@ export function handlePoolConnectionUpdated( event: PoolConnectionUpdated ): void { // Update Pool Member Entity - let poolMember = getOrInitPoolMember( + let poolMember = getOrInitOrUpdatePoolMember( event, event.params.pool, event.params.account @@ -93,13 +95,14 @@ export function handlePoolConnectionUpdated( const memberConnectedStatusUpdated = previousIsConnected !== event.params.connected; poolMember.isConnected = event.params.connected; - poolMember.save(); const hasMembershipWithUnits = membershipWithUnitsExists(poolMember.id); // Update Pool Entity let pool = getOrInitPool(event, event.params.pool.toHex()); + // @note we modify pool and poolMember here in memory, but do not save pool = updatePoolTotalAmountFlowedAndDistributed(event, pool); + settlePDPoolMemberMU(pool, poolMember, event.block); if (poolMember.units.gt(BIG_INT_ZERO)) { if (memberConnectedStatusUpdated) { // disconnected -> connected case @@ -127,10 +130,8 @@ export function handlePoolConnectionUpdated( } } } + pool.save(); - - // Update totalAmountDistributedUntilUpdatedAt - poolMember = updatePoolMemberTotalAmountUntilUpdatedAtFields(pool, poolMember); poolMember.save(); // Update Token Stats Streamed Until Updated At @@ -162,6 +163,9 @@ export function handlePoolConnectionUpdated( false // isIDA ); + // Create Event Entity + _createPoolConnectionUpdatedEntity(event, poolMember.id); + // Create ATS and Token Statistic Log Entities const eventName = "PoolConnectionUpdated"; _createAccountTokenSnapshotLogEntity( @@ -172,9 +176,6 @@ export function handlePoolConnectionUpdated( ); _createTokenStatisticLogEntity(event, event.params.token, eventName); - - // Create Event Entity - _createPoolConnectionUpdatedEntity(event, poolMember.id); } export function handleBufferAdjusted(event: BufferAdjusted): void { @@ -229,7 +230,12 @@ export function handleFlowDistributionUpdated( // Update Pool let pool = getOrInitPool(event, event.params.pool.toHex()); + + // @note that we are duplicating update of updatedAtTimestamp/BlockNumber here + // in the two functions pool = updatePoolTotalAmountFlowedAndDistributed(event, pool); + pool = settlePoolParticle(pool, event.block); + pool.perUnitFlowRate = divideOrZero(event.params.newDistributorToPoolFlowRate, pool.totalUnits); pool.flowRate = event.params.newTotalDistributionFlowRate; pool.adjustmentFlowRate = event.params.adjustmentFlowRate; pool.save(); @@ -312,7 +318,13 @@ export function handleInstantDistributionUpdated( // Update Pool let pool = getOrInitPool(event, event.params.pool.toHex()); + + // @note that we are duplicating update of updatedAtTimestamp/BlockNumber here + // in the two functions pool = updatePoolTotalAmountFlowedAndDistributed(event, pool); + pool = settlePoolParticle(pool, event.block); + // @note a speculations on what needs to be done + pool.perUnitSettledValue = pool.perUnitSettledValue.plus(divideOrZero(event.params.actualAmount, pool.totalUnits)); const previousTotalAmountDistributed = pool.totalAmountDistributedUntilUpdatedAt; pool.totalAmountInstantlyDistributedUntilUpdatedAt = diff --git a/packages/subgraph/src/mappings/host.ts b/packages/subgraph/src/mappings/host.ts index 1901b3e3cc..738afd49d0 100644 --- a/packages/subgraph/src/mappings/host.ts +++ b/packages/subgraph/src/mappings/host.ts @@ -18,14 +18,14 @@ import { SuperTokenLogicUpdated, } from "../../generated/Host/ISuperfluid"; import { createEventID, initializeEventEntity } from "../utils"; -import { commitHash, configuration, branch } from "../meta.ignore"; +import { commitHash, configuration, branch, packageVersion } from "../meta.ignore"; import { ethereum } from "@graphprotocol/graph-ts"; import { SuperfluidGovernance } from "../../generated/templates"; export function handleGovernanceReplaced(event: GovernanceReplaced): void { const eventId = createEventID("GovernanceReplaced", event); const ev = new GovernanceReplacedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.oldGov, event.params.newGov]); ev.oldGovernance = event.params.oldGov; ev.newGovernance = event.params.newGov; ev.save(); @@ -42,7 +42,7 @@ export function handleAgreementClassRegistered( ): void { const eventId = createEventID("AgreementClassRegistered", event); const ev = new AgreementClassRegisteredEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.code]); ev.agreementType = event.params.agreementType; ev.code = event.params.code; ev.save(); @@ -55,7 +55,7 @@ export function handleAgreementClassUpdated( ): void { const eventId = createEventID("AgreementClassUpdated", event); const ev = new AgreementClassUpdatedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.code]); ev.agreementType = event.params.agreementType; ev.code = event.params.code; @@ -70,7 +70,7 @@ export function handleSuperTokenFactoryUpdated( ): void { const eventId = createEventID("SuperTokenFactoryUpdated", event); const ev = new SuperTokenFactoryUpdatedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.newFactory]); ev.newFactory = event.params.newFactory; ev.save(); @@ -81,7 +81,7 @@ export function handleSuperTokenLogicUpdated( ): void { const eventId = createEventID("SuperTokenLogicUpdated", event); const ev = new SuperTokenLogicUpdatedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.token, event.params.code]); ev.token = event.params.token; ev.code = event.params.code; @@ -90,7 +90,7 @@ export function handleSuperTokenLogicUpdated( export function handleAppRegistered(event: AppRegistered): void { const ev = new AppRegisteredEvent(createEventID("AppRegistered", event)); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.app]); ev.app = event.params.app; ev.save(); @@ -98,7 +98,7 @@ export function handleAppRegistered(event: AppRegistered): void { export function handleJail(event: Jail): void { const ev = new JailEvent(createEventID("Jail", event)); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.app]); ev.app = event.params.app; ev.reason = event.params.reason; @@ -113,6 +113,7 @@ function initSFMetaOnce(event: ethereum.Event): void { sfMeta.blockNumber = event.block.number; sfMeta.configuration = configuration; sfMeta.branch = branch; + sfMeta.packageVersion = packageVersion; sfMeta.save(); } } diff --git a/packages/subgraph/src/mappings/resolver.ts b/packages/subgraph/src/mappings/resolver.ts index 69a0d3dc26..e814f18560 100644 --- a/packages/subgraph/src/mappings/resolver.ts +++ b/packages/subgraph/src/mappings/resolver.ts @@ -1,24 +1,19 @@ -import { Bytes, ethereum } from "@graphprotocol/graph-ts"; -import { - RoleAdminChanged, - RoleGranted, - RoleRevoked, - Set, -} from "../../generated/ResolverV1/Resolver"; +import { Address, Bytes, ethereum } from "@graphprotocol/graph-ts"; +import { RoleAdminChanged, RoleGranted, RoleRevoked, Set } from "../../generated/ResolverV1/Resolver"; import { + ResolverEntry, RoleAdminChangedEvent, RoleGrantedEvent, RoleRevokedEvent, SetEvent, Token, } from "../../generated/schema"; -import { getOrInitResolverEntry } from "../mappingHelpers"; import { createEventID, initializeEventEntity, ZERO_ADDRESS } from "../utils"; export function handleRoleAdminChanged(event: RoleAdminChanged): void { const eventId = createEventID("RoleAdminChanged", event); const ev = new RoleAdminChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.previousAdminRole, event.params.newAdminRole]); ev.role = event.params.role; ev.previousAdminRole = event.params.previousAdminRole; @@ -29,7 +24,7 @@ export function handleRoleAdminChanged(event: RoleAdminChanged): void { export function handleRoleGranted(event: RoleGranted): void { const eventId = createEventID("RoleGranted", event); const ev = new RoleGrantedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.account, event.params.sender]); ev.role = event.params.role; ev.account = event.params.account; @@ -39,7 +34,7 @@ export function handleRoleGranted(event: RoleGranted): void { export function handleRoleRevoked(event: RoleRevoked): void { const eventId = createEventID("RoleRevoked", event); const ev = new RoleRevokedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.account, event.params.sender]); ev.role = event.params.role; ev.account = event.params.account; @@ -47,14 +42,42 @@ export function handleRoleRevoked(event: RoleRevoked): void { ev.save(); } +function getIsToken(id: string): boolean { + return Token.load(id) != null; +} + +function getOrInitResolverEntry(id: string, target: Address, block: ethereum.Block): ResolverEntry { + let resolverEntry = ResolverEntry.load(id); + + const isListed = target.notEqual(ZERO_ADDRESS); + + if (resolverEntry == null) { + resolverEntry = new ResolverEntry(id); + resolverEntry.createdAtBlockNumber = block.number; + resolverEntry.createdAtTimestamp = block.timestamp; + resolverEntry.targetAddress = target; + // on initialization, we are unlikely to set this to zero address + // if we do, this gets fixed in subsequent set events + resolverEntry.isToken = getIsToken(target.toHex()); + } + + // we only update this if the target is not equal to the zero address + if (isListed) { + resolverEntry.isToken = getIsToken(target.toHex()); + } + resolverEntry.updatedAtBlockNumber = block.number; + resolverEntry.updatedAtTimestamp = block.timestamp; + resolverEntry.isListed = isListed; + + resolverEntry.save(); + + return resolverEntry as ResolverEntry; +} + export function handleSet(event: Set): void { _createSetEvent(event, event.params.target, event.params.name); - const resolverEntry = getOrInitResolverEntry( - event.params.name.toHex(), - event.params.target, - event.block - ); + const resolverEntry = getOrInitResolverEntry(event.params.name.toHex(), event.params.target, event.block); // upon initial setting, we will know if this address belongs to a token contract if (resolverEntry.isToken) { @@ -80,11 +103,7 @@ export function handleSet(event: Set): void { resolverEntry.save(); } -function _createSetEvent( - event: ethereum.Event, - target: Bytes, - name: Bytes -): void { +function _createSetEvent(event: ethereum.Event, target: Bytes, name: Bytes): void { const eventId = createEventID("Set", event); const ev = new SetEvent(eventId); initializeEventEntity(ev, event, [target]); diff --git a/packages/subgraph/src/mappings/superToken.ts b/packages/subgraph/src/mappings/superToken.ts index a6e10d496d..164a2c8abf 100644 --- a/packages/subgraph/src/mappings/superToken.ts +++ b/packages/subgraph/src/mappings/superToken.ts @@ -12,6 +12,7 @@ import { import { AgreementLiquidatedByEvent, AgreementLiquidatedV2Event, + ApprovalEvent, BurnedEvent, MintedEvent, SentEvent, @@ -443,7 +444,6 @@ function _createTransferEventEntity(event: Transfer): void { event.params.from, event.params.to, ]); - ev.isNFTTransfer = false; ev.from = event.params.from.toHex(); ev.to = event.params.to.toHex(); ev.value = event.params.value; @@ -452,6 +452,15 @@ function _createTransferEventEntity(event: Transfer): void { } export function handleApproval(event: Approval): void { + const eventId = createEventID("Approval", event); + const ev = new ApprovalEvent(eventId); + initializeEventEntity(ev, event, [event.address, event.params.owner, event.params.spender]); + ev.owner = event.params.owner.toHex(); + ev.to = event.params.spender.toHex(); + ev.amount = event.params.value; + + ev.save(); + // The entity named `FlowOperators` which currently holds all the user access and approval settings will be renamed to `AccessSettings`. const flowOperator = getOrInitFlowOperator( event.block, diff --git a/packages/subgraph/src/mappings/superTokenFactory.ts b/packages/subgraph/src/mappings/superTokenFactory.ts index d8d3bdf701..e65b939daa 100644 --- a/packages/subgraph/src/mappings/superTokenFactory.ts +++ b/packages/subgraph/src/mappings/superTokenFactory.ts @@ -59,7 +59,7 @@ export function handleSuperTokenLogicCreated( } const eventId = createEventID("SuperTokenLogicCreated", event); const ev = new SuperTokenLogicCreatedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.params.tokenLogic]); ev.tokenLogic = event.params.tokenLogic; ev.save(); diff --git a/packages/subgraph/src/mappings/superfluidGovernance.ts b/packages/subgraph/src/mappings/superfluidGovernance.ts index bbee404b60..a8432dc228 100644 --- a/packages/subgraph/src/mappings/superfluidGovernance.ts +++ b/packages/subgraph/src/mappings/superfluidGovernance.ts @@ -21,7 +21,7 @@ import { getOrInitTokenGovernanceConfig } from "../mappingHelpers"; export function handleConfigChanged(event: ConfigChanged): void { const eventId = createEventID("ConfigChanged", event); const ev = new ConfigChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.address, event.params.host, event.params.superToken]) ev.governanceAddress = event.address; ev.host = event.params.host; @@ -35,7 +35,7 @@ export function handleConfigChanged(event: ConfigChanged): void { export function handleRewardAddressChanged(event: RewardAddressChanged): void { const eventId = createEventID("RewardAddressChanged", event); const ev = new RewardAddressChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.address, event.params.host, event.params.superToken, event.params.rewardAddress]); ev.governanceAddress = event.address; ev.host = event.params.host; @@ -66,7 +66,7 @@ export function handleCFAv1LiquidationPeriodChanged( ): void { const eventId = createEventID("CFAv1LiquidationPeriodChanged", event); const ev = new CFAv1LiquidationPeriodChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.address, event.params.host, event.params.superToken]); ev.governanceAddress = event.address; ev.host = event.params.host; @@ -91,7 +91,7 @@ export function handlePPPConfigurationChanged( ): void { const eventId = createEventID("PPPConfigurationChanged", event); const ev = new PPPConfigurationChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.address, event.params.host, event.params.superToken]); ev.governanceAddress = event.address; ev.host = event.params.host; @@ -118,7 +118,12 @@ export function handleTrustedForwarderChanged( ): void { const eventId = createEventID("TrustedForwarderChanged", event); const ev = new TrustedForwarderChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [ + event.address, + event.params.host, + event.params.superToken, + event.params.forwarder, + ]); ev.governanceAddress = event.address; ev.host = event.params.host; @@ -134,7 +139,7 @@ export function handleSuperTokenMinimumDepositChanged( ): void { const eventId = createEventID("SuperTokenMinimumDepositChanged", event); const ev = new SuperTokenMinimumDepositChangedEvent(eventId); - initializeEventEntity(ev, event, []); + initializeEventEntity(ev, event, [event.address, event.params.host, event.params.superToken]); ev.governanceAddress = event.address; ev.host = event.params.host; diff --git a/packages/subgraph/src/mappings/superfluidPool.ts b/packages/subgraph/src/mappings/superfluidPool.ts index a90b5f5c9f..f4740745c2 100644 --- a/packages/subgraph/src/mappings/superfluidPool.ts +++ b/packages/subgraph/src/mappings/superfluidPool.ts @@ -8,10 +8,10 @@ import { _createAccountTokenSnapshotLogEntity, _createTokenStatisticLogEntity, getOrInitPool, - getOrInitPoolMember, + getOrInitOrUpdatePoolMember, + settlePDPoolMemberMU, updateATSStreamedAndBalanceUntilUpdatedAt, updateAggregateDistributionAgreementData, - updatePoolMemberTotalAmountUntilUpdatedAtFields, updatePoolTotalAmountFlowedAndDistributed, updateTokenStatsStreamedUntilUpdatedAt, } from "../mappingHelpers"; @@ -24,14 +24,17 @@ export function handleDistributionClaimed(event: DistributionClaimed): void { // Update Pool let pool = getOrInitPool(event, event.address.toHex()); + let poolMember = getOrInitOrUpdatePoolMember(event, event.address, event.params.member); + poolMember.totalAmountClaimed = event.params.totalClaimed; + + // settle pool and pool member pool = updatePoolTotalAmountFlowedAndDistributed(event, pool); - pool.save(); + settlePDPoolMemberMU(pool, poolMember, event.block); // Update PoolMember - let poolMember = getOrInitPoolMember(event, event.address, event.params.member); poolMember.totalAmountClaimed = event.params.totalClaimed; - poolMember = updatePoolMemberTotalAmountUntilUpdatedAtFields(pool, poolMember); + pool.save(); poolMember.save(); // Update Token Statistics @@ -48,39 +51,42 @@ export function handleDistributionClaimed(event: DistributionClaimed): void { } export function handleMemberUnitsUpdated(event: MemberUnitsUpdated): void { - // - PoolMember - // - units - let poolMember = getOrInitPoolMember(event, event.address, event.params.member); - const hasMembershipWithUnits = membershipWithUnitsExists(poolMember.id); + let pool = getOrInitPool(event, event.address.toHex()); + let poolMember = getOrInitOrUpdatePoolMember(event, event.address, event.params.member); const previousUnits = poolMember.units; const unitsDelta = event.params.newUnits.minus(previousUnits); - poolMember.units = event.params.newUnits; + const newTotalUnits = pool.totalUnits.plus(unitsDelta); - poolMember.save(); + pool = updatePoolTotalAmountFlowedAndDistributed(event, pool); + settlePDPoolMemberMU(pool, poolMember, event.block); - const eventName = "MemberUnitsUpdated"; - updateTokenStatsStreamedUntilUpdatedAt(event.params.token, event.block); - _createTokenStatisticLogEntity(event, event.params.token, eventName); + const existingPoolFlowRate = pool.perUnitFlowRate.times(pool.totalUnits); + let newPerUnitFlowRate: BigInt; + let remainderRate: BigInt; - updateATSStreamedAndBalanceUntilUpdatedAt(event.params.member, event.params.token, event.block, null); - _createAccountTokenSnapshotLogEntity(event, event.params.member, event.params.token, eventName); + if (!newTotalUnits.equals(BIG_INT_ZERO)) { + newPerUnitFlowRate = existingPoolFlowRate.div(newTotalUnits); + remainderRate = existingPoolFlowRate.minus(newPerUnitFlowRate.times(newTotalUnits)); + } else { + remainderRate = existingPoolFlowRate; + newPerUnitFlowRate = BIG_INT_ZERO; + } + pool.perUnitFlowRate = newPerUnitFlowRate; + pool.totalUnits = newTotalUnits; + + poolMember.syncedPerUnitFlowRate = poolMember.syncedPerUnitFlowRate.plus(remainderRate); + poolMember.units = event.params.newUnits; - let pool = getOrInitPool(event, event.address.toHex()); - pool = updatePoolTotalAmountFlowedAndDistributed(event, pool); if (poolMember.isConnected) { pool.totalConnectedUnits = pool.totalConnectedUnits.plus(unitsDelta); } else { pool.totalDisconnectedUnits = pool.totalDisconnectedUnits.plus(unitsDelta); } - pool.totalUnits = pool.totalUnits.plus(unitsDelta); - pool.save(); - - poolMember = updatePoolMemberTotalAmountUntilUpdatedAtFields(pool, poolMember); - poolMember.save(); // 0 units to > 0 units - if (previousUnits.equals(BIG_INT_ZERO) && event.params.newUnits.gt(BIG_INT_ZERO)) { + const didPoolMemberBecomeActive = previousUnits.equals(BIG_INT_ZERO) && event.params.newUnits.gt(BIG_INT_ZERO); + if (didPoolMemberBecomeActive) { pool.totalMembers = pool.totalMembers + 1; // if the member is connected with units now, we add one to connected if (poolMember.isConnected) { @@ -89,12 +95,11 @@ export function handleMemberUnitsUpdated(event: MemberUnitsUpdated): void { // if the member is disconnected with units now, we add one to disconnected pool.totalDisconnectedMembers = pool.totalDisconnectedMembers + 1; } - pool.save(); updateAggregateDistributionAgreementData( event.params.member, event.params.token, - hasMembershipWithUnits, + true, // has units poolMember.isConnected, true, // only place we increment subWithUnits false, // not deleting @@ -104,8 +109,10 @@ export function handleMemberUnitsUpdated(event: MemberUnitsUpdated): void { false // isIDA ); } + // > 0 units to 0 units - if (previousUnits.gt(BIG_INT_ZERO) && poolMember.units.equals(BIG_INT_ZERO)) { + const didPoolMemberBecomeInactive = previousUnits.gt(BIG_INT_ZERO) && poolMember.units.equals(BIG_INT_ZERO); + if (didPoolMemberBecomeInactive) { pool.totalMembers = pool.totalMembers - 1; // if the member is connected with no units now, we subtract one from connected if (poolMember.isConnected) { @@ -114,12 +121,11 @@ export function handleMemberUnitsUpdated(event: MemberUnitsUpdated): void { // if the member is disconnected with no units now, we subtract one from disconnected pool.totalDisconnectedMembers = pool.totalDisconnectedMembers - 1; } - pool.save(); updateAggregateDistributionAgreementData( event.params.member, event.params.token, - hasMembershipWithUnits, + false, // has units poolMember.isConnected, false, // don't increment memberWithUnits false, // not disconnecting membership @@ -130,8 +136,19 @@ export function handleMemberUnitsUpdated(event: MemberUnitsUpdated): void { ); } + poolMember.save(); + pool.save(); + // Create Event Entity _createMemberUnitsUpdatedEntity(event, poolMember.id, pool.totalUnits); + + // Other entity updates + const eventName = "MemberUnitsUpdated"; + updateTokenStatsStreamedUntilUpdatedAt(event.params.token, event.block); + _createTokenStatisticLogEntity(event, event.params.token, eventName); + + updateATSStreamedAndBalanceUntilUpdatedAt(event.params.member, event.params.token, event.block, null); + _createAccountTokenSnapshotLogEntity(event, event.params.member, event.params.token, eventName); } function _createDistributionClaimedEntity(event: DistributionClaimed, poolMemberId: string): DistributionClaimedEvent { diff --git a/packages/subgraph/src/utils.ts b/packages/subgraph/src/utils.ts index 1d11509bc2..f7b84b85e7 100644 --- a/packages/subgraph/src/utils.ts +++ b/packages/subgraph/src/utils.ts @@ -8,13 +8,14 @@ import { log, Value, } from "@graphprotocol/graph-ts"; -import { ISuperToken as SuperToken } from "../generated/templates/SuperToken/ISuperToken"; import { IndexSubscription, - Token, - TokenStatistic, PoolMember, + Token, } from "../generated/schema"; +import { ISuperToken as SuperToken } from "../generated/templates/SuperToken/ISuperToken"; +import { Resolver } from "../generated/templates/SuperToken/Resolver"; +import { getIsLocalIntegrationTesting } from "./addresses"; /************************************************************************** * Constants @@ -25,7 +26,7 @@ export const ZERO_ADDRESS = Address.zero(); export const MAX_FLOW_RATE = BigInt.fromI32(2).pow(95).minus(BigInt.fromI32(1)); export const ORDER_MULTIPLIER = BigInt.fromI32(10000); export const MAX_SAFE_SECONDS = BigInt.fromI64(8640000000000); //In seconds, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps - +export const MAX_UINT256 = BigInt.fromString("115792089237316195423570985008687907853269984665640564039457584007913129639935"); /************************************************************************** * Convenience Conversions *************************************************************************/ @@ -109,8 +110,7 @@ export function initializeEventEntity( *************************************************************************/ export function handleTokenRPCCalls( - token: Token, - resolverAddress: Address + token: Token ): Token { // we must handle the case when the native token hasn't been initialized // there is no name/symbol, but this may occur later @@ -120,6 +120,20 @@ export function handleTokenRPCCalls( return token; } +export function getIsTokenListed( + token: Token, + resolverAddress: Address +): boolean { + const resolverContract = Resolver.bind(resolverAddress); + const isLocalIntegrationTesting = getIsLocalIntegrationTesting(); + const version = isLocalIntegrationTesting ? "test" : "v1"; + const result = resolverContract.try_get( + "supertokens." + version + "." + token.symbol + ); + const superTokenAddress = result.reverted ? ZERO_ADDRESS : result.value; + return token.id == superTokenAddress.toHex(); +} + export function getTokenInfoAndReturn(token: Token): Token { const tokenAddress = Address.fromString(token.id); const tokenContract = SuperToken.bind(tokenAddress); @@ -137,25 +151,6 @@ export function getTokenInfoAndReturn(token: Token): Token { return token; } -/** - * Gets and sets the total supply for TokenStatistic of a SuperToken upon initial creation - * @param tokenStatistic - * @param tokenAddress - * @returns TokenStatistic - */ -export function getInitialTotalSupplyForSuperToken( - tokenStatistic: TokenStatistic, - tokenAddress: Address -): TokenStatistic { - const tokenContract = SuperToken.bind(tokenAddress); - const totalSupplyResult = tokenContract.try_totalSupply(); - if (totalSupplyResult.reverted) { - return tokenStatistic; - } - tokenStatistic.totalSupply = totalSupplyResult.value; - return tokenStatistic; -} - /** * Helper function which finds out whether a token has a valid host address. * If it does not, we should not create any HOL/events related to the token. @@ -407,3 +402,12 @@ export function createLogID( event.logIndex.toString() ); } + +export function divideOrZero( + numerator: BigInt, + denominator: BigInt +): BigInt { + return denominator.equals(BIG_INT_ZERO) + ? BIG_INT_ZERO + : numerator.div(denominator); +} \ No newline at end of file diff --git a/packages/subgraph/subgraph.template.yaml b/packages/subgraph/subgraph.template.yaml index ab144634cf..498fa057d3 100644 --- a/packages/subgraph/subgraph.template.yaml +++ b/packages/subgraph/subgraph.template.yaml @@ -1,8 +1,10 @@ -specVersion: 0.0.5 -description: Subgraph for the Superfluid Ethereum contracts. +specVersion: 1.0.0 +description: Subgraph for the Superfluid Protocol V1 contracts. repository: https://github.com/superfluid-finance/protocol-monorepo schema: file: ./schema.graphql +indexerHints: + prune: {{#indexerHints_prune}}{{ indexerHints_prune }}{{/indexerHints_prune}}{{^indexerHints_prune}}never{{/indexerHints_prune}} dataSources: - kind: ethereum/contract name: SuperTokenFactory @@ -13,7 +15,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superTokenFactory.ts entities: @@ -50,7 +52,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/host.ts entities: @@ -96,7 +98,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/cfav1.ts entities: @@ -139,7 +141,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/idav1.ts entities: @@ -210,7 +212,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/gdav1.ts entities: @@ -263,7 +265,7 @@ dataSources: startBlock: {{ hostStartBlock }} mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/resolver.ts entities: @@ -289,72 +291,6 @@ dataSources: - event: Set(indexed string,address) handler: handleSet receipt: true - - kind: ethereum/contract - name: ConstantOutflowNFT - network: {{ network }} - source: - address: "{{ constantOutflowNFTAddress }}" - abi: IFlowNFTBase - startBlock: {{ hostStartBlock }} - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - file: ./src/mappings/flowNFT.ts - entities: - - ApprovalEvent - - ApprovalForAllEvent - - MetadataUpdateEvent - - TransferEvent - abis: - - name: IFlowNFTBase - file: ./abis/IFlowNFTBase.json - eventHandlers: - - event: Transfer(indexed address,indexed address,indexed uint256) - handler: handleTransfer - receipt: true - - event: Approval(indexed address,indexed address,indexed uint256) - handler: handleApproval - receipt: true - - event: ApprovalForAll(indexed address,indexed address,bool) - handler: handleApprovalForAll - receipt: true - - event: MetadataUpdate(uint256) - handler: handleMetadataUpdate - receipt: true - - kind: ethereum/contract - name: ConstantInflowNFT - network: {{ network }} - source: - address: "{{ constantInflowNFTAddress }}" - abi: IFlowNFTBase - startBlock: {{ hostStartBlock }} - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - file: ./src/mappings/flowNFT.ts - entities: - - ApprovalEvent - - ApprovalForAllEvent - - MetadataUpdateEvent - - TransferEvent - abis: - - name: IFlowNFTBase - file: ./abis/IFlowNFTBase.json - eventHandlers: - - event: Transfer(indexed address,indexed address,indexed uint256) - handler: handleTransfer - receipt: true - - event: Approval(indexed address,indexed address,indexed uint256) - handler: handleApproval - receipt: true - - event: ApprovalForAll(indexed address,indexed address,bool) - handler: handleApprovalForAll - receipt: true - - event: MetadataUpdate(uint256) - handler: handleMetadataUpdate - receipt: true templates: - name: SuperToken kind: ethereum/contract @@ -363,7 +299,7 @@ templates: abi: ISuperToken mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superToken.ts entities: @@ -422,7 +358,7 @@ templates: abi: SuperfluidGovernanceBase mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superfluidGovernance.ts entities: @@ -462,7 +398,7 @@ templates: abi: TOGA mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/toga.ts entities: @@ -489,7 +425,7 @@ templates: abi: ISuperfluidPool mapping: kind: ethereum/events - apiVersion: 0.0.7 + apiVersion: 0.0.8 language: wasm/assemblyscript file: ./src/mappings/superfluidPool.ts entities: diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 2840864ccd..6072bf1582 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -2,26 +2,12 @@ set -eux -JQ="jq" - # shellcheck disable=SC2207 -GRAPH_CLI="npx --package=@graphprotocol/graph-cli -- graph" -SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" ) - -# list of supported networks by vendor - -# shellcheck disable=SC2034,SC2207 -GRAPH_NETWORKS=( $($JQ -r .[] ./hosted-service-networks.json) ) || exit 1 -# shellcheck disable=SC2034 -SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet") -# shellcheck disable=SC2034 -SUPERFLUID_NETWORKS=( "polygon-zkevm-testnet" "polygon-mainnet" "base-goerli" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet") +GRAPH_CLI="npx --package=@graphprotocol/graph-cli --yes -- graph" +# shellcheck disable=SC2207 +GOLDSKY_CLI="npx --package=@goldskycom/cli --yes -- goldsky" +SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" "goldsky" "airstack" ) -declare -A VENDOR_NETWORKS=( - ["graph"]="${GRAPH_NETWORKS[@]}" - ["satsuma"]="${SATSUMA_NETWORKS[@]}" - ["superfluid"]="${SUPERFLUID_NETWORKS[@]}" -) VENDOR="" NETWORK="" @@ -29,7 +15,7 @@ DEPLOYMENT_ENV="" VERSION_LABEL="" print_usage_and_exit() { - echo "Usage: $0 -o graph|satsuma|superfluid -n -r -v " + echo "Usage: $0 -o graph|satsuma|superfluid|goldsky|airstack -n -r -v " exit 1 } @@ -59,6 +45,32 @@ while [[ $# -gt 0 ]]; do esac done +prepare_deployment() { + # Read environment variables directly, with a fallback Git command for commit_hash + local commit_hash="${GITHUB_SHA:-$(git rev-parse HEAD)}" + local configuration="${CONFIGURATION:-v1}" + + # Get ABI + echo "Getting ABI..." + node "./scripts/getAbi.js" + + # Prepare subgraph manifest + echo "Preparing subgraph manifest..." + ./tasks/prepare-manifest.sh mock + + # Generate meta.ignore.ts file + echo "Generating meta.ignore.ts file..." + COMMIT_HASH="$commit_hash" CONFIGURATION="$configuration" yarn generate-sf-meta + + # Generate AssemblyScript types + echo "Generating AssemblyScript types..." + yarn codegen + + # Get Hosted Service Networks from metadata + echo "Getting Hosted Service Networks from metadata..." + npx ts-node "./scripts/getHostedServiceNetworks.ts" +} + deploy_to_graph() { local network="$1" @@ -66,20 +78,17 @@ deploy_to_graph() { local -A legacyNetworkNames=( ["xdai-mainnet"]="xdai" ["polygon-mainnet"]="matic" - ["eth-goerli"]="goerli" - ["polygon-mumbai"]="mumbai" ) local graphNetwork="${legacyNetworkNames[$network]:-$network}" - local subgraphName="superfluid-finance/protocol-$DEPLOYMENT_ENV-$graphNetwork" + local subgraphName="protocol-$DEPLOYMENT_ENV-$graphNetwork" echo "********* Deploying $network subgraph $subgraphName to The Graph (hosted service). **********" - $GRAPH_CLI deploy \ - --product hosted-service \ - "$subgraphName" \ - --node https://api.thegraph.com/deploy/ \ - --ipfs https://api.thegraph.com/ipfs \ - --access-token "$THE_GRAPH_ACCESS_TOKEN" + + if ! $GRAPH_CLI deploy --studio "$subgraphName" --deploy-key "$THE_GRAPH_ACCESS_TOKEN" --version-label "$VERSION_LABEL"; then + echo "Error: Deployment to The Graph (hosted service) failed for $network" + exit 1 + fi } deploy_to_satsuma() { @@ -109,11 +118,53 @@ deploy_to_superfluid() { local subgraphName="protocol-$DEPLOYMENT_ENV" echo "node url: $nodeUrl, subgraph name: $subgraphName" - $GRAPH_CLI create "$subgraphName" --node "$nodeUrl" - $GRAPH_CLI deploy "$subgraphName" \ - --version-label "$VERSION_LABEL" \ - --node "$nodeUrl" \ - --ipfs "$SUPERFLUID_IPFS_API" + if ! $GRAPH_CLI create "$subgraphName" --node "$nodeUrl"; then + echo "Error: Creation of subgraph $subgraphName on Superfluid (self hosted) failed for $network" + exit 1 + fi + if ! $GRAPH_CLI deploy "$subgraphName" --version-label "$VERSION_LABEL" --node "$nodeUrl" --ipfs "$SUPERFLUID_IPFS_API"; then + echo "Error: Deployment to Superfluid (self hosted) failed for $network" + exit 1 + fi +} + +deploy_to_goldsky() { + local network="$1" + # TODO: use tagging? + + # Get subgraph version from package.json + PACKAGE_JSON_PATH="package.json" + SUBGRAPH_VERSION=$(jq -r '.version' $PACKAGE_JSON_PATH) + + local subgraphName="protocol-$DEPLOYMENT_ENV-$network/$SUBGRAPH_VERSION" + + # Note: when using Graph CLI to deploy, it implicitly triggers build too, but Goldsky CLI doesn't, so we do it explicitly. + if ! $GRAPH_CLI build; then + echo "Error: Build for Goldsky failed" + exit 1 + fi + + echo "********* Deploying $network subgraph $subgraphName to Goldsky. **********" + if ! $GOLDSKY_CLI subgraph deploy "$subgraphName" --path . --token "$GOLDSKY_API_KEY"; then + echo "Error: Deployment to Goldsky failed for $network" + exit 1 + fi +} + +deploy_to_airstack() { + local network="$1" + local nodeUrl="https://subgraph.airstack.xyz/indexer/" + local subgraphName="protocol-$DEPLOYMENT_ENV-$network" + + echo "********* Deploying $network subgraph $subgraphName to Airstack. **********" + if ! $GRAPH_CLI create "$subgraphName" --node "$nodeUrl" --access-token "$AIRSTACK_API_KEY"; then + echo "Error: Creation of subgraph $subgraphName on Airstack failed for $network" + exit 1 + fi + if ! $GRAPH_CLI deploy --version-label "$VERSION_LABEL" --node "$nodeUrl" --deploy-key "$AIRSTACK_API_KEY" --ipfs https://ipfs.airstack.xyz/ipfs/api/v0 --headers '{"Authorization": "'"$AIRSTACK_API_KEY"'"}' "$subgraphName"; then + echo "Error: Deployment to Airstack failed for $network" + exit 1 + fi } # Vendor specific function dispatcher @@ -124,16 +175,7 @@ deploy_to() { local vendor="$1" local network="$2" - # check if network is supported by vendor - local -n networksRef="${vendor^^}_NETWORKS" - # We can safely ignore this warning, becasue the value in network won't contain whitespaces - # shellcheck disable=SC2199,SC2076 - if [[ ! " ${networksRef[@]} " =~ " $network " ]]; then - echo "The network, $network, is currently not on the list of networks supported by $vendor." - exit 1 - fi - - npx ts-node ./scripts/buildNetworkConfig.ts "$network" + npx ts-node ./scripts/buildNetworkConfig.ts "$network" "$vendor" # prepare the manifest prior to deployment # this generates the subgraph.yaml and @@ -150,6 +192,12 @@ deploy_to() { superfluid) deploy_to_superfluid "$network" ;; + goldsky) + deploy_to_goldsky "$network" + ;; + airstack) + deploy_to_airstack "$network" + ;; *) print_usage_and_exit ;; @@ -161,17 +209,18 @@ if [ -z "$VENDOR" ] || [ -z "$NETWORK" ] || [ -z "$DEPLOYMENT_ENV" ] || [ -z "$V print_usage_and_exit fi -# We can safely ignore this warning, becasue the value in vendor won't contain whitespaces +# We can safely ignore this warning, because the value in vendor won't contain whitespaces # shellcheck disable=SC2199,SC2076 if [[ ! " ${SUPPORTED_VENDORS[@]} " =~ " $VENDOR " ]]; then print_usage_and_exit fi -# Handle all vs specific network -if [ "$NETWORK" == "all" ]; then - for network in ${VENDOR_NETWORKS[$VENDOR]}; do - deploy_to "$VENDOR" "$network" - done -else - deploy_to "$VENDOR" "$NETWORK" +#Prepare deployment +# Prepare deployment +if ! prepare_deployment; then + echo "Error: Failed to prepare deployment" + exit 1 fi + +# Deploy the specified network +deploy_to "$VENDOR" "$NETWORK" diff --git a/packages/subgraph/tasks/getSFMeta.sh b/packages/subgraph/tasks/getSFMeta.sh index 16ebcb4cce..d011330ecb 100755 --- a/packages/subgraph/tasks/getSFMeta.sh +++ b/packages/subgraph/tasks/getSFMeta.sh @@ -1,8 +1,16 @@ #!/usr/bin/env bash +# This files is a bash script that is used to generate the src/meta.ignore.ts file. +# This is used to fill out the SFMeta entity (see schema.graphql) +# The different fields: `${SOME_FIELD}` must be set in the enivronment when running this script. + +D="$(readlink -f "$(dirname "$0")")" + BRANCH="$(git branch --show-current)" +PACKAGE_VERSION="$(jq -r ".version" "$D"/../package.json)" -cat > src/meta.ignore.ts << EOF +cat > "$D"/../src/meta.ignore.ts << EOF export let commitHash = "${COMMIT_HASH}"; export let configuration = "${CONFIGURATION}"; export let branch = "${BRANCH}"; -EOF \ No newline at end of file +export let packageVersion = "${PACKAGE_VERSION}"; +EOF diff --git a/packages/subgraph/tasks/setup-graph-node.sh b/packages/subgraph/tasks/setup-graph-node.sh old mode 100644 new mode 100755 index f5050dae5d..bb9a699b69 --- a/packages/subgraph/tasks/setup-graph-node.sh +++ b/packages/subgraph/tasks/setup-graph-node.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash -set -e +set -ex if ! which docker >/dev/null 2>&1 ; then echo "Please install 'docker' first" exit 1 fi -if ! which docker-compose >/dev/null 2>&1; then - echo "Please install 'docker-compose' first" +if ! docker compose --help >/dev/null 2>&1; then + echo "Please install 'docker compose' first" exit 1 fi @@ -17,26 +17,10 @@ if ! which jq >/dev/null 2>&1; then exit 1 fi -# Create the graph-node container -docker-compose up --no-start graph-node +# this creates the bridged network for the composed ervices (network id: subgraph_default) +docker compose up --no-start +# we then extract the gateway ip address and export it +DOCKER_HOST_IP=$(docker network inspect subgraph_default | jq -r '.[0].IPAM.Config[].Gateway') -# Start graph-node so we can inspect it -docker-compose start graph-node - -# Identify the container ID -CONTAINER_ID=$(docker container ls | grep graph-node | cut -d' ' -f1) - -# Inspect the container to identify the host IP address -HOST_IP=$(docker inspect "$CONTAINER_ID" | jq -r .[0].NetworkSettings.Networks[].Gateway) - -echo "Host IP: $HOST_IP" - -# Inject the host IP into docker-compose.yml -sed -i -e "s/host.docker.internal/$HOST_IP/g" docker-compose.yml - -function stop_graph_node { - # Ensure graph-node is stopped - docker-compose stop graph-node -} - -trap stop_graph_node EXIT +# docker compose with required variables +DOCKER_HOST_IP=$DOCKER_HOST_IP docker compose up diff --git a/packages/subgraph/tasks/tagGoldskySubgraph.sh b/packages/subgraph/tasks/tagGoldskySubgraph.sh new file mode 100755 index 0000000000..4626245990 --- /dev/null +++ b/packages/subgraph/tasks/tagGoldskySubgraph.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +# Default subgraph type +subgraph_type="protocol-v1" + +# Default tag +tag="prod" + +# Function to display usage instructions +usage() { + echo "Usage: $0 --token --version [--network |all] [--subgraph-type ] [--tag ]" + exit 1 +} + +# Parse command-line arguments +while [[ "$#" -gt 0 ]]; do + case $1 in + --token) API_KEY="$2"; shift ;; + --version) version="$2"; shift ;; + --network) network="$2"; shift ;; + --subgraph-type) subgraph_type="$2"; shift ;; + --tag) tag="$2"; shift ;; + *) echo "Unknown parameter passed: $1"; usage ;; + esac + shift +done + +# Ensure required arguments are provided +if [ -z "$API_KEY" ] || [ -z "$version" ]; then + usage +fi + +# List of networks (modify this list as needed) +networks=("polygon-mainnet" "xdai-mainnet" "eth-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "eth-sepolia" "avalanche-fuji" "base-sepolia") + +# Function to generate goldsky commands for each network +generate_goldsky_commands() { + local commands="" + for net in "${networks[@]}"; do + commands+=" + if ! goldsky subgraph tag create $subgraph_type-$net/$version --tag $tag; then + echo 'Error: Failed to create subgraph tag for network: $net' >&2 + exit 1 + fi" + done + echo "$commands" +} + +# Function to run the goldsky commands in Docker +run_goldsky_commands_in_docker() { + local commands=$1 + if ! docker run --platform linux/x86_64 -it goldsky/indexed.xyz:latest /bin/bash -c " + if ! goldsky login --token $API_KEY; then + echo 'Error: Failed to login to Goldsky' >&2 + exit 1 + fi + $commands + "; then + echo "Error: Command execution failed" + exit 1 + fi +} + +# Check if the network argument is 'all' +if [ "$network" == "all" ]; then + goldsky_commands=$(generate_goldsky_commands) + run_goldsky_commands_in_docker "$goldsky_commands" +elif [ -n "$network" ]; then + run_goldsky_commands_in_docker "if ! goldsky subgraph tag create $subgraph_type-$network/$version --tag $tag; then + echo 'Error: Failed to create subgraph tag for network: $network' >&2 + exit 1 + fi" +else + usage +fi diff --git a/packages/subgraph/tasks/vendorNetworkMap.json b/packages/subgraph/tasks/vendorNetworkMap.json new file mode 100644 index 0000000000..41e953aa25 --- /dev/null +++ b/packages/subgraph/tasks/vendorNetworkMap.json @@ -0,0 +1,6 @@ +{ + "superfluid": ["polygon-mainnet", "xdai-mainnet", "base-mainnet", "optimism-mainnet", "arbitrum-one", "celo-mainnet", "bsc-mainnet", "avalanche-c", "optimism-sepolia", "scroll-sepolia", "scroll-mainnet", "degenchain", "base-sepolia"], + "goldsky": ["polygon-mainnet", "xdai-mainnet", "eth-mainnet", "base-mainnet", "optimism-mainnet", "arbitrum-one", "bsc-mainnet", "avalanche-c", "optimism-sepolia", "scroll-sepolia", "scroll-mainnet", "eth-sepolia", "avalanche-fuji", "base-sepolia", "degenchain"], + "graph": ["polygon-mainnet", "eth-mainnet", "celo-mainnet"] +} + diff --git a/packages/subgraph/tests/assertionHelpers.ts b/packages/subgraph/tests/assertionHelpers.ts index d844ead10d..faf09c8bdb 100644 --- a/packages/subgraph/tests/assertionHelpers.ts +++ b/packages/subgraph/tests/assertionHelpers.ts @@ -160,7 +160,6 @@ export function assertIDAEventBaseProperties( * @param totalGDAOutflowRate expected total outflow rate for the GDA * @param totalAmountStreamedUntilUpdatedAt expected total amount streamed until updated at timestamp for all flow agreements * @param totalCFAAmountStreamedUntilUpdatedAt expected total amount streamed until updated at timestamp for the CFA - * @param totalGDAAmountStreamedUntilUpdatedAt expected total amount streamed until updated at timestamp for the GDA * @param totalAmountTransferredUntilUpdatedAt expected total amount transferred until updated at timestamp * @param totalAmountDistributedUntilUpdatedAt expected total amount distributed (with IDA) until updated at timestamp * @param totalSupply expected total supply @@ -191,7 +190,6 @@ export function assertTokenStatisticProperties( totalGDAOutflowRate: BigInt, totalAmountStreamedUntilUpdatedAt: BigInt, totalCFAAmountStreamedUntilUpdatedAt: BigInt, - totalGDAAmountStreamedUntilUpdatedAt: BigInt, totalAmountTransferredUntilUpdatedAt: BigInt, totalAmountDistributedUntilUpdatedAt: BigInt, totalSupply: BigInt, @@ -222,7 +220,6 @@ export function assertTokenStatisticProperties( assert.fieldEquals(entityName, id, "totalGDAOutflowRate", totalGDAOutflowRate.toString()); assert.fieldEquals(entityName, id, "totalAmountStreamedUntilUpdatedAt", totalAmountStreamedUntilUpdatedAt.toString()); assert.fieldEquals(entityName, id, "totalCFAAmountStreamedUntilUpdatedAt", totalCFAAmountStreamedUntilUpdatedAt.toString()); - assert.fieldEquals(entityName, id, "totalGDAAmountStreamedUntilUpdatedAt", totalGDAAmountStreamedUntilUpdatedAt.toString()); assert.fieldEquals(entityName, id, "totalAmountTransferredUntilUpdatedAt", totalAmountTransferredUntilUpdatedAt.toString()); assert.fieldEquals(entityName, id, "totalAmountDistributedUntilUpdatedAt", totalAmountDistributedUntilUpdatedAt.toString()); assert.fieldEquals(entityName, id, "totalSupply", totalSupply.toString()); @@ -250,10 +247,8 @@ export function assertTokenStatisticProperties( totalGDADeposit, totalOutflowRate, totalCFAOutflowRate, - totalGDAOutflowRate, totalAmountStreamedUntilUpdatedAt, totalCFAAmountStreamedUntilUpdatedAt, - totalGDAAmountStreamedUntilUpdatedAt, totalAmountTransferredUntilUpdatedAt, totalAmountDistributedUntilUpdatedAt, totalSupply, @@ -302,10 +297,8 @@ export function assertTokenStatisticProperties( * @param totalGDADeposit expected total deposit amount for the GDA * @param totalOutflowRate expected total outflow rate for all flow agreements * @param totalCFAOutflowRate expected total outflow rate for the CFA - * @param totalGDAOutflowRate expected total outflow rate for the GDA * @param totalAmountStreamed expected total amount streamed until timestamp for all flow agreements * @param totalCFAAmountStreamed expected total amount streamed until timestamp for the CFA - * @param totalGDAAmountStreamed expected total amount streamed until timestamp for the GDA * @param totalAmountTransferred expected total amount transferred until timestamp * @param totalAmountDistributed expected total amount distributed (with IDA) until timestamp * @param totalSupply expected total supply @@ -331,10 +324,8 @@ export function assertTokenStatisticLogProperties( totalGDADeposit: BigInt, totalOutflowRate: BigInt, totalCFAOutflowRate: BigInt, - totalGDAOutflowRate: BigInt, totalAmountStreamed: BigInt, totalCFAAmountStreamed: BigInt, - totalGDAAmountStreamed: BigInt, totalAmountTransferred: BigInt, totalAmountDistributed: BigInt, totalSupply: BigInt, @@ -370,10 +361,8 @@ export function assertTokenStatisticLogProperties( assert.fieldEquals(entityName, id, "totalGDADeposit", totalGDADeposit.toString()); assert.fieldEquals(entityName, id, "totalOutflowRate", totalOutflowRate.toString()); assert.fieldEquals(entityName, id, "totalCFAOutflowRate", totalCFAOutflowRate.toString()); - assert.fieldEquals(entityName, id, "totalGDAOutflowRate", totalGDAOutflowRate.toString()); assert.fieldEquals(entityName, id, "totalAmountStreamed", totalAmountStreamed.toString()); assert.fieldEquals(entityName, id, "totalCFAAmountStreamed", totalCFAAmountStreamed.toString()); - assert.fieldEquals(entityName, id, "totalGDAAmountStreamed", totalGDAAmountStreamed.toString()); assert.fieldEquals(entityName, id, "totalAmountTransferred", totalAmountTransferred.toString()); assert.fieldEquals(entityName, id, "totalAmountDistributed", totalAmountDistributed.toString()); assert.fieldEquals(entityName, id, "totalSupply", totalSupply.toString()); @@ -424,7 +413,6 @@ export function assertEmptyTokenStatisticProperties( BIG_INT_ZERO, // totalGDAOutflowRate BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt - BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalAmountTransferredUntilUpdatedAt BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt totalSupply, // totalSupply diff --git a/packages/subgraph/tests/bugs/2024-02-29-aleph-total-supply.test.ts b/packages/subgraph/tests/bugs/2024-02-29-aleph-total-supply.test.ts new file mode 100644 index 0000000000..8bace6e860 --- /dev/null +++ b/packages/subgraph/tests/bugs/2024-02-29-aleph-total-supply.test.ts @@ -0,0 +1,52 @@ +import { Address, BigInt } from "@graphprotocol/graph-ts"; +import { assert, describe, test } from "matchstick-as"; +import { handleMinted } from "../../src/mappings/superToken"; +import { handleCustomSuperTokenCreated } from "../../src/mappings/superTokenFactory"; +import { ZERO_ADDRESS } from "../../src/utils"; +import { bob, alice, resolverAddress } from "../constants"; +import { stringToBytes } from "../converters"; +import { + mockedGetHost, + mockedGetUnderlyingToken, + mockedTokenName, + mockedTokenSymbol, + mockedTokenDecimals, + mockedTokenTotalSupply, + mockedResolverGet, +} from "../mockedFunctions"; +import { createMintedEvent } from "../superToken/superToken.helper"; +import { createCustomSuperTokenCreatedEvent } from "../superTokenFactory/superTokenFactory.helper"; + +// Issue originally reported here: https://github.com/superfluid-finance/protocol-monorepo/issues/1815 +describe("ALEPH Total Supply Bug", () => { + test("superTokenFactory: handleCustomSuperTokenCreated() + handleMinted() - totalSupply", () => { + const superToken = bob; + const totalSupply = BigInt.fromI32(100); + const data = stringToBytes(""); + const operatorData = stringToBytes(""); + + // necessary mock function calls for getOrInitSuperToken + mockedGetHost(superToken); + mockedGetUnderlyingToken(superToken, ZERO_ADDRESS.toHex()); + mockedTokenName(superToken, "tokenName"); + mockedTokenSymbol(superToken, "tokenSymbol"); + mockedTokenDecimals(superToken, 18); + mockedResolverGet(resolverAddress, "supertokens.v1.tokenSymbol", ZERO_ADDRESS.toHexString()); + + // unused mocked function call after change in this commit (removing total supply RPC call in getOrInitSuperToken) + mockedTokenTotalSupply(superToken, totalSupply); + + // create mock events + const customSuperTokenCreatedEvent = createCustomSuperTokenCreatedEvent(superToken); + + const mintedEvent = createMintedEvent(bob, alice, totalSupply, data, operatorData); + // modify the minted event address to be the superToken address + mintedEvent.address = Address.fromString(superToken); + + // handle mock events with handlers + handleCustomSuperTokenCreated(customSuperTokenCreatedEvent); + handleMinted(mintedEvent); + + assert.fieldEquals("TokenStatistic", superToken, "totalSupply", totalSupply.toString()); + }); +}); diff --git a/packages/subgraph/tests/bugs/2024-03-06-pool-member-units-changed.test.ts b/packages/subgraph/tests/bugs/2024-03-06-pool-member-units-changed.test.ts new file mode 100644 index 0000000000..f4053da76a --- /dev/null +++ b/packages/subgraph/tests/bugs/2024-03-06-pool-member-units-changed.test.ts @@ -0,0 +1,89 @@ +import { handleMemberUnitsUpdated } from "../../src/mappings/superfluidPool"; +import { createMemberUnitsUpdatedEvent } from "../gdav1/gdav1.helper"; +import { Address, BigInt } from "@graphprotocol/graph-ts"; +import { FAKE_INITIAL_BALANCE, alice, bob, charlie } from "../constants"; +import { BIG_INT_ZERO, getPoolMemberID } from "../../src/utils"; +import { assert, describe, test } from "matchstick-as"; +import { mockedGetAppManifest, mockedRealtimeBalanceOf } from "../mockedFunctions"; + +describe("PoolMember not updating when units changed", () => { + test("emit MemberUnitsUpdated event", () => { + const superTokenAddress = alice; + + const poolAddress = Address.fromString(bob); + const poolMemberAccountAddress = Address.fromString(charlie); + const poolMemberId = getPoolMemberID(poolAddress, poolMemberAccountAddress); + + mockedGetAppManifest(poolMemberAccountAddress.toHexString(), false, false, BIG_INT_ZERO); + + // Initialize pool member for the first time + const firstEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + poolMemberAccountAddress.toHexString(), + BigInt.fromI32(0), // old units + BigInt.fromI32(0) // new units + ); + firstEvent.address = poolAddress; + + mockedRealtimeBalanceOf( + superTokenAddress, + poolMemberAccountAddress.toHexString(), + firstEvent.block.timestamp, + FAKE_INITIAL_BALANCE, + BigInt.fromI32(0), + BIG_INT_ZERO + ); + + handleMemberUnitsUpdated(firstEvent); + // --- + + + const newUnits = BigInt.fromI32(100); + const blockNumber = BigInt.fromI32(200) + const timestamp = BigInt.fromI32(300) + + const secondEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + poolMemberAccountAddress.toHexString(), + BigInt.fromI32(0), // old units + newUnits + ); + secondEvent.block.timestamp = timestamp + secondEvent.address = poolAddress; + secondEvent.block.number = blockNumber; + + mockedRealtimeBalanceOf( + superTokenAddress, + poolMemberAccountAddress.toHexString(), + secondEvent.block.timestamp, + FAKE_INITIAL_BALANCE, + BigInt.fromI32(0), + BIG_INT_ZERO + ); + + // Act + handleMemberUnitsUpdated(secondEvent); + + // Assert + assert.fieldEquals( + "PoolMember", + poolMemberId, + "units", + newUnits.toString() + ); + + assert.fieldEquals( + "PoolMember", + poolMemberId, + "updatedAtTimestamp", + timestamp.toString() + ); + + assert.fieldEquals( + "PoolMember", + poolMemberId, + "updatedAtBlockNumber", + blockNumber.toString() + ); + }); +}); diff --git a/packages/subgraph/tests/bugs/2024-03-07-pool-member-total-amount-received.test.ts b/packages/subgraph/tests/bugs/2024-03-07-pool-member-total-amount-received.test.ts new file mode 100644 index 0000000000..fdd04955af --- /dev/null +++ b/packages/subgraph/tests/bugs/2024-03-07-pool-member-total-amount-received.test.ts @@ -0,0 +1,481 @@ +import { assert, beforeEach, clearStore, describe, test } from "matchstick-as"; +import { Address, BigInt, Bytes } from "@graphprotocol/graph-ts"; +import { alice as alice_, bob as bob_, delta, echo, maticXAddress, superfluidPool } from "../constants"; +import { getPoolMemberID } from "../../src/utils"; +import { handleFlowDistributionUpdated, handleInstantDistributionUpdated, handlePoolCreated } from "../../src/mappings/gdav1"; +import { createFlowDistributionUpdatedEvent, createInstantDistributionUpdatedEvent, createMemberUnitsUpdatedEvent, createPoolAndReturnPoolCreatedEvent } from "../gdav1/gdav1.helper"; +import { mockedAppManifestAndRealtimeBalanceOf } from "../mockedFunctions"; +import { handleMemberUnitsUpdated } from "../../src/mappings/superfluidPool"; +import { Pool } from "../../generated/schema"; + +describe("PoolMember ending up with wrong `totalAmountReceivedUntilUpdatedAt`", () => { + beforeEach(() => { + clearStore(); + }); + + /** + * Problem description + 1. Create pool + 2. Add member A and update A units to 100 + 3. Distribute 1000 tokens + 4. Add member B and update B units to 100 + 5. Distribute 1000 tokens + + Expected result: + member A 1500 tokens + member B 500 tokens + */ + test("create elaborate scenario with 2 instant distributions and 2 pool members", () => { + const superTokenAddress = maticXAddress; + const poolAdminAndDistributorAddress = Address.fromString(delta); + const poolAddress = Address.fromString(superfluidPool); + + // # Arrange State 1 + // ## Arrange Pool + const poolCreatedEvent = createPoolAndReturnPoolCreatedEvent(poolAdminAndDistributorAddress.toHexString(), superTokenAddress, poolAddress.toHexString()); + + // ## Arrange PoolMember 1 + const aliceAddress = Address.fromString(alice_); + const aliceId = getPoolMemberID(poolAddress, aliceAddress); + const aliceCreatedEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + aliceAddress.toHexString(), + BigInt.fromI32(0), // old units + BigInt.fromI32(100) // new units + ); + aliceCreatedEvent.address = poolAddress; + aliceCreatedEvent.block.timestamp = poolCreatedEvent.block.timestamp; + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, aliceAddress.toHexString(), aliceCreatedEvent.block.timestamp); + handleMemberUnitsUpdated(aliceCreatedEvent); + + // # First distribution + const firstDistributionEvent = createInstantDistributionUpdatedEvent( + superTokenAddress, + poolAddress.toHexString(), + poolAdminAndDistributorAddress.toHexString(), + echo, + BigInt.fromI32(1000), // requested amount + BigInt.fromI32(1000), // actual amount + Bytes.fromHexString("0x") + ); + firstDistributionEvent.block.timestamp = poolCreatedEvent.block.timestamp; + firstDistributionEvent.address = poolAddress; + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, poolAdminAndDistributorAddress.toHexString(), firstDistributionEvent.block.timestamp); + handleInstantDistributionUpdated(firstDistributionEvent); + + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalAmountDistributedUntilUpdatedAt", + "1000" + ); + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalUnits", + "100" + ); + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalMembers", + "1" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "totalAmountReceivedUntilUpdatedAt", + "0" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "units", + "100" + ); + // --- + + // # Arrange State 2 + // ## Arrange PoolMember 2 (new member) + const bobAddress = Address.fromString(bob_); + const bobId = getPoolMemberID(poolAddress, bobAddress); + let createBobEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + bobAddress.toHexString(), + BigInt.fromI32(0), // old units + BigInt.fromI32(100) // new units + ); + createBobEvent.address = poolAddress; + createBobEvent.block.timestamp = BigInt.fromI32(2); + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, bobAddress.toHexString(), createBobEvent.block.timestamp); + handleMemberUnitsUpdated(createBobEvent); + + // # Second distribution + const secondDistributionEvent = createInstantDistributionUpdatedEvent( + superTokenAddress, + poolAddress.toHexString(), + poolAdminAndDistributorAddress.toHexString(), + echo, + BigInt.fromI32(1000), // requested amount + BigInt.fromI32(1000), // actual amount + Bytes.fromHexString("0x") + ); + secondDistributionEvent.block.timestamp = poolCreatedEvent.block.timestamp; + secondDistributionEvent.address = poolAddress; + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, poolAdminAndDistributorAddress.toHexString(), secondDistributionEvent.block.timestamp); + handleInstantDistributionUpdated(secondDistributionEvent); + + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalAmountDistributedUntilUpdatedAt", + "2000" + ); + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalUnits", + "200" + ); + assert.fieldEquals( + "PoolMember", + bobId, + "totalAmountReceivedUntilUpdatedAt", + "0" + ); + assert.fieldEquals( + "PoolMember", + bobId, + "units", + "100" + ); + // --- + + // Arrange State 3 + // # Update PoolMember 2's units to get the `totalAmountReceivedUntilUpdatedAt` + const updateBobEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + bobAddress.toHexString(), + BigInt.fromI32(100), // old units + BigInt.fromI32(100) // new units + ); + // Note, the units can stay the same, we just want to trigger an update. + updateBobEvent.address = poolAddress; + updateBobEvent.block.timestamp = BigInt.fromI32(3); + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, bobAddress.toHexString(), updateBobEvent.block.timestamp); + handleMemberUnitsUpdated(createBobEvent); + + assert.fieldEquals( + "PoolMember", + bobId, + "totalAmountReceivedUntilUpdatedAt", + "500" + ); + assert.fieldEquals( + "PoolMember", + bobId, + "units", + "100" + ); + + // # Update PoolMember 1's units to get the `totalAmountReceivedUntilUpdatedAt` + const updateAliceEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + aliceAddress.toHexString(), + BigInt.fromI32(100), // old units + BigInt.fromI32(100) // new units + ); + // Note, the units can stay the same, we just want to trigger an update. + updateAliceEvent.address = poolAddress; + updateAliceEvent.block.timestamp = BigInt.fromI32(3); + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, aliceAddress.toHexString(), updateAliceEvent.block.timestamp); + handleMemberUnitsUpdated(updateAliceEvent); + + assert.fieldEquals( + "PoolMember", + aliceId, + "totalAmountReceivedUntilUpdatedAt", + "1500" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "units", + "100" + ); + }); + /** + * Problem description + 1. Create pool + 2. Add member A and update A units to 100 + 3. Flow 1000 tokens (elapse 1 second) + 4. Add member B and update B units to 100 + 5. Flow 1000 tokens (elapse 1 second) + 6. Update flow rate to 2000 tokens + 7. Flow 2000 tokens (elapse 1 second) + + Expected result: + member A 2500 tokens + member B 1500 tokens + + Actual result: + member A 100 tokens + member B 50 tokens + */ + test("create elaborate scenario with 2 flowing distributions and 2 pool members", () => { + const superTokenAddress = maticXAddress; + const poolAdminAndDistributorAddress = Address.fromString(delta); + const poolAddress = Address.fromString(superfluidPool); + + // # Arrange State 1 + // ## Arrange Pool + const poolCreatedEvent = createPoolAndReturnPoolCreatedEvent(poolAdminAndDistributorAddress.toHexString(), superTokenAddress, poolAddress.toHexString()); + assert.stringEquals(poolCreatedEvent.block.timestamp.toString(), BigInt.fromI32(1).toString()); + + handlePoolCreated(poolCreatedEvent); + + const pool = Pool.load(poolAddress.toHexString()); + + if (pool) { + pool.updatedAtTimestamp = poolCreatedEvent.block.timestamp; + } + + // ## Arrange PoolMember 1 + const aliceAddress = Address.fromString(alice_); + const aliceId = getPoolMemberID(poolAddress, aliceAddress); + const aliceCreatedEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + aliceAddress.toHexString(), + BigInt.fromI32(0), // old units + BigInt.fromI32(100) // new units + ); + aliceCreatedEvent.address = poolAddress; + aliceCreatedEvent.block.timestamp = poolCreatedEvent.block.timestamp; // 1 + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, aliceAddress.toHexString(), aliceCreatedEvent.block.timestamp); + handleMemberUnitsUpdated(aliceCreatedEvent); + + // # First flow rate + if (pool) { + pool.updatedAtTimestamp = aliceCreatedEvent.block.timestamp; + } + + const firstFlowRateEvent = createFlowDistributionUpdatedEvent( + superTokenAddress, + poolAddress.toHexString(), + poolAdminAndDistributorAddress.toHexString(), + echo, + BigInt.fromI32(0), // oldFlowRate + BigInt.fromI32(1000), // newDistributorToPoolFlowRate + BigInt.fromI32(1000), // newTotalDistributionFlowRate + poolAdminAndDistributorAddress.toHexString(), // adjustmentFlowRecipient + BigInt.fromI32(0), + Bytes.fromHexString("0x") + ); + firstFlowRateEvent.block.timestamp = poolCreatedEvent.block.timestamp; // 1 + firstFlowRateEvent.address = poolAddress; + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, poolAdminAndDistributorAddress.toHexString(), firstFlowRateEvent.block.timestamp); + handleFlowDistributionUpdated(firstFlowRateEvent); + + // # First flow rate + if (pool) { + pool.updatedAtTimestamp = firstFlowRateEvent.block.timestamp; + } + + // TODO: This fails, how has this already flown??? + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalAmountDistributedUntilUpdatedAt", + "0" // nothing is flowed yet + ); + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalUnits", + "100" + ); + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalMembers", + "1" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "totalAmountReceivedUntilUpdatedAt", + "0" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "units", + "100" + ); + // --- + + // # Arrange State 2 + // ## Arrange PoolMember 2 (new member) + const bobAddress = Address.fromString(bob_); + const bobId = getPoolMemberID(poolAddress, bobAddress); + let createBobEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + bobAddress.toHexString(), + BigInt.fromI32(0), // old units + BigInt.fromI32(100) // new units + ); + createBobEvent.address = poolAddress; + createBobEvent.block.timestamp = BigInt.fromI32(2); // Skip 1 second to let it flow to Alice + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, bobAddress.toHexString(), createBobEvent.block.timestamp); + handleMemberUnitsUpdated(createBobEvent); + + if (pool) { + pool.updatedAtTimestamp = createBobEvent.block.timestamp; + } + + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalAmountDistributedUntilUpdatedAt", + "1000" + ); + assert.fieldEquals( + "PoolMember", + bobId, + "totalAmountReceivedUntilUpdatedAt", + "0" // Bob just joined, shouldn't have any received + ); + + // # Second flow rate + const secondFlowRateEvent = createFlowDistributionUpdatedEvent( + superTokenAddress, + poolAddress.toHexString(), + poolAdminAndDistributorAddress.toHexString(), + echo, + BigInt.fromI32(1000), // oldFlowRate + BigInt.fromI32(2000), // newDistributorToPoolFlowRate + BigInt.fromI32(2000), // newTotalDistributionFlowRate + poolAdminAndDistributorAddress.toHexString(), // adjustmentFlowRecipient + BigInt.fromI32(0), + Bytes.fromHexString("0x") + ); + secondFlowRateEvent.block.timestamp = BigInt.fromI32(3); // One second skipped, 2 seconds flown to Alice, 1 second to Bob + secondFlowRateEvent.address = poolAddress; + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, poolAdminAndDistributorAddress.toHexString(), secondFlowRateEvent.block.timestamp); + handleFlowDistributionUpdated(secondFlowRateEvent); + + if (pool) { + pool.updatedAtTimestamp = secondFlowRateEvent.block.timestamp; + } + + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalAmountDistributedUntilUpdatedAt", + "2000" // Only for first flow rate + ); + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalUnits", + "200" + ); + assert.fieldEquals( + "PoolMember", + bobId, + "totalAmountReceivedUntilUpdatedAt", + "0" // it's 500 if we query on-chain, but 0 here because update member units hasn't been called again since + ); + assert.fieldEquals( + "PoolMember", + bobId, + "units", + "100" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "totalAmountReceivedUntilUpdatedAt", + "0" // it's 1500 if we query on-chain, but 0 here because update member units hasn't been called again since + ); + // --- + + // Arrange State 3 + // # Update PoolMember 2's units to get the `totalAmountReceivedUntilUpdatedAt` + const updateBobEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + bobAddress.toHexString(), + BigInt.fromI32(100), // old units + BigInt.fromI32(100) // new units + ); + // Note, the units can stay the same, we just want to trigger an update. + updateBobEvent.address = poolAddress; + updateBobEvent.block.timestamp = BigInt.fromI32(4); // 4 - 1 = 3 seconds of flow + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, bobAddress.toHexString(), updateBobEvent.block.timestamp); + handleMemberUnitsUpdated(updateBobEvent); + + if (pool) { + pool.updatedAtTimestamp = updateBobEvent.block.timestamp; + } + assert.fieldEquals( + "Pool", + poolAddress.toHexString(), + "totalAmountDistributedUntilUpdatedAt", + "4000" + ); + assert.fieldEquals( + "PoolMember", + bobId, + "totalAmountReceivedUntilUpdatedAt", + "1500" // 50% of 2000 + ); + assert.fieldEquals( + "PoolMember", + bobId, + "units", + "100" + ); + + // # Update PoolMember 1's units to get the `totalAmountReceivedUntilUpdatedAt` + const updateAliceEvent = createMemberUnitsUpdatedEvent( + superTokenAddress, + aliceAddress.toHexString(), + BigInt.fromI32(100), // old units + BigInt.fromI32(100) // new units + ); + // Note, the units can stay the same, we just want to trigger an update. + updateAliceEvent.address = poolAddress; + updateAliceEvent.block.timestamp = updateBobEvent.block.timestamp; // 4 + + mockedAppManifestAndRealtimeBalanceOf(superTokenAddress, aliceAddress.toHexString(), updateAliceEvent.block.timestamp); + handleMemberUnitsUpdated(updateAliceEvent); + + if (pool) { + pool.updatedAtTimestamp = updateAliceEvent.block.timestamp; + } + assert.fieldEquals( + "PoolMember", + aliceId, + "totalAmountReceivedUntilUpdatedAt", + "2500" + ); + assert.fieldEquals( + "PoolMember", + aliceId, + "units", + "100" + ); + }) +}); + \ No newline at end of file diff --git a/packages/subgraph/tests/constants.ts b/packages/subgraph/tests/constants.ts index 1c15feacfc..11358dc9e9 100644 --- a/packages/subgraph/tests/constants.ts +++ b/packages/subgraph/tests/constants.ts @@ -26,7 +26,7 @@ export const cfaV1Address = "0x6eee6060f715257b970700bc2656de21dedf074c"; export const idaV1Address = "0xb0aabba4b2783a72c52956cdef62d438eca2d7a1"; export const superTokenFactoryAddress = "0x2c90719f25b10fc5646c82da3240c76fa5bccf34"; export const superTokenLogicAddress = "0x1349b5f1006ef0366a7b6ae41fa9155c6cd91e4b"; -export const resolverAddress = "0xe0cc76334405ee8b39213e620587d815967af39c"; +export const resolverAddress = "0x8bDCb5613153f41B2856F71Bd7A7e0432F6dbe58"; // this is not the actual TOGA export const togaAddress = "0x6aeaee5fd4d05a741723d752d30ee4d72690a8f7"; export const maticXAddress = "0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3"; diff --git a/packages/subgraph/tests/gdav1/hol/gdav1.hol.test.ts b/packages/subgraph/tests/gdav1/hol/gdav1.hol.test.ts index c0e2cfc3f7..9873aef7f1 100644 --- a/packages/subgraph/tests/gdav1/hol/gdav1.hol.test.ts +++ b/packages/subgraph/tests/gdav1/hol/gdav1.hol.test.ts @@ -19,7 +19,7 @@ import { } from "../../../src/mappings/gdav1"; import { updateMemberUnitsAndReturnMemberUnitsUpdatedEvent } from "../gdav1.helper"; import { handleDistributionClaimed, handleMemberUnitsUpdated } from "../../../src/mappings/superfluidPool"; -import { getOrInitPoolMember } from "../../../src/mappingHelpers"; +import { getOrInitOrUpdatePoolMember } from "../../../src/mappingHelpers"; import { stringToBytes } from "../../converters"; const initialFlowRate = BigInt.fromI32(100); @@ -285,7 +285,7 @@ describe("GeneralDistributionAgreementV1 Higher Order Level Entity Unit Tests", const oldUnits = BigInt.fromI32(0); const newUnits = BigInt.fromI32(100000000); const memberUnitsUpdatedEvent = createMemberUnitsUpdatedEvent(superToken, poolMember, oldUnits, newUnits); - const poolMemberEntity = getOrInitPoolMember( + const poolMemberEntity = getOrInitOrUpdatePoolMember( memberUnitsUpdatedEvent, memberUnitsUpdatedEvent.address, Address.fromString(poolMember) @@ -319,7 +319,7 @@ describe("GeneralDistributionAgreementV1 Higher Order Level Entity Unit Tests", const oldUnits = BigInt.fromI32(0); const newUnits = BigInt.fromI32(100000000); const memberUnitsUpdatedEvent = createMemberUnitsUpdatedEvent(superToken, poolMember, oldUnits, newUnits); - const poolMemberEntity = getOrInitPoolMember( + const poolMemberEntity = getOrInitOrUpdatePoolMember( memberUnitsUpdatedEvent, memberUnitsUpdatedEvent.address, Address.fromString(poolMember) @@ -362,7 +362,7 @@ describe("GeneralDistributionAgreementV1 Higher Order Level Entity Unit Tests", const oldUnits = BigInt.fromI32(0); const newUnits = BigInt.fromI32(100000000); const memberUnitsUpdatedEvent = createMemberUnitsUpdatedEvent(superToken, poolMember, oldUnits, newUnits); - const poolMemberEntity = getOrInitPoolMember( + const poolMemberEntity = getOrInitOrUpdatePoolMember( memberUnitsUpdatedEvent, memberUnitsUpdatedEvent.address, Address.fromString(poolMember) @@ -395,7 +395,7 @@ describe("GeneralDistributionAgreementV1 Higher Order Level Entity Unit Tests", const oldUnits = BigInt.fromI32(0); const newUnits = BigInt.fromI32(100000000); const memberUnitsUpdatedEvent = createMemberUnitsUpdatedEvent(superToken, poolMember, oldUnits, newUnits); - const poolMemberEntity = getOrInitPoolMember( + const poolMemberEntity = getOrInitOrUpdatePoolMember( memberUnitsUpdatedEvent, memberUnitsUpdatedEvent.address, Address.fromString(poolMember) diff --git a/packages/subgraph/tests/idav1/event/idav1.event.test.ts b/packages/subgraph/tests/idav1/event/idav1.event.test.ts index 7bc6e08288..c343d17049 100644 --- a/packages/subgraph/tests/idav1/event/idav1.event.test.ts +++ b/packages/subgraph/tests/idav1/event/idav1.event.test.ts @@ -14,9 +14,9 @@ import { } from "../../../src/mappings/idav1"; import { BIG_INT_ZERO, getIndexID, ZERO_ADDRESS } from "../../../src/utils"; import { assertIDAEventBaseProperties, assertIDAIndexEventBaseProperties } from "../../assertionHelpers"; -import { alice, bob, DEFAULT_DECIMALS, FAKE_INITIAL_BALANCE, maticXAddress, maticXName, maticXSymbol } from "../../constants"; +import { alice, bob, DEFAULT_DECIMALS, FAKE_INITIAL_BALANCE, maticXAddress, maticXName, maticXSymbol, resolverAddress } from "../../constants"; import { stringToBytes } from "../../converters"; -import { mockedGetAppManifest, mockedGetHost, mockedHandleSuperTokenInitRPCCalls, mockedRealtimeBalanceOf } from "../../mockedFunctions"; +import { mockedGetAppManifest, mockedGetHost, mockedHandleSuperTokenInitRPCCalls, mockedRealtimeBalanceOf, mockedResolverGet } from "../../mockedFunctions"; import { createIndexCreatedEvent, createIndexDistributionClaimedEvent, @@ -267,6 +267,8 @@ describe("InstantDistributionV1 Event Entity Unit Tests", () => { userData ); + mockedResolverGet(resolverAddress, "supertokens.v1.MATICx", ZERO_ADDRESS.toHexString()); + mockedRealtimeBalanceOf( superToken, subscriber, diff --git a/packages/subgraph/tests/mockedFunctions.ts b/packages/subgraph/tests/mockedFunctions.ts index 88629bdc57..ba9aa3e4b6 100644 --- a/packages/subgraph/tests/mockedFunctions.ts +++ b/packages/subgraph/tests/mockedFunctions.ts @@ -1,11 +1,12 @@ import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"; import { createMockedFunction } from "matchstick-as/assembly/index"; import { FlowUpdated } from "../generated/ConstantFlowAgreementV1/IConstantFlowAgreementV1"; -import { BIG_INT_ZERO } from "../src/utils"; +import { BIG_INT_ZERO, ZERO_ADDRESS } from "../src/utils"; import { FAKE_INITIAL_BALANCE, FAKE_SUPER_TOKEN_TOTAL_SUPPLY, hostAddress, + resolverAddress, } from "./constants"; import { getETHAddress, @@ -46,6 +47,8 @@ export function mockedHandleSuperTokenInitRPCCalls( mockedTokenDecimals(superToken, decimals); // [END] getTokenInfoAndReturn + mockedResolverGet(resolverAddress, "supertokens.v1." + tokenSymbol, ZERO_ADDRESS.toHexString()); + // updateTotalSupplyForNativeSuperToken(token, tokenStatistic, tokenAddress) mockedTokenTotalSupply(superToken, FAKE_SUPER_TOKEN_TOTAL_SUPPLY); } @@ -95,7 +98,7 @@ export function mockedHandleFlowUpdatedRPCCalls( // getOrInitStream(event) => getOrInitAccount(receiver) => host.try_getAppManifest(receiver) mockedGetAppManifest(receiver, false, false, BIG_INT_ZERO); - // [START] getOrInitStream(event) => getOrInitSuperToken(token, block) => handleTokenRPCCalls(token, resolverAddress) + // [START] getOrInitStream(event) => getOrInitSuperToken(token, block) => handleTokenRPCCalls(token) mockedHandleSuperTokenInitRPCCalls( superToken, decimals, @@ -103,7 +106,9 @@ export function mockedHandleFlowUpdatedRPCCalls( tokenName, tokenSymbol ); - // [END] getOrInitStream(event) => getOrInitSuperToken(token, block) => handleTokenRPCCalls(token, resolverAddress) + // [END] getOrInitStream(event) => getOrInitSuperToken(token, block) => handleTokenRPCCalls(token) + + mockedResolverGet(resolverAddress, "supertokens.v1." + tokenSymbol, ZERO_ADDRESS.toHexString()); // updateATSStreamedAndBalanceUntilUpdatedAt => updateATSBalanceAndUpdatedAt => try_realtimeBalanceOf(sender) mockedRealtimeBalanceOf( @@ -379,3 +384,19 @@ export function mockedApprove( ]) .returns([getETHUnsignedBigInt(expectedValue)]); } + +export function mockedAppManifestAndRealtimeBalanceOf( + tokenAddress: string, + accountAddress: string, + timestamp: BigInt +): void { + mockedGetAppManifest(accountAddress, false, false, BIG_INT_ZERO); + mockedRealtimeBalanceOf( + tokenAddress, + accountAddress, + timestamp, + FAKE_INITIAL_BALANCE, + BIG_INT_ZERO, + BIG_INT_ZERO + ); +} diff --git a/packages/subgraph/tests/superToken/event/superToken.event.test.ts b/packages/subgraph/tests/superToken/event/superToken.event.test.ts index 4a335bd4c0..f2ae06e9af 100644 --- a/packages/subgraph/tests/superToken/event/superToken.event.test.ts +++ b/packages/subgraph/tests/superToken/event/superToken.event.test.ts @@ -9,6 +9,7 @@ import { import { handleAgreementLiquidatedBy, handleAgreementLiquidatedV2, + handleApproval, handleBurned, handleMinted, handleSent, @@ -18,7 +19,7 @@ import { } from "../../../src/mappings/superToken"; import { BIG_INT_ONE, BIG_INT_ZERO, encode, ZERO_ADDRESS } from "../../../src/utils"; import { assertEmptyTokenStatisticProperties, assertEventBaseProperties, assertTokenStatisticProperties } from "../../assertionHelpers"; -import { alice, bob, cfaV1Address, charlie, DEFAULT_DECIMALS, delta, FAKE_INITIAL_BALANCE, maticXName, maticXSymbol } from "../../constants"; +import { alice, bob, cfaV1Address, charlie, DEFAULT_DECIMALS, delta, FAKE_INITIAL_BALANCE, FALSE, maticXName, maticXSymbol, TRUE } from "../../constants"; import { getETHAddress, getETHUnsignedBigInt, stringToBytes } from "../../converters"; import { createStream, createStreamRevision } from "../../mockedEntities"; import { mockedGetAppManifest, mockedGetHost, mockedHandleSuperTokenInitRPCCalls, mockedRealtimeBalanceOf } from "../../mockedFunctions"; @@ -28,6 +29,7 @@ import { createBurnedEvent, createMintedEvent, createSentEvent, + createSuperTokenApprovalEvent, createTokenDowngradedEvent, createTokenUpgradedEvent, createTransferEvent, @@ -287,10 +289,9 @@ describe("SuperToken Mapper Unit Tests", () => { BIG_INT_ZERO, // totalGDAOutflowRate BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt - BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalAmountTransferredUntilUpdatedAt BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt - BigInt.fromI32(1000000), // totalSupply = 100 + BIG_INT_ZERO, // totalSupply = 0 3, // totalNumberOfAccounts 3 // totalNumberOfHolders ); @@ -338,6 +339,28 @@ describe("SuperToken Mapper Unit Tests", () => { assert.fieldEquals("TokenDowngradedEvent", id, "amount", amount.toString()); }); + test("handleApproval() - Should create a new ApprovalEvent entity", () => { + const owner = alice; + const spender = bob; + const value = BigInt.fromI32(100); + + const superTokenApprovalEvent = createSuperTokenApprovalEvent( + owner, + spender, + value + ); + + handleApproval(superTokenApprovalEvent); + + const id = assertEventBaseProperties( + superTokenApprovalEvent, + "Approval" + ); + assert.fieldEquals("ApprovalEvent", id, "owner", owner); + assert.fieldEquals("ApprovalEvent", id, "to", spender); + assert.fieldEquals("ApprovalEvent", id, "amount", value.toString()); + }); + test("handleTransfer() - Should create a new TransferEvent entity", () => { const from = alice; const to = bob; @@ -382,10 +405,9 @@ describe("SuperToken Mapper Unit Tests", () => { BIG_INT_ZERO, // totalGDAOutflowRate BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt - BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt value, // totalAmountTransferredUntilUpdatedAt BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt - BigInt.fromI32(1000000), // totalSupply = 100 + BIG_INT_ZERO, // totalSupply = 0 2, // totalNumberOfAccounts, 2 // totalNumberOfHolders ); @@ -488,15 +510,15 @@ describe("SuperToken Mapper Unit Tests", () => { const from = alice; const to = bob; const value = BigInt.fromI32(100); - + const transferEvent = createTransferEvent( from, to, value ); - + handleTransfer(transferEvent); - + const id = assertEventBaseProperties( transferEvent, "Transfer" @@ -504,7 +526,7 @@ describe("SuperToken Mapper Unit Tests", () => { assert.fieldEquals("TransferEvent", id, "from", from); assert.fieldEquals("TransferEvent", id, "to", to); assert.fieldEquals("TransferEvent", id, "value", value.toString()); - + assertTokenStatisticProperties( null, null, @@ -529,13 +551,12 @@ describe("SuperToken Mapper Unit Tests", () => { BIG_INT_ZERO, // totalGDAOutflowRate BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt - BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt value, // totalAmountTransferredUntilUpdatedAt BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt - BigInt.fromI32(1000000), // totalSupply = 100 + BIG_INT_ZERO, // totalSupply = 0 2, // totalNumberOfAccounts, 2 // totalNumberOfHolders - ); + ); const secondTransferEvent = createTransferEvent( @@ -579,10 +600,9 @@ describe("SuperToken Mapper Unit Tests", () => { BIG_INT_ZERO, // totalGDAOutflowRate BIG_INT_ZERO, // totalAmountStreamedUntilUpdatedAt BIG_INT_ZERO, // totalCFAAmountStreamedUntilUpdatedAt - BIG_INT_ZERO, // totalGDAAmountStreamedUntilUpdatedAt value.times(BigInt.fromI32(2)), // totalAmountTransferredUntilUpdatedAt BIG_INT_ZERO, // totalAmountDistributedUntilUpdatedAt - BigInt.fromI32(1000000), // totalSupply = 100 + BIG_INT_ZERO, // totalSupply = 100 2, // totalNumberOfAccounts, 1 // totalNumberOfHolders ); diff --git a/packages/subgraph/tests/superToken/superToken.helper.ts b/packages/subgraph/tests/superToken/superToken.helper.ts index a8f9d82ae3..4ac930cdf8 100644 --- a/packages/subgraph/tests/superToken/superToken.helper.ts +++ b/packages/subgraph/tests/superToken/superToken.helper.ts @@ -77,6 +77,20 @@ export function createTokenUpgradedEvent( return newTokenUpgradedEvent; } +export function createSuperTokenApprovalEvent( + owner: string, + spender: string, + value: BigInt +): Approval { + const newApprovalEvent = changetype(newMockEvent()); + newApprovalEvent.parameters = new Array(); + newApprovalEvent.parameters.push(getAddressEventParam("owner", owner)); + newApprovalEvent.parameters.push(getAddressEventParam("spender", spender)); + newApprovalEvent.parameters.push(getBigIntEventParam("value", value)); + + return newApprovalEvent; +} + export function createTokenDowngradedEvent( account: string, amount: BigInt diff --git a/packages/subgraph/tests/superTokenFactory/superTokenFactory.test.ts b/packages/subgraph/tests/superTokenFactory/superTokenFactory.test.ts index f070724e68..406bca1fa3 100644 --- a/packages/subgraph/tests/superTokenFactory/superTokenFactory.test.ts +++ b/packages/subgraph/tests/superTokenFactory/superTokenFactory.test.ts @@ -19,7 +19,6 @@ import { daiXName, daiXSymbol, DEFAULT_DECIMALS, - FAKE_SUPER_TOKEN_TOTAL_SUPPLY, FALSE, maticXAddress, maticXName, @@ -233,7 +232,7 @@ describe("SuperTokenFactory Mapper Unit Tests", () => { maticXAddress, SuperTokenCreatedEvent.block.timestamp, SuperTokenCreatedEvent.block.number, - FAKE_SUPER_TOKEN_TOTAL_SUPPLY // totalSupply = 100 + BIG_INT_ZERO // totalSupply = 0 ); }); diff --git a/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/chainIds.ts b/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/chainIds.ts index 84dff26b12..ab21df475d 100644 --- a/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/chainIds.ts +++ b/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/chainIds.ts @@ -1,11 +1,7 @@ export const chainIds = [ - 3, // ROPSTEN - 4, // RINKEBY - 5, // GOERLI - 42, // KOVAN // 100, // XDAI //TODO(KK): No infura support 137, // MATIC - 80001, // MUMBAI + 43113 , // OP Sepolia ]; export type Network = { @@ -14,29 +10,13 @@ export type Network = { }; export const networks: Network[] = [ - { - name: "ropsten", - chainId: 3, - }, - { - name: "rinkeby", - chainId: 4, - }, - { - name: "goerli", - chainId: 5, - }, - { - name: "kovan", - chainId: 42, - }, { name: "matic", chainId: 137, }, { - name: "mumbai", - chainId: 80001, + name: "fuji", + chainId: 43113 , }, ]; diff --git a/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/store.ts b/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/store.ts index 2e1b1b1176..f5fe4278a6 100644 --- a/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/store.ts +++ b/sdk-redux-examples/sdk-redux-nextjs-typescript/redux/store.ts @@ -22,13 +22,12 @@ export const subgraphApi = initializeSubgraphApiSlice((options) => ).injectEndpoints(allSubgraphEndpoints); export const makeStore = () => { - const goerliChainId = 5; - setFrameworkForSdkRedux(goerliChainId, () => + const xdaiChainId = 100; + setFrameworkForSdkRedux(xdaiChainId, () => Framework.create({ - chainId: goerliChainId, + chainId: xdaiChainId, provider: new ethers.providers.StaticJsonRpcProvider( - "https://rpc-endpoints.superfluid.dev/eth-goerli", - "goerli" + "https://rpc-endpoints.superfluid.dev/xdai-mainnet" ), }) ); diff --git a/sdk-redux-examples/sdk-redux-react-typecript/package.json b/sdk-redux-examples/sdk-redux-react-typecript/package.json index 75e8dc2f0d..0a2fb27355 100644 --- a/sdk-redux-examples/sdk-redux-react-typecript/package.json +++ b/sdk-redux-examples/sdk-redux-react-typecript/package.json @@ -47,8 +47,7 @@ "start": "react-app-rewired start", "build": "react-app-rewired build", "test": "echo test", - "lint": "echo lint", - "pre-commit": "echo pre-commit" + "lint": "echo lint" }, "eslintConfig": { "extends": "react-app" diff --git a/sdk-redux-examples/sdk-redux-react-typecript/src/wagmiAndRainbowKit.ts b/sdk-redux-examples/sdk-redux-react-typecript/src/wagmiAndRainbowKit.ts index 23dd9cb724..fa4d560fe5 100644 --- a/sdk-redux-examples/sdk-redux-react-typecript/src/wagmiAndRainbowKit.ts +++ b/sdk-redux-examples/sdk-redux-react-typecript/src/wagmiAndRainbowKit.ts @@ -7,13 +7,12 @@ import { } from 'wagmi'; import { polygon, - polygonMumbai, - goerli + avalancheFuji } from 'wagmi/chains' import { publicProvider } from 'wagmi/providers/public'; export const { chains, provider } = configureChains( - [polygon, polygonMumbai, goerli], + [polygon, avalancheFuji], [ publicProvider() ] @@ -21,6 +20,7 @@ export const { chains, provider } = configureChains( export const { connectors } = getDefaultWallets({ appName: 'SDK-redux example', + projectId: "", chains }); diff --git a/tasks/check-changeset.sh b/tasks/check-changeset.sh deleted file mode 100755 index 929d147cf7..0000000000 --- a/tasks/check-changeset.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env bash - -set -e - -SOURCE_REF=$1 -BASE_REF=$2 - -echo "SOURCE_REF: $SOURCE_REF" -echo "BASE_REF: $BASE_REF" - -# fetch the latest commit of the base ref -git fetch origin --depth=1 refs/heads/"${BASE_REF}":refs/remotes/origin/"${BASE_REF}" - -# compare the source branch with the dev branch -git diff --name-only "${SOURCE_REF}" refs/remotes/origin/"${BASE_REF}" > changed-files.list -echo Changed files: -echo --- -cat changed-files.list -echo --- - -function setBuildAll() { - BUILD_ETHEREUM_CONTRACTS=1 - BUILD_HOT_FUZZ=1 - BUILD_SDK_CORE=1 - BUILD_SDK_REDUX=1 - BUILD_SPEC_HASKELL=1 - BUILD_SUBGRAPH=1 - BUILD_AUTOMATION_CONTRACTS=1 - BUILD_SOLIDITY_SEMANTIC_MONEY=1 - echo Everything will be tested. -} - -# set BUILD_* variables to GITHUB_ENV -# (dependency graph implied below) -if [ -n "$GITHUB_ENV" ];then - # if ci workflows changed - if grep -E "^.github/workflows/ci\..*\.yml$" changed-files.list;then - echo "CI workflows changed." - setBuildAll - fi - # if call (reusable) workflows changed - if grep -E "^.github/workflows/call\..*\.yml$" changed-files.list;then - echo "Call workflows changed." - setBuildAll - fi - # if root package.json changed, rebuild everything - if grep -E "^(flake\.nix|flake\.lock|package\.json|yarn\.lock)$" changed-files.list;then - echo "Root package.json changed." - setBuildAll - fi - # if specified ethereum-contracts folders and files changed - if grep -E "^packages/ethereum-contracts/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" changed-files.list;then - BUILD_ETHEREUM_CONTRACTS=1 - BUILD_SUBGRAPH=1 - BUILD_HOT_FUZZ=1 - BUILD_AUTOMATION_CONTRACTS=1 - echo Ethereum contracts, HotFuzz and Subgraph will be tested. - fi - # if specified hot-fuzz folders and files changed - if grep -E "^packages/hot-fuzz/(contracts/|scripts/|.+\.js|.+\.yaml|hot-fuzz|package\.json)" changed-files.list;then - BUILD_HOT_FUZZ=1 - echo HotFuzz will be tested. - fi - # if specified sdk-core folders and files changed - if grep -E "^packages/sdk-core/(src/|test/|package\.json|tsconfig\.*)" changed-files.list;then - BUILD_SDK_CORE=1 - BUILD_SDK_REDUX=1 - BUILD_SUBGRAPH=1 - echo SDK-CORE, SDK-REDUX and SUBGRAPH will be tested. - fi - # if specified sdk-redux folders and files changed - if grep -E "^packages/sdk-redux/(src/|test/|package\.json)" changed-files.list;then - BUILD_SDK_REDUX=1 - echo SDK-REDUX will be tested. - fi - # if specified subgraph folders and files changed - if grep -E "^packages/subgraph/(subgraph\.template\.yaml|schema\.graphql|config|scripts|src|tasks|test|hardhat\.config\.ts|package\.json|docker-compose\.yml)" changed-files.list;then - BUILD_SUBGRAPH=1 - echo Subgraph will be tested. - fi - # if specified haskell folders and files changed - if grep -E "^packages/spec-haskell/(packages/|cabal\.project)" changed-files.list;then - BUILD_SPEC_HASKELL=1 - echo SPEC-HASKELL will be tested. - fi - # if specified automation-contracts/scheduler folders and files changed - if grep -E "^packages/automation-contracts/scheduler/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" changed-files.list;then - BUILD_AUTOMATION_CONTRACTS=1 - echo Automation Contracts will be tested. - fi - # if specified automation-contracts/autowrap folders and files changed - if grep -E "^packages/automation-contracts/autowrap/(contracts/|scripts/|test/|truffle-config\.js|package\.json)" changed-files.list;then - BUILD_AUTOMATION_CONTRACTS=1 - echo Automation Contracts will be tested. - fi - # if specified solidity-semantic-money folders and files changed - if grep -E "^packages/solidity-semantic-money/(src/|test/|foundry\.toml|Makefile|package\.json)" changed-files.list;then - BUILD_SOLIDITY_SEMANTIC_MONEY=1 - echo Solidity semantic money will be tested. - fi - - if [ "$BUILD_ETHEREUM_CONTRACTS" == 1 ] || [ "$BUILD_SDK_CORE" == 1 ] || [ "$BUILD_SDK_REDUX" == 1 ];then - echo "PR packages will be published." - PUBLISH_PR_ARTIFACT=1 - fi - - { - echo "BUILD_ETHEREUM_CONTRACTS=${BUILD_ETHEREUM_CONTRACTS}" - echo "BUILD_HOT_FUZZ=${BUILD_HOT_FUZZ}" - echo "BUILD_SDK_CORE=${BUILD_SDK_CORE}" - echo "BUILD_SDK_REDUX=${BUILD_SDK_REDUX}" - echo "BUILD_SUBGRAPH=${BUILD_SUBGRAPH}" - echo "BUILD_SPEC_HASKELL=${BUILD_SPEC_HASKELL}" - echo "BUILD_AUTOMATION_CONTRACTS=${BUILD_AUTOMATION_CONTRACTS}" - echo "BUILD_SOLIDITY_SEMANTIC_MONEY=${BUILD_SOLIDITY_SEMANTIC_MONEY}" - echo "PUBLISH_PR_ARTIFACT=${PUBLISH_PR_ARTIFACT}" - } >> "$GITHUB_ENV" -fi diff --git a/tasks/create-build-set.sh b/tasks/create-build-set.sh new file mode 100755 index 0000000000..01a7118c20 --- /dev/null +++ b/tasks/create-build-set.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +# Synopsis: Create packages build set based on the files change set. +# Usage: create-build-set.sh SOURCE_REF BASE_REF [BASE_ORIGIN] +# Notes: +# - The files change set is derived from the `git diff` between SOURCE_REF and BASE_REF. +# - Optionally, it fetches BASE_REF first BASE_ORIGIN first before `git diff`. +# - The packages build set is output to GITHUB_ENV or /dev/stdout in a form of "BUILD_*" environment variables. + +console.debug() { + echo "debug:" "$@" > /dev/stderr +} + +set -e + +SOURCE_REF=$1 +BASE_REF=$2 +BASE_ORIGIN=$3 + +console.debug "SOURCE_REF: $SOURCE_REF" +console.debug "BASE_REF: $BASE_REF" + +# fetch the latest commit of the BASE_REF from BASE_ORIGIN +if [ -n "${BASE_ORIGIN}" ]; then + git fetch "${BASE_ORIGIN}" --depth=1 refs/heads/"${BASE_REF}":refs/remotes/"${BASE_ORIGIN}"/"${BASE_REF}" +fi + +# compare the source branch with the dev branch +CHANGED_FILES=changed-files.ignore.list +git diff --name-only "${SOURCE_REF}" refs/remotes/origin/"${BASE_REF}" > "$CHANGED_FILES" +console.debug "=== BEGIN CHANGED FILES" +cat "$CHANGED_FILES" > /dev/stderr +console.debug "=== END CHANGED FILES" + +console.debug "=== BEGIN CREATE BUILD SET" + +function setBuildAll() { + BUILD_ETHEREUM_CONTRACTS=1 + BUILD_HOT_FUZZ=1 + BUILD_SDK_CORE=1 + BUILD_SDK_REDUX=1 + BUILD_SPEC_HASKELL=1 + BUILD_SUBGRAPH=1 + BUILD_AUTOMATION_CONTRACTS=1 + BUILD_SOLIDITY_SEMANTIC_MONEY=1 + console.debug "Everything will be tested." +} + +# if ci workflows changed +if grep -E "^.github/workflows/ci\..*\.yml$" "$CHANGED_FILES" > /dev/null; then + console.debug "CI workflows changed." + setBuildAll +fi + +# if call (reusable) workflows changed +if grep -E "^.github/workflows/call\..*\.yml$" "$CHANGED_FILES" > /dev/null; then + console.debug "Call workflows changed." + setBuildAll +fi + +# if root package.json changed, rebuild everything +if grep -E "^(flake\.nix|flake\.lock|package\.json|yarn\.lock)$" "$CHANGED_FILES" > /dev/null; then + console.debug "Root package.json changed." + setBuildAll +fi + +# if specified haskell folders and files changed +if grep -E "^packages/spec-haskell/" "$CHANGED_FILES" > /dev/null; then + BUILD_SPEC_HASKELL=1 + console.debug SPEC-HASKELL will be tested. +fi + +# if specified solidity-semantic-money folders and files changed +if grep -E "^packages/solidity-semantic-money/" "$CHANGED_FILES" > /dev/null; then + BUILD_SOLIDITY_SEMANTIC_MONEY=1 + BUILD_ETHEREUM_CONTRACTS=1 + console.debug Solidity semantic money will be tested. +fi + +# if specified ethereum-contracts folders and files changed +if grep -E "^packages/ethereum-contracts/" "$CHANGED_FILES" > /dev/null; then + BUILD_ETHEREUM_CONTRACTS=1 + BUILD_SUBGRAPH=1 + BUILD_HOT_FUZZ=1 + BUILD_AUTOMATION_CONTRACTS=1 + console.debug Ethereum contracts, HotFuzz and Subgraph will be tested. +fi + +# if specified sdk-core folders and files changed +if grep -E "^packages/sdk-core/" "$CHANGED_FILES" > /dev/null; then + BUILD_SDK_CORE=1 + BUILD_SDK_REDUX=1 + BUILD_SUBGRAPH=1 + console.debug SDK-CORE, SDK-REDUX and SUBGRAPH will be tested. +fi + +# if specified sdk-redux folders and files changed +if grep -E "^packages/sdk-redux/" "$CHANGED_FILES" > /dev/null; then + BUILD_SDK_REDUX=1 + console.debug SDK-REDUX will be tested. +fi + +# if specified hot-fuzz folders and files changed +if grep -E "^packages/hot-fuzz/" "$CHANGED_FILES" > /dev/null; then + BUILD_HOT_FUZZ=1 + console.debug HotFuzz will be tested. +fi + +# if specified subgraph folders and files changed +if grep -E "^packages/subgraph/" "$CHANGED_FILES" > /dev/null; then + BUILD_SUBGRAPH=1 + console.debug Subgraph will be tested. +fi + +# if specified automation-contracts/scheduler folders and files changed +if grep -E "^packages/automation-contracts/" "$CHANGED_FILES" > /dev/null; then + BUILD_AUTOMATION_CONTRACTS=1 + console.debug Automation Contracts will be tested. +fi + +if [ "$BUILD_ETHEREUM_CONTRACTS" == 1 ] || [ "$BUILD_SDK_CORE" == 1 ] || [ "$BUILD_SDK_REDUX" == 1 ]; then + PUBLISH_PR_ARTIFACT=1 + console.debug "PR packages will be published." +fi + +console.debug "=== END CREATE BUILD SET" + +# print BUILD_* variables to $GITHUB_ENV, for local debugging GITHUB_ENV is default to /dev/stdout +{ + echo "BUILD_ETHEREUM_CONTRACTS=${BUILD_ETHEREUM_CONTRACTS}" + echo "BUILD_HOT_FUZZ=${BUILD_HOT_FUZZ}" + echo "BUILD_SDK_CORE=${BUILD_SDK_CORE}" + echo "BUILD_SDK_REDUX=${BUILD_SDK_REDUX}" + echo "BUILD_SUBGRAPH=${BUILD_SUBGRAPH}" + echo "BUILD_SPEC_HASKELL=${BUILD_SPEC_HASKELL}" + echo "BUILD_AUTOMATION_CONTRACTS=${BUILD_AUTOMATION_CONTRACTS}" + echo "BUILD_SOLIDITY_SEMANTIC_MONEY=${BUILD_SOLIDITY_SEMANTIC_MONEY}" + echo "PUBLISH_PR_ARTIFACT=${PUBLISH_PR_ARTIFACT}" +} >> "${GITHUB_ENV:-/dev/stdout}" diff --git a/tasks/daily-slack-bot.js b/tasks/daily-slack-bot.js index acf12e1739..9584d24530 100644 --- a/tasks/daily-slack-bot.js +++ b/tasks/daily-slack-bot.js @@ -1,5 +1,5 @@ const https = require("https"); -const ethers = require("ethers") +const ethers = require("ethers"); const workflowPath = "https://api.github.com/repos/superfluid-finance/protocol-monorepo/actions/runs?per_page=100"; @@ -30,29 +30,12 @@ const greenImage = //Using graph to get the token list, so please use non-checksum addresses for ignoring tokens const whiteListedAddresses = [ "0xb63e38d21b31719e6df314d3d2c351df0d4a9162", // Polygon Mainnet IDLEx - "0xe01f8743677da897f4e7de9073b57bf034fc2433", // Optimism Goerli and Arbitrum Goerli ETHx, read and write as proxy still works fine "0x00a27a8cf40d419fe581643f5c7d671e158ca4c3", // Old 2021 contract "0x42c3f8648bb518ae5fd74a79b4df6406171095ae", // Old 2021 contract - "0xeb5748f9798b11af79f892f344f585e3a88aa784" // Old 2021 contract -] + "0xeb5748f9798b11af79f892f344f585e3a88aa784", // Old 2021 contract +]; const networkSpecificData = { - "eth-goerli": { - url: "https://api-goerli.etherscan.io/api", - key: process.env.ETHERSCAN_API_KEY, - }, - "polygon-mumbai": { - url: "https://api-testnet.polygonscan.com/api", - key: process.env.POLYGONSCAN_API_KEY, - }, - "optimism-goerli": { - url: "https://api-goerli-optimistic.etherscan.io/api", - key: process.env.OPTIMISTIC_API_KEY, - }, - "arbitrum-goerli": { - url: "https://api-goerli.arbiscan.io/api", - key: process.env.ARBISCAN_API_KEY, - }, "avalanche-fuji": { url: "https://api-testnet.snowtrace.io/api", key: process.env.SNOWTRACE_API_KEY, @@ -61,6 +44,7 @@ const networkSpecificData = { url: "https://api-sepolia.etherscan.io/api", key: process.env.ETHERSCAN_API_KEY, }, + // mainnets "xdai-mainnet": { url: "https://api.gnosisscan.io/api", key: process.env.GNOSISSCAN_API_KEY, @@ -93,15 +77,1316 @@ const networkSpecificData = { url: "https://api.celoscan.io/api", key: process.env.CELOSCAN_API_KEY, }, - "polygon-zkevm-testnet": { - url: "https://api-testnet-zkevm.polygonscan.com/api", - key: process.env.ZKEVM_POLYGONSCAN_API_KEY, - } + "scroll-mainnet": { + url: "https://api.scrollscan.com/api", + key: process.env.SCROLLSCAN_API_KEY, + }, + "scroll-sepolia": { + url: "https://api-sepolia.scrollscan.com/api", + key: process.env.SCROLLSCAN_API_KEY, + }, + "base-mainnet": { + url: "https://api.basescan.org/api", + key: process.env.BASESCAN_API_KEY, + }, }; -const superTokenFactoryABI = [{ "inputs": [{ "internalType": "contract ISuperfluid", "name": "host", "type": "address" }, { "internalType": "contract ISuperToken", "name": "superTokenLogic", "type": "address" }, { "internalType": "contract IConstantOutflowNFT", "name": "constantOutflowNFTLogic", "type": "address" }, { "internalType": "contract IConstantInflowNFT", "name": "constantInflowNFTLogic", "type": "address" }, { "internalType": "contract IPoolAdminNFT", "name": "poolAdminNFT", "type": "address" }, { "internalType": "contract IPoolMemberNFT", "name": "poolMemberNFT", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ALREADY_EXISTS", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_DOES_NOT_EXIST", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_NON_UPGRADEABLE_IS_DEPRECATED", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ONLY_GOVERNANCE_OWNER", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ONLY_HOST", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_UNINITIALIZED", "type": "error" }, { "inputs": [], "name": "SUPER_TOKEN_FACTORY_ZERO_ADDRESS", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "bytes32", "name": "uuid", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "codeAddress", "type": "address" }], "name": "CodeUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "contract ISuperToken", "name": "token", "type": "address" }], "name": "CustomSuperTokenCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "contract ISuperToken", "name": "token", "type": "address" }], "name": "SuperTokenCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "contract ISuperToken", "name": "tokenLogic", "type": "address" }], "name": "SuperTokenLogicCreated", "type": "event" }, { "inputs": [], "name": "CONSTANT_INFLOW_NFT_LOGIC", "outputs": [{ "internalType": "contract IConstantInflowNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "CONSTANT_OUTFLOW_NFT_LOGIC", "outputs": [{ "internalType": "contract IConstantOutflowNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "POOL_ADMIN_NFT_LOGIC", "outputs": [{ "internalType": "contract IPoolAdminNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "POOL_MEMBER_NFT_LOGIC", "outputs": [{ "internalType": "contract IPoolMemberNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "_SUPER_TOKEN_LOGIC", "outputs": [{ "internalType": "contract ISuperToken", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "castrate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_underlyingToken", "type": "address" }], "name": "computeCanonicalERC20WrapperAddress", "outputs": [{ "internalType": "address", "name": "superTokenAddress", "type": "address" }, { "internalType": "bool", "name": "isDeployed", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20WithTokenInfo", "name": "_underlyingToken", "type": "address" }], "name": "createCanonicalERC20Wrapper", "outputs": [{ "internalType": "contract ISuperToken", "name": "", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract ERC20WithTokenInfo", "name": "underlyingToken", "type": "address" }, { "internalType": "enum ISuperTokenFactory.Upgradability", "name": "upgradability", "type": "uint8" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }], "name": "createERC20Wrapper", "outputs": [{ "internalType": "contract ISuperToken", "name": "superToken", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "contract IERC20", "name": "underlyingToken", "type": "address" }, { "internalType": "uint8", "name": "underlyingDecimals", "type": "uint8" }, { "internalType": "enum ISuperTokenFactory.Upgradability", "name": "upgradability", "type": "uint8" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }], "name": "createERC20Wrapper", "outputs": [{ "internalType": "contract ISuperToken", "name": "superToken", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_underlyingTokenAddress", "type": "address" }], "name": "getCanonicalERC20Wrapper", "outputs": [{ "internalType": "address", "name": "superTokenAddress", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCodeAddress", "outputs": [{ "internalType": "address", "name": "codeAddress", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getHost", "outputs": [{ "internalType": "address", "name": "host", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSuperTokenLogic", "outputs": [{ "internalType": "contract ISuperToken", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "underlyingToken", "type": "address" }, { "internalType": "address", "name": "superToken", "type": "address" }], "internalType": "struct SuperTokenFactoryBase.InitializeData[]", "name": "_data", "type": "tuple[]" }], "name": "initializeCanonicalWrapperSuperTokens", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "customSuperTokenProxy", "type": "address" }], "name": "initializeCustomSuperToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newAddress", "type": "address" }], "name": "updateCode", "outputs": [], "stateMutability": "nonpayable", "type": "function" }] -const hostABI = [{"inputs":[{"internalType":"bool","name":"nonUpgradable","type":"bool"},{"internalType":"bool","name":"appWhiteListingEnabled","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"_code","type":"uint256"}],"name":"APP_RULE","type":"error"},{"inputs":[],"name":"HOST_AGREEMENT_ALREADY_REGISTERED","type":"error"},{"inputs":[],"name":"HOST_AGREEMENT_CALLBACK_IS_NOT_ACTION","type":"error"},{"inputs":[],"name":"HOST_AGREEMENT_IS_NOT_REGISTERED","type":"error"},{"inputs":[],"name":"HOST_CALL_AGREEMENT_WITH_CTX_FROM_WRONG_ADDRESS","type":"error"},{"inputs":[],"name":"HOST_CALL_APP_ACTION_WITH_CTX_FROM_WRONG_ADDRESS","type":"error"},{"inputs":[],"name":"HOST_CANNOT_DOWNGRADE_TO_NON_UPGRADEABLE","type":"error"},{"inputs":[],"name":"HOST_INVALID_CONFIG_WORD","type":"error"},{"inputs":[],"name":"HOST_INVALID_OR_EXPIRED_SUPER_APP_REGISTRATION_KEY","type":"error"},{"inputs":[],"name":"HOST_MAX_256_AGREEMENTS","type":"error"},{"inputs":[],"name":"HOST_MUST_BE_CONTRACT","type":"error"},{"inputs":[],"name":"HOST_NEED_MORE_GAS","type":"error"},{"inputs":[],"name":"HOST_NON_UPGRADEABLE","type":"error"},{"inputs":[],"name":"HOST_NON_ZERO_LENGTH_PLACEHOLDER_CTX","type":"error"},{"inputs":[],"name":"HOST_NOT_A_SUPER_APP","type":"error"},{"inputs":[],"name":"HOST_NO_APP_REGISTRATION_PERMISSIONS","type":"error"},{"inputs":[],"name":"HOST_ONLY_GOVERNANCE","type":"error"},{"inputs":[],"name":"HOST_ONLY_LISTED_AGREEMENT","type":"error"},{"inputs":[],"name":"HOST_RECEIVER_IS_NOT_SUPER_APP","type":"error"},{"inputs":[],"name":"HOST_SENDER_IS_NOT_SUPER_APP","type":"error"},{"inputs":[],"name":"HOST_SOURCE_APP_NEEDS_HIGHER_APP_LEVEL","type":"error"},{"inputs":[],"name":"HOST_SUPER_APP_ALREADY_REGISTERED","type":"error"},{"inputs":[],"name":"HOST_SUPER_APP_IS_JAILED","type":"error"},{"inputs":[],"name":"HOST_UNAUTHORIZED_SUPER_APP_FACTORY","type":"error"},{"inputs":[],"name":"HOST_UNKNOWN_BATCH_CALL_OPERATION_TYPE","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"agreementType","type":"bytes32"},{"indexed":false,"internalType":"address","name":"code","type":"address"}],"name":"AgreementClassRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"agreementType","type":"bytes32"},{"indexed":false,"internalType":"address","name":"code","type":"address"}],"name":"AgreementClassUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ISuperApp","name":"app","type":"address"}],"name":"AppRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"uuid","type":"bytes32"},{"indexed":false,"internalType":"address","name":"codeAddress","type":"address"}],"name":"CodeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract ISuperfluidGovernance","name":"oldGov","type":"address"},{"indexed":false,"internalType":"contract ISuperfluidGovernance","name":"newGov","type":"address"}],"name":"GovernanceReplaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ISuperApp","name":"app","type":"address"},{"indexed":false,"internalType":"uint256","name":"reason","type":"uint256"}],"name":"Jail","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract ISuperTokenFactory","name":"newFactory","type":"address"}],"name":"SuperTokenFactoryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ISuperToken","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"code","type":"address"}],"name":"SuperTokenLogicUpdated","type":"event"},{"inputs":[],"name":"APP_WHITE_LISTING_ENABLED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CALLBACK_GAS_LIMIT","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_APP_CALLBACK_LEVEL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NUM_AGREEMENTS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NON_UPGRADABLE_DEPLOYMENT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"bitmap","type":"uint256"},{"internalType":"bytes32","name":"agreementType","type":"bytes32"}],"name":"addToAgreementClassesBitmap","outputs":[{"internalType":"uint256","name":"newBitmap","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"targetApp","type":"address"}],"name":"allowCompositeApp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"ctx","type":"bytes"},{"internalType":"int256","name":"appCreditUsedDelta","type":"int256"}],"name":"appCallbackPop","outputs":[{"internalType":"bytes","name":"newCtx","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"ctx","type":"bytes"},{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"uint256","name":"appCreditGranted","type":"uint256"},{"internalType":"int256","name":"appCreditUsed","type":"int256"},{"internalType":"contract ISuperfluidToken","name":"appCreditToken","type":"address"}],"name":"appCallbackPush","outputs":[{"internalType":"bytes","name":"appCtx","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"operationType","type":"uint32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ISuperfluid.Operation[]","name":"operations","type":"tuple[]"}],"name":"batchCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperAgreement","name":"agreementClass","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes","name":"userData","type":"bytes"}],"name":"callAgreement","outputs":[{"internalType":"bytes","name":"returnedData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperAgreement","name":"agreementClass","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes","name":"userData","type":"bytes"},{"internalType":"bytes","name":"ctx","type":"bytes"}],"name":"callAgreementWithContext","outputs":[{"internalType":"bytes","name":"newCtx","type":"bytes"},{"internalType":"bytes","name":"returnedData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"name":"callAppAction","outputs":[{"internalType":"bytes","name":"returnedData","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bytes","name":"ctx","type":"bytes"}],"name":"callAppActionWithContext","outputs":[{"internalType":"bytes","name":"newCtx","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bool","name":"isTermination","type":"bool"},{"internalType":"bytes","name":"ctx","type":"bytes"}],"name":"callAppAfterCallback","outputs":[{"internalType":"bytes","name":"newCtx","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"bool","name":"isTermination","type":"bool"},{"internalType":"bytes","name":"ctx","type":"bytes"}],"name":"callAppBeforeCallback","outputs":[{"internalType":"bytes","name":"cbdata","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"castrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"ctx","type":"bytes"},{"internalType":"int256","name":"appCreditUsedMore","type":"int256"}],"name":"ctxUseCredit","outputs":[{"internalType":"bytes","name":"newCtx","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"ctx","type":"bytes"}],"name":"decodeCtx","outputs":[{"components":[{"internalType":"uint8","name":"appCallbackLevel","type":"uint8"},{"internalType":"uint8","name":"callType","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"bytes4","name":"agreementSelector","type":"bytes4"},{"internalType":"bytes","name":"userData","type":"bytes"},{"internalType":"uint256","name":"appCreditGranted","type":"uint256"},{"internalType":"uint256","name":"appCreditWantedDeprecated","type":"uint256"},{"internalType":"int256","name":"appCreditUsed","type":"int256"},{"internalType":"address","name":"appAddress","type":"address"},{"internalType":"contract ISuperfluidToken","name":"appCreditToken","type":"address"}],"internalType":"struct ISuperfluid.Context","name":"context","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"operationType","type":"uint32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ISuperfluid.Operation[]","name":"operations","type":"tuple[]"}],"name":"forwardBatchCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementType","type":"bytes32"}],"name":"getAgreementClass","outputs":[{"internalType":"contract ISuperAgreement","name":"agreementClass","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"appAddr","type":"address"}],"name":"getAppCallbackLevel","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"}],"name":"getAppManifest","outputs":[{"internalType":"bool","name":"isSuperApp","type":"bool"},{"internalType":"bool","name":"isJailed","type":"bool"},{"internalType":"uint256","name":"noopMask","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCodeAddress","outputs":[{"internalType":"address","name":"codeAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGovernance","outputs":[{"internalType":"contract ISuperfluidGovernance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSuperTokenFactory","outputs":[{"internalType":"contract ISuperTokenFactory","name":"factory","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSuperTokenFactoryLogic","outputs":[{"internalType":"address","name":"logic","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperfluidGovernance","name":"gov","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperAgreement","name":"agreementClass","type":"address"}],"name":"isAgreementClassListed","outputs":[{"internalType":"bool","name":"yes","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"agreementType","type":"bytes32"}],"name":"isAgreementTypeListed","outputs":[{"internalType":"bool","name":"yes","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"}],"name":"isApp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"}],"name":"isAppJailed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"contract ISuperApp","name":"targetApp","type":"address"}],"name":"isCompositeAppAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"ctx","type":"bytes"}],"name":"isCtxValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"ctx","type":"bytes"},{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"uint256","name":"reason","type":"uint256"}],"name":"jailApp","outputs":[{"internalType":"bytes","name":"newCtx","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bitmap","type":"uint256"}],"name":"mapAgreementClasses","outputs":[{"internalType":"contract ISuperAgreement[]","name":"agreementClasses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"contract ISuperAgreement","name":"agreementClassLogic","type":"address"}],"name":"registerAgreementClass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"configWord","type":"uint256"}],"name":"registerApp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperApp","name":"app","type":"address"},{"internalType":"uint256","name":"configWord","type":"uint256"}],"name":"registerAppByFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"configWord","type":"uint256"},{"internalType":"string","name":"registrationKey","type":"string"}],"name":"registerAppWithKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bitmap","type":"uint256"},{"internalType":"bytes32","name":"agreementType","type":"bytes32"}],"name":"removeFromAgreementClassesBitmap","outputs":[{"internalType":"uint256","name":"newBitmap","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ISuperfluidGovernance","name":"newGov","type":"address"}],"name":"replaceGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperAgreement","name":"agreementClassLogic","type":"address"}],"name":"updateAgreementClass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"updateCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperTokenFactory","name":"newFactory","type":"address"}],"name":"updateSuperTokenFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISuperToken","name":"token","type":"address"}],"name":"updateSuperTokenLogic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"versionRecipient","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"}] - +const superTokenFactoryABI = [ + { + inputs: [ + { + internalType: "contract ISuperfluid", + name: "host", + type: "address", + }, + { + internalType: "contract ISuperToken", + name: "superTokenLogic", + type: "address", + }, + { + internalType: "contract IConstantOutflowNFT", + name: "constantOutflowNFTLogic", + type: "address", + }, + { + internalType: "contract IConstantInflowNFT", + name: "constantInflowNFTLogic", + type: "address", + }, + { + internalType: "contract IPoolAdminNFT", + name: "poolAdminNFT", + type: "address", + }, + { + internalType: "contract IPoolMemberNFT", + name: "poolMemberNFT", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "SUPER_TOKEN_FACTORY_ALREADY_EXISTS", type: "error" }, + { inputs: [], name: "SUPER_TOKEN_FACTORY_DOES_NOT_EXIST", type: "error" }, + { + inputs: [], + name: "SUPER_TOKEN_FACTORY_NON_UPGRADEABLE_IS_DEPRECATED", + type: "error", + }, + { + inputs: [], + name: "SUPER_TOKEN_FACTORY_ONLY_GOVERNANCE_OWNER", + type: "error", + }, + { inputs: [], name: "SUPER_TOKEN_FACTORY_ONLY_HOST", type: "error" }, + { inputs: [], name: "SUPER_TOKEN_FACTORY_UNINITIALIZED", type: "error" }, + { inputs: [], name: "SUPER_TOKEN_FACTORY_ZERO_ADDRESS", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "uuid", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "codeAddress", + type: "address", + }, + ], + name: "CodeUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract ISuperToken", + name: "token", + type: "address", + }, + ], + name: "CustomSuperTokenCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract ISuperToken", + name: "token", + type: "address", + }, + ], + name: "SuperTokenCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract ISuperToken", + name: "tokenLogic", + type: "address", + }, + ], + name: "SuperTokenLogicCreated", + type: "event", + }, + { + inputs: [], + name: "CONSTANT_INFLOW_NFT_LOGIC", + outputs: [ + { + internalType: "contract IConstantInflowNFT", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "CONSTANT_OUTFLOW_NFT_LOGIC", + outputs: [ + { + internalType: "contract IConstantOutflowNFT", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "POOL_ADMIN_NFT_LOGIC", + outputs: [ + { + internalType: "contract IPoolAdminNFT", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "POOL_MEMBER_NFT_LOGIC", + outputs: [ + { + internalType: "contract IPoolMemberNFT", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "_SUPER_TOKEN_LOGIC", + outputs: [ + { internalType: "contract ISuperToken", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "castrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_underlyingToken", + type: "address", + }, + ], + name: "computeCanonicalERC20WrapperAddress", + outputs: [ + { + internalType: "address", + name: "superTokenAddress", + type: "address", + }, + { internalType: "bool", name: "isDeployed", type: "bool" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ERC20WithTokenInfo", + name: "_underlyingToken", + type: "address", + }, + ], + name: "createCanonicalERC20Wrapper", + outputs: [ + { internalType: "contract ISuperToken", name: "", type: "address" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ERC20WithTokenInfo", + name: "underlyingToken", + type: "address", + }, + { + internalType: "enum ISuperTokenFactory.Upgradability", + name: "upgradability", + type: "uint8", + }, + { internalType: "string", name: "name", type: "string" }, + { internalType: "string", name: "symbol", type: "string" }, + ], + name: "createERC20Wrapper", + outputs: [ + { + internalType: "contract ISuperToken", + name: "superToken", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "underlyingToken", + type: "address", + }, + { + internalType: "uint8", + name: "underlyingDecimals", + type: "uint8", + }, + { + internalType: "enum ISuperTokenFactory.Upgradability", + name: "upgradability", + type: "uint8", + }, + { internalType: "string", name: "name", type: "string" }, + { internalType: "string", name: "symbol", type: "string" }, + ], + name: "createERC20Wrapper", + outputs: [ + { + internalType: "contract ISuperToken", + name: "superToken", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_underlyingTokenAddress", + type: "address", + }, + ], + name: "getCanonicalERC20Wrapper", + outputs: [ + { + internalType: "address", + name: "superTokenAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCodeAddress", + outputs: [ + { internalType: "address", name: "codeAddress", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getHost", + outputs: [{ internalType: "address", name: "host", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSuperTokenLogic", + outputs: [ + { internalType: "contract ISuperToken", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "underlyingToken", + type: "address", + }, + { + internalType: "address", + name: "superToken", + type: "address", + }, + ], + internalType: "struct SuperTokenFactoryBase.InitializeData[]", + name: "_data", + type: "tuple[]", + }, + ], + name: "initializeCanonicalWrapperSuperTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "customSuperTokenProxy", + type: "address", + }, + ], + name: "initializeCustomSuperToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "newAddress", type: "address" }, + ], + name: "updateCode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const hostABI = [ + { + inputs: [ + { internalType: "bool", name: "nonUpgradable", type: "bool" }, + { + internalType: "bool", + name: "appWhiteListingEnabled", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [{ internalType: "uint256", name: "_code", type: "uint256" }], + name: "APP_RULE", + type: "error", + }, + { inputs: [], name: "HOST_AGREEMENT_ALREADY_REGISTERED", type: "error" }, + { + inputs: [], + name: "HOST_AGREEMENT_CALLBACK_IS_NOT_ACTION", + type: "error", + }, + { inputs: [], name: "HOST_AGREEMENT_IS_NOT_REGISTERED", type: "error" }, + { + inputs: [], + name: "HOST_CALL_AGREEMENT_WITH_CTX_FROM_WRONG_ADDRESS", + type: "error", + }, + { + inputs: [], + name: "HOST_CALL_APP_ACTION_WITH_CTX_FROM_WRONG_ADDRESS", + type: "error", + }, + { + inputs: [], + name: "HOST_CANNOT_DOWNGRADE_TO_NON_UPGRADEABLE", + type: "error", + }, + { inputs: [], name: "HOST_INVALID_CONFIG_WORD", type: "error" }, + { + inputs: [], + name: "HOST_INVALID_OR_EXPIRED_SUPER_APP_REGISTRATION_KEY", + type: "error", + }, + { inputs: [], name: "HOST_MAX_256_AGREEMENTS", type: "error" }, + { inputs: [], name: "HOST_MUST_BE_CONTRACT", type: "error" }, + { inputs: [], name: "HOST_NEED_MORE_GAS", type: "error" }, + { inputs: [], name: "HOST_NON_UPGRADEABLE", type: "error" }, + { inputs: [], name: "HOST_NON_ZERO_LENGTH_PLACEHOLDER_CTX", type: "error" }, + { inputs: [], name: "HOST_NOT_A_SUPER_APP", type: "error" }, + { inputs: [], name: "HOST_NO_APP_REGISTRATION_PERMISSIONS", type: "error" }, + { inputs: [], name: "HOST_ONLY_GOVERNANCE", type: "error" }, + { inputs: [], name: "HOST_ONLY_LISTED_AGREEMENT", type: "error" }, + { inputs: [], name: "HOST_RECEIVER_IS_NOT_SUPER_APP", type: "error" }, + { inputs: [], name: "HOST_SENDER_IS_NOT_SUPER_APP", type: "error" }, + { + inputs: [], + name: "HOST_SOURCE_APP_NEEDS_HIGHER_APP_LEVEL", + type: "error", + }, + { inputs: [], name: "HOST_SUPER_APP_ALREADY_REGISTERED", type: "error" }, + { inputs: [], name: "HOST_SUPER_APP_IS_JAILED", type: "error" }, + { inputs: [], name: "HOST_UNAUTHORIZED_SUPER_APP_FACTORY", type: "error" }, + { + inputs: [], + name: "HOST_UNKNOWN_BATCH_CALL_OPERATION_TYPE", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "agreementType", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "code", + type: "address", + }, + ], + name: "AgreementClassRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "agreementType", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "code", + type: "address", + }, + ], + name: "AgreementClassUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + ], + name: "AppRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "uuid", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "codeAddress", + type: "address", + }, + ], + name: "CodeUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract ISuperfluidGovernance", + name: "oldGov", + type: "address", + }, + { + indexed: false, + internalType: "contract ISuperfluidGovernance", + name: "newGov", + type: "address", + }, + ], + name: "GovernanceReplaced", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "reason", + type: "uint256", + }, + ], + name: "Jail", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract ISuperTokenFactory", + name: "newFactory", + type: "address", + }, + ], + name: "SuperTokenFactoryUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract ISuperToken", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "code", + type: "address", + }, + ], + name: "SuperTokenLogicUpdated", + type: "event", + }, + { + inputs: [], + name: "APP_WHITE_LISTING_ENABLED", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "CALLBACK_GAS_LIMIT", + outputs: [{ internalType: "uint64", name: "", type: "uint64" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_APP_CALLBACK_LEVEL", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_NUM_AGREEMENTS", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NON_UPGRADABLE_DEPLOYMENT", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "bitmap", type: "uint256" }, + { internalType: "bytes32", name: "agreementType", type: "bytes32" }, + ], + name: "addToAgreementClassesBitmap", + outputs: [ + { internalType: "uint256", name: "newBitmap", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "targetApp", + type: "address", + }, + ], + name: "allowCompositeApp", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes", name: "ctx", type: "bytes" }, + { + internalType: "int256", + name: "appCreditUsedDelta", + type: "int256", + }, + ], + name: "appCallbackPop", + outputs: [{ internalType: "bytes", name: "newCtx", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes", name: "ctx", type: "bytes" }, + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { + internalType: "uint256", + name: "appCreditGranted", + type: "uint256", + }, + { internalType: "int256", name: "appCreditUsed", type: "int256" }, + { + internalType: "contract ISuperfluidToken", + name: "appCreditToken", + type: "address", + }, + ], + name: "appCallbackPush", + outputs: [{ internalType: "bytes", name: "appCtx", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint32", + name: "operationType", + type: "uint32", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + ], + internalType: "struct ISuperfluid.Operation[]", + name: "operations", + type: "tuple[]", + }, + ], + name: "batchCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperAgreement", + name: "agreementClass", + type: "address", + }, + { internalType: "bytes", name: "callData", type: "bytes" }, + { internalType: "bytes", name: "userData", type: "bytes" }, + ], + name: "callAgreement", + outputs: [ + { internalType: "bytes", name: "returnedData", type: "bytes" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperAgreement", + name: "agreementClass", + type: "address", + }, + { internalType: "bytes", name: "callData", type: "bytes" }, + { internalType: "bytes", name: "userData", type: "bytes" }, + { internalType: "bytes", name: "ctx", type: "bytes" }, + ], + name: "callAgreementWithContext", + outputs: [ + { internalType: "bytes", name: "newCtx", type: "bytes" }, + { internalType: "bytes", name: "returnedData", type: "bytes" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { internalType: "bytes", name: "callData", type: "bytes" }, + ], + name: "callAppAction", + outputs: [ + { internalType: "bytes", name: "returnedData", type: "bytes" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { internalType: "bytes", name: "callData", type: "bytes" }, + { internalType: "bytes", name: "ctx", type: "bytes" }, + ], + name: "callAppActionWithContext", + outputs: [{ internalType: "bytes", name: "newCtx", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { internalType: "bytes", name: "callData", type: "bytes" }, + { internalType: "bool", name: "isTermination", type: "bool" }, + { internalType: "bytes", name: "ctx", type: "bytes" }, + ], + name: "callAppAfterCallback", + outputs: [{ internalType: "bytes", name: "newCtx", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { internalType: "bytes", name: "callData", type: "bytes" }, + { internalType: "bool", name: "isTermination", type: "bool" }, + { internalType: "bytes", name: "ctx", type: "bytes" }, + ], + name: "callAppBeforeCallback", + outputs: [{ internalType: "bytes", name: "cbdata", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "castrate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes", name: "ctx", type: "bytes" }, + { + internalType: "int256", + name: "appCreditUsedMore", + type: "int256", + }, + ], + name: "ctxUseCredit", + outputs: [{ internalType: "bytes", name: "newCtx", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "ctx", type: "bytes" }], + name: "decodeCtx", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "appCallbackLevel", + type: "uint8", + }, + { internalType: "uint8", name: "callType", type: "uint8" }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "address", + name: "msgSender", + type: "address", + }, + { + internalType: "bytes4", + name: "agreementSelector", + type: "bytes4", + }, + { internalType: "bytes", name: "userData", type: "bytes" }, + { + internalType: "uint256", + name: "appCreditGranted", + type: "uint256", + }, + { + internalType: "uint256", + name: "appCreditWantedDeprecated", + type: "uint256", + }, + { + internalType: "int256", + name: "appCreditUsed", + type: "int256", + }, + { + internalType: "address", + name: "appAddress", + type: "address", + }, + { + internalType: "contract ISuperfluidToken", + name: "appCreditToken", + type: "address", + }, + ], + internalType: "struct ISuperfluid.Context", + name: "context", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint32", + name: "operationType", + type: "uint32", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + ], + internalType: "struct ISuperfluid.Operation[]", + name: "operations", + type: "tuple[]", + }, + ], + name: "forwardBatchCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "agreementType", type: "bytes32" }, + ], + name: "getAgreementClass", + outputs: [ + { + internalType: "contract ISuperAgreement", + name: "agreementClass", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "appAddr", + type: "address", + }, + ], + name: "getAppCallbackLevel", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + ], + name: "getAppManifest", + outputs: [ + { internalType: "bool", name: "isSuperApp", type: "bool" }, + { internalType: "bool", name: "isJailed", type: "bool" }, + { internalType: "uint256", name: "noopMask", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCodeAddress", + outputs: [ + { internalType: "address", name: "codeAddress", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getGovernance", + outputs: [ + { + internalType: "contract ISuperfluidGovernance", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNow", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSuperTokenFactory", + outputs: [ + { + internalType: "contract ISuperTokenFactory", + name: "factory", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSuperTokenFactoryLogic", + outputs: [{ internalType: "address", name: "logic", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperfluidGovernance", + name: "gov", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperAgreement", + name: "agreementClass", + type: "address", + }, + ], + name: "isAgreementClassListed", + outputs: [{ internalType: "bool", name: "yes", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "agreementType", type: "bytes32" }, + ], + name: "isAgreementTypeListed", + outputs: [{ internalType: "bool", name: "yes", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + ], + name: "isApp", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + ], + name: "isAppJailed", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { + internalType: "contract ISuperApp", + name: "targetApp", + type: "address", + }, + ], + name: "isCompositeAppAllowed", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "ctx", type: "bytes" }], + name: "isCtxValid", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "forwarder", type: "address" }, + ], + name: "isTrustedForwarder", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes", name: "ctx", type: "bytes" }, + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { internalType: "uint256", name: "reason", type: "uint256" }, + ], + name: "jailApp", + outputs: [{ internalType: "bytes", name: "newCtx", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "bitmap", type: "uint256" }], + name: "mapAgreementClasses", + outputs: [ + { + internalType: "contract ISuperAgreement[]", + name: "agreementClasses", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperAgreement", + name: "agreementClassLogic", + type: "address", + }, + ], + name: "registerAgreementClass", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "configWord", type: "uint256" }, + ], + name: "registerApp", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperApp", + name: "app", + type: "address", + }, + { internalType: "uint256", name: "configWord", type: "uint256" }, + ], + name: "registerAppByFactory", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "configWord", type: "uint256" }, + { internalType: "string", name: "registrationKey", type: "string" }, + ], + name: "registerAppWithKey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "bitmap", type: "uint256" }, + { internalType: "bytes32", name: "agreementType", type: "bytes32" }, + ], + name: "removeFromAgreementClassesBitmap", + outputs: [ + { internalType: "uint256", name: "newBitmap", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperfluidGovernance", + name: "newGov", + type: "address", + }, + ], + name: "replaceGovernance", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperAgreement", + name: "agreementClassLogic", + type: "address", + }, + ], + name: "updateAgreementClass", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "newAddress", type: "address" }, + ], + name: "updateCode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperTokenFactory", + name: "newFactory", + type: "address", + }, + ], + name: "updateSuperTokenFactory", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperToken", + name: "token", + type: "address", + }, + ], + name: "updateSuperTokenLogic", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "versionRecipient", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "pure", + type: "function", + }, +]; async function getDataAsJson(url) { let options = { @@ -163,45 +1448,53 @@ async function sendMessageToSlack(data) { } async function getSuperTokenLogicAddress(network) { - const rpcUrl = "https://rpc-endpoints.superfluid.dev/" + network.name - const provider = new ethers.JsonRpcProvider(rpcUrl) - const contract = new ethers.Contract(network.contractsV1.superTokenFactory, superTokenFactoryABI, provider) + const rpcUrl = "https://rpc-endpoints.superfluid.dev/" + network.name; + const provider = new ethers.JsonRpcProvider(rpcUrl); + const contract = new ethers.Contract( + network.contractsV1.superTokenFactory, + superTokenFactoryABI, + provider, + ); try { - return await contract.getSuperTokenLogic() + return await contract.getSuperTokenLogic(); } catch (e) { - console.log(e) + console.log(e); } } async function getGovernanceAddress(network) { - const rpcUrl = "https://rpc-endpoints.superfluid.dev/" + network.name - const provider = new ethers.JsonRpcProvider(rpcUrl) - const contract = new ethers.Contract(network.contractsV1.host , hostABI, provider) + const rpcUrl = "https://rpc-endpoints.superfluid.dev/" + network.name; + const provider = new ethers.JsonRpcProvider(rpcUrl); + const contract = new ethers.Contract( + network.contractsV1.host, + hostABI, + provider, + ); try { - return await contract.getGovernance() + return await contract.getGovernance(); } catch (e) { - console.log(e) + console.log(e); } } - async function checkNetworkContractVerification(network) { if (networkSpecificData[network.name] === undefined) { return ""; } let contractsToCheck = network.contractsV1; contractsToCheck.nativeTokenWrapper = network.nativeTokenWrapper; - contractsToCheck.superTokenLogic = await getSuperTokenLogicAddress(network) - contractsToCheck.governance = await getGovernanceAddress(network) + contractsToCheck.superTokenLogic = await getSuperTokenLogicAddress(network); + contractsToCheck.governance = await getGovernanceAddress(network); if (network.contractsV1.autowrap) { - contractsToCheck.autoWrapManager = network.contractsV1.autowrap.manager - contractsToCheck.autoWrapStrategy = network.contractsV1.autowrap.wrapStrategy - delete network.contractsV1.autowrap + contractsToCheck.autoWrapManager = network.contractsV1.autowrap.manager; + contractsToCheck.autoWrapStrategy = + network.contractsV1.autowrap.wrapStrategy; + delete network.contractsV1.autowrap; } const networkTokenAddressList = await getNetworkTokenAddressList(network); contractsToCheck = { ...contractsToCheck, - ...networkTokenAddressList + ...networkTokenAddressList, }; for (const [contractName, address] of Object.entries(contractsToCheck)) { @@ -209,13 +1502,13 @@ async function checkNetworkContractVerification(network) { delete contractsToCheck[contractName]; } } - + let networkMessage = ""; for (const [contractName, address] of Object.entries(contractsToCheck)) { networkMessage += await checkIndividualContractVerification( network, contractName, - address + address, ); } @@ -228,7 +1521,7 @@ async function checkNetworkContractVerification(network) { async function getNetworkTokenAddressList(network) { return new Promise((resolve, reject) => { - let response = ''; + let response = ""; const hostName = `${network.name}.subgraph.x.superfluid.dev`; let options = { headers: { @@ -269,7 +1562,7 @@ async function getNetworkTokenAddressList(network) { req.write( JSON.stringify({ query: "query { tokens(where: {isListed: true}) { symbol id }}", - }) + }), ); req.end(); }); @@ -278,7 +1571,7 @@ async function getNetworkTokenAddressList(network) { async function checkIndividualContractVerification( network, contractName, - contractAddress + contractAddress, ) { let endpoint = networkSpecificData[network.name]; const url = `${endpoint.url}/?apikey=${endpoint.key}&module=contract&action=getabi&address=${contractAddress}`; @@ -322,13 +1615,13 @@ async function checkIndividualContractVerification( const oldestPRUrl = oldestOpenPR ? oldestOpenPR.html_url : ""; const oldestDraftPRUrl = oldestDraftPR ? oldestDraftPR.html_url : ""; const lastWorkflow = workflowJson.workflow_runs.filter( - (x) => x.path === workflowFileName + (x) => x.path === workflowFileName, )[0]; const lastWorkflowId = lastWorkflow.id; const lastWorkflowUsage = await getDataAsJson( "https://api.github.com/repos/superfluid-finance/protocol-monorepo/actions/runs/" + - lastWorkflowId + - "/timing" + lastWorkflowId + + "/timing", ); const workflowStatus = lastWorkflow.status; @@ -349,8 +1642,8 @@ async function checkIndividualContractVerification( async function getPrOldestCommit(prJson) { let allCommits = await getDataAsJson( "https://api.github.com/repos/superfluid-finance/protocol-monorepo/pulls/" + - prJson.number + - "/commits" + prJson.number + + "/commits", ); return allCommits[allCommits.length - 1]; } @@ -398,7 +1691,7 @@ async function checkIndividualContractVerification( if (allContractsVerified) { addMarkdownText( webhookPayload, - "All contracts are verified ✅✅✅" + "All contracts are verified ✅✅✅", ); } } @@ -537,21 +1830,21 @@ async function checkIndividualContractVerification( let americaTrips = (lastDraftPrUpdateBeforeDays / 36).toFixed(0); addHeader( webhookPayload, - "Unlike fine wine , draft pull requests don't get better with time" + "Unlike fine wine , draft pull requests don't get better with time", ); addSectionWithImage( webhookPayload, "Please have a look at: *<" + - oldestDraftPRUrl + - "|" + - oldestDraftPRTitle + - ">*\nColumbus would have went to America " + - americaTrips + - " times already by this time ,do something with this as this has been open for *" + - lastDraftPrUpdateBeforeDays + - "* days", + oldestDraftPRUrl + + "|" + + oldestDraftPRTitle + + ">*\nColumbus would have went to America " + + americaTrips + + " times already by this time ,do something with this as this has been open for *" + + lastDraftPrUpdateBeforeDays + + "* days", redWarningIcon, - "It took them 36 days" + "It took them 36 days", ); addDivider(webhookPayload); } @@ -568,22 +1861,22 @@ async function checkIndividualContractVerification( webhookPayload, PRString, oldestPRAuthorPicture, - oldestPRAuthorName + oldestPRAuthorName, ); addPRContext(); } else { let draftMessage = oldestDraftPR ? "There are no open PRs????? *<" + - allPullRequests + - "|" + - amountOfDraftPRs + - " pull requests are in draft , you might want to look into those>*" + allPullRequests + + "|" + + amountOfDraftPRs + + " pull requests are in draft , you might want to look into those>*" : "There are no open and draft PRs? What is this, why u no work, you might want to read this:\n**"; addSectionWithImage( webhookPayload, draftMessage, sadPepeKidImage, - "The pepe kid is sad, open a PR to make him happy" + "The pepe kid is sad, open a PR to make him happy", ); } } @@ -608,11 +1901,11 @@ async function checkIndividualContractVerification( addContextWithImage( webhookPayload, "*The PR has been last updated before " + - lastUpdatedBeforeDays + - " days*\nLast commit: " + - oldestPRMessage, + lastUpdatedBeforeDays + + " days*\nLast commit: " + + oldestPRMessage, imageToAddToContext, - imageText + imageText, ); addDivider(webhookPayload); } @@ -671,7 +1964,7 @@ async function checkIndividualContractVerification( webhookPayload, getWorkflowString(), getWorkflowPicture(), - "Sorry if you are color blind" + "Sorry if you are color blind", ); } @@ -682,7 +1975,7 @@ async function checkIndividualContractVerification( addDraftPRSection(); addHeader( webhookPayload, - workflowName + " latest status: " + getOverallWorkflowString() + workflowName + " latest status: " + getOverallWorkflowString(), ); addWorkflowSection(); addDivider(webhookPayload); diff --git a/tasks/find-dup-devDependencies.sh b/tasks/find-dup-devDependencies.sh index 9d3e8d6e6e..9c5263c352 100755 --- a/tasks/find-dup-devDependencies.sh +++ b/tasks/find-dup-devDependencies.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash +# Synopsis: find duplicated devDependencies in packages -P=$(echo package.json packages/*/package.json packages/*/*/package.json) -# find duplicated devDependencies in packages -echo "$P" | xargs -- jq -r ".devDependencies | keys | .[]" | \ +P=$(jq -r ".workspaces.packages | .[]" package.json | xargs printf "%s/package.json\n") +P="package.json $P" +echo "$P" | \ + xargs -- jq -r "if .devDependencies? then .devDependencies | keys | .[] else empty end" | \ sort | uniq -c | \ - grep -ve '^ *1' | awk '{print $2}' | while read -r i;do - echo "$i" - echo "$P" | xargs -- grep "\"$i\"" - echo - exit 42 -done + grep -ve '^ *1 ' | awk '{print $2}' | while read -r i; do + echo "$i" + echo "$P" | xargs -- grep "\"$i\"" + echo + done diff --git a/tasks/mk-cache-key.sh b/tasks/mk-cache-key.sh new file mode 100755 index 0000000000..0e4c64fb71 --- /dev/null +++ b/tasks/mk-cache-key.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Synopsis: The wrapper of mk-cache-key.nix taking into accoutn git submodule dependencies. + +oops() { echo "$@" >&2; exit 1; } + +cd "$(dirname "$0")"/.. || oops "cd failed" + +modulePath=$(readlink -f "$1") +[ -d "$modulePath" ] || oops "invalid module: ${modulePath}" + +# create additional build context +{ + # include git submodule status + git submodule status +} > additional-build-context.ignored + +mk-cache-key.nix "$PWD" "$modulePath" ./additional-build-context.ignored --json diff --git a/tasks/show-git-rev.sh b/tasks/show-git-rev.sh new file mode 100755 index 0000000000..b2296ee35c --- /dev/null +++ b/tasks/show-git-rev.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +{ + echo -n "$(git rev-parse --short HEAD)" + [ -n "$(git status --porcelain)" ] && echo -n " (dirty)" +} | { + if [ "$1" == forge_ffi_mode ]; then + xxd -p + else + cat + fi +} diff --git a/yarn.lock b/yarn.lock index e0e505dd6c..6d5880bb95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -176,6 +176,14 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.0.tgz#c241dc454e5b5917e40d37e525e2f4530c399298" @@ -186,7 +194,12 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@^7.14.0", "@babel/core@^7.7.5": +"@babel/compat-data@^7.25.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== + +"@babel/core@^7.14.0": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.3.tgz#cf1c877284a469da5d1ce1d1e53665253fae712e" integrity sha512-qIJONzoa/qiHghnm0l1n4i/6IIziDpzqc36FBs4pzMhDUraHqponwJLiAKm1hGLP3OSB/TVNz6rMwVGpwxxySw== @@ -228,6 +241,27 @@ json5 "^2.2.2" semver "^6.3.1" +"@babel/core@^7.23.9": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.14.0", "@babel/generator@^7.18.13", "@babel/generator@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.3.tgz#232359d0874b392df04045d72ce2fd9bb5045fce" @@ -258,6 +292,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.25.0", "@babel/generator@^7.25.4": + version "7.25.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.5.tgz#b31cf05b3fe8c32d206b6dad03bb0aacbde73450" + integrity sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w== + dependencies: + "@babel/types" "^7.25.4" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" @@ -287,6 +331,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== + dependencies: + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.18.6": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.0.tgz#64f49ecb0020532f19b1d014b03bccaa1ab85fb9" @@ -372,6 +427,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-module-transforms@^7.21.2": version "7.21.2" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" @@ -397,6 +460,16 @@ "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.5" +"@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== + dependencies: + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -440,6 +513,14 @@ dependencies: "@babel/types" "^7.22.5" +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" @@ -471,6 +552,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" @@ -486,6 +572,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.18.6": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" @@ -496,6 +587,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== + "@babel/helpers@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" @@ -514,6 +610,14 @@ "@babel/traverse" "^7.22.10" "@babel/types" "^7.22.10" +"@babel/helpers@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" + integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + dependencies: + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.0" + "@babel/highlight@^7.18.6", "@babel/highlight@^7.22.10": version "7.22.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" @@ -532,6 +636,16 @@ chalk "^2.4.2" js-tokens "^4.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.14.0", "@babel/parser@^7.16.8", "@babel/parser@^7.20.7", "@babel/parser@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.3.tgz#1d285d67a19162ff9daa358d4cb41d50c06220b3" @@ -547,6 +661,13 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/parser@^7.23.9", "@babel/parser@^7.25.0", "@babel/parser@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.4.tgz#af4f2df7d02440286b7de57b1c21acfb2a6f257a" + integrity sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA== + dependencies: + "@babel/types" "^7.25.4" + "@babel/plugin-proposal-class-properties@^7.0.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" @@ -807,6 +928,15 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" +"@babel/template@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" + "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.3", "@babel/traverse@^7.22.10": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" @@ -823,6 +953,19 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.4.tgz#648678046990f2957407e3086e97044f13c3e18e" + integrity sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.4" + "@babel/parser" "^7.25.4" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.4" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.8", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.3.tgz#4865a5357ce40f64e3400b0f3b737dc6d4f64d05" @@ -850,41 +993,14 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@chainsafe/as-sha256@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" - integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== - -"@chainsafe/persistent-merkle-tree@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" - integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/persistent-merkle-tree@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" - integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/ssz@^0.10.0": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" - integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.5.0" - -"@chainsafe/ssz@^0.9.2": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" - integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== +"@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.4": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.4.tgz#6bcb46c72fdf1012a209d016c07f769e10adcb5f" + integrity sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ== dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.4.2" - case "^1.6.3" + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -893,6 +1009,18 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@d10r/truffle-plugin-verify@^0.6.10": + version "0.6.10" + resolved "https://registry.yarnpkg.com/@d10r/truffle-plugin-verify/-/truffle-plugin-verify-0.6.10.tgz#f37d0b50ea3ec3e9ce5e8beed4bdb6df59404fd6" + integrity sha512-aCqotcE3usTImVRM9DW9z1nyR6LA+0t5GSlgivTnHYonWpBChkz5rFHAoHwyKsZU9BeJbPwLYwpB9K2ldWojdg== + dependencies: + "@truffle/resolver" "^9.0.35" + axios "^0.26.1" + cli-logger "^0.5.40" + delay "^5.0.0" + querystring "^0.2.1" + tunnel "0.0.6" + "@decentral.ee/web3-helpers@0.5.3": version "0.5.3" resolved "https://registry.yarnpkg.com/@decentral.ee/web3-helpers/-/web3-helpers-0.5.3.tgz#710aa9e90b186c5f7267150c4c5f3894fb52a2b4" @@ -905,34 +1033,34 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@effect/data@0.17.1", "@effect/data@^0.17.0", "@effect/data@^0.17.1": - version "0.17.1" - resolved "https://registry.yarnpkg.com/@effect/data/-/data-0.17.1.tgz#8a5904c16ae67fa132641a6d9490a46b840522fd" - integrity sha512-QCYkLE5Y5Dm5Yax5R3GmW4ZIgTx7W+kSZ7yq5eqQ/mFWa8i4yxbLuu8cudqzdeZtRtTGZKlhDxfFfgVtMywXJg== +"@effect/schema@0.71.1": + version "0.71.1" + resolved "https://registry.yarnpkg.com/@effect/schema/-/schema-0.71.1.tgz#4d344b3c44b2490fb6d6698439956a25ae18ea0f" + integrity sha512-XvFttkuBUL3s4ofZ+OVE4Pagb4wsPG8laSS8iO5lVI9Yt1zIM49uxlYIA2BJ45jjS3MdplUepC0NilotKnjU2A== + dependencies: + fast-check "^3.21.0" -"@effect/io@0.37.1", "@effect/io@^0.37.0": - version "0.37.1" - resolved "https://registry.yarnpkg.com/@effect/io/-/io-0.37.1.tgz#53ecd1ab8438cead598f3b0dd75edc84db817720" - integrity sha512-Ez3GfcG+gDDfAiBXtSjJpSrPU5Guiyw69LsYkMtIukFwyNwpHWLhYaVgfVbVjoQasil8KiFSQJSd5DbJL6nqPg== +"@emnapi/core@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emnapi/core/-/core-1.2.0.tgz#7b738e5033738132bf6af0b8fae7b05249bdcbd7" + integrity sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w== dependencies: - "@effect/data" "^0.17.0" + "@emnapi/wasi-threads" "1.0.1" + tslib "^2.4.0" -"@effect/match@0.31.0": - version "0.31.0" - resolved "https://registry.yarnpkg.com/@effect/match/-/match-0.31.0.tgz#557a00d1814f84f95e045d0c9ab97a77576808a5" - integrity sha512-QT0HSh19Y6iHAghc51Yt/rYDU9/jhs7O+2kSEQiJqj4xqCLjfJONWsK19xBCNbuV5bt3ZO1NGFqvsWeNR7ZhDg== +"@emnapi/runtime@^1.1.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emnapi/runtime/-/runtime-1.2.0.tgz#71d018546c3a91f3b51106530edbc056b9f2f2e3" + integrity sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ== dependencies: - "@effect/data" "^0.17.1" - "@effect/schema" "^0.32.0" + tslib "^2.4.0" -"@effect/schema@0.32.0", "@effect/schema@^0.32.0": - version "0.32.0" - resolved "https://registry.yarnpkg.com/@effect/schema/-/schema-0.32.0.tgz#fb29b86c35cd0364ac22683506c29a6859839d22" - integrity sha512-4HJK/cFkVPdIjYICy0eRsL7JuuLJ6mE3aJC5rX9OuUIei/qfctFEEX2NaARjtGX7hACBrRcuJCNwiq+54TTjFw== +"@emnapi/wasi-threads@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@emnapi/wasi-threads/-/wasi-threads-1.0.1.tgz#d7ae71fd2166b1c916c6cd2d0df2ef565a2e1a5b" + integrity sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw== dependencies: - "@effect/data" "^0.17.1" - "@effect/io" "^0.37.0" - fast-check "^3.12.0" + tslib "^2.4.0" "@ensdomains/address-encoder@^0.1.7": version "0.1.9" @@ -991,16 +1119,16 @@ dependencies: eslint-visitor-keys "^3.3.0" +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + "@eslint-community/regexpp@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403" integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": - version "4.6.2" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" - integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== - "@eslint/eslintrc@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d" @@ -1036,10 +1164,10 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.36.0.tgz#9837f768c03a1e4a30bd304a64fb8844f0e72efe" integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== -"@eslint/js@8.56.0": - version "8.56.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" - integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== "@ethereumjs/common@2.5.0": version "2.5.0" @@ -1049,7 +1177,7 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.1" -"@ethereumjs/common@^2.4.0", "@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.4": +"@ethereumjs/common@2.6.5", "@ethereumjs/common@^2.4.0", "@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.4": version "2.6.5" resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== @@ -1070,7 +1198,7 @@ "@ethereumjs/common" "^2.5.0" ethereumjs-util "^7.1.2" -"@ethereumjs/tx@^3.3.0": +"@ethereumjs/tx@3.5.2", "@ethereumjs/tx@^3.3.0": version "3.5.2" resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== @@ -1302,7 +1430,7 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -1487,10 +1615,10 @@ optionalDependencies: "@trufflesuite/bigint-buffer" "1.1.9" -"@graphprotocol/graph-cli@0.64.1": - version "0.64.1" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.64.1.tgz#c644d7b387b8959e637b94896721251d45008e16" - integrity sha512-BUjWLiEvZUPxuJ/PpARXMBeVLBGjJ/AKP+Orqzlb09b/6HAyQwYpDsaz5R9rW05LYPRqMikuCmktY727rbIFuA== +"@graphprotocol/graph-cli@0.80.1": + version "0.80.1" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-cli/-/graph-cli-0.80.1.tgz#a46e5f7c62a4d98c1f66f219725aff9c4bc7e31d" + integrity sha512-Kg1o3Ww2B4Q1IhCvYBCJ4fMCv+EqVtLgGvLCZdVyZo4a994Uj76apqkr1KVwRBSW60jgrGkTtpoE2JTNpgbaXg== dependencies: "@float-capital/float-subgraph-uncrashable" "^0.0.0-alpha.4" "@oclif/core" "2.8.6" @@ -1506,14 +1634,14 @@ dockerode "2.5.8" fs-extra "9.1.0" glob "9.3.5" - gluegun "5.1.2" + gluegun "5.1.6" graphql "15.5.0" immutable "4.2.1" ipfs-http-client "55.0.0" jayson "4.0.0" js-yaml "3.14.1" + open "8.4.2" prettier "3.0.3" - request "2.88.2" semver "7.4.0" sync-request "6.1.0" tmp-promise "3.0.3" @@ -1521,10 +1649,10 @@ which "2.0.2" yaml "1.10.2" -"@graphprotocol/graph-ts@0.32.0": - version "0.32.0" - resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.32.0.tgz#36f8cd8e4ef42c3c32536cceb9995ab990f51d29" - integrity sha512-YfKLT2w+ItXD/VPYQiAKtINQONVsAOkcqVFMHlhUy0fcEBVWuFBT53hJNI0/l5ujQa4TSxtzrKW/7EABAdgI8g== +"@graphprotocol/graph-ts@0.35.1": + version "0.35.1" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.35.1.tgz#1e1ecc36d8f7a727ef3a6f1fed4c5ce16de378c2" + integrity sha512-74CfuQmf7JI76/XCC34FTkMMKeaf+3Pn0FIV3m9KNeaOJ+OI3CvjMIVRhOZdKcJxsFCBGaCCl0eQjh47xTjxKA== dependencies: assemblyscript "0.19.10" @@ -1536,16 +1664,25 @@ "@graphql-codegen/plugin-helpers" "^3.1.1" tslib "~2.4.0" -"@graphql-codegen/cli@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/cli/-/cli-5.0.0.tgz#761dcf08cfee88bbdd9cdf8097b2343445ec6f0a" - integrity sha512-A7J7+be/a6e+/ul2KI5sfJlpoqeqwX8EzktaKCeduyVKgOLA6W5t+NUGf6QumBDXU8PEOqXk3o3F+RAwCWOiqA== +"@graphql-codegen/add@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/add/-/add-5.0.2.tgz#71b3ae0465a4537172dddb84531b6967ca5545f2" + integrity sha512-ouBkSvMFUhda5VoKumo/ZvsZM9P5ZTyDsI8LW18VxSNWOjrTeLXBWHG8Gfaai0HwhflPtCYVABbriEcOmrRShQ== + dependencies: + "@graphql-codegen/plugin-helpers" "^5.0.3" + tslib "~2.6.0" + +"@graphql-codegen/cli@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/cli/-/cli-5.0.2.tgz#07ff691c16da4c3dcc0e1995d3231530379ab317" + integrity sha512-MBIaFqDiLKuO4ojN6xxG9/xL9wmfD3ZjZ7RsPjwQnSHBCUXnEkdKvX+JVpx87Pq29Ycn8wTJUguXnTZ7Di0Mlw== dependencies: "@babel/generator" "^7.18.13" "@babel/template" "^7.18.10" "@babel/types" "^7.18.13" - "@graphql-codegen/core" "^4.0.0" - "@graphql-codegen/plugin-helpers" "^5.0.1" + "@graphql-codegen/client-preset" "^4.2.2" + "@graphql-codegen/core" "^4.0.2" + "@graphql-codegen/plugin-helpers" "^5.0.3" "@graphql-tools/apollo-engine-loader" "^8.0.0" "@graphql-tools/code-file-loader" "^8.0.0" "@graphql-tools/git-loader" "^8.0.0" @@ -1576,36 +1713,57 @@ yaml "^2.3.1" yargs "^17.0.0" -"@graphql-codegen/core@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/core/-/core-4.0.0.tgz#b29c911746a532a675e33720acb4eb2119823e01" - integrity sha512-JAGRn49lEtSsZVxeIlFVIRxts2lWObR+OQo7V2LHDJ7ohYYw3ilv7nJ8pf8P4GTg/w6ptcYdSdVVdkI8kUHB/Q== +"@graphql-codegen/client-preset@^4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/client-preset/-/client-preset-4.2.2.tgz#545c62789a5687bee5df8b4738b4911e72ea8051" + integrity sha512-DF9pNWj3TEdA90E9FH5SsUIqiZfr872vqaQOspLVuVXGsaDx8F/JLLzaN+7ucmoo0ff/bLW8munVXYXTmgwwEA== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/template" "^7.20.7" + "@graphql-codegen/add" "^5.0.2" + "@graphql-codegen/gql-tag-operations" "4.0.4" + "@graphql-codegen/plugin-helpers" "^5.0.3" + "@graphql-codegen/typed-document-node" "^5.0.4" + "@graphql-codegen/typescript" "^4.0.4" + "@graphql-codegen/typescript-operations" "^4.1.2" + "@graphql-codegen/visitor-plugin-common" "^4.1.2" + "@graphql-tools/documents" "^1.0.0" + "@graphql-tools/utils" "^10.0.0" + "@graphql-typed-document-node/core" "3.2.0" + tslib "~2.6.0" + +"@graphql-codegen/core@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/core/-/core-4.0.2.tgz#7e6ec266276f54bbf02f60599d9e518f4a59d85e" + integrity sha512-IZbpkhwVqgizcjNiaVzNAzm/xbWT6YnGgeOLwVjm4KbJn3V2jchVtuzHH09G5/WkkLSk2wgbXNdwjM41JxO6Eg== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" + "@graphql-codegen/plugin-helpers" "^5.0.3" "@graphql-tools/schema" "^10.0.0" "@graphql-tools/utils" "^10.0.0" - tslib "~2.5.0" + tslib "~2.6.0" -"@graphql-codegen/introspection@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/introspection/-/introspection-4.0.0.tgz#1d851d8fb38efbeaf45128456e3010a16e6c9708" - integrity sha512-t9g3AkK99dfHblMWtG4ynUM9+A7JrWq5110zSpNV2wlSnv0+bRKagDW8gozwgXfR5i1IIG8QDjJZ6VgXQVqCZw== +"@graphql-codegen/gql-tag-operations@4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.4.tgz#572be5db804af5efdc3ca24e4bcac815448730c5" + integrity sha512-dypul0iDLjb07yv+/cRb6qPbn42cFPcwlsJertVl9G6qkS4+3V4806WwSfUht4QVMWnvGfgDkJJqG0yUVKOHwA== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-codegen/visitor-plugin-common" "^4.0.0" - tslib "~2.5.0" + "@graphql-codegen/plugin-helpers" "^5.0.3" + "@graphql-codegen/visitor-plugin-common" "4.1.2" + "@graphql-tools/utils" "^10.0.0" + auto-bind "~4.0.0" + tslib "~2.6.0" -"@graphql-codegen/near-operation-file-preset@^2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/near-operation-file-preset/-/near-operation-file-preset-2.5.0.tgz#987d9bb8d0101e944b9afc406b77d098a4c1e978" - integrity sha512-S9PNJP5tTkUWBQ6inbviOsTREzsMxYVqJGrtPcIdMWkKLZAAItAfAb60klB1T64vt6Oru+nUf8IYUNrchJ8MYg== +"@graphql-codegen/near-operation-file-preset@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/near-operation-file-preset/-/near-operation-file-preset-3.0.0.tgz#f294df4b4cf5a565aecfdbb5de281b5852594879" + integrity sha512-HRPaa7OsIAHQBFeGiTUVdjFcxzgvAs7uxSqcLEJgDpCr9cffpwnlgWP3gK79KnTiHsRkyb55U1K4YyrL00g1Cw== dependencies: "@graphql-codegen/add" "^3.2.1" - "@graphql-codegen/plugin-helpers" "^2.7.2" + "@graphql-codegen/plugin-helpers" "^3.0.0" "@graphql-codegen/visitor-plugin-common" "2.13.1" - "@graphql-tools/utils" "^8.8.0" + "@graphql-tools/utils" "^10.0.0" parse-filepath "^1.0.2" - tslib "~2.4.0" + tslib "~2.6.0" "@graphql-codegen/plugin-helpers@^2.7.2": version "2.7.2" @@ -1619,7 +1777,7 @@ lodash "~4.17.0" tslib "~2.4.0" -"@graphql-codegen/plugin-helpers@^3.1.1": +"@graphql-codegen/plugin-helpers@^3.0.0", "@graphql-codegen/plugin-helpers@^3.1.1": version "3.1.2" resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz#69a2e91178f478ea6849846ade0a59a844d34389" integrity sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg== @@ -1631,59 +1789,59 @@ lodash "~4.17.0" tslib "~2.4.0" -"@graphql-codegen/plugin-helpers@^5.0.0", "@graphql-codegen/plugin-helpers@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz#e2429fcfba3f078d5aa18aa062d46c922bbb0d55" - integrity sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww== +"@graphql-codegen/plugin-helpers@^5.0.3": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.3.tgz#7027b9d911d7cb594663590fcf5d63e9cf7ec2ff" + integrity sha512-yZ1rpULIWKBZqCDlvGIJRSyj1B2utkEdGmXZTBT/GVayP4hyRYlkd36AJV/LfEsVD8dnsKL5rLz2VTYmRNlJ5Q== dependencies: "@graphql-tools/utils" "^10.0.0" change-case-all "1.0.15" common-tags "1.8.2" import-from "4.0.0" lodash "~4.17.0" - tslib "~2.5.0" + tslib "~2.6.0" -"@graphql-codegen/schema-ast@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-4.0.0.tgz#5d60996c87b64f81847da8fcb2d8ef50ede89755" - integrity sha512-WIzkJFa9Gz28FITAPILbt+7A8+yzOyd1NxgwFh7ie+EmO9a5zQK6UQ3U/BviirguXCYnn+AR4dXsoDrSrtRA1g== +"@graphql-codegen/schema-ast@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-4.0.2.tgz#aeaa104e4555cca73a058f0a9350b4b0e290b377" + integrity sha512-5mVAOQQK3Oz7EtMl/l3vOQdc2aYClUzVDHHkMvZlunc+KlGgl81j8TLa+X7ANIllqU4fUEsQU3lJmk4hXP6K7Q== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" + "@graphql-codegen/plugin-helpers" "^5.0.3" "@graphql-tools/utils" "^10.0.0" - tslib "~2.5.0" + tslib "~2.6.0" -"@graphql-codegen/typed-document-node@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typed-document-node/-/typed-document-node-5.0.1.tgz#ac90cf67c61554f63ec100d6076b47c9f0b18b27" - integrity sha512-VFkhCuJnkgtbbgzoCAwTdJe2G1H6sd3LfCrDqWUrQe53y2ukfSb5Ov1PhAIkCBStKCMQBUY9YgGz9GKR40qQ8g== +"@graphql-codegen/typed-document-node@^5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typed-document-node/-/typed-document-node-5.0.4.tgz#06e286caacdd66c3566f98433dcb8f1a9c9a9f1d" + integrity sha512-t66Z6erQ4Dh1j6f9pRZmc8uYtHoUI3A49tLmJAlg9/3IV0kCmwrWKJut/G8SeOefDLG8cXBTVtI/YuZOe1Te+w== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-codegen/visitor-plugin-common" "4.0.1" + "@graphql-codegen/plugin-helpers" "^5.0.3" + "@graphql-codegen/visitor-plugin-common" "4.1.2" auto-bind "~4.0.0" change-case-all "1.0.15" - tslib "~2.5.0" + tslib "~2.6.0" -"@graphql-codegen/typescript-operations@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-operations/-/typescript-operations-4.0.1.tgz#930af3e2d2ae8ff06de696291be28fe7046a2fef" - integrity sha512-GpUWWdBVUec/Zqo23aFLBMrXYxN2irypHqDcKjN78JclDPdreasAEPcIpMfqf4MClvpmvDLy4ql+djVAwmkjbw== +"@graphql-codegen/typescript-operations@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-operations/-/typescript-operations-4.1.2.tgz#a0f455ae19e16961e5870420ca7515bbe51b5568" + integrity sha512-CtCWK+gW7hS+Ely3lohr8CL1HVLswQzMcaUk3k1sxdWCWKTNq7abMsWa31rTVwRCJ+WNEkM/7S8sIBTpEG683A== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-codegen/typescript" "^4.0.1" - "@graphql-codegen/visitor-plugin-common" "4.0.1" + "@graphql-codegen/plugin-helpers" "^5.0.3" + "@graphql-codegen/typescript" "^4.0.4" + "@graphql-codegen/visitor-plugin-common" "4.1.2" auto-bind "~4.0.0" - tslib "~2.5.0" + tslib "~2.6.0" -"@graphql-codegen/typescript@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-4.0.1.tgz#7481d68f59bea802dd10e278dce73c8a1552b2a4" - integrity sha512-3YziQ21dCVdnHb+Us1uDb3pA6eG5Chjv0uTK+bt9dXeMlwYBU8MbtzvQTo4qvzWVC1AxSOKj0rgfNu1xCXqJyA== +"@graphql-codegen/typescript@^4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-4.0.4.tgz#e791c61f675ae454951ea077b0ae519ae352cc3e" + integrity sha512-x79CKLfP9UQCX+/I78qxQlMs2Mmq3pF1lKafZo7lAno0f/fvJ+qWUduzdgjRNz+YL+5blGeWcC0pWEDxniO7hw== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-codegen/schema-ast" "^4.0.0" - "@graphql-codegen/visitor-plugin-common" "4.0.1" + "@graphql-codegen/plugin-helpers" "^5.0.3" + "@graphql-codegen/schema-ast" "^4.0.2" + "@graphql-codegen/visitor-plugin-common" "4.1.2" auto-bind "~4.0.0" - tslib "~2.5.0" + tslib "~2.6.0" "@graphql-codegen/visitor-plugin-common@2.13.1": version "2.13.1" @@ -1701,12 +1859,12 @@ parse-filepath "^1.0.2" tslib "~2.4.0" -"@graphql-codegen/visitor-plugin-common@4.0.1", "@graphql-codegen/visitor-plugin-common@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-4.0.1.tgz#64e293728b3c186f6767141e41fcdb310e50d367" - integrity sha512-Bi/1z0nHg4QMsAqAJhds+ForyLtk7A3HQOlkrZNm3xEkY7lcBzPtiOTLBtvziwopBsXUxqeSwVjOOFPLS5Yw1Q== +"@graphql-codegen/visitor-plugin-common@4.1.2", "@graphql-codegen/visitor-plugin-common@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-4.1.2.tgz#674c5d5813f6c00dd65e1ee148a62536879e65e2" + integrity sha512-yk7iEAL1kYZ2Gi/pvVjdsZhul5WsYEM4Zcgh2Ev15VicMdJmPHsMhNUsZWyVJV0CaQCYpNOFlGD/11Ea3pn4GA== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" + "@graphql-codegen/plugin-helpers" "^5.0.3" "@graphql-tools/optimize" "^2.0.0" "@graphql-tools/relay-operation-optimizer" "^7.0.0" "@graphql-tools/utils" "^10.0.0" @@ -1715,7 +1873,7 @@ dependency-graph "^0.11.0" graphql-tag "^2.11.0" parse-filepath "^1.0.2" - tslib "~2.5.0" + tslib "~2.6.0" "@graphql-tools/apollo-engine-loader@^8.0.0": version "8.0.0" @@ -1782,6 +1940,14 @@ tslib "~2.4.0" value-or-promise "1.0.11" +"@graphql-tools/documents@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/documents/-/documents-1.0.0.tgz#e3ed97197cc22ec830ca227fd7d17e86d8424bdf" + integrity sha512-rHGjX1vg/nZ2DKqRGfDPNC55CWZBMldEVcH+91BThRa6JeT80NqXknffLLEZLRUxyikCfkwMsk6xR3UNMqG0Rg== + dependencies: + lodash.sortby "^4.7.0" + tslib "^2.4.0" + "@graphql-tools/executor-graphql-ws@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-1.1.0.tgz#7727159ebaa9df4dc793d0d02e74dd1ca4a7cc60" @@ -1942,9 +2108,9 @@ tslib "^2.4.0" "@graphql-tools/optimize@^1.3.0": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.3.1.tgz#29407991478dbbedc3e7deb8c44f46acb4e9278b" - integrity sha512-5j5CZSRGWVobt4bgRRg7zhjPiSimk+/zIuColih8E8DxuFOaJ+t0qu7eZS5KXWBkjcd4BPNuhUPpNlEmHPqVRQ== + version "1.4.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.4.0.tgz#20d6a9efa185ef8fc4af4fd409963e0907c6e112" + integrity sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw== dependencies: tslib "^2.4.0" @@ -1980,12 +2146,12 @@ yaml-ast-parser "^0.0.43" "@graphql-tools/relay-operation-optimizer@^6.5.0": - version "6.5.17" - resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.17.tgz#4e4e2675d696a2a31f106b09ed436c43f7976f37" - integrity sha512-hHPEX6ccRF3+9kfVz0A3In//Dej7QrHOLGZEokBmPDMDqn9CS7qUjpjyGzclbOX0tRBtLfuFUZ68ABSac3P1nA== + version "6.5.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz#a1b74a8e0a5d0c795b8a4d19629b654cf66aa5ab" + integrity sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg== dependencies: "@ardatan/relay-compiler" "12.0.0" - "@graphql-tools/utils" "9.2.1" + "@graphql-tools/utils" "^9.2.1" tslib "^2.4.0" "@graphql-tools/relay-operation-optimizer@^7.0.0": @@ -2053,7 +2219,7 @@ dependencies: tslib "^2.4.0" -"@graphql-tools/utils@9.2.1", "@graphql-tools/utils@^9.0.0": +"@graphql-tools/utils@9.2.1", "@graphql-tools/utils@^9.0.0", "@graphql-tools/utils@^9.2.1": version "9.2.1" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.2.1.tgz#1b3df0ef166cfa3eae706e3518b17d5922721c57" integrity sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A== @@ -2093,25 +2259,13 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== -"@hapi/hoek@^9.0.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" - integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== - -"@hapi/topo@^5.0.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" - integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== - dependencies: - "@hapi/hoek" "^9.0.0" - -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/config-array@^0.11.8": @@ -2133,10 +2287,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@hutson/parse-repository-url@^3.0.0": version "3.0.2" @@ -2178,6 +2332,18 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" +"@isaacs/fs-minipass@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz#2d59ae3ab4b38fb4270bfa23d30f8e2e86c7fe32" + integrity sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w== + dependencies: + minipass "^7.0.4" + +"@isaacs/string-locale-compare@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b" + integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -2189,7 +2355,7 @@ js-yaml "^3.13.1" resolve-from "^5.0.0" -"@istanbuljs/schema@^0.1.2": +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== @@ -2223,16 +2389,35 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/source-map@^0.3.3": version "0.3.5" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" @@ -2246,6 +2431,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -2262,85 +2452,98 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@lerna/child-process@7.3.0": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-7.3.0.tgz#c56488a8a881f22a64793bf9339c5a2450a18559" - integrity sha512-rA+fGUo2j/LEq6w1w8s6oVikLbJTWoIDVpYMc7bUCtwDOUuZKMQiRtjmpavY3fTm7ltu42f4AKflc2A70K4wvA== +"@jridgewell/trace-mapping@^0.3.20": + version "0.3.22" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz#72a621e5de59f5f1ef792d0793a82ee20f645e4c" + integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== dependencies: - chalk "^4.1.0" - execa "^5.0.0" - strong-log-transformer "^2.1.0" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" -"@lerna/create@7.3.0": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-7.3.0.tgz#5438c231f617b8e825731390d394f8684af471d5" - integrity sha512-fjgiKjg9VXwQ4ZKKsrXICEKRiC3yo6+FprR0mc55uz0s5e9xupoSGLobUTTBdE7ncNB3ibqml8dfaAn/+ESajQ== +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: - "@lerna/child-process" "7.3.0" - "@npmcli/run-script" "6.0.2" - "@nx/devkit" ">=16.5.1 < 17" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@lerna/create@8.1.8": + version "8.1.8" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-8.1.8.tgz#be70d620f1d6b71e9d6b9d20049b784168b6ca19" + integrity sha512-wi72R01tgjBjzG2kjRyTHl4yCTKDfDMIXRyKz9E/FBa9SkFvUOAE4bdyY9MhEsRZmSWL7+CYE8Flv/HScRpBbA== + dependencies: + "@npmcli/arborist" "7.5.4" + "@npmcli/package-json" "5.2.0" + "@npmcli/run-script" "8.1.0" + "@nx/devkit" ">=17.1.2 < 20" "@octokit/plugin-enterprise-rest" "6.0.1" "@octokit/rest" "19.0.11" + aproba "2.0.0" byte-size "8.1.1" chalk "4.1.0" clone-deep "4.0.1" - cmd-shim "6.0.1" + cmd-shim "6.0.3" + color-support "1.1.3" columnify "1.6.0" + console-control-strings "^1.1.0" conventional-changelog-core "5.0.1" conventional-recommended-bump "7.0.1" cosmiconfig "^8.2.0" - dedent "0.7.0" + dedent "1.5.3" execa "5.0.0" - fs-extra "^11.1.1" + fs-extra "^11.2.0" get-stream "6.0.0" - git-url-parse "13.1.0" - glob-parent "5.1.2" + git-url-parse "14.0.0" + glob-parent "6.0.2" globby "11.1.0" graceful-fs "4.2.11" has-unicode "2.0.1" ini "^1.3.8" - init-package-json "5.0.0" + init-package-json "6.0.3" inquirer "^8.2.4" is-ci "3.0.1" is-stream "2.0.0" js-yaml "4.1.0" - libnpmpublish "7.3.0" + libnpmpublish "9.0.9" load-json-file "6.2.0" lodash "^4.17.21" make-dir "4.0.0" minimatch "3.0.5" multimatch "5.0.0" node-fetch "2.6.7" - npm-package-arg "8.1.1" - npm-packlist "5.1.1" - npm-registry-fetch "^14.0.5" - npmlog "^6.0.2" - nx ">=16.5.1 < 17" + npm-package-arg "11.0.2" + npm-packlist "8.0.2" + npm-registry-fetch "^17.1.0" + nx ">=17.1.2 < 20" p-map "4.0.0" p-map-series "2.1.0" p-queue "6.6.2" p-reduce "^2.1.0" - pacote "^15.2.0" + pacote "^18.0.6" pify "5.0.0" read-cmd-shim "4.0.0" - read-package-json "6.0.4" resolve-from "5.0.0" rimraf "^4.4.1" semver "^7.3.4" + set-blocking "^2.0.0" signal-exit "3.0.7" slash "^3.0.0" - ssri "^9.0.1" + ssri "^10.0.6" + string-width "^4.2.3" + strip-ansi "^6.0.1" strong-log-transformer "2.1.0" - tar "6.1.11" + tar "6.2.1" temp-dir "1.0.0" upath "2.0.1" - uuid "^9.0.0" + uuid "^10.0.0" validate-npm-package-license "^3.0.4" - validate-npm-package-name "5.0.0" + validate-npm-package-name "5.0.1" + wide-align "1.1.5" write-file-atomic "5.0.1" write-pkg "4.0.0" - yargs "16.2.0" - yargs-parser "20.2.4" + yargs "17.7.2" + yargs-parser "21.1.1" "@metamask/eth-sig-util@4.0.1", "@metamask/eth-sig-util@^4.0.0": version "4.0.1" @@ -2366,6 +2569,15 @@ lodash "^4.17.16" uuid "^7.0.3" +"@napi-rs/wasm-runtime@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz#d27788176f250d86e498081e3c5ff48a17606918" + integrity sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ== + dependencies: + "@emnapi/core" "^1.1.0" + "@emnapi/runtime" "^1.1.0" + "@tybys/wasm-util" "^0.9.0" + "@noble/curves@1.1.0", "@noble/curves@~1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" @@ -2424,139 +2636,83 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomicfoundation/ethereumjs-block@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz#13a7968f5964f1697da941281b7f7943b0465d04" - integrity sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" +"@nomicfoundation/edr-darwin-arm64@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.5.2.tgz#72f7a826c9f0f2c91308edca562de3b9484ac079" + integrity sha512-Gm4wOPKhbDjGTIRyFA2QUAPfCXA1AHxYOKt3yLSGJkQkdy9a5WW+qtqKeEKHc/+4wpJSLtsGQfpzyIzggFfo/A== -"@nomicfoundation/ethereumjs-blockchain@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz#45323b673b3d2fab6b5008535340d1b8fea7d446" - integrity sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-ethash" "3.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - abstract-level "^1.0.3" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - level "^8.0.0" - lru-cache "^5.1.1" - memory-level "^1.0.0" +"@nomicfoundation/edr-darwin-x64@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.5.2.tgz#6d0fedb219d664631c6feddc596ab8c3bbc36fa8" + integrity sha512-ClyABq2dFCsrYEED3/UIO0c7p4H1/4vvlswFlqUyBpOkJccr75qIYvahOSJRM62WgUFRhbSS0OJXFRwc/PwmVg== -"@nomicfoundation/ethereumjs-common@4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz#a15d1651ca36757588fdaf2a7d381a150662a3c3" - integrity sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg== - dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.2" - crc-32 "^1.2.0" +"@nomicfoundation/edr-linux-arm64-gnu@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.5.2.tgz#60e4d52d963141bc2bb4a02639dc590a7fbdda2f" + integrity sha512-HWMTVk1iOabfvU2RvrKLDgtFjJZTC42CpHiw2h6rfpsgRqMahvIlx2jdjWYzFNy1jZKPTN1AStQ/91MRrg5KnA== -"@nomicfoundation/ethereumjs-ethash@3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz#da77147f806401ee996bfddfa6487500118addca" - integrity sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - abstract-level "^1.0.3" - bigint-crypto-utils "^3.0.23" - ethereum-cryptography "0.1.3" +"@nomicfoundation/edr-linux-arm64-musl@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.5.2.tgz#6676a09eab57c435a16ffc144658c896acca9baa" + integrity sha512-CwsQ10xFx/QAD5y3/g5alm9+jFVuhc7uYMhrZAu9UVF+KtVjeCvafj0PaVsZ8qyijjqVuVsJ8hD1x5ob7SMcGg== -"@nomicfoundation/ethereumjs-evm@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz#4c2f4b84c056047102a4fa41c127454e3f0cfcf6" - integrity sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ== - dependencies: - "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" +"@nomicfoundation/edr-linux-x64-gnu@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.5.2.tgz#f558d9697ce961410e7a7468f9ab8c8a601b9df6" + integrity sha512-CWVCEdhWJ3fmUpzWHCRnC0/VLBDbqtqTGTR6yyY1Ep3S3BOrHEAvt7h5gx85r2vLcztisu2vlDq51auie4IU1A== -"@nomicfoundation/ethereumjs-rlp@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz#4fee8dc58a53ac6ae87fb1fca7c15dc06c6b5dea" - integrity sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA== +"@nomicfoundation/edr-linux-x64-musl@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.5.2.tgz#c9c9cbb2997499f75c1d022be724b0551d44569f" + integrity sha512-+aJDfwhkddy2pP5u1ISg3IZVAm0dO836tRlDTFWtvvSMQ5hRGqPcWwlsbobhDQsIxhPJyT7phL0orCg5W3WMeA== -"@nomicfoundation/ethereumjs-statemanager@2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz#3ba4253b29b1211cafe4f9265fee5a0d780976e0" - integrity sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - js-sdsl "^4.1.4" +"@nomicfoundation/edr-win32-x64-msvc@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.5.2.tgz#f16db88bf4fe09a996af0a25096e09deecb72bfa" + integrity sha512-CcvvuA3sAv7liFNPsIR/68YlH6rrybKzYttLlMr80d4GKJjwJ5OKb3YgE6FdZZnOfP19HEHhsLcE0DPLtY3r0w== -"@nomicfoundation/ethereumjs-trie@6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz#9a6dbd28482dca1bc162d12b3733acab8cd12835" - integrity sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ== +"@nomicfoundation/edr@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.5.2.tgz#e8c7b3d3dd4a312432ab3930dec60f76dc5c4926" + integrity sha512-hW/iLvUQZNTVjFyX/I40rtKvvDOqUEyIi96T28YaLfmPL+3LW2lxmYLUXEJ6MI14HzqxDqrLyhf6IbjAa2r3Dw== + dependencies: + "@nomicfoundation/edr-darwin-arm64" "0.5.2" + "@nomicfoundation/edr-darwin-x64" "0.5.2" + "@nomicfoundation/edr-linux-arm64-gnu" "0.5.2" + "@nomicfoundation/edr-linux-arm64-musl" "0.5.2" + "@nomicfoundation/edr-linux-x64-gnu" "0.5.2" + "@nomicfoundation/edr-linux-x64-musl" "0.5.2" + "@nomicfoundation/edr-win32-x64-msvc" "0.5.2" + +"@nomicfoundation/ethereumjs-common@4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz#9901f513af2d4802da87c66d6f255b510bef5acb" + integrity sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg== dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - "@types/readable-stream" "^2.3.13" - ethereum-cryptography "0.1.3" - readable-stream "^3.6.0" + "@nomicfoundation/ethereumjs-util" "9.0.4" -"@nomicfoundation/ethereumjs-tx@5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz#117813b69c0fdc14dd0446698a64be6df71d7e56" - integrity sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g== - dependencies: - "@chainsafe/ssz" "^0.9.2" - "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - ethereum-cryptography "0.1.3" +"@nomicfoundation/ethereumjs-rlp@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz#66c95256fc3c909f6fb18f6a586475fc9762fa30" + integrity sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw== -"@nomicfoundation/ethereumjs-util@9.0.2": - version "9.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz#16bdc1bb36f333b8a3559bbb4b17dac805ce904d" - integrity sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ== +"@nomicfoundation/ethereumjs-tx@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz#b0ceb58c98cc34367d40a30d255d6315b2f456da" + integrity sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw== dependencies: - "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-rlp" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-vm@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz#3b0852cb3584df0e18c182d0672a3596c9ca95e6" - integrity sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-blockchain" "7.0.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-evm" "2.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-statemanager" "2.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - debug "^4.3.3" +"@nomicfoundation/ethereumjs-util@9.0.4": + version "9.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz#84c5274e82018b154244c877b76bc049a4ed7b38" + integrity sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.4" ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" "@nomicfoundation/hardhat-chai-matchers@^1.0.6": version "1.0.6" @@ -2569,6 +2725,14 @@ deep-eql "^4.0.1" ordinal "^1.0.3" +"@nomicfoundation/hardhat-ethers@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.7.tgz#be90f79e96a22e6e982bca20ab0af05ed1f09c26" + integrity sha512-pxLWpDiqC208shoz/lMbVFbxcVxE+qIs8qDrwdcubWH99UO1p6uwXakMa36ICRfB/IEToSLDJGSsKhwY84feCQ== + dependencies: + debug "^4.1.1" + lodash.isequal "^4.5.0" + "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" @@ -2635,7 +2799,7 @@ "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" -"@nomiclabs/hardhat-ethers@^2.2.3": +"@nomiclabs/hardhat-ethers@2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== @@ -2690,6 +2854,58 @@ ethers "^4.0.0-beta.1" source-map-support "^0.5.19" +"@npmcli/agent@^2.0.0": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.2.tgz#967604918e62f620a648c7975461c9c9e74fc5d5" + integrity sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og== + dependencies: + agent-base "^7.1.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.1" + lru-cache "^10.0.1" + socks-proxy-agent "^8.0.3" + +"@npmcli/arborist@7.5.4": + version "7.5.4" + resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-7.5.4.tgz#3dd9e531d6464ef6715e964c188e0880c471ac9b" + integrity sha512-nWtIc6QwwoUORCRNzKx4ypHqCk3drI+5aeYdMTQQiRCcn4lOOgfQh7WyZobGYTxXPSq1VwV53lkpN/BRlRk08g== + dependencies: + "@isaacs/string-locale-compare" "^1.1.0" + "@npmcli/fs" "^3.1.1" + "@npmcli/installed-package-contents" "^2.1.0" + "@npmcli/map-workspaces" "^3.0.2" + "@npmcli/metavuln-calculator" "^7.1.1" + "@npmcli/name-from-folder" "^2.0.0" + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/package-json" "^5.1.0" + "@npmcli/query" "^3.1.0" + "@npmcli/redact" "^2.0.0" + "@npmcli/run-script" "^8.1.0" + bin-links "^4.0.4" + cacache "^18.0.3" + common-ancestor-path "^1.0.1" + hosted-git-info "^7.0.2" + json-parse-even-better-errors "^3.0.2" + json-stringify-nice "^1.1.4" + lru-cache "^10.2.2" + minimatch "^9.0.4" + nopt "^7.2.1" + npm-install-checks "^6.2.0" + npm-package-arg "^11.0.2" + npm-pick-manifest "^9.0.1" + npm-registry-fetch "^17.0.1" + pacote "^18.0.6" + parse-conflict-json "^3.0.0" + proc-log "^4.2.0" + proggy "^2.0.0" + promise-all-reject-late "^1.0.0" + promise-call-limit "^3.0.1" + read-package-json-fast "^3.0.2" + semver "^7.3.7" + ssri "^10.0.6" + treeverse "^3.0.0" + walk-up-path "^3.0.1" + "@npmcli/fs@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" @@ -2697,19 +2913,27 @@ dependencies: semver "^7.3.5" -"@npmcli/git@^4.0.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-4.1.0.tgz#ab0ad3fd82bc4d8c1351b6c62f0fa56e8fe6afa6" - integrity sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ== +"@npmcli/fs@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.1.tgz#59cdaa5adca95d135fc00f2bb53f5771575ce726" + integrity sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg== dependencies: - "@npmcli/promise-spawn" "^6.0.0" - lru-cache "^7.4.4" - npm-pick-manifest "^8.0.0" - proc-log "^3.0.0" + semver "^7.3.5" + +"@npmcli/git@^5.0.0": + version "5.0.8" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-5.0.8.tgz#8ba3ff8724192d9ccb2735a2aa5380a992c5d3d1" + integrity sha512-liASfw5cqhjNW9UFd+ruwwdEf/lbOAQjLL2XY2dFW/bkJheXDYZgOyul/4gVvEV4BWkTXjYGmDqMw9uegdbJNQ== + dependencies: + "@npmcli/promise-spawn" "^7.0.0" + ini "^4.1.3" + lru-cache "^10.0.1" + npm-pick-manifest "^9.0.0" + proc-log "^4.0.0" promise-inflight "^1.0.1" promise-retry "^2.0.1" semver "^7.3.5" - which "^3.0.0" + which "^4.0.0" "@npmcli/installed-package-contents@^2.0.1": version "2.0.2" @@ -2719,106 +2943,168 @@ npm-bundled "^3.0.0" npm-normalize-package-bin "^3.0.0" +"@npmcli/installed-package-contents@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz#63048e5f6e40947a3a88dcbcb4fd9b76fdd37c17" + integrity sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w== + dependencies: + npm-bundled "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +"@npmcli/map-workspaces@^3.0.2": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@npmcli/map-workspaces/-/map-workspaces-3.0.6.tgz#27dc06c20c35ef01e45a08909cab9cb3da08cea6" + integrity sha512-tkYs0OYnzQm6iIRdfy+LcLBjcKuQCeE5YLb8KnrIlutJfheNaPvPpgoFEyEFgbjzl5PLZ3IA/BWAwRU0eHuQDA== + dependencies: + "@npmcli/name-from-folder" "^2.0.0" + glob "^10.2.2" + minimatch "^9.0.0" + read-package-json-fast "^3.0.0" + +"@npmcli/metavuln-calculator@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@npmcli/metavuln-calculator/-/metavuln-calculator-7.1.1.tgz#4d3b6c3192f72bc8ad59476de0da939c33877fcf" + integrity sha512-Nkxf96V0lAx3HCpVda7Vw4P23RILgdi/5K1fmj2tZkWIYLpXAN8k2UVVOsW16TsS5F8Ws2I7Cm+PU1/rsVF47g== + dependencies: + cacache "^18.0.0" + json-parse-even-better-errors "^3.0.0" + pacote "^18.0.0" + proc-log "^4.1.0" + semver "^7.3.5" + +"@npmcli/name-from-folder@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz#c44d3a7c6d5c184bb6036f4d5995eee298945815" + integrity sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg== + "@npmcli/node-gyp@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a" integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== -"@npmcli/promise-spawn@^6.0.0", "@npmcli/promise-spawn@^6.0.1": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz#c8bc4fa2bd0f01cb979d8798ba038f314cfa70f2" - integrity sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg== +"@npmcli/package-json@5.2.0", "@npmcli/package-json@^5.0.0", "@npmcli/package-json@^5.1.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-5.2.0.tgz#a1429d3111c10044c7efbfb0fce9f2c501f4cfad" + integrity sha512-qe/kiqqkW0AGtvBjL8TJKZk/eBBSpnJkUWvHdQ9jM2lKHXRYYJuyNpJPlJw3c8QjC2ow6NZYiLExhUaeJelbxQ== dependencies: - which "^3.0.0" + "@npmcli/git" "^5.0.0" + glob "^10.2.2" + hosted-git-info "^7.0.0" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + proc-log "^4.0.0" + semver "^7.5.3" -"@npmcli/run-script@6.0.2", "@npmcli/run-script@^6.0.0": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-6.0.2.tgz#a25452d45ee7f7fb8c16dfaf9624423c0c0eb885" - integrity sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA== +"@npmcli/promise-spawn@^7.0.0": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz#1d53d34ffeb5d151bfa8ec661bcccda8bbdfd532" + integrity sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ== + dependencies: + which "^4.0.0" + +"@npmcli/query@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/query/-/query-3.1.0.tgz#bc202c59e122a06cf8acab91c795edda2cdad42c" + integrity sha512-C/iR0tk7KSKGldibYIB9x8GtO/0Bd0I2mhOaDb8ucQL/bQVTmGoeREaFj64Z5+iCBRf3dQfed0CjJL7I8iTkiQ== + dependencies: + postcss-selector-parser "^6.0.10" + +"@npmcli/redact@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/redact/-/redact-2.0.1.tgz#95432fd566e63b35c04494621767a4312c316762" + integrity sha512-YgsR5jCQZhVmTJvjduTOIHph0L73pK8xwMVaDY0PatySqVM9AZj93jpoXYSJqfHFxFkN9dmqTw6OiqExsS3LPw== + +"@npmcli/run-script@8.1.0", "@npmcli/run-script@^8.0.0", "@npmcli/run-script@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-8.1.0.tgz#a563e5e29b1ca4e648a6b1bbbfe7220b4bfe39fc" + integrity sha512-y7efHHwghQfk28G2z3tlZ67pLG0XdfYbcVG26r7YIXALRsrVQcTq4/tdenSmdOrEsNahIYA/eh8aEVROWGFUDg== dependencies: "@npmcli/node-gyp" "^3.0.0" - "@npmcli/promise-spawn" "^6.0.0" - node-gyp "^9.0.0" - read-package-json-fast "^3.0.0" - which "^3.0.0" + "@npmcli/package-json" "^5.0.0" + "@npmcli/promise-spawn" "^7.0.0" + node-gyp "^10.0.0" + proc-log "^4.0.0" + which "^4.0.0" -"@nrwl/devkit@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-16.7.3.tgz#eaace944c3d2f712f6b8ff03df16e58324bc40c0" - integrity sha512-3pHEOm6ASTTwH0nZF1hyHIDlXJBYbp+Xj4P1ymmG8v/e9t7aF5z8yOLOPiVvWSq3+KW86Ntt/CyjP9Yz1OF4/w== +"@nrwl/devkit@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-19.6.3.tgz#71e7e9cf7ca8e4dbc1868dd16ec43582122b385b" + integrity sha512-zrAboArNfrEMjimBl/0YeM08HfjqOEG/VHdCHKO+5QMDg65w7vDJ2flwyNhlmnMl8BMJSy9fNo6PNGhboOf3+w== dependencies: - "@nx/devkit" "16.7.3" + "@nx/devkit" "19.6.3" -"@nrwl/tao@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-16.7.3.tgz#bd2282238442bc670ad09be73a35fea8d011094f" - integrity sha512-kaH0i7ZuncSW8hGXg6DVlUBG319lUG/ene6aJUeV1spOxEsEqlckCm9HfJPfcVntvh9m1LauW+yk64cw/biVwg== +"@nrwl/tao@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-19.6.3.tgz#cd532b5c17709bdd7f4e1bc9e27c97bb62aba2da" + integrity sha512-j4vPU87yBhTrdyPFSNhlUkN29w4BQ+M14khT8PFGe+Y26gHMxNRNXNFUCwtVARYAc6IwxS8Uvlwy7AwXG2ETPA== dependencies: - nx "16.7.3" + nx "19.6.3" tslib "^2.3.0" -"@nx/devkit@16.7.3", "@nx/devkit@>=16.5.1 < 17": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-16.7.3.tgz#856befa64d5bc3e2807d40e19c0e618584c27cdd" - integrity sha512-5jb8m9jZBatBDNZMkc/jbfiETIP7fC5rH3dqtYFFZ35pAVWVMj6WhQdZDJldlo+iC+iIAmJ0kkiZQ82999g9Lw== +"@nx/devkit@19.6.3", "@nx/devkit@>=17.1.2 < 20": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-19.6.3.tgz#92649ca35168d6e1991b76f552483bd356b8386a" + integrity sha512-/d8Z5/Cy/H/1rIHxW3VjeK5dlvHwRxRj8rCm8/sj5Pz3GmGX03uuEK+J/p+VlP3gP8dAYMgZu3ImeqTAu6rBtw== dependencies: - "@nrwl/devkit" "16.7.3" + "@nrwl/devkit" "19.6.3" ejs "^3.1.7" enquirer "~2.3.6" ignore "^5.0.4" - semver "7.5.3" + minimatch "9.0.3" + semver "^7.5.3" tmp "~0.2.1" tslib "^2.3.0" + yargs-parser "21.1.1" -"@nx/nx-darwin-arm64@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.7.3.tgz#4742fb20394b5c8be80039ea3dda5707d282da6d" - integrity sha512-s1woGSGbNEzDSzNoSIIpaYkVwJmM0D89/1QmccVZIv7jvGGcqx4ONQPsBylWpDco3IeTDhNsOMzMhF3fvqhtgA== - -"@nx/nx-darwin-x64@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-16.7.3.tgz#9b9cc3d0074097bec2cdab48b185af2c02ff37ab" - integrity sha512-J9lE+T7Hm3hD+s33xidxa6Jkq2CCKZwwTrLO+Ff1/A2d4T13d16O/Rf3Y/nuveUjCVEYwwYkk4G5v2FPJ4i3SQ== - -"@nx/nx-freebsd-x64@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.7.3.tgz#5d6bb9d507576c5f94cceef2029b71186b92092e" - integrity sha512-/1WrplEyxTkoARsCUcI2FjMVy2AFuaH2oS1vFuGtBchWoKbgFZd3Aek8+oYt0wiQ7cfBxs2y92UqvTOhLygxOw== - -"@nx/nx-linux-arm-gnueabihf@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.7.3.tgz#c3f038934839d008f19df1cd39c4489325d2c125" - integrity sha512-Z3CLZcxBnpra8nlizK97eyohI9x+JPh4wp+87x9WvIiLGd+k3hO42nth/q0xXJs2G5emQN8cSLPscGzbZodVpA== - -"@nx/nx-linux-arm64-gnu@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.7.3.tgz#df84943a1499833fd2ad536e0548c070cdf2b498" - integrity sha512-a4E4psBgU0b7ZT99630mylxcrlLObgy4bA6JrT+4XIFAcaHkfCmWLupPyXgBCmSqQN01jsuXSYm/t7EWjKL98Q== - -"@nx/nx-linux-arm64-musl@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.7.3.tgz#ab90fb0eb16154ced6fc6290f433d91ba4b4b9c4" - integrity sha512-vl+WONX6uOS8uGwtcAlb4yiAh2ws/gZSLaIURJaDnf509FrYTb/RsBca5BskOQUYkKSI//6oQu653TRDKYxyWw== - -"@nx/nx-linux-x64-gnu@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.7.3.tgz#1c3534354f5dde1038cb2a91ee27dc8471bdeaec" - integrity sha512-udZ+6IOYv0Ra0MRpbAW8TSFdcUxtfuIryRsGVF2767HeWqHzOhLynmJyJPatJ7gXMVFaL7+zfcAoV6fm7My1FQ== - -"@nx/nx-linux-x64-musl@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.7.3.tgz#498226e4a2d38b730045c4265f76a4988a6a6b69" - integrity sha512-LQW1ttQWNekHoJTrzXMumaMxfYRcjsuGQP8Ki2pWuw43TFTQyI6Cfgk8/wjKv8ATc772cF9Tadyz4+JEIQlcNw== - -"@nx/nx-win32-arm64-msvc@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.7.3.tgz#d2ba0e5feea87bee07e3a9771b2cdc2b242bcd13" - integrity sha512-wCrpGqh5fPrlkhHZXVSPBDs9E3L5vIJHtdPrc1QP1uCQiV41mpauey31p6rjvQUWYCC0BGTWJGF+hAY7wYUHdg== - -"@nx/nx-win32-x64-msvc@16.7.3": - version "16.7.3" - resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.7.3.tgz#be86889de92c52273d0672ce485146482dcd6b2e" - integrity sha512-Ja2+VhMFWiVsZt3mkdsU1MCotQlAxG94zFiJYbXufsERJItWuN4i0mZjeZITiRBosEmkn4SeAUkg+xuiH+q4GA== +"@nx/nx-darwin-arm64@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.6.3.tgz#dc81e7d36f7eb99437ce162e2d228430e9b1d642" + integrity sha512-P7WlX5YDZOABAlyfpR6eObigQTNuUuy3iJVUuGwp1Nuo3VPMPkpK1GMWKWLwOR9+2jGnF5MzuqWHk7CdF33uqQ== + +"@nx/nx-darwin-x64@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-19.6.3.tgz#05ee87e8c33969be0f9ff00f832141e60eace474" + integrity sha512-HF28dPc7h0EmEGYJWJUPA3cBvjXyHbSbGQP5oP885gos9zcyVBjQ2kdJEUZDNMHB9KlZraeXbmV1umFkikjn6A== + +"@nx/nx-freebsd-x64@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.6.3.tgz#348f1dcea2aa849c58608c30d5eca1bcc4f9e935" + integrity sha512-y52dWxQ/x2ccyPqA4Vou4CnTqZX4gr/wV9myJX56G1CyEpWasmcqmPFeOKQd6dj7llGM/KJ/4Gz29RYxcWffcA== + +"@nx/nx-linux-arm-gnueabihf@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.6.3.tgz#601f13acddb870b78af3c704859da0d047ee5600" + integrity sha512-RneCg1tglLbP4cmGnGUs4FgZVT0aOA9wA53tO4IbyxLnlRXNY9OE452YLgqv3H7sLtNjsey2Lkq1seBHtr3p/Q== + +"@nx/nx-linux-arm64-gnu@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.6.3.tgz#85c54cefc541ff57ceea373616470bbdb25db89c" + integrity sha512-Y+vgqaxrPQUEtCzxK25QY4ahO90l0eWgVrvCALexGmq0lW41JrVpfTTsbH/BAPLsx+u8A/GPAQAgrmg7d5lSxw== + +"@nx/nx-linux-arm64-musl@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.6.3.tgz#6a2f0654735006ccbdbc47dd7b97e959294df286" + integrity sha512-o/99DBgafbjiJ4e9KFxaldvtlZta/FdzEiQQW+SQQ0JGSYlLCZZ8tIT6t3edV7cmG+gQLNMwolJzgpY53O9wjA== + +"@nx/nx-linux-x64-gnu@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.6.3.tgz#bff4c697ac2d8b2d031fd7d7ea7d0b59c4b3fc24" + integrity sha512-ppp0NBOhwJ39U1vR7h8jhFSfiur6CZPSUYjXsV44BlaNGc1wHZ+7FDXhzOTokgTNWHavYgYOJuVan5LtTLKJkA== + +"@nx/nx-linux-x64-musl@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.6.3.tgz#ae48b18a80dcf656452275c04ad06e2401ca25f5" + integrity sha512-H7xgsT5OTtVYCXjXBLZu28v+rIInhbUggrgVJ2iQJFGBT2A2qmvGmDJdcDz8+K90ku1f4VuWmm8i+TEyDEcBuQ== + +"@nx/nx-win32-arm64-msvc@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.6.3.tgz#ebe6f2b29258e7b2fba1726849c54c13f67a81cd" + integrity sha512-o9O6lSmx67zUnqOtlDC4YpC++fiUkixgIsQEG8J/2jdNgAATqOtERcqCNra/uke/Q94Vht2tVXjXF3uj92APhw== + +"@nx/nx-win32-x64-msvc@19.6.3": + version "19.6.3" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.6.3.tgz#b3b4ae931bda6679dc3cc8939c24309f73e70740" + integrity sha512-6NQhc7jYQ/sqPt5fDy8C+br73kTd5jhb8ZkPtEy2Amr1aA1K9SAxZAYfyvxLHS2z1nBEelNFgXe6HBmDX92FkA== "@oclif/core@2.8.6": version "2.8.6" @@ -3032,10 +3318,10 @@ find-up "^4.1.0" fs-extra "^8.1.0" -"@openzeppelin/contracts@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.3.tgz#00d7a8cf35a475b160b3f0293a6403c511099364" - integrity sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg== +"@openzeppelin/contracts@4.9.6", "@openzeppelin/contracts@^4.9.6": + version "4.9.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" + integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== "@openzeppelin/test-helpers@^0.5.16": version "0.5.16" @@ -3053,14 +3339,6 @@ web3 "^1.2.5" web3-utils "^1.2.5" -"@parcel/watcher@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.4.tgz#f300fef4cc38008ff4b8c29d92588eced3ce014b" - integrity sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg== - dependencies: - node-addon-api "^3.2.1" - node-gyp-build "^4.3.0" - "@peculiar/asn1-schema@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" @@ -3098,6 +3376,27 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== +"@pnpm/config.env-replace@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" + integrity sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w== + +"@pnpm/network.ca-file@^1.0.1": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz#2ab05e09c1af0cdf2fcf5035bea1484e222f7983" + integrity sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA== + dependencies: + graceful-fs "4.2.10" + +"@pnpm/npm-conf@^2.1.0": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz#bb375a571a0bd63ab0a23bece33033c683e9b6b0" + integrity sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw== + dependencies: + "@pnpm/config.env-replace" "^1.1.0" + "@pnpm/network.ca-file" "^1.0.1" + config-chain "^1.1.11" + "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" @@ -3200,10 +3499,10 @@ resolved "https://registry.yarnpkg.com/@redux-saga/types/-/types-1.2.1.tgz#9403f51c17cae37edf870c6bc0c81c1ece5ccef8" integrity sha512-1dgmkh+3so0+LlBWRhGA33ua4MYr7tUOj+a9Si28vUi0IUFNbff1T3sgpeDJI/LaC75bBYnQ0A3wXjn0OrRNBA== -"@reduxjs/toolkit@^1.9.5": - version "1.9.5" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.5.tgz#d3987849c24189ca483baa7aa59386c8e52077c4" - integrity sha512-Rt97jHmfTeaxL4swLRNPD/zV4OxTes4la07Xc4hetpUW/vc75t5m1ANyxG6ymnEQ2FsLQsoMlYB2vV1sO3m8tQ== +"@reduxjs/toolkit@^1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.7.tgz#7fc07c0b0ebec52043f8cb43510cf346405f78a6" + integrity sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ== dependencies: immer "^9.0.21" redux "^4.2.1" @@ -3447,51 +3746,58 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" -"@sideway/address@^4.1.3": - version "4.1.4" - resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" - integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== +"@shikijs/core@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.14.1.tgz#008f1c4a20ff83fd1672d9e31d76b687862f7511" + integrity sha512-KyHIIpKNaT20FtFPFjCQB5WVSTpLR/n+jQXhWHWVUMm9MaOaG9BGOG0MSyt7yA4+Lm+4c9rTc03tt3nYzeYSfw== dependencies: - "@hapi/hoek" "^9.0.0" + "@types/hast" "^3.0.4" -"@sideway/formula@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" - integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== - -"@sideway/pinpoint@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" - integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== +"@sigstore/bundle@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.3.2.tgz#ad4dbb95d665405fd4a7a02c8a073dbd01e4e95e" + integrity sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA== + dependencies: + "@sigstore/protobuf-specs" "^0.3.2" -"@sigstore/bundle@^1.1.0": +"@sigstore/core@^1.0.0", "@sigstore/core@^1.1.0": version "1.1.0" - resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.1.0.tgz#17f8d813b09348b16eeed66a8cf1c3d6bd3d04f1" - integrity sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog== - dependencies: - "@sigstore/protobuf-specs" "^0.2.0" + resolved "https://registry.yarnpkg.com/@sigstore/core/-/core-1.1.0.tgz#5583d8f7ffe599fa0a89f2bf289301a5af262380" + integrity sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg== -"@sigstore/protobuf-specs@^0.2.0": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz#be9ef4f3c38052c43bd399d3f792c97ff9e2277b" - integrity sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A== +"@sigstore/protobuf-specs@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz#5becf88e494a920f548d0163e2978f81b44b7d6f" + integrity sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw== -"@sigstore/sign@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-1.0.0.tgz#6b08ebc2f6c92aa5acb07a49784cb6738796f7b4" - integrity sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA== +"@sigstore/sign@^2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-2.3.2.tgz#d3d01e56d03af96fd5c3a9b9897516b1233fc1c4" + integrity sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA== + dependencies: + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.0.0" + "@sigstore/protobuf-specs" "^0.3.2" + make-fetch-happen "^13.0.1" + proc-log "^4.2.0" + promise-retry "^2.0.1" + +"@sigstore/tuf@^2.3.4": + version "2.3.4" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-2.3.4.tgz#da1d2a20144f3b87c0172920cbc8dcc7851ca27c" + integrity sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw== dependencies: - "@sigstore/bundle" "^1.1.0" - "@sigstore/protobuf-specs" "^0.2.0" - make-fetch-happen "^11.0.1" + "@sigstore/protobuf-specs" "^0.3.2" + tuf-js "^2.2.1" -"@sigstore/tuf@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.3.tgz#2a65986772ede996485728f027b0514c0b70b160" - integrity sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg== +"@sigstore/verify@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@sigstore/verify/-/verify-1.2.1.tgz#c7e60241b432890dcb8bd8322427f6062ef819e1" + integrity sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g== dependencies: - "@sigstore/protobuf-specs" "^0.2.0" - tuf-js "^1.1.7" + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.1.0" + "@sigstore/protobuf-specs" "^0.3.2" "@sinclair/typebox@^0.27.8": version "0.27.8" @@ -3503,6 +3809,16 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== +"@sindresorhus/is@^5.2.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" + integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== + +"@sindresorhus/merge-streams@^2.1.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958" + integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg== + "@solidity-parser/parser@^0.14.1": version "0.14.5" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" @@ -3517,6 +3833,11 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" + integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== + "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" @@ -3531,11 +3852,6 @@ dependencies: defer-to-connect "^2.0.1" -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - "@truffle/abi-utils@^0.3.0", "@truffle/abi-utils@^0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.3.9.tgz#c476f5cfe01072b513b3e93fd7bea05cf7bd9d96" @@ -3545,15 +3861,6 @@ fast-check "3.1.1" web3-utils "1.8.2" -"@truffle/abi-utils@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-1.0.2.tgz#41210b234912051433960382af009f339f8a9642" - integrity sha512-MefEcxsBlprKIpfW7eh2I5zJqlWM18xk3duL7SW4VhIs6kNEec//hCpEDoE6P0m7GjqY3vk8X4vnf4aLlZkRcA== - dependencies: - change-case "3.0.2" - fast-check "3.1.1" - web3-utils "1.10.0" - "@truffle/abi-utils@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-1.0.3.tgz#9f0df7a8aaf5e815bee47e0ad26bd4c91e4045f2" @@ -3568,10 +3875,10 @@ resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.7.tgz#cf7923a3ae5b591ae4c2a5ee45994a310ccaf1ee" integrity sha512-1nibqGjEHC7KAyDThEFvbm2+EO8zAHee/VjCtxkYBE3ySwP50joh0QCEBjy7K/9z+icpMoDucfxmgaKToBFUgQ== -"@truffle/blockchain-utils@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.8.tgz#0c1a369aa72f51df5af095678803242ea0a0d6ae" - integrity sha512-ZskpYDNHkXD3ota4iU3pZz6kLth87RC+wDn66Rp2Or+DqqJCKdnmS9GDctBi1EcMPDEi0BqpkdrfBuzA9uIkGg== +"@truffle/blockchain-utils@^0.1.9": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.9.tgz#d9b55bd23a134578e4217bae55a6dfbbb038d6dc" + integrity sha512-RHfumgbIVo68Rv9ofDYfynjnYZIfP/f1vZy4RoqkfYAO+fqfc58PDRzB1WAGq2U6GPuOnipOJxQhnqNnffORZg== "@truffle/code-utils@^3.0.4": version "3.0.4" @@ -3596,22 +3903,6 @@ utf8 "^3.0.0" web3-utils "1.8.2" -"@truffle/codec@^0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.17.2.tgz#52a3604f73b89964373eec945f20d5cd0f4244d4" - integrity sha512-n9HX8R5a5+/j6Y0+lqSzIyU1cUxTRYn/xEWp0Qc1b0Vtltad7wvVh+KLGvbm/KQEX3o1RK1xRIUN2E0QlDeQnA== - dependencies: - "@truffle/abi-utils" "^1.0.2" - "@truffle/compile-common" "^0.9.7" - big.js "^6.0.3" - bn.js "^5.1.3" - cbor "^5.2.0" - debug "^4.3.1" - lodash "^4.17.21" - semver "7.5.2" - utf8 "^3.0.0" - web3-utils "1.10.0" - "@truffle/codec@^0.17.3": version "0.17.3" resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.17.3.tgz#94057e56e1a947594b35eba498d96915df3861d2" @@ -3636,14 +3927,6 @@ "@truffle/error" "^0.2.0" colors "1.4.0" -"@truffle/compile-common@^0.9.7": - version "0.9.7" - resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.7.tgz#e8ba6cd49c4d4e7ae4684ba453fb9b2dcd09b347" - integrity sha512-TXuVLc5yJ/A0bSWw5OWIdXmcyaPpj3TJQ60ki7w9cIuW65Bazw7P4FRPaVNjR9YGe1FLYJ36GSdd9V3egPbzCg== - dependencies: - "@truffle/error" "^0.2.1" - colors "1.4.0" - "@truffle/compile-common@^0.9.8": version "0.9.8" resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.8.tgz#f91507c895852289a17bf401eefebc293c4c69f0" @@ -3710,10 +3993,10 @@ ajv "^6.10.0" debug "^4.3.1" -"@truffle/contract-schema@^3.4.15": - version "3.4.15" - resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.15.tgz#199789b3f0a61b0e564ee8d62d7a7e5a8e6b749f" - integrity sha512-m13e1VlXEdxiXiqv/SmPlqbdtcuhjwIGTICm+JCEO8nt0NYBbdMC2paNkpUvGz9lK139JxIupMHctEV4vgkldw== +"@truffle/contract-schema@^3.4.16": + version "3.4.16" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.16.tgz#c529c3f230db407b2f03290373b20b7366f2d37e" + integrity sha512-g0WNYR/J327DqtJPI70ubS19K1Fth/1wxt2jFqLsPmz5cGZVjCwuhiie+LfBde4/Mc9QR8G+L3wtmT5cyoBxAg== dependencies: ajv "^6.10.0" debug "^4.3.1" @@ -3726,17 +4009,17 @@ debug "^4.3.1" glob "^7.1.6" -"@truffle/contract@4.6.29": - version "4.6.29" - resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.6.29.tgz#c1f0b9f65985ba5d8f35626a612dd31205cfcd6b" - integrity sha512-gbgmC2YdcSD4QGvx3GWGIVhyQxEPkChcC2a3D5d9aj2XfV3f6+FQw5PuL1wreA3I222ggZQqzbvMvhpp8gWs4Q== +"@truffle/contract@4.6.31": + version "4.6.31" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.6.31.tgz#75cb059689ce73b365675d9650718908c01b6b58" + integrity sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ== dependencies: "@ensdomains/ensjs" "^2.1.0" - "@truffle/blockchain-utils" "^0.1.8" - "@truffle/contract-schema" "^3.4.15" - "@truffle/debug-utils" "^6.0.56" - "@truffle/error" "^0.2.1" - "@truffle/interface-adapter" "^0.5.36" + "@truffle/blockchain-utils" "^0.1.9" + "@truffle/contract-schema" "^3.4.16" + "@truffle/debug-utils" "^6.0.57" + "@truffle/error" "^0.2.2" + "@truffle/interface-adapter" "^0.5.37" bignumber.js "^7.2.1" debug "^4.3.1" ethers "^4.0.32" @@ -3850,12 +4133,12 @@ debug "^4.3.1" highlightjs-solidity "^2.0.6" -"@truffle/debug-utils@^6.0.56": - version "6.0.56" - resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.56.tgz#7727891580c52cc9acfbe46d43ca4ef9aa338713" - integrity sha512-tCB0nKZirWlQp+0JqqaBxZk7CIwDBIHl8Q9CyGJZA4pdAwKHHMI3FoPAXzubP7X0YuICeQsAmpOAXzOHGYGkjg== +"@truffle/debug-utils@^6.0.57": + version "6.0.57" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.57.tgz#4e9a1051221c5f467daa398b0ca638d8b6408a82" + integrity sha512-Q6oI7zLaeNLB69ixjwZk2UZEWBY6b2OD1sjLMGDKBGR7GaHYiw96GLR2PFgPH1uwEeLmV4N78LYaQCrDsHbNeA== dependencies: - "@truffle/codec" "^0.17.2" + "@truffle/codec" "^0.17.3" "@trufflesuite/chromafi" "^3.0.0" bn.js "^5.1.3" chalk "^2.4.2" @@ -3893,11 +4176,6 @@ resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.0.tgz#65de6f03f5c041f883cc87677eecf8231428f1ab" integrity sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ== -"@truffle/error@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.1.tgz#71bb8e777a832e0cfe09a8638a70a5177aad8628" - integrity sha512-5Qy+z9dg9hP37WNdLnXH4b9MzemWrjTufRq7/DTKqimjyxCP/1zlL8gQEMdiSx1BBtAZz0xypkID/jb7AF/Osg== - "@truffle/error@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.2.tgz#1b4c4237c14dda792f20bd4f19ff4e4585b47796" @@ -3966,15 +4244,6 @@ ethers "^4.0.32" web3 "1.8.2" -"@truffle/interface-adapter@^0.5.36": - version "0.5.36" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.36.tgz#feef9f75f32f1298c2912ec78a23a704917b3ba7" - integrity sha512-e6ECu9YDJuQjjxphdtJatHGgjlGsX/a3rQwqG2kBrK4cynGJdlejoo2iv/7Dj97wgIMIr1qH3L2WDrfTNF+K1g== - dependencies: - bn.js "^5.1.3" - ethers "^4.0.32" - web3 "1.10.0" - "@truffle/interface-adapter@^0.5.37": version "0.5.37" resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.37.tgz#95d249c1912d2baaa63c54e8a138d3f476a1181a" @@ -4142,18 +4411,25 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@tufjs/canonical-json@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" - integrity sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ== +"@tufjs/canonical-json@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a" + integrity sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA== -"@tufjs/models@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-1.0.4.tgz#5a689630f6b9dbda338d4b208019336562f176ef" - integrity sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A== +"@tufjs/models@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-2.0.1.tgz#e429714e753b6c2469af3212e7f320a6973c2812" + integrity sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg== dependencies: - "@tufjs/canonical-json" "1.0.0" - minimatch "^9.0.0" + "@tufjs/canonical-json" "2.0.0" + minimatch "^9.0.4" + +"@tybys/wasm-util@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@tybys/wasm-util/-/wasm-util-0.9.0.tgz#3e75eb00604c8d6db470bf18c37b7d984a0e3355" + integrity sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw== + dependencies: + tslib "^2.4.0" "@typechain/ethers-v5@^11.1.2": version "11.1.2" @@ -4163,10 +4439,10 @@ lodash "^4.17.15" ts-essentials "^7.0.1" -"@typechain/hardhat@^8.0.3": - version "8.0.3" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-8.0.3.tgz#a114825f130405bbb8e535314003733b7ce3f91c" - integrity sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng== +"@typechain/hardhat@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.1.0.tgz#6985015f01dfb37ef2ca8a29c742d05890351ddc" + integrity sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA== dependencies: fs-extra "^9.1.0" @@ -4254,31 +4530,10 @@ resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*", "@types/eslint@^8.4.2": - version "8.21.3" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.21.3.tgz#5794b3911f0f19e34e3a272c49cbdf48d6f543f2" - integrity sha512-fa7GkppZVEByMWGbTtE5MbmXWJTVbrjjaS8K6uQj+XtuuUv1fsuPAxhygfqLmsb/Ufb3CV8deFCpiMfAgi00Sw== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== +"@types/estree@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== "@types/ethereum-protocol@*", "@types/ethereum-protocol@^1.0.0": version "1.0.2" @@ -4330,6 +4585,13 @@ "@types/minimatch" "*" "@types/node" "*" +"@types/hast@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" + integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== + dependencies: + "@types/unist" "*" + "@types/hoist-non-react-statics@^3.3.1": version "3.3.1" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" @@ -4343,21 +4605,21 @@ resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== +"@types/http-cache-semantics@^4.0.2": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" + integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== + "@types/js-yaml@^4.0.0": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.8": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/json-schema@^7.0.12": - version "7.0.12" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" - integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== - "@types/json-stable-stringify@^1.0.32": version "1.0.34" resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.34.tgz#c0fb25e4d957e0ee2e497c1f553d7f8bb668fd75" @@ -4375,10 +4637,10 @@ dependencies: "@types/node" "*" -"@types/lodash@^4.14.202": - version "4.14.202" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8" - integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== +"@types/lodash@^4.17.7": + version "4.17.7" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.7.tgz#2f776bcb53adc9e13b2c0dfd493dfcbd7de43612" + integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== "@types/long@^4.0.0", "@types/long@^4.0.1": version "4.0.2" @@ -4410,10 +4672,10 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== -"@types/mocha@^10.0.6": - version "10.0.6" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" - integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== +"@types/mocha@^10.0.7": + version "10.0.7" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.7.tgz#4c620090f28ca7f905a94b706f74dc5b57b44f2f" + integrity sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw== "@types/node@*": version "18.15.5" @@ -4457,15 +4719,15 @@ dependencies: "@types/node" "*" -"@types/prettier@^2.1.1", "@types/prettier@^2.6.0": +"@types/prettier@^2.1.1": version "2.7.2" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== -"@types/promise-retry@^1.1.3": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@types/promise-retry/-/promise-retry-1.1.3.tgz#baab427419da9088a1d2f21bf56249c21b3dd43c" - integrity sha512-LxIlEpEX6frE3co3vCO2EUJfHIta1IOmhDlcAsR4GMMv9hev1iTI9VwberVGkePJAuLZs5rMucrV8CziCfuJMw== +"@types/promise-retry@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@types/promise-retry/-/promise-retry-1.1.6.tgz#3c48826d8a27f68f9d4900fc7448f08a1532db44" + integrity sha512-EC1+OMXV0PZb0pf+cmyxc43MEP2CDumZe4AfuxWboxxEixztIebknpJPZAX5XlodGF1OY+C1E/RAeNGzxf+bJA== dependencies: "@types/retry" "*" @@ -4500,14 +4762,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/readable-stream@^2.3.13": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" - integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== - dependencies: - "@types/node" "*" - safe-buffer "~5.1.1" - "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" @@ -4537,11 +4791,6 @@ resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-3.0.1.tgz#1254750a4fec4aff2ebec088ccd0bb02e91fedb4" integrity sha512-giB9gzDeiCeloIXDgzFBCgjj1k4WxcDrZtGl6h1IqmUPlxF+Nx8Ve+96QCyDZ/HseB/uvDsKbpib9hU5cU53pw== -"@types/semver@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== - "@types/serve-static@*": version "1.15.1" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.1.tgz#86b1753f0be4f9a1bee68d459fcda5be4ea52b5d" @@ -4555,6 +4804,11 @@ resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.4.tgz#62e393f8bc4bd8a06154d110c7d042a93751def3" integrity sha512-uO4CD2ELOjw8tasUrAhvnn2W4A0ZECOvMjCivJr4gA9pGgjv+qxKWY9GLTMVEK8ej85BxQOocUyE7hImmSQYcg== +"@types/unist@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" + integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== + "@types/use-sync-external-store@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" @@ -4589,145 +4843,142 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.1.tgz#0df881a47da1c1a9774f39495f5f7052f86b72e0" - integrity sha512-nISDRYnnIpk7VCFrGcu1rnZfM1Dh9LRHnfgdkjcbi/l7g16VYRri3TjXi9Ir4lOZSw5N/gnV/3H7jIPQ8Q4daA== - dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.18.1" - "@typescript-eslint/type-utils" "6.18.1" - "@typescript-eslint/utils" "6.18.1" - "@typescript-eslint/visitor-keys" "6.18.1" - debug "^4.3.4" +"@typescript-eslint/eslint-plugin@^8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz#726627fad16d41d20539637efee8c2329fe6be32" + integrity sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/type-utils" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" graphemer "^1.4.0" - ignore "^5.2.4" + ignore "^5.3.1" natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" + ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^5.10.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.56.0.tgz#42eafb44b639ef1dbd54a3dbe628c446ca753ea6" - integrity sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg== +"@typescript-eslint/parser@^6.7.5": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== dependencies: - "@typescript-eslint/scope-manager" "5.56.0" - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/typescript-estree" "5.56.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/parser@^6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.18.1.tgz#3c3987e186b38c77b30b6bfa5edf7c98ae2ec9d3" - integrity sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA== +"@typescript-eslint/parser@^8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.3.0.tgz#3c72c32bc909cb91ce3569e7d11d729ad84deafa" + integrity sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ== dependencies: - "@typescript-eslint/scope-manager" "6.18.1" - "@typescript-eslint/types" "6.18.1" - "@typescript-eslint/typescript-estree" "6.18.1" - "@typescript-eslint/visitor-keys" "6.18.1" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz#62b4055088903b5254fa20403010e1c16d6ab725" - integrity sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw== +"@typescript-eslint/scope-manager@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== dependencies: - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/visitor-keys" "5.56.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.18.1.tgz#28c31c60f6e5827996aa3560a538693cb4bd3848" - integrity sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw== +"@typescript-eslint/scope-manager@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz#834301d2e70baf924c26818b911bdc40086f7468" + integrity sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg== dependencies: - "@typescript-eslint/types" "6.18.1" - "@typescript-eslint/visitor-keys" "6.18.1" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" -"@typescript-eslint/type-utils@6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.18.1.tgz#115cf535f8b39db8301677199ce51151e2daee96" - integrity sha512-wyOSKhuzHeU/5pcRDP2G2Ndci+4g653V43gXTpt4nbyoIOAASkGDA9JIAgbQCdCkcr1MvpSYWzxTz0olCn8+/Q== +"@typescript-eslint/type-utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz#c1ae6af8c21a27254321016b052af67ddb44a9ac" + integrity sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg== dependencies: - "@typescript-eslint/typescript-estree" "6.18.1" - "@typescript-eslint/utils" "6.18.1" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/utils" "8.3.0" debug "^4.3.4" - ts-api-utils "^1.0.1" + ts-api-utils "^1.3.0" -"@typescript-eslint/types@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.56.0.tgz#b03f0bfd6fa2afff4e67c5795930aff398cbd834" - integrity sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w== +"@typescript-eslint/types@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.18.1.tgz#91617d8080bcd99ac355d9157079970d1d49fefc" - integrity sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw== +"@typescript-eslint/types@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.3.0.tgz#378e62447c2d7028236e55a81d3391026600563b" + integrity sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw== -"@typescript-eslint/typescript-estree@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz#48342aa2344649a03321e74cab9ccecb9af086c3" - integrity sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg== +"@typescript-eslint/typescript-estree@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== dependencies: - "@typescript-eslint/types" "5.56.0" - "@typescript-eslint/visitor-keys" "5.56.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.1.tgz#a12b6440175b4cbc9d09ab3c4966c6b245215ab4" - integrity sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA== +"@typescript-eslint/typescript-estree@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz#3e3d38af101ba61a8568f034733b72bfc9f176b9" + integrity sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA== dependencies: - "@typescript-eslint/types" "6.18.1" - "@typescript-eslint/visitor-keys" "6.18.1" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/utils@6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.18.1.tgz#3451cfe2e56babb6ac657e10b6703393d4b82955" - integrity sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ== +"@typescript-eslint/utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.3.0.tgz#b10972319deac5959c7a7075d0cf2b5e1de7ec08" + integrity sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.18.1" - "@typescript-eslint/types" "6.18.1" - "@typescript-eslint/typescript-estree" "6.18.1" - semver "^7.5.4" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" -"@typescript-eslint/visitor-keys@5.56.0": - version "5.56.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz#f19eb297d972417eb13cb69b35b3213e13cc214f" - integrity sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q== +"@typescript-eslint/visitor-keys@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== dependencies: - "@typescript-eslint/types" "5.56.0" - eslint-visitor-keys "^3.3.0" + "@typescript-eslint/types" "6.21.0" + eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@6.18.1": - version "6.18.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.1.tgz#704d789bda2565a15475e7d22f145b8fe77443f4" - integrity sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA== +"@typescript-eslint/visitor-keys@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz#320d747d107af1eef1eb43fbc4ccdbddda13068b" + integrity sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA== dependencies: - "@typescript-eslint/types" "6.18.1" - eslint-visitor-keys "^3.4.1" + "@typescript-eslint/types" "8.3.0" + eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" - integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== dependencies: "@webassemblyjs/helper-numbers" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" @@ -4742,10 +4993,10 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== -"@webassemblyjs/helper-buffer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" - integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== "@webassemblyjs/helper-numbers@1.11.6": version "1.11.6" @@ -4761,15 +5012,15 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== -"@webassemblyjs/helper-wasm-section@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" - integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/ieee754@1.11.6": version "1.11.6" @@ -4790,77 +5041,75 @@ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== -"@webassemblyjs/wasm-edit@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" - integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-opt" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" - "@webassemblyjs/wast-printer" "1.11.6" - -"@webassemblyjs/wasm-gen@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" - integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== - dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wasm-opt@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" - integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" - integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-api-error" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wast-printer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" - integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" - integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== -"@webpack-cli/info@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" - integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== - dependencies: - envinfo "^7.7.3" +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== -"@webpack-cli/serve@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" - integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== "@whatwg-node/events@^0.0.2": version "0.0.2" @@ -4963,10 +5212,10 @@ js-yaml "^3.10.0" tslib "^2.4.0" -"@zkochan/js-yaml@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826" - integrity sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg== +"@zkochan/js-yaml@0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz#4b0cb785220d7c28ce0ec4d0804deb5d821eae89" + integrity sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ== dependencies: argparse "^2.0.1" @@ -4986,7 +5235,7 @@ JSONStream@^1.0.3, JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" -abbrev@1, abbrev@^1.0.0: +abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -4996,6 +5245,11 @@ abbrev@1.0.x: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== +abbrev@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" + integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== + abi-to-sol@^0.6.6: version "0.6.6" resolved "https://registry.yarnpkg.com/abi-to-sol/-/abi-to-sol-0.6.6.tgz#2f0b7ea949f7015c1a7939d200b9e8d07f2c3c6d" @@ -5024,7 +5278,7 @@ abortcontroller-polyfill@^1.7.3, abortcontroller-polyfill@^1.7.5: resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== -abstract-level@1.0.3, abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: +abstract-level@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== @@ -5093,10 +5347,10 @@ accepts@^1.3.5, accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== +acorn-import-attributes@^1.9.5: + version "1.9.5" + resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" + integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== acorn-jsx@^5.3.2: version "5.3.2" @@ -5142,11 +5396,6 @@ add-stream@^1.0.0: resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ== -address@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - adm-zip@^0.4.16: version "0.4.16" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" @@ -5157,7 +5406,7 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -agent-base@6, agent-base@^6.0.2: +agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -5171,12 +5420,12 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" -agentkeepalive@^4.2.1: - version "4.5.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" - integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== +agent-base@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== dependencies: - humanize-ms "^1.2.1" + debug "^4.3.4" aggregate-error@^3.0.0: version "3.1.0" @@ -5208,7 +5457,7 @@ ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.6.3: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.6.3: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -5218,11 +5467,28 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.6.3: require-from-string "^2.0.2" uri-js "^4.2.2" +ajv@^8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== +ansi-align@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59" + integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== + dependencies: + string-width "^4.1.0" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -5233,7 +5499,7 @@ ansi-colors@^3.2.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== -ansi-colors@^4.1.1: +ansi-colors@^4.1.1, ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== @@ -5275,17 +5541,12 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-sequence-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed" - integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== - ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -5314,10 +5575,10 @@ ansicolors@~0.3.2: resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== -antlr4@^4.11.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.12.0.tgz#e2323fbb057c77068a174914b0533398aeaba56a" - integrity sha512-23iB5IzXJZRZeK9TigzUyrNc9pSmNqAerJRBcNq1ETrmttMWRgaYZzC561IgEO3ygKsDJTYDTozABXa4b/fTQQ== +antlr4@^4.13.1-patch-1: + version "4.13.2" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.2.tgz#0d084ad0e32620482a9c3a0e2470c02e72e4006d" + integrity sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg== antlr4ts@^0.5.0-alpha.4: version "0.5.0-alpha.4" @@ -5469,7 +5730,7 @@ append-transform@^2.0.0: dependencies: default-require-extensions "^3.0.0" -"aproba@^1.0.3 || ^2.0.0": +aproba@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== @@ -5479,14 +5740,6 @@ archy@^1.0.0: resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -5731,10 +5984,10 @@ async@^3.2.3, async@^3.2.4: resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== -async@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" - integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== +async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== asynckit@^0.4.0: version "0.4.0" @@ -5811,12 +6064,12 @@ axios@^0.26.1: dependencies: follow-redirects "^1.14.8" -axios@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== +axios@^1.7.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" + integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -5946,18 +6199,6 @@ big.js@^6.0.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== -bigint-crypto-utils@^3.0.23: - version "3.1.8" - resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.8.tgz#e2e0f40cf45488f9d7f0e32ff84152aa73819d5d" - integrity sha512-+VMV9Laq8pXLBKKKK49nOoq9bfR3j7NNQAtbA617a4nw9bVLo8rsqkKMBgM2AJWlNX9fEIyYaYX+d0laqYV4tw== - dependencies: - bigint-mod-arith "^3.1.0" - -bigint-mod-arith@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bigint-mod-arith/-/bigint-mod-arith-3.1.2.tgz#658e416bc593a463d97b59766226d0a3021a76b1" - integrity sha512-nx8J8bBeiRR+NlsROFH9jHswW5HO8mgfOSqW0AmjicMMvaONDa8AO+5ViKDUUNytBPWiwfvZP4/Bj4Y3lUfvgQ== - bignumber.js@*, bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" @@ -5968,16 +6209,15 @@ bignumber.js@7.2.1, bignumber.js@^7.2.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== -bin-build@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" - integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== +bin-links@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-4.0.4.tgz#c3565832b8e287c85f109a02a17027d152a58a63" + integrity sha512-cMtq4W5ZsEwcutJrVId+a/tjt8GSbS+h0oNkdl6+6rBuEv8Ot33Bevj5KPm40t309zuhVic8NjpuL42QCiJWWA== dependencies: - decompress "^4.0.0" - download "^6.2.2" - execa "^0.7.0" - p-map-series "^1.0.0" - tempfile "^2.0.0" + cmd-shim "^6.0.0" + npm-normalize-package-bin "^3.0.0" + read-cmd-shim "^4.0.0" + write-file-atomic "^5.0.0" binary-extensions@^2.0.0: version "2.2.0" @@ -6042,35 +6282,17 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@^1.16.0, body-parser@^1.19.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +body-parser@1.20.2, body-parser@^1.16.0, body-parser@^1.19.0: version "1.20.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== @@ -6093,6 +6315,20 @@ boolbase@^1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== +boxen@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" + integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^6.2.0" + chalk "^4.1.0" + cli-boxes "^2.2.1" + string-width "^4.2.2" + type-fest "^0.20.2" + widest-line "^3.1.0" + wrap-ansi "^7.0.0" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -6108,28 +6344,18 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +braces@^3.0.2, braces@^3.0.3, braces@~3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-level@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" - integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.1" - module-error "^1.0.2" - run-parallel-limit "^1.1.0" - browser-pack@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.1.0.tgz#c34ba10d0b9ce162b5af227c7131c92c2ecd5774" @@ -6154,7 +6380,7 @@ browser-resolve@^2.0.0: dependencies: resolve "^1.17.0" -browser-stdout@1.3.1: +browser-stdout@1.3.1, browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== @@ -6220,7 +6446,7 @@ browserify-zlib@~0.2.0: dependencies: pako "~1.0.5" -browserify@^17.0.0: +browserify@17.0.0: version "17.0.0" resolved "https://registry.yarnpkg.com/browserify/-/browserify-17.0.0.tgz#4c48fed6c02bfa2b51fd3b670fddb805723cdc22" integrity sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w== @@ -6274,7 +6500,17 @@ browserify@^17.0.0: vm-browserify "^1.0.0" xtend "^4.0.0" -browserslist@^4.14.5, browserslist@^4.21.3, browserslist@^4.21.5: +browserslist@^4.21.10: + version "4.22.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.3.tgz#299d11b7e947a6b843981392721169e27d60c5a6" + integrity sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A== + dependencies: + caniuse-lite "^1.0.30001580" + electron-to-chromium "^1.4.648" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + +browserslist@^4.21.3, browserslist@^4.21.5: version "4.21.5" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7" integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== @@ -6294,6 +6530,16 @@ browserslist@^4.21.9: node-releases "^2.0.13" update-browserslist-db "^1.0.11" +browserslist@^4.23.1: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== + dependencies: + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -6335,11 +6581,6 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -6368,7 +6609,7 @@ buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: +buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -6403,11 +6644,6 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== -builtins@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" - integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== - builtins@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" @@ -6432,17 +6668,17 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cacache@^17.0.0: - version "17.1.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35" - integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A== +cacache@^18.0.0, cacache@^18.0.3: + version "18.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.4.tgz#4601d7578dadb59c66044e157d02a3314682d6a5" + integrity sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ== dependencies: "@npmcli/fs" "^3.1.0" fs-minipass "^3.0.0" glob "^10.2.2" - lru-cache "^7.7.1" + lru-cache "^10.0.1" minipass "^7.0.3" - minipass-collect "^1.0.2" + minipass-collect "^2.0.1" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" p-map "^4.0.0" @@ -6460,6 +6696,24 @@ cacheable-lookup@^6.0.4: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== +cacheable-lookup@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" + integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== + +cacheable-request@^10.2.8: + version "10.2.14" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.14.tgz#eb915b665fda41b79652782df3f553449c406b9d" + integrity sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ== + dependencies: + "@types/http-cache-semantics" "^4.0.2" + get-stream "^6.0.1" + http-cache-semantics "^4.1.1" + keyv "^4.5.3" + mimic-response "^4.0.0" + normalize-url "^8.0.0" + responselike "^3.0.0" + cacheable-request@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" @@ -6550,7 +6804,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: +camelcase@^6.0.0, camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -6565,6 +6819,16 @@ caniuse-lite@^1.0.30001517: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz#44b87a406c901269adcdb834713e23582dd71856" integrity sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg== +caniuse-lite@^1.0.30001580: + version "1.0.30001585" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz#0b4e848d84919c783b2a41c13f7de8ce96744401" + integrity sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q== + +caniuse-lite@^1.0.30001646: + version "1.0.30001653" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001653.tgz#b8af452f8f33b1c77f122780a4aecebea0caca56" + integrity sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.4.tgz#9d130292353c9249f6b00fa5852bee38a717e669" @@ -6582,31 +6846,16 @@ cardinal@^2.1.1: ansicolors "~0.3.2" redeyed "~2.1.0" -case@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" - integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== - caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -catering@^2.0.0, catering@^2.1.0, catering@^2.1.1: +catering@^2.0.0, catering@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== -caw@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" - integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== - dependencies: - get-proxy "^2.0.0" - isurl "^1.0.0-alpha5" - tunnel-agent "^0.6.0" - url-to-options "^1.0.1" - cbor@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" @@ -6634,6 +6883,13 @@ chai-as-promised@^7.1.1: dependencies: check-error "^1.0.2" +chai-as-promised@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-8.0.0.tgz#7eda823f2a6fe9fd3a76bc76878886e955232e6f" + integrity sha512-sMsGXTrS3FunP/wbqh/KxM8Kj/aLPXQGkNtvE5wPfSToq8wkkvBpTZo1LIiEVmC4BwkKpag+l5h/20lBMk6nUg== + dependencies: + check-error "^2.0.0" + chai-bn@^0.2.1: version "0.2.2" resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" @@ -6652,6 +6908,13 @@ chai@^4.2.0: pathval "^1.1.1" type-detect "^4.0.5" +chalk-template@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/chalk-template/-/chalk-template-1.1.0.tgz#ffc55db6dd745e9394b85327c8ac8466edb7a7b1" + integrity sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg== + dependencies: + chalk "^5.2.0" + chalk@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -6668,13 +6931,10 @@ chalk@4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@4.1.2, chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" +chalk@5.3.0, chalk@^5.2.0, chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== chalk@^1.1.3: version "1.1.3" @@ -6696,6 +6956,14 @@ chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + change-case-all@1.0.14: version "1.0.14" resolved "https://registry.yarnpkg.com/change-case-all/-/change-case-all-1.0.14.tgz#bac04da08ad143278d0ac3dda7eccd39280bfba1" @@ -6780,6 +7048,11 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== +check-error@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-2.1.1.tgz#87eb876ae71ee388fa0471fe423f494be1d96ccc" + integrity sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw== + checkpoint-store@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" @@ -6827,6 +7100,21 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: optionalDependencies: fsevents "~2.3.2" +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^1.0.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -6837,6 +7125,11 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== +chownr@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-3.0.0.tgz#9855e64ecd240a9cc4267ce8a4aa5d24a1da15e4" + integrity sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g== + chrome-trace-event@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" @@ -6847,11 +7140,16 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.2.0, ci-info@^3.6.1: +ci-info@^3.2.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== +ci-info@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" + integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg== + cids@^0.7.1: version "0.7.5" resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" @@ -6881,17 +7179,6 @@ class-is@^1.1.0: resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== -classic-level@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.2.0.tgz#2d52bdec8e7a27f534e67fdeb890abef3e643c27" - integrity sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.0" - module-error "^1.0.1" - napi-macros "~2.0.0" - node-gyp-build "^4.3.0" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -6904,6 +7191,11 @@ clean-stack@^3.0.1: dependencies: escape-string-regexp "4.0.0" +cli-boxes@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" + integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== + cli-cursor@3.1.0, cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -6911,6 +7203,13 @@ cli-cursor@3.1.0, cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-logger@^0.5.40: version "0.5.40" resolved "https://registry.yarnpkg.com/cli-logger/-/cli-logger-0.5.40.tgz#097f0e11b072c7c698a26c47f588a29c20b48b0b" @@ -6946,6 +7245,11 @@ cli-spinners@^2.5.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" integrity sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g== +cli-spinners@^2.9.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + cli-table3@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee" @@ -7048,10 +7352,10 @@ clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== -cmd-shim@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.1.tgz#a65878080548e1dca760b3aea1e21ed05194da9d" - integrity sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q== +cmd-shim@6.0.3, cmd-shim@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.3.tgz#c491e9656594ba17ac83c4bd931590a9d6e26033" + integrity sha512-FMabTRlc5t5zjdenF6mS0MBeFZm0XqHqeOkcskKFb/LYCcRQ5fVgLOHVc4Lq9CqABd9zhjwPjMBCJvMCziSVtA== code-error-fragment@0.0.230: version "0.0.230" @@ -7092,7 +7396,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.3: +color-support@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -7157,27 +7461,27 @@ command-line-usage@^6.1.0: table-layout "^1.0.2" typical "^5.2.0" -commander@11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" - integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== commander@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.0.tgz#71797971162cd3cf65f0b9d24eb28f8d303acdf1" integrity sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA== -commander@^2.20.0, commander@^2.20.3, commander@^2.8.1: +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^7.0.0, commander@^7.2.0: +commander@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== @@ -7187,6 +7491,11 @@ commander@^8.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +common-ancestor-path@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" + integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== + common-tags@1.8.2, common-tags@^1.4.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -7286,7 +7595,7 @@ constants-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== -content-disposition@0.5.4, content-disposition@^0.5.2: +content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== @@ -7307,10 +7616,10 @@ content-type@~1.0.4, content-type@~1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== -conventional-changelog-angular@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz#a9a9494c28b7165889144fd5b91573c4aa9ca541" - integrity sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg== +conventional-changelog-angular@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz#5eec8edbff15aa9b1680a8dcfbd53e2d7eb2ba7a" + integrity sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ== dependencies: compare-func "^2.0.0" @@ -7385,6 +7694,11 @@ convert-source-map@^1.1.0, convert-source-map@^1.7.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + convert-source-map@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" @@ -7395,10 +7709,10 @@ cookie-signature@1.0.6: resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== +cookie@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" + integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== cookie@^0.4.1: version "0.4.2" @@ -7459,15 +7773,15 @@ cosmiconfig@7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@8.2.0, cosmiconfig@^8.1.0, cosmiconfig@^8.1.3, cosmiconfig@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" - integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== +cosmiconfig@9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-9.0.0.tgz#34c3fc58287b915f3ae905ab6dc3de258b55ad9d" + integrity sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== dependencies: - import-fresh "^3.2.1" + env-paths "^2.2.1" + import-fresh "^3.3.0" js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" + parse-json "^5.2.0" cosmiconfig@^8.0.0: version "8.1.3" @@ -7479,6 +7793,16 @@ cosmiconfig@^8.0.0: parse-json "^5.0.0" path-type "^4.0.0" +cosmiconfig@^8.1.0, cosmiconfig@^8.1.3, cosmiconfig@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" + integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== + dependencies: + import-fresh "^3.2.1" + js-yaml "^4.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + crc-32@^1.2.0: version "1.2.2" resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" @@ -7520,22 +7844,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-fetch@^2.1.0: - version "2.2.6" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.6.tgz#2ef0bb39a24ac034787965c457368a28730e220a" - integrity sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA== - dependencies: - node-fetch "^2.6.7" - whatwg-fetch "^2.0.4" - -cross-fetch@^3.1.4, cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -cross-fetch@^4.0.0: +cross-fetch@^2.1.0, cross-fetch@^3.1.4, cross-fetch@^3.1.5, cross-fetch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== @@ -7551,15 +7860,6 @@ cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A== - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -7601,6 +7901,13 @@ crypto-browserify@^3.0.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-random-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" + integrity sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA== + dependencies: + type-fest "^1.0.1" + css-select@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" @@ -7617,6 +7924,11 @@ css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + cssfilter@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" @@ -7689,7 +8001,7 @@ debounce-fn@^4.0.0: dependencies: mimic-fn "^3.0.0" -debounce@^1.2.0: +debounce@^1.2.0, debounce@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5" integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== @@ -7708,7 +8020,7 @@ debug@3.1.0: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -7722,6 +8034,13 @@ debug@^3.1.0, debug@^3.2.6, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + decamelize-keys@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" @@ -7745,7 +8064,7 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== -decompress-response@^3.2.0, decompress-response@^3.3.0: +decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== @@ -7759,63 +8078,10 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" - integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== - dependencies: - file-type "^5.2.0" - is-stream "^1.1.0" - tar-stream "^1.5.2" - -decompress-tarbz2@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" - integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== - dependencies: - decompress-tar "^4.1.0" - file-type "^6.1.0" - is-stream "^1.1.0" - seek-bzip "^1.0.5" - unbzip2-stream "^1.0.9" - -decompress-targz@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" - integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== - dependencies: - decompress-tar "^4.1.1" - file-type "^5.2.0" - is-stream "^1.1.0" - -decompress-unzip@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw== - dependencies: - file-type "^3.8.0" - get-stream "^2.2.0" - pify "^2.3.0" - yauzl "^2.4.2" - -decompress@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.1.tgz#007f55cc6a62c055afa37c07eb6a4ee1b773f118" - integrity sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ== - dependencies: - decompress-tar "^4.0.0" - decompress-tarbz2 "^4.0.0" - decompress-targz "^4.0.0" - decompress-unzip "^4.0.1" - graceful-fs "^4.1.10" - make-dir "^1.0.0" - pify "^2.3.0" - strip-dirs "^2.0.0" - -dedent@0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== +dedent@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== deep-eql@^4.0.1, deep-eql@^4.1.2: version "4.1.3" @@ -7824,7 +8090,7 @@ deep-eql@^4.0.1, deep-eql@^4.1.2: dependencies: type-detect "^4.0.0" -deep-extend@~0.6.0: +deep-extend@^0.6.0, deep-extend@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== @@ -7905,11 +8171,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -7965,14 +8226,6 @@ detect-installed@^2.0.4: dependencies: get-installed-path "^2.0.3" -detect-port@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" - integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== - dependencies: - address "^1.0.1" - debug "4" - detective@^5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.1.tgz#6af01eeda11015acb0e73f933242b70f24f91034" @@ -8002,6 +8255,11 @@ diff@^5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -8148,38 +8406,28 @@ dot-prop@^6.0.1: dependencies: is-obj "^2.0.0" +dotenv-expand@~11.0.6: + version "11.0.6" + resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-11.0.6.tgz#f2c840fd924d7c77a94eff98f153331d876882d3" + integrity sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g== + dependencies: + dotenv "^16.4.4" + dotenv@^16.0.0: version "16.0.3" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07" integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== -dotenv@^16.3.1, dotenv@~16.3.1: - version "16.3.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" - integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== +dotenv@^16.4.4, dotenv@^16.4.5, dotenv@~16.4.5: + version "16.4.5" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" + integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== double-ended-queue@2.1.0-0: version "2.1.0-0" resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c" integrity sha512-+BNfZ+deCo8hMNpDqDnvT+c0XpJ5cUa6mqYq89bho2Ifze4URTqRkcwR399hWoTrTkbZ/XJYDgP6rc7pRgffEQ== -download@^6.2.2: - version "6.2.5" - resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" - integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== - dependencies: - caw "^2.0.0" - content-disposition "^0.5.2" - decompress "^4.0.0" - ext-name "^5.0.0" - file-type "5.2.0" - filenamify "^2.0.0" - get-stream "^3.0.0" - got "^7.0.0" - make-dir "^1.0.0" - p-event "^1.0.0" - pify "^3.0.0" - dset@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.2.tgz#89c436ca6450398396dc6538ea00abc0c54cd45a" @@ -8192,11 +8440,6 @@ duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: dependencies: readable-stream "^2.0.2" -duplexer3@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" - integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== - duplexer@^0.1.1, duplexer@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -8220,12 +8463,17 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -ejs@3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" - integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== +effect@3.6.5: + version "3.6.5" + resolved "https://registry.yarnpkg.com/effect/-/effect-3.6.5.tgz#be177847e69273ea9ed95bebe03bd672c5af474b" + integrity sha512-NhopZTAKljaAlR0CEroOAJJngdqg7bzlnWcDrCwh4d2WNVohVbBtUS4SGqLt8tUy7IFsTWATYiUtmhDG+YELjA== + +ejs@3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" + integrity sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ== dependencies: - jake "^10.6.1" + jake "^10.8.5" ejs@^3.1.7, ejs@^3.1.8: version "3.1.9" @@ -8251,6 +8499,16 @@ electron-to-chromium@^1.4.477: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.498.tgz#cef35341123f62a35ba7084e439c911d25e0d81b" integrity sha512-4LODxAzKGVy7CJyhhN5mebwe7U2L29P+0G+HUriHnabm0d7LSff8Yn7t+Wq+2/9ze2Fu1dhX7mww090xfv7qXQ== +electron-to-chromium@^1.4.648: + version "1.4.660" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.660.tgz#80be71d08c1224980e645904ab9155f3fa54a1ea" + integrity sha512-1BqvQG0BBQrAA7FVL2EMrb5A1sVyXF3auwJneXjGWa1TpN+g0C4KbUsYWePz6OZ0mXZfXGy+RmQDELJWwE8v/Q== + +electron-to-chromium@^1.5.4: + version "1.5.13" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" + integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -8274,6 +8532,11 @@ emittery@^0.4.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.4.1.tgz#abe9d3297389ba424ac87e53d1c701962ce7433d" integrity sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ== +emoji-regex@^10.3.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.4.0.tgz#03553afea80b3975749cfcb36f776ca268e413d4" + integrity sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -8325,10 +8588,10 @@ end-stream@~0.1.0: dependencies: write-stream "~0.4.3" -enhanced-resolve@^5.15.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" - integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== +enhanced-resolve@^5.17.1: + version "5.17.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -8358,7 +8621,12 @@ env-paths@^2.2.0, env-paths@^2.2.1: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@7.8.1, envinfo@^7.7.3: +envinfo@7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.13.0.tgz#81fbb81e5da35d74e814941aeab7c325a606fb31" + integrity sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q== + +envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== @@ -8502,13 +8770,14 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== +es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@^0.10.62, es5-ext@~0.10.14: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" + esniff "^2.0.1" next-tick "^1.1.0" es6-error@^4.0.1: @@ -8550,6 +8819,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -8629,13 +8903,13 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-prettier@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz#584c94d4bf31329b2d4cbeb10fd600d17d6de742" - integrity sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg== +eslint-plugin-prettier@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" + integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.6" + synckit "^0.9.1" eslint-scope@5.1.1: version "5.1.1" @@ -8645,7 +8919,7 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.0.0, eslint-scope@^7.1.1: +eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== @@ -8661,7 +8935,7 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3.0: +eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== @@ -8676,16 +8950,16 @@ eslint-visitor-keys@^3.4.3: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.56.0: - version "8.56.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" - integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== +eslint@^8.57.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.56.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -8766,16 +9040,17 @@ eslint@^8.7.0: strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.0.0, espree@^9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113" - integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" -espree@^9.6.0, espree@^9.6.1: +espree@^9.3.1, espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== @@ -8784,6 +9059,15 @@ espree@^9.6.0, espree@^9.6.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" +espree@^9.5.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113" + integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + esprima@2.7.x, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -9164,7 +9448,7 @@ ethers@^4.0.0-beta.1, ethers@^4.0.32: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.1, ethers@^5.7.2: +ethers@^5.0.13, ethers@^5.7.0, ethers@^5.7.2, ethers@~5.7.0: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -9225,6 +9509,14 @@ ethjs-util@0.1.6, ethjs-util@^0.1.3, ethjs-util@^0.1.6: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -9268,7 +9560,7 @@ execa@5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@5.1.1, execa@^5.0.0: +execa@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== @@ -9283,19 +9575,6 @@ execa@5.1.1, execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw== - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" @@ -9309,16 +9588,16 @@ exponential-backoff@^3.1.1: integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== express@^4.14.0, express@^4.17.1: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + version "4.19.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" + integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.20.1" + body-parser "1.20.2" content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.5.0" + cookie "0.6.0" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" @@ -9345,21 +9624,6 @@ express@^4.14.0, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" -ext-list@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" - integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== - dependencies: - mime-db "^1.28.0" - -ext-name@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" - integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== - dependencies: - ext-list "^2.0.0" - sort-keys-length "^1.0.0" - ext@^1.1.2: version "1.7.0" resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" @@ -9386,11 +9650,6 @@ extract-files@^11.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-11.0.0.tgz#b72d428712f787eef1f5193aff8ab5351ca8469a" integrity sha512-FuoE1qtbJ4bBVvv94CC7s0oTnKUGvQs+Rjf1L2SJFfS+HTVVjhPFtehPdQ0JiGPqVNfSSZvL5yzHHQq2Z4WNhQ== -extract-files@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" - integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== - extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -9420,12 +9679,19 @@ fast-check@3.1.1: dependencies: pure-rand "^5.0.1" -fast-check@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.12.0.tgz#440949277387a053f7f82cd532fa3fcf67346ba1" - integrity sha512-SqahE9mlL3+lhjJ39joMLwcj6F+24hfZdf/tchlNO8sHcTdrUUdA5P/ZbSFZM9Xpzs36XaneGwE0FWepm/zyOA== +fast-check@3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.21.0.tgz#f9957cb4bc81b8529ae560ff5f772d9c147fc21c" + integrity sha512-QpmbiqRFRZ+SIlBJh6xi5d/PgXciUc/xWKc4Vi2RWEHHIRx6oM3f0fWNna++zP9VB5HUBTObUK9gTKQP3vVcrQ== + dependencies: + pure-rand "^6.1.0" + +fast-check@^3.21.0: + version "3.22.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.22.0.tgz#1a8153e9d6fbdcc60b818f447cbb9cac1fdd8fb6" + integrity sha512-8HKz3qXqnHYp/VCNn2qfjHdAdcI8zcSqOyX64GOMukp7SL2bfzfeDKjSd+UyECtejccaZv3LcvZTm9YDD22iCQ== dependencies: - pure-rand "^6.0.0" + pure-rand "^6.1.0" fast-decode-uri-component@^1.0.1: version "1.0.1" @@ -9447,17 +9713,6 @@ fast-fifo@^1.0.0: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.2.0.tgz#2ee038da2468e8623066dee96958b0c1763aa55a" integrity sha512-NcvQXt7Cky1cNau15FWy64IjuO8X0JijhTBBrJj1YlxlDfRkJXNaK9RFUjwpfDPzMdv7wB38jr53l9tkNLxnWg== -fast-glob@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-glob@^3.0.3: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" @@ -9480,6 +9735,17 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -9509,6 +9775,11 @@ fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.0.7: resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== +fast-uri@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" + integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + fast-url-parser@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" @@ -9553,13 +9824,6 @@ fbjs@^3.0.0: setimmediate "^1.0.5" ua-parser-js "^0.7.30" -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== - dependencies: - pend "~1.2.0" - fetch-cookie@0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/fetch-cookie/-/fetch-cookie-0.11.0.tgz#e046d2abadd0ded5804ce7e2cae06d4331c15407" @@ -9581,21 +9845,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -file-type@5.2.0, file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ== - -file-type@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" - integrity sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== - -file-type@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" - integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== - filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -9603,24 +9852,10 @@ filelist@^1.0.4: dependencies: minimatch "^5.0.1" -filename-reserved-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" - integrity sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ== - -filenamify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" - integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== - dependencies: - filename-reserved-regex "^2.0.0" - strip-outer "^1.0.0" - trim-repeated "^1.0.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -9716,10 +9951,10 @@ fmix@^0.1.0: dependencies: imul "^1.0.0" -follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.15.0: - version "1.15.4" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" - integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== +follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.15.0, follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== for-each@^0.3.3: version "0.3.3" @@ -9759,6 +9994,11 @@ form-data-encoder@1.7.1: resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== +form-data-encoder@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" + integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== + form-data@^2.2.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -9768,15 +10008,6 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -9820,20 +10051,18 @@ fromentries@^1.2.0: resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== +front-matter@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-4.0.2.tgz#b14e54dc745cfd7293484f3210d15ea4edd7f4d5" + integrity sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg== + dependencies: + js-yaml "^3.13.1" + fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@11.1.1, fs-extra@^11.1.0, fs-extra@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@9.1.0, fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -9864,6 +10093,24 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" + integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -9975,7 +10222,7 @@ functions-have-names@^1.2.2, functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -ganache-time-traveler@1.0.16: +ganache-time-traveler@^1.0.16: version "1.0.16" resolved "https://registry.yarnpkg.com/ganache-time-traveler/-/ganache-time-traveler-1.0.16.tgz#9ddeafd72c909ecd3501e4ec628a3af707334b3a" integrity sha512-oUaQge9tiT/zzcGqehqJcoH10claKi9QFhq7zI1Wa3KtdPobjgLVMYvqXCJuHCAZoS7sHvLB/N/rSnhmivxaKw== @@ -10001,20 +10248,6 @@ ganache@7.9.1: bufferutil "4.0.5" utf-8-validate "5.0.7" -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^3.0.7" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -10035,6 +10268,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-func-name@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" @@ -10123,31 +10361,11 @@ get-port@^3.1.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== -get-proxy@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" - integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== - dependencies: - npm-conf "^1.1.0" - get-stream@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== -get-stream@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA== - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== - get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -10216,10 +10434,10 @@ git-up@^7.0.0: is-ssh "^1.4.0" parse-url "^8.1.0" -git-url-parse@13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" - integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== +git-url-parse@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-14.0.0.tgz#18ce834726d5fbca0c25a4555101aa277017418f" + integrity sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ== dependencies: git-up "^7.0.0" @@ -10230,37 +10448,25 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -glob-parent@5.1.2, glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: +glob-parent@6.0.2, glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -10306,6 +10512,18 @@ glob@^10.2.2: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@^10.3.10, glob@^10.3.7: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -10329,7 +10547,7 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, gl once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.1, glob@^8.0.3: +glob@^8.0.3, glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -10415,6 +10633,18 @@ globby@11.1.0, globby@^11.0.3, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +globby@14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.2.tgz#06554a54ccfe9264e5a9ff8eded46aa1e306482f" + integrity sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw== + dependencies: + "@sindresorhus/merge-streams" "^2.1.0" + fast-glob "^3.3.2" + ignore "^5.2.4" + path-type "^5.0.0" + slash "^5.1.0" + unicorn-magic "^0.1.0" + globby@^10.0.1: version "10.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" @@ -10429,10 +10659,10 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -gluegun@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/gluegun/-/gluegun-5.1.2.tgz#ffa0beda0fb6bbc089a867157b08602beae2c8cf" - integrity sha512-Cwx/8S8Z4YQg07a6AFsaGnnnmd8mN17414NcPS3OoDtZRwxgsvwRNJNg69niD6fDa8oNwslCG0xH7rEpRNNE/g== +gluegun@5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/gluegun/-/gluegun-5.1.6.tgz#74ec13193913dc610f5c1a4039972c70c96a7bad" + integrity sha512-9zbi4EQWIVvSOftJWquWzr9gLX2kaDgPkNR5dYWbM53eVvCI3iKuxLlnKoHC0v4uPoq+Kr/+F569tjoFbA4DSA== dependencies: apisauce "^2.1.5" app-module-path "^2.2.0" @@ -10440,7 +10670,7 @@ gluegun@5.1.2: colors "1.4.0" cosmiconfig "7.0.1" cross-spawn "7.0.3" - ejs "3.1.6" + ejs "3.1.8" enquirer "2.3.6" execa "5.1.1" fs-jetpack "4.3.1" @@ -10508,27 +10738,29 @@ got@^11.8.5: p-cancelable "^2.0.0" responselike "^2.0.0" -got@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== +got@^12.1.0: + version "12.6.1" + resolved "https://registry.yarnpkg.com/got/-/got-12.6.1.tgz#8869560d1383353204b5a9435f782df9c091f549" + integrity sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ== dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" + "@sindresorhus/is" "^5.2.0" + "@szmarczak/http-timer" "^5.0.1" + cacheable-lookup "^7.0.0" + cacheable-request "^10.2.8" + decompress-response "^6.0.0" + form-data-encoder "^2.1.2" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^3.0.0" + +graceful-fs@4.2.10: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@4.2.11, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -10565,17 +10797,7 @@ graphql-import-node@^0.0.5: resolved "https://registry.yarnpkg.com/graphql-import-node/-/graphql-import-node-0.0.5.tgz#caf76a6cece10858b14f27cce935655398fc1bf0" integrity sha512-OXbou9fqh9/Lm7vwXT0XoRN9J5+WCYKnbiTalgFDvkQERITRmcfncZs6aVABedd5B85yQU5EULS4a5pnbpuI0Q== -graphql-request@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-5.2.0.tgz#a05fb54a517d91bb2d7aefa17ade4523dc5ebdca" - integrity sha512-pLhKIvnMyBERL0dtFI3medKqWOz/RhHdcgbZ+hMMIb32mEPa5MJSzS4AuXxfI4sRAu6JVVk5tvXuGfCWl9JYWQ== - dependencies: - "@graphql-typed-document-node/core" "^3.1.1" - cross-fetch "^3.1.5" - extract-files "^9.0.0" - form-data "^3.0.0" - -graphql-request@^6.0.0, graphql-request@^6.1.0: +graphql-request@6.1.0, graphql-request@^6.0.0, graphql-request@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-6.1.0.tgz#f4eb2107967af3c7a5907eb3131c671eac89be4f" integrity sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw== @@ -10612,11 +10834,16 @@ graphql@^15.3.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38" integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw== -graphql@^16.6.0, graphql@^16.8.1: +graphql@^16.6.0: version "16.8.1" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== +graphql@^16.9.0: + version "16.9.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" + integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -10666,10 +10893,10 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -hardhat-deploy@^0.11.37: - version "0.11.37" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.37.tgz#6a771b859c82ae25292321a6d510d7c0eda09d2b" - integrity sha512-pohPSEEo/X9Yfv0Fc0kXBQW6JO0LNOILBGCP69Ci1COJvLht1hLjAtXt/hccyvD9qY/uwJAM75fmsf41Y9N7lg== +hardhat-deploy@^0.12.4: + version "0.12.4" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.12.4.tgz#5ebef37f1004f52a74987213b0465ad7c9433fb2" + integrity sha512-bYO8DIyeGxZWlhnMoCBon9HNZb6ji0jQn7ngP1t5UmGhC8rQYhji7B73qETMOFhzt5ECZPr+U52duj3nubsqdQ== dependencies: "@ethersproject/abi" "^5.7.0" "@ethersproject/abstract-signer" "^5.7.0" @@ -10688,31 +10915,25 @@ hardhat-deploy@^0.11.37: chokidar "^3.5.2" debug "^4.3.2" enquirer "^2.3.6" - ethers "^5.5.3" + ethers "^5.7.0" form-data "^4.0.0" fs-extra "^10.0.0" match-all "^1.2.6" murmur-128 "^0.2.1" qs "^6.9.4" - zksync-web3 "^0.14.3" + zksync-ethers "^5.0.0" -hardhat@^2.19.4: - version "2.19.4" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.4.tgz#5112c30295d8be2e18e55d847373c50483ed1902" - integrity sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ== +hardhat@2.22.9, hardhat@^2.22.9: + version "2.22.9" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.9.tgz#d8f2720561dc60f5cc0ee80c82f9b1907fd61c88" + integrity sha512-sWiuI/yRdFUPfndIvL+2H18Vs2Gav0XacCFYY5msT5dHOWkhLxESJySIk9j83mXL31aXL8+UMA9OgViFLexklg== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.2" - "@nomicfoundation/ethereumjs-blockchain" "7.0.2" - "@nomicfoundation/ethereumjs-common" "4.0.2" - "@nomicfoundation/ethereumjs-evm" "2.0.2" - "@nomicfoundation/ethereumjs-rlp" "5.0.2" - "@nomicfoundation/ethereumjs-statemanager" "2.0.2" - "@nomicfoundation/ethereumjs-trie" "6.0.2" - "@nomicfoundation/ethereumjs-tx" "5.0.2" - "@nomicfoundation/ethereumjs-util" "9.0.2" - "@nomicfoundation/ethereumjs-vm" "7.0.2" + "@nomicfoundation/edr" "^0.5.2" + "@nomicfoundation/ethereumjs-common" "4.0.4" + "@nomicfoundation/ethereumjs-tx" "5.0.4" + "@nomicfoundation/ethereumjs-util" "9.0.4" "@nomicfoundation/solidity-analyzer" "^0.1.0" "@sentry/node" "^5.18.1" "@types/bn.js" "^5.1.0" @@ -10720,6 +10941,7 @@ hardhat@^2.19.4: adm-zip "^0.4.16" aggregate-error "^3.0.0" ansi-escapes "^4.3.0" + boxen "^5.1.2" chalk "^2.4.2" chokidar "^3.4.0" ci-info "^2.0.0" @@ -10742,7 +10964,7 @@ hardhat@^2.19.4: raw-body "^2.4.1" resolve "1.17.0" semver "^6.3.0" - solc "0.7.3" + solc "0.8.26" source-map-support "^0.5.13" stacktrace-parser "^0.1.10" tsort "0.0.1" @@ -10789,23 +11011,11 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -10813,7 +11023,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@2.0.1, has-unicode@^2.0.1: +has-unicode@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== @@ -10865,7 +11075,7 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" -he@1.2.0: +he@1.2.0, he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -10929,13 +11139,6 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^3.0.6: - version "3.0.8" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" - integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== - dependencies: - lru-cache "^6.0.0" - hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" @@ -10943,14 +11146,14 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" -hosted-git-info@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58" - integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w== +hosted-git-info@^7.0.0, hosted-git-info@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.2.tgz#9b751acac097757667f30114607ef7b661ff4f17" + integrity sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w== dependencies: - lru-cache "^7.5.1" + lru-cache "^10.0.1" -html-escaper@^2.0.0: +html-escaper@^2.0.0, html-escaper@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== @@ -11001,15 +11204,6 @@ http-https@^1.0.0: resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - http-proxy-agent@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673" @@ -11071,22 +11265,23 @@ https-proxy-agent@^7.0.0: agent-base "^7.0.2" debug "4" +https-proxy-agent@^7.0.1: + version "7.0.5" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - -husky@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" - integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +husky@^9.1.5: + version "9.1.5" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.5.tgz#2b6edede53ee1adbbd3a3da490628a23f5243b83" + integrity sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag== hyperlinker@^1.0.0: version "1.0.0" @@ -11124,17 +11319,10 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== -ignore-walk@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-5.0.1.tgz#5f199e23e1288f518d90358d461387788a154776" - integrity sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw== - dependencies: - minimatch "^5.0.1" - -ignore-walk@^6.0.0: - version "6.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.3.tgz#0fcdb6decaccda35e308a7b0948645dd9523b7bb" - integrity sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA== +ignore-walk@^6.0.4: + version "6.0.5" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.5.tgz#ef8d61eab7da169078723d1f82833b36e200b0dd" + integrity sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A== dependencies: minimatch "^9.0.0" @@ -11143,6 +11331,11 @@ ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +ignore@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + immediate@3.3.0, immediate@^3.2.3: version "3.3.0" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" @@ -11168,7 +11361,7 @@ immutable@~3.7.6: resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" integrity sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -11222,20 +11415,25 @@ inherits@2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== -ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@^1.3.8: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@^1.3.8, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -init-package-json@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-5.0.0.tgz#030cf0ea9c84cfc1b0dc2e898b45d171393e4b40" - integrity sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw== +ini@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.3.tgz#4c359675a6071a46985eb39b14e4a2c0ec98a795" + integrity sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg== + +init-package-json@6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-6.0.3.tgz#2552fba75b6eed2495dc97f44183e2e5a5bcf8b0" + integrity sha512-Zfeb5ol+H+eqJWHTaGca9BovufyGeIfr4zaaBorPmJBMrJ+KBnN+kQx2ZtXdsotUTgldHmHQV44xvUWOUA7E2w== dependencies: - npm-package-arg "^10.0.0" + "@npmcli/package-json" "^5.0.0" + npm-package-arg "^11.0.0" promzard "^1.0.0" - read "^2.0.0" - read-package-json "^6.0.0" + read "^3.0.1" semver "^7.3.5" validate-npm-package-license "^3.0.4" validate-npm-package-name "^5.0.0" @@ -11333,10 +11531,10 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== invariant@^2.2.4: version "2.2.4" @@ -11357,16 +11555,19 @@ io-ts@1.10.4: dependencies: fp-ts "^1.0.0" +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + ip-regex@^4.0.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== -ip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== - ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -11536,7 +11737,7 @@ is-ci@3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.9.0: version "2.13.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== @@ -11630,6 +11831,11 @@ is-interactive@^1.0.0: resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== +is-interactive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" + integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== + is-invalid-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-invalid-path/-/is-invalid-path-0.1.0.tgz#307a855b3cf1a938b44ea70d2c61106053714f34" @@ -11663,11 +11869,6 @@ is-lower-case@^2.0.2: dependencies: tslib "^2.0.3" -is-natural-number@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ== - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -11690,11 +11891,6 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" - integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== - is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -11737,11 +11933,6 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - is-retry-allowed@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" @@ -11766,16 +11957,16 @@ is-stream@2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-stream@^1.0.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== - is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -11832,6 +12023,16 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-unicode-supported@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + +is-unicode-supported@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz#fdf32df9ae98ff6ab2cedc155a5a6e895701c451" + integrity sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q== + is-upper-case@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" @@ -11897,6 +12098,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + iso-url@^1.1.5: version "1.2.1" resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" @@ -11934,15 +12140,16 @@ istanbul-lib-hook@^3.0.0: dependencies: append-transform "^2.0.0" -istanbul-lib-instrument@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== +istanbul-lib-instrument@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" istanbul-lib-processinfo@^2.0.2: version "2.0.3" @@ -11982,14 +12189,6 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - it-all@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" @@ -12056,7 +12255,16 @@ jackspeak@^2.0.3: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" -jake@^10.6.1, jake@^10.8.5: +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + +jake@^10.8.5: version "10.8.7" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" integrity sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w== @@ -12094,6 +12302,16 @@ jayson@4.0.0: jest-get-type "^29.6.3" pretty-format "^29.6.3" +jest-diff@^29.4.1: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + jest-get-type@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" @@ -12113,21 +12331,10 @@ jiti@^1.17.1, jiti@^1.18.2: resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.19.3.tgz#ef554f76465b3c2b222dc077834a71f0d4a37569" integrity sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w== -joi@^17.4.0: - version "17.9.1" - resolved "https://registry.yarnpkg.com/joi/-/joi-17.9.1.tgz#74899b9fa3646904afa984a11df648eca66c9018" - integrity sha512-FariIi9j6QODKATGBrEX7HZcja8Bsh3rfdGYy/Sb65sGlZWK/QWesU1ghk7aJWDj95knjXlQfSmzFSPPkLVsfw== - dependencies: - "@hapi/hoek" "^9.0.0" - "@hapi/topo" "^5.0.0" - "@sideway/address" "^4.1.3" - "@sideway/formula" "^3.0.1" - "@sideway/pinpoint" "^2.0.0" - jose@^4.11.4: - version "4.13.1" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.13.1.tgz#449111bb5ab171db85c03f1bd2cb1647ca06db1c" - integrity sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ== + version "4.15.5" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.5.tgz#6475d0f467ecd3c630a1b5dadd2735a7288df706" + integrity sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg== js-sdsl@^4.1.4: version "4.4.0" @@ -12169,6 +12376,11 @@ js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -12199,6 +12411,11 @@ json-parse-even-better-errors@^3.0.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz#2cb2ee33069a78870a0c7e3da560026b89669cf7" integrity sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA== +json-parse-even-better-errors@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz#b43d35e89c0f3be6b5fbbe9dc6c82467b30c28da" + integrity sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ== + json-pointer@^0.6.1: version "0.6.2" resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.2.tgz#f97bd7550be5e9ea901f8c9264c9d436a22a93cd" @@ -12259,6 +12476,11 @@ json-stable-stringify@^1.0.1: dependencies: jsonify "^0.0.1" +json-stringify-nice@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" + integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -12287,16 +12509,21 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@3.2.0, jsonc-parser@^3.2.0: +jsonc-parser@3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== +jsonc-parser@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4" + integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -12350,6 +12577,16 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +just-diff-apply@^5.2.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/just-diff-apply/-/just-diff-apply-5.5.0.tgz#771c2ca9fa69f3d2b54e7c3f5c1dfcbcc47f9f0f" + integrity sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw== + +just-diff@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285" + integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA== + keccak@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" @@ -12383,6 +12620,13 @@ keyv@^4.0.0: dependencies: json-buffer "3.0.1" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -12408,6 +12652,13 @@ labeled-stream-splicer@^2.0.0: inherits "^2.0.1" stream-splicer "^2.0.0" +latest-version@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-7.0.0.tgz#843201591ea81a4d404932eeb61240fe04e9e5da" + integrity sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg== + dependencies: + package-json "^8.1.0" + lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" @@ -12415,86 +12666,92 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -lerna@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-7.3.0.tgz#efecafbdce15694e2f6841256e073a3a2061053e" - integrity sha512-Dt8TH+J+c9+3MhTYcm5OxnNzXb87WG7GPNj3kidjYJjJY7KxIMDNU37qBTYRWA1h3wAeNKBplXVQYUPkGcYgkQ== +lerna@^8.1.8: + version "8.1.8" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-8.1.8.tgz#9edc9ce4fb4b6c7e22c994e9ef91d4e0370595b2" + integrity sha512-Rmo5ShMx73xM2CUcRixjmpZIXB7ZFlWEul1YvJyx/rH4onAwDHtUGD7Rx4NZYL8QSRiQHroglM2Oyq+WqA4BYg== dependencies: - "@lerna/child-process" "7.3.0" - "@lerna/create" "7.3.0" - "@npmcli/run-script" "6.0.2" - "@nx/devkit" ">=16.5.1 < 17" + "@lerna/create" "8.1.8" + "@npmcli/arborist" "7.5.4" + "@npmcli/package-json" "5.2.0" + "@npmcli/run-script" "8.1.0" + "@nx/devkit" ">=17.1.2 < 20" "@octokit/plugin-enterprise-rest" "6.0.1" "@octokit/rest" "19.0.11" + aproba "2.0.0" byte-size "8.1.1" chalk "4.1.0" clone-deep "4.0.1" - cmd-shim "6.0.1" + cmd-shim "6.0.3" + color-support "1.1.3" columnify "1.6.0" - conventional-changelog-angular "6.0.0" + console-control-strings "^1.1.0" + conventional-changelog-angular "7.0.0" conventional-changelog-core "5.0.1" conventional-recommended-bump "7.0.1" cosmiconfig "^8.2.0" - dedent "0.7.0" - envinfo "7.8.1" + dedent "1.5.3" + envinfo "7.13.0" execa "5.0.0" - fs-extra "^11.1.1" + fs-extra "^11.2.0" get-port "5.1.1" get-stream "6.0.0" - git-url-parse "13.1.0" - glob-parent "5.1.2" + git-url-parse "14.0.0" + glob-parent "6.0.2" globby "11.1.0" graceful-fs "4.2.11" has-unicode "2.0.1" import-local "3.1.0" ini "^1.3.8" - init-package-json "5.0.0" + init-package-json "6.0.3" inquirer "^8.2.4" is-ci "3.0.1" is-stream "2.0.0" jest-diff ">=29.4.3 < 30" js-yaml "4.1.0" - libnpmaccess "7.0.2" - libnpmpublish "7.3.0" + libnpmaccess "8.0.6" + libnpmpublish "9.0.9" load-json-file "6.2.0" lodash "^4.17.21" make-dir "4.0.0" minimatch "3.0.5" multimatch "5.0.0" node-fetch "2.6.7" - npm-package-arg "8.1.1" - npm-packlist "5.1.1" - npm-registry-fetch "^14.0.5" - npmlog "^6.0.2" - nx ">=16.5.1 < 17" + npm-package-arg "11.0.2" + npm-packlist "8.0.2" + npm-registry-fetch "^17.1.0" + nx ">=17.1.2 < 20" p-map "4.0.0" p-map-series "2.1.0" p-pipe "3.1.0" p-queue "6.6.2" p-reduce "2.1.0" p-waterfall "2.1.1" - pacote "^15.2.0" + pacote "^18.0.6" pify "5.0.0" read-cmd-shim "4.0.0" - read-package-json "6.0.4" resolve-from "5.0.0" rimraf "^4.4.1" semver "^7.3.8" + set-blocking "^2.0.0" signal-exit "3.0.7" slash "3.0.0" - ssri "^9.0.1" + ssri "^10.0.6" + string-width "^4.2.3" + strip-ansi "^6.0.1" strong-log-transformer "2.1.0" - tar "6.1.11" + tar "6.2.1" temp-dir "1.0.0" typescript ">=3 < 6" upath "2.0.1" - uuid "^9.0.0" + uuid "^10.0.0" validate-npm-package-license "3.0.4" - validate-npm-package-name "5.0.0" + validate-npm-package-name "5.0.1" + wide-align "1.1.5" write-file-atomic "5.0.1" write-pkg "4.0.0" - yargs "16.2.0" - yargs-parser "20.2.4" + yargs "17.7.2" + yargs-parser "21.1.1" level-codec@9.0.2, level-codec@^9.0.0: version "9.0.2" @@ -12627,14 +12884,6 @@ level@6.0.1: level-packager "^5.1.0" leveldown "^5.4.0" -level@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" - integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== - dependencies: - browser-level "^1.0.1" - classic-level "^1.2.0" - leveldown@5.6.0, leveldown@^5.4.0: version "5.6.0" resolved "https://registry.yarnpkg.com/leveldown/-/leveldown-5.6.0.tgz#16ba937bb2991c6094e13ac5a6898ee66d3eee98" @@ -12698,27 +12947,27 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libnpmaccess@7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52" - integrity sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw== +libnpmaccess@8.0.6: + version "8.0.6" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-8.0.6.tgz#73be4c236258babc0a0bca6d3b6a93a6adf937cf" + integrity sha512-uM8DHDEfYG6G5gVivVl+yQd4pH3uRclHC59lzIbSvy7b5FEwR+mU49Zq1jEyRtRFv7+M99mUW9S0wL/4laT4lw== dependencies: - npm-package-arg "^10.1.0" - npm-registry-fetch "^14.0.3" + npm-package-arg "^11.0.2" + npm-registry-fetch "^17.0.1" -libnpmpublish@7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-7.3.0.tgz#2ceb2b36866d75a6cd7b4aa748808169f4d17e37" - integrity sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg== - dependencies: - ci-info "^3.6.1" - normalize-package-data "^5.0.0" - npm-package-arg "^10.1.0" - npm-registry-fetch "^14.0.3" - proc-log "^3.0.0" +libnpmpublish@9.0.9: + version "9.0.9" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-9.0.9.tgz#e737378c09f09738377d2a276734be35cffb85e2" + integrity sha512-26zzwoBNAvX9AWOPiqqF6FG4HrSCPsHFkQm7nT+xU1ggAujL/eae81RnCv4CJ2In9q9fh10B88sYSzKCUh/Ghg== + dependencies: + ci-info "^4.0.0" + normalize-package-data "^6.0.1" + npm-package-arg "^11.0.2" + npm-registry-fetch "^17.0.1" + proc-log "^4.2.0" semver "^7.3.7" - sigstore "^1.4.0" - ssri "^10.0.1" + sigstore "^2.2.0" + ssri "^10.0.6" lines-and-columns@^1.1.6: version "1.2.4" @@ -12730,6 +12979,13 @@ lines-and-columns@~2.0.3: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + listr2@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" @@ -12830,11 +13086,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.escape@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" - integrity sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw== - lodash.flatten@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" @@ -12845,16 +13096,16 @@ lodash.flattendeep@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== -lodash.invokemap@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.invokemap/-/lodash.invokemap-4.6.0.tgz#1748cda5d8b0ef8369c4eb3ec54c21feba1f2d62" - integrity sha512-CfkycNtMqgUlfjfdh2BhKO/ZXrP8ePOX5lEU/g0R3ItJcnuxWDwokMGKx1hWcfOikmyOVx6X9IwWnDGlgKl61w== - lodash.isempty@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" integrity sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg== +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.isfunction@^3.0.9: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" @@ -12915,11 +13166,6 @@ lodash.padstart@^4.6.1: resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" integrity sha512-sW73O6S8+Tg66eY56DBk85aQzzUJDtpoXFBgELMd5P/SotAguo+1kYO6RuYgXxA4HJH3LFTFPASX6ET6bjfriw== -lodash.pullall@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.pullall/-/lodash.pullall-4.2.0.tgz#9d98b8518b7c965b0fae4099bd9fb7df8bbf38ba" - integrity sha512-VhqxBKH0ZxPpLhiu68YD1KnHmbhQJQctcipvmFnqIBDYzcIHzf3Zpu0tpeOKtR4x76p9yohc506eGdOjTmyIBg== - lodash.repeat@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.repeat/-/lodash.repeat-4.1.0.tgz#fc7de8131d8c8ac07e4b49f74ffe829d1f2bec44" @@ -12960,11 +13206,6 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash.uniqby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" - integrity sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww== - lodash.uppercase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.uppercase/-/lodash.uppercase-4.3.0.tgz#c404abfd1469f93931f9bb24cf6cc7d57059bc73" @@ -12975,7 +13216,7 @@ lodash.upperfirst@^4.3.1: resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@~4.17.0: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.2.1, lodash@~4.17.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -12995,6 +13236,14 @@ log-symbols@^3.0.0: dependencies: chalk "^2.4.2" +log-symbols@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439" + integrity sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw== + dependencies: + chalk "^5.3.0" + is-unicode-supported "^1.3.0" + log-update@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" @@ -13068,11 +13317,6 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - lowercase-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" @@ -13088,13 +13332,10 @@ lowercase-keys@^3.0.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.13.1.tgz#267a81fbd0881327c46a81c5922606a2cfe336c4" integrity sha512-CHqbAq7NFlW3RSnoWXLJBxCWaZVBrfa9UEHId2M3AW8iEBurbqduNexEUCGc3SHc6iCYXNJCDi903LajSVAEPQ== -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" +lru-cache@^10.0.1, lru-cache@^10.2.0, lru-cache@^10.2.2: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== lru-cache@^5.1.1: version "5.1.1" @@ -13110,11 +13351,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: - version "7.18.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" - integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== - "lru-cache@^9.1.1 || ^10.0.0": version "10.0.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" @@ -13142,13 +13378,6 @@ make-dir@4.0.0: dependencies: semver "^7.5.3" -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -13169,25 +13398,22 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.0.3, make-fetch-happen@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" - integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w== +make-fetch-happen@^13.0.0, make-fetch-happen@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36" + integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== dependencies: - agentkeepalive "^4.2.1" - cacache "^17.0.0" + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" http-cache-semantics "^4.1.1" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^5.0.0" + minipass "^7.0.2" minipass-fetch "^3.0.0" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" negotiator "^0.6.3" + proc-log "^4.2.0" promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" ssri "^10.0.0" map-cache@^0.2.0: @@ -13205,10 +13431,17 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" match-all@^1.2.6: version "1.2.6" @@ -13222,11 +13455,6 @@ matchstick-as@^0.6.0: dependencies: wabt "1.0.24" -mcl-wasm@^0.7.1: - version "0.7.9" - resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" - integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -13236,6 +13464,11 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdurl@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -13253,15 +13486,6 @@ memdown@1.4.1, memdown@^1.0.0: ltgt "~2.2.0" safe-buffer "~5.1.1" -memory-level@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" - integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== - dependencies: - abstract-level "^1.0.0" - functional-red-black-tree "^1.0.1" - module-error "^1.0.1" - memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -13336,11 +13560,11 @@ micro-ftch@^0.3.1: integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" miller-rabin@^4.0.0: @@ -13351,7 +13575,7 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.52.0, mime-db@^1.28.0: +mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== @@ -13388,6 +13612,11 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +mimic-response@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" + integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -13431,13 +13660,20 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3: +minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" +minimatch@9.0.5, minimatch@^9.0.4, minimatch@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimatch@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.3.tgz#b4dcece1d674dee104bb0fb833ebb85a78cbbca6" @@ -13445,7 +13681,7 @@ minimatch@^4.2.3: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -13473,12 +13709,12 @@ minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== dependencies: - minipass "^3.0.0" + minipass "^7.0.3" minipass-fetch@^3.0.0: version "3.0.4" @@ -13498,14 +13734,6 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" -minipass-json-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" - integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - dependencies: - jsonparse "^1.3.1" - minipass "^3.0.0" - minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" @@ -13528,7 +13756,7 @@ minipass@^2.6.0, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minipass@^3.0.0, minipass@^3.1.1: +minipass@^3.0.0: version "3.3.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== @@ -13550,6 +13778,11 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== +minipass@^7.0.2, minipass@^7.0.4, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" @@ -13565,6 +13798,14 @@ minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" +minizlib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-3.0.1.tgz#46d5329d1eb3c83924eff1d3b858ca0a31581012" + integrity sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg== + dependencies: + minipass "^7.0.4" + rimraf "^5.0.5" + mkdirp-classic@^0.5.2: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" @@ -13594,6 +13835,11 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mkdirp@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" + integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== + mnemonist@^0.38.0: version "0.38.5" resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" @@ -13601,7 +13847,34 @@ mnemonist@^0.38.0: dependencies: obliterator "^2.0.0" -mocha@10.1.0, mocha@10.2.0, mocha@^10.0.0, mocha@^10.2.0: +mocha@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.1.0.tgz#dbf1114b7c3f9d0ca5de3133906aea3dfc89ef7a" + integrity sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^10.0.0, mocha@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== @@ -13628,6 +13901,32 @@ mocha@10.1.0, mocha@10.2.0, mocha@^10.0.0, mocha@^10.2.0: yargs-parser "20.2.4" yargs-unparser "2.0.0" +mocha@^10.7.3: + version "10.7.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" + integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" + mochawesome-report-generator@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz#65a30a11235ba7a68e1cf0ca1df80d764b93ae78" @@ -13693,7 +13992,7 @@ module-deps@^6.2.3: through2 "^2.0.0" xtend "^4.0.0" -module-error@^1.0.1, module-error@^1.0.2: +module-error@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== @@ -13713,7 +14012,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -13802,7 +14101,7 @@ murmur-128@^0.2.1: fmix "^0.1.0" imul "^1.0.0" -mustache@^4.2.0: +mustache@4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== @@ -13812,7 +14111,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mute-stream@~1.0.0: +mute-stream@^1.0.0, mute-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== @@ -13914,16 +14213,6 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-addon-api@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" - integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== - -node-downloader-helper@^2.1.6: - version "2.1.6" - resolved "https://registry.yarnpkg.com/node-downloader-helper/-/node-downloader-helper-2.1.6.tgz#f73ac458e3ac8c21afd0b952a994eab99c64b879" - integrity sha512-VkOvAXIopI3xMuM/MC5UL7NqqnizQ/9QXZt28jR8FPZ6fHLQm4xe4+YXJ9FqsWwLho5BLXrF51nfOQ0QcohRkQ== - node-emoji@^1.10.0: version "1.11.0" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" @@ -13986,22 +14275,21 @@ node-gyp-build@~4.1.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb" integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ== -node-gyp@^9.0.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.0.tgz#2a7a91c7cba4eccfd95e949369f27c9ba704f369" - integrity sha512-dMXsYP6gc9rRbejLXmTbVRYjAHw7ppswsKyMxuxJxxOHzluIO1rGp9TOQgjFJ+2MCqcOcQTOPB/8Xwhr+7s4Eg== +node-gyp@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.2.0.tgz#80101c4aa4f7ab225f13fcc8daaaac4eb1a8dd86" + integrity sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw== dependencies: env-paths "^2.2.0" exponential-backoff "^3.1.1" - glob "^7.1.4" + glob "^10.3.10" graceful-fs "^4.2.6" - make-fetch-happen "^11.0.3" - nopt "^6.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^4.1.0" semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" + tar "^6.2.1" + which "^4.0.0" node-int64@^0.4.0: version "0.4.0" @@ -14015,17 +14303,16 @@ node-interval-tree@^1.3.3: dependencies: shallowequal "^1.0.2" -node-jq@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/node-jq/-/node-jq-4.2.2.tgz#5f0b6ba9f6b0fd3c183212cf0dc28fea24ec5865" - integrity sha512-eFYWkKyDrl5c2L2ZvD0iecIvCYyyXkFelbvIn2peL8V58vz75Wrp8y0NKN8yiaBO7jL//koB2/n3ZOVStH9tbA== +node-jq@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/node-jq/-/node-jq-6.0.1.tgz#1492e320bd8610062b7a05f317d3a21d6f556ea5" + integrity sha512-jt1H7i2c/BZUkid7O8uK4KWw5wDZgpsSHq8WAVv8SpedToUOpA6kAgoLnoAHmorAUGJTfICZlniKkMaEl28Uyw== dependencies: - bin-build "^3.0.0" is-valid-path "^0.1.1" - joi "^17.4.0" - node-downloader-helper "^2.1.6" strip-final-newline "^2.0.0" - tempfile "^3.0.0" + tar "^7.4.0" + tempy "^3.1.0" + zod "^3.23.8" node-machine-id@1.1.12: version "1.1.12" @@ -14044,15 +14331,25 @@ node-releases@^2.0.13: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + node-releases@^2.0.8: version "2.0.10" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== -nodemon@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.2.tgz#222dd0de79fc7b7b3eedba422d2b9e5fc678621e" - integrity sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA== +nodemon@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.4.tgz#c34dcd8eb46a05723ccde60cbdd25addcc8725e4" + integrity sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ== dependencies: chokidar "^3.5.2" debug "^4" @@ -14090,12 +14387,12 @@ nopt@3.x: dependencies: abbrev "1" -nopt@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" - integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== +nopt@^7.0.0, nopt@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== dependencies: - abbrev "^1.0.0" + abbrev "^2.0.0" nopt@~1.0.10: version "1.0.10" @@ -14124,13 +14421,12 @@ normalize-package-data@^3.0.0, normalize-package-data@^3.0.3: semver "^7.3.4" validate-npm-package-license "^3.0.1" -normalize-package-data@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-5.0.0.tgz#abcb8d7e724c40d88462b84982f7cbf6859b4588" - integrity sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q== +normalize-package-data@^6.0.0, normalize-package-data@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.2.tgz#a7bc22167fe24025412bcff0a9651eb768b03506" + integrity sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g== dependencies: - hosted-git-info "^6.0.0" - is-core-module "^2.8.1" + hosted-git-info "^7.0.0" semver "^7.3.5" validate-npm-package-license "^3.0.4" @@ -14151,12 +14447,10 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== -npm-bundled@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" - integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== - dependencies: - npm-normalize-package-bin "^1.0.1" +normalize-url@^8.0.0: + version "8.0.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.0.1.tgz#9b7d96af9836577c58f5883e939365fa15623a4a" + integrity sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w== npm-bundled@^3.0.0: version "3.0.0" @@ -14165,14 +14459,6 @@ npm-bundled@^3.0.0: dependencies: npm-normalize-package-bin "^3.0.0" -npm-conf@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" - integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== - dependencies: - config-chain "^1.1.11" - pify "^3.0.0" - npm-install-checks@^6.0.0: version "6.2.0" resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.2.0.tgz#fae55b9967b03ac309695ec96629492d5cedf371" @@ -14180,74 +14466,68 @@ npm-install-checks@^6.0.0: dependencies: semver "^7.1.1" -npm-normalize-package-bin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" - integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== +npm-install-checks@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.3.0.tgz#046552d8920e801fa9f919cad569545d60e826fe" + integrity sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw== + dependencies: + semver "^7.1.1" npm-normalize-package-bin@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832" integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== -npm-package-arg@10.1.0, npm-package-arg@^10.0.0, npm-package-arg@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-10.1.0.tgz#827d1260a683806685d17193073cc152d3c7e9b1" - integrity sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA== +npm-package-arg@11.0.2: + version "11.0.2" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.2.tgz#1ef8006c4a9e9204ddde403035f7ff7d718251ca" + integrity sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw== dependencies: - hosted-git-info "^6.0.0" - proc-log "^3.0.0" + hosted-git-info "^7.0.0" + proc-log "^4.0.0" semver "^7.3.5" validate-npm-package-name "^5.0.0" -npm-package-arg@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.1.tgz#00ebf16ac395c63318e67ce66780a06db6df1b04" - integrity sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg== - dependencies: - hosted-git-info "^3.0.6" - semver "^7.0.0" - validate-npm-package-name "^3.0.0" - -npm-packlist@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0" - integrity sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw== +npm-package-arg@11.0.3, npm-package-arg@^11.0.0, npm-package-arg@^11.0.2: + version "11.0.3" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.3.tgz#dae0c21199a99feca39ee4bfb074df3adac87e2d" + integrity sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw== dependencies: - glob "^8.0.1" - ignore-walk "^5.0.1" - npm-bundled "^1.1.2" - npm-normalize-package-bin "^1.0.1" + hosted-git-info "^7.0.0" + proc-log "^4.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" -npm-packlist@^7.0.0: - version "7.0.4" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-7.0.4.tgz#033bf74110eb74daf2910dc75144411999c5ff32" - integrity sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q== +npm-packlist@8.0.2, npm-packlist@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-8.0.2.tgz#5b8d1d906d96d21c85ebbeed2cf54147477c8478" + integrity sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA== dependencies: - ignore-walk "^6.0.0" + ignore-walk "^6.0.4" -npm-pick-manifest@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz#2159778d9c7360420c925c1a2287b5a884c713aa" - integrity sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg== +npm-pick-manifest@^9.0.0, npm-pick-manifest@^9.0.1: + version "9.1.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.1.0.tgz#83562afde52b0b07cb6244361788d319ce7e8636" + integrity sha512-nkc+3pIIhqHVQr085X9d2JzPzLyjzQS96zbruppqC9aZRm/x8xx6xhI98gHtsfELP2bE+loHq8ZaHFHhe+NauA== dependencies: npm-install-checks "^6.0.0" npm-normalize-package-bin "^3.0.0" - npm-package-arg "^10.0.0" + npm-package-arg "^11.0.0" semver "^7.3.5" -npm-registry-fetch@^14.0.0, npm-registry-fetch@^14.0.3, npm-registry-fetch@^14.0.5: - version "14.0.5" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz#fe7169957ba4986a4853a650278ee02e568d115d" - integrity sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA== +npm-registry-fetch@^17.0.0, npm-registry-fetch@^17.0.1, npm-registry-fetch@^17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-17.1.0.tgz#fb69e8e762d456f08bda2f5f169f7638fb92beb1" + integrity sha512-5+bKQRH0J1xG1uZ1zMNvxW0VEyoNWgJpY9UDuluPFLKDfJ9u2JmmjmTJV1srBGQOROfdBMiVvnH2Zvpbm+xkVA== dependencies: - make-fetch-happen "^11.0.0" - minipass "^5.0.0" + "@npmcli/redact" "^2.0.0" + jsonparse "^1.3.1" + make-fetch-happen "^13.0.0" + minipass "^7.0.2" minipass-fetch "^3.0.0" - minipass-json-stream "^1.0.1" minizlib "^2.1.2" - npm-package-arg "^10.0.0" - proc-log "^3.0.0" + npm-package-arg "^11.0.0" + proc-log "^4.0.0" npm-run-all@^4.1.5: version "4.1.5" @@ -14264,13 +14544,6 @@ npm-run-all@^4.1.5: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== - dependencies: - path-key "^2.0.0" - npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" @@ -14278,16 +14551,6 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npmlog@^6.0.0, npmlog@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== - dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" - nth-check@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" @@ -14313,62 +14576,62 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -nx@16.7.3, "nx@>=16.5.1 < 17": - version "16.7.3" - resolved "https://registry.yarnpkg.com/nx/-/nx-16.7.3.tgz#cf90d5e48cad350d99add78038354d39842f1f39" - integrity sha512-aam+1ZesbCfV9xv5FktsAqHVBObcazrf1MG56SdBTYNuILBVgAztPj8NyIZ87ZHw8IE/JxWDDUtZo7lwaSOFzA== +nx@19.6.3, "nx@>=17.1.2 < 20": + version "19.6.3" + resolved "https://registry.yarnpkg.com/nx/-/nx-19.6.3.tgz#ed65e943aad7e9769274253210c138b916dd79fe" + integrity sha512-JbgrEKaIBvTfhw3mG3GeyyzJHBAMfuQkMNrxxIto1fn94gxdjXdMfqUnAzrW6xRAt5OEEU+rf7v2OA3vEXYc3A== dependencies: - "@nrwl/tao" "16.7.3" - "@parcel/watcher" "2.0.4" + "@napi-rs/wasm-runtime" "0.2.4" + "@nrwl/tao" "19.6.3" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "3.0.0-rc.46" - "@zkochan/js-yaml" "0.0.6" - axios "^1.0.0" + "@zkochan/js-yaml" "0.0.7" + axios "^1.7.4" chalk "^4.1.0" cli-cursor "3.1.0" cli-spinners "2.6.1" - cliui "^7.0.2" - dotenv "~16.3.1" + cliui "^8.0.1" + dotenv "~16.4.5" + dotenv-expand "~11.0.6" enquirer "~2.3.6" - fast-glob "3.2.7" figures "3.2.0" flat "^5.0.2" + front-matter "^4.0.2" fs-extra "^11.1.0" - glob "7.1.4" ignore "^5.0.4" - js-yaml "4.1.0" + jest-diff "^29.4.1" jsonc-parser "3.2.0" lines-and-columns "~2.0.3" - minimatch "3.0.5" + minimatch "9.0.3" node-machine-id "1.1.12" npm-run-path "^4.0.1" open "^8.4.0" - semver "7.5.3" + ora "5.3.0" + semver "^7.5.3" string-width "^4.2.3" strong-log-transformer "^2.1.0" tar-stream "~2.2.0" tmp "~0.2.1" tsconfig-paths "^4.1.2" tslib "^2.3.0" - v8-compile-cache "2.3.0" yargs "^17.6.2" yargs-parser "21.1.1" optionalDependencies: - "@nx/nx-darwin-arm64" "16.7.3" - "@nx/nx-darwin-x64" "16.7.3" - "@nx/nx-freebsd-x64" "16.7.3" - "@nx/nx-linux-arm-gnueabihf" "16.7.3" - "@nx/nx-linux-arm64-gnu" "16.7.3" - "@nx/nx-linux-arm64-musl" "16.7.3" - "@nx/nx-linux-x64-gnu" "16.7.3" - "@nx/nx-linux-x64-musl" "16.7.3" - "@nx/nx-win32-arm64-msvc" "16.7.3" - "@nx/nx-win32-x64-msvc" "16.7.3" - -nyc@^15.1.0: - version "15.1.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" - integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== + "@nx/nx-darwin-arm64" "19.6.3" + "@nx/nx-darwin-x64" "19.6.3" + "@nx/nx-freebsd-x64" "19.6.3" + "@nx/nx-linux-arm-gnueabihf" "19.6.3" + "@nx/nx-linux-arm64-gnu" "19.6.3" + "@nx/nx-linux-arm64-musl" "19.6.3" + "@nx/nx-linux-x64-gnu" "19.6.3" + "@nx/nx-linux-x64-musl" "19.6.3" + "@nx/nx-win32-arm64-msvc" "19.6.3" + "@nx/nx-win32-x64-msvc" "19.6.3" + +nyc@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.0.0.tgz#d8943407584242a448a70290b15bb72207fac9fd" + integrity sha512-ISp44nqNCaPugLLGGfknzQwSwt10SSS5IMoPR7GLoMAyS18Iw5js8U7ga2VF9lYuMZ42gOHr3UddZw4WZltxKg== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" @@ -14382,7 +14645,7 @@ nyc@^15.1.0: glob "^7.1.6" istanbul-lib-coverage "^3.0.0" istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" + istanbul-lib-instrument "^6.0.2" istanbul-lib-processinfo "^2.0.2" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" @@ -14403,7 +14666,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -14504,7 +14767,7 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open@^8.4.0: +open@8.4.2, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -14567,7 +14830,36 @@ ora@4.0.2: strip-ansi "^5.2.0" wcwidth "^1.0.1" -ora@5.4.1, ora@^5.4.1: +ora@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f" + integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g== + dependencies: + bl "^4.0.3" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + log-symbols "^4.0.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +ora@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-8.0.1.tgz#6dcb9250a629642cbe0d2df3a6331ad6f7a2af3e" + integrity sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ== + dependencies: + chalk "^5.3.0" + cli-cursor "^4.0.0" + cli-spinners "^2.9.2" + is-interactive "^2.0.0" + is-unicode-supported "^2.0.0" + log-symbols "^6.0.0" + stdin-discarder "^0.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + +ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== @@ -14609,11 +14901,6 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - p-cancelable@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" @@ -14629,13 +14916,6 @@ p-defer@^3.0.0: resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" integrity sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw== -p-event@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" - integrity sha512-hV1zbA7gwqPVFcapfeATaNjQ3J0NuzorHPyG8GPL9g/Y/TplWVBVoCKCXL6Ej2zscrCEv195QNWJXuBH6XZuzA== - dependencies: - p-timeout "^1.1.1" - p-fifo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-fifo/-/p-fifo-1.0.0.tgz#e29d5cf17c239ba87f51dde98c1d26a9cfe20a63" @@ -14703,13 +14983,6 @@ p-map-series@2.1.0: resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== -p-map-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" - integrity sha512-4k9LlvY6Bo/1FcIdV33wqZQES0Py+iKISU9Uc8p8AjWoZPnFKMpVIVD3s0EYn4jzLh1I+WeUZkJ0Yoa4Qfw3Kg== - dependencies: - p-reduce "^1.0.0" - p-map@4.0.0, p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -14742,18 +15015,6 @@ p-reduce@2.1.0, p-reduce@^2.0.0, p-reduce@^2.1.0: resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha512-3Tx1T3oM1xO/Y8Gj0sWyE78EIJZ+t+aEmXUdvQgvGmSMri7aPTHoovbXEreWKkL5j21Er60XAWLTzKbAKYOujQ== - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA== - dependencies: - p-finally "^1.0.0" - p-timeout@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" @@ -14788,27 +15049,41 @@ package-hash@^4.0.0: lodash.flattendeep "^4.4.0" release-zalgo "^1.0.0" -pacote@^15.2.0: - version "15.2.0" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.2.0.tgz#0f0dfcc3e60c7b39121b2ac612bf8596e95344d3" - integrity sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + +package-json@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-8.1.1.tgz#3e9948e43df40d1e8e78a85485f1070bf8f03dc8" + integrity sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA== + dependencies: + got "^12.1.0" + registry-auth-token "^5.0.1" + registry-url "^6.0.0" + semver "^7.3.7" + +pacote@^18.0.0, pacote@^18.0.6: + version "18.0.6" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-18.0.6.tgz#ac28495e24f4cf802ef911d792335e378e86fac7" + integrity sha512-+eK3G27SMwsB8kLIuj4h1FUhHtwiEUo21Tw8wNjmvdlpOEr613edv+8FUsTj/4F/VN5ywGE19X18N7CC2EJk6A== dependencies: - "@npmcli/git" "^4.0.0" + "@npmcli/git" "^5.0.0" "@npmcli/installed-package-contents" "^2.0.1" - "@npmcli/promise-spawn" "^6.0.1" - "@npmcli/run-script" "^6.0.0" - cacache "^17.0.0" + "@npmcli/package-json" "^5.1.0" + "@npmcli/promise-spawn" "^7.0.0" + "@npmcli/run-script" "^8.0.0" + cacache "^18.0.0" fs-minipass "^3.0.0" - minipass "^5.0.0" - npm-package-arg "^10.0.0" - npm-packlist "^7.0.0" - npm-pick-manifest "^8.0.0" - npm-registry-fetch "^14.0.0" - proc-log "^3.0.0" + minipass "^7.0.2" + npm-package-arg "^11.0.0" + npm-packlist "^8.0.0" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^17.0.0" + proc-log "^4.0.0" promise-retry "^2.0.1" - read-package-json "^6.0.0" - read-package-json-fast "^3.0.0" - sigstore "^1.3.0" + sigstore "^2.2.0" ssri "^10.0.0" tar "^6.1.11" @@ -14862,6 +15137,15 @@ parse-cache-control@^1.0.1: resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== +parse-conflict-json@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/parse-conflict-json/-/parse-conflict-json-3.0.1.tgz#67dc55312781e62aa2ddb91452c7606d1969960c" + integrity sha512-01TvEktc68vwbJOtWZluyWeVGWjP+bZwXtPDMQVbBKzbJ/vZBif0L69KH1+cHv1SZ6e0FKLvjyHe8mqsIqYOmw== + dependencies: + json-parse-even-better-errors "^3.0.0" + just-diff "^6.0.0" + just-diff-apply "^5.2.0" + parse-duration@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.0.3.tgz#b6681f5edcc2689643b34c09ea63f86f58a35814" @@ -14896,7 +15180,7 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-json@^5.0.0: +parse-json@^5.0.0, parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== @@ -15011,7 +15295,7 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^2.0.0, path-key@^2.0.1: +path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== @@ -15051,6 +15335,14 @@ path-scurry@^1.10.1, path-scurry@^1.6.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -15077,6 +15369,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +path-type@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8" + integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -15093,11 +15390,6 @@ pbkdf2@^3.0.17, pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -15108,6 +15400,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -15169,6 +15466,14 @@ pluralize@^8.0.0: resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== +postcss-selector-parser@^6.0.10: + version "6.1.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" + integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + pouchdb-abstract-mapreduce@7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.3.1.tgz#96ff4a0f41cbe273f3f52fde003b719005a2093c" @@ -15370,30 +15675,23 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg== - -prettier-eslint@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-15.0.1.tgz#2543a43e9acec2a9767ad6458165ce81f353db9c" - integrity sha512-mGOWVHixSvpZWARqSDXbdtTL54mMBxc5oQYQ6RAqy8jecuNJBgN3t9E5a81G66F8x8fsKNiR1HWaBV66MJDOpg== +prettier-eslint@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-16.3.0.tgz#8f7bbc863f35939948e386eafe72ffd653b2d80b" + integrity sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg== dependencies: - "@types/eslint" "^8.4.2" - "@types/prettier" "^2.6.0" - "@typescript-eslint/parser" "^5.10.0" + "@typescript-eslint/parser" "^6.7.5" common-tags "^1.4.0" dlv "^1.1.0" eslint "^8.7.0" indent-string "^4.0.0" lodash.merge "^4.6.0" loglevel-colored-level-prefix "^1.0.0" - prettier "^2.5.1" - pretty-format "^23.0.1" + prettier "^3.0.1" + pretty-format "^29.7.0" require-relative "^0.8.7" - typescript "^4.5.4" - vue-eslint-parser "^8.0.1" + typescript "^5.2.2" + vue-eslint-parser "^9.1.0" prettier-linter-helpers@^1.0.0: version "1.0.0" @@ -15416,23 +15714,15 @@ prettier@3.0.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== -prettier@^2.3.1, prettier@^2.5.1, prettier@^2.7.1, prettier@^2.8.3: +prettier@^2.3.1, prettier@^2.7.1, prettier@^2.8.3: version "2.8.6" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.6.tgz#5c174b29befd507f14b83e3c19f83fdc0e974b71" integrity sha512-mtuzdiBbHwPEgl7NxWlqOkithPyp4VN93V7VeHVWBF+ad3I5avc0RVDT4oImXQy9H/AqxA2NSQH8pSxHW6FYbQ== -prettier@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" - integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== - -pretty-format@^23.0.1: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" - integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" +prettier@^3.0.1, prettier@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-format@^29.6.3: version "29.6.3" @@ -15443,10 +15733,19 @@ pretty-format@^29.6.3: ansi-styles "^5.0.0" react-is "^18.0.0" -proc-log@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" - integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +proc-log@^4.0.0, proc-log@^4.1.0, proc-log@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" + integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== process-nextick-args@~2.0.0: version "2.0.1" @@ -15465,12 +15764,27 @@ process@^0.11.10, process@~0.11.0: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== +proggy@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/proggy/-/proggy-2.0.0.tgz#154bb0e41d3125b518ef6c79782455c2c47d94e1" + integrity sha512-69agxLtnI8xBs9gUGqEnK26UfiexpHy+KUpBQWabiytQjnn5wFY8rklAi7GRfABIuPNnQ/ik48+LGLkYYJcy4A== + +promise-all-reject-late@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" + integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== + +promise-call-limit@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/promise-call-limit/-/promise-call-limit-3.0.1.tgz#3570f7a3f2aaaf8e703623a552cd74749688cf19" + integrity sha512-utl+0x8gIDasV5X+PI5qWEPqH6fJS0pFtQ/4gZ95xfEFb/89dmh+/b895TbFDBLiafBvxD/PGTKfvxl4kH/pQg== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== -promise-retry@^2.0.1: +promise-retry@2.0.1, promise-retry@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== @@ -15571,11 +15885,6 @@ prr@~1.0.1: resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - psl@^1.1.28, psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -15614,6 +15923,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -15639,10 +15953,10 @@ pure-rand@^5.0.1: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== -pure-rand@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.2.tgz#a9c2ddcae9b68d736a8163036f088a2781c8b306" - integrity sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ== +pure-rand@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== pvtsutils@^1.3.2: version "1.3.2" @@ -15739,16 +16053,6 @@ range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - raw-body@2.5.2, raw-body@^2.4.1: version "2.5.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" @@ -15759,6 +16063,16 @@ raw-body@2.5.2, raw-body@^2.4.1: iconv-lite "0.4.24" unpipe "1.0.0" +rc@1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-dom@^18: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -15784,10 +16098,10 @@ react-native-fetch-api@^3.0.0: dependencies: p-defer "^3.0.0" -react-redux@^8.1.2: - version "8.1.2" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.1.2.tgz#9076bbc6b60f746659ad6d51cb05de9c5e1e9188" - integrity sha512-xJKYI189VwfsFc4CJvHqHlDrzyFTY/3vZACbE+rr/zQ34Xx1wQfB4OTOSeOSNrF6BDVe8OOdxIrAnMGXA3ggfw== +react-redux@^8.1.3: + version "8.1.3" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.1.3.tgz#4fdc0462d0acb59af29a13c27ffef6f49ab4df46" + integrity sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw== dependencies: "@babel/runtime" "^7.12.1" "@types/hoist-non-react-statics" "^3.3.1" @@ -15803,7 +16117,7 @@ react@^18: dependencies: loose-envify "^1.1.0" -read-cmd-shim@4.0.0: +read-cmd-shim@4.0.0, read-cmd-shim@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb" integrity sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q== @@ -15815,7 +16129,7 @@ read-only-stream@^2.0.0: dependencies: readable-stream "^2.0.2" -read-package-json-fast@^3.0.0: +read-package-json-fast@^3.0.0, read-package-json-fast@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049" integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== @@ -15823,16 +16137,6 @@ read-package-json-fast@^3.0.0: json-parse-even-better-errors "^3.0.0" npm-normalize-package-bin "^3.0.0" -read-package-json@6.0.4, read-package-json@^6.0.0: - version "6.0.4" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-6.0.4.tgz#90318824ec456c287437ea79595f4c2854708836" - integrity sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw== - dependencies: - glob "^10.2.2" - json-parse-even-better-errors "^3.0.0" - normalize-package-data "^5.0.0" - npm-normalize-package-bin "^3.0.0" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -15901,6 +16205,13 @@ read@^2.0.0: dependencies: mute-stream "~1.0.0" +read@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/read/-/read-3.0.1.tgz#926808f0f7c83fa95f1ef33c0e2c09dbb28fd192" + integrity sha512-SLBrDU/Srs/9EoWhU5GdbAoxG1GzpQHo/6qiGItaoLJ1thmYpcNIM1qISEUvyHBzfGlWIyd6p2DNi1oV1VmAuw== + dependencies: + mute-stream "^1.0.0" + readable-stream@1.1.14, readable-stream@^1.0.33: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -15955,7 +16266,7 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -readline@1.3.0: +readline@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/readline/-/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c" integrity sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg== @@ -15974,12 +16285,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" -rechoir@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" - integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== dependencies: - resolve "^1.9.0" + resolve "^1.20.0" recursive-readdir@^2.2.2: version "2.2.3" @@ -16060,6 +16371,20 @@ regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" +registry-auth-token@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.2.tgz#8b026cc507c8552ebbe06724136267e63302f756" + integrity sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ== + dependencies: + "@pnpm/npm-conf" "^2.1.0" + +registry-url@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" + integrity sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q== + dependencies: + rc "1.2.8" + relay-runtime@12.0.0: version "12.0.0" resolved "https://registry.yarnpkg.com/relay-runtime/-/relay-runtime-12.0.0.tgz#1e039282bdb5e0c1b9a7dc7f6b9a09d4f4ff8237" @@ -16091,7 +16416,7 @@ remove-trailing-spaces@^1.0.6: resolved "https://registry.yarnpkg.com/remove-trailing-spaces/-/remove-trailing-spaces-1.0.8.tgz#4354d22f3236374702f58ee373168f6d6887ada7" integrity sha512-O3vsMYfWighyFbTd8hk8VaSj9UAGENxAtX+//ugIst2RMk5e03h6RoIS+0ylsFxY1gvmPuAY/PO4It+gPEeySA== -request@2.88.2, request@^2.79.0, request@^2.85.0: +request@^2.79.0, request@^2.85.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -16127,7 +16452,7 @@ require-from-string@^1.1.0: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== -require-from-string@^2.0.0, require-from-string@^2.0.2: +require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -16222,7 +16547,7 @@ resolve@^1.1.4, resolve@^1.1.6, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.4.0 path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.10.0, resolve@^1.9.0: +resolve@^1.10.0: version "1.22.4" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== @@ -16231,7 +16556,7 @@ resolve@^1.10.0, resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.22.4: +resolve@^1.20.0, resolve@^1.22.4: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -16247,6 +16572,13 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" +responselike@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-3.0.0.tgz#20decb6c298aff0dbee1c355ca95461d42823626" + integrity sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg== + dependencies: + lowercase-keys "^3.0.0" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -16255,6 +16587,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retimer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/retimer/-/retimer-3.0.0.tgz#98b751b1feaf1af13eb0228f8ea68b8f9da530df" @@ -16301,6 +16641,13 @@ rimraf@^4.4.1: dependencies: glob "^9.2.0" +rimraf@^5.0.5: + version "5.0.10" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.10.tgz#23b9843d3dc92db71f96e1a2ce92e39fd2a8221c" + integrity sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ== + dependencies: + glob "^10.3.7" + ripemd160-min@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" @@ -16326,13 +16673,6 @@ run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== -run-parallel-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" - integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== - dependencies: - queue-microtask "^1.2.2" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -16467,13 +16807,6 @@ seedrandom@3.0.5: resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== -seek-bzip@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.6.tgz#35c4171f55a680916b52a07859ecf3b5857f21c4" - integrity sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ== - dependencies: - commander "^2.8.1" - semaphore@>=1.0.1, semaphore@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" @@ -16505,26 +16838,10 @@ semver@7.4.0: dependencies: lru-cache "^6.0.0" -semver@7.5.2: - version "7.5.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" - integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.5.3: - version "7.5.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" - integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== - dependencies: - lru-cache "^6.0.0" - -semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" +semver@7.6.3, semver@^7.3.6, semver@^7.6.0: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== semver@^5.3.0, semver@^5.5.0: version "5.7.1" @@ -16541,6 +16858,13 @@ semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -16596,6 +16920,13 @@ serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + serve-static@1.15.0: version "1.15.0" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" @@ -16733,15 +17064,13 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" -shiki@^0.14.7: - version "0.14.7" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" - integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== +shiki@^1.9.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.14.1.tgz#617e62dfbe3a083e46111e22086044fbd7644786" + integrity sha512-FujAN40NEejeXdzPt+3sZ3F2dx1U24BY2XTY01+MG8mbxCiA2XukXdcbyMyLAHJ/1AUUnQd1tZlvIjefWWEJeA== dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" + "@shikijs/core" "1.14.1" + "@types/hast" "^3.0.4" side-channel@^1.0.4: version "1.0.4" @@ -16752,7 +17081,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@3.0.7, signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@3.0.7, signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -16767,16 +17096,17 @@ signedsource@^1.0.0: resolved "https://registry.yarnpkg.com/signedsource/-/signedsource-1.0.0.tgz#1ddace4981798f93bd833973803d80d52e93ad6a" integrity sha512-6+eerH9fEnNmi/hyM1DXcRK3pWdoMQtlkQ+ns0ntzunjKqp5i3sKCc80ym8Fib3iaYhdJUOPdhlJWj1tvge2Ww== -sigstore@^1.3.0, sigstore@^1.4.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.9.0.tgz#1e7ad8933aa99b75c6898ddd0eeebc3eb0d59875" - integrity sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A== +sigstore@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-2.3.1.tgz#0755dd2cc4820f2e922506da54d3d628e13bfa39" + integrity sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ== dependencies: - "@sigstore/bundle" "^1.1.0" - "@sigstore/protobuf-specs" "^0.2.0" - "@sigstore/sign" "^1.0.0" - "@sigstore/tuf" "^1.0.3" - make-fetch-happen "^11.0.1" + "@sigstore/bundle" "^2.3.2" + "@sigstore/core" "^1.0.0" + "@sigstore/protobuf-specs" "^0.3.2" + "@sigstore/sign" "^2.3.2" + "@sigstore/tuf" "^2.3.4" + "@sigstore/verify" "^1.2.1" simple-concat@^1.0.0: version "1.0.1" @@ -16818,6 +17148,11 @@ slash@3.0.0, slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce" + integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg== + slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" @@ -16856,42 +17191,40 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -socks-proxy-agent@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" - integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== +socks-proxy-agent@^8.0.3: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" -socks@^2.6.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" - integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== dependencies: - ip "^2.0.0" + ip-address "^9.0.5" smart-buffer "^4.2.0" -solc@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== +solc@0.8.19: + version "0.8.19" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.19.tgz#cac6541106ae3cff101c740042c7742aa56a2ed3" + integrity sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA== dependencies: command-exists "^1.2.8" - commander "3.0.2" + commander "^8.1.0" follow-redirects "^1.12.1" - fs-extra "^0.30.0" js-sha3 "0.8.0" memorystream "^0.3.1" - require-from-string "^2.0.0" semver "^5.5.0" tmp "0.0.33" -solc@0.8.19: - version "0.8.19" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.19.tgz#cac6541106ae3cff101c740042c7742aa56a2ed3" - integrity sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA== +solc@0.8.26: + version "0.8.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.26.tgz#afc78078953f6ab3e727c338a2fefcd80dd5b01a" + integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== dependencies: command-exists "^1.2.8" commander "^8.1.0" @@ -16912,14 +17245,14 @@ solc@^0.4.20: semver "^5.3.0" yargs "^4.7.1" -solhint@3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.6.2.tgz#2b2acbec8fdc37b2c68206a71ba89c7f519943fe" - integrity sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ== +solhint@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-5.0.3.tgz#b57f6d2534fe09a60f9db1b92e834363edd1cbde" + integrity sha512-OLCH6qm/mZTCpplTXzXTJGId1zrtNuDYP5c2e6snIv/hdRVxPfBBz/bAlL91bY/Accavkayp2Zp2BaDSrLVXTQ== dependencies: - "@solidity-parser/parser" "^0.16.0" + "@solidity-parser/parser" "^0.18.0" ajv "^6.12.6" - antlr4 "^4.11.0" + antlr4 "^4.13.1-patch-1" ast-parents "^0.0.1" chalk "^4.1.2" commander "^10.0.0" @@ -16928,6 +17261,7 @@ solhint@3.6.2: glob "^8.0.3" ignore "^5.2.4" js-yaml "^4.1.0" + latest-version "^7.0.0" lodash "^4.17.21" pluralize "^8.0.0" semver "^7.5.2" @@ -16947,24 +17281,23 @@ solidity-comments-extractor@^0.0.7: resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== -solidity-coverage@0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.5.tgz#64071c3a0c06a0cecf9a7776c35f49edc961e875" - integrity sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ== +solidity-coverage@^0.8.12: + version "0.8.13" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.13.tgz#8eeada2e82ae19d25568368aa782a2baad0e0ce7" + integrity sha512-RiBoI+kF94V3Rv0+iwOj3HQVSqNzA9qm/qDP1ZDXK5IX0Cvho1qiz8hAXTsAo6KOIUeP73jfscq0KlLqVxzGWA== dependencies: "@ethersproject/abi" "^5.0.9" - "@solidity-parser/parser" "^0.16.0" + "@solidity-parser/parser" "^0.18.0" chalk "^2.4.2" death "^1.1.0" - detect-port "^1.3.0" difflib "^0.2.4" fs-extra "^8.1.0" ghost-testrpc "^0.0.2" global-modules "^2.0.0" globby "^10.0.1" jsonschema "^1.2.4" - lodash "^4.17.15" - mocha "10.2.0" + lodash "^4.17.21" + mocha "^10.2.0" node-emoji "^1.10.0" pify "^4.0.1" recursive-readdir "^2.2.2" @@ -16981,20 +17314,6 @@ solidity-docgen@^0.6.0-beta.36: handlebars "^4.7.7" solidity-ast "^0.4.38" -sort-keys-length@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" - integrity sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw== - dependencies: - sort-keys "^1.0.0" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg== - dependencies: - is-plain-obj "^1.0.0" - sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -17096,6 +17415,11 @@ sponge-case@^1.0.1: dependencies: tslib "^2.0.3" +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -17116,19 +17440,19 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^10.0.0, ssri@^10.0.1: +ssri@^10.0.0: version "10.0.5" resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== dependencies: minipass "^7.0.3" -ssri@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" - integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== +ssri@^10.0.6: + version "10.0.6" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5" + integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== dependencies: - minipass "^3.1.1" + minipass "^7.0.3" stack-trace@0.0.10: version "0.0.10" @@ -17147,6 +17471,11 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +stdin-discarder@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be" + integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ== + stream-browserify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" @@ -17208,7 +17537,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17226,6 +17555,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -17235,6 +17573,15 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^7.0.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.2.0.tgz#b5bb8e2165ce275d4d43476dd2700ad9091db6dc" + integrity sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.padend@^3.0.0: version "3.1.4" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz#2c43bb3a89eb54b6750de5942c123d6c98dd65b6" @@ -17317,7 +17664,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17345,7 +17692,14 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^7.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== @@ -17369,18 +17723,6 @@ strip-bom@^4.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== -strip-dirs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" - integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== - dependencies: - is-natural-number "^4.0.1" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== - strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" @@ -17410,18 +17752,11 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-json-comments@^2.0.0: +strip-json-comments@^2.0.0, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -strip-outer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" - integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== - dependencies: - escape-string-regexp "^1.0.2" - strong-log-transformer@2.1.0, strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -17547,36 +17882,36 @@ sync-rpc@^1.2.1: dependencies: get-port "^3.1.0" -synckit@^0.8.6: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== +synckit@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.1.tgz#febbfbb6649979450131f64735aa3f6c14575c88" + integrity sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A== dependencies: "@pkgr/core" "^0.1.0" tslib "^2.6.2" -syncpack@^10.9.3: - version "10.9.3" - resolved "https://registry.yarnpkg.com/syncpack/-/syncpack-10.9.3.tgz#24c56f506a8700aca032bd2a7ddc3acd3c8df824" - integrity sha512-urdxuqkvO2/4tB1GaZGbCTzOgdi1XJzHjpiG4DTunOMH4oChSg54hczzzybfFQhqUl0ZY8A6LJNziKsf3J6E7g== - dependencies: - "@effect/data" "0.17.1" - "@effect/io" "0.37.1" - "@effect/match" "0.31.0" - "@effect/schema" "0.32.0" - chalk "4.1.2" - commander "11.0.0" - cosmiconfig "8.2.0" +syncpack@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/syncpack/-/syncpack-13.0.0.tgz#4b2eaa46ca9063f8a5b326efda75d0a9505eda08" + integrity sha512-0PIoEWMP2+YkllkcZXw8N9d2sFqpmr8ULBdvms3gc1vG5tnccEMqc6flxHYnF/N+NTTcUnf0J+4xAD5hwH6XGQ== + dependencies: + "@effect/schema" "0.71.1" + chalk "5.3.0" + chalk-template "1.1.0" + commander "12.1.0" + cosmiconfig "9.0.0" + effect "3.6.5" enquirer "2.4.1" - fs-extra "11.1.1" - globby "11.1.0" - minimatch "9.0.3" - npm-package-arg "10.1.0" - ora "5.4.1" + fast-check "3.21.0" + globby "14.0.2" + jsonc-parser "3.3.1" + minimatch "9.0.5" + npm-package-arg "11.0.3" + ora "8.0.1" prompts "2.4.2" read-yaml-file "2.1.0" - semver "7.5.4" - tightrope "0.1.0" + semver "7.6.3" + tightrope "0.2.0" ts-toolbelt "9.6.0" syntax-error@^1.1.1: @@ -17622,7 +17957,7 @@ tar-fs@~1.16.3: pump "^1.0.0" tar-stream "^1.1.2" -tar-stream@^1.1.2, tar-stream@^1.5.2: +tar-stream@^1.1.2: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== @@ -17646,14 +17981,14 @@ tar-stream@~2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar@6.1.11: - version "6.1.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== +tar@6.2.1, tar@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== dependencies: chownr "^2.0.0" fs-minipass "^2.0.0" - minipass "^3.0.0" + minipass "^5.0.0" minizlib "^2.1.1" mkdirp "^1.0.3" yallist "^4.0.0" @@ -17683,7 +18018,7 @@ tar@^6.1.0: mkdirp "^1.0.3" yallist "^4.0.0" -tar@^6.1.11, tar@^6.1.2: +tar@^6.1.11: version "6.1.15" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69" integrity sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A== @@ -17695,6 +18030,18 @@ tar@^6.1.11, tar@^6.1.2: mkdirp "^1.0.3" yallist "^4.0.0" +tar@^7.4.0: + version "7.4.3" + resolved "https://registry.yarnpkg.com/tar/-/tar-7.4.3.tgz#88bbe9286a3fcd900e94592cda7a22b192e80571" + integrity sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw== + dependencies: + "@isaacs/fs-minipass" "^4.0.0" + chownr "^3.0.0" + minipass "^7.1.2" + minizlib "^3.0.1" + mkdirp "^3.0.1" + yallist "^5.0.0" + tcomb-validation@^3.3.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tcomb-validation/-/tcomb-validation-3.4.1.tgz#a7696ec176ce56a081d9e019f8b732a5a8894b65" @@ -17707,47 +18054,41 @@ tcomb@^3.0.0, tcomb@^3.2.17: resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-3.2.29.tgz#32404fe9456d90c2cf4798682d37439f1ccc386c" integrity sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ== -temp-dir@1.0.0, temp-dir@^1.0.0: +temp-dir@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - -tempfile@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" - integrity sha512-ZOn6nJUgvgC09+doCEF3oB+r3ag7kUvlsXEGX069QRD60p+P3uP7XG9N2/at+EyIRGSN//ZY3LyEotA1YpmjuA== - dependencies: - temp-dir "^1.0.0" - uuid "^3.0.1" - -tempfile@^3.0.0: +temp-dir@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-3.0.0.tgz#5376a3492de7c54150d0cc0612c3f00e2cdaf76c" - integrity sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw== + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-3.0.0.tgz#7f147b42ee41234cc6ba3138cd8e8aa2302acffa" + integrity sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw== + +tempy@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/tempy/-/tempy-3.1.0.tgz#00958b6df85db8589cb595465e691852aac038e9" + integrity sha512-7jDLIdD2Zp0bDe5r3D2qtkd1QOCacylBuL7oa4udvN6v2pqr4+LcCr67C8DR1zkpaZ8XosF5m1yQSabKAW6f2g== dependencies: - temp-dir "^2.0.0" - uuid "^3.3.2" + is-stream "^3.0.0" + temp-dir "^3.0.0" + type-fest "^2.12.2" + unique-string "^3.0.0" -terser-webpack-plugin@^5.3.7: - version "5.3.9" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" - integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== dependencies: - "@jridgewell/trace-mapping" "^0.3.17" + "@jridgewell/trace-mapping" "^0.3.20" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.1" - terser "^5.16.8" + terser "^5.26.0" -terser@^5.16.8: - version "5.19.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.2.tgz#bdb8017a9a4a8de4663a7983f45c506534f9234e" - integrity sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA== +terser@^5.26.0: + version "5.27.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.27.0.tgz#70108689d9ab25fef61c4e93e808e9fd092bf20c" + integrity sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -17816,12 +18157,12 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tightrope@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/tightrope/-/tightrope-0.1.0.tgz#f734fba76bd3472cc88884e4bd4bf109e5f0b051" - integrity sha512-HHHNYdCAIYwl1jOslQBT455zQpdeSo8/A346xpIb/uuqhSg+tCvYNsP5f11QW+z9VZ3vSX8YIfzTApjjuGH63w== +tightrope@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/tightrope/-/tightrope-0.2.0.tgz#5a2a1d8391d869be376b9160dd03965b53243a29" + integrity sha512-Kw36UHxJEELq2VUqdaSGR2/8cAsPgMtvX8uGVU6Jk26O66PhXec0A5ZnRYs47btbtwPDpXXF66+Fo3vimCM9aQ== -timed-out@^4.0.0, timed-out@^4.0.1: +timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== @@ -17940,18 +18281,16 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +treeverse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/treeverse/-/treeverse-3.0.0.tgz#dd82de9eb602115c6ebd77a574aae67003cb48c8" + integrity sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ== + trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -trim-repeated@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" - integrity sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg== - dependencies: - escape-string-regexp "^1.0.2" - truffle-flattener@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/truffle-flattener/-/truffle-flattener-1.6.0.tgz#abb64488b711e6cca0a9d3e449f6a85e35964c5d" @@ -17963,18 +18302,6 @@ truffle-flattener@^1.6.0: mkdirp "^1.0.4" tsort "0.0.1" -truffle-plugin-verify@0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/truffle-plugin-verify/-/truffle-plugin-verify-0.6.5.tgz#60110d39e8bc44301cb9b2aff81da8aa8308c177" - integrity sha512-8vFYVKe+L/tyhjyYb2aNwT7DFkN2BfQ+VSnmywCK2IbpGA0zRF7QYjRcne8UllpxcAVv0o4i1L97+qmN06ugnA== - dependencies: - "@truffle/resolver" "^9.0.35" - axios "^0.26.1" - cli-logger "^0.5.40" - delay "^5.0.0" - querystring "^0.2.1" - tunnel "0.0.6" - truffle@^5.11.5: version "5.11.5" resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.11.5.tgz#b0a3a9308c417dbe0290307d7698316d3e8eabe8" @@ -17994,6 +18321,11 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz#8144e811d44c749cd65b2da305a032510774452d" integrity sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A== +ts-api-utils@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + ts-command-line-args@^2.2.0: version "2.4.2" resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.4.2.tgz#b4815b23c35f8a0159d4e69e01012d95690bc448" @@ -18087,7 +18419,7 @@ tsconfig@^5.0.3: strip-bom "^2.0.0" strip-json-comments "^2.0.0" -tsify@^5.0.4: +tsify@5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/tsify/-/tsify-5.0.4.tgz#22163648d04c0c90bdb15704fb14947df2328547" integrity sha512-XAZtQ5OMPsJFclkZ9xMZWkSNyMhMxEPsz3D2zu79yoKorH9j/DT4xCloJeXk5+cDhosEibu4bseMVjyPOAyLJA== @@ -18099,7 +18431,7 @@ tsify@^5.0.4: through2 "^2.0.0" tsconfig "^5.0.3" -tslib@^1.8.1, tslib@^1.9.3: +tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -18109,7 +18441,7 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.3.1, tslib@^2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.6.2, tslib@~2.6.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -18119,36 +18451,24 @@ tslib@~2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== -tslib@~2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" - integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== - tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== -tuf-js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.7.tgz#21b7ae92a9373015be77dfe0cb282a80ec3bbe43" - integrity sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg== +tuf-js@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.1.tgz#fdd8794b644af1a75c7aaa2b197ddffeb2911b56" + integrity sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA== dependencies: - "@tufjs/models" "1.0.4" + "@tufjs/models" "2.0.1" debug "^4.3.4" - make-fetch-happen "^11.1.1" + make-fetch-happen "^13.0.1" tunnel-agent@^0.6.0: version "0.6.0" @@ -18231,6 +18551,16 @@ type-fest@^0.8.0, type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-fest@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" + integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== + +type-fest@^2.12.2: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -18316,15 +18646,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typedoc@^0.25.6: - version "0.25.6" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.6.tgz#1505538aecea511dd669652c71d042a2427bd4fc" - integrity sha512-1rdionQMpOkpA58qfym1J+YD+ukyA1IEIa4VZahQI2ZORez7dhOvEyUotQL/8rSoMBopdzOS+vAIsORpQO4cTA== +typedoc@^0.26.6: + version "0.26.6" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.26.6.tgz#9cb3d6f0ed5070f86af169c3f88ca2c9b7031f59" + integrity sha512-SfEU3SH3wHNaxhFPjaZE2kNl/NFtLNW5c1oHsg7mti7GjmUj1Roq6osBQeMd+F4kL0BoRBBr8gQAuqBlfFu8LA== dependencies: lunr "^2.3.9" - marked "^4.3.0" - minimatch "^9.0.3" - shiki "^0.14.7" + markdown-it "^14.1.0" + minimatch "^9.0.5" + shiki "^1.9.1" + yaml "^2.4.5" typescript-compare@^0.0.2: version "0.0.2" @@ -18350,15 +18681,10 @@ typescript-tuple@^2.2.1: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== -typescript@^4.5.4: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -typescript@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^5.2.2, typescript@^5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== typical@^4.0.0: version "4.0.0" @@ -18375,6 +18701,11 @@ ua-parser-js@^0.7.30: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.34.tgz#afb439e2e3e394bdc90080acb661a39c685b67d7" integrity sha512-cJMeh/eOILyGu0ejgTKB95yKT3zOenSe9UGE3vj6WfiOwgGYnmATUsnDixMFvdU+rNMvWih83hrUP8VwhF9yXQ== +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -18407,14 +18738,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -unbzip2-stream@^1.0.9: - version "1.4.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" - integrity sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -18442,12 +18765,17 @@ underscore@^1.8.3: integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== undici@^5.14.0: - version "5.26.3" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.26.3.tgz#ab3527b3d5bb25b12f898dfd22165d472dd71b79" - integrity sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw== + version "5.28.4" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.4.tgz#6b280408edb6a1a604a9b20340f45b422e373068" + integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== dependencies: "@fastify/busboy" "^2.0.0" +unicorn-magic@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4" + integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== + unique-filename@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" @@ -18462,6 +18790,13 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" +unique-string@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" + integrity sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ== + dependencies: + crypto-random-string "^4.0.0" + universal-user-agent@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" @@ -18520,6 +18855,22 @@ update-browserslist-db@^1.0.11: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + upper-case-first@^1.1.0, upper-case-first@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" @@ -18553,13 +18904,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA== - dependencies: - prepend-http "^1.0.1" - url-parse@^1.5.3: version "1.5.10" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" @@ -18573,11 +18917,6 @@ url-set-query@^1.0.0: resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A== - url@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -18634,7 +18973,7 @@ utf8@3.0.0, utf8@^3.0.0: resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== @@ -18672,7 +19011,12 @@ uuid@8.3.2, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.0.1, uuid@^3.3.2: +uuid@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" + integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== + +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -18692,11 +19036,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-compile-cache@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -18705,20 +19044,18 @@ validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validat spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validate-npm-package-name@5.0.0, validate-npm-package-name@^5.0.0: +validate-npm-package-name@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz#a316573e9b49f3ccd90dbb6eb52b3f06c6d604e8" + integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== + +validate-npm-package-name@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== dependencies: builtins "^5.0.0" -validate-npm-package-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" - integrity sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw== - dependencies: - builtins "^1.0.3" - validator@^13.6.0: version "13.9.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" @@ -18763,28 +19100,18 @@ vm-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - -vue-eslint-parser@^8.0.1: - version "8.3.0" - resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz#5d31129a1b3dd89c0069ca0a1c88f970c360bd0d" - integrity sha512-dzHGG3+sYwSf6zFBa0Gi9ZDshD7+ad14DGOdTLjruRVgZXe2J+DcZ9iUhyR48z5g1PqRa20yt3Njna/veLJL/g== +vue-eslint-parser@^9.1.0: + version "9.4.3" + resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz#9b04b22c71401f1e8bca9be7c3e3416a4bde76a8" + integrity sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg== dependencies: - debug "^4.3.2" - eslint-scope "^7.0.0" - eslint-visitor-keys "^3.1.0" - espree "^9.0.0" + debug "^4.3.4" + eslint-scope "^7.1.1" + eslint-visitor-keys "^3.3.0" + espree "^9.3.1" esquery "^1.4.0" lodash "^4.17.21" - semver "^7.3.5" + semver "^7.3.6" vuvuzela@1.0.3: version "1.0.3" @@ -18796,10 +19123,15 @@ wabt@1.0.24: resolved "https://registry.yarnpkg.com/wabt/-/wabt-1.0.24.tgz#c02e0b5b4503b94feaf4a30a426ef01c1bea7c6c" integrity sha512-8l7sIOd3i5GWfTWciPL0+ff/FK/deVK2Q6FN+MPz4vfUcD78i2M/49XJTwF6aml91uIiuXJEsLKWMB2cw/mtKg== -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== +walk-up-path@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-3.0.1.tgz#c8d78d5375b4966c717eb17ada73dbd41490e886" + integrity sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA== + +watchpack@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" + integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -18834,10 +19166,10 @@ web3-bzz@1.10.1: got "12.1.0" swarm-js "^0.1.40" -web3-bzz@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.10.2.tgz#482dfddcc5f65d5877b37cc20775725220b4ad87" - integrity sha512-vLOfDCj6198Qc7esDrCKeFA/M3ZLbowsaHQ0hIL4NmIHoq7lU8aSRTa5AI+JBh8cKN1gVryJsuW2ZCc5bM4I4Q== +web3-bzz@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.10.4.tgz#dcc787970767d9004c73d11d0eeef774ce16b880" + integrity sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw== dependencies: "@types/node" "^12.12.6" got "12.1.0" @@ -18868,13 +19200,13 @@ web3-core-helpers@1.10.1: web3-eth-iban "1.10.1" web3-utils "1.10.1" -web3-core-helpers@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.10.2.tgz#bd47686c0e74ef4475713c581f9306a035ce8a74" - integrity sha512-1JfaNtox6/ZYJHNoI+QVc2ObgwEPeGF+YdxHZQ7aF5605BmlwM1Bk3A8xv6mg64jIRvEq1xX6k9oG6x7p1WgXQ== +web3-core-helpers@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz#bd2b4140df2016d5dd3bb2b925fc29ad8678677c" + integrity sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g== dependencies: - web3-eth-iban "1.10.2" - web3-utils "1.10.2" + web3-eth-iban "1.10.4" + web3-utils "1.10.4" web3-core-helpers@1.8.2: version "1.8.2" @@ -18906,16 +19238,16 @@ web3-core-method@1.10.1: web3-core-subscriptions "1.10.1" web3-utils "1.10.1" -web3-core-method@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.10.2.tgz#4adf3f8c8d0776f0f320e583b791955c41037971" - integrity sha512-gG6ES+LOuo01MJHML4gnEt702M8lcPGMYZoX8UjZzmEebGrPYOY9XccpCrsFgCeKgQzM12SVnlwwpMod1+lcLg== +web3-core-method@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.10.4.tgz#566b52f006d3cbb13b21b72b8d2108999bf5d6bf" + integrity sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA== dependencies: "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.10.2" - web3-core-promievent "1.10.2" - web3-core-subscriptions "1.10.2" - web3-utils "1.10.2" + web3-core-helpers "1.10.4" + web3-core-promievent "1.10.4" + web3-core-subscriptions "1.10.4" + web3-utils "1.10.4" web3-core-method@1.8.2: version "1.8.2" @@ -18942,10 +19274,10 @@ web3-core-promievent@1.10.1: dependencies: eventemitter3 "4.0.4" -web3-core-promievent@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.10.2.tgz#13b380b69ee05c5bf075836be64c2f3b8bdc1a5f" - integrity sha512-Qkkb1dCDOU8dZeORkcwJBQRAX+mdsjx8LqFBB+P4W9QgwMqyJ6LXda+y1XgyeEVeKEmY1RCeTq9Y94q1v62Sfw== +web3-core-promievent@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz#629b970b7934430b03c5033c79f3bb3893027e22" + integrity sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ== dependencies: eventemitter3 "4.0.4" @@ -18978,16 +19310,16 @@ web3-core-requestmanager@1.10.1: web3-providers-ipc "1.10.1" web3-providers-ws "1.10.1" -web3-core-requestmanager@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.10.2.tgz#f5b1264c6470c033f08e21210b0af0c23497c68a" - integrity sha512-nlLeNJUu6fR+ZbJr2k9Du/nN3VWwB4AJPY4r6nxUODAmykgJq57T21cLP/BEk6mbiFQYGE9TrrPhh4qWxQEtAw== +web3-core-requestmanager@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz#eb1f147e6b9df84e3a37e602162f8925bdb4bb9a" + integrity sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg== dependencies: util "^0.12.5" - web3-core-helpers "1.10.2" - web3-providers-http "1.10.2" - web3-providers-ipc "1.10.2" - web3-providers-ws "1.10.2" + web3-core-helpers "1.10.4" + web3-providers-http "1.10.4" + web3-providers-ipc "1.10.4" + web3-providers-ws "1.10.4" web3-core-requestmanager@1.8.2: version "1.8.2" @@ -19016,13 +19348,13 @@ web3-core-subscriptions@1.10.1: eventemitter3 "4.0.4" web3-core-helpers "1.10.1" -web3-core-subscriptions@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.10.2.tgz#d325483141ab1406241d6707b86fd6944e4b7ea6" - integrity sha512-MiWcKjz4tco793EPPPLc/YOJmYUV3zAfxeQH/UVTfBejMfnNvmfwKa2SBKfPIvKQHz/xI5bV2TF15uvJEucU7w== +web3-core-subscriptions@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz#2f4dcb404237e92802a563265d11a33934dc38e6" + integrity sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.10.2" + web3-core-helpers "1.10.4" web3-core-subscriptions@1.8.2: version "1.8.2" @@ -19058,18 +19390,18 @@ web3-core@1.10.1, web3-core@^1.8.1: web3-core-requestmanager "1.10.1" web3-utils "1.10.1" -web3-core@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.10.2.tgz#464a15335b3adecc4a1cdd53c89b995769059f03" - integrity sha512-qTn2UmtE8tvwMRsC5pXVdHxrQ4uZ6jiLgF5DRUVtdi7dPUmX18Dp9uxKfIfhGcA011EAn8P6+X7r3pvi2YRxBw== +web3-core@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.10.4.tgz#639de68b8b9871d2dc8892e0dd4e380cb1361a98" + integrity sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww== dependencies: "@types/bn.js" "^5.1.1" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.10.2" - web3-core-method "1.10.2" - web3-core-requestmanager "1.10.2" - web3-utils "1.10.2" + web3-core-helpers "1.10.4" + web3-core-method "1.10.4" + web3-core-requestmanager "1.10.4" + web3-utils "1.10.4" web3-core@1.8.2: version "1.8.2" @@ -19100,13 +19432,13 @@ web3-eth-abi@1.10.1: "@ethersproject/abi" "^5.6.3" web3-utils "1.10.1" -web3-eth-abi@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.10.2.tgz#65db4af1acb0b72cb9d10cd6f045a8bcdb270b1b" - integrity sha512-pY4fQUio7W7ZRSLf+vsYkaxJqaT/jHcALZjIxy+uBQaYAJ3t6zpQqMZkJB3Dw7HUODRJ1yI0NPEFGTnkYf/17A== +web3-eth-abi@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz#16c19d0bde0aaf8c1a56cb7743a83156d148d798" + integrity sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ== dependencies: "@ethersproject/abi" "^5.6.3" - web3-utils "1.10.2" + web3-utils "1.10.4" web3-eth-abi@1.7.0: version "1.7.0" @@ -19156,21 +19488,21 @@ web3-eth-accounts@1.10.1: web3-core-method "1.10.1" web3-utils "1.10.1" -web3-eth-accounts@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.10.2.tgz#5ce9e4de0f84a88e72801810b98cc25164956404" - integrity sha512-6/HhCBYAXN/f553/SyxS9gY62NbLgpD1zJpENcvRTDpJN3Znvli1cmpl5Q3ZIUJkvHnG//48EWfWh0cbb3fbKQ== +web3-eth-accounts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz#df30e85a7cd70e475f8cf52361befba408829e34" + integrity sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg== dependencies: - "@ethereumjs/common" "2.5.0" - "@ethereumjs/tx" "3.3.2" + "@ethereumjs/common" "2.6.5" + "@ethereumjs/tx" "3.5.2" "@ethereumjs/util" "^8.1.0" eth-lib "0.2.8" scrypt-js "^3.0.1" uuid "^9.0.0" - web3-core "1.10.2" - web3-core-helpers "1.10.2" - web3-core-method "1.10.2" - web3-utils "1.10.2" + web3-core "1.10.4" + web3-core-helpers "1.10.4" + web3-core-method "1.10.4" + web3-utils "1.10.4" web3-eth-accounts@1.8.2: version "1.8.2" @@ -19216,19 +19548,19 @@ web3-eth-contract@1.10.1: web3-eth-abi "1.10.1" web3-utils "1.10.1" -web3-eth-contract@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.10.2.tgz#9114c52ba5ca5859f3403abea69a13f8678828ad" - integrity sha512-CZLKPQRmupP/+OZ5A/CBwWWkBiz5B/foOpARz0upMh1yjb0dEud4YzRW2gJaeNu0eGxDLsWVaXhUimJVGYprQw== +web3-eth-contract@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz#22d39f04e11d9ff4e726e8025a56d78e843a2c3d" + integrity sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A== dependencies: "@types/bn.js" "^5.1.1" - web3-core "1.10.2" - web3-core-helpers "1.10.2" - web3-core-method "1.10.2" - web3-core-promievent "1.10.2" - web3-core-subscriptions "1.10.2" - web3-eth-abi "1.10.2" - web3-utils "1.10.2" + web3-core "1.10.4" + web3-core-helpers "1.10.4" + web3-core-method "1.10.4" + web3-core-promievent "1.10.4" + web3-core-subscriptions "1.10.4" + web3-eth-abi "1.10.4" + web3-utils "1.10.4" web3-eth-contract@1.8.2: version "1.8.2" @@ -19272,19 +19604,19 @@ web3-eth-ens@1.10.1: web3-eth-contract "1.10.1" web3-utils "1.10.1" -web3-eth-ens@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.10.2.tgz#5708e1830ab261b139882cc43662afb3a733112e" - integrity sha512-kTQ42UdNHy4BQJHgWe97bHNMkc3zCMBKKY7t636XOMxdI/lkRdIjdE5nQzt97VjQvSVasgIWYKRAtd8aRaiZiQ== +web3-eth-ens@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz#3d991adac52bc8e598f1f1b8528337fa6291004c" + integrity sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" - web3-core "1.10.2" - web3-core-helpers "1.10.2" - web3-core-promievent "1.10.2" - web3-eth-abi "1.10.2" - web3-eth-contract "1.10.2" - web3-utils "1.10.2" + web3-core "1.10.4" + web3-core-helpers "1.10.4" + web3-core-promievent "1.10.4" + web3-eth-abi "1.10.4" + web3-eth-contract "1.10.4" + web3-utils "1.10.4" web3-eth-ens@1.8.2: version "1.8.2" @@ -19316,13 +19648,13 @@ web3-eth-iban@1.10.1: bn.js "^5.2.1" web3-utils "1.10.1" -web3-eth-iban@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.10.2.tgz#f8e668034834c5be038adeb14c39b923e9257558" - integrity sha512-y8+Ii2XXdyHQMFNL2NWpBnXe+TVJ4ryvPlzNhObRRnIo4O4nLIXS010olLDMayozDzoUlmzCmBZJYc9Eev1g7A== +web3-eth-iban@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz#bc61b4a1930d19b1df8762c606d669902558e54d" + integrity sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw== dependencies: bn.js "^5.2.1" - web3-utils "1.10.2" + web3-utils "1.10.4" web3-eth-iban@1.8.2: version "1.8.2" @@ -19356,17 +19688,17 @@ web3-eth-personal@1.10.1: web3-net "1.10.1" web3-utils "1.10.1" -web3-eth-personal@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.10.2.tgz#a281cc1cecb2f3243ac0467c075a1579fa562901" - integrity sha512-+vEbJsPUJc5J683y0c2aN645vXC+gPVlFVCQu4IjPvXzJrAtUfz26+IZ6AUOth4fDJPT0f1uSLS5W2yrUdw9BQ== +web3-eth-personal@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz#e2ee920f47e84848288e03442659cdbb2c4deea2" + integrity sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w== dependencies: "@types/node" "^12.12.6" - web3-core "1.10.2" - web3-core-helpers "1.10.2" - web3-core-method "1.10.2" - web3-net "1.10.2" - web3-utils "1.10.2" + web3-core "1.10.4" + web3-core-helpers "1.10.4" + web3-core-method "1.10.4" + web3-net "1.10.4" + web3-utils "1.10.4" web3-eth-personal@1.8.2: version "1.8.2" @@ -19416,23 +19748,23 @@ web3-eth@1.10.1: web3-net "1.10.1" web3-utils "1.10.1" -web3-eth@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.10.2.tgz#46baa0d8a1203b425f77ac2cf823fbb73666fcb9" - integrity sha512-s38rhrntyhGShmXC4R/aQtfkpcmev9c7iZwgb9CDIBFo7K8nrEJvqIOyajeZTxnDIiGzTJmrHxiKSadii5qTRg== - dependencies: - web3-core "1.10.2" - web3-core-helpers "1.10.2" - web3-core-method "1.10.2" - web3-core-subscriptions "1.10.2" - web3-eth-abi "1.10.2" - web3-eth-accounts "1.10.2" - web3-eth-contract "1.10.2" - web3-eth-ens "1.10.2" - web3-eth-iban "1.10.2" - web3-eth-personal "1.10.2" - web3-net "1.10.2" - web3-utils "1.10.2" +web3-eth@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.10.4.tgz#3a908c635cb5d935bd30473e452f3bd7f2ee66a5" + integrity sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA== + dependencies: + web3-core "1.10.4" + web3-core-helpers "1.10.4" + web3-core-method "1.10.4" + web3-core-subscriptions "1.10.4" + web3-eth-abi "1.10.4" + web3-eth-accounts "1.10.4" + web3-eth-contract "1.10.4" + web3-eth-ens "1.10.4" + web3-eth-iban "1.10.4" + web3-eth-personal "1.10.4" + web3-net "1.10.4" + web3-utils "1.10.4" web3-eth@1.8.2: version "1.8.2" @@ -19470,14 +19802,14 @@ web3-net@1.10.1: web3-core-method "1.10.1" web3-utils "1.10.1" -web3-net@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.10.2.tgz#77f39dea930619035d3bf99969941870f2f0c550" - integrity sha512-w9i1t2z7dItagfskhaCKwpp6W3ylUR88gs68u820y5f8yfK5EbPmHc6c2lD8X9ZrTnmDoeOpIRCN/RFPtZCp+g== +web3-net@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.10.4.tgz#20e12c60e4477d4298979d8d5d66b9abf8e66a09" + integrity sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow== dependencies: - web3-core "1.10.2" - web3-core-method "1.10.2" - web3-utils "1.10.2" + web3-core "1.10.4" + web3-core-method "1.10.4" + web3-utils "1.10.4" web3-net@1.8.2: version "1.8.2" @@ -19536,15 +19868,15 @@ web3-providers-http@1.10.1: es6-promise "^4.2.8" web3-core-helpers "1.10.1" -web3-providers-http@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.10.2.tgz#8bd54b5bc5bcc50612fd52af65bd773f926045f7" - integrity sha512-G8abKtpkyKGpRVKvfjIF3I4O/epHP7mxXWN8mNMQLkQj1cjMFiZBZ13f+qI77lNJN7QOf6+LtNdKrhsTGU72TA== +web3-providers-http@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.10.4.tgz#ca7aa58aeaf8123500c24ffe0595896319f830e8" + integrity sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ== dependencies: abortcontroller-polyfill "^1.7.5" cross-fetch "^4.0.0" es6-promise "^4.2.8" - web3-core-helpers "1.10.2" + web3-core-helpers "1.10.4" web3-providers-http@1.8.2: version "1.8.2" @@ -19572,13 +19904,13 @@ web3-providers-ipc@1.10.1: oboe "2.1.5" web3-core-helpers "1.10.1" -web3-providers-ipc@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.10.2.tgz#4314a04c1d68f5d1cb2d047d027db97c85f921f7" - integrity sha512-lWbn6c+SgvhLymU8u4Ea/WOVC0Gqs7OJUvauejWz+iLycxeF0xFNyXnHVAi42ZJDPVI3vnfZotafoxcNNL7Sug== +web3-providers-ipc@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz#2e03437909e4e7771d646ff05518efae44b783c3" + integrity sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw== dependencies: oboe "2.1.5" - web3-core-helpers "1.10.2" + web3-core-helpers "1.10.4" web3-providers-ipc@1.8.2: version "1.8.2" @@ -19606,13 +19938,13 @@ web3-providers-ws@1.10.1: web3-core-helpers "1.10.1" websocket "^1.0.32" -web3-providers-ws@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.10.2.tgz#00bf6e00080dd82b8ad7fbed657a6d20ecc532de" - integrity sha512-3nYSiP6grI5GvpkSoehctSywfCTodU21VY8bUtXyFHK/IVfDooNtMpd5lVIMvXVAlaxwwrCfjebokaJtKH2Iag== +web3-providers-ws@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz#55d0c3ba36c6a79d105f02e20a707eb3978e7f82" + integrity sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.10.2" + web3-core-helpers "1.10.4" websocket "^1.0.32" web3-providers-ws@1.8.2: @@ -19644,15 +19976,15 @@ web3-shh@1.10.1: web3-core-subscriptions "1.10.1" web3-net "1.10.1" -web3-shh@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.10.2.tgz#2a41e1a308de5320d1f17080765206b727aa669e" - integrity sha512-UP0Kc3pHv9uULFu0+LOVfPwKBSJ6B+sJ5KflF7NyBk6TvNRxlpF3hUhuaVDCjjB/dDUR6T0EQeg25FA2uzJbag== +web3-shh@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.10.4.tgz#9852d6f3d05678e31e49235a60fea10ca7a9e21d" + integrity sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw== dependencies: - web3-core "1.10.2" - web3-core-method "1.10.2" - web3-core-subscriptions "1.10.2" - web3-net "1.10.2" + web3-core "1.10.4" + web3-core-method "1.10.4" + web3-core-subscriptions "1.10.4" + web3-net "1.10.4" web3-shh@1.8.2: version "1.8.2" @@ -19691,10 +20023,10 @@ web3-utils@1.10.1, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.5, web3-utils@^1.3 randombytes "^2.1.0" utf8 "3.0.0" -web3-utils@1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.2.tgz#361103d28a94d5e2a87ba15d776a62c33303eb44" - integrity sha512-TdApdzdse5YR+5GCX/b/vQnhhbj1KSAtfrDtRW7YS0kcWp1gkJsN62gw6GzCaNTeXookB7UrLtmDUuMv65qgow== +web3-utils@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.4.tgz#0daee7d6841641655d8b3726baf33b08eda1cbec" + integrity sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A== dependencies: "@ethereumjs/util" "^8.1.0" bn.js "^5.2.1" @@ -19770,18 +20102,18 @@ web3@^1.0.0-beta.34, web3@^1.2.5, web3@^1.8.1: web3-shh "1.10.1" web3-utils "1.10.1" -web3@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.10.2.tgz#5b7e165b396fb0bea501cef4d5ce754aebad5b73" - integrity sha512-DAtZ3a3ruPziE80uZ3Ob0YDZxt6Vk2un/F5BcBrxO70owJ9Z1Y2+loZmbh1MoAmoLGjA/SUSHeUtid3fYmBaog== +web3@^1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.10.4.tgz#5d5e59b976eaf758b060fe1a296da5fe87bdc79c" + integrity sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA== dependencies: - web3-bzz "1.10.2" - web3-core "1.10.2" - web3-eth "1.10.2" - web3-eth-personal "1.10.2" - web3-net "1.10.2" - web3-shh "1.10.2" - web3-utils "1.10.2" + web3-bzz "1.10.4" + web3-core "1.10.4" + web3-eth "1.10.4" + web3-eth-personal "1.10.4" + web3-net "1.10.4" + web3-shh "1.10.4" + web3-utils "1.10.4" webcrypto-core@^1.7.7: version "1.7.7" @@ -19799,45 +20131,41 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -webpack-bundle-analyzer@^4.9.1: - version "4.9.1" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.9.1.tgz#d00bbf3f17500c10985084f22f1a2bf45cb2f09d" - integrity sha512-jnd6EoYrf9yMxCyYDPj8eutJvtjQNp8PHmni/e/ulydHBWhT5J3menXt3HEkScsu9YqMAcG4CfFjs3rj5pVU1w== +webpack-bundle-analyzer@^4.10.2: + version "4.10.2" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd" + integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw== dependencies: "@discoveryjs/json-ext" "0.5.7" acorn "^8.0.4" acorn-walk "^8.0.0" commander "^7.2.0" + debounce "^1.2.1" escape-string-regexp "^4.0.0" gzip-size "^6.0.0" - is-plain-object "^5.0.0" - lodash.debounce "^4.0.8" - lodash.escape "^4.0.1" - lodash.flatten "^4.4.0" - lodash.invokemap "^4.6.0" - lodash.pullall "^4.2.0" - lodash.uniqby "^4.7.0" + html-escaper "^2.0.2" opener "^1.5.2" picocolors "^1.0.0" sirv "^2.0.3" ws "^7.3.1" -webpack-cli@^4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" - integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== +webpack-cli@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.2.0" - "@webpack-cli/info" "^1.5.0" - "@webpack-cli/serve" "^1.7.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" colorette "^2.0.14" - commander "^7.0.0" + commander "^10.0.1" cross-spawn "^7.0.3" + envinfo "^7.7.3" fastest-levenshtein "^1.0.12" import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" + interpret "^3.1.1" + rechoir "^0.8.0" webpack-merge "^5.7.3" webpack-merge@^5.7.3: @@ -19853,34 +20181,33 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.88.2: - version "5.88.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.88.2.tgz#f62b4b842f1c6ff580f3fcb2ed4f0b579f4c210e" - integrity sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ== +webpack@^5.94.0: + version "5.94.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" + integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.0" - "@webassemblyjs/ast" "^1.11.5" - "@webassemblyjs/wasm-edit" "^1.11.5" - "@webassemblyjs/wasm-parser" "^1.11.5" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" acorn "^8.7.1" - acorn-import-assertions "^1.9.0" - browserslist "^4.14.5" + acorn-import-attributes "^1.9.5" + browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.15.0" + enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" + graceful-fs "^4.2.11" json-parse-even-better-errors "^2.3.1" loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" schema-utils "^3.2.0" tapable "^2.1.1" - terser-webpack-plugin "^5.3.7" - watchpack "^2.4.0" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" webpack-sources "^3.2.3" websocket@^1.0.32: @@ -19895,11 +20222,6 @@ websocket@^1.0.32: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-fetch@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - whatwg-mimetype@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" @@ -19957,7 +20279,7 @@ which-typed-array@^1.1.2, which-typed-array@^1.1.9: has-tostringtag "^1.0.0" is-typed-array "^1.1.10" -which@2.0.2, which@^2.0.1, which@^2.0.2: +which@2.0.2, which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -19971,14 +20293,14 @@ which@^1.1.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -which@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/which/-/which-3.0.1.tgz#89f1cd0c23f629a8105ffe69b8172791c87b4be1" - integrity sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg== +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== dependencies: - isexe "^2.0.0" + isexe "^3.1.1" -wide-align@^1.1.5: +wide-align@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -20025,7 +20347,12 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20051,6 +20378,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -20065,7 +20401,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@5.0.1: +write-file-atomic@5.0.1, write-file-atomic@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== @@ -20226,11 +20562,6 @@ yaeti@^0.0.6: resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -20241,6 +20572,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yallist@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-5.0.0.tgz#00e2de443639ed0d78fd87de0d27469fbcffb533" + integrity sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw== + yaml-ast-parser@^0.0.43: version "0.0.43" resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb" @@ -20256,6 +20592,11 @@ yaml@^2.3.1: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== +yaml@^2.4.5: + version "2.5.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.5.0.tgz#c6165a721cf8000e91c36490a41d7be25176cf5d" + integrity sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw== + yargs-parser@20.2.4: version "20.2.4" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" @@ -20282,12 +20623,12 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" -yargs-parser@^20.2.2, yargs-parser@^20.2.3: +yargs-parser@^20.2.2, yargs-parser@^20.2.3, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: +yargs-unparser@2.0.0, yargs-unparser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== @@ -20310,6 +20651,19 @@ yargs@16.2.0, yargs@^16.1.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@17.7.2, yargs@^17.6.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yargs@^15.0.2, yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -20340,19 +20694,6 @@ yargs@^17.0.0, yargs@^17.2.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yargs@^17.6.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yargs@^4.7.1: version "4.8.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" @@ -20373,14 +20714,6 @@ yargs@^4.7.1: y18n "^3.2.1" yargs-parser "^2.4.1" -yauzl@^2.4.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" @@ -20391,7 +20724,19 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +zksync-ethers@^5.0.0: + version "5.9.2" + resolved "https://registry.yarnpkg.com/zksync-ethers/-/zksync-ethers-5.9.2.tgz#1c5f34cb25ac0b040fd1a6118f2ba1c2c3bda090" + integrity sha512-Y2Mx6ovvxO6UdC2dePLguVzvNToOY8iLWeq5ne+jgGSJxAi/f4He/NF6FNsf6x1aWX0o8dy4Df8RcOQXAkj5qw== + dependencies: + ethers "~5.7.0" + zksync-web3@^0.14.3: version "0.14.3" resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== + +zod@^3.23.8: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==