Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have an issue with "Unknown options" for web3j solidity generate #92

Open
Gelassen opened this issue Sep 22, 2022 · 2 comments
Open

Have an issue with "Unknown options" for web3j solidity generate #92

Gelassen opened this issue Sep 22, 2022 · 2 comments

Comments

@Gelassen
Copy link

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?

@Gelassen
Copy link
Author

Gelassen commented Sep 22, 2022

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?

@PTJ12
Copy link

PTJ12 commented Sep 26, 2022

You can try "web3j generate solidity --abiFile xxx.abi --binFile xxx.bin -o .\src\main\java -p xxx"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants