-
Notifications
You must be signed in to change notification settings - Fork 0
/
IKeep3rJob.sol
95 lines (80 loc) · 3.07 KB
/
IKeep3rJob.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.4 <0.9.0;
import 'isolmate/interfaces/tokens/IERC20.sol';
import 'uni-v3-core/interfaces/IUniswapV3Pool.sol';
import 'keep3r/interfaces/IKeep3r.sol';
import 'solidity-utils/interfaces/IPausable.sol';
interface IKeep3rJob is IPausable {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
/**
@notice Emitted a new keeper is set
@param _keep3r The new keeper address
*/
event Keep3rSet(IKeep3r _keep3r);
/**
@notice Emitted when setting new keeper requirements
@param _bond The required token to bond by keepers
@param _minBond The minimum amount bound
@param _earnings The earnings of the keeper
@param _age The age of the keeper in the Keep3r network
*/
event Keep3rRequirementsSet(IERC20 _bond, uint256 _minBond, uint256 _earnings, uint256 _age);
/*///////////////////////////////////////////////////////////////
ERRORS
//////////////////////////////////////////////////////////////*/
/**
@notice Thrown when the caller is not a valid keeper in the Keep3r network
*/
error InvalidKeeper();
/*///////////////////////////////////////////////////////////////
VARIABLES
//////////////////////////////////////////////////////////////*/
/**
@notice The address of the Keep3r contract
@return _keep3r The address of the token
*/
function keep3r() external view returns (IKeep3r _keep3r);
/**
@notice The address of the keeper bond token
@return _requiredBond The address of the token
*/
function requiredBond() external view returns (IERC20 _requiredBond);
/**
@notice The minimum amount of bonded token required to bond by the keeper
@return _requiredMinBond The required min amount bond
*/
function requiredMinBond() external view returns (uint256 _requiredMinBond);
/**
@notice The required earnings of the keeper
@return _requiredEarnings The required earnings
*/
function requiredEarnings() external view returns (uint256 _requiredEarnings);
/**
@notice The age of the keeper in the Keep3r network
@return _requiredAge The age of the keeper, in seconds
*/
function requiredAge() external view returns (uint256 _requiredAge);
/*///////////////////////////////////////////////////////////////
LOGIC
//////////////////////////////////////////////////////////////*/
/**
@notice Sets the address of the keeper
@param _keep3r The address of the keeper to be set
*/
function setKeep3r(IKeep3r _keep3r) external;
/**
@notice Sets the keeper requirements
@param _bond The required token to bond by keepers
@param _minBond The minimum amount bound
@param _earnings The earnings of the keeper
@param _age The age of the keeper in the Keep3r network
*/
function setKeep3rRequirements(
IERC20 _bond,
uint256 _minBond,
uint256 _earnings,
uint256 _age
) external;
}