From c18d23bdbc6724a90ed460982ae66f745e3cb49c Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 2 Jan 2024 14:54:41 +0100 Subject: [PATCH] Reorder of the functions in Dispatcher.sol --- core/contracts/Dispatcher.sol | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/contracts/Dispatcher.sol b/core/contracts/Dispatcher.sol index f3937fa2e..9e2c47a64 100644 --- a/core/contracts/Dispatcher.sol +++ b/core/contracts/Dispatcher.sol @@ -94,6 +94,18 @@ contract Dispatcher is Router, Ownable { emit VaultDeauthorized(vault); } + /// @notice Updates the maintainer address. + /// @param newMaintainer Address of the new maintainer. + function updateMaintainer(address newMaintainer) external onlyOwner { + if (newMaintainer == address(0)) { + revert ZeroAddress(); + } + + maintainer = newMaintainer; + + emit MaintainerUpdated(maintainer); + } + /// TODO: make this function internal once the allocation distribution is /// implemented /// @notice Routes tBTC from Acre to a vault. Can be called by the maintainer @@ -124,18 +136,6 @@ contract Dispatcher is Router, Ownable { emit DepositAllocated(vault, amount, sharesOut); } - /// @notice Updates the maintainer address. - /// @param newMaintainer Address of the new maintainer. - function updateMaintainer(address newMaintainer) external onlyOwner { - if (newMaintainer == address(0)) { - revert ZeroAddress(); - } - - maintainer = newMaintainer; - - emit MaintainerUpdated(maintainer); - } - /// @notice Returns the list of authorized vaults. function getVaults() external view returns (address[] memory) { return vaults;