From a8fe0bf1b7d2c342cb2f6c86f7cf1f86ab0512cf Mon Sep 17 00:00:00 2001 From: owenwahlgren Date: Tue, 1 Oct 2024 14:46:18 -0400 Subject: [PATCH] renaming paths --- .../04-icm-basics/04-create-sender-contract.mdx | 6 +++--- .../04-icm-basics/06-create-receiver-contract.mdx | 6 +++--- .../08-adapting-the-contract-exercise.mdx | 2 +- .../05-two-way-communication/02-sender-contract.mdx | 2 +- .../03-create-sender-contract.mdx | 2 +- .../05-two-way-communication/04-receiver-contract.mdx | 2 +- .../05-create-the-receiver-contract.mdx | 2 +- .../03-create-simple-calculator-sender.mdx | 2 +- .../04-create-simple-calulcator-receiver.mdx | 2 +- .../06-encoding-function-name.mdx | 10 +++++----- .../06-invoking-functions/07-extend-calculator.mdx | 2 +- .../04-retrieving-icm-from-registry.mdx | 2 +- .../06-incentivize-an-awm-relayer.mdx | 2 +- .../07-interaction-flow-with-fees.mdx | 4 ++-- .../02-deploy-erc-20-token.mdx | 4 ++-- .../02-deploy-wrapped-native.mdx | 2 +- .../08-deploy-wrapped-exchange-contract.mdx | 2 +- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/content/course/interchain-messaging/04-icm-basics/04-create-sender-contract.mdx b/content/course/interchain-messaging/04-icm-basics/04-create-sender-contract.mdx index 8dfdedd5..9eae8a11 100644 --- a/content/course/interchain-messaging/04-icm-basics/04-create-sender-contract.mdx +++ b/content/course/interchain-messaging/04-icm-basics/04-create-sender-contract.mdx @@ -13,9 +13,9 @@ Lets start by deploying our sender contract on C-Chain. It will be responsible f ### Read the Sender Contract -The following contract is located inside `src/0-send-receive` directory. Read through the contract below and and understand what is happening: +The following contract is located inside `contracts/interchain-messaging/send-receive` directory. Read through the contract below and and understand what is happening: -```solidity title="src/0-send-receive/senderOnCChain.sol" +```solidity title="contracts/interchain-messaging/send-receive/senderOnCChain.sol" // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. @@ -127,7 +127,7 @@ contract SenderOnCChain { To deploy a contract using Foundry use the following command: ```bash -forge create --rpc-url local-c --private-key $PK src/0-send-receive/senderOnCChain.sol:SenderOnCChain +forge create --rpc-url local-c --private-key $PK contracts/interchain-messaging/send-receive/senderOnCChain.sol:SenderOnCChain ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-messaging/04-icm-basics/06-create-receiver-contract.mdx b/content/course/interchain-messaging/04-icm-basics/06-create-receiver-contract.mdx index 17fa1400..0b26bcf4 100644 --- a/content/course/interchain-messaging/04-icm-basics/06-create-receiver-contract.mdx +++ b/content/course/interchain-messaging/04-icm-basics/06-create-receiver-contract.mdx @@ -14,9 +14,9 @@ Now it's time to deploy our receiver contract to our L1. It will implement the c ### Read the Receiver Contract -The following contract is located inside `src/0-send-receive` directory. Read through the contract below and and understand what is happening: +The following contract is located inside `contracts/interchain-messaging/send-receive` directory. Read through the contract below and and understand what is happening: -```solidity title="src/0-send-receive/receiverOnSubnet.sol" +```solidity title="contracts/interchain-messaging/send-receive/receiverOnSubnet.sol" // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. @@ -57,7 +57,7 @@ contract ReceiverOnSubnet is ITeleporterReceiver { To deploy a contract using Foundry use the following command: ```bash -forge create --rpc-url myblockchain --private-key $PK src/0-send-receive/receiverOnSubnet.sol:ReceiverOnSubnet +forge create --rpc-url myblockchain --private-key $PK contracts/interchain-messaging/send-receive/receiverOnSubnet.sol:ReceiverOnSubnet ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-messaging/04-icm-basics/08-adapting-the-contract-exercise.mdx b/content/course/interchain-messaging/04-icm-basics/08-adapting-the-contract-exercise.mdx index bd7d7915..f2b7a68c 100644 --- a/content/course/interchain-messaging/04-icm-basics/08-adapting-the-contract-exercise.mdx +++ b/content/course/interchain-messaging/04-icm-basics/08-adapting-the-contract-exercise.mdx @@ -8,4 +8,4 @@ icon: Terminal To create a deeper understanding of the concepts, now change the provided contracts. Instead of sending a string, now send a number and add up the numbers on the destination chain: -Once you finished with the assignment you can review the correct answer at `/src/0b-send-receive` in the [Avalanche-Starter-Kit](https://github.com/ava-labs/avalanche-starter-kit) +Once you finished with the assignment you can review the correct answer at `/contracts/interchain-messaging/send-receive-assignment-solution` in the [Avalanche-Starter-Kit](https://github.com/ava-labs/avalanche-starter-kit) diff --git a/content/course/interchain-messaging/05-two-way-communication/02-sender-contract.mdx b/content/course/interchain-messaging/05-two-way-communication/02-sender-contract.mdx index 2c8e5aff..8b148a3b 100644 --- a/content/course/interchain-messaging/05-two-way-communication/02-sender-contract.mdx +++ b/content/course/interchain-messaging/05-two-way-communication/02-sender-contract.mdx @@ -13,7 +13,7 @@ The sender contract has now two tasks: Therefore, we need to change the sender contract to be able to receive a message back. We will need to implement the same interface `ITeleporterReceiver` as the receiver contract and implement the `receiveTeleporterMessage` function. -```solidity title="src/1-send-roundtrip/senderOnCChain.sol" +```solidity title="contracts/interchain-messaging/send-roundtrip/senderOnCChain.sol" // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/content/course/interchain-messaging/05-two-way-communication/03-create-sender-contract.mdx b/content/course/interchain-messaging/05-two-way-communication/03-create-sender-contract.mdx index 9bf6b8a5..a84fdacb 100644 --- a/content/course/interchain-messaging/05-two-way-communication/03-create-sender-contract.mdx +++ b/content/course/interchain-messaging/05-two-way-communication/03-create-sender-contract.mdx @@ -25,7 +25,7 @@ Perform the changes on `senderOnCChain.sol` described in the [previous section.] ### Deploy the Sender Contract ```bash -forge create --rpc-url local-c --private-key $PK src/1-send-roundtrip/senderOnCChain.sol:SenderOnCChain +forge create --rpc-url local-c --private-key $PK contracts/interchain-messaging/send-roundtrip/senderOnCChain.sol:SenderOnCChain ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-messaging/05-two-way-communication/04-receiver-contract.mdx b/content/course/interchain-messaging/05-two-way-communication/04-receiver-contract.mdx index 17871278..f5e5027f 100644 --- a/content/course/interchain-messaging/05-two-way-communication/04-receiver-contract.mdx +++ b/content/course/interchain-messaging/05-two-way-communication/04-receiver-contract.mdx @@ -13,7 +13,7 @@ The receiver contract now has two tasks: Therefore, we need to change the receiver contract to be able to send a message back. We will need to instantiate a `TeleporterMessenger` and call the `sendCrossChainMessage()` function. -```solidity title="src/1-send-roundtrip/receiverOnSubnet.sol" +```solidity title="contracts/interchain-messaging/send-roundtrip/receiverOnSubnet.sol" // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/content/course/interchain-messaging/05-two-way-communication/05-create-the-receiver-contract.mdx b/content/course/interchain-messaging/05-two-way-communication/05-create-the-receiver-contract.mdx index c64c41f8..1968b30c 100644 --- a/content/course/interchain-messaging/05-two-way-communication/05-create-the-receiver-contract.mdx +++ b/content/course/interchain-messaging/05-two-way-communication/05-create-the-receiver-contract.mdx @@ -16,7 +16,7 @@ Go ahead and deploy the receiver contract: ### Deploy the Receiver Contract ```bash -forge create --rpc-url myblockchain --private-key $PK src/1-send-roundtrip/receiverOnSubnet.sol:ReceiverOnSubnet +forge create --rpc-url myblockchain --private-key $PK contracts/interchain-messaging/send-roundtrip/receiverOnSubnet.sol:ReceiverOnSubnet ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-messaging/06-invoking-functions/03-create-simple-calculator-sender.mdx b/content/course/interchain-messaging/06-invoking-functions/03-create-simple-calculator-sender.mdx index e559c62c..a366ef12 100644 --- a/content/course/interchain-messaging/06-invoking-functions/03-create-simple-calculator-sender.mdx +++ b/content/course/interchain-messaging/06-invoking-functions/03-create-simple-calculator-sender.mdx @@ -65,7 +65,7 @@ To increase the readability of the code, we have created a helper function `enco Deploy the sender contract on the Local C-Chain: ```bash -forge create --rpc-url local-c --private-key $PK src/2a-invoking-functions/SimpleCalculatorSenderOnCChain.sol:SimpleCalculatorSenderOnCChain +forge create --rpc-url local-c --private-key $PK contracts/interchain-messaging/invoking-functions/SimpleCalculatorSenderOnCChain.sol:SimpleCalculatorSenderOnCChain ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-messaging/06-invoking-functions/04-create-simple-calulcator-receiver.mdx b/content/course/interchain-messaging/06-invoking-functions/04-create-simple-calulcator-receiver.mdx index 162da17d..7121037d 100644 --- a/content/course/interchain-messaging/06-invoking-functions/04-create-simple-calulcator-receiver.mdx +++ b/content/course/interchain-messaging/06-invoking-functions/04-create-simple-calulcator-receiver.mdx @@ -52,7 +52,7 @@ contract SimpleCalculatorReceiverOnSubnet is ITeleporterReceiver { Deploy the receiver contract on your Avalanche L1: ```bash -forge create --rpc-url myblockchain --private-key $PK src/2a-invoking-functions/SimpleCalculatorReceiverOnSubnet.sol:SimpleCalculatorReceiverOnSubnet +forge create --rpc-url myblockchain --private-key $PK contracts/interchain-messaging/invoking-functions/SimpleCalculatorReceiverOnSubnet.sol:SimpleCalculatorReceiverOnSubnet ``` ``` diff --git a/content/course/interchain-messaging/06-invoking-functions/06-encoding-function-name.mdx b/content/course/interchain-messaging/06-invoking-functions/06-encoding-function-name.mdx index f447fb99..7687e6c7 100644 --- a/content/course/interchain-messaging/06-invoking-functions/06-encoding-function-name.mdx +++ b/content/course/interchain-messaging/06-invoking-functions/06-encoding-function-name.mdx @@ -17,7 +17,7 @@ For the add function we need to encode two numbers. For the concatenate function The first step is to create a `CalculatorAction` enum that specifies the different functions that can be called on the calculator. -```solidity title="src/2b-invoking-functions/CalculatorActions.sol" +```solidity title="contracts/interchain-messaging/invoking-functions/CalculatorActions.sol" pragma solidity ^0.8.18; enum CalculatorAction { @@ -28,7 +28,7 @@ enum CalculatorAction { In the next step we can add this to our `encode helpers` in the sender contract: -```solidity title="src/2b-invoking-functions/CalculatorSenderOnCChain.sol" +```solidity title="contracts/interchain-messaging/invoking-functions/CalculatorSenderOnCChain.sol" pragma solidity ^0.8.18; import "@teleporter/ITeleporterMessenger.sol"; @@ -85,7 +85,7 @@ As you can see here we are calling `abi.encode` twice in the encode helpers. The Let's now look at the receiver: -```solidity title="src/2b-invoking-functions/CalculatorReceiverOnSubnet.sol" +```solidity title="contracts/interchain-messaging/invoking-functions/CalculatorReceiverOnSubnet.sol" pragma solidity ^0.8.18; import "@teleporter/ITeleporterMessenger.sol"; @@ -179,7 +179,7 @@ Deploy the sender and receiver contracts and try out the `add` and `concatenate` ```bash -forge create --rpc-url local-c --private-key $PK src/2b-invoking-functions/CalculatorSenderOnCChain.sol:CalculatorSenderOnCChain +forge create --rpc-url local-c --private-key $PK contracts/interchain-messaging/invoking-functions/CalculatorSenderOnCChain.sol:CalculatorSenderOnCChain ``` ``` [⠃] Compiling... @@ -206,7 +206,7 @@ export SENDER_ADDRESS=0x8B3BC4270BE2abbB25BC04717830bd1Cc493a461 ### Deploy the Receiver Contract: ```bash -forge create --rpc-url myblockchain --private-key $PK src/2b-invoking-functions/CalculatorReceiverOnSubnet.sol:CalculatorReceiverOnSubnet +forge create --rpc-url myblockchain --private-key $PK contracts/interchain-messaging/invoking-functions/CalculatorReceiverOnSubnet.sol:CalculatorReceiverOnSubnet ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-messaging/06-invoking-functions/07-extend-calculator.mdx b/content/course/interchain-messaging/06-invoking-functions/07-extend-calculator.mdx index 72ae754e..1df7cf76 100644 --- a/content/course/interchain-messaging/06-invoking-functions/07-extend-calculator.mdx +++ b/content/course/interchain-messaging/06-invoking-functions/07-extend-calculator.mdx @@ -14,4 +14,4 @@ You will need to: - Add a new encode helper and send function to the sender contract - Add a new route to the receiver and implement the `tripleSum` function -Check out the solution under `/src/2c-invoking-functions` on the Avalanche-Starter-Kit +Check out the solution under `/contracts/interchain-messaging/2c-invoking-functions` on the Avalanche-Starter-Kit diff --git a/content/course/interchain-messaging/07-icm-registry/04-retrieving-icm-from-registry.mdx b/content/course/interchain-messaging/07-icm-registry/04-retrieving-icm-from-registry.mdx index d16e6fe5..fef69e69 100644 --- a/content/course/interchain-messaging/07-icm-registry/04-retrieving-icm-from-registry.mdx +++ b/content/course/interchain-messaging/07-icm-registry/04-retrieving-icm-from-registry.mdx @@ -8,7 +8,7 @@ icon: BookOpen Let's now integrate the registry into a smart contract. Let's go back to the very simple string sending contract from the beginning: -```solidity title="src/3-registry/SenderOnCChainWithRegistry.sol" +```solidity title="contracts/interchain-messaging/registry/SenderOnCChainWithRegistry.sol" pragma solidity ^0.8.18; import "@teleporter/upgrades/TeleporterRegistry.sol"; // [!code highlight] diff --git a/content/course/interchain-messaging/12-incentivizing-a-relayer/06-incentivize-an-awm-relayer.mdx b/content/course/interchain-messaging/12-incentivizing-a-relayer/06-incentivize-an-awm-relayer.mdx index 187227bd..926dbcec 100644 --- a/content/course/interchain-messaging/12-incentivizing-a-relayer/06-incentivize-an-awm-relayer.mdx +++ b/content/course/interchain-messaging/12-incentivizing-a-relayer/06-incentivize-an-awm-relayer.mdx @@ -12,7 +12,7 @@ Now that we have an ERC20 token deployed and some of those tokens in our account In the following contract, make sure to update `destinationBlockchainID` with your current deployment -```solidity title="src/9-incentivize-relayer/senderWithFees.sol" +```solidity title="contracts/interchain-messaging/incentivize-relayer/senderWithFees.sol" // (c) 2023, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. diff --git a/content/course/interchain-messaging/12-incentivizing-a-relayer/07-interaction-flow-with-fees.mdx b/content/course/interchain-messaging/12-incentivizing-a-relayer/07-interaction-flow-with-fees.mdx index 8d6d1f10..17a63b2f 100644 --- a/content/course/interchain-messaging/12-incentivizing-a-relayer/07-interaction-flow-with-fees.mdx +++ b/content/course/interchain-messaging/12-incentivizing-a-relayer/07-interaction-flow-with-fees.mdx @@ -22,7 +22,7 @@ Now we have all the Smart Contract 📜 set we can start sending incentivized cr To deploy the sender contract run: ```bash -forge create --rpc-url local-c --private-key $PK src/9-incentivize-relayer/senderWithFees.sol:SenderWithFeesOnCChain +forge create --rpc-url local-c --private-key $PK contracts/interchain-messaging/incentivize-relayer/senderWithFees.sol:SenderWithFeesOnCChain ``` ``` [⠊] Compiling... @@ -50,7 +50,7 @@ export SENDER_ADDRESS=0xa4DfF80B4a1D748BF28BC4A271eD834689Ea3407 Now, deploy the receiver contract. ```bash -forge create --rpc-url myblockchain --private-key $PK src/9-incentivize-relayer/receiverWithFees.sol:ReceiverOnSubnet +forge create --rpc-url myblockchain --private-key $PK contracts/interchain-messaging/incentivize-relayer/receiverWithFees.sol:ReceiverOnSubnet ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-token-transfer/06-erc-20-to-erc-20-bridge/02-deploy-erc-20-token.mdx b/content/course/interchain-token-transfer/06-erc-20-to-erc-20-bridge/02-deploy-erc-20-token.mdx index 12c0a384..3b9898ce 100644 --- a/content/course/interchain-token-transfer/06-erc-20-to-erc-20-bridge/02-deploy-erc-20-token.mdx +++ b/content/course/interchain-token-transfer/06-erc-20-to-erc-20-bridge/02-deploy-erc-20-token.mdx @@ -13,10 +13,10 @@ import { Step, Steps } from 'fumadocs-ui/components/steps'; ### Deploy an ERC-20 Token -To transfer an ERC20 token from C-chain to your own blockchain, the fist thing we will need is the ERC20 token to bridge. You will find a contract in the Starter-Kit under src/8-erc20-to-erc20-interchain-token-transfer/ERC20.sol:TOK of the Starter-kit +To transfer an ERC20 token from C-chain to your own blockchain, the fist thing we will need is the ERC20 token to bridge. You will find a contract in the Starter-Kit under `contracts/interchain-token-transfer/erc20-to-erc20/ERC20.sol:TOK` of the Starter-kit ```bash -forge create --rpc-url local-c --private-key $PK src/8-erc20-to-erc20-interchain-token-transfer/ERC20.sol:TOK +forge create --rpc-url local-c --private-key $PK contracts/interchain-token-transfer/erc20-to-erc20/ERC20.sol:TOK ``` diff --git a/content/course/interchain-token-transfer/08-native-to-erc-20-bridge/02-deploy-wrapped-native.mdx b/content/course/interchain-token-transfer/08-native-to-erc-20-bridge/02-deploy-wrapped-native.mdx index 4343e1e6..4c2b48db 100644 --- a/content/course/interchain-token-transfer/08-native-to-erc-20-bridge/02-deploy-wrapped-native.mdx +++ b/content/course/interchain-token-transfer/08-native-to-erc-20-bridge/02-deploy-wrapped-native.mdx @@ -12,7 +12,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps'; ### Deploy Wrapped Native Token `ExampleWNATV` ```bash -forge create --rpc-url myblockchain --private-key $PK src/5-native-to-erc20-interchain-token-transfer/ExampleWNATV.sol:WNATV +forge create --rpc-url myblockchain --private-key $PK contracts/interchain-token-transfer/native-to-erc20/ExampleWNATV.sol:WNATV ``` ``` [⠊] Compiling... diff --git a/content/course/interchain-token-transfer/13-cross-chain-token-swaps/08-deploy-wrapped-exchange-contract.mdx b/content/course/interchain-token-transfer/13-cross-chain-token-swaps/08-deploy-wrapped-exchange-contract.mdx index e77a21fe..fc698d32 100644 --- a/content/course/interchain-token-transfer/13-cross-chain-token-swaps/08-deploy-wrapped-exchange-contract.mdx +++ b/content/course/interchain-token-transfer/13-cross-chain-token-swaps/08-deploy-wrapped-exchange-contract.mdx @@ -22,7 +22,7 @@ While deploying the wrapped exchange contract, you will need to send two constru - The second argument is the Trader Joe's (or any other Uniswap V2-like dapp) Factory V1 contract address on the destination chain (Fuji), which is: [`0xF5c7d9733e5f53abCC1695820c4818C59B457C2C`](https://testnet.snowtrace.io/address/0xF5c7d9733e5f53abCC1695820c4818C59B457C2C). Deployed contracts of TraderJoe can be found [here](https://docs.traderjoexyz.com/deployment-addresses/fuji). ```bash -forge create --rpc-url local-c --private-key $PK src/10-cross-chain-token-swaps/DexERC20Wrapper.sol:DexERC20Wrapper --constructor-args 0xd00ae08403B9bbb9124bB305C09058E32C39A48c 0xF5c7d9733e5f53abCC1695820c4818C59B457C2C +forge create --rpc-url local-c --private-key $PK contracts/interchain-token-transfer/cross-chain-token-swaps/DexERC20Wrapper.sol:DexERC20Wrapper --constructor-args 0xd00ae08403B9bbb9124bB305C09058E32C39A48c 0xF5c7d9733e5f53abCC1695820c4818C59B457C2C ```