2.0 RC docsView 1.x docs
v2.0.0-rc.1 release candidate
The API is frozen and later candidates carry fixes only, except the receipt-free and Safe create surface of /fhe-airdrop, which is @beta. Published on the next dist-tag; latest stays on 1.6.0 until 2.0.0.
ReaduseQuery

useResolveGasFee

The per-claim fee a create* from creator would freeze into the new instance right now: their setCustomFee override when enabled, else the factory default.

Import
@tokenops/sdk/fhe-airdrop/react
Return
{ data, isLoading, error, refetch }
Lifecycle
Read

Description

The per-claim fee a create* from creator would freeze into the new instance right now: their setCustomFee override when enabled, else the factory default.

This is the number `common.maxAcceptedGasFee` is checked against, so it is what a create form should show before the creator picks a bound. Composing it from useFactoryFees and useFactoryCustomFee by hand means re-implementing the override-over-default rule in every consumer, and getting it wrong reads as "no fee" on exactly the accounts that have one.

A snapshot, not a quote. FEE_MANAGER_ROLE can move it between this read and the create landing, which is the case maxAcceptedGasFee exists to catch - so treat this as what to *show*, never as a reason to skip the bound.

Signature

@tokenops/sdk/fhe-airdrop/react
ts
function useResolveGasFee(args?: UseResolveGasFeeArgs): UseQueryResult<bigint, Error>;

Parameters

Shape of the options object passed to the hook itself.

PropertyTypeDescription
creatorAddressThe account that will send create*. Fee overrides are per-creator.
Want to run a similar shape interactively? The Playground ships 12 ready presets across vesting / airdrop / disperse / faucet — deploy a manager, create a vesting, claim, and run the product equivalents. The deep-link above auto-selects the closest preset to useResolveGasFee; pick another from the dropdown if you'd rather start there.

Example

@tokenops/sdk/fhe-airdrop/react · @example
tsx
const { data: fee } = useResolveGasFee({ creator: address });
// then: params.common.maxAcceptedGasFee = fee ?? 0n

Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.

See also

Other Read hooks in airdrop v2: