Skip to main content

📦 Airdrop Master

This page documents the Airdrop Master PDA Account.

📘 Overview

The Airdrop Master account defines the global configuration for all airdrops created through that specific master. Each partner or creator can initialize their own AirdropMaster, allowing them to:

  • Set their own fee structure
  • Manage their own authority
  • Monetize their operations by receiving protocol fees generated through this master

This design allows Dropsy to support multiple independent ecosystems (projects, partners, NFT communities, DAOs, DeFi apps) while keeping the framework fully decentralized and modular.


🔐 PDA Derivation

The AirdropMaster PDA is derived using the following seeds:

  • airdrop_master → constant seed identifying the master namespace
  • authority → the wallet (or program) that owns & manages this specific master

Derive Airdrop Master Pda Example

import {
Address,
getAddressEncoder,
getProgramDerivedAddress,
ProgramDerivedAddressBump,
ReadonlyUint8Array,
} from "@solana/kit";

export type DropsyPda = readonly [Address<string>, ProgramDerivedAddressBump];
type Seed = ReadonlyUint8Array | string;

export async function getAirdropMasterDerivedAddress(
authority: Address,
): Promise<DropsyPda> {
const seeds = [
Buffer.from("airdrop_master"),
getAddressEncoder().encode(authority),
];
return await getProgramDerivedAddress({
seeds,
programAddress: DROPSY_PROGRAM_ADDRESS,
});
}

🧱 Account Structure

FieldTypeDescription
discriminatorReadonlyUint8ArrayAnchor account identifier (8 bytes).
creatorAddressWallet that originally created the AirdropMaster account.
authorityAddressMain authority allowed to configure and manage the AirdropMaster.
treasuryAddressTreasury wallet that receives protocol fees collected by the AirdropMaster.
createdAirdropsbigintTotal number of airdrops created through this AirdropMaster.
pointsbigintAccumulated points associated with the AirdropMaster activity.
totalClaimCountbigintTotal number of successful claims processed across all managed airdrops.
airdropUpdateFeebigintFee required to update an existing airdrop.
airdropCreationFeebigintFee required to create a new airdrop.
airdropClaimFeebigintFee charged when a user claims tokens from an airdrop.
airdropDelegateFeebigintFee required to delegate airdrop authority.
bitmapCreationFeebigintFee required to create a Bitmap account for claim tracking.
bumpnumberPDA bump used to derive the AirdropMaster account.
paddingReadonlyUint8ArrayReserved bytes used for account alignment and future upgrades.

📥 Fetch Airdrop Master Account

import { address } from "@solana/kit";
import { fetchAirdropMaster } from "@dropsy/sdk";

// The AirdropMaster PDA you want to fetch
const airdrop_master_address = address("12354.....abndks");

(async () => {
try {
const master = await fetchAirdropMaster(rpc, airdrop_master_address);

console.log("Airdrop Master Loaded:");
console.log("Authority:", master.authority.toString());
} catch (err) {
console.error("Failed to fetch AirdropMaster:", err);
}
})();