Skip to content

feat: implement SEP-41 token donation support#201

Open
YaronZaki wants to merge 1 commit into
Dfunder:mainfrom
YaronZaki:feature/issue-191-sep41-token-donation
Open

feat: implement SEP-41 token donation support#201
YaronZaki wants to merge 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

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

1 participant