Skip to content

Commit

Permalink
Merge pull request #79 from Giveth:add-rf4-badgeholders
Browse files Browse the repository at this point in the history
add rf4 badgeholder org
  • Loading branch information
divine-comedian authored Jun 10, 2024
2 parents cd614ec + 866eab5 commit df5abee
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
10 changes: 5 additions & 5 deletions add-organisation.js
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
28 changes: 28 additions & 0 deletions db/migrations/1727706750760-AddRF 4 Badgeholder.js
Original file line number Diff line number Diff line change
@@ -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'`
);
}
};

0 comments on commit df5abee

Please sign in to comment.