public LogFilter(int id, BlockParameter fromBlock, BlockParameter toBlock, AddressFilter addressFilter, TopicsFilter topicsFilter) : base(id) { FromBlock = fromBlock; ToBlock = toBlock; AddressFilter = addressFilter; TopicsFilter = topicsFilter; }
public LogFilter(int id, FilterBlock fromBlock, FilterBlock toBlock, AddressFilter addressFilter, TopicsFilter topicsFilter) : base(id) { FromBlock = fromBlock; ToBlock = toBlock; AddressFilter = addressFilter; TopicsFilter = topicsFilter; }
public void Correctly_creates_topics_filter(IEnumerable <object> topics, TopicsFilter expected) { BlockParameter from = new(100); BlockParameter to = new(BlockParameterType.Latest); FilterStore store = new(); LogFilter filter = store.CreateLogFilter(from, to, null, topics); filter.TopicsFilter.Should().BeEquivalentTo(expected, c => c.ComparingByValue <TopicsFilter>()); }
public bool Accepts(ref LogEntryStructRef logEntry) => AddressFilter.Accepts(ref logEntry.LoggersAddress) && TopicsFilter.Accepts(ref logEntry);
public bool Matches(ref BloomStructRef bloom) => AddressFilter.Matches(ref bloom) && TopicsFilter.Matches(ref bloom);
public bool Matches(Core.Bloom bloom) => AddressFilter.Matches(bloom) && TopicsFilter.Matches(bloom);
public bool Accepts(LogEntry logEntry) => AddressFilter.Accepts(logEntry.LoggersAddress) && TopicsFilter.Accepts(logEntry);
public bool Matches(Bloom bloom) { return(AddressFilter.Matches(bloom) && TopicsFilter.Matches(bloom)); }
public FilterBuilder WithTopicExpressions(params TopicExpression[] expressions) { _topicsFilter = new TopicsFilter(expressions.ToArray()); return(this); }