From 9bc321716ed26761262386c136a48b303696ec91 Mon Sep 17 00:00:00 2001 From: Ajinkya Kulkarni <ajinkya@poeticte.ch> Date: Thu, 13 Feb 2025 13:27:30 +0100 Subject: [PATCH] revert grpc --- Cargo.lock | 2 ++ crates/utils/tcbinfo-updater/src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 64282f9..93dc99e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5707,10 +5707,12 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" name = "tcbinfo-updater" version = "0.1.0" dependencies = [ + "anyhow", "bincode", "cosmrs", "cw-client", "der", + "hex", "mc-attestation-verifier", "p256", "quartz-tcbinfo-msgs 0.1.0", diff --git a/crates/utils/tcbinfo-updater/src/main.rs b/crates/utils/tcbinfo-updater/src/main.rs index 6810e53..6e6dd3a 100644 --- a/crates/utils/tcbinfo-updater/src/main.rs +++ b/crates/utils/tcbinfo-updater/src/main.rs @@ -42,14 +42,14 @@ async fn get_fmspc_list() -> Vec<Fmspc> { fmspc_list } -async fn upsert_tcbinfo(url: &str, contract_addr: &str, chain_id : Id, sender: &str, gas: u64, fees: &str, sk: &str) -> Result<(), &'static str> { +async fn upsert_tcbinfo(url: &str, contract_addr: &str, chain_id : Id, sender: &str, gas: u64, fees: &str) -> Result<(), &'static str> { let network = Url::parse(url).expect("couldn't parse network URL"); let skey = hex::decode(sk).expect("couldn't read signing key") .as_slice() .try_into() .map_err(|e| anyhow!("failed to read/parse sk: {}", e)).expect("couldn't extract result value"); - let client = GrpcClient::new(skey, network); + let client = CliClient::new(network); let fmspc_list = get_fmspc_list().await; for fmspc in fmspc_list { @@ -109,7 +109,7 @@ pub async fn main() { let gas: &u64 = &args[5].parse().expect("gas must be a u64 value"); let fees: &str = &args[6]; let sk: &str = &args[7]; - upsert_tcbinfo(url, contract_address, Id::try_from(chain_id.clone()).expect("invalid chain id"), sender, *gas, fees, sk).await.expect("TCBInfo update failed"); + upsert_tcbinfo(url, contract_address, Id::try_from(chain_id.clone()).expect("invalid chain id"), sender, *gas, fees).await.expect("TCBInfo update failed"); } /*let url =;