Skip to content

feat: campaign edit mode, top sponsor token rewards, and rainy season… - #763

Open
sonoflawal wants to merge 2 commits into
Fundable-Protocol:mainfrom
sonoflawal:main
Open

feat: campaign edit mode, top sponsor token rewards, and rainy season…#763
sonoflawal wants to merge 2 commits into
Fundable-Protocol:mainfrom
sonoflawal:main

Conversation

@sonoflawal

Copy link
Copy Markdown
Contributor

… CO2 bonus multiplier

  • Resolve feat(frontend): Campaign edit mode - creators can update details before launch #721: Campaign edit mode allowing creators to update details before launch

    • Updated Campaign interface in web types (apps/web/src/types/index.ts) with optional name and description fields.
    • Created updateCampaignSchema in apps/web/src/lib/validations.ts for validating pre-launch edits (name, description, goal amount, deadline).
    • Implemented CampaignEditModal.tsx in apps/web/src/components/modules/campaign/ with state management, form validation, and pre-launch status checks.
    • Added PATCH /api/campaigns/[id] route in apps/web/src/app/api/campaigns/[id]/route.ts for server-side update processing.
    • Added updateCampaign mutation to GraphQL resolvers (apps/web/src/graphql/resolvers.ts).
  • Resolve feat(contract): Campaign token rewards - issue ERC20 tokens to top sponsors #719: Campaign token rewards for top sponsors

    • Updated contracts/campaign-funding/src/lib.rs with RewardToken and CampaignSponsors persistent storage keys.
    • Extended contribute to track unique campaign sponsors per campaign.
    • Added set_reward_token and get_reward_token contract administration functions.
    • Added distribute_sponsor_rewards function in CampaignFundingContract to sort top 10 sponsors by contribution and distribute ERC20 governance tokens proportionally.
    • Emitted SponsorRewardsDistributed event for on-chain auditability.
  • Resolve feat(contract): Campaign bonus multiplier - double impact for rainy season planting #714: Campaign bonus multiplier for rainy season planting

    • Added get_month_from_timestamp helper in contracts/campaign-funding/src/lib.rs using civil date conversion to identify campaign creation month.
    • Implemented calculate_co2_multiplier and get_co2_multiplier to assign a 2x bonus CO2 multiplier for campaigns created between May and October (months 5 to 10 inclusive) and 1x otherwise.
    • Included co2_multiplier in Campaign record and CampaignCreatedEvent.
    • Updated calculateCo2Offset in apps/web/src/lib/co2-impact.ts to apply the 2x rainy season bonus multiplier to projected annual and 10-year CO2 offset calculations.

Closes #721
Closes #719
Closes #714

… CO2 bonus multiplier

- Resolve Fundable-Protocol#721: Campaign edit mode allowing creators to update details before launch
  * Updated Campaign interface in web types (apps/web/src/types/index.ts) with optional name and description fields.
  * Created updateCampaignSchema in apps/web/src/lib/validations.ts for validating pre-launch edits (name, description, goal amount, deadline).
  * Implemented CampaignEditModal.tsx in apps/web/src/components/modules/campaign/ with state management, form validation, and pre-launch status checks.
  * Added PATCH /api/campaigns/[id] route in apps/web/src/app/api/campaigns/[id]/route.ts for server-side update processing.
  * Added updateCampaign mutation to GraphQL resolvers (apps/web/src/graphql/resolvers.ts).

- Resolve Fundable-Protocol#719: Campaign token rewards for top sponsors
  * Updated contracts/campaign-funding/src/lib.rs with RewardToken and CampaignSponsors persistent storage keys.
  * Extended contribute to track unique campaign sponsors per campaign.
  * Added set_reward_token and get_reward_token contract administration functions.
  * Added distribute_sponsor_rewards function in CampaignFundingContract to sort top 10 sponsors by contribution and distribute ERC20 governance tokens proportionally.
  * Emitted SponsorRewardsDistributed event for on-chain auditability.

- Resolve Fundable-Protocol#714: Campaign bonus multiplier for rainy season planting
  * Added get_month_from_timestamp helper in contracts/campaign-funding/src/lib.rs using civil date conversion to identify campaign creation month.
  * Implemented calculate_co2_multiplier and get_co2_multiplier to assign a 2x bonus CO2 multiplier for campaigns created between May and October (months 5 to 10 inclusive) and 1x otherwise.
  * Included co2_multiplier in Campaign record and CampaignCreatedEvent.
  * Updated calculateCo2Offset in apps/web/src/lib/co2-impact.ts to apply the 2x rainy season bonus multiplier to projected annual and 10-year CO2 offset calculations.

Closes Fundable-Protocol#721
Closes Fundable-Protocol#719
Closes Fundable-Protocol#714
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@sonoflawal Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 9340b1a2-5ca9-4829-81a6-0372c0db2104


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Utilitycoder Utilitycoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix up the merge conflict and update your PR. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp

@Idrhas

Idrhas commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps

1 similar comment
@Idrhas

Idrhas commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants