WIP
This commit is contained in:
parent
00d550787b
commit
4ea6528d42
1 changed files with 2 additions and 2 deletions
|
@ -55,9 +55,9 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
|
||||||
.expect("failed to parse contract address");
|
.expect("failed to parse contract address");
|
||||||
let query_msg = QueryMsg::GetTcbInfo { fmspc: fmspc.clone() };
|
let query_msg = QueryMsg::GetTcbInfo { fmspc: fmspc.clone() };
|
||||||
let tcbinfo_on_chain_json: Value = client.query_smart(&contract_address, json!(query_msg)).await.expect("contract query failed");
|
let tcbinfo_on_chain_json: Value = client.query_smart(&contract_address, json!(query_msg)).await.expect("contract query failed");
|
||||||
let tcbinfo_on_chain = &tcbinfo_on_chain_json["data"]["tcb_info"].to_string();
|
let tcbinfo_on_chain = strip_dquotes(format!("{}", tcbinfo_on_chain_json["data"]["tcb_info"]).as_ref()).unwrap().to_string();
|
||||||
println!("{tcbinfo_on_chain} \n {tcbinfo_from_api}");
|
println!("{tcbinfo_on_chain} \n {tcbinfo_from_api}");
|
||||||
if *tcbinfo_on_chain != tcbinfo_from_api {
|
if tcbinfo_on_chain != tcbinfo_from_api {
|
||||||
println!("updating on-chain TCBInfo for FMSPC: {fmspc}");
|
println!("updating on-chain TCBInfo for FMSPC: {fmspc}");
|
||||||
let chain_id = tendermint::chain::id::Id::try_from("pion-1").expect("invalid chain id");
|
let chain_id = tendermint::chain::id::Id::try_from("pion-1").expect("invalid chain id");
|
||||||
let sender = "ajinkya";
|
let sender = "ajinkya";
|
||||||
|
|
Loading…
Reference in a new issue