以太坊转账
废话不多说直接上代码
代码下载地址
https://download.csdn.net/download/u012841825/11021920
github代码 用你们可爱的小手 点一下星星
https://github.com/zcJun/php-eth
<?php
/**
* zcj编写
* 以太坊开发技术交流群
* 大家一起相互学习
* QQ群:588927820
* ETH 主网捐助地址:0xE573ee84bAf2939572dB0A8FA296e559d013bbE3
*/
require_once "vendor/autoload.php";
use xtype\Ethereum\Client as EthereumClient;
use xtype\Ethereum\Utils;
$client = new EthereumClient([
'base_uri' => 'https://ropsten.infura.io/v3/31090cb004d34600b113fa3e4203e9b5',
'timeout' => 30,
]);
echo "<pre>";
//print_r($client->eth_getBlockByNumber('0x' . dechex(5199525), false));
$client->addPrivateKeys(['0090C437D372DF6625FE3D1E9EE34FD3C1D94DCB9F249EC7D6705964C1C52141']);
//