forked from alloy-rs/alloy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: replace `ExitV1` with `WithdrawalRequest` EIP-7002 has been changed to work with EIP-7685, so the exit type no longer exists and is instead a `WithdrawalRequest` object. In the engine API spec this is called `WithdrawalRequestV1`, which is why it is re-exported as such from `alloy-eips` * fix: cfg attr for serde * chore: correct field name * chore: cfg attr _-_ * chore: delete `exit` module (unused)
- Loading branch information
Showing
5 changed files
with
37 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//! Contains WithdrawalRequest types, first introduced in the [Prague hardfork](https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md). | ||
//! | ||
//! See also [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002): Execution layer triggerable withdrawals | ||
|
||
use alloy_primitives::{Address, FixedBytes}; | ||
|
||
/// Represents an execution layer triggerable withdrawal request. | ||
/// | ||
/// See [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002). | ||
#[derive(Clone, Copy, Debug, PartialEq, Eq)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] | ||
#[cfg_attr( | ||
any(test, feature = "arbitrary"), | ||
derive(proptest_derive::Arbitrary, arbitrary::Arbitrary) | ||
)] | ||
pub struct WithdrawalRequest { | ||
/// Address of the source of the exit. | ||
pub source_address: Address, | ||
/// Validator public key. | ||
pub validator_public_key: FixedBytes<48>, | ||
/// Amount of withdrawn ether in gwei. | ||
#[cfg_attr(feature = "serde", serde(with = "alloy_serde::u64_via_ruint"))] | ||
pub amount: u64, | ||
} |
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 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
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