![](/img/trans.png)
[英]How to call the smart contract methods from android app using web3j
[英]How to call Ethereum smart contract methods through transactions?
我可以使用Java
和Web3j
在以太坊中进行交易。
现在,我希望能够与smart contract
进行交互。 但是由于我在构建wrapper
遇到问题,所以我想知道是否可以通过在事务中发送数据来做到这一点。 如果是这样,怎么做?
尝试以下命令来构建包装器:
solc YourSmartContract.sol --bin --abi --optimize -o ./
web3j solidity generate YourSmartContract.bin YourSmartContract.abi -o /path/to/yourSrc/main/java -p your.application.id
然后它将生成一个Java文件,您可以从中调用方法与智能合约进行交互。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.