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

Refresh build ntt index page #321

Merged
merged 14 commits into from
Mar 25, 2025
Merged
Changes from 1 commit
Commits
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
Next Next commit
move pages, links, images, and snippets to new IA
  • Loading branch information
eshaben committed Feb 19, 2025
commit 83b7958ca9d551cb0d581d9dabdf156b39b5d7eb
4 changes: 2 additions & 2 deletions .CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -172,7 +172,7 @@ If your additions or modifications are limited to content on an existing page, t

## Adding Code and Text Snippets

Snippets are used to manage reusable lines of code or text. They are organized to mirror the structure of the docs site and stored under the root-level `.snippets` directory. For example, to add a code snippet to the page `build/applications/wormhole-sdk.md`, you would place the code snippet in the folder `.snippets/code/build/applications/wormhole-sdk`.
Snippets are used to manage reusable lines of code or text. They are organized to mirror the structure of the docs site and stored under the root-level `.snippets` directory. For example, to add a code snippet to the page `build/toolkit/typescript-sdk.md`, you would place the code snippet in the folder `.snippets/code/build/toolkit/typescript-sdk`.

Text snippets are useful for pieces of copy you find the need to reuse often, such as disclaimers. Code snippets allow you to reuse pieces of code throughout a document while maintaining a single place to update that code when needed.

