Commit 597a0c79 authored by shajiaiming's avatar shajiaiming

fix

parent 2e16fe95
......@@ -394,6 +394,26 @@ class Chain33Service
}
/**
* 查询所有预创建的token GetTokens
* @param string $execer
* @param string $funcName
* @return array
*/
public function getTokens($execer, $funcName)
{
$params = [
'execer' => $execer,
'funcName' => $funcName,
'payload' => [
'status' => 0,
'queryAll' => true,
'symbolOnly' => true
]
];
return $this->send($params, 'Chain33.Query');
}
/**
* @param array $hashes
* @return array
*/
......
......@@ -4,6 +4,7 @@ namespace wallet\controllers;
use common\models\psources\CoinPlatform;
use common\models\psources\CoinSupportedCoin;
use common\service\chain33\Chain33Service;
use Yii;
use wallet\base\BaseController;
......@@ -164,4 +165,26 @@ class IssueChainController extends BaseController
return ['code' => $code, 'msg' => $msg];
}
/**
* 查询所有预创建的token
* @param string execer
* @return array
*/
public function actionGetTokens()
{
$data = null;
$execer = \Yii::$app->request->post('execer', 'token');
$node = Yii::$app->params['chain_nodes']['STO'];
$service = new Chain33Service($node);
$funcName = 'GetTokens';
$result = $service->getTokens('user.p.daitao.token', $funcName);
echo json_encode($result);exit;
$code = 0;
$msg = 'success';
doEnd :
return ['code' => $code, 'msg' => $msg];
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment