Closed adu-web3 closed 4 months ago
The changes across the codebase aim to simplify the governance model by removing the exocoreValidatorSetAddress
and replacing it with owner_
, thus shifting control to a multi-sig wallet. This affects various contract initialization, pause/unpause logic, and payment handling. The modernization enhances the clarity and security of ownership and management processes within the system.
File Path | Change Summary |
---|---|
script/.../7_DeployBootstrap.s.sol |
Removed payable(exocoreValidatorSet.addr) parameter from a function call. |
script/.../integration/1_DeployBootstrap.s.sol |
Removed payable(exocoreValidatorSet) parameter from a function call. |
src/core/BaseRestakingController.sol |
Modified _lzSend function to pass msg.sender instead of exocoreValidatorSetAddress . |
src/core/Bootstrap.sol |
Removed exocoreValidatorSetAddress_ parameter from the initializer function. |
src/core/ClientChainGateway.sol |
Changed initialize function to use owner_ and updated ownership-related logic. |
src/core/ExocoreGateway.sol |
Updated initialize function to use owner_ , added onlyOwner modifier for pause /unpause , updated _lzSend . |
src/storage/GatewayStorage.sol |
Removed exocoreValidatorSetAddress , fixed inboundNonce mapping syntax. |
test/foundry/unit/Bootstrap.t.sol |
Modified abi.encodeCall arguments to exclude exocoreValidatorSet and offsetDuration . |
test/foundry/unit/ClientChainGateway.t.sol |
Updated error messages and removed a test for Exocore validator set address initialization. |
test/foundry/unit/ExocoreGateway.t.sol |
Changed error message in test_RevertWhen_UnauthorizedPauser . |
test/mocks/ExocoreGatewayMock.sol |
Updated initialize , pause , unpause , and _lzSend functions to use owner_ and msg.sender . |
sequenceDiagram
participant User
participant Contract
participant Owner (Multi-Sig Wallet)
User ->> Contract: Call initialize(owner_)
Contract ->> Owner: Set owner as owner_
User ->> Contract: Call pause()
Contract ->> Owner: Verify onlyOwner
Contract ->> Contract: Pause execution
User ->> Contract: Call unpause()
Contract ->> Owner: Verify onlyOwner
Contract ->> Contract: Unpause execution
Objective (Issue #30) | Addressed | Explanation |
---|---|---|
Remove exocoreValidatorSetAddress parameter |
✅ | |
Use multi-sig wallet as contract owner | ✅ |
In code, the rules we do reset,
With changes fine and governance set.
No longer tied to validators' might,
Ownership clear in multi-sig's light.
The contracts dance, they now align,
A brighter path, in code we sign.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
closes: #30
As described in the issue, we have two governance roles for contracts:
owner
andexocoreValidatorSetAddress
. Given we decide to use a multi-sig contract as the owner of the contracts andexocoreValidatorSetAddress
is previously intended for TSS bridge, we should removeexocoreValidatorSetAddress
from state variables and use owner as the only governance role instead, since we do not use TSS bridge right now.exocoreValidatorSetAddress
fromGatewayStorage
exocoreValidatorSetAddress
withonlyOwner
modifier(pause
/unpause
)exocoreValidatorSetAddress
from the arguments list of functionBootstrap.initialize
msg.sender
as refund address instead of the previousexocoreValidatorSetAddress
when calling_lzReceivew
Summary by CodeRabbit
New Features
owner
parameter instead ofexocoreValidatorSetAddress
.onlyOwner
modifier forpause
andunpause
functions.Bug Fixes
inboundNonce
mapping declaration.Refactor
msg.sender
instead ofexocoreValidatorSetAddress
.Tests
exocoreValidatorSetAddress
initialization.