@@ -188,7 +188,7 @@ Learn more about the effective use of [snippets](https://facelessuser.github.io/

## Adding Images

Images are stored in the `images` subdirectory. They are organized to mirror the structure of the docs site. For example, to add an image to the page `build/applications/wormhole-sdk.md`, you would place the image in the folder `images/build/applications/wormhole-sdk`.
Images are stored in the `images` subdirectory. They are organized to mirror the structure of the docs site. For example, to add an image to the page `build/toolkit/typescript-sdk.md`, you would place the image in the folder `images/build/toolkit/typescript-sdk`.

All images intended for display on the website should be in `.webp` format. You can look up an image converter online to convert from `.jpeg`, `.png`, or other formats to `.webp`.

This file was deleted.

6 changes: 4 additions & 2 deletions build/.pages
Original file line number Diff line number Diff line change
@@ -2,7 +2,9 @@ title: Build
nav:
- index.md
- start-building
- applications
- contract-integrations
- transfers
- core-messaging
- multigov
- queries
- toolkit
- reference
6 changes: 0 additions & 6 deletions build/applications/.pages

This file was deleted.

46 changes: 0 additions & 46 deletions build/applications/index.md

This file was deleted.

10 changes: 0 additions & 10 deletions build/contract-integrations/.pages

This file was deleted.

4 changes: 2 additions & 2 deletions build/contract-integrations/faqs.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ description: Frequently asked questions about integrating contracts with Wormhol

## Can ownership of wrapped tokens be transferred from the Token Bridge?

No, you cannot transfer ownership of wrapped token contracts from the [Token Bridge](/docs/learn/messaging/token-bridge/){target=\_blank} because the Token Bridge deploys and retains ownership of these contracts and tokens.
No, you cannot transfer ownership of wrapped token contracts from the [Token Bridge](/docs/learn/transfers/token-bridge/){target=\_blank} because the Token Bridge deploys and retains ownership of these contracts and tokens.

- **On EVM chains** - when you attest a token, the Token Bridge deploys a new ERC-20 contract as a beacon proxy. The upgrade authority for these contracts is the Token Bridge contract itself
- **On Solana** - the Token Bridge deploys a new SPL token, where the upgrade authority is a Program Derived Address (PDA) controlled by the Token Bridge
@@ -32,7 +32,7 @@ These resources will guide you through building and deploying custom relayers ta

## Is there a way to use NTT tokens with chains that don't currently support NTT?

Yes. NTT tokens can be used with chains that do not support NTT by leveraging the [Token Bridge](/docs/learn/messaging/token-bridge/){target=\_blank}. For example:
Yes. NTT tokens can be used with chains that do not support NTT by leveraging the [Token Bridge](/docs/learn/transfers/token-bridge/){target=\_blank}. For example:

- **Wrapped token scenario** - a token, such as the W token, can be bridged to non-NTT networks using the Token Bridge. When the token is bridged to a chain like Sui, a wrapped version of the token is created (e.g., Wrapped W token)
- **Unwrapping requirement** - tokens bridged using the Token Bridge cannot be directly transferred to NTT-supported chains. To transfer them, they must first be unwrapped on the non-NTT chain and then transferred via the appropriate mechanism
70 changes: 0 additions & 70 deletions build/contract-integrations/index.md

This file was deleted.

5 changes: 5 additions & 0 deletions build/core-messaging/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: Core Messaging
nav:
- index.md
- 'Wormhole Relayer': 'wormhole-relayers.md'
- 'Core Contracts': 'core-contracts.md'
Original file line number Diff line number Diff line change
@@ -32,14 +32,14 @@ While the implementation details of the Core Contracts vary by network, the core

### Sending Messages

To send a message, regardless of the environment or chain, the Core Contract is invoked with a message argument from an [emitter](/docs/learn/fundamentals/glossary/#emitter){target=\_blank}. This emitter might be your contract or an existing application such as the [Token Bridge](/docs/learn/messaging/token-bridge/#token-bridge){target=\_blank}.
To send a message, regardless of the environment or chain, the Core Contract is invoked with a message argument from an [emitter](/docs/learn/glossary/#emitter){target=\_blank}. This emitter might be your contract or an existing application such as the [Token Bridge](/docs/learn/transfers/token-bridge/#token-bridge){target=\_blank}.

=== "EVM"

The `IWormhole.sol` interface provides the `publishMessage` function, which can be used to publish a message directly to the Core Contract:

```solidity
--8<-- 'code/build/contract-integrations/core-contracts/sending.sol'
--8<-- 'code/build/core-messaging/core-contracts/sending.sol'
```

??? interface "Parameters"
@@ -69,7 +69,7 @@ To send a message, regardless of the environment or chain, the Core Contract is
??? interface "Example"

```solidity
--8<-- 'code/build/contract-integrations/core-contracts/sendMessageEVM.sol'
--8<-- 'code/build/core-messaging/core-contracts/sendMessageEVM.sol'
```

View the complete Hello World example in the [Wormhole Scaffolding](https://github.com/wormhole-foundation/wormhole-scaffolding/tree/main/evm/src/01_hello_world){target=\_blank} repository on GitHub.
@@ -163,7 +163,7 @@ To send a message, regardless of the environment or chain, the Core Contract is
??? interface "Example"

```rust
--8<-- 'code/build/contract-integrations/core-contracts/sendMessageSolana.rs'
--8<-- 'code/build/core-messaging/core-contracts/sendMessageSolana.rs'
```

View the complete Hello World example in the [Wormhole Scaffolding](https://github.com/wormhole-foundation/wormhole-scaffolding/tree/main/solana/programs/01_hello_world){target=\_blank} repository on GitHub.
@@ -181,7 +181,7 @@ The way a message is received and handled depends on the environment.
On EVM chains, the message passed is the raw VAA encoded as binary. The `IWormhole.sol` interface provides the `parseAndVerifyVM` function, which can be used to parse and verify the received message.

```solidity
--8<-- 'code/build/contract-integrations/core-contracts/receiving.sol'
--8<-- 'code/build/core-messaging/core-contracts/receiving.sol'
```

??? interface "Parameters"
@@ -231,7 +231,7 @@ The way a message is received and handled depends on the environment.
??? interface "Example"

```solidity
--8<-- 'code/build/contract-integrations/core-contracts/receiveMessageEVM.sol'
--8<-- 'code/build/core-messaging/core-contracts/receiveMessageEVM.sol'
```

View the complete Hello World example in the [Wormhole Scaffolding](https://github.com/wormhole-foundation/wormhole-scaffolding/tree/main/evm/src/01_hello_world){target=\_blank} repository on GitHub.
@@ -250,7 +250,7 @@ The way a message is received and handled depends on the environment.
??? interface "Example"

```rust
--8<-- 'code/build/contract-integrations/core-contracts/receiveMessageSolana.rs'
--8<-- 'code/build/core-messaging/core-contracts/receiveMessageSolana.rs'
```

View the complete Hello World example in the [Wormhole Scaffolding](https://github.com/wormhole-foundation/wormhole-scaffolding/tree/main/solana/programs/01_hello_world){target=\_blank} repository on GitHub.
@@ -268,7 +268,7 @@ require(isRegisteredSender(emitterChainId, emitterAddress), "Invalid emitter");
This check can be applied after the VAA is parsed, ensuring only authorized senders can interact with the receiving contract. Trusted emitters can be registered using a method like `setRegisteredSender` during contract deployment or initialization.

```typescript
--8<-- 'code/build/contract-integrations/core-contracts/receiveEmitterCheck.ts'
--8<-- 'code/build/core-messaging/core-contracts/receiveEmitterCheck.ts'
```

#### Additional Checks
6 changes: 6 additions & 0 deletions build/core-messaging/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Core Messaging Layer Contracts
description: Learn to use Wormhole’s foundational messaging contracts to build multichain apps with direct control over publishing, verifying, relaying, and more.
---

# Core Messaging
Loading