Skip to content

Commit 352c8a1

Browse files
authored
Merge branch 'develop' into main
2 parents 3a4e0da + ff45105 commit 352c8a1

7 files changed

Lines changed: 909 additions & 639 deletions

File tree

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
### NETWORK
22
SQUID_NETWORK=
33
RPC_ENDPOINT=
4+
# Subsquid Network Gateway API key (get one at https://portal.sqd.dev)
5+
SQD_API_KEY=
46

57
### DATABASE
68
DB_HOST=

package-lock.json

Lines changed: 884 additions & 626 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
},
1616
"dependencies": {
1717
"@ethereum-attestation-service/eas-sdk": "^1.5.0",
18-
"@subsquid/evm-abi": "^0.3.1",
19-
"@subsquid/evm-processor": "^1.22.0",
20-
"@subsquid/graphql-server": "^4.9.0",
21-
"@subsquid/typeorm-migration": "^1.3.0",
22-
"@subsquid/typeorm-store": "^1.5.1",
23-
"@subsquid/util-internal": "^3.2.0",
18+
"@subsquid/evm-abi": "^1.0.0",
19+
"@subsquid/evm-processor": "^1.30.1",
20+
"@subsquid/graphql-server": "^4.12.0",
21+
"@subsquid/typeorm-migration": "^1.3.1",
22+
"@subsquid/typeorm-store": "^1.9.1",
23+
"@subsquid/util-internal": "^3.3.0",
2424
"dotenv": "^16.4.5",
2525
"ethers": "^6.12.1",
2626
"html-to-text": "^9.0.5",
@@ -34,8 +34,8 @@
3434
},
3535
"devDependencies": {
3636
"@dotenvx/dotenvx": "^0.35.1",
37-
"@subsquid/evm-typegen": "^3.3.0",
38-
"@subsquid/typeorm-codegen": "^1.3.3",
37+
"@subsquid/evm-typegen": "^5.0.0",
38+
"@subsquid/typeorm-codegen": "^2.2.0",
3939
"@types/html-to-text": "^9.0.4",
4040
"@types/jest": "^29.5.12",
4141
"@types/node": "^20.11.17",

src/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export const LOOKUP_ARCHIVE = IS_PRODUCTION
2929
? "https://v2.archive.subsquid.io/network/optimism-mainnet"
3030
: "https://v2.archive.subsquid.io/network/ethereum-sepolia";
3131

32+
// Subsquid Network Gateway API key (get one at https://portal.sqd.dev)
33+
export const SQD_API_KEY = process.env.SQD_API_KEY;
34+
3235
export const START_BLOCK = Number.parseInt(
3336
process.env.START_BLOCK || (IS_PRODUCTION ? "119837389" : "5815457")
3437
);

src/features/import-projects/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const task = async () => {
1414
await fetchRFProjectsByRound(4);
1515
// await fetchRFProjectsByRound(5); //TODO: It will fill on 20th Sep
1616
await fetchAndProcessRlProjects(5);
17-
await fetchAndProcessRlProjects(6);
17+
// await fetchAndProcessRlProjects(6); // link is not working
1818
await fetchAndProcessGardensProjects();
1919
};
2020

src/features/import-projects/retroList/helper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ export const manageProjectRemovals = async (
4444
(id) => !shouldKeepProjects.includes(id)
4545
);
4646

47-
console.log("projectIdsToManipulate", projectIdsToManipulate);
48-
4947
if (projectIdsToManipulate.length === 0) {
5048
// No projects to Manipulate
49+
console.log(
50+
`[${new Date().toISOString()}] - INFO: No projects to Manipulate - ${round} - retroList`
51+
);
5152
return;
5253
}
5354

src/processor.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import {
99
} from "@subsquid/evm-processor";
1010

1111
import * as EASContract from "./abi/EAS";
12-
import { EAS_CONTRACT_ADDRESS, LOOKUP_ARCHIVE, START_BLOCK } from "./constants";
12+
import {
13+
EAS_CONTRACT_ADDRESS,
14+
LOOKUP_ARCHIVE,
15+
SQD_API_KEY,
16+
START_BLOCK,
17+
} from "./constants";
1318
import { getEntityManagerByConnection } from "./controllers/utils/databaseHelper";
1419
import { Organisation } from "./model";
1520

@@ -49,7 +54,8 @@ export class Processor {
4954
Processor.instance = new EvmBatchProcessor()
5055
// Lookup archive by the network name in Subsquid registry
5156
// See https://docs.subsquid.io/evm-indexing/supported-networks/
52-
.setGateway(LOOKUP_ARCHIVE)
57+
// API key is required for the v2 gateway (https://portal.sqd.dev)
58+
.setGateway({ url: LOOKUP_ARCHIVE, apiKey: SQD_API_KEY })
5359
// Chain RPC endpoint is required for
5460
// - indexing unfinalized blocks https://docs.subsquid.io/basics/unfinalized-blocks/
5561
// - querying the contract state https://docs.subsquid.io/evm-indexing/query-state/

0 commit comments

Comments
 (0)