Joystream / Joystream/joystream
Make encode_proposal take a reference to the encoded extrinsics instead of moving
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Since ProposalEncoder::encode_proposal takes ownership of proposal_details it makes impossible to use the value without cloning and afterwards emits an event using that value.
The goal of this task is to make the encode_proposal trait function borrow the value instead of owning it and adapt every implementation correspondingly.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ProposalEncoder::encode_proposal in runtime-modules/proposals/codex/src/types.rs and inspect its call sites in runtime-modules/proposals/codex/src/lib.rs, especially the references around lines 471, 502, and 511. Adapt every implementation to borrow the encoded extrinsics, preserving the later value use and event emission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100