Skip to main content

useMultiwrap() function

Warning: This API is now obsolete.

This hook is deprecated and will be removed in a future major version. You should use instead.

- const multiwrap = useMultiwrap("0x1234...");
+ const multiwrap = useContract("0x1234...", "multiwrap").contract;

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 { useContract } from '@thirdweb-dev/react'

export default function Component() {
const { contract } = useContract("<YOUR-CONTRACT-ADDRESS>", "multiwrap")

// 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 contract.wrap(tokensToWrap, wrappedNFTMetadata)



export declare function useMultiwrap(
contractAddress: RequiredParam<string>,
): import("@thirdweb-dev/sdk").Multiwrap | undefined;


contractAddressRequiredParam<string>the address of the Multiwrap contract, found in your thirdweb dashboard


import("@thirdweb-dev/sdk").Multiwrap | undefined