java如何调用合约

1、获取一份合约

2、编译合约生成 .bin和.abi文件

3、生成.java文件 命令:

web3j solidity generate [--javaTypes|--solidityTypes] /path/to/.bin /path/to/.abi -o /path/to/src/main/java -p com.your.organisation.name

 

具体操作请看官网:

https://docs.web3j.io/smart_contracts.html?highlight=transactionmanager

https://docs.web3j.io/command_line.html

https://docs.web3j.io/smart_contracts.html#smart-contract-wrappers

https://github.com/web3j/web3j/tree/master/codegen/src/test/resources/solidity

你可能感兴趣的:(区块链)