-
Notifications
You must be signed in to change notification settings - Fork 80
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
Showing
7 changed files
with
23 additions
and
13 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 |
---|---|---|
@@ -1,9 +1,18 @@ | ||
use super::*; | ||
use solana_program::{rent::Rent, sysvar::Sysvar}; | ||
|
||
pub(crate) const FEE_AUTHORITY: Pubkey = pubkey!("Levytx9LLPzAtDJJD7q813Zsm8zg9e1pb53mGxTKpD7"); | ||
|
||
const CREATE_FEE_SCALAR: usize = 1308; | ||
const CREATE_FEE_OFFSET: u64 = 5440; | ||
// create_metadata_accounts_v3, create, print edition commands | ||
pub const CREATE_FEE: u64 = 10_000_000; | ||
pub fn get_create_fee() -> Result<u64, ProgramError> { | ||
let rent = Rent::get()?.minimum_balance(CREATE_FEE_SCALAR); | ||
|
||
Ok(rent | ||
.checked_add(CREATE_FEE_OFFSET) | ||
.ok_or(MetadataError::NumericalOverflowError)?) | ||
} | ||
|
||
pub const FEE_FLAG_SET: u8 = 1; | ||
pub const FEE_FLAG_CLEARED: u8 = 0; |
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
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
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