Skip to content
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
8 changes: 7 additions & 1 deletion contracts/staking/IApplication.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ pragma solidity 0.8.9;
interface IApplication {
/// @notice Used by T staking contract to inform the application that the
/// authorized amount for the given staking provider increased.
/// The application may do any necessary housekeeping.
/// The application may do any necessary housekeeping. The
/// application must revert the transaction in case the
/// authorization is below the minimum required.
function authorizationIncreased(
address stakingProvider,
uint96 fromAmount,
Expand Down Expand Up @@ -54,4 +56,8 @@ interface IApplication {
uint96 fromAmount,
uint96 toAmount
) external;

/// @notice The minimum authorization amount required for the staking
/// provider so that they can participate in the application.
function minimumAuthorization() external view returns (uint96);
}
4 changes: 4 additions & 0 deletions contracts/test/TokenStakingTestSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ contract ApplicationMock is IApplication {
}
stakingProviderStruct.authorized = toAmount;
}

function minimumAuthorization() external view returns (uint96) {
return 0;
}
}

contract BrokenApplicationMock is ApplicationMock {
Expand Down