Skip to content

Commit

Permalink
Add gas spikes note (#2105)
Browse files Browse the repository at this point in the history
* Add gas spikes note

* Remove printscreen

* Add shorter inline explanation and adjust gas spike insert

---------

Co-authored-by: Crystal Gomes <[email protected]>
  • Loading branch information
khadni and thedriftofwords authored Oct 4, 2024
1 parent 58332d3 commit fb1f1fa
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 61 deletions.
15 changes: 5 additions & 10 deletions src/content/ccip/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ Deploy the `Sender.sol` contract on _Avalanche Fuji_. To see a detailed explanat
style="max-width: 70%;"
/>

1. Open MetaMask and send <CopyText text="0.2" code/> LINK to the contract address that you copied. Your contract will pay CCIP fees in LINK.
1. Open MetaMask and send <CopyText text="70" code/> LINK to the contract address that you copied. Your contract will pay CCIP fees in LINK.

<ClickToZoom
src="/images/ccip/tutorials/fund-deployed-sender-avalanche-fuji.webp"
alt="Chainlink CCIP fund deployed sender Avalanche Fuji"
/>
**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

## Deploy the receiver contract

Expand Down Expand Up @@ -101,7 +99,7 @@ Deploy the receiver contract on _Ethereum Sepolia_. You will use this contract t
style="max-width: 70%;"
/>

You now have one _sender_ contract on _Avalanche Fuji_ and one _receiver_ contract on _Ethereum Sepolia_. You sent `0.2` LINK to the _sender_ contract to pay the CCIP fees. Next, send data from the sender contract to the receiver contract.
You now have one _sender_ contract on _Avalanche Fuji_ and one _receiver_ contract on _Ethereum Sepolia_. You sent `70` LINK to the _sender_ contract to pay the CCIP fees. Next, send data from the sender contract to the receiver contract.

## Send data

Expand All @@ -125,10 +123,7 @@ Send a `Hello World!` string from your contract on _Avalanche Fuji_ to the contr

1. Click the **transact** button to run the function. MetaMask prompts you to confirm the transaction.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.2 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. After the transaction is successful, note the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x113933ec9f1b2e795a1e2f564c9d452db92d3e9a150545712687eb546916e633) of a successful transaction on _Avalanche Fuji_.

Expand Down
15 changes: 6 additions & 9 deletions src/content/ccip/tutorials/cross-chain-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ To use this contract:

You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in LINK. Read this [explanation](#transferring-tokens-and-pay-in-link) for a detailed description of the code example.

1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="0.2" code/> _LINK_ to your contract. **Note**: The LINK tokens are used to pay for CCIP fees.
1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="70" code/> _LINK_ to your contract. **Note**: The LINK tokens are used to pay for CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Transfer CCIP-BnM from _Avalanche Fuji_:

Expand All @@ -93,10 +96,7 @@ You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in
1. Click the **transact** button and confirm the transaction on MetaMask.
1. Once the transaction is successful, note the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x62ca604240fc30133646ff94dcedac5375c5e42b109f3339c85e4fa29541d42b) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.2 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down Expand Up @@ -156,10 +156,7 @@ You will transfer _0.001 CCIP-BnM_. The CCIP fees for using CCIP will be paid in
1. Click the **transact** button and confirm the transaction on MetaMask.
1. Once the transaction is successful, note the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x186e5767d65dffe685c24d5ee881201e2b39fd684220a68943b0b861178ddf64) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.01 ETH_ to proceed. If your
transaction fails, fund your contract with more _ETH_ and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down
11 changes: 6 additions & 5 deletions src/content/ccip/tutorials/manual-execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ To use this contract:
1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list.
Note your contract address.
1. Open MetaMask and fund your contract with CCIP-BnM tokens. You can transfer <CopyText text="0.002" code/> _CCIP-BnM_ to your contract.
1. Open MetaMask and fund your contract with LINK tokens. You can transfer <CopyText text="0.5" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.
1. Open MetaMask and fund your contract with LINK tokens. You can transfer <CopyText text="70" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Enable your contract to send CCIP messages to _Ethereum Sepolia_:
1. In Remix IDE, under _Deploy & Run Transactions_, open the list of transactions of your smart contract deployed on _Avalanche Fuji_.
1. Call the `allowlistDestinationChain` with <CopyText text="16015286601757825753" code/> as the destination chain selector, and <CopyText text="true" code/> as allowed. Each chain selector is found on the [supported networks page](/ccip/supported-networks).
Expand Down Expand Up @@ -109,10 +113,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will
1. Click on `transact` and confirm the transaction on MetaMask.
1. After the transaction is successful, record the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0xfb7e1eea5335c018589166b1ac597b618a92899d99ec4d1b1079e147cde81d9b) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.5 LINK_ to proceed. If your transaction
fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash. Note that the _Gas Limit_ is _20000_. In this example, the CCIP message ID is _0xf8dc098c832332ac59ccc73ee00b480975d8f122a2265c90a1ccc2cd52268770_.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ At this point, you have one _sender_ contract on _Avalanche Fuji_ and one _recei

