Skip to content

Commit

Permalink
Use latest PendingCallContract
Browse files Browse the repository at this point in the history
  • Loading branch information
kidambisrinivas committed Mar 18, 2024
1 parent d0850c5 commit 990aa9a
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions core/chains/evm/client/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,34 +872,6 @@ func toCallArg(msg ethereum.CallMsg) interface{} {
return arg
}

func (r *rpcClient) PendingCallContract(ctx context.Context, msg interface{}) (val []byte, err error) {
ctx, cancel, ws, http, err := r.makeLiveQueryCtxAndSafeGetClients(ctx)
if err != nil {
return nil, err
}
defer cancel()
lggr := r.newRqLggr().With("callMsg", msg)
message := msg.(ethereum.CallMsg)

lggr.Debug("RPC call: evmclient.Client#PendingCallContract")
start := time.Now()
if http != nil {
val, err = http.geth.PendingCallContract(ctx, message)
err = r.wrapHTTP(err)
} else {
val, err = ws.geth.PendingCallContract(ctx, message)
err = r.wrapWS(err)
}
duration := time.Since(start)

r.logResult(lggr, err, duration, r.getRPCDomain(), "PendingCallContract",
"val", val,
)

return

}

func (r *rpcClient) LatestBlockHeight(ctx context.Context) (*big.Int, error) {
var height big.Int
h, err := r.BlockNumber(ctx)
Expand Down

0 comments on commit 990aa9a

Please sign in to comment.