Skip to content

Commit

Permalink
Reorder of the functions in Dispatcher.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpar committed Jan 2, 2024
1 parent 591447a commit c18d23b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions core/contracts/Dispatcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c18d23b

Please sign in to comment.