WIP
This commit is contained in:
parent
c45bd282a0
commit
f52f8e9184
1 changed files with 3 additions and 3 deletions
|
@ -55,10 +55,10 @@ async fn upsert_tcbinfo() -> Result<(), &'static str> {
|
||||||
.parse()
|
.parse()
|
||||||
.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: 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");
|
||||||
println!("{tcbinfo_on_chain:?}");
|
let tcbinfo_on_chain = &tcbinfo_on_chain_json["data"]["tcb_info"].to_string();
|
||||||
|
|
||||||
if tcbinfo_on_chain.to_string() != 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