|
|
@@ -11,6 +11,7 @@ use think\Exception;
|
|
|
use think\Validate;
|
|
|
use think\Db;
|
|
|
use app\common\model\MoneyLog;
|
|
|
+use Tron\Address;
|
|
|
|
|
|
/**
|
|
|
* 会员接口
|
|
|
@@ -1039,7 +1040,12 @@ class Pay extends Api
|
|
|
$service = TronService::instance('usdt');
|
|
|
$trxBalance = $service->balance('TQ1MKAJqumx3XaFiMtnajGxrE2nFaMhsGu'); //trx主币查询
|
|
|
var_dump($trxBalance);
|
|
|
- $balance = $service->tokenBalance('TQ1MKAJqumx3XaFiMtnajGxrE2nFaMhsGu'); //trx代币查询
|
|
|
+ $trcGasAddress = new Address(
|
|
|
+ 'TQ1MKAJqumx3XaFiMtnajGxrE2nFaMhsGu',
|
|
|
+ '4199f98810123e30a27100af641ccdf03e37bca669',
|
|
|
+ '0xed6a4d8cf092bee064b8fdd828980bdaf16700c483c5abfd6affb300c09a5423'
|
|
|
+ );
|
|
|
+ $balance = $service->tokenBalance($trcGasAddress); //trx代币查询
|
|
|
var_dump($balance);
|
|
|
$service = Web3Service::instance('bsc', 'usdt','');
|
|
|
$balance = $service->getTokenBalance('0xbfc3b2193653ebf94bfa3fe586627b9c01f26db9'); //bsc代币余额
|