Skip to main content

jiminy_core/
programs.rs

1use pinocchio::Address;
2
3/// The system program — where lamports come from and where rent goes.
4///
5/// `11111111111111111111111111111111`
6pub const SYSTEM: Address = Address::new_from_array([0u8; 32]);
7
8/// SPL Token (original) program.
9///
10/// Handles mint/burn/transfer for standard tokens. If you're not sure
11/// which token program a given mint uses, check the mint account's owner.
12///
13/// `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`
14pub const TOKEN: Address = Address::new_from_array([
15    6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172,
16    28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169,
17]);
18
19/// SPL Token-2022 (Token Extensions) program.
20///
21/// The newer token program with optional extensions: transfer fees,
22/// confidential transfers, metadata, interest-bearing, and more.
23///
24/// `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`
25pub const TOKEN_2022: Address = Address::new_from_array([
26    6, 221, 246, 225, 238, 117, 143, 222, 24, 66, 93, 188, 228, 108, 205, 218,
27    182, 26, 252, 77, 131, 185, 13, 39, 254, 189, 249, 40, 216, 161, 139, 252,
28]);
29
30/// Associated Token Account (ATA) program.
31///
32/// Derives and creates the canonical token account for a wallet + mint pair.
33///
34/// `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJe1bTu`
35pub const ASSOCIATED_TOKEN: Address = Address::new_from_array([
36    140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131,
37    11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 238, 183, 148, 144,
38]);
39
40/// Metaplex Token Metadata program.
41///
42/// Manages on-chain NFT and fungible token metadata (name, symbol, URI,
43/// creators, royalties). Owner of the metadata account PDA.
44///
45/// `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s`
46pub const METADATA: Address = Address::new_from_array([
47    11, 112, 101, 177, 227, 209, 124, 69, 56, 157, 82, 127, 107, 4, 195, 205,
48    88, 184, 108, 115, 26, 160, 253, 181, 73, 182, 209, 188, 3, 248, 41, 70,
49]);
50
51/// BPF Loader Upgradeable.
52///
53/// All deployed programs are owned by this. Useful for verifying that
54/// an account passed as a `program` parameter actually is a program.
55///
56/// `BPFLoaderUpgradeab1e11111111111111111111111`
57pub const BPF_LOADER: Address = Address::new_from_array([
58    2, 168, 246, 145, 78, 136, 161, 176, 226, 16, 21, 62, 247, 99, 174, 43,
59    0, 194, 185, 61, 22, 193, 36, 210, 192, 83, 122, 16, 4, 128, 0, 0,
60]);
61
62/// Compute Budget program.
63///
64/// Used to set `ComputeUnitLimit` and `ComputeUnitPrice` via instructions
65/// prepended to a transaction. Not something you typically CPI into from
66/// an on-chain program, but useful for address checks.
67///
68/// `ComputeBudget111111111111111111111111111111`
69pub const COMPUTE_BUDGET: Address = Address::new_from_array([
70    3, 6, 70, 111, 229, 33, 23, 50, 255, 236, 173, 186, 114, 195, 155, 231,
71    188, 140, 229, 187, 197, 247, 18, 107, 44, 67, 155, 58, 64, 0, 0, 0,
72]);
73
74/// Sysvar: Clock (slot, epoch, unix_timestamp, leader_schedule_epoch).
75///
76/// `SysvarC1ock11111111111111111111111111111111`
77pub const SYSVAR_CLOCK: Address = Address::new_from_array([
78    6, 167, 213, 23, 24, 199, 116, 201, 40, 86, 99, 152, 105, 29, 94, 182,
79    139, 94, 184, 163, 155, 75, 109, 92, 115, 85, 91, 33, 0, 0, 0, 0,
80]);
81
82/// Sysvar: Rent (lamports_per_byte_year, exemption_threshold, burn_percent).
83///
84/// `SysvarRent111111111111111111111111111111111`
85pub const SYSVAR_RENT: Address = Address::new_from_array([
86    6, 167, 213, 23, 25, 44, 92, 81, 33, 140, 201, 76, 61, 74, 241, 127,
87    88, 218, 238, 8, 155, 161, 253, 68, 227, 219, 217, 138, 0, 0, 0, 0,
88]);
89
90/// Sysvar: Instructions (introspect other instructions in the same tx).
91///
92/// `Sysvar1nstructions1111111111111111111111111`
93pub const SYSVAR_INSTRUCTIONS: Address = Address::new_from_array([
94    6, 167, 213, 23, 24, 123, 209, 102, 53, 218, 212, 4, 85, 253, 194, 192,
95    193, 36, 198, 143, 33, 86, 117, 165, 219, 186, 203, 95, 8, 0, 0, 0,
96]);