Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C4GT] Add extrinsic documentation #443

Closed
9 tasks
vatsa287 opened this issue May 7, 2024 · 3 comments · Fixed by #498
Closed
9 tasks

[C4GT] Add extrinsic documentation #443

vatsa287 opened this issue May 7, 2024 · 3 comments · Fixed by #498
Assignees
Labels

Comments

@vatsa287
Copy link
Member

vatsa287 commented May 7, 2024

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.

@vidyaa01
Copy link
Contributor

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.

vidyaa01 added a commit to vidyaa01/cord that referenced this issue Jul 31, 2024
This documentation provides a comprehensive overview of the 'create' function, describing its purpose, parameters, return values, potential errors, and the event it emits upon successful execution.
vidyaa01 added a commit to vidyaa01/cord that referenced this issue Aug 2, 2024
added documentation for issue function
@ayush572
Copy link

ayush572 commented Aug 6, 2024

Hey @vatsa287! As the issue has already been assigned to @vidyaa01, so, I wouldn't be able to take it right?

@vidyaa01
Copy link
Contributor

vidyaa01 commented Aug 6, 2024

Hey @ayush572 , I have already done the work for the issue and it has been approved. Here is the link : #498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants