Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hard-coded spree network from entrypoint.sh #60

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: nevermined-io/nvm-tools-actions@v0.6.1
- uses: nevermined-io/nvm-tools-actions@v0.9.0
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
node-version: "develop"
Expand All @@ -26,7 +26,7 @@ jobs:
run: |
docker-compose up -d
./scripts/wait_for_graph.sh

- name: copy-artifacts
run: ./scripts/wait-nevermined.sh

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -

RUN apt-get install -y nodejs

RUN npm install -g @nevermined-io/graph-cli
#RUN npm install -g @nevermined-io/graph-cli
RUN npm install --global yarn

WORKDIR /subgraphs
COPY . /subgraphs
RUN yarn

ENTRYPOINT [ "./scripts/entrypoint.sh" ]
ENTRYPOINT [ "./scripts/entrypoint.sh" ]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@apollo/client": "^3.4.16",
"@graphprotocol/graph-ts": "0.24.1",
"@nevermined-io/contracts": "2.0.0-rc2",
"@nevermined-io/graph-cli": "0.30.4",
"@nevermined-io/graph-cli": "0.30.1",
"@nevermined-io/nevermined-sdk-js": "1.0.0-rc18",
"@truffle/hdwallet-provider": "^1.5.1",
"@types/big.js": "^6.1.3",
Expand Down
8 changes: 4 additions & 4 deletions scripts/download-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if [ -z "$TAG" ]; then
TAG="common"
fi

REPO_URL=http://artifacts.nevermined.rocks
REPO_URL=https://artifacts.nevermined.network
declare -A NETWORKS_MAP
NETWORKS_MAP=( ["mainnet"]="1" ["rinkeby"]="4" ["kovan"]="42" ["matic"]="137" ["mumbai"]="80001" ["celo-alfajores"]="44787" ["celo"]="42220" ["aurora"]="1313161554" ["aurora-testnet"]="1313161555" ["goerli"]="5" ["arbitrum-goerli"]="421613")
NETWORKS_MAP=( ["mainnet"]="1" ["rinkeby"]="4" ["kovan"]="42" ["matic"]="137" ["mumbai"]="80001" ["celo-alfajores"]="44787" ["celo"]="42220" ["aurora"]="1313161554" ["aurora-testnet"]="1313161555" ["goerli"]="5" ["arbitrum-goerli"]="421613" ["hyperspace"]="3141")

SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
UNPACK_DIR="$SCRIPT_DIR/../node_modules/@nevermined-io/contracts/artifacts"
Expand All @@ -38,9 +38,9 @@ function get_network_id_from_name {
}

NETWORK_ID=$(get_network_id_from_name)
DOWNLOAD_URL=$REPO_URL/$NETWORK_ID/$TAG/contracts_$VERSION.tar.gz
DOWNLOAD_URL=$REPO_URL/$NETWORK_ID/$TAG/contracts_v$VERSION.tar.gz
curl -s -L -o /tmp/nvm_temp_artifacts.tar.gz $DOWNLOAD_URL
tar xzf /tmp/nvm_temp_artifacts.tar.gz --directory $UNPACK_DIR
tar xf /tmp/nvm_temp_artifacts.tar.gz --directory $UNPACK_DIR
rm -f /tmp/nvm_temp_artifacts.tar.gz
exit 0

2 changes: 1 addition & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ VERSION=$(echo ${VERSION%%.*} | tr -d '"')
yarn nevermined:update-addresses $KEEPER_NETWORK_NAME
OVERRIDE_SUBGRAPH_STARTING_BLOCK=10 yarn nevermined:update-startblock $KEEPER_NETWORK_NAME
# we always use spree in the subgraph manifest for local development networks
yarn nevermined:update-network spree
yarn nevermined:update-network $KEEPER_NETWORK_NAME $VERSION
yarn nevermined:create development $KEEPER_NETWORK_NAME $VERSION
yarn nevermined:deploy development $KEEPER_NETWORK_NAME $VERSION

