diff --git a/add-organisation.js b/add-organisation.js index ef8a6f5..3eaa0ad 100644 --- a/add-organisation.js +++ b/add-organisation.js @@ -1,11 +1,11 @@ const createOrganisationAddMigration = require("./db/create-organisation-add-migration").default; -const ORGANISATION_NAME = "RF 4 Badgeholder"; // Replace with your own organisation name +const ORGANISATION_NAME = "Giveth Verifier"; // Replace with your own organisation name const SCHEMA_ID = - "0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b"; // Replace with your own schema id -const AUTHORIZED_ATTESTOR = "0xE4553b743E74dA3424Ac51f8C1E586fd43aE226F"; -const COLOR = "#ff0420"; + "0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404"; // Replace with your own schema id +const AUTHORIZED_ATTESTOR = "0x93E79499b00a2fdAAC38e6005B0ad8E88b177346"; +const COLOR = "#8668fc"; // staging: eth-sepolia // production: optimism-mainnet const network = "optimism-mainnet"; diff --git a/db/migrations/1728036830147-AddGiveth Verifier.js b/db/migrations/1728036830147-AddGiveth Verifier.js new file mode 100644 index 0000000..a947d0e --- /dev/null +++ b/db/migrations/1728036830147-AddGiveth Verifier.js @@ -0,0 +1,28 @@ +module.exports = class AddGivethVerifier1728036830147 { + name = "AddGivethVerifier1728036830147"; + + async up(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // add organisation with name "Giveth Verifier" and schema id "0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404" + await db.query( + `INSERT INTO "organisation" ("id", "name", "issuer", "color") + VALUES ( + '0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404', + 'Giveth Verifier', + '0x93e79499b00a2fdaac38e6005b0ad8e88b177346', + '#8668fc' + )` + ); + } + + async down(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // remove organisation with name "Giveth Verifier" and schema id "0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404" + await db.query( + `DELETE FROM "organisation" WHERE "id" = '0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404'` + ); + } +}; + \ No newline at end of file