light_client/
transaction_params.rs

1#[derive(Debug, Clone, PartialEq)]
2pub struct TransactionParams {
3    pub num_input_compressed_accounts: u8,
4    pub num_output_compressed_accounts: u8,
5    pub num_new_addresses: u8,
6    pub compress: i64,
7    pub fee_config: FeeConfig,
8}
9
10#[derive(Debug, Clone, PartialEq)]
11pub struct FeeConfig {
12    pub state_merkle_tree_rollover: u64,
13    pub address_queue_rollover: u64,
14    // TODO: refactor to allow multiple state and address tree configs
15    // pub state_tree_configs: Vec<StateMerkleTreeConfig>,
16    // pub address_tree_configs: Vec<AddressMerkleTreeConfig>,
17    pub network_fee: u64,
18    pub address_network_fee: u64,
19    pub solana_network_fee: i64,
20}
21
22impl Default for FeeConfig {
23    fn default() -> Self {
24        Self {
25            // rollover fee plus additonal lamports for the cpi account
26            state_merkle_tree_rollover: 300,
27            address_queue_rollover: 392,
28            // TODO: refactor to allow multiple state and address tree configs
29            // state_tree_configs: vec![StateMerkleTreeConfig::default()],
30            // address_tree_configs: vec![AddressMerkleTreeConfig::default()],
31            network_fee: 5000,
32            address_network_fee: 5000,
33            solana_network_fee: 5000,
34        }
35    }
36}