From fe4bcecb42503833effce67660d818f6ff274168 Mon Sep 17 00:00:00 2001 From: bitbeckers Date: Fri, 1 Mar 2024 19:31:50 +0100 Subject: [PATCH 1/2] fix(graph): addresses and startBlocks --- graph/networks.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/graph/networks.json b/graph/networks.json index 5babcf29..b96eae16 100644 --- a/graph/networks.json +++ b/graph/networks.json @@ -16,5 +16,17 @@ "address": "0xa16DFb32Eb140a6f3F2AC68f41dAd8c7e83C4941", "startBlock": 4421942 } + }, + "base": { + "HypercertMinter": { + "address": "0xC2d179166bc9dbB00A03686a5b17eCe2224c2704", + "startBlock": 11261815 + } + }, + "base-sepolia": { + "HypercertMinter": { + "address": "0xC2d179166bc9dbB00A03686a5b17eCe2224c2704", + "startBlock": 6771210 + } } } From 5bafc1451caacf8e977ef00f54038507375e24d3 Mon Sep 17 00:00:00 2001 From: bitbeckers Date: Wed, 13 Mar 2024 20:10:01 +0100 Subject: [PATCH 2/2] fix(defender): rollout on missing networks --- defender/src/setup.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/defender/src/setup.ts b/defender/src/setup.ts index 0d56ee67..61fb2f9e 100644 --- a/defender/src/setup.ts +++ b/defender/src/setup.ts @@ -1,6 +1,6 @@ import config from "./config"; import { ApiError, ConfigError } from "./errors"; -import { NETWORKS } from "./networks"; +import { NETWORKS, getNetworkConfigFromName } from "./networks"; import { reset } from "./reset"; import { rollOut } from "./rollout"; import { updateAutotask, updateSentinel } from "./update"; @@ -29,6 +29,18 @@ const setup = async () => { const oldAutoTasks = await autotaskClient.list(); const oldSentinels = await sentinelClient.list(); + const networksDeployed = oldAutoTasks.items + .map((task) => getNetworkConfigFromName(task.name).chainId) + .filter((value, index, array) => array.indexOf(value) === index); + + const missingNetworks = networks.filter( + (network) => !networksDeployed.includes(network.chainId), + ); + + if (missingNetworks.length > 0) { + await rollOut(missingNetworks); + } + let updates = false; if (oldAutoTasks.items.length > 0) {