Skip to content

Commit 9ffb045

Browse files
committed
fix: add function to query blueprint manager address
1 parent a27aa61 commit 9ffb045

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/MasterBlueprintServiceManager.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ contract MasterBlueprintServiceManager is RootChainEnabled, AccessControl, Pausa
281281
whenNotPaused
282282
{
283283
address manager = blueprints.get(blueprintId);
284+
require(manager != address(0), "Invalid blueprint");
284285
IBlueprintServiceManager(manager).onRegister(operator, registrationInputs);
285286
emit OperatorRegistered(blueprintId, operator);
286287
}
@@ -317,6 +318,13 @@ contract MasterBlueprintServiceManager is RootChainEnabled, AccessControl, Pausa
317318
IBlueprintServiceManager(manager).onUpdateRpcAddress(operator);
318319
emit RpcAddressUpdated(blueprintId, operator);
319320
}
321+
322+
/// @dev Get the blueprint manager address
323+
/// @param blueprintId The unique identifier of the blueprint.
324+
/// @return the blueprint manager address
325+
function getManagerAddress(uint64 blueprintId) public view returns (address manager) {
326+
manager = blueprints.get(blueprintId);
327+
}
320328

321329
/// @dev Get the heartbeat interval for a service.
322330
/// @param blueprintId The unique identifier of the blueprint.

0 commit comments

Comments
 (0)