// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./gen/{{contract_name}}.sol"; /** * Concrete implementation of {{contract_name}} for {{concrete_contract_name}} * * This contract extends the abstract {{contract_name}} and provides concrete implementations * for all callback methods. Override the callback methods to implement your specific logic. * * Generated by EigenCompute on {{generation_timestamp}} */ contract {{concrete_contract_name}} is {{contract_name}} { /** * Constructor for {{concrete_contract_name}} */ constructor(uint256 _reservationID) {{contract_name}}(_reservationID) {} // ================== EXAMPLE INTERFACE IMPLEMENTATION ================== // These are example implementations of your interface methods. // You can modify, extend, or remove these as needed for your specific use case. {{#methods}} /** * Example implementation of {{prefixed_interface_name}}.{{name}} * This simply routes calls through EigenCompute for async execution. * You may want to add validation, access control, or other logic here. */ function {{name}}({{#params}}{{calldata_type}} {{name}}{{^last}}, {{/last}}{{/params}}) external virtual returns (uint256) { return _{{name}}Async({{#params}}{{name}}{{^last}}, {{/last}}{{/params}}); } {{/methods}} {{^has_methods}} // No interface methods to implement {{/has_methods}} // ================== CALLBACKS ================== {{#methods}} /** * Handle {{name}} results * @param taskId The unique identifier for the completed task {{#has_multiple_outputs}} {{#result_params}} * @param {{name}} The result returned by {{../name}} (original type: {{type}}) {{/result_params}} {{/has_multiple_outputs}} {{^has_multiple_outputs}} * @param result The result returned by {{name}} (original type: {{result_type}}) {{/has_multiple_outputs}} * @param error Error message if the function failed, empty string if successful */ function _on{{capitalized_name}}(uint256 taskId, {{result_param_signature}}, string memory error) internal override { // TODO: Implement your {{name}} callback logic here if (bytes(error).length > 0) { // Handle error case // Example: emit an error event or revert return; } // Handle success case // Example: store result, emit event, or trigger other logic } {{/methods}} {{^has_methods}} // No callback methods to implement - no functions found in the interface {{/has_methods}} {{^has_methods}} // No hooks to implement - no functions found in the interface {{/has_methods}} }