0

I'm trying to generate java wrapper class of solidity smart contract using truffle but not getting wrapperclass.java file enter image description here

Here is an command which i've used to generate abi/Json of that contract

anikett@anikett:~/myproject$ ls -l build/contracts/

total 104 -rw-r--r-- 1 anikett anikett 53703 Oct 16 12:12 Migrations.json -rw-r--r-- 1 anikett anikett 45796 Oct 16 12:12 Wallet.json

after that used this command which im using for geration of java wrapper class

anikett@anikett:~/myproject$ truffle generate ./build/contracts/Wallot.json -o . -p /home/anikett/Documents/workspace-sts-3.9.9.RELEASE/JavaEthereumConnectionExample/src/main/java/com/ethereum/connect.javaethereum.wrapper
1

If you are trying to generate a Java smart contract wrapper you should use the web3j cli. You can still use truffles contract schema.

$ web3j truffle generate [--javaTypes|--solidityTypes] /path/to/<truffle-smart-contract-output>.json -o /path/to/src/main/java -p com.your.organisation.name

https://web3j.readthedocs.io/en/latest/smart_contracts.html

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.