{#if info}
{info.meta.name}{project.id}
{info.meta.description}
- commit {project.anchor.stateHash}
-
- {#each info.meta.maintainers as urn}
-
-
-
- {/each}
+ commit {project.anchor.stateHash}
+
+
+ {#each info.meta.maintainers as urn}
+
+
+
+ {/each}
+
{:else}
@@ -120,6 +139,12 @@
{/if}
- commit {project.anchor.stateHash}
+
+ commit {project.anchor.stateHash}
+
+
+
+
+
{/if}
diff --git a/src/config.json b/src/config.json
index b6cfc54ac..fdc7b24f3 100644
--- a/src/config.json
+++ b/src/config.json
@@ -116,6 +116,7 @@
"org": [
"function owner() view returns (address)",
"function anchors(bytes32) view returns (uint32, bytes)",
+ "function anchor(bytes32, uint32, bytes)",
"function setOwner(address)",
"function setName(string, address) returns (bytes32)"
],
diff --git a/src/project.ts b/src/project.ts
index 0440f5ac4..b887939ea 100644
--- a/src/project.ts
+++ b/src/project.ts
@@ -10,6 +10,11 @@ export interface Project {
};
}
+export interface PendingProject extends Project {
+ safeTxHash: string; // Safe transaction hash.
+ confirmations: string[]; // Owner addresses who have confirmed.
+}
+
export interface Info {
head: string;
meta: Meta;
diff --git a/src/utils.ts b/src/utils.ts
index 822f94b5b..a9eaee1d8 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -2,7 +2,8 @@ import { ethers } from "ethers";
import { BigNumber } from "ethers";
import multibase from 'multibase';
import multihashes from 'multihashes';
-import EthersSafe, { EthersAdapter } from "@gnosis.pm/safe-core-sdk";
+import EthersSafe, { EthersAdapter, TransactionResult } from "@gnosis.pm/safe-core-sdk";
+import type { SafeSignature } from "@gnosis.pm/safe-core-sdk-types";
import type { Config } from '@app/config';
import config from "@app/config.json";
import { assert } from '@app/error';
@@ -428,3 +429,71 @@ export async function proposeSafeTransaction(
signature
);
}
+
+// Sign a Gnosis Safe multi-sig transaction.
+export async function signSafeTransaction(
+ safeAddress: string,
+ safeTxHash: string,
+ config: Config
+): Promise