为什么Web3.php发送交易码没有私钥?

问题描述 投票:0回答:1

我想使用

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.

现在我的主要问题是,必须在代码中提供我的私钥来签署发送的交易。

php web3php
1个回答
0
投票

我也有同样的问题,请问你这道题成功了吗?

© www.soinside.com 2019 - 2024. All rights reserved.