From 3504ccd22b620dc2c7fef2065c9b76faee734776 Mon Sep 17 00:00:00 2001 From: Yelyzaveta Dymchenko Date: Tue, 5 Nov 2024 08:52:49 +0000 Subject: [PATCH] feat: add callback_address to configuration file --- config.sample.toml | 1 + src/main.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.sample.toml b/config.sample.toml index 68c4c17..b8aab49 100644 --- a/config.sample.toml +++ b/config.sample.toml @@ -4,6 +4,7 @@ registry_coordinator_address = "0x45cE5242DF4Cdd6CB925C6296732487D15216bc9" operator_state_retriever_address = "0x4fEcf2c85D2FB1E1A35906B737Cd90bb85c05E1C" current_first_block = 20669157 task_issuer = "0xB819BA4c5d2b64d07575ff4B30d3e0Eca219BFd5" +callback_address = "0xB819BA4c5d2b64d07575ff4B30d3e0Eca219BFd5" ruleset = "B819BA4c5d2b64d07575ff4B30d3e0Eca219BFd5" socket = "http://localhost:3033" secret_key = "" diff --git a/src/main.rs b/src/main.rs index e484bbc..c97c1b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,6 +55,7 @@ struct Config { operator_state_retriever_address: Address, current_first_block: u64, task_issuer: Address, + callback_address: Address, ruleset: String, socket: String, secret_key: String, @@ -505,6 +506,7 @@ async fn main() { current_block_num, config.secret_key.clone(), config.task_issuer, + config.callback_address, pool.clone(), config.postgre_connect_request, ); @@ -773,6 +775,7 @@ fn new_task_issued_handler( current_block_num: u64, secret_key: String, task_issuer: Address, + callback_address: Address, pool: Pool>, postgre_connect_request: String, ) { @@ -858,7 +861,7 @@ fn new_task_issued_handler( .wallet(wallet) .on_http(http_endpoint.parse().unwrap()); let contract = - ResponseCallbackContract::new(task_issuer, &provider); + ResponseCallbackContract::new(callback_address, &provider); let non_signer_stakes_and_signature_response = agg_response_to_non_signer_stakes_and_signature( bls_agg_response.0.clone(),