From 132b23034714cdba389875cbf2dbe8b35ec66244 Mon Sep 17 00:00:00 2001 From: Erin Shaben Date: Mon, 23 Dec 2024 11:25:54 -0500 Subject: [PATCH] rename cross-chain contracts to contract integrations --- .../cross-chain-contracts/snippet-1.sol | 0 .../cross-chain-contracts/snippet-2.sol | 0 .../cross-chain-contracts/snippet-3.js | 0 .../cross-chain-contracts/snippet-4.html | 0 .../cross-chain-contracts/snippet-5.js | 0 .../cross-chain-contracts/snippet-6.js | 0 .../cross-chain-contracts/snippet-7.html | 0 .../cross-chain-contracts/snippet-8.html | 0 .../cross-chain-contracts/snippet-9.json | 0 .../cross-chain-token-transfers/snippet-1.sol | 0 .../snippet-10.html | 0 .../snippet-11.sol | 0 .../cross-chain-token-transfers/snippet-2.sol | 0 .../snippet-3.json | 0 .../cross-chain-token-transfers/snippet-4.ts | 0 .../cross-chain-token-transfers/snippet-5.ts | 0 .../snippet-6.html | 0 .../snippet-7.html | 0 .../snippet-8.html | 0 .../snippet-9.json | 0 .../wormhole-relayers.md | 2 +- build/toolkit/solidity-sdk.md | 4 +- tutorials/by-product/.pages | 2 +- .../.pages | 2 +- .../cross-chain-contracts.md | 56 +++++++------- .../cross-chain-token-contracts.md | 74 +++++++++---------- .../index.md | 6 +- tutorials/by-product/index.md | 2 +- tutorials/index.md | 2 +- 29 files changed, 75 insertions(+), 75 deletions(-) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-1.sol (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-2.sol (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-3.js (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-4.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-5.js (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-6.js (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-7.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-8.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts/snippet-9.json (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-1.sol (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-10.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-11.sol (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-2.sol (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-3.json (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-4.ts (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-5.ts (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-6.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-7.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-8.html (100%) rename .snippets/code/tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-transfers/snippet-9.json (100%) rename tutorials/by-product/{cross-chain-contracts => contract-integrations}/.pages (83%) rename tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-contracts.md (90%) rename tutorials/by-product/{cross-chain-contracts => contract-integrations}/cross-chain-token-contracts.md (91%) rename tutorials/by-product/{cross-chain-contracts => contract-integrations}/index.md (93%) diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-1.sol b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-1.sol similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-1.sol rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-1.sol diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-2.sol b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-2.sol similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-2.sol rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-2.sol diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-4.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-4.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-4.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-4.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-5.js b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-5.js similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-5.js rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-5.js diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-7.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-7.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-7.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-7.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-8.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-8.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-8.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-8.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-9.json b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-9.json similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-9.json rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-9.json diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-1.sol b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-1.sol similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-1.sol rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-1.sol diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-10.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-10.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-10.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-10.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-11.sol b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-11.sol similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-11.sol rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-11.sol diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-2.sol b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-2.sol similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-2.sol rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-2.sol diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-3.json b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-3.json similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-3.json rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-3.json diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-6.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-6.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-6.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-6.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-7.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-7.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-7.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-7.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-8.html b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-8.html similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-8.html rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-8.html diff --git a/.snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-9.json b/.snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-9.json similarity index 100% rename from .snippets/code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-9.json rename to .snippets/code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-9.json diff --git a/build/contract-integrations/wormhole-relayers.md b/build/contract-integrations/wormhole-relayers.md index b292df7c..5424053f 100644 --- a/build/contract-integrations/wormhole-relayers.md +++ b/build/contract-integrations/wormhole-relayers.md @@ -138,4 +138,4 @@ See the [Wormhole CLI tool docs](/docs/build/toolkit/cli/) for installation and ## Step-by-Step Tutorial -For detailed, step-by-step guidance on creating cross-chain contracts that interact with the Wormhole relayer, refer to the [Create Cross-Chain Contracts](/docs/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/) tutorial. +For detailed, step-by-step guidance on creating cross-chain contracts that interact with the Wormhole relayer, refer to the [Create Cross-Chain Contracts](/docs/tutorials/by-product/contract-integrations/cross-chain-contracts/) tutorial. diff --git a/build/toolkit/solidity-sdk.md b/build/toolkit/solidity-sdk.md index f8f8fee8..bf66f6d0 100644 --- a/build/toolkit/solidity-sdk.md +++ b/build/toolkit/solidity-sdk.md @@ -162,5 +162,5 @@ The SDK includes built-in support for Forge-based testing, which allows you to t For a detailed example, check out the below repositories: - - [Cross chain messaging](/docs/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/){target=\_blank} - - [Cross chain token transfer](/docs/tutorials/by-product/cross-chain-contracts/cross-chain-token-contracts/){target=\_blank} \ No newline at end of file + - [Cross chain messaging](/docs/tutorials/by-product/contract-integrations/cross-chain-contracts/){target=\_blank} + - [Cross chain token transfer](/docs/tutorials/by-product/contract-integrations/cross-chain-token-contracts/){target=\_blank} \ No newline at end of file diff --git a/tutorials/by-product/.pages b/tutorials/by-product/.pages index 292def83..c1f7f71f 100644 --- a/tutorials/by-product/.pages +++ b/tutorials/by-product/.pages @@ -2,7 +2,7 @@ title: Tutorials by Product nav: - index.md - connect - - cross-chain-contracts + - contract-integrations - native-token-transfers - multigov - wormhole-sdk diff --git a/tutorials/by-product/cross-chain-contracts/.pages b/tutorials/by-product/contract-integrations/.pages similarity index 83% rename from tutorials/by-product/cross-chain-contracts/.pages rename to tutorials/by-product/contract-integrations/.pages index 763eb4de..0e5449fa 100644 --- a/tutorials/by-product/cross-chain-contracts/.pages +++ b/tutorials/by-product/contract-integrations/.pages @@ -1,4 +1,4 @@ -title: Cross-Chain Contracts +title: Contract Integrations nav: - index.md - 'Create Messaging Contracts': 'cross-chain-contracts.md' diff --git a/tutorials/by-product/cross-chain-contracts/cross-chain-contracts.md b/tutorials/by-product/contract-integrations/cross-chain-contracts.md similarity index 90% rename from tutorials/by-product/cross-chain-contracts/cross-chain-contracts.md rename to tutorials/by-product/contract-integrations/cross-chain-contracts.md index a98d74de..485442d9 100644 --- a/tutorials/by-product/cross-chain-contracts/cross-chain-contracts.md +++ b/tutorials/by-product/contract-integrations/cross-chain-contracts.md @@ -55,7 +55,7 @@ Key functions include: Here's the core of the contract: ```solidity ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-1.sol:24:43" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-1.sol:24:43" ``` You can find the full code for the `MessageSender.sol` below. @@ -63,7 +63,7 @@ You can find the full code for the `MessageSender.sol` below. ??? code "MessageSender.sol" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-1.sol" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-1.sol" ``` ### Receiver Contract: MessageReceiver @@ -81,8 +81,8 @@ Key implementation details include: - **`isRegisteredSender`** - restricts the processing of messages to only those from registered senders, preventing unauthorized cross-chain communication ```solidity ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-2.sol:12:13" ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-2.sol:22:39" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-2.sol:12:13" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-2.sol:22:39" ``` #### Message Processing @@ -90,7 +90,7 @@ Key implementation details include: The `receiveWormholeMessages` is the core function that processes the received message. It checks that the Wormhole relayer sent the message, decodes the payload, and emits an event with the message content. It is essential to verify the message sender to prevent unauthorized messages. ```solidity ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-2.sol:42:64" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-2.sol:42:64" ``` You can find the full code for the `MessageReceiver.sol` below. @@ -98,7 +98,7 @@ You can find the full code for the `MessageReceiver.sol` below. ??? code "MessageReceiver.sol" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-2.sol" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-2.sol" ``` ## Deploy Contracts @@ -165,7 +165,7 @@ The repository includes: The expected output should be similar to this: ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-7.html" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-7.html" ### Deployment Process @@ -176,19 +176,19 @@ Both deployment scripts, `deploySender.js` and `deployReceiver.js`, perform the === "`chains.json`" ```json - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-9.json" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-9.json" ``` === "`deploySender.js`" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-5.js:7:15" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-5.js:7:15" ``` === "`deployReceiver.js`" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js:7:15" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js:7:15" ``` !!! note @@ -199,13 +199,13 @@ Both deployment scripts, `deploySender.js` and `deployReceiver.js`, perform the === "`deploySender.js`" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-5.js:18:19" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-5.js:18:19" ``` === "`deployReceiver.js`" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js:18:19" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js:18:19" ``` 3. **Deploy the contract** - the contract is deployed to the network specified in the configuration. Upon successful deployment, the contract address is returned, which is crucial for interacting with the contract later on @@ -213,13 +213,13 @@ Both deployment scripts, `deploySender.js` and `deployReceiver.js`, perform the === "`deploySender.js`" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-5.js:36:39" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-5.js:36:39" ``` === "`deployReceiver.js`" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js:39:42" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js:39:42" ``` 4. **Register the `MessageSender` on the target chain** - after you deploy the `MessageReceiver` contract on the Celo Alfajores network, the sender contract address from Avalanche Fuji needs to be registered. This ensures that only messages from the registered `MessageSender` contract are processed @@ -227,7 +227,7 @@ Both deployment scripts, `deploySender.js` and `deployReceiver.js`, perform the This additional step is essential to enforce emitter validation, preventing unauthorized senders from delivering messages to the `MessageReceiver` contract ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js:55:66" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js:55:66" ``` You can find the full code for the `deploySender.js` and `deployReceiver.js` below. @@ -235,13 +235,13 @@ You can find the full code for the `deploySender.js` and `deployReceiver.js` bel ??? code "deploySender.js" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-5.js" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-5.js" ``` ??? code "deployReceiver.js" ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-6.js" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-6.js" ``` ### Deploy the Sender Contract @@ -256,7 +256,7 @@ The sender contract will handle quoting and sending messages cross-chain. 2. Once deployed, the contract address will be displayed. You may check the contract on the [Avalanche Fuji Explorer](https://testnet.snowtrace.io/){target=\_blank} ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-8.html" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-8.html" ### Deploy the Receiver Contract @@ -286,7 +286,7 @@ Let's break down the script step by step. 2. **`deployedContracts.json`** - stores the addresses of the deployed sender and receiver contracts. This file is dynamically updated when contracts are deployed, but users can also manually add their own deployed contract addresses if needed ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:8:16" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:8:16" ``` 2. **Configure the provider and signer** - the script first reads the chain configurations and extracts the contract addresses. One essential step in interacting with a blockchain is setting up a _provider_. A provider is your connection to the blockchain network. It allows your script to interact with the blockchain, retrieve data, and send transactions. In this case, we're using a JSON-RPC provider @@ -294,31 +294,31 @@ Let's break down the script step by step. Next, we configure the wallet, which will be used to sign transactions. The wallet is created using the private key and the provider. This ensures that all transactions sent from this wallet are broadcast to the Avalanche Fuji network: ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:34:35" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:34:35" ``` After setting up the wallet, the script loads the ABI for the `MessageSender.sol` contract and creates an instance of it: ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:38:43" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:38:43" ``` 3. **Set up the message details** - the next part of the script defines the target chain (Celo) and the target address (the receiver contract on Celo): ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:55:56" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:55:56" ``` You can customize the message that will be sent across chains: ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:59:59" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:59:59" ``` 4. **Estimate cross-chain cost** - before sending the message, we dynamically calculate the cross-chain cost using the `quoteCrossChainCost` function: ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:62:62" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:62:62" ``` This ensures that the transaction includes enough funds to cover the gas fees for the cross-chain message. @@ -326,13 +326,13 @@ Let's break down the script step by step. 5. **Send a message** - with everything set up, the message is sent using the `sendMessage` function: ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:65:72" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:65:72" ``` After sending, the script waits for the transaction to be confirmed: ```javascript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js:75:75" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js:75:75" ``` 6. **Run the script** - to send the message, run the following command: @@ -345,14 +345,14 @@ If everything is set up correctly, the message will be sent from the Avalanche F The console should output something similar to this: ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-4.html" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-4.html" You can find the full code for the `sendMessage.js` below. ??? code "sendMessage.js" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/snippet-3.js" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-contracts/snippet-3.js" ``` ## Conclusion diff --git a/tutorials/by-product/cross-chain-contracts/cross-chain-token-contracts.md b/tutorials/by-product/contract-integrations/cross-chain-token-contracts.md similarity index 91% rename from tutorials/by-product/cross-chain-contracts/cross-chain-token-contracts.md rename to tutorials/by-product/contract-integrations/cross-chain-token-contracts.md index 4a32bfaa..04fd1ee6 100644 --- a/tutorials/by-product/cross-chain-contracts/cross-chain-token-contracts.md +++ b/tutorials/by-product/contract-integrations/cross-chain-token-contracts.md @@ -54,7 +54,7 @@ To simplify this process, we've included a tool for verifying if a token has an 5. The expected output when the token has an attestation: - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-10.html" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-10.html" Using this tool ensures that you only attempt to transfer tokens with verified attestations, avoiding any potential issues during the cross-chain transfer process. @@ -111,7 +111,7 @@ Let's start writing the `CrossChainSender` contract: 2. Open the file. First, we'll start with the imports and the contract setup: ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-1.sol:1:14" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-1.sol:1:14" ``` This sets up the basic structure of the contract, including the necessary imports and the constructor that initializes the contract with the Wormhole-related addresses. @@ -119,7 +119,7 @@ Let's start writing the `CrossChainSender` contract: 3. Next, let's add a function that estimates the cost of sending tokens across chains: ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-1.sol:17:28" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-1.sol:17:28" ``` This function, `quoteCrossChainDeposit`, helps calculate the cost of transferring tokens to a different chain. It factors in the delivery cost and the cost of publishing a message via the Wormhole protocol. @@ -127,7 +127,7 @@ Let's start writing the `CrossChainSender` contract: 4. Finally, we'll add the function that sends the tokens across chains: ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-1.sol:31:58" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-1.sol:31:58" ``` This `sendCrossChainDeposit` function is where the actual token transfer happens. It sends the tokens to the recipient on the target chain using the Wormhole protocol. @@ -154,7 +154,7 @@ You can find the complete code for the `CrossChainSender.sol` below. ??? code "MessageSender.sol" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-1.sol" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-1.sol" ``` ### Receiver Contract: CrossChainReceiver @@ -172,7 +172,7 @@ Let's start writing the `CrossChainReceiver` contract: 2. Open the file. First, we'll start with the imports and the contract setup: ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-2.sol:1:14" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-2.sol:1:14" ``` Similar to the `CrossChainSender` contract, this sets up the basic structure of the contract, including the necessary imports and the constructor that initializes the contract with the Wormhole-related addresses. @@ -180,7 +180,7 @@ Let's start writing the `CrossChainReceiver` contract: 3. Next, let's add a function to handle receiving the payload and tokens: ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-2.sol:17:40" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-2.sol:17:40" ``` This `receivePayloadAndTokens` function processes the tokens and payload sent from another chain, decodes the recipient address, and transfers the tokens to them using the Wormhole protocol. This function also validates the emitter (`sourceAddress`) to ensure the message comes from a trusted sender. @@ -198,7 +198,7 @@ After we call `sendTokenWithPayloadToEvm` on the source chain, the message goes Let’s delve into the fields provided to us in the `TokenReceived` struct: ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-11.sol" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-11.sol" ``` - **`tokenHomeAddress`** - the original address of the token on its native chain. This is the same as the token field in the call to `sendTokenWithPayloadToEvm` unless the original token sent is a Wormhole-wrapped token. In that case, this will be the address of the original version of the token (on its native chain) in Wormhole address format (left-padded with 12 zeros) @@ -216,7 +216,7 @@ You can find the complete code for the `CrossChainReceiver.sol` contract below: ??? code "CrossChainReceiver.sol" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-2.sol" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-2.sol" ``` ## Deploy the Contracts @@ -240,7 +240,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 3. Open the `config.json` file and add the following configuration: ```json - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-3.json" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-3.json" ``` This file specifies the details for each chain where you plan to deploy your contracts, including the RPC URL, the `TokenBridge` address, the Wormhole relayer, and the Wormhole Core Contract. @@ -286,7 +286,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract The expected output should be similar to this: - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-6.html" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-6.html" 4. **Write the deployment script** - you’ll need a script to automate the deployment of your contracts. Let’s create the deployment script @@ -299,7 +299,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 2. Open the file and load imports and configuration: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:1:7" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:1:7" ``` Import the required libraries and modules to interact with Ethereum, handle file paths, load environment variables, and enable user interaction via the terminal. @@ -307,7 +307,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 3. Define interfaces to use for chain configuration and contract deployment: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:9:25" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:9:25" ``` These interfaces define the structure of the chain configuration and the contract deployment details. @@ -315,7 +315,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 4. Load and select the chains for deployment: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:27:47" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:27:47" ``` The `loadConfig` function reads the chain configuration from the `config.json` file, and the `selectChain` function allows the user to choose the source and target chains for deployment interactively. The user is prompted in the terminal to select which chains to use, making the process interactive and user-friendly. @@ -323,7 +323,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 5. Define the main function for deployment and load the chain configuration: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:48:53" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:48:53" ``` - The `main` function is the entry point for the deployment script @@ -332,7 +332,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 6. Set up provider and wallet: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:54:57" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:54:57" ``` The scripts establish a connection to the blockchain using a provider and create a wallet instance using a private key. This wallet is responsible for signing the deployment transaction on the source chain. @@ -340,7 +340,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 7. Read the compiled contracts: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:58:66" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:58:66" ``` - This code reads the `CrossChainSender.json` file, the compiled output of the `CrossChainSender.sol` contract @@ -350,7 +350,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 8. Extract the contract ABI and bytecode: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:68:69" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:68:69" ``` - **ABI (Application Binary Interface)** - defines the structure of the contract’s functions, events, and data types, allowing the front end to interact with the contract on the blockchain @@ -359,7 +359,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 9. Create the Contract Factory: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:71:75" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:71:75" ``` - **`ethers.ContractFactory`** - creates a new contract factory using the ABI, bytecode, and a wallet (representing the signer). The contract factory is responsible for deploying instances of the contract to the blockchain @@ -369,12 +369,12 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract === "`CrossChainSender`" ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:77:83" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:77:83" ``` === "`CrossChainReceiver`" ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:91:115" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:91:115" ``` Both functions deploy the respective contracts to the selected chains. @@ -390,12 +390,12 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract === "`senderAddress`" ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:86:89" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:86:89" ``` === "`receiverAddress`" ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:118:121" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:118:121" ``` You may display the deployed contract addresses in the terminal or save them to a JSON file for future reference. @@ -403,7 +403,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 12. Register the `CrossChainSender` address on the target chain: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:128:139" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:128:139" ``` After you deploy the `CrossChainReceiver` contract on the target network, the sender contract address from the source chain needs to be registered. This ensures that only messages from the registered `CrossChainSender` contract are processed. @@ -414,7 +414,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract ???- example "Save Deployment Details Example" ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:145:185" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:145:185" ``` Add your desired logic to save the deployed contract addresses in a JSON file (or another format). This will be important later when transferring tokens, as you'll need these addresses to interact with the deployed contracts. @@ -422,7 +422,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract 14. Handle errors and finalize the script: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts:186:201" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts:186:201" ``` The try-catch block wraps the deployment logic to catch any errors that may occur. @@ -437,7 +437,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract ??? code "deploy.ts" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-4.ts" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-4.ts" ``` 5. **Add your private key** - you'll need to provide your private key. It allows your deployment script to sign the transactions that deploy the smart contracts to the blockchain. Without it, the script won't be able to interact with the blockchain on your behalf @@ -471,7 +471,7 @@ Now that you've written the `CrossChainSender` and `CrossChainReceiver` contract If you followed the logic provided in the full code above, your terminal output should look something like this: ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-7.html" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-7.html" ## Transfer Tokens Across Chains @@ -495,7 +495,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` 2. Open the file. Start with the necessary imports, interfaces and configurations: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:1:25" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:1:25" ``` These imports include the essential libraries for interacting with Ethereum, handling file paths, loading environment variables, and managing user input. @@ -504,7 +504,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:27:47" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:27:47" ``` These functions load the network and contract details that were saved during deployment. @@ -514,7 +514,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` Refer to the deployed contracts and create logic as desired. In our example, we made this process interactive, allowing users to select the source and target chains from all the historically deployed contracts. This interactive approach helps ensure the correct chains are selected for the token transfer. ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:49:101" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:49:101" ``` 2. **Implement the token transfer logic** @@ -522,7 +522,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` 1. Start the `main` function: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:103:139" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:103:139" ``` The `main` function is where the token transfer logic will reside. It loads the chain and contract details, sets up the wallet and provider, and loads the `CrossChainSender` contract. @@ -532,7 +532,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` You'll now ask the user for the token contract address, the recipient address on the target chain, and the amount of tokens to transfer. ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:147:171" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:147:171" ``` This section of the script prompts the user for the token contract address and the recipient's address, fetches the token's decimal value, and parses the amount accordingly. @@ -542,7 +542,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` Finally, initiate the cross-chain transfer and log the details. ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:174:204" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:174:204" ``` This part of the script first approves the token transfer, then initiates the cross-chain transfer using the `CrossChainSender` contract, and finally logs the transaction hash for the user to track. @@ -550,7 +550,7 @@ In this step, you'll write a script to transfer tokens across chains using the ` 4. Finalize the script: ```typescript - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts:205:208" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts:205:208" ``` This section finalizes the script by calling the `main` function and handling any errors that may occur during the token transfer process. @@ -560,7 +560,7 @@ You can find the full code for the `transfer.ts` file below: ??? code "transfer.ts" ```solidity - --8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-5.ts" + --8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-5.ts" ``` ### Transfer Tokens @@ -585,7 +585,7 @@ You can verify the transaction on the [Wormhole Explorer](https://wormholescan.i If you followed the logic provided in the `transfer.ts` file above, your terminal output should look something like this: ---8<-- "code/tutorials/by-product/cross-chain-contracts/cross-chain-token-transfers/snippet-8.html" +--8<-- "code/tutorials/by-product/contract-integrations/cross-chain-token-transfers/snippet-8.html" !!! note In this example, we demonstrated a token transfer from the Avalanche Fuji Testnet to the Celo Alfajores Testnet. We sent two units of USDC Testnet tokens using the token contract address `0x5425890298aed601595a70ab815c96711a31bc65`. You can replace these details with those relevant to your project or use the same for testing purposes. diff --git a/tutorials/by-product/cross-chain-contracts/index.md b/tutorials/by-product/contract-integrations/index.md similarity index 93% rename from tutorials/by-product/cross-chain-contracts/index.md rename to tutorials/by-product/contract-integrations/index.md index c9b67bbc..e0f7864b 100644 --- a/tutorials/by-product/cross-chain-contracts/index.md +++ b/tutorials/by-product/contract-integrations/index.md @@ -1,5 +1,5 @@ --- -title: Cross-Chain Contract Tutorials +title: Cross-Chain Contract Integration Tutorials description: Master cross-chain smart contracts with Wormhole. Learn messaging, token transfers, and secure, scalable dApp deployments across blockchains. --- @@ -15,7 +15,7 @@ Expand the reach of your decentralized applications by building smart contracts Learn how to build and deploy smart contracts that communicate seamlessly across multiple blockchains. This tutorial walks you through using Wormhole’s Solidity SDK to send and receive messages between Avalanche Fuji and Celo Alfajores, helping you master emitter validation, relayer usage, and cross-chain cost management. - [:octicons-arrow-right-16: Start building](/docs/tutorials/by-product/cross-chain-contracts/cross-chain-contracts/) + [:octicons-arrow-right-16: Start building](/docs/tutorials/by-product/contract-integrations/cross-chain-contracts/) - :octicons-repo-16:{ .lg .middle } **Create Cross-Chain Token Transfer Contracts** @@ -23,7 +23,7 @@ Expand the reach of your decentralized applications by building smart contracts Discover how to create a fully functional cross-chain token transfer system using Wormhole’s Solidity SDK. This tutorial guides you through token attestation, contract deployment, and secure transfers of ERC-20 tokens between test networks. By the end, you’ll know how to tap into global liquidity and enrich your dApps with seamless multi-chain asset movement. - [:octicons-arrow-right-16: Start building](/docs/tutorials/by-product/cross-chain-contracts/cross-chain-token-contracts/) + [:octicons-arrow-right-16: Start building](/docs/tutorials/by-product/contract-integrations/cross-chain-token-contracts/) diff --git a/tutorials/by-product/index.md b/tutorials/by-product/index.md index fc5b598e..957bfcab 100644 --- a/tutorials/by-product/index.md +++ b/tutorials/by-product/index.md @@ -23,7 +23,7 @@ In this section, you'll find tutorials focused on individual Wormhole products. Learn to build smart contracts that communicate across multiple blockchains. These tutorials show you how to create robust cross-chain contracts, allowing your dApps to move beyond a single network and tap into global liquidity, functionality, and user bases. - [:octicons-arrow-right-16: Start building](/docs/tutorials/by-product/cross-chain-contracts/) + [:octicons-arrow-right-16: Start building](/docs/tutorials/by-product/contract-integrations/) - :octicons-sync-16:{ .lg .middle } **Native Token Transfers** diff --git a/tutorials/index.md b/tutorials/index.md index 9633a797..567dc5f9 100644 --- a/tutorials/index.md +++ b/tutorials/index.md @@ -6,7 +6,7 @@ template: root-index-page.html # Tutorials -Welcome to the Wormhole tutorials section! Whether you're just getting started or looking to build advanced cross-chain applications, this collection of step-by-step tutorials will help you leverage the full power of the Wormhole ecosystem. +Welcome to the Wormhole tutorials section! Whether you're just getting started or looking to build advanced cross-chain applications, this collection of step-by-step tutorials will help you leverage the full power of the Wormhole ecosystem. These tutorials are designed to help you develop efficient, scalable, and innovative cross-chain applications, from integrating individual Wormhole products to creating comprehensive end-to-end solutions. Explore our tutorials to get hands-on experience with Wormhole!