Skip to content
/ ethp Public

Rust macros for evaluating common Ethereum and blockchain related functions at compile time.

License

Notifications You must be signed in to change notification settings

bsh98/ethp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"));

About

Rust macros for evaluating common Ethereum and blockchain related functions at compile time.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages