Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak processor methods visibility
Browse files Browse the repository at this point in the history
febo committed Sep 27, 2023
1 parent 8c9c185 commit 317386c
Showing 17 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/burn.rs
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ pub struct Burn<'info> {
pub system_program: Program<'info, System>,
}

pub fn burn<'info>(
pub(crate) fn burn<'info>(
ctx: Context<'_, '_, '_, 'info, Burn<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/cancel_redeem.rs
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ pub struct CancelRedeem<'info> {
pub system_program: Program<'info, System>,
}

pub fn cancel_redeem<'info>(
pub(crate) fn cancel_redeem<'info>(
ctx: Context<'_, '_, '_, 'info, CancelRedeem<'info>>,
root: [u8; 32],
) -> Result<()> {
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/compress.rs
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ pub struct Compress<'info> {
pub system_program: Program<'info, System>,
}

pub fn compress(_ctx: Context<Compress>) -> Result<()> {
pub(crate) fn compress(_ctx: Context<Compress>) -> Result<()> {
// TODO
Ok(())
}
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/create_tree.rs
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ pub struct CreateTree<'info> {
pub system_program: Program<'info, System>,
}

pub fn create_tree(
pub(crate) fn create_tree(
ctx: Context<CreateTree>,
max_depth: u32,
max_buffer_size: u32,
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/decompress.rs
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ pub struct DecompressV1<'info> {
pub log_wrapper: Program<'info, Noop>,
}

pub fn decompress_v1(ctx: Context<DecompressV1>, metadata: MetadataArgs) -> Result<()> {
pub(crate) fn decompress_v1(ctx: Context<DecompressV1>, metadata: MetadataArgs) -> Result<()> {
// Allocate and create mint
let incoming_data_hash = hash_metadata(&metadata)?;
match ctx.accounts.voucher.leaf_schema {
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/delegate.rs
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ pub struct Delegate<'info> {
pub system_program: Program<'info, System>,
}

pub fn delegate<'info>(
pub(crate) fn delegate<'info>(
ctx: Context<'_, '_, '_, 'info, Delegate<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ pub struct MintToCollectionV1<'info> {
pub system_program: Program<'info, System>,
}

pub fn mint_to_collection_v1(
pub(crate) fn mint_to_collection_v1(
ctx: Context<MintToCollectionV1>,
metadata_args: MetadataArgs,
) -> Result<()> {
74 changes: 37 additions & 37 deletions programs/bubblegum/program/src/processor/mod.rs
Original file line number Diff line number Diff line change
@@ -17,41 +17,41 @@ use crate::{
utils::{hash_creators, hash_metadata},
};

pub mod burn;
pub mod cancel_redeem;
pub mod compress;
pub mod create_tree;
pub mod decompress;
pub mod delegate;
pub mod mint;
pub mod mint_to_collection;
pub mod redeem;
pub mod set_and_verify_collection;
pub mod set_decompressable_state;
pub mod set_tree_delegate;
pub mod transfer;
pub mod unverify_collection;
pub mod unverify_creator;
pub mod verify_collection;
pub mod verify_creator;

pub use burn::*;
pub use cancel_redeem::*;
pub use compress::*;
pub use create_tree::*;
pub use decompress::*;
pub use delegate::*;
pub use mint::*;
pub use mint_to_collection::*;
pub use redeem::*;
pub use set_and_verify_collection::*;
pub use set_decompressable_state::*;
pub use set_tree_delegate::*;
pub use transfer::*;
pub use unverify_collection::*;
pub use unverify_creator::*;
pub use verify_collection::*;
pub use verify_creator::*;
mod burn;
mod cancel_redeem;
mod compress;
mod create_tree;
mod decompress;
mod delegate;
mod mint;
mod mint_to_collection;
mod redeem;
mod set_and_verify_collection;
mod set_decompressable_state;
mod set_tree_delegate;
mod transfer;
mod unverify_collection;
mod unverify_creator;
mod verify_collection;
mod verify_creator;

pub(crate) use burn::*;
pub(crate) use cancel_redeem::*;
pub(crate) use compress::*;
pub(crate) use create_tree::*;
pub(crate) use decompress::*;
pub(crate) use delegate::*;
pub(crate) use mint::*;
pub(crate) use mint_to_collection::*;
pub(crate) use redeem::*;
pub(crate) use set_and_verify_collection::*;
pub(crate) use set_decompressable_state::*;
pub(crate) use set_tree_delegate::*;
pub(crate) use transfer::*;
pub(crate) use unverify_collection::*;
pub(crate) use unverify_creator::*;
pub(crate) use verify_collection::*;
pub(crate) use verify_creator::*;

fn process_creator_verification<'info>(
ctx: Context<'_, '_, '_, 'info, verify_creator::CreatorVerification<'info>>,
@@ -155,7 +155,7 @@ fn process_creator_verification<'info>(
}

#[allow(deprecated)]
pub fn process_collection_verification_mpl_only<'info>(
fn process_collection_verification_mpl_only<'info>(
collection_metadata: &Account<'info, TokenMetadata>,
collection_mint: &AccountInfo<'info>,
collection_authority: &AccountInfo<'info>,
@@ -277,7 +277,7 @@ pub fn process_collection_verification_mpl_only<'info>(
Ok(())
}

pub fn process_collection_verification<'info>(
fn process_collection_verification<'info>(
ctx: Context<'_, '_, '_, 'info, verify_collection::CollectionVerification<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/redeem.rs
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ pub struct Redeem<'info> {
pub system_program: Program<'info, System>,
}

pub fn redeem<'info>(
pub(crate) fn redeem<'info>(
ctx: Context<'_, '_, '_, 'info, Redeem<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ use crate::{
processor::verify_collection::CollectionVerification, state::metaplex_adapter::MetadataArgs,
};

pub fn set_and_verify_collection<'info>(
pub(crate) fn set_and_verify_collection<'info>(
ctx: Context<'_, '_, '_, 'info, CollectionVerification<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ pub struct SetDecompressableState<'info> {
pub tree_creator: Signer<'info>,
}

pub fn set_decompressable_state(
pub(crate) fn set_decompressable_state(
ctx: Context<SetDecompressableState>,
decompressable_state: DecompressableState,
) -> Result<()> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ pub struct SetTreeDelegate<'info> {
pub system_program: Program<'info, System>,
}

pub fn set_tree_delegate(ctx: Context<SetTreeDelegate>) -> Result<()> {
pub(crate) fn set_tree_delegate(ctx: Context<SetTreeDelegate>) -> Result<()> {
ctx.accounts.tree_authority.tree_delegate = ctx.accounts.new_tree_delegate.key();
Ok(())
}
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/transfer.rs
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ pub struct Transfer<'info> {
pub system_program: Program<'info, System>,
}

pub fn transfer<'info>(
pub(crate) fn transfer<'info>(
ctx: Context<'_, '_, '_, 'info, Transfer<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ use crate::{
state::metaplex_adapter::MetadataArgs,
};

pub fn unverify_collection<'info>(
pub(crate) fn unverify_collection<'info>(
ctx: Context<'_, '_, '_, 'info, CollectionVerification<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ use crate::{
state::metaplex_adapter::MetadataArgs,
};

pub fn unverify_creator<'info>(
pub(crate) fn unverify_creator<'info>(
ctx: Context<'_, '_, '_, 'info, CreatorVerification<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ pub struct CollectionVerification<'info> {
pub system_program: Program<'info, System>,
}

pub fn verify_collection<'info>(
pub(crate) fn verify_collection<'info>(
ctx: Context<'_, '_, '_, 'info, CollectionVerification<'info>>,
root: [u8; 32],
data_hash: [u8; 32],
2 changes: 1 addition & 1 deletion programs/bubblegum/program/src/processor/verify_creator.rs
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ pub struct CreatorVerification<'info> {
pub system_program: Program<'info, System>,
}

pub fn verify_creator<'info>(
pub(crate) fn verify_creator<'info>(
ctx: Context<'_, '_, '_, 'info, CreatorVerification<'info>>,
root: [u8; 32],
data_hash: [u8; 32],

0 comments on commit 317386c

Please sign in to comment.