getIsDelegationActive
Read whether the contract considers a delegation active.
import { getIsDelegationActive } from "@symmio/trading-core";
const isActive = await getIsDelegationActive(config, {
account: "0xaccount...",
delegate: "0xdelegate...",
selector: "0x501e891f",
});Parameters
accountAddressrequiredAccount that owns the delegation.
delegateAddressrequiredDelegated signer being checked.
selectorHexrequiredFunction selector (bytes4) being checked.
chainIdnumberoptionalOptional chain override.
Returns
booleantrue when the contract considers the delegation active.Query options
import { getIsDelegationActiveQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getIsDelegationActiveQueryOptions(config, { account, delegate, selector }));GetIsDelegationActiveOptions requires account, delegate, and selector; the factory does not accept missing inputs or validate them inside queryFn. The getIsDelegationActiveQueryKey builder still accepts partial inputs for cache matching and invalidation.
Last updated on