Skip to content

Commit

Permalink
feat: add a new query to get Developer Payment address (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekohex authored Nov 28, 2024
1 parent d8af40a commit c318e61
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/IncredibleSquaringBlueprint.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;

import "core/BlueprintServiceManagerBase.sol";
import "../src/BlueprintServiceManagerBase.sol";

/**
* @title IncredibleSquaringBlueprint
Expand Down
6 changes: 5 additions & 1 deletion src/BlueprintServiceManagerBase.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "src/Permissions.sol";
import "src/IBlueprintServiceManager.sol";

Expand Down Expand Up @@ -151,4 +150,9 @@ contract BlueprintServiceManagerBase is IBlueprintServiceManager, RootChainEnabl
function queryDisputeOrigin(uint64) external view virtual returns (address disputeOrigin) {
return address(this);
}

/// @inheritdoc IBlueprintServiceManager
function queryDeveloperPaymentAddress(uint64) external view virtual returns (address developerPaymentAddress) {
return payable(blueprintOwner);
}
}
8 changes: 8 additions & 0 deletions src/IBlueprintServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,12 @@ interface IBlueprintServiceManager {
/// @param serviceId The ID of the service.
/// @return disputeOrigin The account that can dispute the unapplied slash for that service
function queryDisputeOrigin(uint64 serviceId) external view returns (address disputeOrigin);

/// @dev Query the developer payment address for a service. This mainly used by the runtime or the Master Blueprint Service
/// Manager
/// to determine the developer payment address for a service.
/// @notice This function should be implemented by the Blueprint Service Manager contract.
/// @param serviceId The ID of the service.
/// @return developerPaymentAddress The address of the developer payment address for that service
function queryDeveloperPaymentAddress(uint64 serviceId) external view returns (address developerPaymentAddress);
}

0 comments on commit c318e61

Please sign in to comment.