Commit 7e26f6ad authored by gshx's avatar gshx

Merge branch 'heco-testnet' of https://code.wuban.net.cn/liwei/multisend into heco-testnet

parents 7c3b3747 ae40c636
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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment