BrightID/Sponsorship-Subscriptions-SmartContracts

Can't filter SponsorshipsAssigned events

Closed this issue · 1 comments

To be able to find out how many sponsorships you personally have assigned to a context, you have to download all SponsorshipAssigned events--including those from all people and for all contexts (not just the relevant ones)--because we didn't add an indexed keyword after the contextName and account parameters to the SponsorshipAssigned event.

Soon there will be too many SponsorshipAssigned events, and there this will become too large to download.

Checking the number of sponsorships assigned to a context by all accounts can still be done using the totalContextBalance() function.

I forgot about the contextBalance function that does the same thing, so filtering these events isn't necessary.