Skip to content

Commit

Permalink
feat: status()
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniFrenchBread committed Sep 5, 2024
1 parent 9ef9e0e commit aa8eb21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chain-state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use transactor::Transactor;

pub struct ChainState {
provider: Arc<Provider<RetryClient<Http>>>,
da_entrance: Arc<DAEntrance<Provider<RetryClient<Http>>>>,
pub da_entrance: Arc<DAEntrance<Provider<RetryClient<Http>>>>,
da_signers: Arc<DASigners<Provider<RetryClient<Http>>>>,
transactor: Arc<Mutex<Transactor>>,
signer_address: H160,
Expand Down
1 change: 1 addition & 0 deletions grpc/proto/signer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ message BatchRetrieveReply {

message StatusReply {
uint64 status_code = 1;
string entrance_contract = 2;
}

message Empty {}
5 changes: 4 additions & 1 deletion grpc/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ impl Signer for SignerService {
&self,
request: Request<Empty>,
) -> Result<Response<signer::StatusReply>, 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))
}
}
Expand Down

0 comments on commit aa8eb21

Please sign in to comment.