-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24dfeb1
commit 33eae0f
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use anchor_lang::prelude::*; | ||
|
||
use crate::{assert_struct_align, assert_struct_size}; | ||
|
||
assert_struct_size!(FeeState, 256); | ||
assert_struct_align!(FeeState, 8); | ||
|
||
/// Unique per-program. The Program Owner uses this account to administrate fees collected by the protocol | ||
#[account(zero_copy)] | ||
#[repr(C)] | ||
pub struct FeeState { | ||
/// The fee state's own key. A PDA derived from just `b"feestate"` | ||
pub key: Pubkey, | ||
/// Can modify fees | ||
pub global_fee_admin: Pubkey, | ||
/// The base wallet for all protocol fees. All SOL fees go to this wallet. All non-SOL fees go | ||
/// to the cannonical ATA of this wallet for that asset. | ||
pub global_fee_wallet: Pubkey, | ||
// Reserved for future use, forces 8-byte alignment | ||
pub placeholder0: u64, | ||
/// Flat fee assessed when a new bank is initialized, in lamports. | ||
/// * In SOL, in native decimals. | ||
pub bank_init_flat_sol_fee: u32, | ||
pub bump_seed: u8, | ||
// Pad to next 8-byte multiple | ||
_padding0: [u8; 4], | ||
// Pad to 128 bytes | ||
_padding1: [u8; 15], | ||
// Reserved for future use | ||
_reserved0: [u8; 128], | ||
} | ||
|
||
impl FeeState { | ||
pub const LEN: usize = std::mem::size_of::<FeeState>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod fee_state; | ||
pub mod marginfi_account; | ||
pub mod marginfi_group; | ||
pub mod price; |