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.
@tokenops/sdk/fhe-airdrop/react{ data, isLoading, error, refetch }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
function useResolveGasFee(args?: UseResolveGasFeeArgs): UseQueryResult<bigint, Error>;Parameters
Shape of the options object passed to the hook itself.
| Property | Type | Description |
|---|---|---|
| creator | Address | The account that will send create*. Fee overrides are per-creator. |
Example
const { data: fee } = useResolveGasFee({ creator: address });
// then: params.common.maxAcceptedGasFee = fee ?? 0nPulled 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.