Have an issue with "Unknown options" for web3j solidity generate
I am working on converting my contract.sol to contract.java by using web3j. Web3j has been installed by using
curl -L get.web3j.io | sh and web3j --version shows
Version: 1.4.1
Build timestamp: 2021-02-16 20:28:33.742 UTC
Command to generate contract.java is:
web3j solidity generate -a swapvalue.abi -b swapvalue.bin -o . -p ru.home.swap where .abi and .bin were generated with help of Remix IDE.
The observed behavior is an error Unknown options: '-a', 'swapvalue.abi', '-b', 'swapvalue.bin', '-o', '.', '-p', 'ru.home.swap' with unclear reason as this is the same what docs and others users suggest.
What is the issue with this command?
The same for contract generated over truffle:
$web3j truffle generate ./build/contracts/SwapValue.json -o . -p ru.home.swap
Unmatched arguments from index 2: './build/contracts/SwapValue.json', '-o', '.', '-p', 'ru.home.swap' Did you mean: tests or truffle or solidity?
You can try "web3j generate solidity --abiFile xxx.abi --binFile xxx.bin -o .\src\main\java -p xxx"