-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Introduce add_memo
for Crowdloans
#2728
Conversation
This approach satisfies Moonbeam's needs 👍 Out of curiosity, what's the advantage of having a separate extrinsic as opposed to including the memo with the original contribution? cc @girazoki |
Every contribution would require the memo, taking up space in the tx and causing larger fees. Also in terms of separation of concerns, we have written tests for and audited code as it was. Creating a new function isolates new code and how it can interact with the system. |
Nice job shawn, I think some community also need this features. There is a scenario that two third party community contribute to one parachain crowdloan, the community may distribute their own community token to user who participated this auction, then they can add memo to identify which user belong to their community that can get community token reward. Besides, is it possible to include memo as an argument in extrinsic contribute and put it into event RawEvent::Contributed rather than save it into child trie? Or maybe need a query extrinsic to get the memo of a contribution. |
@tolak why would this information need to be in an event? I already mentioned why this information is not coupled directly with a contribute extrinsic. |
@shawntabrizi Maybe for the client who wants to catch memo just like ParaId, Account and Amount by event without query the child trie. I am not sure if we already have interface for client to get the memo of a contribution. |
@tolak is this a hypothetical request, or you actually need this? I will add it because I don't see a big reason not to, but i dont suspect people will use it. Getting the data from the child trie is how it should be used at the end of a crowdloan. |
bot merge |
Trying merge. |
* Check that Para is Registered before Accepting a Bid (#2656) * Check that para is registered before accepting a bid * Update lib.rs * Update lib.rs * remove println * fix benchmarks * Update runtime/common/src/auctions.rs Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Kian Paimani <[email protected]> * Parachain Onboarding Extras (#2713) * clear_lease * schedule upgrade and downgrade * fix compile * comments * Fix Crowdloan Withdraw Requirements (#2723) * prevent crowdloan withdraw from being griefed * Update crowdloan.rs * Update runtime/common/src/crowdloan.rs * Update runtime/common/src/crowdloan.rs * Introduce `add_memo` for Crowdloans (#2728) * Add memo, but don't use it yet * add_memo * add weights * Update lib.rs * Update crowdloan.rs * add event * Handle Onboarding in Current Lease Period (#2731) * Lease out current period and trigger onboard * Add test for trigger_onboard * patch and add benchmark * finish benchmarks * Use result instead of panic for test_registrar * nits * bump spec +2 * Remove Parachains Stuff from Westend (#2689) * Remove Parachains Stuff from Westend * remove unused weights * clean up genesis Co-authored-by: Kian Paimani <[email protected]>
This PR introduces an additional extrinsic where a user can place some additional "memo" to a crowdloan contribution they have made.
The main reason to use this is to specify some other account that should receive the token distribution for a crowdloan you participated in.
cc @JoshOrndorff @xlc @jacogr