useAirdropConfig
Read an airdrop instance's immutable configuration in one round trip.
@tokenops/sdk/fhe-airdrop/react{ data, isLoading, error, refetch }Description
Read an airdrop instance's immutable configuration in one round trip.
Bundles token / airdropType / unwrappable / complianceManager / gasFee /
canExtendClaimWindow / deploymentBlockNumber -
what a UI needs before it can render anything else about a campaign, and how
airdropType and unwrappable get covered without shipping two more one-line hooks
nobody would call separately. variant is derived from the ordinal so a consumer can
branch to the ECDSA or Merkle hook set without decoding the enum itself.
Defaults to staleTime: Infinity - none of these values is mutable after create. Pass
query: { staleTime: 0 } to override.
The existing useAirdropToken, useAirdropGasFee and
useComplianceManager overlap this bundle and stay: they are one eth_call
rather than seven, which is cheaper for a UI that needs exactly one value.
Signature
function useAirdropConfig(args: UseAirdropConfigArgs): UseQueryResult<AirdropConfig, Error>;Example
const { data: config } = useAirdropConfig({ address: airdropAddress });
if (config?.variant === "merkle") { ... }Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.
See also
Other Read hooks in airdrop v2:
useAirdropTokenRead the ERC-7984 token an airdrop instance distributes.useAirdropWindowRead an airdrop instance's claim-window snapshot in one round trip.useAirdropGasFeeRead the per-claim ETH fee (wei) an instance charges; 0n on a fee-free campaign.useMerkleRootRead a MerkleConfidentialAirdrop instance's currently published root.