revert grpc
This commit is contained in:
parent
7379ec91c3
commit
9bc321716e
2 changed files with 5 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -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",
|
||||
|
|
|
@ -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 =;
|
||||
|
|
Loading…
Reference in a new issue