You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will be paid in LINK.

1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="0.5" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.
1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="70" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Send a string data with tokens from _Avalanche Fuji_:

Expand All @@ -113,10 +116,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will
1. Click on `transact` and confirm the transaction on MetaMask.
1. After the transaction is successful, record the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x4c7a192fa5636557569d076c06633c4f06140f117a44b49f21628eedd72b8423) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.5 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down
15 changes: 6 additions & 9 deletions src/content/ccip/tutorials/programmable-token-transfers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ At this point, you have one _sender_ contract on _Avalanche Fuji_ and one _recei

You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will be paid in LINK. Read this [explanation](#transferring-tokens-and-data-and-pay-in-link) for a detailed description of the code example.

1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="0.2" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.
1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="70" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Send a string data with tokens from _Avalanche Fuji_:

Expand All @@ -110,10 +113,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will
1. Click on `transact` and confirm the transaction on MetaMask.
1. After the transaction is successful, record the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0xd3a0fade0e143fb39964c764bd4803e40062ba8c88e129f44ee795e33ade464b) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.2 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down Expand Up @@ -176,10 +176,7 @@ You will transfer _0.001 CCIP-BnM_ and a text. The CCIP fees for using CCIP will
1. Click on `transact` and confirm the transaction on MetaMask.
1. Once the transaction is successful, note the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x8101fef78288981813915e77f8e5746bdba69711bdb7bc1706944a67ac70854b) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.01 ETH_ to proceed. If your
transaction fails, fund your contract with more _ETH_ and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ Deploy the `MessageTracker.sol` contract on _Avalanche Fuji_ and enable it to se

1. After you confirm the transaction, the contract address appears in the **Deployed Contracts** list. Copy your contract address.

1. Open MetaMask and send <CopyText text="0.5" code/> LINK to the contract address you copied. Your contract will pay CCIP fees in LINK.
1. Open MetaMask and send <CopyText text="70" code/> LINK to the contract address you copied. Your contract will pay CCIP fees in LINK.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Allow the _Ethereum Sepolia_ chain selector for both destination and source chains.

Expand Down Expand Up @@ -94,7 +97,10 @@ Deploy the `Acknowledger.sol` contract on _Ethereum Sepolia_ and enable it to se

1. After you confirm the transaction, the contract address appears in the **Deployed Contracts** list. Copy this contract address.

1. Open MetaMask and send <CopyText text="0.5" code/> LINK to the contract address that you copied. Your contract will pay CCIP fees in LINK.
1. Open MetaMask and send <CopyText text="70" code/> LINK to the contract address that you copied. Your contract will pay CCIP fees in LINK.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Allow the _Avalanche Fuji_ chain selector for both destination and source chains. You must also enable your acknowledger contract to receive CCIP messages from the message tracker you deployed on _Avalanche Fuji_.

Expand All @@ -116,7 +122,9 @@ Deploy the `Acknowledger.sol` contract on _Ethereum Sepolia_ and enable it to se
1. Open MetaMask and select the _Avalanche Fuji_ network.
1. Click **transact** to call the function. MetaMask prompts you to confirm the transaction.

At this point, you have one _message tracker_ (sender) contract on _Avalanche Fuji_ and one _acknowledger_ (receiver) contract on _Ethereum Sepolia_. You sent `0.5` LINK to the _message tracker_ contract and `0.5` LINK to the _acknowledger_ contract to pay the CCIP fees.
At this point, you have one _message tracker_ (sender) contract on _Avalanche Fuji_ and one _acknowledger_ (receiver) contract on _Ethereum Sepolia_. You sent `70` LINK to the _message tracker_ contract and `70` LINK to the _acknowledger_ contract to pay the CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia.

### Send data and track the message status

Expand All @@ -136,10 +144,7 @@ At this point, you have one _message tracker_ (sender) contract on _Avalanche Fu

1. Click **transact** to call the function. MetaMask prompts you to confirm the transaction.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.5 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Upon transaction success, expand the last transaction in the Remix log and copy the transaction hash. In this example, it is `0x1f88abc33a4ab426a5466e01d9e5fe8a2b96d6a6e5cedb643a674489c74126b4`.

Expand Down
15 changes: 6 additions & 9 deletions src/content/ccip/tutorials/send-arbitrary-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ At this point, you have one _sender_ contract on _Avalanche Fuji_ and one _recei

You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in LINK. Read this [explanation](#sending-data-and-pay-in-link) for a detailed description of the code example.

1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="0.5" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.
1. Open MetaMask and connect to _Avalanche Fuji_. Fund your contract with LINK tokens. You can transfer <CopyText text="70" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this example, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

1. Send "Hello World!" from _Avalanche Fuji_:

Expand All @@ -96,10 +99,7 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in L
1. Click on `transact` and confirm the transaction on MetaMask.
1. Once the transaction is successful, note the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x233d2d882e6cfe736c982d58a33021d2f4f6b96e0cfd2c7a874cf2eb63790aa1) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.5 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down Expand Up @@ -152,10 +152,7 @@ You will use CCIP to send a text. The CCIP fees for using CCIP will be paid in n
1. Click on `transact` and confirm the transaction on MetaMask.
1. Once the transaction is successful, note the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x5cb5ea9b1631f62148105d67b780b56fce66db398667276ea498104b7896ffee) of a transaction on _Avalanche Fuji_.

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _0.01 ETH_ to proceed. If your
transaction fails, fund your contract with more _ETH_ and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down
12 changes: 5 additions & 7 deletions src/content/ccip/tutorials/usdc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ Deploy the Sender contract on _Avalanche Fuji_:
1. Click the **transact** button. After you confirm the transaction, the contract address appears on the _Deployed Contracts_ list.
Note your contract address.
1. Open MetaMask and fund your contract with USDC tokens. You can transfer <CopyText text="1" code/> _USDC_ to your contract.
1. Fund your contract with LINK tokens. You can transfer <CopyText text="1.5" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.
1. Fund your contract with LINK tokens. You can transfer <CopyText text="70" code/> _LINK_ to your contract. In this example, LINK is used to pay the CCIP fees.

**Note:** This transaction fee is significantly higher than normal due to gas spikes on Sepolia. To run this tutorial, you can get additional testnet LINK
from [faucets.chain.link](https://faucets.chain.link) or use a supported testnet other than Sepolia.

Deploy the Staker and Receiver contracts on _Ethereum Sepolia_. Configure the Receiver contract to receive CCIP messages from the Sender contract:

Expand Down Expand Up @@ -183,12 +186,7 @@ You will transfer _1 USDC_ and arbitrary data, which contains the encoded stake
1. Click on `transact` and confirm the transaction on MetaMask.
1. After the transaction is successful, record the transaction hash. Here is an [example](https://testnet.snowtrace.io/tx/0x5e066ec7e94496e1547c368df4199b9f0c4f8f6c82012b2d974aa258a5c9e9fe) of a transaction on _Avalanche Fuji_.

{" "}

<Aside type="note">
During gas price spikes, your transaction might fail, requiring more than _1.5 LINK_ to proceed. If your
transaction fails, fund your contract with more _LINK_ tokens and try again.
</Aside>
<CcipCommon callout="gasSpike" />

1. Open the [CCIP explorer](https://ccip.chain.link/) and search your cross-chain transaction using the transaction hash.

Expand Down
Loading

0 comments on commit fb1f1fa

Please sign in to comment.