encodeFilterTopics method
Returns the encoded topic
filter, which can be passed to getLogs for fragment (see Specifying Fragments) for the given values
.
Each topic is a 32 byte (64 nibble) DataHexString
.
// Filter that matches all Transfer events
iface.encodeFilterTopics('Transfer', []);
// [
// '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
// ]
// Filter that matches the sender
iface.encodeFilterTopics('Transfer', [
'0x8ba1f109551bD432803012645Ac136ddd64DBA72'
]);
// [
// '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
// '0x0000000000000000000000008ba1f109551bd432803012645ac136ddd64dba72'
// ]
Implementation
List<dynamic> encodeFilterTopics(String topic,
[List<dynamic> values = const []]) =>
impl.encodeFilterTopics(topic, values);