8000 feat: add delegation designator constants by onbjerg · Pull Request #30 · alloy-rs/eips · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add delegation designator constants #30

New issue

Have a question about this project? Sign up for a f 8000 ree GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025
Merged
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
9 changes: 8 additions & 1 deletion crates/eip7702/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! [EIP-7702] constants.
//!
//! [EIP-7702]: https://eips.ethereum.org/EIPS/eip-7702
use alloy_primitives::{uint, U256};
use alloy_primitives::{hex, uint, U256};

/// Identifier for EIP7702's set code transaction.
///
Expand Down Expand Up @@ -29,3 +29,10 @@ pub const PER_EMPTY_ACCOUNT_COST: u64 = 25000;
/// to EIP-2 should have an S value less than or equal to this.
pub const SECP256K1N_HALF: U256 =
uint!(57896044618658097711785492504343953926418782139537452191302581570759080747168_U256);

/// The EIP-7702 delegation designator.
pub const EIP7702_DELEGATION_DESIGNATOR: [u8; 3] = hex!("0xef0100");

/// The EIP-7702 delegation designator for a cleared delegation.
pub const EIP7702_CLEARED_DELEGATION: [u8; 23] =
hex!("0xef01000000000000000000000000000000000000000000");
Loading
0