Skip to content

Commit

Permalink
[SUBGRAPH] 1.7.1 release (#1932)
Browse files Browse the repository at this point in the history
* added support for vendor airstack, version bump to 1.7.1

* added cabal.project.freeze

* disable BUILD_SPEC_HASKELL

---------

Co-authored-by: Miao, ZhiCheng <[email protected]>
  • Loading branch information
d10r and hellwolf authored Apr 22, 2024
1 parent ac92923 commit 46bfa4a
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/call.deploy-subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
1 change: 1 addition & 0 deletions .github/workflows/handler.deploy-production-subgraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
56 changes: 56 additions & 0 deletions packages/spec-haskell/cabal.project.freeze
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions packages/subgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraph/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
26 changes: 24 additions & 2 deletions packages/subgraph/tasks/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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=""
Expand All @@ -34,7 +37,7 @@ DEPLOYMENT_ENV=""
VERSION_LABEL=""

print_usage_and_exit() {
echo "Usage: $0 -o graph|satsuma|superfluid|goldsky -n <network_name> -r <deployment_env> -v <version_label>"
echo "Usage: $0 -o graph|satsuma|superfluid|goldsky|airstack -n <network_name> -r <deployment_env> -v <version_label>"
exit 1
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -173,6 +192,9 @@ deploy_to() {
goldsky)
deploy_to_goldsky "$network"
;;
airstack)
deploy_to_airstack "$network"
;;
*)
print_usage_and_exit
;;
Expand Down
6 changes: 3 additions & 3 deletions tasks/check-changeset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 46bfa4a

Please sign in to comment.