shadow_nft_standard/
lib.rs1use anchor_lang::prelude::*;
2
3pub mod common;
4pub mod error;
5pub mod instructions;
6
7use instructions::{
8 burn::*, create::*, create_collection::*, create_group::*, mint::*, update::*, withdraw::*,
9};
10
11declare_id!(shadow_nft_common::STANDARD_PROGRAM);
12
13#[program]
14pub mod shadow_nft_standard {
15
16 use super::*;
17
18 pub fn create_metadata_account(
20 ctx: Context<CreateMetadataAccount>,
21 args: CreateMetaArgs,
22 ) -> Result<()> {
23 handle_create_metadata(ctx, args)
24 }
25
26 pub fn mint_nft(ctx: Context<MintNFT>, cost_lamports: u64) -> Result<()> {
28 handle_mint(ctx, cost_lamports)
29 }
30
31 pub fn update_metadata(ctx: Context<UpdateMetadata>, args: UpdateMetaArgs) -> Result<()> {
33 handle_update(ctx, args)
34 }
35
36 pub fn burn(ctx: Context<Burn>) -> Result<()> {
38 handle_burn(ctx)
39 }
40
41 pub fn create_group(ctx: Context<CreateGroup>, args: CreateGroupArgs) -> Result<()> {
43 handle_create_group(ctx, args)
44 }
45
46 pub fn withdraw<'a>(ctx: Context<'_, '_, '_, 'a, Withdraw<'a>>) -> Result<()> {
48 handle_withdraw(ctx)
49 }
50
51 pub fn create_collection(
53 ctx: Context<CreateCollection>,
54 args: CreateCollectionArgs,
55 ) -> Result<()> {
56 handle_create_collection(ctx, args)
57 }
58}
59
60#[macro_export]
61macro_rules! verbose_msg {
62 ($msg:expr) => {
63 #[cfg(feature = "verbose")]
64 anchor_lang::solana_program::log::sol_log($msg)
65 };
66 ($($arg:tt)*) => {
67 #[cfg(feature = "verbose")]
68 (anchor_lang::solana_program::log::sol_log(&format!($($arg)*)))
69 };
70}