-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from sanbir/eip-7251
Eip 7251
- Loading branch information
Showing
75 changed files
with
10,693 additions
and
11,407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
(?:^|/)go\.sum$ | ||
(?:^|/)package(?:-lock|)\.json$ | ||
(?:^|/)vendor/ | ||
(?:^|/)lib/ | ||
\.ai$ | ||
\.avi$ | ||
\.bmp$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.17.0 | ||
20.14.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ coverage | |
.env | ||
.* | ||
README.md | ||
coverage.json | ||
coverage.json | ||
contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-include .env | ||
|
||
clean :; forge clean | ||
|
||
build:; forge build | ||
|
||
test :; forge test | ||
|
||
snapshot :; forge snapshot | ||
|
||
format :; forge fmt | ||
|
||
NETWORK_ARGS := --rpc-url $(RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvvvv | ||
|
||
deploy: | ||
@forge script script/Deploy.s.sol:Deploy $(NETWORK_ARGS) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "../token/ERC1155/IERC1155.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "../utils/introspection/IERC165.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "../token/ERC20/IERC20.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// SPDX-License-Identifier: MIT | ||
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "../token/ERC721/IERC721.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/@openzeppelin/contracts/utils/introspection/ERC165.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/@openzeppelin/contracts/utils/introspection/ERC165Checker.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/@openzeppelin/contracts/utils/introspection/IERC165.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
/** | ||
* @dev External interface of Ownable. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./IOwnable.sol"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>, OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./OwnableBase.sol"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>, OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./Ownable.sol"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "../@openzeppelin/contracts/utils/Context.sol"; | ||
import "./IOwnable.sol"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./Ownable2Step.sol"; | ||
import "./IOwnableWithOperator.sol"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
// https://github.com/lidofinance/lido-otc-seller/blob/master/contracts/lib/AssetRecoverer.sol | ||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./TokenRecoverer.sol"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
// https://github.com/lidofinance/lido-otc-seller/blob/master/contracts/lib/AssetRecoverer.sol | ||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./OwnableTokenRecoverer.sol"; | ||
import "./AssetRecoverer.sol"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
// https://github.com/lidofinance/lido-otc-seller/blob/master/contracts/lib/AssetRecoverer.sol | ||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import "./TokenRecoverer.sol"; | ||
import "../access/OwnableBase.sol"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>, Lido <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
// https://github.com/lidofinance/lido-otc-seller/blob/master/contracts/lib/AssetRecoverer.sol | ||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
import {IERC20} from "../@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
import {IERC721} from "../@openzeppelin/contracts/token/ERC721/IERC721.sol"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
/// @dev Maximal number of ETH2 deposits within a single transaction | ||
/// @dev 400 deposits (12800 ETH) is determined by calldata size limit of 128 kb | ||
/// https://ethereum.stackexchange.com/questions/144120/maximum-calldata-size-per-block | ||
uint256 constant VALIDATORS_MAX_AMOUNT = 400; | ||
|
||
/// @dev Collateral size of 1 validator | ||
uint256 constant COLLATERAL = 32 ether; | ||
/// @dev EIP-7251 MIN_ACTIVATION_BALANCE | ||
uint96 constant MIN_ACTIVATION_BALANCE = 32 ether; | ||
|
||
/// @dev EIP-7251 MAX_EFFECTIVE_BALANCE | ||
uint96 constant MAX_EFFECTIVE_BALANCE = 2048 ether; | ||
|
||
/// @dev Minimal 1 time deposit | ||
uint256 constant MIN_DEPOSIT = 1 ether; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2023 P2P Validator <[email protected]> | ||
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
interface IEntryPointStakeManager { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.8.10; | ||
pragma solidity 0.8.24; | ||
|
||
/** | ||
* User Operation struct | ||
|
Oops, something went wrong.