diff --git a/src/components/Tabs/Tabs.module.css b/src/components/Tabs/Tabs.module.css index 899e2833682..60e6cd48cef 100644 --- a/src/components/Tabs/Tabs.module.css +++ b/src/components/Tabs/Tabs.module.css @@ -18,6 +18,7 @@ font-weight: var(--font-weight-medium); text-align: center; padding: var(--space-2x) var(--space-3x); + margin-bottom: var(--space-3x); outline-offset: 2px; } diff --git a/src/content/any-api/api-reference.mdx b/src/content/any-api/api-reference.mdx index eec97d4f5fc..6e10aea9e7a 100644 --- a/src/content/any-api/api-reference.mdx +++ b/src/content/any-api/api-reference.mdx @@ -10,8 +10,8 @@ import AnyApiCallout from "@features/any-api/common/AnyApiCallout.astro" @@ -19,23 +19,23 @@ can communicate with `Operator` [contracts](https://github.com/smartcontractkit/ ### Methods -| Name | Description | -| :------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [setChainlinkOracle](#setchainlinkoracle) | Sets the stored address for the oracle contract | -| [setChainlinkToken](#setchainlinktoken) | Sets the stored address for the LINK token | -| [buildChainlinkRequest](#buildchainlinkrequest) | Instantiates a Request object with the required parameters | -| [buildOperatorRequest](#buildoperatorrequest) | Instantiates a Request object with the required parameters. **Note** the oracle must be an `Operator` [contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol) | -| [sendChainlinkRequest](#sendchainlinkrequest) | Sends the request payload to the stored address stored as chainlinkOracleAddress | -| [sendChainlinkRequestTo](#sendchainlinkrequestto) | Sends a request to the oracle address specified | -| [sendOperatorRequest](#sendoperatorrequest) | Sends the request payload to the stored address stored as chainlinkOracleAddress. **Note** the oracle must be an `Operator` [contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol) | -| [sendOperatorRequestTo](#sendoperatorrequestto) | Sends a request to the oracle address specified. **Note** the oracle must be an `Operator` [contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol) | -| [validateChainlinkCallback](#validatechainlinkcallback) | Secures the fulfillment callback to make sure it is only called by permissioned senders | -| [addChainlinkExternalRequest](#addchainlinkexternalrequest) | Allows a Chainlinked contract to track unfulfilled requests that it hasn't created itself | -| [cancelChainlinkRequest](#cancelchainlinkrequest) | Cancels Chainlink requests attempting to contact an unresponsive node | -| [useChainlinkWithENS](#usechainlinkwithens) | Looks up the addresses of the LINK token and Oracle contract through ENS | -| [updateChainlinkOracleWithENS](#updatechainlinkoraclewithens) | Updates the stored oracle address with the latest address resolved through ENS | -| [chainlinkTokenAddress](#chainlinktokenaddress) | Returns the stored address of the LINK token | -| [chainlinkOracleAddress](#chainlinkoracleaddress) | Returns the stored address of the oracle contract | +| Name | Description | +| :------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [setChainlinkOracle](#setchainlinkoracle) | Sets the stored address for the oracle contract | +| [setChainlinkToken](#setchainlinktoken) | Sets the stored address for the LINK token | +| [buildChainlinkRequest](#buildchainlinkrequest) | Instantiates a Request object with the required parameters | +| [buildOperatorRequest](#buildoperatorrequest) | Instantiates a Request object with the required parameters. **Note** the oracle must be an `Operator` [contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol) | +| [sendChainlinkRequest](#sendchainlinkrequest) | Sends the request payload to the stored address stored as chainlinkOracleAddress | +| [sendChainlinkRequestTo](#sendchainlinkrequestto) | Sends a request to the oracle address specified | +| [sendOperatorRequest](#sendoperatorrequest) | Sends the request payload to the stored address stored as chainlinkOracleAddress. **Note** the oracle must be an `Operator` [contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol) | +| [sendOperatorRequestTo](#sendoperatorrequestto) | Sends a request to the oracle address specified. **Note** the oracle must be an `Operator` [contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol) | +| [validateChainlinkCallback](#validatechainlinkcallback) | Secures the fulfillment callback to make sure it is only called by permissioned senders | +| [addChainlinkExternalRequest](#addchainlinkexternalrequest) | Allows a Chainlinked contract to track unfulfilled requests that it hasn't created itself | +| [cancelChainlinkRequest](#cancelchainlinkrequest) | Cancels Chainlink requests attempting to contact an unresponsive node | +| [useChainlinkWithENS](#usechainlinkwithens) | Looks up the addresses of the LINK token and Oracle contract through ENS | +| [updateChainlinkOracleWithENS](#updatechainlinkoraclewithens) | Updates the stored oracle address with the latest address resolved through ENS | +| [chainlinkTokenAddress](#chainlinktokenaddress) | Returns the stored address of the LINK token | +| [chainlinkOracleAddress](#chainlinkoracleaddress) | Returns the stored address of the oracle contract | ### Events @@ -113,7 +113,7 @@ constructor(address _link) ### buildChainlinkRequest Use `buildOperatorRequest` [function](#buildoperatorrequest) if the oracle is an `Operator` -[contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +[contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol). {/* prettier-ignore */} ```solidity @@ -150,7 +150,7 @@ is that `buildOperatorRequest` does not allow setting up the address of the call is set to the address of the calling contract. It is recommended to use `buildOperatorRequest` but make sure the oracle you are contacting is an `Operator` -[contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +[contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol). {/* prettier-ignore */} ```solidity @@ -180,7 +180,7 @@ function requestPrice() ### sendChainlinkRequest Use `sendOperatorRequest` [function](#sendoperatorrequest) if the oracle is an `Operator` -[contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +[contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol). {/* prettier-ignore */} ```solidity @@ -212,7 +212,7 @@ function requestPrice() ### sendChainlinkRequestTo Use `sendOperatorRequestTo` [function](#sendoperatorrequestto) if the oracle is an `Operator` -[contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +[contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol). {/* prettier-ignore */} ```solidity @@ -244,7 +244,7 @@ function requestPriceFrom(address _oracle) This function is similar to `sendChainlinkRequest`[function](#sendchainlinkrequest). It is recommended to use `sendOperatorRequest` but make sure the oracle you are contacting is an `Operator` -[contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +[contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol). {/* prettier-ignore */} ```solidity @@ -277,7 +277,7 @@ function requestPrice() This function is similar to `sendChainlinkRequestTo`[function](#sendchainlinkrequestto). It is recommended to use `sendOperatorRequestTo`, but make sure the oracle you are contacting is an `Operator` -[contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +[contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol). {/* prettier-ignore */} ```solidity @@ -420,7 +420,7 @@ constructor(){ @@ -444,7 +444,7 @@ function updateOracleAddressToLatest() public { diff --git a/src/content/any-api/get-request/examples/array-response.mdx b/src/content/any-api/get-request/examples/array-response.mdx index dd8573ede29..08ba7f9e282 100644 --- a/src/content/any-api/get-request/examples/array-response.mdx +++ b/src/content/any-api/get-request/examples/array-response.mdx @@ -60,7 +60,7 @@ The response should be similar to the following: ] ``` -Fetch the _id_ of the first element. To consume an API, your contract must import [ChainlinkClient.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct named `Chainlink.Request`, which your contract can use to build the API request. The request must include the following parameters: +Fetch the _id_ of the first element. To consume an API, your contract must import [ChainlinkClient.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct named `Chainlink.Request`, which your contract can use to build the API request. The request must include the following parameters: - Link token address - Oracle address diff --git a/src/content/any-api/get-request/examples/existing-job-request.mdx b/src/content/any-api/get-request/examples/existing-job-request.mdx index cdf5d3fcb4f..3afea4e6e65 100644 --- a/src/content/any-api/get-request/examples/existing-job-request.mdx +++ b/src/content/any-api/get-request/examples/existing-job-request.mdx @@ -59,7 +59,7 @@ The response should be similar to the following: ``` For this example, we created a job that leverages the [EtherScan External Adapter](https://github.com/smartcontractkit/external-adapters-js/tree/develop/packages/sources/etherscan) to fetch the _SafeGasPrice_ , _ProposeGasPrice_ and _FastGasPrice_. You can learn more about External Adapters [here](/chainlink-nodes/external-adapters/external-adapters). -To consume an API, your contract must import [ChainlinkClient.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct named `Chainlink.Request`, which your contract can use to build the API request. The request must include the following parameters: +To consume an API, your contract must import [ChainlinkClient.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct named `Chainlink.Request`, which your contract can use to build the API request. The request must include the following parameters: - Link token address - Oracle address diff --git a/src/content/any-api/get-request/examples/large-responses.mdx b/src/content/any-api/get-request/examples/large-responses.mdx index 38bba1db0ef..192c41fd256 100644 --- a/src/content/any-api/get-request/examples/large-responses.mdx +++ b/src/content/any-api/get-request/examples/large-responses.mdx @@ -46,7 +46,7 @@ The response should be similar to the following: } ``` -Fetch the value of _image_. To consume an API, your contract must import [ChainlinkClient.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct named `Chainlink.Request`, which your contract can use to build the API request. The request must include the following parameters: +Fetch the value of _image_. To consume an API, your contract must import [ChainlinkClient.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct named `Chainlink.Request`, which your contract can use to build the API request. The request must include the following parameters: - Link token address - Oracle address diff --git a/src/content/any-api/get-request/examples/multi-variable-responses.mdx b/src/content/any-api/get-request/examples/multi-variable-responses.mdx index 1ca7a55e52c..6b803ab271e 100644 --- a/src/content/any-api/get-request/examples/multi-variable-responses.mdx +++ b/src/content/any-api/get-request/examples/multi-variable-responses.mdx @@ -50,7 +50,7 @@ The response should be similar to the following: ``` The request above shows how to get the price of _ETH_ against _BTC_. Now let say we want the price of _ETH_ against several currencies: _BTC_, _USD_, and _EUR_. Our contract will have to support receiving multiple responses. -To consume an API with multiple responses, your contract should inherit from [ChainlinkClient](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct called `Chainlink.Request`, which your contract should use to build the API request. The request should include the following parameters: +To consume an API with multiple responses, your contract should inherit from [ChainlinkClient](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct called `Chainlink.Request`, which your contract should use to build the API request. The request should include the following parameters: - Link token address - Oracle address diff --git a/src/content/any-api/get-request/examples/single-word-response.mdx b/src/content/any-api/get-request/examples/single-word-response.mdx index 64affe26e4a..58d1fc9b2d9 100644 --- a/src/content/any-api/get-request/examples/single-word-response.mdx +++ b/src/content/any-api/get-request/examples/single-word-response.mdx @@ -71,7 +71,7 @@ The response should be similar to the following example: } ``` -To consume an API with multiple responses, your contract must import [ChainlinkClient](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct called `Chainlink.Request`, which your contract should use to build the API request. The request should include the following parameters: +To consume an API with multiple responses, your contract must import [ChainlinkClient](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/ChainlinkClient.sol). This contract exposes a struct called `Chainlink.Request`, which your contract should use to build the API request. The request should include the following parameters: - Link token address - Oracle address diff --git a/src/content/any-api/testnet-oracles.mdx b/src/content/any-api/testnet-oracles.mdx index 9e758a16a41..c2b9e62ed68 100644 --- a/src/content/any-api/testnet-oracles.mdx +++ b/src/content/any-api/testnet-oracles.mdx @@ -21,7 +21,7 @@ To retrieve the LINK token address or get faucet details for your testnet of cho ## Operator Contracts -Testnet [Operator contracts](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol) are deployed and maintained on the following networks: +Testnet [Operator contracts](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol) are deployed and maintained on the following networks: | Testnet | Oracle Address | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/content/architecture-overview/architecture-decentralized-model.mdx b/src/content/architecture-overview/architecture-decentralized-model.mdx index 21cabcfb643..8b74e69e3a4 100644 --- a/src/content/architecture-overview/architecture-decentralized-model.mdx +++ b/src/content/architecture-overview/architecture-decentralized-model.mdx @@ -47,7 +47,7 @@ To learn how to create a consumer contract that uses an existing data feed, read ### Consumer -A Consumer contract is any contract that uses Chainlink Data Feeds to consume aggregated data. Consumer contracts must reference the correct [`AggregatorV3Interface`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol) contract and call one of the exposed functions. +A Consumer contract is any contract that uses Chainlink Data Feeds to consume aggregated data. Consumer contracts must reference the correct [`AggregatorV3Interface`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol) contract and call one of the exposed functions. {/* prettier-ignore */} ```solidity @@ -62,13 +62,13 @@ Offchain applications can also consume data feeds. See the Javascript and Python Proxy contracts are onchain proxies that point to the aggregator for a particular data feed. Using proxies enables the underlying aggregator to be upgraded without any service interruption to consuming contracts. -Proxy contracts can vary from one data feed to another, but the [`AggregatorProxy.sol` contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.7/dev/AggregatorProxy.sol) on Github is a common example. +Proxy contracts can vary from one data feed to another, but the [`EACAggregatorProxy.sol` contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.0.0/contracts/src/v0.6/EACAggregatorProxy.sol) on Github is a common example. ### Aggregator An aggregator is the contract that receives periodic data updates from the oracle network. Aggregators store aggregated data onchain so that consumers can retrieve it and act upon it within the same transaction. -You can access this data using the Data Feed address and the [`AggregatorV3Interface` contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol). +You can access this data using the Data Feed address and the [`AggregatorV3Interface` contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol). Aggregators receive updates from the oracle network only when the **Deviation Threshold** or **Heartbeat Threshold** triggers an update during an aggregation round. The first condition that is met triggers an update to the data. diff --git a/src/content/architecture-overview/architecture-request-model.mdx b/src/content/architecture-overview/architecture-request-model.mdx index 8e6157614e8..56cefade3b8 100644 --- a/src/content/architecture-overview/architecture-request-model.mdx +++ b/src/content/architecture-overview/architecture-request-model.mdx @@ -22,7 +22,7 @@ All source code is open source and available in the [Chainlink Github repository ### ChainlinkClient -[`ChainlinkClient`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/ChainlinkClient.sol) is a parent contract that enables smart contracts to consume data from oracles. It's available in the Chainlink smart contract library which can be [installed using the latest package managers](/resources/create-a-chainlinked-project). +[`ChainlinkClient`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/ChainlinkClient.sol) is a parent contract that enables smart contracts to consume data from oracles. It's available in the Chainlink smart contract library which can be [installed using the latest package managers](/resources/create-a-chainlinked-project). The client constructs and makes a request to a known Chainlink oracle through the `transferAndCall` function, implemented by the LINK token. This request contains encoded information that is required for the cycle to succeed. In the `ChainlinkClient` contract, this call is initiated with a call to `sendChainlinkRequestTo`. @@ -36,7 +36,7 @@ Learn more about [ERC-677 and the LINK token](/resources/link-token-contracts). ### Operator Contract -[`Operator` contracts](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol) are owned by oracle node operators, which run alongside offchain oracle nodes. +[`Operator` contracts](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol) are owned by oracle node operators, which run alongside offchain oracle nodes. #### Request @@ -48,7 +48,7 @@ The client contract that initiates this cycle must create a request with the fol To learn about how to find oracles to suit your needs, see [Find Existing Jobs](/any-api/find-oracle). -Operator contracts are responsible for handling onchain requests made through the LINK token, by implementing `onTokenTransfer` as a `LinkTokenReceiver`. Upon execution of this function, the operator contract **emits an `OracleRequest` event** containing information about the request. This event is crucial, as it is monitored by the offchain oracle node which acts upon it. +Operator contracts are responsible for handling onchain requests made through the LINK token, by implementing `onTokenTransfer` as a `LinkTokenReceiver`. Upon execution of this function, the operator contract **emits an `OracleRequest` event** containing information about the request. This event is crucial, as it is monitored by the offchain oracle node which acts upon it. #### Fulfillment diff --git a/src/content/chainlink-automation/guides/log-trigger.mdx b/src/content/chainlink-automation/guides/log-trigger.mdx index 7b054894781..1348fd6e12a 100644 --- a/src/content/chainlink-automation/guides/log-trigger.mdx +++ b/src/content/chainlink-automation/guides/log-trigger.mdx @@ -78,7 +78,7 @@ Select **Log Trigger**. Your upkeeps will be protected against logs that are emitted during a reorg. -1. **Provide the address of your [Automation-compatible contract](/chainlink-automation/guides/compatible-contracts)** that you want to automate. In this case, we will paste the address of `CountWithLog.sol`. This contract must follow the format of the [ILogAutomation interface](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/interfaces/ILogAutomation.sol) to ensure Automation nodes can interact with your contract as expected. +1. **Provide the address of your [Automation-compatible contract](/chainlink-automation/guides/compatible-contracts)** that you want to automate. In this case, we will paste the address of `CountWithLog.sol`. This contract must follow the format of the [ILogAutomation interface](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/interfaces/ILogAutomation.sol) to ensure Automation nodes can interact with your contract as expected. diff --git a/src/content/chainlink-automation/reference/automation-contracts.mdx b/src/content/chainlink-automation/reference/automation-contracts.mdx index d2d026e77c8..4ff83c52360 100644 --- a/src/content/chainlink-automation/reference/automation-contracts.mdx +++ b/src/content/chainlink-automation/reference/automation-contracts.mdx @@ -9,25 +9,25 @@ whatsnext: { "Automation Architecture": "/chainlink-automation/concepts/automati Automation Nodes use the following contracts. You can find them in the [Chainlink repository](https://github.com/smartcontractkit/chainlink/tree/develop/contracts/src/v0.8/automation). For details about how to use them, visit the [Creating Compatible Contracts](/chainlink-automation/guides/compatible-contracts) guide. To understand the logic behind these contracts, visit the [Architecture](/chainlink-automation/concepts/automation-architecture) page. -- [`AutomationCompatible.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/AutomationCompatible.sol): Imports the following contracts: - - [`AutomationBase.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/AutomationBase.sol): Enables the use of the `cannotExecute` modifier. Import this contract if you need for this modifier. See the [`checkUpkeep` function](/chainlink-automation/reference/automation-interfaces#checkupkeep-function) for details. - - [`AutomationCompatibleInterface.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/interfaces/AutomationCompatibleInterface.sol): The interface to be implemented in order to make your contract compatible. Import this contract for type safety. +- [`AutomationCompatible.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/AutomationCompatible.sol): Imports the following contracts: + - [`AutomationBase.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/AutomationBase.sol): Enables the use of the `cannotExecute` modifier. Import this contract if you need for this modifier. See the [`checkUpkeep` function](/chainlink-automation/reference/automation-interfaces#checkupkeep-function) for details. + - [`AutomationCompatibleInterface.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/interfaces/AutomationCompatibleInterface.sol): The interface to be implemented in order to make your contract compatible. Import this contract for type safety. ## AutomationRegistry.sol -[`AutomationRegistry2_1.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/v2_1/KeeperRegistry2_1.sol): The registry contract that tracks all registered Upkeeps and the Automation Nodes that can perform them. _Note_: As Chainlink Automation continues adding new functionalities, a new **Automation Registry** is deployed and the contract address may change. +[`AutomationRegistry2_1.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/v2_1/KeeperRegistry2_1.sol): The registry contract that tracks all registered Upkeeps and the Automation Nodes that can perform them. _Note_: As Chainlink Automation continues adding new functionalities, a new **Automation Registry** is deployed and the contract address may change. ## AutomationRegistrar.sol -[`AutomationRegistrar2_1.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/v2_1/AutomationRegistrar2_1.sol): The Registrar contract governs the registration of new Upkeeps on the associated `AutomationRegistry` contract. Users who want to register Upkeeps by directly calling the deployed contract have to call the Transfer-and-Call function on the respective ERC-677 LINK contract configured on the Registrar and ensure they pass the correct encoded function call and inputs. +[`AutomationRegistrar2_1.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/v2_1/AutomationRegistrar2_1.sol): The Registrar contract governs the registration of new Upkeeps on the associated `AutomationRegistry` contract. Users who want to register Upkeeps by directly calling the deployed contract have to call the Transfer-and-Call function on the respective ERC-677 LINK contract configured on the Registrar and ensure they pass the correct encoded function call and inputs. ## UpkeepTranscoder.sol -[`UpkeepTranscode4_0.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/v2_1/UpkeepTranscoder4_0.sol) allows the conversion of upkeep data from previous Automation registry versions 1.2, 1.3, and 2.0 to registry 2.1. +[`UpkeepTranscode4_0.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/v2_1/UpkeepTranscoder4_0.sol) allows the conversion of upkeep data from previous Automation registry versions 1.2, 1.3, and 2.0 to registry 2.1. ## AutomationForwarder.sol -[`AutomationForwarder.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/v2_1/AutomationForwarder.sol) is a relayer that sits between the registry and the customer's target contract. The purpose of the forwarder is to give customers a consistent address to authorize against that stays consistent between migrations. The Forwarder also exposes the registry address, so that users who want to programatically interact with the registry can do so. The `forward` function in this contract is called by the registry and forwards the call to the target. +[`AutomationForwarder.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/AutomationForwarder.sol) is a relayer that sits between the registry and the customer's target contract. The purpose of the forwarder is to give customers a consistent address to authorize against that stays consistent between migrations. The Forwarder also exposes the registry address, so that users who want to programmatically interact with the registry can do so. The `forward` function in this contract is called by the registry and forwards the call to the target. ## CronUpkeepFactory.sol diff --git a/src/content/chainlink-automation/reference/automation-interfaces.mdx b/src/content/chainlink-automation/reference/automation-interfaces.mdx index 79c0ed65a65..0d2657dcea0 100644 --- a/src/content/chainlink-automation/reference/automation-interfaces.mdx +++ b/src/content/chainlink-automation/reference/automation-interfaces.mdx @@ -26,7 +26,7 @@ Your Automation-compatible contracts may use the following interfaces. You can f ## AutomationCompatibleInterface -Custom logic upkeeps need to use the [`AutomationCompatibleInterface.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/interfaces/AutomationCompatibleInterface.sol) interface. Click on one of the functions below to understand its parameters and limits. +Custom logic upkeeps need to use the [`AutomationCompatibleInterface.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/interfaces/AutomationCompatibleInterface.sol) interface. Click on one of the functions below to understand its parameters and limits. | Function Name | Description | | --------------- | ------------------------------------------------------------------------------------ | @@ -35,7 +35,7 @@ Custom logic upkeeps need to use the [`AutomationCompatibleInterface.sol`](https ### checkUpkeep function -This view function contains the logic that runs offchain during every block as an [`eth_call`](https://eth.wiki/json-rpc/API#eth_call) to determine if `performUpkeep` should be executed onchain. To reduce onchain gas usage, attempt to do your gas intensive calculations offchain in `checkUpkeep` and pass the result to `performUpkeep` onchain. It is a best practice to import the [`AutomationCompatible.sol`](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/automation/AutomationCompatible.sol) contract and use the `cannotExecute` modifier to ensure that the method can be used only for simulation purposes. +This view function contains the logic that runs offchain during every block as an [`eth_call`](https://eth.wiki/json-rpc/API#eth_call) to determine if `performUpkeep` should be executed onchain. To reduce onchain gas usage, attempt to do your gas intensive calculations offchain in `checkUpkeep` and pass the result to `performUpkeep` onchain. It is a best practice to import the [`AutomationCompatible.sol`](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/automation/AutomationCompatible.sol) contract and use the `cannotExecute` modifier to ensure that the method can be used only for simulation purposes. ```solidity function checkUpkeep( diff --git a/src/content/chainlink-functions/api-reference/functions-client.mdx b/src/content/chainlink-functions/api-reference/functions-client.mdx index 42f7d451016..48b68cac957 100644 --- a/src/content/chainlink-functions/api-reference/functions-client.mdx +++ b/src/content/chainlink-functions/api-reference/functions-client.mdx @@ -17,7 +17,7 @@ Functions contracts are available starting from version _0.7.1_. -Consumer contract developers inherit [FunctionsClient](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol) to create Chainlink Functions requests. +Consumer contract developers inherit [FunctionsClient](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol) to create Chainlink Functions requests. ## Events diff --git a/src/content/chainlink-functions/api-reference/functions-request.mdx b/src/content/chainlink-functions/api-reference/functions-request.mdx index 5c960bc01fe..c5adc8b513f 100644 --- a/src/content/chainlink-functions/api-reference/functions-request.mdx +++ b/src/content/chainlink-functions/api-reference/functions-request.mdx @@ -17,7 +17,7 @@ Functions contracts are available starting from version _0.7.1_. -Consumer contract developers use the [FunctionsRequest library](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol) to build their [requests](#request). +Consumer contract developers use the [FunctionsRequest library](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol) to build their [requests](#request). ## Types and Constants diff --git a/src/content/chainlink-functions/getting-started.mdx b/src/content/chainlink-functions/getting-started.mdx index 7a33adae5aa..bd58f3fd431 100644 --- a/src/content/chainlink-functions/getting-started.mdx +++ b/src/content/chainlink-functions/getting-started.mdx @@ -228,7 +228,7 @@ Chainlink Functions is capable of much more than just retrieving data. Try one o -- To write a Chainlink Functions consumer contract, your contract must import [FunctionsClient.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol) and [FunctionsRequest.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol). You can read the API references: [FunctionsClient](/chainlink-functions/api-reference/functions-client) and [FunctionsRequest](/chainlink-functions/api-reference/functions-request). +- To write a Chainlink Functions consumer contract, your contract must import [FunctionsClient.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.sol) and [FunctionsRequest.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.sol). You can read the API references: [FunctionsClient](/chainlink-functions/api-reference/functions-client) and [FunctionsRequest](/chainlink-functions/api-reference/functions-request). These contracts are available in an NPM package so that you can import them from within your project. diff --git a/src/content/chainlink-functions/resources/architecture.mdx b/src/content/chainlink-functions/resources/architecture.mdx index 3819a1bbd4c..d4f0057545d 100644 --- a/src/content/chainlink-functions/resources/architecture.mdx +++ b/src/content/chainlink-functions/resources/architecture.mdx @@ -14,7 +14,7 @@ import { Aside, ClickToZoom } from "@components" ## Request and Receive Data -This model is similar to the [Basic Request Model](/architecture-overview/architecture-request-model): The consumer contract initiates the cycle by sending a request to the [FunctionsRouter contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/FunctionsRouter.sol). Oracle nodes watch for events emitted by the [FunctionsCoordinator contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_1_0/FunctionsCoordinator.sol) and run the computation offchain. Finally, oracle nodes use the [Chainlink OCR](/architecture-overview/off-chain-reporting) protocol to aggregate all the returned before passing the single aggregated response back to the consumer contract via a callback function. +This model is similar to the [Basic Request Model](/architecture-overview/architecture-request-model): The consumer contract initiates the cycle by sending a request to the [FunctionsRouter contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/FunctionsRouter.sol). Oracle nodes watch for events emitted by the [FunctionsCoordinator contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_1_0/FunctionsCoordinator.sol) and run the computation offchain. Finally, oracle nodes use the [Chainlink OCR](/architecture-overview/off-chain-reporting) protocol to aggregate all the returned before passing the single aggregated response back to the consumer contract via a callback function. -The acceptance process is initiated via the Chainlink Functions Subscription Manager. After a user accepts the ToS by generating the required signature with their externally owned account (EOA), they transmit proof of acceptance to the [TermsOfServiceAllowList contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/accessControl/TermsOfServiceAllowList.sol). Upon successful validation of the proof, the EOA is added to the `allowedSenders` registry, permitting it to manage subscriptions. +The acceptance process is initiated via the Chainlink Functions Subscription Manager. After a user accepts the ToS by generating the required signature with their externally owned account (EOA), they transmit proof of acceptance to the [TermsOfServiceAllowList contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/accessControl/TermsOfServiceAllowList.sol). Upon successful validation of the proof, the EOA is added to the `allowedSenders` registry, permitting it to manage subscriptions. ### Create subscription -After the ToS is accepted, EOAs can create subscriptions. Upon creation, the [FunctionsRouter](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/FunctionsRouter.sol) assigns a unique identifier, _Subscription ID_. +After the ToS is accepted, EOAs can create subscriptions. Upon creation, the [FunctionsRouter](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/FunctionsRouter.sol) assigns a unique identifier, _Subscription ID_. **Note**: EOAs can directly interact with the FunctionsRouter contract using their preferred web3 library, such as web3.js or ethers.js. @@ -136,7 +136,7 @@ To cancel a subscription: Transferring ownership is currently only supported using the [Functions Hardhat Starter kit](https://github.com/smartcontractkit/functions-hardhat-starter-kit) or the [Functions Toolkit NPM package](https://github.com/smartcontractkit/functions-toolkit): 1. Use the `functions-sub-transfer` command to initiate the transfer of ownership by specifying the new owner's address. -1. As a prerequisite, the prospective owner must be part of the `allowedSenders` registry within the [TermsOfServiceAllowList contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/functions/v1_0_0/accessControl/TermsOfServiceAllowList.sol). This verifies their acceptance of the Chainlink Functions' Terms of Service (ToS). +1. As a prerequisite, the prospective owner must be part of the `allowedSenders` registry within the [TermsOfServiceAllowList contract](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/functions/v1_0_0/accessControl/TermsOfServiceAllowList.sol). This verifies their acceptance of the Chainlink Functions' Terms of Service (ToS). 1. The prospective owner should use the [Functions Hardhat Starter kit](https://github.com/smartcontractkit/functions-hardhat-starter-kit) and run the `functions-sub-accept` command to confirm the ownership transfer. **Note**: This guide will be updated as soon as the Chainlink Functions Subscription Manager supports ownership transfers. diff --git a/src/content/chainlink-nodes/contracts/forwarder.mdx b/src/content/chainlink-nodes/contracts/forwarder.mdx index e6479e7b8bb..85d1955b3d3 100644 --- a/src/content/chainlink-nodes/contracts/forwarder.mdx +++ b/src/content/chainlink-nodes/contracts/forwarder.mdx @@ -14,7 +14,7 @@ In the EVM world, [externally-owned account](https://ethereum.org/en/developers/ To solve these challenges, we introduced two major features that will allow node operators to set up different transaction-sending strategies more securely while lowering their infrastructure costs: - Chainlink nodes support multiple EOAs. -- [Forwarder](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/AuthorizedForwarder.sol) contracts allow a node operator to manage multiple EOAs and make them look like a single address. If you use a web2 analogy, forwarder contracts act like a reverse proxy server where the user is served by the same address and does not see which server the traffic is coming from. To do so, nodes call the [forward](#forward) function on the forwarder contract. +- [Forwarder](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/AuthorizedForwarder.sol) contracts allow a node operator to manage multiple EOAs and make them look like a single address. If you use a web2 analogy, forwarder contracts act like a reverse proxy server where the user is served by the same address and does not see which server the traffic is coming from. To do so, nodes call the [forward](#forward) function on the forwarder contract. Combining multiple EOAs and forwarder contracts allows greater flexibility and security in terms of design: @@ -25,7 +25,7 @@ Combining multiple EOAs and forwarder contracts allows greater flexibility and s ## API Reference -The forwarder contract inherits [AuthorizedReceiver.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/AuthorizedReceiver.sol) and [ConfirmedOwnerWithProposal.sol](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol). Read the [Receiver](/chainlink-nodes/contracts/receiver) and [Ownership](/chainlink-nodes/contracts/ownership) API references to learn more. +The forwarder contract inherits [AuthorizedReceiver.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/AuthorizedReceiver.sol) and [ConfirmedOwnerWithProposal.sol](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal.sol). Read the [Receiver](/chainlink-nodes/contracts/receiver) and [Ownership](/chainlink-nodes/contracts/ownership) API references to learn more. ### Methods diff --git a/src/content/chainlink-nodes/contracts/operator.mdx b/src/content/chainlink-nodes/contracts/operator.mdx index 2204d23095e..7bd00a4afd4 100644 --- a/src/content/chainlink-nodes/contracts/operator.mdx +++ b/src/content/chainlink-nodes/contracts/operator.mdx @@ -8,7 +8,7 @@ import { Aside } from "@components" Oracles must deploy an onchain contract to handle requests made through the LINK token (Read [Basic Request Model](/architecture-overview/architecture-request-model) to learn more). -When the _Basic Request_ model was introduced, node operators had to deploy the legacy [Oracle contract](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.4/Oracle.sol). However, these come with some limitations, and soon, we introduced [operator contracts](https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/operatorforwarder/dev/Operator.sol). +When the _Basic Request_ model was introduced, node operators had to deploy the legacy [Oracle contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.0.0/contracts/src/v0.4/Oracle.sol). However, these come with some limitations, and soon, we introduced [operator contracts](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/operatorforwarder/Operator.sol).