Skip to content

Enrich the doc on docs.rs for pink #1330

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

Merged
merged 9 commits into from
Jul 10, 2023
Merged

Enrich the doc on docs.rs for pink #1330

merged 9 commits into from
Jul 10, 2023

Conversation

kvinwang
Copy link
Collaborator

@kvinwang kvinwang commented Jun 30, 2023

Joshua has already made amazing docs and guides for Phat Contracts in phala-docs.

However, the pink APIs docs was still poor of quality. This PR enrich the API docs of pink-extension on docs.rs.

  • Unfutunately, due to the bug of rustc, the doc could not be compiled with rustc 1.69. Instead, a latest nightly rustc is required to compile the source code with docs in this PR.

We can temporarily preview the doc here.

@kvinwang kvinwang force-pushed the doc-comments branch 3 times, most recently from dfe5dff to 051e111 Compare July 3, 2023 05:10
@kvinwang kvinwang requested a review from HashWarlock July 7, 2023 07:48
@kvinwang
Copy link
Collaborator Author

kvinwang commented Jul 7, 2023

@HashWarlock Can you help review on this?

pub fn set_log_handler(contract: AccountId) {
emit_event::<PinkEnvironment, _>(PinkEvent::SetLogHandler(contract))
}

/// Set the weight of contract used to schedule queries and sidevm vruntime
/// Set the weight of contract used to schedule queries and sidevm vruntime. (system only)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does vruntime mean something like virtual runtime? I see it used twice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Replaced with virtual runtime.

/// - `PinkLogger`: The contract that with a sidevm instance that collect the logs and events
/// emitted by the ink! contracts in current cluster.
/// - `ContractDeposit`: The contract that implements the `trait ContractDeposit` which talks
/// to the pallet PhatKokenomic on Phala chain.
Copy link
Contributor

Choose a reason for hiding this comment

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

Pallet is named PhatTokenomic, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Fixed.

Copy link
Contributor

@HashWarlock HashWarlock left a comment

Choose a reason for hiding this comment

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

Thank you for adding this. This was very informative for me and I learned a few things. I only saw 1 typo with PinkKokenomic -> PinkTokenomic and I made comment on clarification of vruntime.

Other than that, LGTM

@kvinwang kvinwang enabled auto-merge July 10, 2023 01:34
@kvinwang kvinwang merged commit bd467da into master Jul 10, 2023
@kvinwang kvinwang deleted the doc-comments branch July 10, 2023 03:29
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.

3 participants