Skip to content

Comments

feat: implement extend_campaign_deadline (#81)#131

Merged
Akshola00 merged 3 commits intoWeb3Novalabs:mainfrom
EDOHWARES:feature/extend-campaign-deadline
Feb 21, 2026
Merged

feat: implement extend_campaign_deadline (#81)#131
Akshola00 merged 3 commits intoWeb3Novalabs:mainfrom
EDOHWARES:feature/extend-campaign-deadline

Conversation

@EDOHWARES
Copy link
Contributor

Overview

This PR implements the `extend_campaign_deadline` functionality, allowing campaign creators to extend their fundraising deadlines if they haven't met their goal yet, while enforcing a maximum extension duration of 90 days.

Implementation Details

  • Added `extend_campaign_deadline` to `CrowdfundingTrait` and implemented it in `CrowdfundingContract`.
  • Enforced Security Restrictions:
    • Requires original creator's signature (`require_auth`).
    • Rejects extensions if the campaign has already reached its funding goal.
    • Limits the extension to a maximum duration of 90 days from the current timestamp.
    • Ensures the new deadline is explicitly further than the previous deadline.
  • Added Test Infrastructure:
    • ✅ `test_extend_campaign_deadline`: Ensures successful updates.
    • ✅ `test_extend_campaign_too_long`: Ensures validation against extensions exceeding 90 days.
    • ✅ `test_extend_campaign_deadline_invalid_auth`: Simulates rejecting operations from malice or impersonation.

Closes #81

@EDOHWARES
Copy link
Contributor Author

@Akshola00 , pls review

Copy link
Contributor

@Akshola00 Akshola00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EDOHWARES thankd for your contribution, please resolve conflicts

@EDOHWARES
Copy link
Contributor Author

@Akshola00 , conflicts resolved

@Akshola00
Copy link
Contributor

lgtm, thanks for your contribution

@Akshola00 Akshola00 merged commit 1f4d4c1 into Web3Novalabs:main Feb 21, 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 extend_campaign_deadline

2 participants