ethp

Crates.ioethp
lib.rsethp
version0.1.0
sourcesrc
created_at2024-03-05 21:41:01.506857
updated_at2024-03-05 21:41:01.506857
descriptionMacros for evaluating common Ethereum and blockchain functions at compile time.
homepage
repositoryhttps://github.com/bsh98/ethp
max_upload_size
id1164072
size7,057
(bsh98)

documentation

README

ethp

A collection of Rust procedural macros for evaluating common Ethereum and blockchain related functions at compile time.

Example

use hex_literal::hex;
use ethp::{keccak256, selector};

assert_eq!(
    keccak256!("Transfer(address,address,uint256)"),
    hex!("ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"),
);
assert_eq!(selector!("transfer(address,uint256)"), hex!("a9059cbb"));
Commit count: 0

cargo fmt