public void Assigns_Event_Signature_To_Topic0() { var filter = new NewFilterInputBuilder <TransferEvent>().Build(); var eventAbi = ABITypedRegistry.GetEvent <TransferEvent>(); Assert.Equal(eventAbi.Sha3Signature.EnsureHexPrefix(), filter.Topics.FirstOrDefault()); Assert.False(filter.IsTopicFiltered(1)); Assert.False(filter.IsTopicFiltered(2)); Assert.False(filter.IsTopicFiltered(3)); }
public void Can_Assign_To_Topic3() { var value = BigInteger.One; var filter = new NewFilterInputBuilder <TransferEvent>() .AddTopic(template => template.Value, value) .Build(); Assert.False(filter.IsTopicFiltered(1)); Assert.False(filter.IsTopicFiltered(2)); Assert.Equal("0x0000000000000000000000000000000000000000000000000000000000000001", filter.GetFirstTopicValueAsString(3)); }
public void Can_Assign_To_Topic2() { var to = "0xc14934679e71ef4d18b6ae927fe2b953c7fd9b91"; var filter = new NewFilterInputBuilder <TransferEvent>() .AddTopic(template => template.To, to) .Build(); Assert.False(filter.IsTopicFiltered(1)); Assert.Equal("0x000000000000000000000000c14934679e71ef4d18b6ae927fe2b953c7fd9b91", filter.GetFirstTopicValueAsString(2)); Assert.False(filter.IsTopicFiltered(3)); }