BARKER
BARKER´s Hub
Compressed NTF-404 Overview
Compressed NFT-404 is a Solana-based program designed to implement the 404 dynamic NFT mechanism for Compressed NFTs (CNFTs). This program allows users to interact with cNFTs and tokens, including the newly integrated BARKER's Club Tiered tokens and member badge-based cNFTs, through various functionalities, including:
Initializing Pools: Set up pools that can hold cNFTs and tokens.
Depositing Tokens and cNFTs: Add tokens and cNFTs to the pools.
Swapping Tokens for cNFTs: Exchange tokens for cNFTs within the pool.
Swapping cNFTs for Tokens: Get tokens for your cNFTs.
Technical Overview
The Anchor program contains the following instructions:
init_pool
: Initializes the Pool Account for a given authority.deposit_cnft
: Deposits the initial cNFT liquidity in the pool.deposit_token
: Deposits the SPL token liquidity in the pool, including BARKER's Club Tiered tokens.swap_cnft_to_token
: Given a user deposits a CNFT in the pool, the pool gives the user tokens, including BARKER's Club Tiered tokens.swap_token_to_cnft
: Given a user deposits tokens in the pool, this instruction generates a random number and creates a coupon PDA to claim the cNFT.claim_cnft
: The user gets the cNFT via this instruction. It is part of the process forswap_token_to_cnft
.
Last updated