Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadPCh committed Jun 10, 2024
2 parents 60ed547 + 9f5ec9d commit 0be4452
Show file tree
Hide file tree
Showing 3 changed files with 61 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 = "Giveth Verifier"; // Replace with your own organisation name
const SCHEMA_ID =
"0x110c216190edf1c2cab264505c0b83437f0caa50298f371ad91a87394d9c55b2"; // Replace with your own schema id
const AUTHORIZED_ATTESTOR = "0x843829986e895facd330486a61Ebee9E1f1adB1a";
const COLOR = "#00433b";
"0xf63f2a7159ee674aa6fce42196a8bb0605eafcf20c19e91a7eafba8d39fa0404"; // Replace with your own schema id
const AUTHORIZED_ATTESTOR = "0x93E79499b00a2fdAAC38e6005B0ad8E88b177346";
const COLOR = "#8668fc";
// 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'`
);
}
};

28 changes: 28 additions & 0 deletions db/migrations/1728036830147-AddGiveth Verifier.js
Original file line number Diff line number Diff line change
@@ -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'`
);
}
};

0 comments on commit 0be4452

Please sign in to comment.