Skip to main content

useMultiwrap() function

Warning: This API is now obsolete.

use useContract() instead

Hook for getting an instance of an Multiwrap contract. This contract is an ERC721 in which you can wrap ERC721, ERC1155 and ERC20 tokens.


import { useMultiwrap } from '@thirdweb-dev/react'

export default function Component() {
const multiwrap = useMultiwrap("<YOUR-CONTRACT-ADDRESS>")

// Now you can use the multiwrap contract in the rest of the component

// For example, this function will let the connected wallet wrap tokens
async function wrap(tokensToWrap, wrappedNFTMetadata) {
await multiwrap.wrap(tokensToWrap, wrappedNFTMetadata)



export declare function useMultiwrap(
contractAddress?: string,
): Multiwrap | undefined;


contractAddressstring(Optional) the address of the Multiwrap contract, found in your thirdweb dashboard


Multiwrap | undefined