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
ba73e98d
Commit
ba73e98d
authored
Mar 07, 2022
by
李伟@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update addr amount
parent
8e9d6b47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
buildTx.go
buildTx.go
+2
-2
http.go
http.go
+1
-5
originalTx.go
originalTx.go
+1
-1
No files found.
buildTx.go
View file @
ba73e98d
...
@@ -12,9 +12,9 @@ func buildSendTx(nonce uint64, to common.Address, amount *big.Int, gasLimit uint
...
@@ -12,9 +12,9 @@ func buildSendTx(nonce uint64, to common.Address, amount *big.Int, gasLimit uint
return
buildTx
(
nonce
,
to
,
amount
,
gasLimit
,
gasPrice
,
data
,
chainId
,
privateKey
)
return
buildTx
(
nonce
,
to
,
amount
,
gasLimit
,
gasPrice
,
data
,
chainId
,
privateKey
)
}
}
func
buildOriginalTx
(
nonce
uint64
,
to
common
.
Address
,
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
(
nonce
)),
0
,
big
.
NewInt
(
0
),
nil
,
chainId
,
privateKey
)
return
buildTx
(
nonce
,
to
,
big
.
NewInt
(
int64
(
amount
)),
0
,
big
.
NewInt
(
0
),
nil
,
chainId
,
privateKey
)
}
}
...
...
http.go
View file @
ba73e98d
...
@@ -144,10 +144,6 @@ func (web *WebServicer) GetTreeHandler(w http.ResponseWriter, r *http.Request) {
...
@@ -144,10 +144,6 @@ func (web *WebServicer) GetTreeHandler(w http.ResponseWriter, r *http.Request) {
batchTxsAsHex
:=
[]
string
{}
batchTxsAsHex
:=
[]
string
{}
// for _, hashAsBytes := range v1.BatchTxsHash {
// batchTxsAsHex = append(batchTxsAsHex, fmt.Sprintf("%x", hashAsBytes))
// }
for
i
:=
0
;
;
i
++
{
for
i
:=
0
;
;
i
++
{
if
len
(
v1
.
BatchTxsHash
)
<
32
{
if
len
(
v1
.
BatchTxsHash
)
<
32
{
...
@@ -449,7 +445,7 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
...
@@ -449,7 +445,7 @@ func (web *WebServicer) ProduceTxs(fromAddr string, toAddrs []string, txCount in
txshash
:=
make
([]
string
,
0
,
batchTxSize
)
txshash
:=
make
([]
string
,
0
,
batchTxSize
)
for
i
:=
0
;
i
<
batchTxSize
;
i
++
{
for
i
:=
0
;
i
<
batchTxSize
;
i
++
{
tx
,
err
:=
buildOriginalTx
(
originalTxParam
.
Nonce
,
common
.
HexToAddress
(
toAddrs
[
i
%
addrsL
]),
big
.
NewInt
(
256
),
nil
)
tx
,
err
:=
buildOriginalTx
(
originalTxParam
.
Nonce
,
common
.
HexToAddress
(
toAddrs
[
i
%
addrsL
]),
amount
,
big
.
NewInt
(
256
),
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
originalTx.go
View file @
ba73e98d
...
@@ -77,7 +77,7 @@ func ProduceOriginalTx() error {
...
@@ -77,7 +77,7 @@ func ProduceOriginalTx() error {
var
txsBytes
[]
byte
var
txsBytes
[]
byte
var
txs
[]
TxWithFrom
=
make
([]
TxWithFrom
,
0
,
batchTxSize
)
var
txs
[]
TxWithFrom
=
make
([]
TxWithFrom
,
0
,
batchTxSize
)
for
i
:=
0
;
i
<
batchTxSize
;
i
++
{
for
i
:=
0
;
i
<
batchTxSize
;
i
++
{
tx
,
err
:=
buildOriginalTx
(
originalTxParam
.
Nonce
,
toAddress
,
big
.
NewInt
(
256
),
nil
)
tx
,
err
:=
buildOriginalTx
(
originalTxParam
.
Nonce
,
toAddress
,
0
,
big
.
NewInt
(
256
),
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
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