Update chain.go
This commit is contained in:
parent
8504401d69
commit
129531b03e
@ -1667,6 +1667,9 @@ var ChainInvokeEVMCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "from",
|
Name: "from",
|
||||||
Usage: "optionally specify the account to use for sending the exec message",
|
Usage: "optionally specify the account to use for sending the exec message",
|
||||||
|
},&cli.IntFlag{
|
||||||
|
Name: "value",
|
||||||
|
Usage: "optionally specify the value to be sent with the invokation message",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
@ -1726,11 +1729,12 @@ var ChainInvokeEVMCmd = &cli.Command{
|
|||||||
|
|
||||||
fromAddr = addr
|
fromAddr = addr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val := abi.NewTokenAmount(cctx.Int64("value"))
|
||||||
msg := &types.Message{
|
msg := &types.Message{
|
||||||
To: addr,
|
To: addr,
|
||||||
From: fromAddr,
|
From: fromAddr,
|
||||||
Value: big.Zero(),
|
Value: val,
|
||||||
Method: abi.MethodNum(2),
|
Method: abi.MethodNum(2),
|
||||||
Params: params,
|
Params: params,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user