Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5187 whitelist watcher #5188

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/deployments/contracts/src/cli/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ export const getContract = (
name: isConnext ? "Connext" : implementation ?? name,
address: result.address,
abi,
contract: new Contract(
result.address as string,
// Special case if this is the Connext diamond.
isConnext ? ConnextInterface : abi,
connection,
),
contract: new Contract(result.address as string, abi, connection),
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ export const TESTNET_STAGING_INIT_CONFIG: InitConfig = {
"1887071092": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
},
watchers: {
allowlist: ["0x2cfBF3D40F71ceed2997cACbafE9D31e630860CB", "0x54BAA998771639628ffC0206c3b916c466b79c89"],
allowlist: [
"0x2cfBF3D40F71ceed2997cACbafE9D31e630860CB",
"0x54BAA998771639628ffC0206c3b916c466b79c89",
"0x0fd28a114963aE37353Cd838AeE053f6bcA80d63", // dw
"0xdF3085EEC4754891532efbD3eA8AF55bb409840A", // staging v2
],
},
routers: {
allowlist: ["0x71dD9fc6Fe5427F0c7cd7d42Bc89eFFe11C6d4B7"],
Expand Down
12 changes: 12 additions & 0 deletions packages/deployments/contracts/src/cli/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,18 @@ export const initProtocol = async (protocol: ProtocolStack, apply: boolean, stag
write: { method: "addWatcher", args: [watcher] },
chainData,
});

// Whitelist on execution layer as well
for (const network of protocol.networks) {
await updateIfNeeded({
apply,
deployment: network.deployments.Connext,
desired: 2,
read: { method: "queryRole", args: [watcher] },
write: { method: "assignRoleWatcher", args: [watcher] },
chainData,
});
}
}
}
// TODO: Blacklist/remove watchers.
Expand Down