Skip to content

Commit

Permalink
Merge branch 'main' into ccip-refill-rate
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightjl authored Jun 28, 2024
2 parents 7132100 + 8b96b93 commit a4bdb5e
Show file tree
Hide file tree
Showing 17 changed files with 237 additions and 54 deletions.
3 changes: 2 additions & 1 deletion src/components/QuickLinks/data/productChainLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export const productChainLinks: ProductChainLinks = {
learnMorelink: "data-streams",
logo: dataStreamsLogo,
chains: {
arbitrum: "/data-streams/stream-ids?network=arbitrum",
arbitrum: "/data-streams/stream-ids",
avalanche: "/data-streams/stream-ids",
},
},
Functions: {
Expand Down
2 changes: 1 addition & 1 deletion src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
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",
},
],
Expand Down
10 changes: 9 additions & 1 deletion src/content/chainlink-automation/concepts/best-practice.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Aside type="caution" title="Deprecation of older upkeeps">
[Migrate existing upkeeps](/chainlink-automation/guides/migrate-to-v2) before **August 29, 2024**. 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.
</Aside>

### Make registry and registrar addresses configurable

Expand Down
4 changes: 2 additions & 2 deletions src/content/chainlink-automation/guides/forwarder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/content/chainlink-automation/guides/manage-upkeeps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ whatsnext:
---

import { Aside } from "@components"
import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro"

<ChainlinkAutomation callout="deprecation" />

Manage your Upkeeps to get the best performance.

Expand Down
16 changes: 7 additions & 9 deletions src/content/chainlink-automation/guides/migrate-to-v2.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
section: automation
date: Last Modified
title: "Migrate to v2"
title: "Migrate to v2.1"
---

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.

Expand All @@ -29,8 +29,6 @@ The Chainlink Automation App offers a streamlined migration process for upkeeps
<a href="https://automation.chain.link">Open the Chainlink Automation App</a>
</div>

Note: Automation 2.0 runs on registry version 2.1. This discrepancy will be reconciled in a future version.

<ClickToZoom src="/images/automation/v2-migration/landing-page.png" />

1. To start migrating a specific upkeep, select the upkeep. In the **Details** page, expand the **Actions** menu and select **Migrate upkeep**.
Expand Down Expand Up @@ -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:

Expand All @@ -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:

<ClickToZoom src="/images/automation/v2-migration/v2-upkeeps-by-type.png" />

Expand All @@ -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

