Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Jun 13, 2024
2 parents 79996a7 + 8a5cc0f commit 6a824b3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Devouch is a decentralized application that allows users to attest to projects c

```bash
# 0. Copy the org-config.template.json to org-config.json
cp org-config.template.jsonc org-config.jsonc
cp org-config.template.jsonc org-config.json

# 1. Fill the config with your organisation data
# 2. Run the script to add your organisation data to migrations
npm run add-organisation
npm run add-organization
```
Then create a PR to the main branch to be reviewed and merged.
29 changes: 29 additions & 0 deletions db/migrations/1728227711495-AddOptimism Super Delegate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = class AddOptimismSuperDelegate1728227711495 {
name = "AddOptimismSuperDelegate1728227711495";

async up(db) {
const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia";
if (SQUID_NETWORK !== "optimism-mainnet") return;
// add organisation with name "Optimism Super Delegate" and schema id "0xe4a196f8ea37d5f9699b095594e44b465b2703eff0615cf9766060786eef517b"
await db.query(
`INSERT INTO "organisation" ("id", "name", "issuer", "color", "start_block")
VALUES (
'0xe4a196f8ea37d5f9699b095594e44b465b2703eff0615cf9766060786eef517b',
'Optimism Super Delegate',
'0x93e79499b00a2fdaac38e6005b0ad8e88b177346',
'#ff0420',
null
)`
);
}

async down(db) {
const SQUID_NETWORK = process.env.SQUID_NETWORK || "eth-sepolia";
if (SQUID_NETWORK !== "optimism-mainnet") return;
// remove organisation with name "Optimism Super Delegate" and schema id "0xe4a196f8ea37d5f9699b095594e44b465b2703eff0615cf9766060786eef517b"
await db.query(
`DELETE FROM "organisation" WHERE "id" = '0xe4a196f8ea37d5f9699b095594e44b465b2703eff0615cf9766060786eef517b'`
);
}
};

13 changes: 13 additions & 0 deletions org-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "./org-config.schema.json",

"name": "Optimism Super Delegate",
"schemaId": "0xe4a196f8ea37d5f9699b095594e44b465b2703eff0615cf9766060786eef517b",
"authorizedAttestor": "0x93E79499b00a2fdAAC38e6005B0ad8E88b177346",

"network": "optimism-mainnet",

"color": "#ff0420",
"startBlock":
121313963
}

0 comments on commit 6a824b3

Please sign in to comment.