Skip to content

Feature/asset based discount#163

Merged
Akshola00 merged 10 commits intoWeb3Novalabs:mainfrom
vicajohn:feature/asset-based-discount
Feb 26, 2026
Merged

Feature/asset based discount#163
Akshola00 merged 10 commits intoWeb3Novalabs:mainfrom
vicajohn:feature/asset-based-discount

Conversation

@vicajohn
Copy link
Contributor

@vicajohn vicajohn commented Feb 23, 2026

Closes #93


- Add storage keys for asset discounts and platform fee percentage
- Implement admin functions to set/get platform fees and asset discounts
- Modify contribute function to apply discounts based on asset type
- Add comprehensive test suite with 10 test cases
- Include detailed documentation and usage guides

Features:
- Configurable base platform fee (in basis points)
- Token-specific discounts (e.g., 50% off for NEVO token)
- Automatic fee calculation with discount applied
- Separate tracking of platform fees
- Admin-only access with validation
- Event emissions for transparency

Test Coverage:
- Fee and discount configuration
- Fee calculations with various discount levels
- Multiple assets with different discounts
- Edge cases (0% fee, 100% discount)
- Input validation

Documentation:
- Technical implementation details
- User and developer guides
- Visual flow diagrams
- API reference and examples
- Clean up unused variables in asset_discount_test.rs
- Add automated CI fix scripts (PowerShell and Bash)
- Create comprehensive CI troubleshooting guide
- Add merge checklist for conflict resolution
- Document all CI fixes and verification steps

All tests passing (10/10)
No diagnostics warnings
Ready for CI pipeline
- Add blacklist functions (blacklist_address, unblacklist_address, is_blacklisted)
- Add campaign management functions (update_campaign_goal, extend_campaign_deadline, get_campaigns)
- Add get_campaign_fee_history and get_contract_version
- Add renounce_admin function
- Add UserBlacklisted and InvalidGoalUpdate error types
- Resolve all merge conflicts between feature branches
- Add implementation details and technical specifications
- Add visual flow diagrams and calculation examples
- Add quick reference guide for developers
- Add code changes documentation
- Add verification checklist
- Add implementation summary
- Add PR description with complete feature overview
@vicajohn
Copy link
Contributor Author

please review

@Akshola00
Copy link
Contributor

@vicajohn pls resolve conflicts

@Akshola00
Copy link
Contributor

Screenshot 2026-02-25 at 2 20 07 AM

@vicajohn Any updates on this
Also remove all these md files generated by ai from the pr pls

- Remove asset discount documentation files
- Clean up repository from temporary documentation
- Keep only essential code and implementation
@vicajohn
Copy link
Contributor Author

review please

@martinvibes
Copy link
Contributor

@vicajohn pls fix conflict

@vicajohn
Copy link
Contributor Author

please review

@Akshola00 Akshola00 merged commit ce9a736 into Web3Novalabs:main Feb 26, 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.

[FUNCTION] implement set_asset_fee_discount

3 participants