-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from metaplex-foundation/feat/tm-resize
Resizing TM accounts going forward
- Loading branch information
Showing
36 changed files
with
445 additions
and
170 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
[package] | ||
name = "token_metadata" | ||
version = "1.14.0" | ||
description = "Metaplex Metadata" | ||
authors = ["Metaplex Developers <[email protected]>"] | ||
repository = "https://github.com/metaplex-foundation/metaplex-program-library" | ||
license-file = "../../../LICENSE" | ||
description = "Metaplex Metadata" | ||
edition = "2021" | ||
license-file = "../../../LICENSE" | ||
name = "token_metadata" | ||
readme = "README.md" | ||
repository = "https://github.com/metaplex-foundation/mpl-token-metadata" | ||
version = "1.14.0" | ||
|
||
[features] | ||
no-entrypoint = [] | ||
test-bpf = [] | ||
padded = [] | ||
serde-feature = ["serde", "serde_with"] | ||
test-bpf = [] | ||
|
||
[dependencies] | ||
arrayref = "0.3.6" | ||
borsh = "0.9.3" | ||
mpl-token-auth-rules = { version = "=1.4.3-beta.1", features = [ | ||
"no-entrypoint", | ||
"no-entrypoint", | ||
] } | ||
mpl-token-metadata-context-derive = { version = "0.3.0", path = "../macro" } | ||
mpl-utils = { version = "0.3.4", features = ["spl-token"] } | ||
|
@@ -27,17 +28,17 @@ serde = { version = "1.0.149", optional = true } | |
serde_with = { version = "1.14.0", optional = true } | ||
shank = { version = "0.3.0" } | ||
solana-program = ">= 1.14.13, < 1.17" | ||
spl-token-2022 = "0.8.0" | ||
spl-associated-token-account = { version = ">= 1.1.3, < 3.0", features = [ | ||
"no-entrypoint", | ||
"no-entrypoint", | ||
] } | ||
spl-token-2022 = "0.8.0" | ||
thiserror = "1.0" | ||
|
||
[dev-dependencies] | ||
async-trait = "0.1.64" | ||
rmp-serde = "1.1.1" | ||
rooster = { git = "https://github.com/metaplex-foundation/rooster", features = [ | ||
"no-entrypoint", | ||
"no-entrypoint", | ||
] } | ||
serde = { version = "1.0.147", features = ["derive"] } | ||
solana-program-test = ">= 1.14.13, < 1.17" | ||
|
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
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
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; |
Oops, something went wrong.