The Automation Registrar is the on-chain contract that accepts and processes upkeep registration requests for Chainlink Automation. It acts as the gatekeeper between users who want to register upkeeps and the Automation registry that actually tracks and executes them.

How It Works#

The registrar exposes a registerUpkeep function that accepts a RegistrationParams struct and a LINK payment. On receiving a valid request, it:

  1. Transfers the LINK funding from the caller to the registry.
  2. Creates a new upkeep entry in the registry.
  3. Returns the upkeepId — a uint256 that uniquely identifies the upkeep.

Depending on the network and configuration, registration may be auto-approved (instant) or require manual approval by the registry owner. Mainnet deployments typically auto-approve; testnets vary.

Interface#

The registrar implements IAutomationRegistrar. The key struct and function:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import {IAutomationRegistrar} from "@chainlink/contracts/src/v0.8/automation/interfaces/IAutomationRegistrar.sol";

struct RegistrationParams {
    string name;
    bytes encryptedEmail;
    address upkeepContract;
    uint32 gasLimit;
    address adminAddress;
    uint8 triggerType;      // 0 = conditional, 1 = log trigger
    bytes checkData;
    bytes triggerConfig;
    bytes offchainConfig;
    uint96 amount;          // LINK funding in wei (18 decimals)
}

// Caller must first approve the registrar to spend `params.amount` of LINK.
function registerUpkeep(RegistrationParams memory params) external returns (uint256 upkeepId);

Finding the Registrar Address#

Registrar addresses differ per network and per registry version. The canonical source is the Chainlink Automation Supported Networks page, which lists both the registry and registrar addresses for each chain.

Hardcoding addresses is fragile across upgrades. For production systems, consider reading the registrar address from a deployment config or environment variable.

Relationship to the Registry#

The registrar and registry reference each other:

  • The registrar stores the registry address internally and calls it to create upkeeps. You can read it via getConfig():
1
2
// Returns (registryAddress, minimumLINK).
(address keeperRegistry, uint256 minLINKJuels) = registrar.getConfig();
  • The registry maintains an allowlist of addresses permitted to add upkeeps. The registrar must be on this list, otherwise its registration calls revert.

The owner can update both sides: setConfig() on the registrar points it at a new registry, and the registry owner can update the allowlist.

Registrar vs Registry#

Registrar Registry
Purpose Accepts new upkeep registrations Stores upkeeps, coordinates execution
Who calls it Users / deployer scripts Automation nodes
LINK flow Receives LINK from caller, forwards to registry Holds LINK balances, pays node operators

The registrar is a thin coordination layer. Once an upkeep is registered, all subsequent interactions (funding, cancellation, configuration changes) go directly through the registry.

Further Reading#