diff --git a/Cargo.toml b/Cargo.toml index 59e1c63..8f6e2f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,4 +33,7 @@ path = "src/lib.rs" [[bin]] name = "{{project-name}}" -path = "src/main.rs" \ No newline at end of file +path = "src/main.rs" + +[package.metadata.blueprint] +manager = { evm = "HelloBlueprint" } diff --git a/contracts/src/HelloBlueprint.sol b/contracts/src/HelloBlueprint.sol index aa0acfb..ba74829 100644 --- a/contracts/src/HelloBlueprint.sol +++ b/contracts/src/HelloBlueprint.sol @@ -1,13 +1,14 @@ // SPDX-License-Identifier: UNLICENSE pragma solidity >=0.8.13; -import "core/BlueprintServiceManager.sol"; +import "core/BlueprintServiceManagerBase.sol"; /** * @title HelloBlueprint * @dev This contract is an example of a service blueprint that provides a single service. + * @note For all supported hooks, check the `BlueprintServiceManagerBase` contract. */ -contract HelloBlueprint is BlueprintServiceManager { +contract HelloBlueprint is BlueprintServiceManagerBase { /** * @dev Hook for service operator registration. Called when a service operator * attempts to register with the blueprint. @@ -49,7 +50,7 @@ contract HelloBlueprint is BlueprintServiceManager { * @param _inputs Inputs used for the job execution. * @param _outputs Outputs resulting from the job execution. */ - function onJobCallResult( + function onJobResult( uint64 serviceId, uint8 job, uint64 _jobCallId, @@ -60,30 +61,6 @@ contract HelloBlueprint is BlueprintServiceManager { // Do something with the job call result } - /** - * @dev Verifies the result of a job call. This function is used to validate the - * outputs of a job execution against the expected results. - * @param serviceId The ID of the service related to the job. - * @param job The job identifier. - * @param jobCallId The unique ID for the job call. - * @param participant The participant (operator) whose result is being verified. - * @param inputs Inputs used for the job execution. - * @param outputs Outputs resulting from the job execution. - * @return bool Returns true if the job call result is verified successfully, - * otherwise false. - */ - function verifyJobCallResult( - uint64 serviceId, - uint8 job, - uint64 jobCallId, - bytes calldata participant, - bytes calldata inputs, - bytes calldata outputs - ) public view virtual override onlyFromRootChain returns (bool) { - // Verify the job call result here - return true; - } - /** * @dev Converts a public key to an operator address. * @param publicKey The public key to convert.