fix: msg signing with delegated keys and send cli changes (#10056)
* fix msg signing with delegated keys and send cli changes * make gen and docsgen * address comments
This commit is contained in:
+17
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/chain/types/ethtypes"
|
||||
)
|
||||
|
||||
var sendCmd = &cli.Command{
|
||||
@@ -24,6 +25,10 @@ var sendCmd = &cli.Command{
|
||||
Name: "from",
|
||||
Usage: "optionally specify the account to send funds from",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "from-eth-addr",
|
||||
Usage: "optionally specify the eth addr to send funds from",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "gas-premium",
|
||||
Usage: "specify gas price to use in AttoFIL",
|
||||
@@ -98,6 +103,18 @@ var sendCmd = &cli.Command{
|
||||
}
|
||||
|
||||
params.From = addr
|
||||
} else if from := cctx.String("from-eth-addr"); from != "" {
|
||||
eaddr, err := ethtypes.ParseEthAddress(from)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
faddr, err := eaddr.ToFilecoinAddress()
|
||||
if err != nil {
|
||||
fmt.Println("error on conversion to faddr")
|
||||
return err
|
||||
}
|
||||
fmt.Println("f4 addr: ", faddr)
|
||||
params.From = faddr
|
||||
}
|
||||
|
||||
if cctx.IsSet("gas-premium") {
|
||||
|
||||
Reference in New Issue
Block a user