From e5b60b771d6975763cc4eeee12124842a15d1aee Mon Sep 17 00:00:00 2001 From: psparacino Date: Wed, 18 Oct 2023 12:14:45 -0400 Subject: [PATCH] extract registry --- carbonmark/src/Entities.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/carbonmark/src/Entities.ts b/carbonmark/src/Entities.ts index ff18c405..2fa74277 100644 --- a/carbonmark/src/Entities.ts +++ b/carbonmark/src/Entities.ts @@ -8,10 +8,12 @@ export function loadOrCreateProject(token: Address): Project { // Find the project + vintage ID from token address let tokenAddress = token.toHexString() let id = '' + let registry = '' let projectIndex = 0 for (let i = 0; i < PROJECT_INFO.length; i++) { if (tokenAddress == PROJECT_INFO[i][0]) { id = PROJECT_INFO[i][1] + '-' + PROJECT_INFO[i][2] + registry = PROJECT_INFO[i][1].split('-')[0] projectIndex = i break } @@ -29,7 +31,7 @@ export function loadOrCreateProject(token: Address): Project { project.methodology = PROJECT_INFO[projectIndex][4] project.vintage = BigInt.fromString(PROJECT_INFO[projectIndex][2]) project.projectAddress = token - // project.registry = 'VCS' + project.registry = registry project.category = PROJECT_INFO[projectIndex][5] project.country = PROJECT_INFO[projectIndex][6] project.save()