Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wallet
token
Commits
64649198
Commit
64649198
authored
May 07, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/airdrop' into 'master'
Feature/airdrop See merge request
!7
parents
ecc3d816
85334667
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
CoinTransferController.php
backend/controllers/CoinTransferController.php
+4
-15
No files found.
backend/controllers/CoinTransferController.php
View file @
64649198
...
@@ -67,27 +67,16 @@ class CoinTransferController extends BaseController
...
@@ -67,27 +67,16 @@ class CoinTransferController extends BaseController
public
function
actionBatchTransfer
()
public
function
actionBatchTransfer
()
{
{
$model
=
CoinTransfer
::
find
()
->
where
([
'
hash'
=>
'-----------------'
])
->
limit
(
30
)
->
all
();
$model
=
CoinTransfer
::
find
()
->
where
([
'
status'
=>
0
])
->
limit
(
30
)
->
all
();
foreach
(
$model
as
$val
){
foreach
(
$model
as
$val
){
echo
$val
->
address
.
"<br/>"
;
$id
=
$val
->
id
;
$to
=
$val
->
address
;
$to
=
$val
->
address
;
#$amount = str_replace(" TSC", "", $val->amount) * 1e8;
$amount
=
$val
->
amount
*
1e8
;
$amount
=
$val
->
amount
*
1e8
;
$fee
=
100000
;
$fee
=
100000
;
$note
=
''
;
$note
=
''
;
$execer
=
'user.p.tschain.coins'
;
$execer
=
'user.p.tschain.coins'
;
// $isExist = CoinTransfer::find()->where(['address' => $val->address, 'status' => 1])->one();
$isExist
=
CoinTransfer
::
find
()
->
where
([
'address'
=>
$val
->
address
,
'status'
=>
1
])
->
one
();
// if($isExist){
if
(
$isExist
)
continue
;
// $updateModel = CoinTransfer::findOne($val->id);
// $updateModel->hash = '-----------------';
// $updateModel->status = 1;
// $updateModel->save();
// continue;
// }
$service
=
new
Chain33Service
();
$service
=
new
Chain33Service
();
$createRawTransaction
=
$service
->
createRawTransaction
(
$to
,
$amount
,
$fee
,
$note
,
$execer
);
$createRawTransaction
=
$service
->
createRawTransaction
(
$to
,
$amount
,
$fee
,
$note
,
$execer
);
...
@@ -106,7 +95,7 @@ class CoinTransferController extends BaseController
...
@@ -106,7 +95,7 @@ class CoinTransferController extends BaseController
}
}
$sign_str
=
$signRawTx
[
'result'
];
$sign_str
=
$signRawTx
[
'result'
];
$result
=
$service
->
sendTransaction
(
$sign_str
);
$result
=
$service
->
sendTransaction
(
$sign_str
);
var_dump
(
$result
);
exit
;
if
(
0
!=
$result
[
'code'
]){
if
(
0
!=
$result
[
'code'
]){
continue
;
continue
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment