From 17a0baf1a9817c7a23cea7d214b59529005cc87c Mon Sep 17 00:00:00 2001 From: ericlee Date: Thu, 28 Dec 2023 23:40:51 +0800 Subject: [PATCH] feat: add input field for eth call --- l2geth/internal/ethapi/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/l2geth/internal/ethapi/api.go b/l2geth/internal/ethapi/api.go index b4a994e0c8375..ab3da5e332107 100755 --- a/l2geth/internal/ethapi/api.go +++ b/l2geth/internal/ethapi/api.go @@ -801,6 +801,7 @@ type CallArgs struct { GasPrice *hexutil.Big `json:"gasPrice"` Value *hexutil.Big `json:"value"` Data *hexutil.Bytes `json:"data"` + Input *hexutil.Bytes `json:"input"` } // account indicates the overriding fields of account during the execution of @@ -887,7 +888,9 @@ func DoCall(ctx context.Context, b Backend, args CallArgs, blockNrOrHash rpc.Blo var data []byte if args.Data != nil { data = []byte(*args.Data) - } + } else if args.Input != nil { + data = []byte(*args.Input) + } // Currently, the blocknumber and timestamp actually refer to the L1BlockNumber and L1Timestamp // attached to each transaction. We need to modify the blocknumber and timestamp to reflect this,