Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multisend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
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
李伟@五瓣科技
multisend
Commits
58539737
Commit
58539737
authored
Mar 11, 2022
by
gshx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'heco-testnet' of
https://code.wuban.net.cn/liwei/multisend
into heco-testnet
parents
c1319fd1
d5340652
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
buildTx.go
buildTx.go
+1
-1
http.go
http.go
+10
-1
No files found.
buildTx.go
View file @
58539737
...
@@ -14,7 +14,7 @@ func buildSendTx(nonce uint64, to common.Address, amount *big.Int, gasLimit uint
...
@@ -14,7 +14,7 @@ func buildSendTx(nonce uint64, to common.Address, amount *big.Int, gasLimit uint
func
buildOriginalTx
(
nonce
uint64
,
to
common
.
Address
,
amount
int64
,
chainId
*
big
.
Int
,
privateKey
*
ecdsa
.
PrivateKey
)
(
*
types
.
Transaction
,
error
)
{
func
buildOriginalTx
(
nonce
uint64
,
to
common
.
Address
,
amount
int64
,
chainId
*
big
.
Int
,
privateKey
*
ecdsa
.
PrivateKey
)
(
*
types
.
Transaction
,
error
)
{
return
buildTx
(
nonce
,
to
,
big
.
NewInt
(
int64
(
amount
)
),
0
,
big
.
NewInt
(
0
),
nil
,
chainId
,
privateKey
)
return
buildTx
(
nonce
,
to
,
big
.
NewInt
(
amount
),
0
,
big
.
NewInt
(
0
),
nil
,
chainId
,
privateKey
)
}
}
...
...
http.go
View file @
58539737
...
@@ -401,7 +401,7 @@ type TxParams struct {
...
@@ -401,7 +401,7 @@ type TxParams struct {
BatchTxSize
int64
`json:"batch_tx_size,omitempty"`
BatchTxSize
int64
`json:"batch_tx_size,omitempty"`
BatchTxHashSize
int64
`json:"batch_tx_hash_size,omitempty"`
BatchTxHashSize
int64
`json:"batch_tx_hash_size,omitempty"`
TxCount
int64
`json:"tx_count"`
TxCount
int64
`json:"tx_count"`
EveryTxAmount
int64
`json:"every
_tx_a
mount"`
EveryTxAmount
int64
`json:"every
TxA
mount"`
//Rate int64 `json:"rate"`
//Rate int64 `json:"rate"`
//ExpectedTime int64 `json:"expected_time"`
//ExpectedTime int64 `json:"expected_time"`
}
}
...
@@ -434,6 +434,13 @@ func (web *WebServicer) TxsHandler(w http.ResponseWriter, r *http.Request) {
...
@@ -434,6 +434,13 @@ func (web *WebServicer) TxsHandler(w http.ResponseWriter, r *http.Request) {
}
}
if
len
(
params
.
ToAddrs
)
==
0
{
http
.
Error
(
w
,
fmt
.
Sprintf
(
"expected params.ToAddrs length >0 but actually: %d "
,
len
(
params
.
ToAddrs
)),
http
.
StatusBadRequest
)
return
}
id
:=
uuid
.
New
()
id
:=
uuid
.
New
()
consTxNum
:=
0
consTxNum
:=
0
...
@@ -521,6 +528,8 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
...
@@ -521,6 +528,8 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
tx
,
err
=
buildOriginalTx
(
originalTxParam
.
Nonce
,
common
.
HexToAddress
(
fromAddr
),
requestAmount
,
big
.
NewInt
(
256
),
nil
)
tx
,
err
=
buildOriginalTx
(
originalTxParam
.
Nonce
,
common
.
HexToAddress
(
fromAddr
),
requestAmount
,
big
.
NewInt
(
256
),
nil
)
}
else
{
}
else
{
//fmt.Printf("amount: %d idx: %d addrsL: %d \n", amount, i, addrsL)
tx
,
err
=
buildOriginalTx
(
originalTxParam
.
Nonce
,
common
.
HexToAddress
(
toAddrs
[
i
%
addrsL
]),
amount
,
big
.
NewInt
(
256
),
nil
)
tx
,
err
=
buildOriginalTx
(
originalTxParam
.
Nonce
,
common
.
HexToAddress
(
toAddrs
[
i
%
addrsL
]),
amount
,
big
.
NewInt
(
256
),
nil
)
}
}
...
...
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