[C4GT] Add extrinsic documentation
Description
Improve documentation for extrinsics with brief writeup on what it does, parameters it takes, what it returns & errors if emitted.
Goals
- [ ] create
- [ ] vc_create
- [ ] issue
- [ ] vc_issue
- [ ] transfer
- [ ] vc_transfer
- [ ] status_change
- [ ] vc_status_change
Expected Outcome
- [ ] Should have the method documentation in the below format
/// Adds a delegate with the ability to assert new entries to a space.
///
/// The `ASSERT` permission allows the delegate to sign and add new
/// entries within the space. This function is called to grant a
/// delegate this specific permission. It checks that the caller has the
/// necessary authorization (admin rights) to add a delegate to the
/// space. If the caller is authorized, the delegate is added with the
/// `ASSERT` permission using the `space_delegate_addition`
/// internal function.
///
/// # Parameters
/// - `origin`: The origin of the call, which must be signed by an admin of the space.
/// - `space_id`: The identifier of the space to which the delegate is being added.
/// - `delegate`: The identifier of the delegate being added to the space.
/// - `authorization`: The authorization ID used to validate the addition.
///
/// # Returns
/// Returns `Ok(())` if the delegate was successfully added with
/// `ASSERT` permission, or an `Err` with an appropriate error if the
/// operation fails.
///
/// # Errors
/// - `UnauthorizedOperation`: If the caller is not an admin of the space.
/// - Propagates errors from `space_delegate_addition` if it fails.
#[pallet::call_index(0)]
#[pallet::weight(<T as pallet::Config>::WeightInfo::add_delegate())]
pub fn add_delegate(
Story Points
2
Time Constraint
3 Days
Mockups / Wireframes
NA
Implementation Details
Go to file pallets/asset/src/lib.rs and write the documentation.
Product Name
CORD
Organization Name
Dhiway
Domain
Blockchain
Tech Skills Needed
Rust
Mentor(s)
@vatsa287 @amarts @NiranjanAP
Complexity
[Low]
Category
[Documentation]
Sub Category
[Beginner friendly]
NOTE:
Contributors can submit to a part or for all of the required methods. Assignees will be re-assigned if no PRs are opened after 3 days.
Hey @vatsa287 , From my understanding, we need to improve the documentation for extrinsic variables in the specified format and update pallets/asset/src/lib.rs to ensure it is understandable for both technical and non-technical users. The steps include reviewing current documentation for gaps and inconsistencies, creating a structured outline for documenting extrinsic variables, and writing clear, user-friendly documentation based on the outline. Please confirm if this is correct so I can start working on it. Thank you.
Hey @vatsa287! As the issue has already been assigned to @vidyaa01, so, I wouldn't be able to take it right?
Hey @ayush572 , I have already done the work for the issue and it has been approved. Here is the link : https://github.com/dhiway/cord/pull/498