Keeper Helper¶
Overview¶
The keeper helper contract is not a core protocol contract. It is a wrapper contract that exposes some userful views to help with the development of off chain keepers.
It exposes views that return information on what topups are ready for execution, and if certain topups can be executed.
Note
It is not recommended for on chain use, as many of the functions are highly gas expensive.
Views¶
-
TopUpKeeperHelper.
getExecutableTopups
(uint256 cursor, uint256 howMany) external view returns (TopupData[] memory topups, uint256 nextCursor)¶ Gets a list of topup positions that can be executed.
cursor
: The cursor for pagination (should start at 0 for first call).howMany
: Maximum number of topups to return in this pagination request.
-
TopUpKeeperHelper.
canExecute
(ITopUpAction.RecordKey memory key) public view returns (bool)¶ Check if action can be executed.
key
: Unique key of the account to check for the key contains information about the payer, the account and the protocol.
-
TopUpKeeperHelper.
batchCanExecute
(ITopUpAction.RecordKey[] calldata keys) external view returns (bool[] memory)¶ Check if the action can be executed for the positions of the given
keys
keys
: Unique keys to check for.