Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Event Filter support filter by TypeTag improvement #3614

Closed
jolestar opened this issue Aug 4, 2022 · 3 comments · Fixed by #3638
Closed

[Feature Request] Event Filter support filter by TypeTag improvement #3614

jolestar opened this issue Aug 4, 2022 · 3 comments · Fixed by #3638
Labels
enhancement Enhancement

Comments

@jolestar
Copy link
Member

jolestar commented Aug 4, 2022

Feature Request

Describe the Feature Request

Event Filter 通过类型过滤的时候,如果是带泛型的类型,无法实现根据不带泛型类型的参数过滤

比如:

0x1::NFT::MintEvent<NFTMeta>

过滤的时候必须是:

0x1::NFT::MintEvent<0xxxxx:MyNFT:MyNFTMeta>

而不能直接通过

0x1::NFT::MintEvent

得到所有的 MintEvent

Related Code

pub fn matching(&self, block_number: BlockNumber, e: &ContractEvent) -> bool {
if self.from_block <= block_number
&& block_number <= self.to_block
&& (self.event_keys.is_empty() || self.event_keys.contains(e.key()))
&& (self.addrs.is_empty() || self.addrs.contains(&e.key().get_creator_address()))
&& (self.type_tags.is_empty() || self.type_tags.contains(e.type_tag()))
{
return true;
}
false

#3612 这个问题类似

@jiangying000
Copy link
Collaborator

这个如何复现?

@jolestar
Copy link
Member Author

jolestar commented Aug 7, 2022

这个如何复现?

dev subscribe event --type_tag

@YouNeedWork
Copy link
Contributor

这个issue 可以关闭了,老师已经在 #3638 解决了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
3 participants