Skip to content

Commit caf2006

Browse files
authored
Merge pull request #69 from nevermined-io/feat/update-deployment-method
Feat/update deployment method
2 parents 5107a09 + 0d20de3 commit caf2006

File tree

67 files changed

+321
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+321
-198
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 16
16+
node-version: 20
1717
- uses: nevermined-io/nvm-tools-actions@v0.15.0
1818
with:
1919
token: ${{ secrets.API_TOKEN_GITHUB }}
20-
contracts-version: "v3.2.2"
20+
contracts-version: "v3.5.7"
2121

2222
- name: Install dependencies
2323
run: yarn

.github/workflows/release-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# Build process
2020
- uses: actions/setup-node@v3
2121
with:
22-
node-version: "14.x"
22+
node-version: "20.x"
2323

2424
- name: Set version to env
2525
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Deploying subgraphs to the hosted service](#deploying-subgraphs-to-the-hosted-service)
1414
- [Getting the cookie and account id](#getting-the-cookie-and-account-id)
1515
- [Custom Entities](#custom-entities)
16+
- [FulfilledCounter](#fulfilledcounter)
1617
- [Testing](#testing)
1718
- [References](#references)
1819
- [License](#license)
@@ -77,6 +78,9 @@ $ yarn graph:deploy-local development geth-localnet v3
7778
# you need to get the access token from https://thegraph.com/hosted-service/dashboard and authenticate
7879
$ yarn graph auth --product hosted-service <access_token>
7980

81+
// NEW WAY
82+
$ yarn graph auth --studio
83+
8084
# download the artifacts
8185
$ yarn artifacts:download v3.2.1 mumbai public
8286

@@ -89,6 +93,9 @@ $ yarn graph:create-hosted public mumbai v3 "explorerSession_v24=s%3A6zVr0-om...
8993

9094
# deploy the subgraphs
9195
$ yarn graph:deploy-hosted public mumbai v3
96+
97+
// NEW WAY
98+
$ yarn graph:deploy-studio public mumbai v3
9299
```
93100

94101
### Getting the cookie and account id

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"graph:update-network": "./scripts/update-network.sh",
1212
"graph:create-hosted": "./scripts/create-hosted.sh",
1313
"graph:deploy-hosted": "./scripts/deploy-hosted.sh",
14+
"graph:deploy-studio": "./scripts/deploy-studio.sh",
1415
"artifacts:download": "./scripts/download-artifacts.sh"
1516
},
1617
"license": "Apache-2.0",
@@ -24,7 +25,7 @@
2425
},
2526
"devDependencies": {
2627
"@apollo/client": "^3.4.16",
27-
"@graphprotocol/graph-cli": "^0.51.2",
28+
"@graphprotocol/graph-cli": "^0.78.0",
2829
"@nevermined-io/sdk": "1.5.4",
2930
"@types/chai": "^4.2.22",
3031
"@types/glob": "^7.2.0",

scripts/deploy-studio.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
# Usage: ./deploy-hosted.sh <tag> <network> <version>
3+
set -u
4+
shopt -s extglob
5+
6+
TAG=$1
7+
NETWORK=$2
8+
VERSION=$3
9+
10+
EXCLUDED_CONTRACTS="PlonkVerifier"
11+
12+
for artifact in ./artifacts/!($EXCLUDED_CONTRACTS).$NETWORK.json
13+
do
14+
# lower case name
15+
CONTRACT_NAME=$(jq .name < $artifact | tr -d '"')
16+
BASENAME=$(jq .name < $artifact | tr -d '"' | tr "[:upper:]" "[:lower:]")
17+
echo "Deploying $TAG$NETWORK$VERSION$BASENAME"
18+
(cd "subgraphs/$CONTRACT_NAME" && graph deploy --studio $TAG$NETWORK$VERSION$BASENAME -l v3.5.7)
19+
done

scripts/download-artifacts.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ NETWORKS_MAP=(
3232
["aurora-testnet"]="1313161555"
3333
["goerli"]="5"
3434
["arbitrum-goerli"]="421613"
35+
["arbitrum-sepolia"]="421614"
3536
["gnosis"]="100"
3637
["arbitrum-one"]="42161"
3738
["base"]="8453"

scripts/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ do
1414
nevermined-io/$name \
1515
subgraphs/$name \
1616
--protocol ethereum \
17-
--product hosted-service \
17+
--product subgraph-studio \
1818
--contract-name $name \
1919
--from-contract $address \
2020
--index-events \

scripts/update-network.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ declare -A SCAN_URLS=( \
1313
["matic"]=https://api.polygonscan.com/api \
1414
["gnosis"]=https://api.gnosisscan.io/api \
1515
["arbitrum-goerli"]=https://api-goerli.arbiscan.io/api \
16+
["arbitrum-sepolia"]=https://api-sepolia.arbiscan.io/api \
1617
["arbitrum-one"]=https://api.arbiscan.io/api \
1718
["celo"]=https://api.celoscan.io/api \
1819
["base"]=https://api.basescan.io/api \

subgraphs/AaveBorrowCondition/subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AaveBorrowCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x5B1eE0B69f0e2789A0758E220F1B2f95D9F3a710"
9+
address: null
1010
abi: AaveBorrowCondition
1111
startBlock: 0
1212
mapping:

subgraphs/AaveCollateralDepositCondition/subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AaveCollateralDepositCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xB773D7389AF806560782c998E780AFC663ED1a05"
9+
address: null
1010
abi: AaveCollateralDepositCondition
1111
startBlock: 0
1212
mapping:

subgraphs/AaveCollateralWithdrawCondition/subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AaveCollateralWithdrawCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xBC45829a257D7E41924bb3638257bFA52591A3Cb"
9+
address: null
1010
abi: AaveCollateralWithdrawCondition
1111
startBlock: 0
1212
mapping:

subgraphs/AaveCreditTemplate/subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AaveCreditTemplate
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x5535177d8159E447B1F0f07733e6FC5FeF0abb2F"
9+
address: null
1010
abi: AaveCreditTemplate
1111
startBlock: 0
1212
mapping:

subgraphs/AaveCreditVault/subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AaveCreditVault
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x0270E295834E412fAD12f1AEEc727af5c33B3A1C"
9+
address: null
1010
abi: AaveCreditVault
1111
startBlock: 0
1212
mapping:

subgraphs/AaveRepayCondition/subgraph.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AaveRepayCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x2805c4ed5704153649501ABFDA2C0F3Db1794848"
9+
address: null
1010
abi: AaveRepayCondition
1111
startBlock: 0
1212
mapping:

subgraphs/AccessCondition/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AccessCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xC5268112c8EB4977E659F996F7443D9717320706"
9+
address: "0xf4b6309e2604df2792FE9ee0ac269159d8029d4B"
1010
abi: AccessCondition
11-
startBlock: 0
11+
startBlock: 33993053
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/AccessDLEQCondition/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AccessDLEQCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xf49d333F51614CC2041aA1B757E98c96c5c4C902"
9+
address: "0x9D58B00544316C88B11fD1c68d4eAf5bF721b95c"
1010
abi: AccessDLEQCondition
11-
startBlock: 0
11+
startBlock: 33993038
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/AccessDLEQTemplate/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AccessDLEQTemplate
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xF02147853093CF7e643024F302a32836747C766E"
9+
address: "0x98dC2e02ebC7a74f86427013a8F7E0960c9f8873"
1010
abi: AccessDLEQTemplate
11-
startBlock: 0
11+
startBlock: 33993071
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/AccessProofCondition/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AccessProofCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x2a3C700C127811C81A785B101228613B3F9ceCE9"
9+
address: "0x705008887dbD26F9BDB495c4Ee7A0FbE59cD5927"
1010
abi: AccessProofCondition
11-
startBlock: 0
11+
startBlock: 33993035
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/AccessProofTemplate/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AccessProofTemplate
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xA8d8Dd738462eb5c3122Cc456D6330AE414678B1"
9+
address: "0x29b9d7edD01f47Ae774316c7c53CF7A6A36d9d76"
1010
abi: AccessProofTemplate
11-
startBlock: 0
11+
startBlock: 33993068
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/AccessTemplate/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AccessTemplate
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x9ABC3B45B8a1f95dc45Ca4076E1D5485F9CD27a7"
9+
address: "0x43De26bC358BE1E2529131d07f3937caE83727e8"
1010
abi: AccessTemplate
11-
startBlock: 0
11+
startBlock: 33993065
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/AgreementStoreManager/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: AgreementStoreManager
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x3c85B859E8B4B67197AfcFB8F3a0D2A735258D55"
9+
address: "0x4Cd9b03bEB7D68bC397B64521DF0A272bE94a4Df"
1010
abi: AgreementStoreManager
11-
startBlock: 0
11+
startBlock: 33993015
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/ComputeExecutionCondition/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: ComputeExecutionCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x30F5Ea1C8B89DD793C1b007B8FCb742C7f3C84a9"
9+
address: "0x79a0D99982A36d6a8EF0606C629eB59A210881A4"
1010
abi: ComputeExecutionCondition
11-
startBlock: 0
11+
startBlock: 33993055
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/ConditionStoreManager/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: ConditionStoreManager
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x8f6865Bdb68735004aC1789bA49d0FA2877Ad057"
9+
address: "0x5d6CFA8C2D9552ed94f82e75CC0c5520Ce63b900"
1010
abi: ConditionStoreManager
11-
startBlock: 0
11+
startBlock: 33992968
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/DIDRegistry/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: DIDRegistry
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x56C010A3B179A4Ec1c03e975F72a104bC1dE3dc5"
9+
address: "0xCB0A331cB1F57E01FF0FA2d664f2F100081cbc3b"
1010
abi: DIDRegistry
11-
startBlock: 0
11+
startBlock: 30662813
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/DIDSalesTemplate/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: DIDSalesTemplate
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x6CCfDC4D5B0A60a384Bbd047A841d62CDcD83961"
9+
address: "0x7BfCfafB89e92e15B3b2C6bad6Bf5A9e1FE2C7B8"
1010
abi: DIDSalesTemplate
11-
startBlock: 0
11+
startBlock: 33992771
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/Dispenser/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: Dispenser
7-
network: geth-localnet
7+
network: arbitrum-sepolia
88
source:
9-
address: "0x22A2E8b0C8F080E0f5043B9f2C2a38b3465B9D6d"
9+
address: "0xFd1002fA709E88d26D7eb02a7efa5829cC367d46"
1010
abi: Dispenser
11-
startBlock: 0
11+
startBlock: 6381387
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/DistributeNFTCollateralCondition/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: DistributeNFTCollateralCondition
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0x37cB53b6e0224b03D2cD11b68ea5Df6141D95a1e"
9+
address: "0x44bA311cE6afce967868150D2cF94cbB94Be3A8f"
1010
abi: DistributeNFTCollateralCondition
11-
startBlock: 0
11+
startBlock: 33993062
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

subgraphs/EscrowComputeExecutionTemplate/subgraph.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ schema:
44
dataSources:
55
- kind: ethereum
66
name: EscrowComputeExecutionTemplate
7-
network: geth-localnet
7+
network: gnosis
88
source:
9-
address: "0xF474fC9C472A6Df8D01bd06376c794B22C51ea93"
9+
address: "0x67ef0cb18de275FF83449B5F5abc5A2d2619182e"
1010
abi: EscrowComputeExecutionTemplate
11-
startBlock: 0
11+
startBlock: 33993110
1212
mapping:
1313
kind: ethereum/events
1414
apiVersion: 0.0.7

0 commit comments

Comments
 (0)