Skip to content

Commit aa8eb21

Browse files
feat: status()
1 parent 9ef9e0e commit aa8eb21

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

chain-state/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use transactor::Transactor;
2121

2222
pub struct ChainState {
2323
provider: Arc<Provider<RetryClient<Http>>>,
24-
da_entrance: Arc<DAEntrance<Provider<RetryClient<Http>>>>,
24+
pub da_entrance: Arc<DAEntrance<Provider<RetryClient<Http>>>>,
2525
da_signers: Arc<DASigners<Provider<RetryClient<Http>>>>,
2626
transactor: Arc<Mutex<Transactor>>,
2727
signer_address: H160,

grpc/proto/signer.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ message BatchRetrieveReply {
5858

5959
message StatusReply {
6060
uint64 status_code = 1;
61+
string entrance_contract = 2;
6162
}
6263

6364
message Empty {}

grpc/src/service.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ impl Signer for SignerService {
251251
&self,
252252
request: Request<Empty>,
253253
) -> Result<Response<signer::StatusReply>, Status> {
254-
let status = signer::StatusReply { status_code: 200 };
254+
let status = signer::StatusReply {
255+
status_code: 200,
256+
entrance_contract: hex::encode(self.chain_state.da_entrance.address()),
257+
};
255258
Ok(Response::new(status))
256259
}
257260
}

0 commit comments

Comments
 (0)