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
7c2c7f86
Commit
7c2c7f86
authored
Mar 17, 2022
by
李伟@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate tx as hex
parent
6d97e4ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
client_eth_test.go
client_eth_test.go
+37
-0
No files found.
client_eth_test.go
0 → 100644
View file @
7c2c7f86
package
multisend
import
(
"testing"
)
func
TestSendTx
(
t
*
testing
.
T
)
{
clientFactory
,
exists
:=
clientFactories
[
"ethclient"
]
if
!
exists
{
t
.
Error
(
"can't find ethclient in clientFactories"
)
}
cfg
:=
Config
{
SendTxPrivateKey
:
"a1994419e9b06a7b27e8d094840ae26a6b7806633bb8be55a1a835f1620d8cec"
,
}
client
,
err
:=
clientFactory
.
NewClient
(
cfg
)
if
err
!=
nil
{
t
.
Errorf
(
err
.
Error
())
}
tx
,
err
:=
client
.
BuildTx
(
nil
)
if
err
!=
nil
{
t
.
Errorf
(
err
.
Error
())
}
txAsBytes
,
err
:=
tx
.
MarshalBinary
()
if
err
!=
nil
{
t
.
Errorf
(
err
.
Error
())
}
t
.
Logf
(
"txAsHex: %x
\n
"
,
txAsBytes
)
}
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