diff --git a/contracts/src/v0.8/dev/automation/2_1/KeeperRegistryLogicB2_1.sol b/contracts/src/v0.8/dev/automation/2_1/KeeperRegistryLogicB2_1.sol index 21dada7e893..322e3d6b182 100644 --- a/contracts/src/v0.8/dev/automation/2_1/KeeperRegistryLogicB2_1.sol +++ b/contracts/src/v0.8/dev/automation/2_1/KeeperRegistryLogicB2_1.sol @@ -40,7 +40,6 @@ contract KeeperRegistryLogicB2_1 is KeeperRegistryBase2_1 { function transferUpkeepAdmin(uint256 id, address proposed) external { _requireAdminAndNotCancelled(id); if (proposed == msg.sender) revert ValueNotChanged(); - if (proposed == ZERO_ADDRESS) revert InvalidRecipient(); if (s_proposedAdmin[id] != proposed) { s_proposedAdmin[id] = proposed; diff --git a/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts b/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts index 7a8d6a853ad..246475558fc 100644 --- a/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts +++ b/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts @@ -4318,13 +4318,18 @@ describe('KeeperRegistry2_1', () => { ) }) - it('reverts when transferring to zero address', async () => { - await evmRevert( - registry - .connect(admin) - .transferUpkeepAdmin(upkeepId, ethers.constants.AddressZero), - 'InvalidRecipient()', - ) + it('allows transferring to zero address', async () => { + const tx = await registry + .connect(admin) + .transferUpkeepAdmin(upkeepId, ethers.constants.AddressZero) + + await expect(tx) + .to.emit(registry, 'UpkeepAdminTransferRequested') + .withArgs( + upkeepId, + await admin.getAddress(), + ethers.constants.AddressZero, + ) }) it('does not change the upkeep admin', async () => {