Skip to content

feat: campaign storage schema, data structs, and CI workflow fixes#182

Merged
ayshadogo merged 1 commit into
Dfunder:mainfrom
authenticeasy-sys:feat/campaign-storage-schema-166-169
May 28, 2026
Merged

feat: campaign storage schema, data structs, and CI workflow fixes#182
ayshadogo merged 1 commit into
Dfunder:mainfrom
authenticeasy-sys:feat/campaign-storage-schema-166-169

Conversation

@authenticeasy-sys
Copy link
Copy Markdown
Contributor

Summary

Implements issues #166, #167, #168, #169 and fixes CI workflow bugs.

Changes

campaign/src/types.rs (new)

  • DataKey enum: CampaignData, MilestoneData(u32), DonorData(Address), TotalRaised, ContractStatus — implements contracttype for Soroban XDR serialisation
  • CampaignData struct: creator, goal_amount, raised_amount, end_time, status, accepted_assets, milestone_count
  • MilestoneData struct: index, target_amount, description_hash: BytesN<32>, status, released_at: Option<u64>, release_tx: Option<BytesN<32>>; MAX_MILESTONES = 5
  • DonorRecord struct: donor, total_donated, asset, last_donation_time — stored under DataKey::DonorData(donor_address)
  • Supporting enums: CampaignStatus, MilestoneStatus, AssetInfo

campaign/src/storage.rs (new)

  • Persistent storage helpers for CampaignData, MilestoneData, DonorRecord, TotalRaised
  • Temporary storage helpers for ContractStatus

campaign/src/lib.rs

  • Expose pub mod types and pub mod storage

CI workflow fixes

  • Replace deprecated --all flag with --workspace in clippy, test, and WASM build steps
  • Add wasm32v1-none to rust-toolchain.toml targets to match CI configuration

Closes

Closes #166
Closes #167
Closes #168
Closes #169

- Add DataKey enum with CampaignData, MilestoneData(u32), DonorData(Address),
  TotalRaised, ContractStatus variants (closes Dfunder#166)
- Add CampaignData struct with creator, goal_amount, raised_amount, end_time,
  status, accepted_assets, milestone_count fields (closes Dfunder#167)
- Add MilestoneData struct with index, target_amount, description_hash,
  status, released_at, release_tx fields; MAX_MILESTONES=5 (closes Dfunder#168)
- Add DonorRecord struct with donor, total_donated, asset, last_donation_time
  stored under DataKey::DonorData(donor_address) (closes Dfunder#169)
- Add storage module with persistent/temporary storage helpers
- Add supporting types: CampaignStatus, MilestoneStatus, AssetInfo enums
- Fix CI: replace deprecated --all flag with --workspace
- Fix rust-toolchain.toml: add wasm32v1-none target to match CI
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@authenticeasy-sys 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

Copy link
Copy Markdown
Contributor

@ayshadogo ayshadogo left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you for your contribution 🤝

@ayshadogo ayshadogo merged commit e89c6e5 into Dfunder:main May 28, 2026
1 check failed
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.

Define DonorRecord struct Define MilestoneData struct Define CampaignData struct Define campaign contract storage schema

2 participants