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

asset: Add extrinsic documentation #498

Conversation

vidyaa01
Copy link
Contributor

@vidyaa01 vidyaa01 commented Aug 2, 2024

Comprehensive Documentation Update

This PR introduces comprehensive documentation for the following extrinsic functions in our pallet:

  • create
  • issue
  • transfer
  • status_change
  • vc_create
  • vc_issue
  • vc_transfer
  • vc_status_change

Each function now includes detailed Rustdoc comments covering:

  • Purpose: What the function does.
  • Parameters: Descriptions of input parameters.
  • Return Values: Information on what the function returns.
  • Potential Errors: Possible errors that can be encountered.
  • Events Emitted: Events triggered by the function.

Fixes: #443

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.
added documentation for issue function
Added documentation for status_change function.
Added documentation for vc_create function.
@@ -300,6 +300,34 @@ pub mod pallet {

Ok(())
}
/// Creates a new asset entry within a specified space.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the method documentation to top of the actual method which the doc is targeted for & match its indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review it again, as I have updated the documentation accordingly.

vatsa287
vatsa287 previously approved these changes Aug 3, 2024
Copy link
Member

@vatsa287 vatsa287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vatsa287
Copy link
Member

vatsa287 commented Aug 7, 2024

@vidyaa01 Run the cargo format for the ci test to pass.

cargo +nightly fmt --all

Add the changes again, amend the commit and push the changes.

Added documentation above the method and corrected the indentation accordingly.
@vidyaa01 vidyaa01 force-pushed the pallets/asset/src/lib.rs-Add-extrinsic-documentation-#443 branch from a096b8c to 17852ef Compare August 8, 2024 08:17
@vidyaa01
Copy link
Contributor Author

vidyaa01 commented Aug 8, 2024

Hey @vatsa287 ,

I have made the changes you requested and pushed the changes to the PR. It shows me dismissed stale review which wasn't my intention, can you guide me on further steps?

Copy link
Member

@vatsa287 vatsa287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vatsa287 vatsa287 changed the title Pallets/asset/src/lib.rs add extrinsic documentation #443 asset: Add extrinsic documentation Aug 12, 2024
@vatsa287 vatsa287 requested a review from amarts August 12, 2024 11:04
@vatsa287
Copy link
Member

@amarts PTAL

@amarts amarts merged commit 107ce60 into dhiway:develop Sep 4, 2024
3 checks passed
@VedantKhairnar
Copy link

Hello @vidyaa01 ,
Thanks for your contribution.
As part of Augtoberfest, we want to reward you for your contributions, so pls fill out this form by 19th Sept.
Thanks.

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

Successfully merging this pull request may close these issues.

[C4GT] Add extrinsic documentation
4 participants