-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathIBondingManager.sol
More file actions
108 lines (92 loc) · 4.07 KB
/
Copy pathIBondingManager.sol
File metadata and controls
108 lines (92 loc) · 4.07 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/**
* @title Interface for BondingManager
* TODO: switch to interface type
*/
interface IBondingManager {
event TranscoderUpdate(address indexed transcoder, uint256 rewardCut, uint256 feeShare);
event TranscoderActivated(address indexed transcoder, uint256 activationRound);
event TranscoderDeactivated(address indexed transcoder, uint256 deactivationRound);
event TranscoderSlashed(address indexed transcoder, address finder, uint256 penalty, uint256 finderReward);
event Reward(address indexed transcoder, uint256 amount);
event TreasuryReward(address indexed transcoder, address treasury, uint256 amount);
event Bond(
address indexed newDelegate,
address indexed oldDelegate,
address indexed delegator,
uint256 additionalAmount,
uint256 bondedAmount
);
event Unbond(
address indexed delegate,
address indexed delegator,
uint256 unbondingLockId,
uint256 amount,
uint256 withdrawRound
);
event Rebond(address indexed delegate, address indexed delegator, uint256 unbondingLockId, uint256 amount);
event TransferBond(
address indexed oldDelegator,
address indexed newDelegator,
uint256 oldUnbondingLockId,
uint256 newUnbondingLockId,
uint256 amount
);
event WithdrawStake(address indexed delegator, uint256 unbondingLockId, uint256 amount, uint256 withdrawRound);
event WithdrawFees(address indexed delegator, address recipient, uint256 amount);
event EarningsClaimed(
address indexed delegate,
address indexed delegator,
uint256 rewards,
uint256 fees,
uint256 startRound,
uint256 endRound
);
event RewardCallerProposed(address indexed transcoder, address indexed rewardCaller);
event RewardCallerConfirmed(address indexed transcoder, address indexed rewardCaller);
event RewardCallerRemoved(address indexed transcoder, address indexed rewardCaller);
// Deprecated events
// These event signatures can be used to construct the appropriate topic hashes to filter for past logs corresponding
// to these deprecated events.
// event Bond(address indexed delegate, address indexed delegator);
// event Unbond(address indexed delegate, address indexed delegator);
// event WithdrawStake(address indexed delegator);
// event TranscoderUpdate(address indexed transcoder, uint256 pendingRewardCut, uint256 pendingFeeShare, uint256 pendingPricePerSegment, bool registered);
// event TranscoderEvicted(address indexed transcoder);
// event TranscoderResigned(address indexed transcoder);
// External functions
function updateTranscoderWithFees(
address _transcoder,
uint256 _fees,
uint256 _round
) external;
function slashTranscoder(
address _transcoder,
address _finder,
uint256 _slashAmount,
uint256 _finderFee
) external;
function setCurrentRoundTotalActiveStake() external;
function proposeTranscoderForRewardCaller(address _transcoder) external;
function confirmRewardCaller(address _rewardCaller) external;
function removeRewardCaller(address _rewardCaller) external;
function reward() external;
function rewardWithHint(address _newPosPrev, address _newPosNext) external;
// Public functions
function getTranscoderPoolSize() external view returns (uint256);
function transcoderTotalStake(address _transcoder) external view returns (uint256);
function isActiveTranscoder(address _transcoder) external view returns (bool);
function getTotalBonded() external view returns (uint256);
function nextRoundTotalActiveStake() external view returns (uint256);
function getTranscoderEarningsPoolForRound(address _transcoder, uint256 _round)
external
view
returns (
uint256 totalStake,
uint256 transcoderRewardCut,
uint256 transcoderFeeShare,
uint256 cumulativeRewardFactor,
uint256 cumulativeFeeFactor
);
}