MCPcopy Create free account
hub / github.com/CPChain/chain / toFilterArg

Function toFilterArg

api/cpclient/cpclient.go:470–481  ·  view source on GitHub ↗
(q cpchain.FilterQuery)

Source from the content-addressed store, hash-verified

468}
469
470func toFilterArg(q cpchain.FilterQuery) interface{} {
471 arg := map[string]interface{}{
472 "fromBlock": toBlockNumArg(q.FromBlock),
473 "toBlock": toBlockNumArg(q.ToBlock),
474 "address": q.Addresses,
475 "topics": q.Topics,
476 }
477 if q.FromBlock == nil {
478 arg["fromBlock"] = "0x0"
479 }
480 return arg
481}
482
483// Pending State
484

Callers 2

FilterLogsMethod · 0.85
SubscribeFilterLogsMethod · 0.85

Calls 1

toBlockNumArgFunction · 0.85

Tested by

no test coverage detected