Macro gstd::actor_id

actor_id!() { /* proc-macro */ }
Expand description

Macro to declare ActorId from hexadecimal and ss58 format.

ยงExample

use gstd::{actor_id, ActorId};

//polkadot address
let alice_1: ActorId = actor_id!("5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY");
//vara address
let alice_2: ActorId = actor_id!("kGkLEU3e3XXkJp2WK4eNpVmSab5xUNL9QtmLPh8QfCL2EgotW");
//hex address
let alice_3: ActorId =
    actor_id!("0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d");

assert_eq!(alice_1, alice_2);
assert_eq!(alice_2, alice_3);