Skip to content

Commit

Permalink
Adding Rip7560StakeManager
Browse files Browse the repository at this point in the history
  • Loading branch information
shahafn committed Aug 26, 2024
1 parent 71bde73 commit f47361b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 228 deletions.
10 changes: 10 additions & 0 deletions contracts/interfaces/IRip7560StakeManager.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.23;

import "@account-abstraction/contracts/interfaces/IStakeManager.sol";

interface IRip7560StakeManager is IStakeManager {

// internal method to return just the stake info
function getStakeInfo(address[] calldata accounts) external view returns (StakeInfo[] memory infos);
}
104 changes: 0 additions & 104 deletions contracts/interfaces/IStakeManager.sol

This file was deleted.

17 changes: 17 additions & 0 deletions contracts/predeploys/Rip7560StakeManager.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.12;

import "@account-abstraction/contracts/core/StakeManager.sol";
import "../interfaces/IRip7560StakeManager.sol";

contract Rip7560StakeManager is StakeManager, IRip7560StakeManager {

// internal method to return just the stake info
function getStakeInfo(address[] calldata accounts) public view returns (StakeInfo[] memory) {
StakeInfo[] memory infos = new StakeInfo[](accounts.length);
for (uint256 i = 0; i < accounts.length; i++) {
infos[i] = _getStakeInfo(accounts[i]);
}
return infos;
}
}
124 changes: 0 additions & 124 deletions contracts/predeploys/StakeManager.sol

This file was deleted.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
"ts-node": ">=8.0.0",
"typechain": "^8.3.0",
"typescript": ">=4.5.0"
},
"dependencies": {
"@account-abstraction/contracts": "^0.7.0"
}
}

0 comments on commit f47361b

Please sign in to comment.