Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup TODOs in automation registry #9682

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
// 0 bytes left in 1st EVM word - not written to in transmit
uint96 amountSpent;
uint96 balance;
uint32 lastPerformedBlockNumber; // TODO time expires in 2100
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate exploratory ticket

uint32 lastPerformedBlockNumber;
// 2 bytes left in 2nd EVM word - written in transmit path
address target;
// 12 bytes left in 3rd EVM word - neither written to nor read in transmit
Expand Down Expand Up @@ -387,7 +387,7 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
* @notice the trigger structure for both conditional and ready trigger types
*/
struct BlockTrigger {
uint32 blockNum; // TODO - only 34 years worth of blocks on arbitrum...
uint32 blockNum;
bytes32 blockHash;
}

Expand Down Expand Up @@ -445,7 +445,6 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
* @param fastGasFeed address of the Fast Gas price feed
*/
constructor(Mode mode, address link, address linkNativeFeed, address fastGasFeed) ConfirmedOwner(msg.sender) {
// TODO - logic contracts don't need an owner or ownable functions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard to remove without changing base contract

i_mode = mode;
i_link = LinkTokenInterface(link);
i_linkNativeFeed = AggregatorV3Interface(linkNativeFeed);
Expand All @@ -456,8 +455,6 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
// GETTERS //
/////////////

// TODO - these don't need to be on the Base contract

Comment on lines -459 to -460
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need these during constructor

function getMode() external view returns (Mode) {
return i_mode;
}
Expand Down Expand Up @@ -663,7 +660,6 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
}

function getTriggerType(uint256 upkeepId) public pure returns (Trigger) {
// TODO - alternatively, we could just look this up from storage
bytes32 rawID = bytes32(upkeepId);
bytes1 empty = bytes1(0);
for (uint256 idx = 4; idx < 15; idx++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import "./Chainable.sol";
import {AutomationForwarder} from "./AutomationForwarder.sol";
import "../../../interfaces/automation/UpkeepTranscoderInterfaceV2.sol";

// TODO - we can probably combine these interfaces
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed from 2.2+ where we don't need to worry about the hack

import "../../../interfaces/automation/MigratableKeeperRegistryInterface.sol";
import "../../../interfaces/automation/MigratableKeeperRegistryInterfaceV2.sol";

Expand Down Expand Up @@ -192,7 +191,7 @@ contract KeeperRegistryLogicA2_1 is

function registerUpkeep(
address target,
uint32 gasLimit, // TODO - we may want to allow 0 for "unlimited"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate exploratory feature

uint32 gasLimit,
address admin,
Trigger triggerType,
bytes calldata checkData,
Expand Down Expand Up @@ -233,7 +232,7 @@ contract KeeperRegistryLogicA2_1 is
*/
function registerUpkeep(
address target,
uint32 gasLimit, // TODO - we may want to allow 0 for "unlimited"
uint32 gasLimit,
address admin,
bytes calldata checkData,
bytes calldata offchainConfig
Expand Down
Loading