Skip to content

Commit

Permalink
feat: add eip2124 forkid (#25)
Browse files Browse the repository at this point in the history
* feat: add eip2124 forkid

* fix features
  • Loading branch information
mattsse authored Dec 30, 2024
1 parent 481a68c commit 8794306
Show file tree
Hide file tree
Showing 5 changed files with 922 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ arbitrary = "1.3"
# for 7702 signed authorization list arbitrary
k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
rand = "0.8"

# misc
thiserror = { version = "2.0.0", default-features = false }
44 changes: 44 additions & 0 deletions crates/eip2124/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[package]
name = "alloy-eip2124"
description = "Fork identifier for chain compatibility checks"

version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[dependencies]
alloy-primitives = { workspace = true, features = ["rlp"] }
alloy-rlp = { workspace = true, features = ["derive"] }

# serde
serde = { workspace = true, optional = true }

# used for forkid
crc = "3"

# arbitrary
arbitrary = { workspace = true, features = ["derive"], optional = true }
rand = { workspace = true, optional = true }

thiserror.workspace = true

[dev-dependencies]
arbitrary = { workspace = true, features = ["derive"] }
alloy-rlp = { workspace = true, features = ["arrayvec"] }

[features]
default = ["std"]
std = ["alloy-primitives/std", "alloy-rlp/std", "serde?/std", "thiserror/std"]
serde = ["dep:serde", "alloy-primitives/serde"]
arbitrary = ["std", "dep:arbitrary", "dep:rand", "alloy-primitives/arbitrary"]
Loading

0 comments on commit 8794306

Please sign in to comment.