diff --git a/proto/steward/v4/steward.proto b/proto/steward/v4/steward.proto index 2c5f5314..b8d4d7c7 100644 --- a/proto/steward/v4/steward.proto +++ b/proto/steward/v4/steward.proto @@ -19,7 +19,6 @@ import "cellar_v2.proto"; service ContractCallService { // Handles scheduled contract call submission rpc Schedule(ScheduleRequest) returns (ScheduleResponse) {} - rpc Status(StatusRequest) returns (StatusResponse) {} } /* diff --git a/src/cork.rs b/src/cork.rs index 5f0fcda8..9e339960 100644 --- a/src/cork.rs +++ b/src/cork.rs @@ -6,10 +6,7 @@ use crate::{ ErrorKind::{self, *}, }, prelude::APP, - proto::{ - self, schedule_request::CallData::*, ScheduleRequest, ScheduleResponse, StatusRequest, - StatusResponse, - }, + proto::{self, schedule_request::CallData::*, ScheduleRequest, ScheduleResponse}, somm_send, }; use abscissa_core::{ @@ -19,7 +16,6 @@ use abscissa_core::{ use deep_space::{Coin, Contact}; use ethers::types::H160; use gravity_bridge::gravity_proto::cosmos_sdk_proto::cosmos::base::abci::v1beta1::TxResponse; -use lazy_static::lazy_static; use sha3::{Digest, Keccak256}; use somm_proto::cork::Cork; use std::time::Duration; @@ -32,10 +28,6 @@ pub mod proposals; const MESSAGE_TIMEOUT: Duration = Duration::from_secs(10); const CHAIN_PREFIX: &str = "somm"; -lazy_static! { - static ref STEWARD_VERSION: &'static str = env!("CARGO_PKG_VERSION"); -} - pub struct CorkHandler; #[async_trait] @@ -85,12 +77,6 @@ impl proto::contract_call_service_server::ContractCallService for CorkHandler { id: id_hash(height, &cellar_id, encoded_call), })) } - - async fn status(&self, _: Request) -> Result, Status> { - Ok(Response::new(StatusResponse { - version: STEWARD_VERSION.to_string(), - })) - } } pub fn get_encoded_call(request: ScheduleRequest) -> Result, Error> { diff --git a/src/gen/proto/descriptor.bin b/src/gen/proto/descriptor.bin index 7f852d02..03873f86 100644 Binary files a/src/gen/proto/descriptor.bin and b/src/gen/proto/descriptor.bin differ diff --git a/src/gen/proto/steward.v4.rs b/src/gen/proto/steward.v4.rs index ba45161a..2f4dbfda 100644 --- a/src/gen/proto/steward.v4.rs +++ b/src/gen/proto/steward.v4.rs @@ -3041,21 +3041,6 @@ pub mod contract_call_service_client { http::uri::PathAndQuery::from_static("/steward.v4.ContractCallService/Schedule"); self.inner.unary(request.into_request(), path, codec).await } - pub async fn status( - &mut self, - request: impl tonic::IntoRequest, - ) -> Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/steward.v4.ContractCallService/Status"); - self.inner.unary(request.into_request(), path, codec).await - } } impl Clone for ContractCallServiceClient { fn clone(&self) -> Self { @@ -3209,10 +3194,6 @@ pub mod contract_call_service_server { &self, request: tonic::Request, ) -> Result, tonic::Status>; - async fn status( - &self, - request: tonic::Request, - ) -> Result, tonic::Status>; } #[doc = ""] #[doc = " Service for handling Cellar contract calls"] @@ -3281,37 +3262,6 @@ pub mod contract_call_service_server { }; Box::pin(fut) } - "/steward.v4.ContractCallService/Status" => { - #[allow(non_camel_case_types)] - struct StatusSvc(pub Arc); - impl tonic::server::UnaryService for StatusSvc { - type Response = super::StatusResponse; - type Future = BoxFuture, tonic::Status>; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = self.0.clone(); - let fut = async move { (*inner).status(request).await }; - Box::pin(fut) - } - } - let inner = self.inner.clone(); - let fut = async move { - let interceptor = inner.1.clone(); - let inner = inner.0; - let method = StatusSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = if let Some(interceptor) = interceptor { - tonic::server::Grpc::with_interceptor(codec, interceptor) - } else { - tonic::server::Grpc::new(codec) - }; - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => Box::pin(async move { Ok(http::Response::builder() .status(200)