From 3cf3854529f75b40d8f3781058b513a04a93ca70 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Wed, 2 Jun 2021 04:10:37 -0400 Subject: [PATCH] rpc: fix msg from address (#54) --- ethereum/rpc/eth_api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ethereum/rpc/eth_api.go b/ethereum/rpc/eth_api.go index 364bd384..75bf544d 100644 --- a/ethereum/rpc/eth_api.go +++ b/ethereum/rpc/eth_api.go @@ -542,6 +542,7 @@ func (e *PublicEthAPI) doCall( fromAddr = sdk.AccAddress(args.From.Bytes()) } else { fromAddr = sdk.AccAddress(common.Address{}.Bytes()) + args.From = &common.Address{} } _, seq, err := e.clientCtx.AccountRetriever.GetAccountNumberSequence(e.clientCtx, fromAddr) @@ -551,7 +552,7 @@ func (e *PublicEthAPI) doCall( // Create new call message msg := evmtypes.NewMsgEthereumTx(e.chainIDEpoch, seq, args.To, value, gas, gasPrice, data, accessList) - msg.From = fromAddr.String() + msg.From = args.From.String() if err := msg.ValidateBasic(); err != nil { return nil, err