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

Figure out a new way of determining length #2049

Open
fubuloubu opened this issue May 2, 2024 · 1 comment
Open

Figure out a new way of determining length #2049

fubuloubu opened this issue May 2, 2024 · 1 comment

Comments

@fubuloubu
Copy link
Member

This code queries every single log ever made to determine len(ContractEvent)

def __len__(self):
logs = self.provider.get_contract_logs(self.log_filter)
return sum(1 for _ in logs)

Copy link

linear bot commented May 2, 2024

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

No branches or pull requests

1 participant