From db9e95c4898a0f63f223287b01db404a425ef328 Mon Sep 17 00:00:00 2001 From: Mitch Oz Date: Thu, 6 Jun 2024 14:46:08 -0600 Subject: [PATCH] add rf4 badgeholder org --- add-organisation.js | 10 +++---- .../1727706750760-AddRF 4 Badgeholder.js | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 db/migrations/1727706750760-AddRF 4 Badgeholder.js diff --git a/add-organisation.js b/add-organisation.js index f4d4a13..ef8a6f5 100644 --- a/add-organisation.js +++ b/add-organisation.js @@ -1,14 +1,14 @@ const createOrganisationAddMigration = require("./db/create-organisation-add-migration").default; -const ORGANISATION_NAME = "Honorary Mexican"; // Replace with your own organisation name +const ORGANISATION_NAME = "RF 4 Badgeholder"; // Replace with your own organisation name const SCHEMA_ID = - "0xc80d5c0209976a6c994aa6dc3680f4ad2de2dbc1aa9f46164c251ad9e5e10e09"; // Replace with your own schema id -const AUTHORIZED_ATTESTOR = "0x826976d7C600d45FB8287CA1d7c76FC8eb732030"; -const COLOR = "#ff0022"; + "0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b"; // Replace with your own schema id +const AUTHORIZED_ATTESTOR = "0xE4553b743E74dA3424Ac51f8C1E586fd43aE226F"; +const COLOR = "#ff0420"; // staging: eth-sepolia // production: optimism-mainnet -const network = "eth-sepolia"; +const network = "optimism-mainnet"; function main() { createOrganisationAddMigration( diff --git a/db/migrations/1727706750760-AddRF 4 Badgeholder.js b/db/migrations/1727706750760-AddRF 4 Badgeholder.js new file mode 100644 index 0000000..ee7a5f6 --- /dev/null +++ b/db/migrations/1727706750760-AddRF 4 Badgeholder.js @@ -0,0 +1,28 @@ +module.exports = class AddRF4Badgeholder1727706750760 { + name = "AddRF4Badgeholder1727706750760"; + + async up(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // add organisation with name "RF 4 Badgeholder" and schema id "0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b" + await db.query( + `INSERT INTO "organisation" ("id", "name", "issuer", "color") + VALUES ( + '0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b', + 'RF 4 Badgeholder', + '0xe4553b743e74da3424ac51f8c1e586fd43ae226f', + '#ff0420' + )` + ); + } + + async down(db) { + const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia"; + if (SQUID_NETWORK !== "optimism-mainnet") return; + // remove organisation with name "RF 4 Badgeholder" and schema id "0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b" + await db.query( + `DELETE FROM "organisation" WHERE "id" = '0xfdcfdad2dbe7489e0ce56b260348b7f14e8365a8a325aef9834818c00d46b31b'` + ); + } +}; + \ No newline at end of file