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

feat(protocol): update SetRemoteBridgeSuites to register remote signal services #15982

Merged
merged 1 commit into from
Feb 22, 2024
Merged
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
9 changes: 9 additions & 0 deletions packages/protocol/script/SetRemoteBridgeSuites.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ contract SetRemoteBridgeSuites is DeployCapability {
address public timelockAddress = vm.envAddress("TIMELOCK_ADDRESS");
address public addressManagerAddress = vm.envAddress("ADDRESS_MANAGER_ADDRESS");
uint256[] public remoteChainIDs = vm.envUint("REMOTE_CHAIN_IDS", ",");
address[] public remoteSignalServices = vm.envAddress("REMOTE_SIGNAL_SERVICES", ",");
address[] public remoteBridges = vm.envAddress("REMOTE_BRIDGES", ",");
address[] public remoteERC20Vaults = vm.envAddress("REMOTE_ERC20_VAULTS", ",");
address[] public remoteERC721Vaults = vm.envAddress("REMOTE_ERC721_VAULTS", ",");
Expand All @@ -32,6 +33,10 @@ contract SetRemoteBridgeSuites is DeployCapability {
require(
remoteChainIDs.length == remoteBridges.length, "invalid remote bridge addresses length"
);
require(
remoteChainIDs.length == remoteSignalServices.length,
"invalid remote SignalService addresses length"
);
require(
remoteChainIDs.length == remoteERC20Vaults.length,
"invalid remote ERC20Vault addresses length"
Expand All @@ -51,13 +56,17 @@ contract SetRemoteBridgeSuites is DeployCapability {
uint64 chainid = uint64(remoteChainIDs[i]);

if (securityCouncilPrivateKey == 0) {
register(addressManagerAddress, "signal_service", remoteSignalServices[i], chainid);
register(addressManagerAddress, "bridge", remoteBridges[i], chainid);
register(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid);
register(addressManagerAddress, "erc721_vault", remoteERC721Vaults[i], chainid);
register(addressManagerAddress, "erc1155_vault", remoteERC1155Vaults[i], chainid);
continue;
}

registerByTimelock(
addressManagerAddress, "signal_service", remoteSignalServices[i], chainid
);
registerByTimelock(addressManagerAddress, "bridge", remoteBridges[i], chainid);
registerByTimelock(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid);
registerByTimelock(
Expand Down
Loading