Skip to content
New issue

Have a question about this project? Sign up for a free 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

feat: move reth genesis to alloy-genesis #120

Merged
merged 9 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ alloy-transport = { version = "0.1.0", path = "crates/transport" }
alloy-transport-http = { version = "0.1.0", path = "crates/transport-http" }
alloy-transport-ipc = { version = "0.1.0", path = "crates/transport-ipc" }
alloy-transport-ws = { version = "0.1.0", path = "crates/transport-ws" }

alloy-genesis = {version = "0.1.0", path = "crates/genesis" }
alloy-primitives = { version = "0.6", default-features = false, features = ["std"] }
alloy-sol-types = { version = "0.6", default-features = false, features = ["std"] }
alloy-rlp = "0.3"
Expand All @@ -45,7 +45,11 @@ elliptic-curve = { version = "0.13", default-features = false, features = ["std"
k256 = { version = "0.13", default-features = false, features = ["ecdsa", "std"] }
sha2 = { version = "0.10", default-features = false, features = ["std"] }
spki = { version = "0.7", default-features = false, features = ["std"] }

secp256k1 = { version = "0.27.0", default-features = false, features = [
"global-context",
"rand-std",
"recovery",
] }
# async
async-trait = "0.1.74"
futures = "0.3.29"
Expand Down
26 changes: 26 additions & 0 deletions crates/genesis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "alloy-genesis"
description = "Genesis types "

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

[dependencies]
alloy-primitives.workspace = true
alloy-rpc-types.workspace = true
secp256k1.workspace = true
alloy-signer.workspace = true

# serde
serde.workspace = true
k256.workspace = true

[dev-dependencies]
serde_json.workspace = true

13 changes: 13 additions & 0 deletions crates/genesis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# alloy-genesis

The genesis file in an Ethereum blockchain is a JSON-formatted file used to define the initial state of the blockchain at the time of its creation. alloy-genesis provides tools and structures to create, manipulate, and interpret these genesis files, ensuring seamless integration and configuration for Ethereum-compatible networks.

## Features

- `Genesis Block Configuration`- Facilitates the creation and definition of genesis blocks, including parameters such as nonce, timestamp, gas limits, and initial account states.
- `Custom Account Initialization`- Allows for the specification of custom accounts with predefined balances, nonces, and contract codes in the genesis block.
- `Network Compatibility`- Designed to work with Ethereum-like networks, ensuring compatibility with various Ethereum standards.

## Usage

This crate is primarily used internally within the Alloy project and is not intended for direct use. However, it can be utilized by blockchain developers or maintainers for setting up new Ethereum-like networks or for testing purposes.
Loading
Loading