Skip to main content

Available hooks

Main hooks

HookDescription
useSDKAccess the instance of the thirdweb SDK created by the ThirdwebProvider.
useContractUse this resolve a contract address to a smart contract instance.
useContractWriteUse this to get data from a contract read-function call.
useContractReadUse this to get a function to make a write call to your contract.
useContractEventsUse this to get the contract metadata for a (built-in or custom) contract.
useContractMetadataUse this to get the contract metadata for a (built-in or custom) contract.

Wallet connection

HookDescription
useAddressHook for accessing the address of the connected wallet.
useConnectHook for connecting to a mobile wallet with Wallet Connect.
useDisconnectHook for disconnecting the currently connected wallet.

Network connection

HookDescription
useChainIdHook for accessing the chain ID of the network the current wallet is connected to
useNetworkHook for getting metadata about the network the current wallet is connected to and switching networks.
useNetworkMismatchHook for checking whether the connected wallet is on the correct network specified by the desiredChainId passed to the
.

NFT

HookDescription
useNFTUse this to get an individual NFT token of your NFTContract.
useNFTsUse this to get a list of NFT tokens of your NFTContract.
useTotalCirculatingSupplyUse this to get a the total (minted) supply of your NFTContract.
useOwnedNFTsUse this to get a the owned NFTs for a specific Erc721OrErc1155 and wallet address.
useNFTBalanceUse this to get a the total balance of a NFTContract and wallet address.
useTotalCountUse this to get the total count of NFT tokens of your NFTContract.
useMintNFTUse this to mint a new NFT on your Erc721OrErc1155.
useMintNFTSupplyUse this mint extra supply on your Erc1155.
useTransferNFTUse this to transfer tokens on your NFTContract.
useAirdropNFTUse this to airdrop tokens on your Erc1155.
useBurnNFTUse this to burn an NFT on your Erc721OrErc1155.

Token

HookDescription
useTokenSupplyUse this to get a the total supply of your contract.
useTokenBalanceUse this to get the balance of your contract for a given address.
useTokenDecimalsUse this to get the decimals of your contract for a given address.
useMintTokenUse this to mint new tokens on your contract.
useClaimTokenUse this to claim tokens from your contract.
useTransferTokenUse this to transfer tokens on your contract.
useTransferBatchTokenUse this to transfer batch tokens on your contract.
useBurnTokenUse this to burn tokens on your contract.

Marketplace

HookDescription
useListingUse this to get a specific listing from the marketplace.
useListingsUse this to get a list all listings from your marketplace contract.
useListingsCountUse this to get a count of all listings on your marketplace contract.
useActiveListingsUse this to get a list active listings from your marketplace contract.
useWinningBidUse this to get a the winning bid for an auction listing from your marketplace contract.
useAuctionWinnerUse this to get the winner of an auction listing from your marketplace contract.
useBidBufferUse this to get the buffer in basis points between offers from your marketplace contract.
useCreateDirectListingUse this to create a new Direct Listing on your marketplace contract.
useCreateAuctionListingUse this to create a new Auction Listing on your marketplace contract.
useCancelListingUse this to cancel a listing on your marketplace contract.
useMakeBidUse this to place a bid on an auction listing from your marketplace contract.
useBuyNowUse this to buy out an auction listing from your marketplace contract.

Permissions Controls

HookDescription
useAllRoleMembersUse this to get the roles of all members.
useRoleMembersUse this to get the members of a role.
useIsAddressRoleUse this to check if a WalletAddress is a member of a role.
useGrantRoleUse this to grant a WalletAddress a specific role.
useRevokeRoleUse this to revoke a WalletAddress a specific role.

Drop

HookDescription
useUnclaimedNFTsUse this to get a list of unclaimed NFT tokens of your ERC721 Drop contract.
useClaimedNFTsUse this to get a list of claimed (minted) NFT tokens of your ERC721 Drop contract..
useUnclaimedNFTSupplyUse this to get the total unclaimed NFT supply of your ERC721 Drop contract.
useClaimedNFTSupplyUse this to get the total claimed (minted) NFT supply of your ERC721 Drop contract.
useBatchesToRevealUse this to get a list of batches that are ready to be revealed.
useClaimNFTUse this to claim a NFT on your DropContract
useLazyMintUse this to lazy mint a batch of NFTs on your DropContract.
useDelayedRevealLazyMintUse this to lazy mint a batch of delayed reveal NFTs on your DropContract.
useRevealLazyMintUse this to reveal a batch of delayed reveal NFTs on your RevealableContract.

Claim Conditions

HookDescription
useActiveClaimConditionUse this to get the active claim condition for ERC20, ERC721 or ERC1155 based contracts.
useClaimConditionsUse this to get all claim conditions for ERC20, ERC721 or ERC1155 based contracts.
useClaimIneligibilityReasonsUse this to check for reasons that prevent claiming for either ERC20, ERC721 or ERC1155 based contracts.
useSetClaimConditionsUse this to set claim conditions on your DropContract.
useResetClaimConditionsUse this to reset claim conditions on your DropContract.