From 44ac32efb614ccfc9c99ffc29c33869f507a23ed Mon Sep 17 00:00:00 2001 From: didi Date: Mon, 22 Apr 2024 15:40:21 +0200 Subject: [PATCH 1/3] added support for vendor airstack, version bump to 1.7.1 --- .github/workflows/call.deploy-subgraph.yml | 6 ++++- .../handler.deploy-production-subgraphs.yml | 1 + packages/subgraph/CHANGELOG.md | 8 ++++++ packages/subgraph/package.json | 2 +- packages/subgraph/tasks/deploy.sh | 26 +++++++++++++++++-- 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/workflows/call.deploy-subgraph.yml b/.github/workflows/call.deploy-subgraph.yml index 3af1262ff6..289d3c4e86 100644 --- a/.github/workflows/call.deploy-subgraph.yml +++ b/.github/workflows/call.deploy-subgraph.yml @@ -5,7 +5,7 @@ on: inputs: vendor: required: true - description: "Where to deploy subgraph to; superfluid, graph, satsuma, or goldsky" + description: "Where to deploy subgraph to; superfluid, graph, satsuma, goldsky or airstack" type: string deployment_env: required: true @@ -29,6 +29,9 @@ on: 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" required: false @@ -130,3 +133,4 @@ jobs: 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 }} diff --git a/.github/workflows/handler.deploy-production-subgraphs.yml b/.github/workflows/handler.deploy-production-subgraphs.yml index 85a5cc5c63..21d53f33a3 100644 --- a/.github/workflows/handler.deploy-production-subgraphs.yml +++ b/.github/workflows/handler.deploy-production-subgraphs.yml @@ -53,3 +53,4 @@ jobs: 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/packages/subgraph/CHANGELOG.md b/packages/subgraph/CHANGELOG.md index 534e9bab3d..38d023a6b5 100644 --- a/packages/subgraph/CHANGELOG.md +++ b/packages/subgraph/CHANGELOG.md @@ -6,6 +6,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [1.7.1] - 2024-04-22 + +### Added +- Support for vendor "airstack" + +### Fixes +- Various GDA related fixes + ## [1.7.0] - 2024-02-05 ### Added diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 9420933cbd..368d4a238f 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@superfluid-finance/subgraph", - "version": "1.7.0", + "version": "1.7.1", "description": "Subgraph for the Superfluid Ethereum contracts.", "homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/subgraph", "repository": { diff --git a/packages/subgraph/tasks/deploy.sh b/packages/subgraph/tasks/deploy.sh index 5384380441..a1d4f3a79e 100755 --- a/packages/subgraph/tasks/deploy.sh +++ b/packages/subgraph/tasks/deploy.sh @@ -8,7 +8,7 @@ JQ="jq" 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" ) +SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" "goldsky" "airstack" ) # list of supported networks by vendor @@ -20,12 +20,15 @@ SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" SUPERFLUID_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet" "degenchain") # shellcheck disable=SC2034 GOLDSKY_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "base-mainnet" "optimism-mainnet" "arbitrum-one" "celo-mainnet" "bsc-mainnet" "avalanche-c" "optimism-sepolia" "scroll-sepolia" "scroll-mainnet") +# shellcheck disable=SC2034 +AIRSTACK_NETWORKS=( "degenchain") declare -A VENDOR_NETWORKS=( ["graph"]="${GRAPH_NETWORKS[@]}" ["satsuma"]="${SATSUMA_NETWORKS[@]}" ["superfluid"]="${SUPERFLUID_NETWORKS[@]}" ["goldsky"]="${GOLDSKY_NETWORKS[@]}" + ["airstack"]="${AIRSTACK_NETWORKS[@]}" ) VENDOR="" @@ -34,7 +37,7 @@ DEPLOYMENT_ENV="" VERSION_LABEL="" print_usage_and_exit() { - echo "Usage: $0 -o graph|satsuma|superfluid|goldsky -n -r -v " + echo "Usage: $0 -o graph|satsuma|superfluid|goldsky|airstack -n -r -v " exit 1 } @@ -136,6 +139,22 @@ deploy_to_goldsky() { --token "$GOLDSKY_API_KEY" } +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. **********" + $GRAPH_CLI create "$subgraphName" --node "$nodeUrl" --access-token "$AIRSTACK_API_KEY" + $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" +} + # Vendor specific function dispatcher # Expected arguments: # $1 - vendor @@ -173,6 +192,9 @@ deploy_to() { goldsky) deploy_to_goldsky "$network" ;; + airstack) + deploy_to_airstack "$network" + ;; *) print_usage_and_exit ;; From 7c5de44f9337c4dc5927bb327437ca014cf3951b Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Mon, 22 Apr 2024 18:49:42 +0300 Subject: [PATCH 2/3] added cabal.project.freeze --- packages/spec-haskell/cabal.project.freeze | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 packages/spec-haskell/cabal.project.freeze diff --git a/packages/spec-haskell/cabal.project.freeze b/packages/spec-haskell/cabal.project.freeze new file mode 100644 index 0000000000..62775073df --- /dev/null +++ b/packages/spec-haskell/cabal.project.freeze @@ -0,0 +1,56 @@ +active-repositories: hackage.haskell.org:merge +constraints: any.HUnit ==1.6.2.0, + any.QuickCheck ==2.14.3, + QuickCheck -old-random +templatehaskell, + any.ansi-terminal ==1.1, + ansi-terminal -example, + any.ansi-terminal-types ==1.1, + any.array ==0.5.6.0, + any.base ==4.19.1.0, + any.binary ==0.8.9.1, + any.bytestring ==0.12.1.0, + any.call-stack ==0.4.0, + any.colour ==2.3.6, + any.containers ==0.6.8, + 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.5.0.0, + any.directory ==1.3.8.3, + directory +os-string, + any.dlist ==1.0, + dlist -werror, + any.exceptions ==0.10.7, + any.filepath ==1.5.2.0, + filepath -cpphs, + any.ghc-bignum ==1.3, + any.ghc-boot-th ==9.8.2, + any.ghc-prim ==0.11.0, + any.haskell-lexer ==1.1.1, + any.hspec ==2.11.7, + any.hspec-core ==2.11.7, + any.hspec-discover ==2.11.7, + any.hspec-expectations ==0.8.4, + any.math-extras ==0.1.1.0, + any.microlens ==0.4.13.1, + any.mtl ==2.3.1, + any.old-locale ==1.0.0.7, + any.os-string ==2.0.2, + any.pretty ==1.1.3.6, + any.primitive ==0.9.0.0, + any.process ==1.6.18.0, + any.quickcheck-io ==0.2.0, + any.random ==1.2.1.2, + any.rts ==1.0.2, + any.splitmix ==0.1.0.5, + splitmix -optimised-mixer, + any.stm ==2.5.2.1, + any.template-haskell ==2.21.0.0, + any.tf-random ==0.5, + any.time ==1.12.2, + any.transformers ==0.6.1.0, + any.unix ==2.8.5.0, + unix +os-string +index-state: hackage.haskell.org 2024-03-25T10:39:21Z From d78aceb36587259440a4c55e697ea59cfb59261b Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Mon, 22 Apr 2024 18:59:19 +0300 Subject: [PATCH 3/3] disable BUILD_SPEC_HASKELL --- tasks/check-changeset.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/check-changeset.sh b/tasks/check-changeset.sh index 577e303c29..ab74cfc714 100755 --- a/tasks/check-changeset.sh +++ b/tasks/check-changeset.sh @@ -23,7 +23,7 @@ function setBuildAll() { BUILD_HOT_FUZZ=1 BUILD_SDK_CORE=1 BUILD_SDK_REDUX=1 - BUILD_SPEC_HASKELL=1 + #BUILD_SPEC_HASKELL=1 BUILD_SUBGRAPH=1 BUILD_AUTOMATION_CONTRACTS=1 BUILD_SOLIDITY_SEMANTIC_MONEY=1 @@ -86,8 +86,8 @@ if [ -n "$GITHUB_ENV" ];then 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. + # BUILD_SPEC_HASKELL=1 + echo SPEC-HASKELL will be tested, disabled for now. 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