diff --git a/add-organisation.js b/add-organisation.js index 863c745..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 = "Gitcoin Passport Holder"; // Replace with your own organisation name +const ORGANISATION_NAME = "RF 4 Badgeholder"; // Replace with your own organisation name const SCHEMA_ID = - "0x110c216190edf1c2cab264505c0b83437f0caa50298f371ad91a87394d9c55b2"; // Replace with your own schema id -const AUTHORIZED_ATTESTOR = "0x843829986e895facd330486a61Ebee9E1f1adB1a"; -const COLOR = "#00433b"; + "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