Skip to content

Commit

Permalink
Merge branch 'dev' into ethereum-contracts_1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
d10r authored Jul 15, 2024
2 parents cc6fcee + 72eab9f commit f698543
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 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, goldsky or airstack"
description: "Where to deploy subgraph to; superfluid, goldsky, graph or airstack"
type: string
deployment_env:
required: true
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/ci.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:

runs-on: ubuntu-latest

defaults:
run:
shell: nix develop . -c bash -xe {0}

outputs:
build_solidity_semantic_money: ${{ env.BUILD_SOLIDITY_SEMANTIC_MONEY }}
build_ethereum_contracts: ${{ env.BUILD_ETHEREUM_CONTRACTS }}
Expand All @@ -28,6 +32,18 @@ jobs:
build_automation_contracts: ${{ env.BUILD_AUTOMATION_CONTRACTS }}

steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v19
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Initialize devShell
run: |
node --version
shellcheck --version
actionlint --version
- name: Show contexts
env:
HEAD_REF: ${{ github.head_ref }}
Expand All @@ -40,7 +56,8 @@ jobs:
echo github.head_ref: "$HEAD_REF"
echo github.base_ref: ${{ github.base_ref }}
- uses: actions/checkout@v4
- name: Run pre-commit check
run: npm run pre-commit

- name: Check changeset
run: tasks/check-changeset.sh ${{ github.sha }} dev
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/handler.deploy-production-subgraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ on:
inputs:
vendor:
required: true
description: "Where to deploy subgraph to; one of `superfluid`, `goldsky` or `airstack`"
description: "Where to deploy subgraph to; one of `superfluid`, `goldsky`, `graph` or `airstack`"
default: "superfluid"
type: choice
options:
- superfluid
- goldsky
- graph
- airstack
deployment_env:
required: true
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<h1 align="center">Welcome to superfluid protocol-monorepo 👋</h1>
<div align="center">
<h1>Welcome to superfluid protocol-monorepo 👋</h1>

<p>
<a href="#superfluid-finance/ethereum-contracts" target="_blank">
Expand Down Expand Up @@ -27,6 +28,7 @@
<img src="https://www.codetriage.com/superfluid-finance/protocol-monorepo/badges/users.svg">
</a>
</p>
</div>

> Contracts and resources for the Superfluid Protocol
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
"npmClient": "yarn",
"license": "MIT",
"scripts": {
"postinstall": "yarn git-submodule:init && husky install",
"postinstall": "npm run git-submodule:init && husky install",
"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": "npm run 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",
"show-versions": "lerna ls --long",
"pre-commit": "yarn lint:shellcheck && yarn workspaces run pre-commit",
"pre-commit": "npm run lint:shellcheck && npm run lint:actionlint && yarn workspaces run pre-commit",
"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",
Expand Down
16 changes: 1 addition & 15 deletions packages/sdk-core/tasks/testSchemasAndQueries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,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"
)

GRAPH_NETWORK="${LEGACY_NETWORK_NAMES[$i]:-$i}"

if [ "$SUBGRAPH_RELEASE_TAG" == "v1" ]; then
# No need for the legacy name here
SUBGRAPH_ENDPOINT="https://$i.subgraph.x.superfluid.dev"
else
SUBGRAPH_ENDPOINT="https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-$SUBGRAPH_RELEASE_TAG-$GRAPH_NETWORK"
fi
SUBGRAPH_ENDPOINT="https://subgraph-endpoints.superfluid.dev/$i/protocol-v1"

testSchemaAndQueries

done
13 changes: 6 additions & 7 deletions packages/subgraph/tasks/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" "goldsky" "airstack" )
# list of supported networks by vendor

# shellcheck disable=SC2034,SC2207
GRAPH_NETWORKS=( $($JQ -r .[] ./hosted-service-networks.json) ) || exit 1
GRAPH_NETWORKS=( "polygon-mainnet" "eth-mainnet" )
# shellcheck disable=SC2034
SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet")
# shellcheck disable=SC2034
Expand Down Expand Up @@ -77,15 +77,14 @@ deploy_to_graph() {
)

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 \
--deploy-key "$THE_GRAPH_ACCESS_TOKEN"
--studio "$subgraphName" \
--deploy-key "$THE_GRAPH_ACCESS_TOKEN" \
--version-label "$VERSION_LABEL"
}

deploy_to_satsuma() {
Expand Down

0 comments on commit f698543

Please sign in to comment.