Link to safes

This commit is contained in:
Alexis Sellier
2021-06-03 16:03:35 +02:00
parent 5b8c793b51
commit 8f9efa51be
4 changed files with 19 additions and 7 deletions
+8
View File
@@ -81,6 +81,14 @@ export function explorerLink(addr: string, config: Config): string {
return `https://etherscan.io/address/${addr}`;
}
// Get the Gnosis Safe link of an address, eg. Etherscan.
export function safeLink(addr: string, config: Config): string {
if (config.safe.viewer) {
return `${config.safe.viewer}/${addr}`;
}
return explorerLink(addr, config);
}
// Query a subgraph.
export async function querySubgraph(
query: string,