Skip to content

Create Token Attestation guide for Token Bridge #473

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dawnkelly09
Copy link
Collaborator

Description

Please explain the changes this PR addresses here.

This guide helps the user check a token to see if a wrapped version exists and do an attestation if it doesn't

Checklist

  • [x ] Required - I have added a label to this PR 🏷️
  • [ x] Required - I have run my changes through Grammarly
  • If pages have been moved, I have created redirects in the wormhole-mkdocs repo

@dawnkelly09 dawnkelly09 added A0 - New Content Pull request contains new content pages B0 - Needs Review Pull request is ready for review labels Jun 18, 2025
@dawnkelly09 dawnkelly09 requested a review from Copilot June 18, 2025 19:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new guide for token attestation in the Token Bridge product. The changes include a new Markdown guide detailing the attestation process using the TypeScript SDK, updates to the navigation and reference files, and accompanying code snippets that demonstrate the attestation flow.

  • Added new guide in Markdown with detailed instructions and terminal output examples.
  • Updated navigation (.pages) and link references (llms.txt) to include the new guide.
  • Introduced TypeScript example files (helper.ts and attest.ts) and HTML snippets to demonstrate attestation transactions.

Reviewed Changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
products/token-bridge/guides/attest-tokens.md New guide explaining the token attestation process
products/token-bridge/guides/.pages Added new navigation entry for Token Attestation
llms.txt Updated list of guides to include the Token Attestation guide
.snippets/code/products/token-bridge/guides/attest-tokens/* New code snippets for terminal outputs and helper functions for attestation
.snippets/code/products/token-bridge/guides/attest-tokens/attest.ts New TypeScript file implementing token attestation logic
Comments suppressed due to low confidence (2)

products/token-bridge/guides/attest-tokens.md:157

  • The placeholder 'TODO: What else should be here?' may confuse readers. Consider either providing additional guidance or removing the TODO if not needed.
TODO: What else should be here?

.snippets/code/products/token-bridge/guides/attest-tokens/attest.ts:76

  • The variable 'payer' is declared earlier for the source chain and then re-declared for the destination chain. Consider renaming one of them (e.g. 'destPayer') to avoid confusion and potential scope issues.
      const payer = toNative(

@eshaben eshaben self-assigned this Jun 19, 2025
@eshaben eshaben requested review from ilariae and martin0995 June 19, 2025 03:17
Copy link
Collaborator

@martin0995 martin0995 left a comment

Choose a reason for hiding this comment

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

Nice job! Just some minor adjustments when sharing the snippet. Super clear flow :)


3. Run the script using the following command:
```bash
npx tsx attest.ts
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't get the token address returned when I run the script

Copy link
Collaborator

Choose a reason for hiding this comment

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

I tried both with attested and non-attested tokens, and it is not returning anything. It doesn't crash either.

You have to take this part out of the function for it to work:
attestToken().catch((e) => { console.error('❌ Error in attestToken', e); process.exit(1); });

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just ran this with a known token:

dawnkelly@Mac attest-token % npx tsx attest.ts
✅ Token already registered on destination: SolanaAddress {
type: 'Native',
address: PublicKey [PublicKey(BQeTpGLxxe7AkwssS1MS242tGguy1TZYNqUkjwuDq3Fr)] {
_bn: <BN: 9aa3962f4d2e7ca7113ffc392540ebef6c02529d258e4f142701c049ed8e71e5>
}
}
dawnkelly@Mac attest-token %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0 - New Content Pull request contains new content pages B0 - Needs Review Pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants