Skip to main content
The account management hooks in Compound React allow you to interact with user accounts and manage permissions in the Compound III protocol.

Summary of Account Management Hooks

  • useAllow: Allows or disallows another address to withdraw or transfer
  • useAllowBySig: Allows or disallows using EIP-712 signatures for gasless approvals
  • useUserNonce: Retrieves the current nonce for a user
  • useVersion: Retrieves the current version of the Comet contract
  • useHasPermission: Checks if an account has permission to act on behalf of another
  • useTransfer: Transfers base tokens from the sender to another account

useAllow

The useAllow hook allows or disallows another address to withdraw or transfer on behalf of the sender’s address.

Usage

Return Value

useAllowBySig

The useAllowBySig hook allows or disallows another address to withdraw or transfer on behalf of the sender’s address using EIP-712 signatures for gasless approvals.

Usage

Return Value

useUserNonce

The useUserNonce hook retrieves the current nonce for a user, which is used for signed transactions.

Usage

Return Value

useVersion

The useVersion hook retrieves the current version of the Comet contract.

Usage

Return Value

useHasPermission

The useHasPermission hook checks if an account has permission to act on behalf of another account.

Usage

Return Value

useTransfer

The useTransfer hook transfers base tokens from the sender to another account.

Usage

Return Value