getamis / sol2proto Goto Github PK
View Code? Open in Web Editor NEWEthereum contract ABI to gRPC protobuf IDL transpiler
License: GNU Lesser General Public License v3.0
Ethereum contract ABI to gRPC protobuf IDL transpiler
License: GNU Lesser General Public License v3.0
I ran the example in grpc-contract but somehow there aren't any resp messages produced by sol2proto, the messages.proto file only includes GetNameReq
, OnNameSetReq
and SetNameReq
, I used the abi you have in the example.
While generate the messages.proto , the message name of the return value for smart contract's constant function is incorrect.
For example ,there is a smart contract contain a constant getName
function which has no input parameter and return a string.
After convert the .sol file to the .proto files ,it will generate an unexpected GetNameReq
message instead of generating GetNameResp
message in the messages.proto.
# function in smart contract
function getName() public constant returns (string) {
return name;
}
# After execute sol2proto , the expected message name in messages.proto
message GetNameResp {
string arg = 1;
}
# After execute sol2proto , the actual message name in messages.proto currently
message GetNameReq {
string arg = 1;
}
After tracing the code , it seems to be a typo at line 59 in the grpc/method.go
I suppose the method.RequestName() should be replaced with method.ResponseName().
The corresponding PR is here #17
When i follow the Usage instruction in the README.md ,
the two of separating *.proto files never come out.
After tracing the source code in main.go ,
i guess the --output flag is required.
So i try the following cmd then it generate two proto files successfully.
sol2proto --pkg pb --abi NameService.abi --output .
Is it correct to ALWAYS specify the --output flag
if i want to get two separating *.proto files?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.