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

Method SubscribeFilterLogs

api/cpclient/cpclient.go:466–468  ·  view source on GitHub ↗

SubscribeFilterLogs subscribes to the results of a streaming filter query.

(ctx context.Context, q cpchain.FilterQuery, ch chan<- types.Log)

Source from the content-addressed store, hash-verified

464
465// SubscribeFilterLogs subscribes to the results of a streaming filter query.
466func (c *Client) SubscribeFilterLogs(ctx context.Context, q cpchain.FilterQuery, ch chan<- types.Log) (cpchain.Subscription, error) {
467 return c.c.EthSubscribe(ctx, ch, "logs", toFilterArg(q))
468}
469
470func toFilterArg(q cpchain.FilterQuery) interface{} {
471 arg := map[string]interface{}{

Callers

nothing calls this directly

Calls 2

toFilterArgFunction · 0.85
EthSubscribeMethod · 0.80

Tested by

no test coverage detected