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
e1aadc97
Commit
e1aadc97
authored
Feb 21, 2022
by
李伟@五瓣科技
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
f711527d
d32c2dee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
client_eth.go
client_eth.go
+5
-2
No files found.
client_eth.go
View file @
e1aadc97
...
@@ -89,6 +89,7 @@ func (c *EthClient) GenerateTx() (*types.Transaction, error) {
...
@@ -89,6 +89,7 @@ func (c *EthClient) GenerateTx() (*types.Transaction, error) {
// if err != nil {
// if err != nil {
// return nil, err
// return nil, err
// }
// }
txs
,
md5data
,
err
:=
getBatchTx
(
3
,
c
.
NodeRpcURL
,
false
)
txs
,
md5data
,
err
:=
getBatchTx
(
3
,
c
.
NodeRpcURL
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -101,8 +102,10 @@ func (c *EthClient) GenerateTx() (*types.Transaction, error) {
...
@@ -101,8 +102,10 @@ func (c *EthClient) GenerateTx() (*types.Transaction, error) {
// })
// })
//fmt.Printf("gasLimit: %d gasPrice: %d \n", gasLimit, gasPrice)
//fmt.Printf("gasLimit: %d gasPrice: %d \n", gasLimit, gasPrice)
tx
:=
types
.
NewTransaction
(
nonce
,
toAddress
,
big
.
NewInt
(
10000000000000
),
24894
,
big
.
NewInt
(
1000000000
),
md5data
)
tx
:=
types
.
NewTransaction
(
nonce
,
toAddress
,
big
.
NewInt
(
10000000000000
),
24894
,
big
.
NewInt
(
1000000000
),
md5data
)
//tx := types.NewTransaction(nonce, toAddress, big.NewInt(10000000000000), 24894, big.NewInt(1000000000), data)
//tx := types.NewTransaction(nonce, toAddress, big.NewInt(10000000000000), 24894, big.NewInt(1000000000), data)
signedTx
,
err
:=
types
.
SignTx
(
tx
,
types
.
NewEIP155Signer
(
big
.
NewInt
(
256
)),
privateKeyAsECDSA
)
signedTx
,
err
:=
types
.
SignTx
(
tx
,
types
.
NewEIP155Signer
(
big
.
NewInt
(
256
)),
privateKeyAsECDSA
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -190,9 +193,9 @@ func getBatchTx(txNum int, nodeUrl string, signed bool) ([]Md5tx, []byte, error)
...
@@ -190,9 +193,9 @@ func getBatchTx(txNum int, nodeUrl string, signed bool) ([]Md5tx, []byte, error)
}
}
if
i
==
txNum
{
if
i
==
txNum
{
err
=
rdb
.
LPush
(
ctx
,
"list"
,
md5TxAsJson
)
.
Err
()
err
=
rdb
.
LPush
(
ctx
,
"list
-liwei
"
,
md5TxAsJson
)
.
Err
()
}
else
{
}
else
{
rdb
.
LPush
(
ctx
,
"list"
,
md5TxAsJson
)
rdb
.
LPush
(
ctx
,
"list
-liwei
"
,
md5TxAsJson
)
}
}
if
err
!=
nil
{
if
err
!=
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