Make crowdfunding invest payable and add bridge/metadata/third-party coverage - #1050
Merged
nanaf6203-bit merged 3 commits intoAug 25, 2026
Conversation
- crowdfunding: invest is now payable, requires the exact transferred value, and uses checked arithmetic for investments, raised_amount and share credits (MettaChain#985) - bridge: multi-hop terminal hop no longer unwraps an empty route; a typed InvalidChain error is returned instead (MettaChain#986) - metadata: fill the empty test module with ownership, versioning, finalization, media-limit and legal-document verification tests (MettaChain#987) - third-party: cover registration, status updates, the KYC flow and the fiat payment flow in place of the empty test module (MettaChain#988) Closes MettaChain#985, closes MettaChain#986, closes MettaChain#987, closes MettaChain#988
|
@Maryermarh 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! 🚀 |
The gate fails for all PRs independent of their contents: the pinned dependency set (trie-db 0.28.0) no longer compiles under the stable rustc (1.98.0) that CI installs fresh on every run, so clippy aborts inside dependency code before reaching project code. Per maintainer request, comment out the workflow until the dependency baseline is refreshed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the crowdfunding value-in path and fills two empty test modules, closing all four assigned issues.
investis now declared#[ink(message, payable)]and requirestransferred_value == amount(exact-match policy: over-payment is rejected rather than refunded). All three raw+sites are replaced with checked arithmetic (investments,raised_amount, share credits incl. the u128->u64 share conversion); every fallible computation happens before any storage write so a failed invest leaves state untouched. New error variants:ValueMismatch,ArithmeticOverflow.route.last().copied().ok_or(Error::InvalidChain)?instead of.unwrap(). An empty caller-supplied route now reverts with a typed error instead of panicking.update_limits, and legal-document verification restricted to admin/registered verifiers.Test results
Closes #985
Closes #986
Closes #987
Closes #988