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

fix(svm): format docstrings #853

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Reinis-FRP
Copy link
Contributor

Anchor IDL generates docs from lines starting with tripple-slashes (///). Some of comments had these unnecessarily causing the IDL docs including information that is not specific to a given instruction or account. This fixes by formatting these lines as regular comments starting with double-slash (//).

Signed-off-by: Reinis Martinsons <[email protected]>
@@ -40,28 +40,28 @@ pub struct BridgeTokensToHubPool<'info> {
pub token_messenger_minter_sender_authority: UncheckedAccount<'info>,

/// CHECK: MessageTransmitter is checked in CCTP. Seeds must be \["message_transmitter"\] (CCTP Message Transmitter
/// program).
// program).
Copy link
Contributor

Choose a reason for hiding this comment

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

Turning these into double slashes doesn't remove them from docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it should remove them from the docs, aren't they?

Copy link
Contributor

@md0x md0x Jan 10, 2025

Choose a reason for hiding this comment

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

Okay, yes, before your change, Anchor was adding program). to the documentation.
Now, it doesn’t add documentation for this account (expected behavior).

Before your fix:

        {
          "name": "message_transmitter",
          "docs": [
            "program)."
          ],
          "writable": true
        },

After fix:

        {
          "name": "message_transmitter",
          "writable": true
        },

All good!

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

Successfully merging this pull request may close these issues.

3 participants