Commit 07f4b340 authored by Ubuntu's avatar Ubuntu

add contract and block interface

parent 68c90c6f
...@@ -98,3 +98,8 @@ message GetNonceReq { ...@@ -98,3 +98,8 @@ message GetNonceReq {
message GetNonceResp { message GetNonceResp {
repeated string balance = 1; repeated string balance = 1;
} }
message BlockNumber {
uint64 blocknum = 1;
}
\ No newline at end of file
...@@ -3,6 +3,7 @@ syntax = "proto3"; ...@@ -3,6 +3,7 @@ syntax = "proto3";
package meta.sentry.v1; package meta.sentry.v1;
option go_package = "sentryv1"; option go_package = "sentryv1";
import "meta/sentry/v1/request_response.proto"; import "meta/sentry/v1/request_response.proto";
import "google/protobuf/empty.proto";
// SentryService methods for other module. // SentryService methods for other module.
service SentryService { service SentryService {
...@@ -21,4 +22,5 @@ service SentryService { ...@@ -21,4 +22,5 @@ service SentryService {
rpc GetBalance(GetBalanceReq) returns (GetBalanceResp) {}; rpc GetBalance(GetBalanceReq) returns (GetBalanceResp) {};
rpc GetNonce(GetNonceReq) returns (GetNonceResp) {}; rpc GetNonce(GetNonceReq) returns (GetNonceResp) {};
rpc GetBlockNumber(google.protobuf.Empty) returns (BlockNumber) {};
} }
pragma solidity ^ 0.8.13;
interface consensus{
function queryBatchHash(uint64 height) external view returns ( bytes calldata);
function queryRate() external view returns (uint32 rate);
function latestHeight() external view returns (uint64);
function batchHash(uint64 height, bytes calldata batchhash)external returns (bool success);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment