#eosio #crypto #dapp #blockchain #eos #name

eosio_macros

Macros for creating compile-time EOSIO names and symbols

4 releases (2 breaking)

0.3.1 Feb 17, 2020
0.3.0 Feb 4, 2020
0.2.0 Oct 27, 2018
0.1.0 Sep 29, 2018

#4 in #eos

Download history 4/week @ 2023-12-18 5/week @ 2024-01-08 6/week @ 2024-02-12 19/week @ 2024-02-19 25/week @ 2024-02-26 14/week @ 2024-03-04 24/week @ 2024-03-11 15/week @ 2024-03-18 8/week @ 2024-03-25 45/week @ 2024-04-01

95 downloads per month
Used in 4 crates (via eosio)

MIT/Apache

12KB
129 lines

Build Status

eosio_macros

Macros for creating compile-time EOSIO names and symbols.

Creating EOSIO names:

use eosio_macros::n;
assert_eq!(n!("test"), 14_605_613_396_213_628_928);
assert_eq!(n!("1234"), 614_248_767_926_829_056);
assert_eq!(n!("123451234512"), 614_251_535_012_020_768);
assert_eq!(n!("eosio.token"), 6_138_663_591_592_764_928);

Creating EOSIO symbols:

use eosio_macros::s;
assert_eq!(s!(4, "EOS"), 1162826500);

License: MIT OR Apache-2.0


lib.rs:

Macros for creating compile-time EOSIO names and symbols.

Creating EOSIO names:

use eosio_macros::n;
assert_eq!(n!("test"), 14_605_613_396_213_628_928);
assert_eq!(n!("1234"), 614_248_767_926_829_056);
assert_eq!(n!("123451234512"), 614_251_535_012_020_768);
assert_eq!(n!("eosio.token"), 6_138_663_591_592_764_928);

Creating EOSIO symbols:

use eosio_macros::s;
assert_eq!(s!(4, "EOS"), 1162826500);

Dependencies

~2MB
~41K SLoC