#literals #proc-macro #ethereum

macro address-literal

Procedural macro for converting Address(H160) literals to Address(H160) at compile time

8 stable releases

1.2.4 Oct 11, 2023
1.2.3 Jan 27, 2023
1.2.2 May 26, 2022
1.2.1 Apr 25, 2022
1.1.1 Jul 4, 2021

#126 in #literals

26 downloads per month

MIT/Apache

3KB

This crate simplifies the initialization of const variable by using addr!() macro. It expects a string literal. See following example:

use address_literal::addr;

const BOT: H160 = addr!("0x0000000279be4c78d026d348651e26f3fcc8cf90");

Dependencies

~1.5MB
~38K SLoC