Skip to content

feat: implement SEP-41 token donation support#201

Merged
ayshadogo merged 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-191-sep41-token-donation
May 30, 2026
Merged

feat: implement SEP-41 token donation support#201
ayshadogo merged 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-191-sep41-token-donation

Conversation

@YaronZaki
Copy link
Copy Markdown
Contributor

Summary

Implements SEP-41 compatible token transfers in the donate function.

Changes

  • Added donate(env, donor, amount, asset: AssetInfo) to CampaignContract
  • For AssetInfo::Stellar(token_address): calls token::Client::new(&env, &token_address).transfer() to move funds from donor to contract
  • For AssetInfo::Native: records donation without on-chain token transfer (native XLM handled by Stellar network)
  • Emits donation_received event on success

Closes #191

- Add donate() function to CampaignContract
- Use token::Client::new(&env, &token_address).transfer() for SEP-41 tokens
- Support both Native XLM and Stellar token (AssetInfo::Stellar) donations
- Emit donation_received event on success

Closes Dfunder#191
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@YaronZaki 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

Nice work

@ayshadogo ayshadogo merged commit 73139ea into Dfunder:main May 30, 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.

Implement SEP-41 token (USDC/AQUA) donation support

2 participants