Commit c5023e6c authored by Ubuntu's avatar Ubuntu

fix any type

parent f2a034dd
...@@ -4,6 +4,12 @@ package base.v1; ...@@ -4,6 +4,12 @@ package base.v1;
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
import "google/protobuf/descriptor.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
// import "base/v1/options.proto"; // import "base/v1/options.proto";
message Bytes32 { message Bytes32 {
...@@ -86,7 +92,7 @@ message TxProof{ ...@@ -86,7 +92,7 @@ message TxProof{
message Transaction{ message Transaction{
TxProof tx_proof=1; TxProof tx_proof=1;
int64 timeout_block_num =2; int64 timeout_block_num =2;
google.protobuf.Any tx =3; // EthTx StdTx google.protobuf.Any tx =3 [(gogoproto.customtype) = "InterfaceType"]; // EthTx StdTx
} }
//2. eth std: proto3 eth tx --> grpc --->proto3 eth tx //2. eth std: proto3 eth tx --> grpc --->proto3 eth tx
......
version: v1 version: v1
deps:
- buf.build/googleapis/googleapis
- buf.build/acme/paymentapis
breaking: breaking:
use: use:
- FILE - FILE
......
This diff is collapsed.
...@@ -100,5 +100,6 @@ func pbany(v interface{}) (*anypb.Any, error) { ...@@ -100,5 +100,6 @@ func pbany(v interface{}) (*anypb.Any, error) {
if !ok { if !ok {
return &anypb.Any{}, fmt.Errorf("%v is not proto.Message", pv) return &anypb.Any{}, fmt.Errorf("%v is not proto.Message", pv)
} }
return anypb.New(pv) return anypb.New(pv)
} }
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