light_merkle_tree_program/utils/
constants.rs

1// This file stores constants which do not have to be configured.
2use anchor_lang::constant;
3//instruction order
4#[constant]
5pub const IX_ORDER: [u8; 57] = [
6    34, 14, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1,
7    2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 241,
8];
9// Identitifiers for instructions
10pub const MERKLE_TREE_UPDATE_START: u8 = 14;
11pub const LOCK_START: u8 = 34;
12pub const HASH_0: u8 = 0;
13pub const HASH_1: u8 = 1;
14pub const HASH_2: u8 = 2;
15pub const ROOT_INSERT: u8 = 241;
16
17// Seeds
18#[constant]
19pub const AUTHORITY_SEED: &[u8] = b"AUTHORITY_SEED";
20#[constant]
21pub const MERKLE_TREE_AUTHORITY_SEED: &[u8] = b"MERKLE_TREE_AUTHORITY";
22#[constant]
23pub const TREE_ROOT_SEED: &[u8] = b"TREE_ROOT_SEED";
24#[constant]
25pub const STORAGE_SEED: &[u8] = b"storage";
26#[constant]
27pub const LEAVES_SEED: &[u8] = b"leaves";
28#[constant]
29pub const NULLIFIER_SEED: &[u8] = b"nf";
30#[constant]
31pub const POOL_TYPE_SEED: &[u8] = b"pooltype";
32#[constant]
33pub const POOL_CONFIG_SEED: &[u8] = b"pool-config";
34#[constant]
35pub const POOL_SEED: &[u8] = b"pool";
36#[constant]
37pub const TOKEN_AUTHORITY_SEED: &[u8] = b"spl";
38#[constant]
39pub const EVENT_MERKLE_TREE_SEED: &[u8] = b"event_merkle_tree";
40#[constant]
41pub const TRANSACTION_MERKLE_TREE_SEED: &[u8] = b"transaction_merkle_tree";