Commit 86f8fc32 authored by shajiaiming's avatar shajiaiming

Merge branch 'feature/airdrop' into 'master'

空投节点变更 See merge request !441
parents 16e8d879 90439826
...@@ -197,8 +197,11 @@ class AirDropController extends Controller ...@@ -197,8 +197,11 @@ class AirDropController extends Controller
if (empty($record)) { if (empty($record)) {
return 0; return 0;
} }
$node_params = Yii::$app->params['air_drop'];
$service = new Chain33Service($node_params);
foreach ($record as $val) { foreach ($record as $val) {
go(function () use ($val) { go(function () use ($val, $service) {
\Co::sleep(0.5); \Co::sleep(0.5);
$amount = $val->amount * 1e8; $amount = $val->amount * 1e8;
$fee = 1; $fee = 1;
...@@ -209,7 +212,6 @@ class AirDropController extends Controller ...@@ -209,7 +212,6 @@ class AirDropController extends Controller
$val->draw_status = AirDropApplyRecord::STATUS_DRAW_SUEEESS; $val->draw_status = AirDropApplyRecord::STATUS_DRAW_SUEEESS;
$service = new Chain33Service();
$createTokenRawTransaction = $service->createTokenRawTransaction($val->apply->wallet_address, $amount, $isToken, $tokenSymbol, $fee, $note, $execer); $createTokenRawTransaction = $service->createTokenRawTransaction($val->apply->wallet_address, $amount, $isToken, $tokenSymbol, $fee, $note, $execer);
if (0 != $createTokenRawTransaction['code']) { if (0 != $createTokenRawTransaction['code']) {
......
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