From 7bf9dcb97fecfc08d1ff39d6ae261cfa957eed18 Mon Sep 17 00:00:00 2001 From: thedriftofwords Date: Wed, 26 Jun 2024 11:40:39 -0400 Subject: [PATCH 1/2] CLA deprecation banner --- .../concepts/best-practice.mdx | 10 +++++++++- .../chainlink-automation/guides/forwarder.mdx | 4 ++-- .../chainlink-automation/guides/manage-upkeeps.mdx | 3 +++ .../chainlink-automation/guides/migrate-to-v2.mdx | 14 ++++++-------- src/content/chainlink-automation/index.mdx | 3 +++ .../overview/automation-economics.mdx | 2 +- .../overview/supported-networks.mdx | 3 +++ .../common/ChainlinkAutomation.astro | 8 +++++++- .../chainlink-automation/common/deprecation.mdx | 6 ++++++ 9 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 src/features/chainlink-automation/common/deprecation.mdx diff --git a/src/content/chainlink-automation/concepts/best-practice.mdx b/src/content/chainlink-automation/concepts/best-practice.mdx index 4fd0bf2d00e..f8628fad460 100644 --- a/src/content/chainlink-automation/concepts/best-practice.mdx +++ b/src/content/chainlink-automation/concepts/best-practice.mdx @@ -10,11 +10,19 @@ whatsnext: } --- +import { Aside } from "@components" + This guide outlines the best practices when using Chainlink Automation. These best practices are important for using Chainlink Automation securely and reliably when you [create Automation-compatible contracts](/chainlink-automation/guides/compatible-contracts). ### Use the latest version of Chainlink Automation -To get the best reliability and security guarantees for your upkeep, use the latest version of Chainlink Automation and [migrate existing upkeeps](/chainlink-automation/guides/migrate-to-v2). Versions earlier than 2.1 are no longer supported, and existing upkeeps on versions earlier than 2.1 will stop being performed on August 29, 2024. +To get the best reliability and security guarantees for your upkeep, use the latest version of Chainlink Automation. + + ### Make registry and registrar addresses configurable diff --git a/src/content/chainlink-automation/guides/forwarder.mdx b/src/content/chainlink-automation/guides/forwarder.mdx index 0ddfc7f21b7..98d8d39e527 100644 --- a/src/content/chainlink-automation/guides/forwarder.mdx +++ b/src/content/chainlink-automation/guides/forwarder.mdx @@ -16,7 +16,7 @@ This tutorial explains how to use the `Forwarder` to add additional security to ## What is a Forwarder? When is it used? -Starting with Automation 2.0, each registered upkeep under the Chainlink Automation network will have its own unique `Forwarder` contract. The `Forwarder` address will only be known after registration, as we deploy a new forwarder for each upkeep. The `Forwarder` contract is the intermediary between the Automation Registry and your Upkeep contract. The `Forwarder` will always be the `msg.Sender` for your upkeep. +Each registered upkeep under the Chainlink Automation network has its own unique `Forwarder` contract. The `Forwarder` address will only be known after registration, as we deploy a new forwarder for each upkeep. The `Forwarder` contract is the intermediary between the Automation Registry and your Upkeep contract. The `Forwarder` is always the `msg.Sender` for your upkeep. If your `performUpkeep` function is open and callable by anyone without risk of accepting unintentional external data, you don't need to use the `Forwarder`. @@ -27,7 +27,7 @@ If your upkeep's perform function needs to be permissioned, please consider addi To make this work you will need to: - Create `forwarder` as a mutable address variable on your contract that only _you_ can update. `forwarder` is a unique value that cannot change for your upkeep. -- Create `setForwarder` function so you can update the `forwarder` address +- Create `setForwarder` function so you can update the `forwarder` address. - After registration run `setForwarder` with the forwarder address in your UI, or programmatically fetch it using `registry.getForwarder(upkeepID)` using the Registry interface. ## Code example diff --git a/src/content/chainlink-automation/guides/manage-upkeeps.mdx b/src/content/chainlink-automation/guides/manage-upkeeps.mdx index d772d28a932..a46c9e9921b 100644 --- a/src/content/chainlink-automation/guides/manage-upkeeps.mdx +++ b/src/content/chainlink-automation/guides/manage-upkeeps.mdx @@ -11,6 +11,9 @@ whatsnext: --- import { Aside } from "@components" +import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro" + + Manage your Upkeeps to get the best performance. diff --git a/src/content/chainlink-automation/guides/migrate-to-v2.mdx b/src/content/chainlink-automation/guides/migrate-to-v2.mdx index 913b9f919f0..6c15646c64f 100644 --- a/src/content/chainlink-automation/guides/migrate-to-v2.mdx +++ b/src/content/chainlink-automation/guides/migrate-to-v2.mdx @@ -6,9 +6,9 @@ title: "Migrate to v2" import { Aside, ClickToZoom } from "@components" -Chainlink Automation 2.0 is a consensus-driven Automation solution that allows you to cut onchain gas costs by using cryptographically verified offchain compute. Automation 2.0 provides 10M gas worth of offchain compute, which is significantly more than previous versions. Additionally, Automation 2.0 provides increased reliability, performance, log trigger capability, and the ability to use `StreamsLookup` to retrieve Data Streams. +Chainlink Automation 2.1 is a consensus-driven Automation solution that allows you to cut onchain gas costs by using cryptographically verified offchain compute. Automation 2.1 provides 10M gas worth of offchain compute, which is significantly more than previous versions. Additionally, Automation 2.1 provides increased reliability, performance, log trigger capability, and the ability to use `StreamsLookup` to retrieve Data Streams. -You can migrate most upkeeps that use Automation version 1.2 and later in the [Chainlink Automation App](https://automation.chain.link/) or [in the block scanner](#migrating-upkeeps-using-block-scanner). When you migrate upkeeps through the registry, you retain the Upkeep ID. Before you migrate, read the [migration checklist](#migration-checklist) to maximize your benefits from Automation 2.0. +You can migrate most upkeeps that use Automation version 1.2 and later in the [Chainlink Automation App](https://automation.chain.link/) or [in the block scanner](#migrating-upkeeps-using-block-scanner). When you migrate upkeeps through the registry, you retain the Upkeep ID. Before you migrate, read the [migration checklist](#migration-checklist) to maximize your benefits from Automation 2.1. For upkeeps on older registry versions 1.0 (Ethereum Mainnet), and 1.1 (BNB Mainnet and Polygon Mainnet), you must migrate manually by cancelling and re-registering your upkeep in the [Chainlink Automation App](https://automation.chain.link/). After you do this manual migration, future migrations will be easier because your new upkeeps will be eligible for the simpler migration process. @@ -29,8 +29,6 @@ The Chainlink Automation App offers a streamlined migration process for upkeeps Open the Chainlink Automation App - Note: Automation 2.0 runs on registry version 2.1. This discrepancy will be reconciled in a future version. - 1. To start migrating a specific upkeep, select the upkeep. In the **Details** page, expand the **Actions** menu and select **Migrate upkeep**. @@ -95,7 +93,7 @@ For upkeeps on registry versions 1.0 and 1.1, you must migrate upkeeps manually: 1. Return to the main [Chainlink Automation App](https://automation.chain.link/) landing page. Register a new upkeep, providing the **Upkeep address** of your old upkeep. 1. If your upkeep restricts `msg.sender` to the previous registry address, [update your contract](#update-permissions) to use the new forwarder address. -After migration, you have a new upkeep on Automation 2.0 with the same interface as your old upkeep. Future migrations are eligible for the simpler migration process. +After migration, you have a new upkeep on Automation 2.1 with the same interface as your old upkeep. Future migrations are eligible for the simpler migration process. After the migration is complete: @@ -115,7 +113,7 @@ Your new upkeep has a new [unique forwarder](#unique-forwarder) to increase secu ### Forwarders by upkeep type -This diagram shows the flow of different contracts that Automation 2.0 deploys for new and migrated upkeeps. Compared to custom logic and log trigger upkeeps, time-based upkeeps have an additional contract: +This diagram shows the flow of different contracts that Automation 2.1 deploys for new and migrated upkeeps. Compared to custom logic and log trigger upkeeps, time-based upkeeps have an additional contract: @@ -128,7 +126,7 @@ Before you migrate, be aware of several important changes listed here. ### Unique forwarder -Automation 2.0 Upkeeps are called from a unique forwarder per upkeep and not from the registry. If your upkeep restricts `msg.sender` to the previous registry address, you must update it to the newly created [forwarder address](/chainlink-automation/guides/forwarder). The forwarder address becomes available only after the upkeep has been migrated. This forwarder address will remain constant in future migrations. +Automation 2.1 upkeeps are called from a unique forwarder per upkeep and not from the registry. If your upkeep restricts `msg.sender` to the previous registry address, you must update it to the newly created [forwarder address](/chainlink-automation/guides/forwarder). The forwarder address becomes available only after the upkeep has been migrated. This forwarder address will remain constant in future migrations. ### Update programmatic upkeeps @@ -139,7 +137,7 @@ Note that migration moves upkeeps from one registry to another. If you interact #### Get the latest ABI -The latest ABI for Automation 2.0 is in the [@chainlink npm package](https://www.npmjs.com/package/@chainlink/contracts?activeTab=code): +The latest ABI for Automation 2.1 is in the [@chainlink npm package](https://www.npmjs.com/package/@chainlink/contracts?activeTab=code): - Registry ABI: `@chainlink/contracts/abi/v0.8/IKeeperRegistryMaster.json` - Registrar ABI: `@chainlink/contracts/abi/v0.8/AutomationRegistrar2_1.json` diff --git a/src/content/chainlink-automation/index.mdx b/src/content/chainlink-automation/index.mdx index c41312f0a76..33776f986ce 100644 --- a/src/content/chainlink-automation/index.mdx +++ b/src/content/chainlink-automation/index.mdx @@ -15,11 +15,14 @@ whatsnext: import { Aside } from "@components" import { ClickToZoom } from "@components" +import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro" + + Automate your smart contracts using a secure and hyper-reliable decentralized network that uses the same external network of node operators that secures billions in value. Building on Chainlink Automation will accelerate your innovation, save you time and money, and help you get to market faster so you don't have to deal with the setup cost, ongoing maintenance, and risks associated with a centralized automation stack. To learn more about how the Chainlink Automation Network automates your smart contracts, visit the [Concepts](/chainlink-automation/concepts/automation-concepts) and [Architecture](/chainlink-automation/concepts/automation-architecture) pages. You can also learn more through our [additional Automation resources](https://chain.link/automation#masterclass). diff --git a/src/content/chainlink-automation/overview/automation-economics.mdx b/src/content/chainlink-automation/overview/automation-economics.mdx index 338f9ee2406..af259b6891e 100644 --- a/src/content/chainlink-automation/overview/automation-economics.mdx +++ b/src/content/chainlink-automation/overview/automation-economics.mdx @@ -11,7 +11,7 @@ whatsnext: { "Automation Architecture": "/chainlink-automation/concepts/automati Chainlink Automation only requires an execution fee for transactions onchain. This fee includes the transaction cost, a node operator percentage fee (refer to the formula below), and a small fixed gas overhead accounting for gas between the network and the registry. The percentage fee compensates the Automation Network for monitoring and performing your upkeep. The Automation percentage fee varies by chain and is listed on our [Supported Networks](/chainlink-automation/overview/supported-networks) page. -**Formula for Registry v1.2** +**Formula for Registry v2.1** FeeLINK = [tx.gasPriceNative WEI * (gasUsed + gasOverhead) * (1 + premium%)]/[LINK/NativeRate in WEI] diff --git a/src/content/chainlink-automation/overview/supported-networks.mdx b/src/content/chainlink-automation/overview/supported-networks.mdx index 15ef6671a54..ec943a79341 100644 --- a/src/content/chainlink-automation/overview/supported-networks.mdx +++ b/src/content/chainlink-automation/overview/supported-networks.mdx @@ -16,6 +16,9 @@ whatsnext: import { AutomationConfigList } from "@features/chainlink-automation" import ResourcesCallout from "@features/resources/callouts/ResourcesCallout.astro" import CcipCommon from "@features/ccip/CcipCommon.astro" +import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro" + + To use Chainlink Automation on certain networks, you may need to conduct token transfers. You can transfer tokens by using [Chainlink CCIP](/ccip/tutorials/cross-chain-tokens) or third-party applications such as [XSwap](https://xswap.link/). diff --git a/src/features/chainlink-automation/common/ChainlinkAutomation.astro b/src/features/chainlink-automation/common/ChainlinkAutomation.astro index dc35539f352..3f33e4f3546 100644 --- a/src/features/chainlink-automation/common/ChainlinkAutomation.astro +++ b/src/features/chainlink-automation/common/ChainlinkAutomation.astro @@ -5,12 +5,18 @@ const StreamsLookupInterfaceComponent = StreamsLookupInterface[0].Content const iLogAutomation = await Astro.glob("./iLogAutomation.mdx") const ILogAutomationComponent = iLogAutomation[0].Content +const deprecationCallout = await Astro.glob("./deprecation.mdx") +const DeprecationCalloutComponent = deprecationCallout[0].Content + export type Props = { section?: "ilogautomation" | "streamslookup" + callout?: "deprecation" } -const { section } = Astro.props as Props +const { section, callout } = Astro.props as Props --- {section === "ilogautomation" && } {section === "streamslookup" && } + +{callout === "deprecation" && } diff --git a/src/features/chainlink-automation/common/deprecation.mdx b/src/features/chainlink-automation/common/deprecation.mdx new file mode 100644 index 00000000000..74d55defe2d --- /dev/null +++ b/src/features/chainlink-automation/common/deprecation.mdx @@ -0,0 +1,6 @@ +import { Aside } from "@components" + + From 11960ad9cebdb1506781c1f823c9500a2bd0aabd Mon Sep 17 00:00:00 2001 From: thedriftofwords Date: Wed, 26 Jun 2024 11:45:15 -0400 Subject: [PATCH 2/2] Edit 2.1 into migration page title --- src/config/sidebar.ts | 2 +- src/content/chainlink-automation/guides/migrate-to-v2.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts index 5f6c6320159..2aa30c59628 100644 --- a/src/config/sidebar.ts +++ b/src/config/sidebar.ts @@ -405,7 +405,7 @@ export const SIDEBAR: Partial> = { url: "chainlink-automation/overview/automation-release-notes", }, { - title: "Migrate to Automation V2", + title: "Migrate to Automation v2.1", url: "chainlink-automation/guides/migrate-to-v2", }, ], diff --git a/src/content/chainlink-automation/guides/migrate-to-v2.mdx b/src/content/chainlink-automation/guides/migrate-to-v2.mdx index 6c15646c64f..2bc3867429c 100644 --- a/src/content/chainlink-automation/guides/migrate-to-v2.mdx +++ b/src/content/chainlink-automation/guides/migrate-to-v2.mdx @@ -1,7 +1,7 @@ --- section: automation date: Last Modified -title: "Migrate to v2" +title: "Migrate to v2.1" --- import { Aside, ClickToZoom } from "@components"