我想使用
Web3.php
,以便将合约交易发送到以太坊区块链。
我使用以下代码:
$web3 = new Web3('... node address ...');
$contract = new Contract($web3->provider, $contractAbi);
$contract->at($contractAddress)->send($methodName, $param1, $param2,
function($err, $result) {
...
});
它产生这个错误:
Uncaught RuntimeException: Wrong type of eth_sendTransaction method argument 0.
现在我的主要问题是,必须在代码中提供我的私钥来签署发送的交易。
我也有同样的问题,请问你这道题成功了吗?