Expand All @@ -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`
Expand Down
3 changes: 3 additions & 0 deletions src/content/chainlink-automation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ whatsnext:

import { Aside } from "@components"
import { ClickToZoom } from "@components"
import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro"

<Aside type="note" title="Get Started">
Try Chainlink Automation in the [Getting Started](/chainlink-automation/overview/getting-started) guide.
</Aside>

<ChainlinkAutomation callout="deprecation" />

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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Fee<sub>LINK</sub> = [tx.gasPrice<sub>Native WEI</sub> * (gasUsed + gasOverhead) * (1 + premium%)]/[LINK/Native<sub>Rate in WEI</sub>]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

<ChainlinkAutomation callout="deprecation" />

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/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import DataStreams from "@features/data-streams/common/DataStreams.astro"

## Domains

| Description | Testnet URL | Mainnet URL |
| --------------------------------------- | ------------------------------------------ | --------------------------------- |
| REST endpoint to query specific reports | https://api.testnet-dataengine.chain.link/ | https://api.dataengine.chain.link |
| Description | Testnet URL | Mainnet URL |
| --------------------------------------- | ----------------------------------------- | --------------------------------- |
| REST endpoint to query specific reports | https://api.testnet-dataengine.chain.link | https://api.dataengine.chain.link |

## Authentication

Expand Down
4 changes: 4 additions & 0 deletions src/content/data-streams/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import { Aside } from "@components"
integrating Chainlink Data Streams with your applications.
</Aside>

## 2024-06-27 - Avalanche

Chainlink Data Streams is available in Early Access on <a href="/data-streams/stream-ids?network=arbitrum&page=1">Avalanche</a>.

## 2024-01-25 - Arbitrum Sepolia

Chainlink Data Streams is available in Early Access on <a href="/data-streams/stream-ids?network=arbitrum&page=1">Arbitrum Sepolia</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" && <ILogAutomationComponent />}

{section === "streamslookup" && <StreamsLookupInterfaceComponent />}

{callout === "deprecation" && <DeprecationCalloutComponent />}
6 changes: 6 additions & 0 deletions src/features/chainlink-automation/common/deprecation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Aside } from "@components"

<Aside type="caution" title="Deprecation of older upkeeps">
Existing upkeeps on versions earlier than v2.1 will stop being performed on **August 29, 2024**. [Migrate your older
upkeeps to the latest version of Automation](/chainlink-automation/guides/migrate-to-v2).
</Aside>
6 changes: 3 additions & 3 deletions src/features/data/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const CHAINS: Chain[] = [
title: "Avalanche Data Feeds",
img: "/assets/chains/avalanche.svg",
networkStatusUrl: "https://status.avax.network/",
tags: ["default", "proofOfReserve", "rates"],
tags: ["default", "proofOfReserve", "rates", "streams"],
supportedFeatures: ["vrfSubscription", "vrfDirectFunding", "feeds"],
networks: [
{
Expand All @@ -142,15 +142,15 @@ export const CHAINS: Chain[] = [
networkType: "mainnet",
rddUrl: "https://reference-data-directory.vercel.app/feeds-avalanche-mainnet.json",
queryString: "avalanche-mainnet",
tags: ["proofOfReserve"],
tags: ["proofOfReserve", "streams"],
},
{
name: "Avalanche Testnet",
explorerUrl: "https://testnet.snowtrace.io/address/%s",
networkType: "testnet",
rddUrl: "https://reference-data-directory.vercel.app/feeds-avalanche-fuji-testnet.json",
queryString: "avalanche-fuji",
tags: ["proofOfReserve", "rates"],
tags: ["proofOfReserve", "rates", "streams"],
},
],
label: "Avalanche",
Expand Down
76 changes: 75 additions & 1 deletion src/features/feeds/components/FeedList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsxImportSource preact */
import { useEffect, useState, useRef } from "preact/hooks"
import { MainnetTable, TestnetTable } from "./Tables"
import { MainnetTable, TestnetTable, StreamsVerifierProxyTable } from "./Tables"
import feedList from "./FeedList.module.css"
import { clsx } from "~/lib"
import { Chain, CHAINS, ALL_CHAINS, ChainNetwork } from "~/features/data/chains"
Expand Down Expand Up @@ -103,6 +103,80 @@ export const FeedList = ({
const isDeprecating = ecosystem === "deprecating"
let netCount = 0

if (dataFeedType === "streams") {
const mainnetFeeds: ChainNetwork[] = []
const testnetFeeds: ChainNetwork[] = []

chainMetadata.processedData?.networks.forEach((network) => {
if (network.name.includes("Arbitrum")) {
if (network.networkType === "mainnet") {
mainnetFeeds.push(network)
} else if (network.networkType === "testnet") {
testnetFeeds.push(network)
}
}
})

return (
<>
<SectionWrapper title="Verifier Proxy Addresses" depth={2}>
<StreamsVerifierProxyTable />
</SectionWrapper>

<SectionWrapper title="Mainnet Data Streams Feeds" depth={2}>
<div className={feedList.tableFilters}>
<form class={feedList.filterDropdown_search}>
<input
id="search"
class={feedList.filterDropdown_searchInput}
placeholder="Search"
onInput={(event) => {
setSearchValue((event.target as HTMLInputElement).value)
setCurrentPage("1")
}}
/>
</form>
</div>
{mainnetFeeds.length ? (
mainnetFeeds.map((network) => (
<MainnetTable
selectedFeedCategories={
Array.isArray(selectedFeedCategories)
? selectedFeedCategories
: selectedFeedCategories
? [selectedFeedCategories]
: []
}
network={network}
showExtraDetails={showExtraDetails}
dataFeedType={dataFeedType}
ecosystem={ecosystem}
lastAddr={lastAddr}
firstAddr={firstAddr}
addrPerPage={addrPerPage}
currentPage={Number(currentPage)}
paginate={paginate}
searchValue={typeof searchValue === "string" ? searchValue : ""}
/>
))
) : (
<p>No Mainnet feeds available.</p>
)}
</SectionWrapper>

<SectionWrapper title="Testnet Data Streams Feeds" depth={2}>
{testnetFeeds.length ? (
testnetFeeds.map((network) => (
<TestnetTable network={network} showExtraDetails={showExtraDetails} dataFeedType={dataFeedType} />
))
) : (
<p>No Testnet feeds available.</p>
)}
</SectionWrapper>
</>
)
}

return (
<SectionWrapper title="Networks" depth={2} updateTOC={false}>
{!isDeprecating && (
Expand Down
Loading

0 comments on commit a4bdb5e

Please sign in to comment.