Skip to content

Commit

Permalink
Cleanup TODOs (#9682)
Browse files Browse the repository at this point in the history
  • Loading branch information
infiloop2 authored and FelixFan1992 committed Jul 6, 2023
1 parent b0f6ac5 commit 91f009c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,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
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 @@ -393,7 +393,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 @@ -451,7 +451,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
i_mode = mode;
i_link = LinkTokenInterface(link);
i_linkNativeFeed = AggregatorV3Interface(linkNativeFeed);
Expand All @@ -462,8 +461,6 @@ abstract contract KeeperRegistryBase2_1 is ConfirmedOwner, ExecutionPrevention {
// GETTERS //
/////////////

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

function getMode() external view returns (Mode) {
return i_mode;
}
Expand Down Expand Up @@ -669,7 +666,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
import "../../../interfaces/automation/MigratableKeeperRegistryInterface.sol";
import "../../../interfaces/automation/MigratableKeeperRegistryInterfaceV2.sol";

Expand Down Expand Up @@ -215,7 +214,7 @@ contract KeeperRegistryLogicA2_1 is

function registerUpkeep(
address target,
uint32 gasLimit, // TODO - we may want to allow 0 for "unlimited"
uint32 gasLimit,
address admin,
Trigger triggerType,
bytes calldata checkData,
Expand Down Expand Up @@ -256,7 +255,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

0 comments on commit 91f009c

Please sign in to comment.