Skip to content

Comments

feat: implement get_active_campaign_count#106

Merged
Akshola00 merged 5 commits intoWeb3Novalabs:mainfrom
ryzen-xp:feat_get_active_campaign_count
Feb 20, 2026
Merged

feat: implement get_active_campaign_count#106
Akshola00 merged 5 commits intoWeb3Novalabs:mainfrom
ryzen-xp:feat_get_active_campaign_count

Conversation

@ryzen-xp
Copy link
Contributor

Description

Closes #103

What

Adds get_active_campaign_count to return the number of campaigns whose deadline hasn't passed yet.

Implementation

Iterates over AllCampaigns already maintained by create_campaign. No new storage keys needed.

Tests

  • Empty state returns 0
  • All active campaigns counted correctly
  • All expired returns 0
  • Boundary: exactly at deadline vs one second before
  • Count decreases as time advances
  • Fully funded campaign still counts until deadline passes

Screenshots

Screenshot From 2026-02-20 09-33-38

Checklist

@ryzen-xp
Copy link
Contributor Author

hello @Akshola00 , I removed conflict chekc now

@Akshola00
Copy link
Contributor

Thanks
Taking a look now

@Akshola00
Copy link
Contributor

image

Pls fix ci issues

@ryzen-xp
Copy link
Contributor Author

hello @Akshola00 , can you check now

@Akshola00
Copy link
Contributor

Thank you for your contribution
Looks good to me

@Akshola00 Akshola00 merged commit 28aa24b into Web3Novalabs:main Feb 20, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

[FUNCTION] implement get_active_campaign_count

2 participants