From 6d71a7edfa2245e45d00ccedc154209ffc94dbb0 Mon Sep 17 00:00:00 2001 From: ChiTimesChi <88190723+ChiTimesChi@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:23:37 +0100 Subject: [PATCH] feat: address check in constructor --- contracts/messaging/MessageBusManager.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contracts/messaging/MessageBusManager.sol b/contracts/messaging/MessageBusManager.sol index f290cd4d..7dadf633 100644 --- a/contracts/messaging/MessageBusManager.sol +++ b/contracts/messaging/MessageBusManager.sol @@ -12,6 +12,9 @@ contract MessageBusManager is IManager, Ownable { error MessageBusManager__ZeroAddress(); constructor(address messageBus_, address owner_) { + if (messageBus_ == address(0) || owner_ == address(0)) { + revert MessageBusManager__ZeroAddress(); + } MESSAGE_BUS = messageBus_; transferOwnership(owner_); }