- 新增 Test 命令类,实现 TRON 和 BSC/ETH网络的区块链操作示例- 添加 get_token_info 和 do_request 辅助函数,用于获取代币信息和发起 CURL 请求 - 在 command.php 中注册 Test命令 - 新增 .idea 目录下的 IDE 配置文件,优化开发环境
@@ -58,7 +58,7 @@ class Transactor
{
$cb = new Callback;
$this->web3->eth->getTransactionCount($address, 'pending', $cb);
- return '0x' . $cb->result->toHex();
+ return '0x' . ($cb->result->toHex() ?: '0');
}
protected function estimateGasPrice()