
Gold Digger Factory Program
Core protocol that powers the Gold Digger ecosystem on Solana
Program Architecture
The central smart contract that coordinates all platform activities
GLDDPmVau3LYh59DbrCejTpcQnEpb3PpfR1VgjaQN4xY
TBA
The Gold Digger Factory Program is the central smart contract that coordinates all platform activities, from NFT minting and staking to fee collection and token transfers. The diagram below illustrates the program's architecture and its interactions with other components.




The Factory Program serves as the hub for all on-chain operations, connecting with Metaplex for NFT metadata management and implementing various features through specialized instruction handlers.
Program Structure (Anchor Framework)
programs/gold_digger_factory/ ├── src/ │ ├── lib.rs │ ├── instructions/ │ │ ├── initialize_factory.rs │ │ ├── launch_collection.rs │ │ ├── mint_nft.rs │ │ ├── initialize_staking_pool.rs │ │ ├── send_nft.rs │ │ ├── receive_nft.rs │ │ ├── send_spl.rs │ │ ├── collect_fees.rs │ └── state/ │ ├── factory.rs │ ├── collection.rs │ ├── staking_pool.rs │ └── vault.rs
The program follows a modular structure using the Anchor framework, with separate files for each instruction and state definition. This organization improves maintainability and makes the codebase easier to understand and audit.
Anchor Declaration Snippet (lib.rs)
pub mod instructions; pub mod state; use anchor_lang::prelude::*; use instructions::*; declare_id!("GLDDPmVau3LYh59DbrCejTpcQnEpb3PpfR1VgjaQN4xY"); #[program] pub mod gold_digger_factory { use super::*; pub fn initialize_factory(ctx: Context<InitializeFactory>, admin: Pubkey) -> Result<()> { instructions::initialize_factory::handler(ctx, admin) } pub fn launch_collection(ctx: Context<LaunchCollection>, args: LaunchCollectionArgs) -> Result<()> { instructions::launch_collection::handler(ctx, args) } pub fn mint_nft(ctx: Context<MintNFT>, metadata_uri: String) -> Result<()> { instructions::mint_nft::handler(ctx, metadata_uri) } pub fn initialize_staking_pool(ctx: Context<InitializeStakingPool>, config: PoolConfig) -> Result<()> { instructions::initialize_staking_pool::handler(ctx, config) } pub fn send_nft(ctx: Context<SendNFT>) -> Result<()> { instructions::send_nft::handler(ctx) } pub fn send_spl(ctx: Context<SendSPL>, amount: u64) -> Result<()> { instructions::send_spl::handler(ctx, amount) } pub fn collect_fees(ctx: Context<CollectFees>) -> Result<()> { instructions::collect_fees::handler(ctx) } }
Benefits
Scalability
The platform is designed to support the minting of many NFTs, multiple collections, and large numbers of staking users simultaneously.
Flexibility
Users can create, manage, and interact with NFTs from different collections and perform complex staking actions.
Security
A multi-layered security approach protects user assets, minimizes the risk of unauthorized access, and ensures data integrity.
Revenue Generation
The fee collection mechanism ensures the platform generates continuous revenue, which can be reinvested into the ecosystem.