Skip to content

Commit 3638a60

Browse files
authored
feat(protocol-contracts): make OperatorStaking inherit ERC1363 (#1541)
1 parent 68699af commit 3638a60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

protocol-contracts/staking/contracts/OperatorStaking.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pragma solidity ^0.8.27;
44

55
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
66
import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
7+
import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";
78
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
89
import {ERC4626, IERC4626} from "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol";
910
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
@@ -21,12 +22,13 @@ import {ProtocolStaking} from "./ProtocolStaking.sol";
2122
* @custom:security-contact [email protected]
2223
* @notice Allows users to stake assets and receive shares, with support for reward distribution.
2324
* @dev Integrates with ProtocolStaking and OperatorRewarder contracts. Inspired by ERC7540 but not fully compliant.
25+
* Also inherits ERC1363 to ease of users with potential OperatorStaking contract migrations.
2426
*
2527
* NOTE: This contract supports slashing on the `ProtocolStaking` level, meaning that the overall stake of this contract
2628
* may decrease due to slashing. These losses are symmetrically passed to restakers on the `OperatorStaking` level.
2729
* Slashing must first decrease the `ProtocolStaking` balance of this contract before affecting pending withdrawals.
2830
*/
29-
contract OperatorStaking is ERC20, Ownable, ReentrancyGuardTransient {
31+
contract OperatorStaking is ERC1363, Ownable, ReentrancyGuardTransient {
3032
using Math for uint256;
3133
using Checkpoints for Checkpoints.Trace208;
3234

0 commit comments

Comments
 (0)