Skip to content

Commit

Permalink
Merge pull request #80 from Giveth:add-giveth-verifiers
Browse files Browse the repository at this point in the history
add giveth-verifier org
  • Loading branch information
divine-comedian authored Jun 10, 2024
2 parents df5abee + 5614a23 commit 9f5ec9d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
8 changes: 4 additions & 4 deletions add-organisation.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
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 9f5ec9d

Please sign in to comment.