1

I am trying to run the command such as

web3j solidity generate -b SimpleBank/SimpleBank.bin -a SimpleBank/SimpleBank.abi -o ~/IdeaProjects/quiknode/src/main/java/ -p com.simplebank

Found here: https://blog.quiknode.io/web3j-ethereum-for-java-developers/

However, the web3j says :

Unknown opitions: -b, ...

Version is 1.4.1

Also, their docs of wrappers forward to a 404 page. At this point, coding a wrapper by hand looks like the best option.

Edit: for the purpose of a code generating, I took the Java source-code for web3j/codegen and ran it against my own .abi and .bin files. However, since this post is about the command line interface, this is not the answer.

2

This is happening because in the latest release of web3j-cli 1.4.1, the commands were rearranged and the solidity wrappers generator command is now under generate subcommand.

Run the following for it to work:

web3j generate solidity -b SimpleBank/SimpleBank.bin -a SimpleBank/SimpleBank.abi -o ~/IdeaProjects/quiknode/src/main/java/ -p com.simplebank

You can also check the other available generators using:

web3j generate help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.