sol2proto
sol2proto copied to clipboard
Specify pkgnames for messages defined in pb/messages.proto
When I tried examples in getamis/grpc-contract, I got below errors:
$ make run name=NameService
solc --bin --abi --optimize --overwrite -o . NameService.sol
mkdir -p contracts
sol2proto --pkg contracts --abi NameService.abi
mv *.proto contracts
protoc --go_out=plugins=grpc:./contracts -I contracts -I /Users/ryo/.go/src/ contracts/*.proto
messages.proto:18:5: "TransactOpts" is not defined.
make: *** [run] Error 1
It might be caused by missing specifying pk. package names so I want to add that.
@markya0616 I've fixed conflict. Could you review this? 🙏
Adding package name as prefix doesn't make sense.
Consider a message defined in foo.proto, I think it will be
message FooReq {
string arg1 = 1;
pkg.TransactOpts opts = 2;
}
I want to avoid this case. I think the example in grpc-contract is broken. Have you tried the latest version of grpc-contract?