Skip to content
Merged
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
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
!/packages/subgraph/
/packages/subgraph/generated/
/packages/subgraph/build/
/packages/subgraph/subgraph.yaml
/packages/subgraph/.drone.yml
/packages/subgraph/.drone.yml
2 changes: 1 addition & 1 deletion packages/sdk/.drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ steps:
- test:unit

- name: subgraph-deploy
image: node:18.19
image: node:20.18
environment:
GRAPHNODE_URL: http://graphnode:8020
IPFS_URL: http://ipfs:5001
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { IExecModule } from 'iexec';
import type { IPoCo } from '../../../../generated/typechain/sharing/interfaces/IPoCo.js';

export async function getPocoContract(
iexec: IExecModule
): Promise<IPoCo> {
export async function getPocoContract(iexec: IExecModule): Promise<IPoCo> {
const client = await iexec.config.resolveContractsClient();
return client.getIExecContract() as unknown as IPoCo;
}
1 change: 1 addition & 0 deletions packages/sdk/tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ services:
condition: service_started
environment:
START_BLOCK: $BELLECOUR_FORK_BLOCK
NETWORK_NAME: bellecour
GRAPHNODE_URL: http://graphnode:8020
IPFS_URL: http://ipfs:5001
ENV: prod
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/tests/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const getTestConfig = (
: 'http://127.0.0.1:8080',
ipfsNode: process.env.DRONE ? 'http://ipfs:5001' : 'http://127.0.0.1:5001',
subgraphUrl: process.env.DRONE
? 'http://graphnode:8000/subgraphs/name/DataProtector-v2'
: 'http://127.0.0.1:8000/subgraphs/name/DataProtector-v2',
? 'http://graphnode:8000/subgraphs/name/bellecour/DataProtector-v2'
: 'http://127.0.0.1:8000/subgraphs/name/bellecour/DataProtector-v2',
};
return [ethProvider, options];
};
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraph/.drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trigger:

steps:
- name: build-subgraph
image: node:18.19
image: node:20.18
environment:
ENV: prod
commands:
Expand Down
3 changes: 3 additions & 0 deletions packages/subgraph/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ IPFS_URL=...

# The version label for the deployment (e.g., v1.0.0)
VERSION_LABEL=...

# Start block number for local testing
START_BLOCK=...
2 changes: 1 addition & 1 deletion packages/subgraph/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ coverage.json

# subgraph
generated
subgraph.yaml
tests/.latest.json
subgraph.yaml
1 change: 1 addition & 0 deletions packages/subgraph/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.18
8 changes: 8 additions & 0 deletions packages/subgraph/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ const envSchema = z.object({
IPFS_URL: z.string().url('IPFS_URL must be a valid URL').default('http://localhost:5001'),

VERSION_LABEL: z.string().min(1, 'VERSION_LABEL is required').default('bellecour/poco-v5'),

START_BLOCK: z
.string()
.transform((val) => parseInt(val, 10))
.refine((val) => !isNaN(val) && val >= 0, {
message: 'START_BLOCK must be a valid non-negative integer',
})
.or(z.undefined()),
});

export const env = envSchema.parse(process.env);
4 changes: 2 additions & 2 deletions packages/subgraph/deployer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.19
FROM node:20.18

RUN mkdir /app

Expand All @@ -8,4 +8,4 @@ WORKDIR /app/packages/subgraph

RUN npm ci

ENTRYPOINT [ "npm", "run", "all" ]
ENTRYPOINT [ "npm", "run", "all" ]
Loading