From 108d80e9d35fe984e47e5a0396a5fb06a6136ab8 Mon Sep 17 00:00:00 2001 From: Amin Latifi Date: Thu, 13 Jun 2024 17:24:35 +0330 Subject: [PATCH] update add-organisation --- add-organisation.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/add-organisation.js b/add-organisation.js index 3eaa0ad..f72763a 100644 --- a/add-organisation.js +++ b/add-organisation.js @@ -1,22 +1,23 @@ const createOrganisationAddMigration = require("./db/create-organisation-add-migration").default; - -const ORGANISATION_NAME = "Giveth Verifier"; // Replace with your own organisation name -const SCHEMA_ID = - "0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404"; // Replace with your own schema id -const AUTHORIZED_ATTESTOR = "0x93E79499b00a2fdAAC38e6005B0ad8E88b177346"; -const COLOR = "#8668fc"; -// staging: eth-sepolia -// production: optimism-mainnet -const network = "optimism-mainnet"; +const fs = require("fs"); +const jsonc = require("jsonc-parser"); function main() { + const orgConfig = fs.readFileSync("org-config.jsonc", { + encoding: "utf-8", + }); + const parsedData = jsonc.parse(orgConfig); + const { name, schemaId, authorizedAttestor, network, color, startBlock } = + parsedData; + createOrganisationAddMigration( - ORGANISATION_NAME, - SCHEMA_ID, - AUTHORIZED_ATTESTOR, - COLOR, - network + name, + schemaId, + authorizedAttestor, + color, + network, + startBlock ); }