#primitive #registry #type #standard #format #hash #superchain

no-std superchain-primitives

Primitive Types for the Superchain Registry

2 releases

new 0.1.1 Jun 26, 2024
0.1.0 Jun 21, 2024

#1590 in Magic Beans

Download history 274/week @ 2024-06-17 713/week @ 2024-06-24

987 downloads per month
Used in 5 crates (2 directly)

MIT license

58KB
957 lines

superchain-primitives

A set of Superchain Primitive Types.

Usage

Add this to your Cargo.toml:

[dependencies]
superchain-primitives = "0.1.0"

Example

use alloy_primitives::b256;
use superchain_primitives::BlockID;

let block_id = BlockID {
    hash: b256!("0000000000000000000000000000000000000000000000000000000000000000"),
    number: 0u64,
};
println!("Block ID: {block_id}");

Feature Flags

  • serde: Implements serialization and deserialization for types.
  • std: Uses standard library types.

Dependencies

~9.5MB
~184K SLoC