Expand Down
4 changes: 2 additions & 2 deletions scripts/update-addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function processFiles(err: { message: any }, files: any[], network: string
abi,
indexEvents,
contract,
network: 'spree',
network,
contractName,
subgraphName,
})
Expand All @@ -61,4 +61,4 @@ async function main() {

await main()

})()
})()
7 changes: 3 additions & 4 deletions subgraphs/AaveBorrowCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AaveBorrowCondition
network: spree
network: hyperspace
source:
address: "0x494a286382BD0Cd2aF8676D41c125Be325dD72B3"
address: "0x5e5dDDEB5ebDF9014571Ba160219886980889555"
abi: AaveBorrowCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AaveCollateralDepositCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AaveCollateralDepositCondition
network: spree
network: hyperspace
source:
address: "0x2af77391A0602eF29ded7E151b73559604bE0d17"
address: "0xF03b3E858E803336CBE8809a22A5A905c004D913"
abi: AaveCollateralDepositCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AaveCollateralWithdrawCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AaveCollateralWithdrawCondition
network: spree
network: hyperspace
source:
address: "0xA687f430DC56473C0405100933e9790BC4c9DA96"
address: "0x95F67B720ab9b260f119F0cfcdA9f146B2b28fD6"
abi: AaveCollateralWithdrawCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AaveCreditTemplate/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AaveCreditTemplate
network: spree
network: hyperspace
source:
address: "0xCb2C20A0f8e8147389E97466306aC5C66B9feF74"
address: "0xd37298B4643456326b0cbBF9ACD2536a9DC51050"
abi: AaveCreditTemplate
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AaveCreditVault/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AaveCreditVault
network: spree
network: hyperspace
source:
address: "0x2AbcD100Fee59D635EF7CF80b79f27FD36ed3B03"
address: "0x2C4D1c61Fa68B03F6022fC8aEfbf4d78d1D658Cb"
abi: AaveCreditVault
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AaveRepayCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AaveRepayCondition
network: spree
network: hyperspace
source:
address: "0x4E88D395707fd9E127d7d936925fD74ca56A67CD"
address: "0xEC99e6d687437821F4b55D01F1f9B284df896685"
abi: AaveRepayCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AccessCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AccessCondition
network: spree
network: hyperspace
source:
address: "0xF97c4991B8a8A0360A66Adbef26cc11Eea029C37"
address: "0x66cE0Ab45e2033124a4057278105CE18E0F11AA0"
abi: AccessCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AccessProofCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AccessProofCondition
network: spree
network: hyperspace
source:
address: "0x32c79B039E4BC4Ad9272CA7D2A3DE5183D06Cd6B"
address: "0x24f38BF13D7e9eAA47f6a2d02ea25d3e93435264"
abi: AccessProofCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AccessProofTemplate/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AccessProofTemplate
network: spree
network: hyperspace
source:
address: "0x37cB53b6e0224b03D2cD11b68ea5Df6141D95a1e"
address: "0x8541584D70A240dC063c93f9cE87ca67887feD53"
abi: AccessProofTemplate
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AccessTemplate/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AccessTemplate
network: spree
network: hyperspace
source:
address: "0xb761bE571673A8f93DADe4D9D64618e3Eb989477"
address: "0x9F39b5Ad6910aDbbF8E662E525878DbB35672ACf"
abi: AccessTemplate
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/AgreementStoreManager/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: AgreementStoreManager
network: spree
network: hyperspace
source:
address: "0x9EacB2a88f1d487c63C1862d5a379E6Ad8a5550c"
address: "0x5cf691D71f98b2dc28b0a4c183B16083B58FA3Df"
abi: AgreementStoreManager
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/ComputeExecutionCondition/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: ComputeExecutionCondition
network: spree
network: hyperspace
source:
address: "0x1f732F59d6b08b6367D1Ca7b468b64d5A0956970"
address: "0x19a3c36e4802344a7Bf72ec8d193419390733635"
abi: ComputeExecutionCondition
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/ConditionStoreManager/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: ConditionStoreManager
network: spree
network: hyperspace
source:
address: "0x9eD1050E0054C38Ad431109D04f0c4Be8424Bf7b"
address: "0xC3A31A4C6E206a807f1DdBdaD22fF0bF3f3c7eb0"
abi: ConditionStoreManager
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/DIDRegistry/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: DIDRegistry
network: spree
network: hyperspace
source:
address: "0x56C010A3B179A4Ec1c03e975F72a104bC1dE3dc5"
address: "0x7dc496Bb472126cD65149c4b0fF53e55E5e515d7"
abi: DIDRegistry
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
7 changes: 3 additions & 4 deletions subgraphs/DIDSalesTemplate/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
specVersion: 0.0.2
specVersion: 0.0.1
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: DIDSalesTemplate
network: spree
network: hyperspace
source:
address: "0x19d34AB38F83C96677564dF1f2cA695e6C7099ba"
address: "0x2EE10613F39265D1509206ef1a2e46AC28f378f1"
abi: DIDSalesTemplate
startBlock: 10
mapping:
kind: ethereum/events
apiVersion: 0.0.5
Expand Down
Loading