Function useIsAddressRole

  • Beta

    Check if an address is a member of a specific role

    Type Parameters

    • TContract extends ContractWithRoles

    Parameters

    • contract: RequiredParam<TContract>

      an instance of a SmartContract

    • role: RolesForContract<TContract>

      the role to check the member against, see Role

    • walletAddress: RequiredParam<string>

      the address to check

    Returns boolean

    true if the address is a member of the role, or false if not

    Example

    const { data: isMember, isLoading, error } = useIsAddressRole(contract, "admin", "{{wallet_address}}");
    

    Twfeature

    PermissionsEnumerable

    See

    Documentation

Generated using TypeDoc