From e22999d026d2f64a6263e94cb9e2e77fb46c8d72 Mon Sep 17 00:00:00 2001 From: Emmanuel Jacquier Date: Fri, 7 Aug 2026 11:46:33 -0400 Subject: [PATCH 1/2] added cancel upkeep guide --- src/config/sidebar.ts | 4 + .../guides/cancel-upkeep.mdx | 82 +++++++++++++++++++ .../guides/manage-upkeeps.mdx | 2 + .../chainlink-automation/llms-full.txt | 74 +++++++++++++++++ src/content/cre/llms-full-go.txt | 4 + src/content/cre/llms-full-ts.txt | 4 + .../cre/reference/cla-migration-go.mdx | 4 + .../cre/reference/cla-migration-ts.mdx | 4 + 8 files changed, 178 insertions(+) create mode 100644 src/content/chainlink-automation/guides/cancel-upkeep.mdx diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts index 166aa6b6875..cac2659f5b8 100644 --- a/src/config/sidebar.ts +++ b/src/config/sidebar.ts @@ -1593,6 +1593,10 @@ export const SIDEBAR: Partial> = { title: "Manage your Upkeeps", url: "chainlink-automation/guides/manage-upkeeps", }, + { + title: "Cancel an Upkeep and Withdraw Funds", + url: "chainlink-automation/guides/cancel-upkeep", + }, { title: "Set a gas price threshold on your upkeep", url: "chainlink-automation/guides/gas-price-threshold", diff --git a/src/content/chainlink-automation/guides/cancel-upkeep.mdx b/src/content/chainlink-automation/guides/cancel-upkeep.mdx new file mode 100644 index 00000000000..e559b132b3c --- /dev/null +++ b/src/content/chainlink-automation/guides/cancel-upkeep.mdx @@ -0,0 +1,82 @@ +--- +section: automation +date: Last Modified +title: "Cancel an Upkeep and Withdraw Funds" +isMdx: true +whatsnext: + { + "Manage your Upkeeps": "/chainlink-automation/guides/manage-upkeeps", + "Automation Billing and Costs": "/chainlink-automation/overview/automation-economics", + "Migrate from Chainlink Automation to Chainlink CRE": "/cre/reference/cla-migration", + } +--- + +import { Aside } from "@components" +import ChainlinkAutomation from "@features/chainlink-automation/common/ChainlinkAutomation.astro" + + + +Cancelling an Upkeep and withdrawing its remaining LINK balance is a two-step onchain process: first you cancel the Upkeep, then—after a network-specific delay—you withdraw the funds. Only the Upkeep admin can perform these actions. + +## Prerequisites + +- **Your Upkeep ID.** If you don't know it, see [Find your Upkeep ID](#find-your-upkeep-id) below. +- **The Registry address** for the network your Upkeep is on. Find it in the [Supported Networks](/chainlink-automation/overview/supported-networks) reference. +- **A wallet you can sign transactions with** using the Upkeep admin address. The examples below use [Foundry's `cast`](https://getfoundry.sh/cast/overview) with a raw private key, but you can substitute a keystore or Ledger. See [Sending Transactions](https://www.getfoundry.sh/cast/sending-transactions) in the Foundry docs for the equivalent `--account` or `--ledger` flags. + +## Find your Upkeep ID + +If you already know your Upkeep ID, skip to [Cancel the Upkeep](#cancel-the-upkeep). + +- **Using the Automation App:** Go to the [Chainlink Automation App](https://automation.chain.link), connect the admin wallet, and open the Upkeep under **My Upkeeps**. The Upkeep ID is shown on the Upkeep's detail page. +- **Using the lookup spreadsheet:** If you no longer have access to the admin wallet's session or the Upkeep isn't showing in the app, look up your Upkeep ID by owner address in the [Chainlink Automation Upkeep ID Registry](https://docs.google.com/spreadsheets/d/1jSg_KEvskbhlcFUbpKKN82-YuF3sKGSbQcaZFcCy-7c/edit?gid=599726699#gid=599726699). + +## Cancel the Upkeep + +Call `cancelUpkeep` on the Registry contract, passing your Upkeep ID: + +```shell +cast send KEEPER_REGISTRY_ADDRESS \ +"cancelUpkeep(uint256)" \ +UPKEEP_ID \ +--rpc-url $CHAIN_RPC_URL \ +--private-key $PRIVATE_KEY +``` + +Where: + +- `KEEPER_REGISTRY_ADDRESS` is the address of the Registry contract for your network. +- `UPKEEP_ID` is your numerical Upkeep ID. +- `CHAIN_RPC_URL` is the HTTP RPC URL for your network. + + + +## Wait for the cancellation delay + +After the cancel transaction confirms, you must wait for a delay—measured in blocks and varying by network—before you can withdraw funds. Attempting to withdraw before the delay has passed will revert. + +## Withdraw the funds + +Once the delay has passed, call `withdrawFunds` on the same Registry contract to send the remaining LINK balance to an address of your choice: + +```shell +cast send KEEPER_REGISTRY_ADDRESS \ +"withdrawFunds(uint256,address)" \ +UPKEEP_ID \ +TO_ADDRESS \ +--rpc-url $CHAIN_RPC_URL \ +--private-key $PRIVATE_KEY +``` + +Where: + +- `KEEPER_REGISTRY_ADDRESS` is the address of the Registry contract for your network. +- `UPKEEP_ID` is your numerical Upkeep ID. +- `TO_ADDRESS` is the wallet address that should receive the withdrawn LINK. +- `CHAIN_RPC_URL` is the HTTP RPC URL for your network. + +Once this transaction confirms, the Upkeep's remaining LINK balance is transferred to `TO_ADDRESS` and the Upkeep is fully decommissioned. diff --git a/src/content/chainlink-automation/guides/manage-upkeeps.mdx b/src/content/chainlink-automation/guides/manage-upkeeps.mdx index 07fa87c158e..c607095c448 100644 --- a/src/content/chainlink-automation/guides/manage-upkeeps.mdx +++ b/src/content/chainlink-automation/guides/manage-upkeeps.mdx @@ -52,6 +52,8 @@ To account for Upkeep execution over time and possible extended gas spikes, main To withdraw funds, the Upkeep administrator have to cancel the Upkeep first. There is delay once an Upkeep has been cancelled before funds can be withdrawn. The number of blocks delay varies by network and once the delay has passed, you can **Withdraw funds**. +For step-by-step instructions, including how to cancel and withdraw directly on the Registry contract if you don't have access to the Automation App, see [Cancel an Upkeep and Withdraw Funds](/chainlink-automation/guides/cancel-upkeep). + ## Interacting directly with the Chainlink Automation Registry After registration, you can interact directly with the [registry contract](/chainlink-automation/overview/supported-networks) functions such as `cancelUpkeep` and `addFunds` using your **Upkeep ID**. The Registry Address might change when new contracts are deployed with new functionality. diff --git a/src/content/chainlink-automation/llms-full.txt b/src/content/chainlink-automation/llms-full.txt index 68a6c035c8a..0ccb793183e 100644 --- a/src/content/chainlink-automation/llms-full.txt +++ b/src/content/chainlink-automation/llms-full.txt @@ -90,6 +90,78 @@ If your upkeep is on Automation v1, we recommend that you revalidate the conditi --- +# Cancel an Upkeep and Withdraw Funds +Source: https://docs.chain.link/chainlink-automation/guides/cancel-upkeep + + + +Cancelling an Upkeep and withdrawing its remaining LINK balance is a two-step onchain process: first you cancel the Upkeep, then—after a network-specific delay—you withdraw the funds. Only the Upkeep admin can perform these actions. + +## Prerequisites + +- **Your Upkeep ID.** If you don't know it, see [Find your Upkeep ID](#find-your-upkeep-id) below. +- **The Registry address** for the network your Upkeep is on. Find it in the [Supported Networks](/chainlink-automation/overview/supported-networks) reference. +- **A wallet you can sign transactions with** using the Upkeep admin address. The examples below use [Foundry's `cast`](https://getfoundry.sh/cast/overview) with a raw private key, but you can substitute a keystore or Ledger. See [Sending Transactions](https://www.getfoundry.sh/cast/sending-transactions) in the Foundry docs for the equivalent `--account` or `--ledger` flags. + +## Find your Upkeep ID + +If you already know your Upkeep ID, skip to [Cancel the Upkeep](#cancel-the-upkeep). + +- **Using the Automation App:** Go to the [Chainlink Automation App](https://automation.chain.link), connect the admin wallet, and open the Upkeep under **My Upkeeps**. The Upkeep ID is shown on the Upkeep's detail page. +- **Using the lookup spreadsheet:** If you no longer have access to the admin wallet's session or the Upkeep isn't showing in the app, look up your Upkeep ID by owner address in the [Chainlink Automation Upkeep ID Registry](https://docs.google.com/spreadsheets/d/1jSg_KEvskbhlcFUbpKKN82-YuF3sKGSbQcaZFcCy-7c/edit?gid=599726699#gid=599726699). + +## Cancel the Upkeep + +Call `cancelUpkeep` on the Registry contract, passing your Upkeep ID: + +```shell +cast send KEEPER_REGISTRY_ADDRESS \ +"cancelUpkeep(uint256)" \ +UPKEEP_ID \ +--rpc-url $CHAIN_RPC_URL \ +--private-key $PRIVATE_KEY +``` + +Where: + +- `KEEPER_REGISTRY_ADDRESS` is the address of the Registry contract for your network. +- `UPKEEP_ID` is your numerical Upkeep ID. +- `CHAIN_RPC_URL` is the HTTP RPC URL for your network. + + + +## Wait for the cancellation delay + +After the cancel transaction confirms, you must wait for a delay—measured in blocks and varying by network—before you can withdraw funds. Attempting to withdraw before the delay has passed will revert. + +## Withdraw the funds + +Once the delay has passed, call `withdrawFunds` on the same Registry contract to send the remaining LINK balance to an address of your choice: + +```shell +cast send KEEPER_REGISTRY_ADDRESS \ +"withdrawFunds(uint256,address)" \ +UPKEEP_ID \ +TO_ADDRESS \ +--rpc-url $CHAIN_RPC_URL \ +--private-key $PRIVATE_KEY +``` + +Where: + +- `KEEPER_REGISTRY_ADDRESS` is the address of the Registry contract for your network. +- `UPKEEP_ID` is your numerical Upkeep ID. +- `TO_ADDRESS` is the wallet address that should receive the withdrawn LINK. +- `CHAIN_RPC_URL` is the HTTP RPC URL for your network. + +Once this transaction confirms, the Upkeep's remaining LINK balance is transferred to `TO_ADDRESS` and the Upkeep is fully decommissioned. + +--- + # Create Automation-Compatible Contracts Source: https://docs.chain.link/chainlink-automation/guides/compatible-contracts @@ -1035,6 +1107,8 @@ To account for Upkeep execution over time and possible extended gas spikes, main To withdraw funds, the Upkeep administrator have to cancel the Upkeep first. There is delay once an Upkeep has been cancelled before funds can be withdrawn. The number of blocks delay varies by network and once the delay has passed, you can **Withdraw funds**. +For step-by-step instructions, including how to cancel and withdraw directly on the Registry contract if you don't have access to the Automation App, see [Cancel an Upkeep and Withdraw Funds](/chainlink-automation/guides/cancel-upkeep). + ## Interacting directly with the Chainlink Automation Registry After registration, you can interact directly with the [registry contract](/chainlink-automation/overview/supported-networks) functions such as `cancelUpkeep` and `addFunds` using your **Upkeep ID**. The Registry Address might change when new contracts are deployed with new functionality. diff --git a/src/content/cre/llms-full-go.txt b/src/content/cre/llms-full-go.txt index bd2d77aa638..d304aec4689 100644 --- a/src/content/cre/llms-full-go.txt +++ b/src/content/cre/llms-full-go.txt @@ -19380,6 +19380,10 @@ cre workflow deploy my-workflow --target=production-settings For end-to-end runnable examples, see the [`smartcontractkit/cre-templates`](https://github.com/smartcontractkit/cre-templates/tree/main/starter-templates/automation-migration) repository. +### 5. Decommission the old Upkeep + +Once your CRE workflow is live and verified, cancel the original Automation Upkeep and withdraw its remaining LINK balance so it isn't performed alongside your new workflow. See [Cancel an Upkeep and Withdraw Funds](/chainlink-automation/guides/cancel-upkeep). + ## Troubleshooting ### CallNotAllowed Error diff --git a/src/content/cre/llms-full-ts.txt b/src/content/cre/llms-full-ts.txt index c1cd4f0f726..6f458bbd06d 100644 --- a/src/content/cre/llms-full-ts.txt +++ b/src/content/cre/llms-full-ts.txt @@ -19420,6 +19420,10 @@ cre workflow deploy my-workflow --target=production-settings For end-to-end runnable examples, see the [`smartcontractkit/cre-templates`](https://github.com/smartcontractkit/cre-templates/tree/main/starter-templates/automation-migration) repository. +### 5. Decommission the old Upkeep + +Once your CRE workflow is live and verified, cancel the original Automation Upkeep and withdraw its remaining LINK balance so it isn't performed alongside your new workflow. See [Cancel an Upkeep and Withdraw Funds](/chainlink-automation/guides/cancel-upkeep). + ## Troubleshooting ### CallNotAllowed Error diff --git a/src/content/cre/reference/cla-migration-go.mdx b/src/content/cre/reference/cla-migration-go.mdx index 3922058fed9..55f6bad81d6 100644 --- a/src/content/cre/reference/cla-migration-go.mdx +++ b/src/content/cre/reference/cla-migration-go.mdx @@ -294,6 +294,10 @@ cre workflow deploy my-workflow --target=production-settings For end-to-end runnable examples, see the [`smartcontractkit/cre-templates`](https://github.com/smartcontractkit/cre-templates/tree/main/starter-templates/automation-migration) repository. +### 5. Decommission the old Upkeep + +Once your CRE workflow is live and verified, cancel the original Automation Upkeep and withdraw its remaining LINK balance so it isn't performed alongside your new workflow. See [Cancel an Upkeep and Withdraw Funds](/chainlink-automation/guides/cancel-upkeep). + ## Troubleshooting ### CallNotAllowed Error diff --git a/src/content/cre/reference/cla-migration-ts.mdx b/src/content/cre/reference/cla-migration-ts.mdx index 93b2c5da27c..c4d205b3836 100644 --- a/src/content/cre/reference/cla-migration-ts.mdx +++ b/src/content/cre/reference/cla-migration-ts.mdx @@ -294,6 +294,10 @@ cre workflow deploy my-workflow --target=production-settings For end-to-end runnable examples, see the [`smartcontractkit/cre-templates`](https://github.com/smartcontractkit/cre-templates/tree/main/starter-templates/automation-migration) repository. +### 5. Decommission the old Upkeep + +Once your CRE workflow is live and verified, cancel the original Automation Upkeep and withdraw its remaining LINK balance so it isn't performed alongside your new workflow. See [Cancel an Upkeep and Withdraw Funds](/chainlink-automation/guides/cancel-upkeep). + ## Troubleshooting ### CallNotAllowed Error From e71c12d32bdac6a9db1b05c57fe1fe13458f7b50 Mon Sep 17 00:00:00 2001 From: Emmanuel Jacquier Date: Fri, 7 Aug 2026 11:47:55 -0400 Subject: [PATCH 2/2] added upkeep list link --- src/content/chainlink-automation/guides/cancel-upkeep.mdx | 2 +- src/content/chainlink-automation/llms-full.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/chainlink-automation/guides/cancel-upkeep.mdx b/src/content/chainlink-automation/guides/cancel-upkeep.mdx index e559b132b3c..e5883f94ab0 100644 --- a/src/content/chainlink-automation/guides/cancel-upkeep.mdx +++ b/src/content/chainlink-automation/guides/cancel-upkeep.mdx @@ -29,7 +29,7 @@ Cancelling an Upkeep and withdrawing its remaining LINK balance is a two-step on If you already know your Upkeep ID, skip to [Cancel the Upkeep](#cancel-the-upkeep). - **Using the Automation App:** Go to the [Chainlink Automation App](https://automation.chain.link), connect the admin wallet, and open the Upkeep under **My Upkeeps**. The Upkeep ID is shown on the Upkeep's detail page. -- **Using the lookup spreadsheet:** If you no longer have access to the admin wallet's session or the Upkeep isn't showing in the app, look up your Upkeep ID by owner address in the [Chainlink Automation Upkeep ID Registry](https://docs.google.com/spreadsheets/d/1jSg_KEvskbhlcFUbpKKN82-YuF3sKGSbQcaZFcCy-7c/edit?gid=599726699#gid=599726699). +- **Using the lookup spreadsheet:** If you no longer have access to the admin wallet's session or the Upkeep isn't showing in the app, look up your Upkeep ID by owner address in the [Chainlink Automation Upkeep ID Registry](https://docs.google.com/spreadsheets/d/1jSg_KEvskbhlcFUbpKKN82-YuF3sKGSbQcaZFcCy-7c/edit?gid=2097402178#gid=2097402178). ## Cancel the Upkeep diff --git a/src/content/chainlink-automation/llms-full.txt b/src/content/chainlink-automation/llms-full.txt index 0ccb793183e..476fd414aac 100644 --- a/src/content/chainlink-automation/llms-full.txt +++ b/src/content/chainlink-automation/llms-full.txt @@ -108,7 +108,7 @@ Cancelling an Upkeep and withdrawing its remaining LINK balance is a two-step on If you already know your Upkeep ID, skip to [Cancel the Upkeep](#cancel-the-upkeep). - **Using the Automation App:** Go to the [Chainlink Automation App](https://automation.chain.link), connect the admin wallet, and open the Upkeep under **My Upkeeps**. The Upkeep ID is shown on the Upkeep's detail page. -- **Using the lookup spreadsheet:** If you no longer have access to the admin wallet's session or the Upkeep isn't showing in the app, look up your Upkeep ID by owner address in the [Chainlink Automation Upkeep ID Registry](https://docs.google.com/spreadsheets/d/1jSg_KEvskbhlcFUbpKKN82-YuF3sKGSbQcaZFcCy-7c/edit?gid=599726699#gid=599726699). +- **Using the lookup spreadsheet:** If you no longer have access to the admin wallet's session or the Upkeep isn't showing in the app, look up your Upkeep ID by owner address in the [Chainlink Automation Upkeep ID Registry](https://docs.google.com/spreadsheets/d/1jSg_KEvskbhlcFUbpKKN82-YuF3sKGSbQcaZFcCy-7c/edit?gid=2097402178#gid=2097402178). ## Cancel the Upkeep