Macro pubkey

Source
macro_rules! pubkey {
    ($input:literal) => { ... };
}
Expand description

Convenience macro to define a static Address value.

Input: a single literal base58 string representation of an Address.

ยงExample

use std::str::FromStr;
use solana_address::{address, Address};

static ID: Address = address!("My11111111111111111111111111111111111111111");

let my_id = Address::from_str("My11111111111111111111111111111111111111111").unwrap();
assert_eq!(ID, my_id);