diff --git a/Cargo.lock b/Cargo.lock index afa121d6..65a9fe32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2020,18 +2020,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "mpl_gumdrop" -version = "0.1.0" -dependencies = [ - "anchor-lang", - "anchor-spl", - "mpl-token-metadata", - "solana-program", - "spl-associated-token-account", - "spl-token 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "native-tls" version = "0.2.10" diff --git a/Cargo.toml b/Cargo.toml index 072cd323..70660dcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,13 +3,6 @@ members = [ "plerkle", "nft_api", "nft_ingester", -<<<<<<< HEAD -======= - "programs/bubblegum", - "programs/gumdrop", - "programs/gummyroll", - "programs/gummyroll_crud", ->>>>>>> c8404ec (add gumdrop for batchminting) "messenger" ] exclude = [ diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index 560b90ab..ae1b63fc 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -1004,6 +1004,18 @@ dependencies = [ "thiserror", ] +[[package]] +name = "mpl_gumdrop" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "anchor-spl", + "mpl-token-metadata", + "solana-program", + "spl-associated-token-account", + "spl-token 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-derive" version = "0.3.3" diff --git a/contracts/Cargo.toml b/contracts/Cargo.toml index 372d38b1..9e0720cb 100644 --- a/contracts/Cargo.toml +++ b/contracts/Cargo.toml @@ -2,5 +2,6 @@ members = [ "programs/gummyroll", "programs/gummyroll_crud", - "programs/bubblegum" + "programs/bubblegum", + "programs/gumdrop" ] diff --git a/contracts/programs/bubblegum/src/lib.rs b/contracts/programs/bubblegum/src/lib.rs index 8e9d40c7..0e318d87 100644 --- a/contracts/programs/bubblegum/src/lib.rs +++ b/contracts/programs/bubblegum/src/lib.rs @@ -359,6 +359,7 @@ pub mod bubblegum { ); emit!(leaf.to_event()); nonce.count = nonce.count.saturating_add(1); + msg!("yeehaw"); append_leaf( &merkle_slab.key(), *ctx.bumps.get("authority").unwrap(), diff --git a/contracts/programs/gumdrop/Cargo.toml b/contracts/programs/gumdrop/Cargo.toml index 6c7adfb2..1fa1c0b2 100644 --- a/contracts/programs/gumdrop/Cargo.toml +++ b/contracts/programs/gumdrop/Cargo.toml @@ -21,8 +21,8 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = { path="../../deps/anchor/lang" } -anchor-spl = { path="../../deps/anchor/spl" } +anchor-lang = { path="../../../deps/anchor/lang" } +anchor-spl = { path="../../../deps/anchor/spl" } solana-program = "1.10.10" spl-token = "3.3.0" spl-associated-token-account = { version = "=1.0.5", features = [ "no-entrypoint" ] } diff --git a/contracts/programs/gumdrop/src/lib.rs b/contracts/programs/gumdrop/src/lib.rs index ab970bc7..2713e8ec 100644 --- a/contracts/programs/gumdrop/src/lib.rs +++ b/contracts/programs/gumdrop/src/lib.rs @@ -707,7 +707,10 @@ pub mod gumdrop { ); // This user is whitelisted to mint at most `amount` NFTs from the candy machine - require!(claim_count.count < (amount as u64), GumdropError::DropAlreadyClaimed); + require!( + claim_count.count < (amount as u64), + GumdropError::DropAlreadyClaimed + ); // Mark it claimed claim_count.count = claim_count @@ -723,6 +726,7 @@ pub mod gumdrop { &ctx.accounts.bubblegum_tree_authority, &ctx.accounts.bubblegum_program, &ctx.accounts.gummyroll_program, + 0, nft_metadata, )?; @@ -852,7 +856,7 @@ fn create_new_compressed_tree<'info>( // merkle slab merkle_slab.clone(), ]; - + msg!("Invoking cpi to bubblegum"); invoke_signed( &Instruction { @@ -878,6 +882,7 @@ fn issue_compressed_nft<'info>( merkle_tree_auth: &AccountInfo<'info>, bubblegum_program: &AccountInfo<'info>, gummyroll_program: &AccountInfo<'info>, + version: u8, metadata_data: Vec, ) -> Result<()> { verify_bubblegum(&bubblegum_program.key())?; @@ -888,6 +893,7 @@ fn issue_compressed_nft<'info>( // Prepend mint discriminant to metadata // TODO(ngundotra): global::mint_compressed_nft ix let mut ix_data = vec![51, 57, 225, 47, 182, 146, 137, 166]; + ix_data.push(version); ix_data.extend(metadata_data.iter()); let distributor_seeds = [ @@ -1812,4 +1818,4 @@ pub struct CandyMachineData { pub price: u64, pub items_available: u64, pub go_live_date: Option, -} \ No newline at end of file +}