From aa8eb2120d3977000aa68da38776fc375c5f18a4 Mon Sep 17 00:00:00 2001 From: MiniFrenchBread <103425574+MiniFrenchBread@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:21:34 +0800 Subject: [PATCH] feat: status() --- chain-state/src/lib.rs | 2 +- grpc/proto/signer.proto | 1 + grpc/src/service.rs | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/chain-state/src/lib.rs b/chain-state/src/lib.rs index f7be53b..0355807 100644 --- a/chain-state/src/lib.rs +++ b/chain-state/src/lib.rs @@ -21,7 +21,7 @@ use transactor::Transactor; pub struct ChainState { provider: Arc>>, - da_entrance: Arc>>>, + pub da_entrance: Arc>>>, da_signers: Arc>>>, transactor: Arc>, signer_address: H160, diff --git a/grpc/proto/signer.proto b/grpc/proto/signer.proto index e6cccb0..3748b60 100644 --- a/grpc/proto/signer.proto +++ b/grpc/proto/signer.proto @@ -58,6 +58,7 @@ message BatchRetrieveReply { message StatusReply { uint64 status_code = 1; + string entrance_contract = 2; } message Empty {} diff --git a/grpc/src/service.rs b/grpc/src/service.rs index 2b82b83..9159bab 100644 --- a/grpc/src/service.rs +++ b/grpc/src/service.rs @@ -251,7 +251,10 @@ impl Signer for SignerService { &self, request: Request, ) -> Result, Status> { - let status = signer::StatusReply { status_code: 200 }; + let status = signer::StatusReply { + status_code: 200, + entrance_contract: hex::encode(self.chain_state.da_entrance.address()), + }; Ok(Response::new(status)) } }