This commit is contained in:
Ajinkya Kulkarni 2024-12-05 14:36:19 +01:00
parent ae380a2cca
commit 0d796e6819

View file

@ -1,7 +1,7 @@
use cw_client::{CliClient, CwClient};
use mc_attestation_verifier::SignedTcbInfo;
use p256::ecdsa::VerifyingKey;
use quartz_tcbinfo_msgs::ExecuteMsg;
use quartz_tcbinfo_msgs::{QueryMsg, ExecuteMsg};
use quoted_string::strip_dquotes;
use reqwest::Url;
use serde_json::{json, Value};
@ -56,7 +56,7 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
"neutron1r4m59786vmxrx866585ze5ugjx9egcyja0nuxhn2y6d7ht6680sspa89zk"
.parse()
.expect("failed to parse contract address");
let query_msg = format!("{{\"get_tcb_info\": {{\"fmspc\": \"{}\"}}}}", fmspc) ;
let query_msg = QueryMsg::GetTcbInfo { fmspc },
let tcbinfo_on_chain: Value = client.query_smart(&contract_address, json!(query_msg)).await.expect("contract query failed");
println!("{tcbinfo_on_chain:?}");