Skip to content

Token Bridge Feedback #448

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 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
7abbc0d
wip
eshaben Apr 23, 2025
a690f89
reorganize content to new structure
eshaben Apr 24, 2025
5dc1e37
Merge remote-tracking branch 'origin' into staging-new-ia
eshaben Apr 24, 2025
a149aa9
update llms
eshaben Apr 24, 2025
990adbf
add support for tool selector
eshaben Apr 30, 2025
99c55cc
add logic so the dropdown closes when a user clicks anywhere else on …
eshaben May 1, 2025
66cbbdc
update messaging tutorial .pages file
eshaben May 5, 2025
209f970
move ai resources to a directory
eshaben May 6, 2025
ac88301
Queries - Get Started page (#377)
martin0995 May 6, 2025
02370ff
NTT - Get Started page (#376)
martin0995 May 6, 2025
8c212e0
move tools
eshaben May 9, 2025
7fe8e30
Connect - Get Started page (#375)
dawnkelly09 May 13, 2025
ba6c0da
Messaging - Get Started (#381)
dawnkelly09 May 16, 2025
2d9d111
Queries - Overview (#388)
ilariae May 19, 2025
46a0fe9
Messaging - Overview (#387)
ilariae May 19, 2025
1411849
Multigov - Overview (#397)
ilariae May 19, 2025
cc3b7b9
Pull the latest changes into staging (#404)
eshaben May 19, 2025
2609cea
Multigov - Get Started page (#379)
martin0995 May 19, 2025
086ed52
remove dropdown js used for tools
eshaben May 20, 2025
6c018e6
link fixes (#407)
ilariae May 21, 2025
129ddc0
Typescript SDK - Get Started page (#380)
martin0995 May 21, 2025
50001c0
Token Bridge - Get Started page (#382)
martin0995 May 21, 2025
b363ada
Update Diagrams (#414)
ilariae May 28, 2025
bff4217
Token Bridge Payload Structure (#422)
ilariae May 29, 2025
27797a0
Overview - Token Bridge (#410)
ilariae May 29, 2025
9d01cda
CCTP - Get Started page (#408)
martin0995 May 29, 2025
ef9cba5
Overview - Connect (#412)
Telucero May 29, 2025
bede78c
add supported networks page (#431)
eshaben May 29, 2025
cc7c1df
Taylor/supported methods (#428)
Telucero May 29, 2025
37d1d79
Token Bridge Transfer Flow (#419)
eshaben May 29, 2025
b096f7a
Overview - Native Token Tranfers (#413)
Telucero May 29, 2025
b3fd70a
Overview - Settlement (#420)
ilariae May 29, 2025
0f0325b
Overview - CCTP bridge (#411)
Telucero May 29, 2025
8bd17b3
Updated Get Started with Messaging + Solidity SDK Get Started (#401)
dawnkelly09 May 29, 2025
3f9625b
Solidity SDK temporary clean up (#434)
eshaben May 30, 2025
9007110
Pull in latest changes from main to the staging branch (#436)
eshaben May 30, 2025
356987c
Clean up old pages on the staging branch (#437)
eshaben May 30, 2025
543a4d7
Update the TypeScript SDK section (#433)
eshaben May 30, 2025
f7b307d
Settlement - Get Started page (#378)
martin0995 May 30, 2025
8870c49
use queries page (#432)
ilariae May 30, 2025
4951ec4
Ilariae/todos (#441)
ilariae May 30, 2025
141366c
clean up ntt (#438)
ilariae May 30, 2025
06d7f34
update llms
eshaben May 30, 2025
e715eba
Ilariae/clean up lists (#442)
ilariae May 30, 2025
dde141b
update links (#443)
eshaben May 30, 2025
b92ec39
update llms
eshaben May 30, 2025
0647677
fix a few remaining 404s (#444)
eshaben May 30, 2025
bab713f
update table
eshaben May 30, 2025
a3361a5
updates to token bridge
albertov19 Jun 4, 2025
062c09e
grammarly
albertov19 Jun 4, 2025
203056f
llm check
martin0995 Jun 18, 2025
27c63cf
Update products/token-bridge/guides/attest-tokens.md
martin0995 Jun 18, 2025
4f016a5
Update products/token-bridge/guides/attest-tokens.md
martin0995 Jun 18, 2025
4571563
Update products/token-bridge/guides/attest-tokens.md
martin0995 Jun 18, 2025
d342a8d
Apply suggestions from code review
martin0995 Jun 18, 2025
508be14
Apply suggestions from code review
martin0995 Jun 18, 2025
3c8844e
add prerequisites as suggested by reviewers
martin0995 Jun 18, 2025
d35b949
llm check
martin0995 Jun 18, 2025
33ed4c8
llm check
martin0995 Jun 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IWormhole wormhole = IWormhole(wormholeAddr);

uint256 wormholeFee = wormhole.messageFee();

wormhole.attestToken{value: wormholeFee}(
address(tokenImpl), // the token contract to attest
234 // nonce for the transfer
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
IWormhole wormhole = IWormhole(wormholeAddr);
ITokenBridge tokenBridge = ITokenBridge(tokenBridgeAddr);

// Get the fee for publishing a message
uint256 wormholeFee = wormhole.messageFee();

tokenBridge.transferTokens{value: wormholeFee}(
token, // address of the ERC-20 token to transfer
amount, // amount of tokens to transfer
recipientChain, // Wormhole chain ID of the destination chain
recipient, // recipient address on the destination chain (as bytes32)
arbiterFee, // fee for relayer
nonce // nonce for this transfer
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
IWormhole wormhole = IWormhole(wormholeAddr);
ITokenBridge tokenBridge = ITokenBridge(tokenBridgeAddr);

// Get the fee for publishing a message
uint256 wormholeFee = wormhole.messageFee();

tokenBridge.transferTokensWithPayload{value: wormholeFee}(
token, // address of the ERC-20 token to transfer
amount, // amount of tokens to transfer
recipientChain, // Wormhole chain ID of the destination chain
recipient, // recipient address on the destination chain (as bytes32)
nonce, // nonce for this transfer
additionalPayload // additional payload data
);
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ export interface SignerStuff<N extends Network, C extends Chain> {
address: ChainAddress<C>;
}

// Function to fetch environment variables (like your private key)
function getEnv(key: string): string {
const val = process.env[key];
if (!val) throw new Error(`Missing environment variable: ${key}`);
return val;
}

// Signer setup function for different blockchain platforms
/**
* Returns a signer for the given chain using locally scoped credentials.
* The required values (EVM_PRIVATE_KEY, SOL_PRIVATE_KEY, SUI_MNEMONIC, APTOS_PRIVATE_KEY) must
* be loaded securely beforehand, for example via a keystore, secrets
* manager, or environment variables (not recommended).
*/
export async function getSigner<N extends Network, C extends Chain>(
chain: ChainContext<N, C>,
gasLimit?: bigint
Expand All @@ -44,27 +42,23 @@ export async function getSigner<N extends Network, C extends Chain>(
case 'Solana':
signer = await (
await solana()
).getSigner(await chain.getRpc(), getEnv('SOL_PRIVATE_KEY'));
).getSigner(await chain.getRpc(), 'SOL_PRIVATE_KEY');
break;
case 'Evm':
const evmSignerOptions = gasLimit ? { gasLimit } : {};
signer = await (
await evm()
).getSigner(
await chain.getRpc(),
getEnv('ETH_PRIVATE_KEY'),
evmSignerOptions
);
).getSigner(await chain.getRpc(), 'ETH_PRIVATE_KEY', evmSignerOptions);
break;
case 'Sui':
signer = await (
await sui()
).getSigner(await chain.getRpc(), getEnv('SUI_MNEMONIC'));
).getSigner(await chain.getRpc(), 'SUI_MNEMONIC');
break;
case 'Aptos':
signer = await (
await aptos()
).getSigner(await chain.getRpc(), getEnv('APTOS_PRIVATE_KEY'));
).getSigner(await chain.getRpc(), 'APTOS_PRIVATE_KEY');
break;
default:
throw new Error('Unsupported platform: ' + platform);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
<tr><td>Terra</td><td><code>terra1dq03ugtd40zu9hcgdzrsq6z2z4hwhc9tqk2uy5</code></td></tr>
<tr><td>XPLA</td><td><code>xpla1jn8qmdda5m6f6fqu9qv46rt7ajhklg40ukpqchkejcvy8x7w26cqxamv3w</code></td></tr>
</tbody>
</table>
</table>
69 changes: 69 additions & 0 deletions llms-files/llms-basics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/re
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/messaging/guides/wormhole-relayers.md [type: other]
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/messaging/overview.md [type: other]
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/overview.md [type: other]
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/products.md [type: other]
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/products/reference/glossary.md [type: other]
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/protocol/architecture.md [type: other]
Doc-Page: https://raw.githubusercontent.com/wormhole-foundation/wormhole-docs/refs/heads/main/protocol/ecosystem.md [type: other]
Expand Down Expand Up @@ -1049,6 +1050,74 @@ Beyond asset transfers, Wormhole provides additional tools for cross-chain data
[**MultiGov**](/docs/products/multigov/overview/){target=\_blank} is a unified governance framework that manages multichain protocol governance through a single mechanism. Best for projects managing multichain governance and protocol updates.
--- END CONTENT ---

Doc-Content: https://wormhole.com/docs/products/products/
--- BEGIN CONTENT ---
---
title: Compare Wormhole's Cross-Chain Solutions
description: Compare Wormhole’s cross-chain solutions for bridging, native transfers, data queries, and governance to enable seamless blockchain interoperability.
categories: Transfer, Basics
---

# Products

Wormhole provides a comprehensive suite of cross-chain solutions, enabling seamless asset transfers, data retrieval, and governance across blockchain ecosystems.

Wormhole provides multiple options for asset transfers: Connect for a plug-and-play bridging UI, Native Token Transfers (NTT) for moving native assets without wrapped representations, and Token Bridge for a secure lock-and-mint mechanism.

Beyond transfers, Wormhole extends interoperability with tools for cross-chain data access, decentralized governance, and an intent-based protocol through Wormhole Settlement.

## Transfer Products

Wormhole offers different solutions for cross-chain asset transfer, each designed for various use cases and integration requirements.

- [**Native Token Transfers (NTT)**](/docs/products/native-token-transfers/overview/){target=\_blank} - a mechanism to transfer native tokens cross-chain seamlessly without conversion to a wrapped asset. Best for projects that require maintaining token fungibility and native chain functionality across multiple networks
- [**Token Bridge**](/docs/products/token-bridge/overview/){target=\_blank} - a bridging solution that uses a lock and mint mechanism. Best for projects that need cross-chain liquidity using wrapped assets and the ability to send messages
- [**Settlement**](/docs/products/settlement/overview/){target=\_blank} - intent-based protocols enabling fast multichain transfers, optimized liquidity flows, and interoperability without relying on traditional bridging methods

<div markdown class="full-width">

::spantable::

| | Criteria | NTT | Token Bridge | Settlement |
|--------------------------------|---------------------------------------|--------------------|--------------------|--------------------|
| Supported Transfer Types @span | Token Transfers | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| | Token Transfers with Payloads | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Supported Assets @span | Wrapped Assets | :x: | :white_check_mark: | :white_check_mark: |
| | Native Assets | :white_check_mark: | :x: | :white_check_mark: |
| | ERC-721s (NFTs) | :x: | :white_check_mark: | :white_check_mark: |
| Features @span | Out-of-the-Box UI | :x: | :x: | :white_check_mark: |
| | Event-Based Actions | :white_check_mark: | :white_check_mark: | :x: |
| | Intent-Based Execution | :x: | :x: | :white_check_mark: |
| | Fast Settlement | :x: | :x: | :white_check_mark: |
| | Liquidity Optimization | :x: | :x: | :white_check_mark: |
| Integration Details @span | | | | |
| Requirements @span | Contract Deployment | :white_check_mark: | :x: |:x: |
| Ease of Integration | Implementation Complexity | :green_circle: :green_circle: :white_circle: <br> Moderate | :green_circle: :green_circle: :white_circle: <br> Moderate |:green_circle: :white_circle: :white_circle: <br> Low |
| Technology @span | Supported Languages | Solidity, Rust | Solidity, Rust, TypeScript | TypeScript |

::end-spantable::

</div>

In the following video, Wormhole Foundation DevRel Pauline Barnades walks you through the key differences between Wormhole’s Native Token Transfers (NTT) and Token Bridge and how to select the best option for your use case:

<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='https://www.youtube.com/embed/wKDf3dyH0OM?si=Gr_iMB1jSs_5Pokm' frameborder='0' allowfullscreen></iframe></div>

Beyond asset transfers, Wormhole provides additional tools for cross-chain data and governance.

## Bridging UI

[**Connect**](/docs/products/connect/overview/){target=\_blank} is a pre-built bridging UI for cross-chain token transfers, requiring minimal setup. Best for projects seeking an easy-to-integrate UI for bridging without modifying contracts.

## Real-time Data

[**Queries**](/docs/products/queries/overview/){target=\_blank} is a data retrieval service to fetch on-chain data from multiple networks. Best for applications that need multichain analytics, reporting, and data aggregation.

## Multichain Governance

[**MultiGov**](/docs/products/multigov/overview/){target=\_blank} is a unified governance framework that manages multichain protocol governance through a single mechanism. Best for projects managing multichain governance and protocol updates.
--- END CONTENT ---

Doc-Content: https://wormhole.com/docs/products/reference/glossary/
--- BEGIN CONTENT ---
---
Expand Down
68 changes: 68 additions & 0 deletions llms-files/llms-connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2810,6 +2810,74 @@ Beyond asset transfers, Wormhole provides additional tools for cross-chain data
[**MultiGov**](/docs/products/multigov/overview/){target=\_blank} is a unified governance framework that manages multichain protocol governance through a single mechanism. Best for projects managing multichain governance and protocol updates.
--- END CONTENT ---

Doc-Content: https://wormhole.com/docs/products/products/
--- BEGIN CONTENT ---
---
title: Compare Wormhole's Cross-Chain Solutions
description: Compare Wormhole’s cross-chain solutions for bridging, native transfers, data queries, and governance to enable seamless blockchain interoperability.
categories: Transfer, Basics
---

# Products

Wormhole provides a comprehensive suite of cross-chain solutions, enabling seamless asset transfers, data retrieval, and governance across blockchain ecosystems.

Wormhole provides multiple options for asset transfers: Connect for a plug-and-play bridging UI, Native Token Transfers (NTT) for moving native assets without wrapped representations, and Token Bridge for a secure lock-and-mint mechanism.

Beyond transfers, Wormhole extends interoperability with tools for cross-chain data access, decentralized governance, and an intent-based protocol through Wormhole Settlement.

## Transfer Products

Wormhole offers different solutions for cross-chain asset transfer, each designed for various use cases and integration requirements.

- [**Native Token Transfers (NTT)**](/docs/products/native-token-transfers/overview/){target=\_blank} - a mechanism to transfer native tokens cross-chain seamlessly without conversion to a wrapped asset. Best for projects that require maintaining token fungibility and native chain functionality across multiple networks
- [**Token Bridge**](/docs/products/token-bridge/overview/){target=\_blank} - a bridging solution that uses a lock and mint mechanism. Best for projects that need cross-chain liquidity using wrapped assets and the ability to send messages
- [**Settlement**](/docs/products/settlement/overview/){target=\_blank} - intent-based protocols enabling fast multichain transfers, optimized liquidity flows, and interoperability without relying on traditional bridging methods

<div markdown class="full-width">

::spantable::

| | Criteria | NTT | Token Bridge | Settlement |
|--------------------------------|---------------------------------------|--------------------|--------------------|--------------------|
| Supported Transfer Types @span | Token Transfers | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| | Token Transfers with Payloads | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Supported Assets @span | Wrapped Assets | :x: | :white_check_mark: | :white_check_mark: |
| | Native Assets | :white_check_mark: | :x: | :white_check_mark: |
| | ERC-721s (NFTs) | :x: | :white_check_mark: | :white_check_mark: |
| Features @span | Out-of-the-Box UI | :x: | :x: | :white_check_mark: |
| | Event-Based Actions | :white_check_mark: | :white_check_mark: | :x: |
| | Intent-Based Execution | :x: | :x: | :white_check_mark: |
| | Fast Settlement | :x: | :x: | :white_check_mark: |
| | Liquidity Optimization | :x: | :x: | :white_check_mark: |
| Integration Details @span | | | | |
| Requirements @span | Contract Deployment | :white_check_mark: | :x: |:x: |
| Ease of Integration | Implementation Complexity | :green_circle: :green_circle: :white_circle: <br> Moderate | :green_circle: :green_circle: :white_circle: <br> Moderate |:green_circle: :white_circle: :white_circle: <br> Low |
| Technology @span | Supported Languages | Solidity, Rust | Solidity, Rust, TypeScript | TypeScript |

::end-spantable::

</div>

In the following video, Wormhole Foundation DevRel Pauline Barnades walks you through the key differences between Wormhole’s Native Token Transfers (NTT) and Token Bridge and how to select the best option for your use case:

<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'><iframe src='https://www.youtube.com/embed/wKDf3dyH0OM?si=Gr_iMB1jSs_5Pokm' frameborder='0' allowfullscreen></iframe></div>

Beyond asset transfers, Wormhole provides additional tools for cross-chain data and governance.

## Bridging UI

[**Connect**](/docs/products/connect/overview/){target=\_blank} is a pre-built bridging UI for cross-chain token transfers, requiring minimal setup. Best for projects seeking an easy-to-integrate UI for bridging without modifying contracts.

## Real-time Data

[**Queries**](/docs/products/queries/overview/){target=\_blank} is a data retrieval service to fetch on-chain data from multiple networks. Best for applications that need multichain analytics, reporting, and data aggregation.

## Multichain Governance

[**MultiGov**](/docs/products/multigov/overview/){target=\_blank} is a unified governance framework that manages multichain protocol governance through a single mechanism. Best for projects managing multichain governance and protocol updates.
--- END CONTENT ---

Doc-Content: https://wormhole.com/docs/products/reference/glossary/
--- BEGIN CONTENT ---
---
Expand Down
Loading