From 129531b03e020bab6471e91e6866cf1e723b2c58 Mon Sep 17 00:00:00 2001 From: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> Date: Thu, 8 Dec 2022 02:47:39 -0500 Subject: [PATCH 1/3] Update chain.go --- cli/chain.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/chain.go b/cli/chain.go index 20a9ff654..2eaebb25a 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -1667,6 +1667,9 @@ var ChainInvokeEVMCmd = &cli.Command{ &cli.StringFlag{ Name: "from", 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 { @@ -1726,11 +1729,12 @@ var ChainInvokeEVMCmd = &cli.Command{ fromAddr = addr } - + + val := abi.NewTokenAmount(cctx.Int64("value")) msg := &types.Message{ To: addr, From: fromAddr, - Value: big.Zero(), + Value: val, Method: abi.MethodNum(2), Params: params, } From 3a6d37c6a278332e024b5d1f66b226f295a38418 Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Thu, 8 Dec 2022 02:56:13 -0500 Subject: [PATCH 2/3] make jen --- documentation/en/cli-lotus.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index d17b915e3..35bc11760 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -2454,7 +2454,8 @@ USAGE: lotus chain invoke-evm-actor [command options] address contract-entry-point [input-data] OPTIONS: - --from value optionally specify the account to use for sending the exec message + --from value optionally specify the account to use for sending the exec message + --value value optionally specify the value to be sent with the invokation message (default: 0) ``` From 3bb12f44179f04570356636d4a4c6f1ab9ccec6e Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Thu, 8 Dec 2022 02:56:45 -0500 Subject: [PATCH 3/3] fmt --- cli/chain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/chain.go b/cli/chain.go index 2eaebb25a..8e8bada52 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -1667,7 +1667,7 @@ var ChainInvokeEVMCmd = &cli.Command{ &cli.StringFlag{ Name: "from", Usage: "optionally specify the account to use for sending the exec message", - },&cli.IntFlag{ + }, &cli.IntFlag{ Name: "value", Usage: "optionally specify the value to be sent with the invokation message", }, @@ -1729,7 +1729,7 @@ var ChainInvokeEVMCmd = &cli.Command{ fromAddr = addr } - + val := abi.NewTokenAmount(cctx.Int64("value")) msg := &types.Message{ To: addr,