Skip to main content

Multiwrap class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Multiwrap lets you wrap any number of ERC20, ERC721 and ERC1155 tokens you own into a single wrapped token bundle.

Example

import { ThirdwebSDK } from "@thirdweb-dev/sdk";

const sdk = new ThirdwebSDK("{{chainName}}");
const contract = sdk.getMultiwrap("{{contract_address}}");

Constructors

ConstructorModifiersDescription
(constructor)(network, address, storage, options, abi, contractWrapper)(BETA) Constructs a new instance of the Multiwrap class

Properties

PropertyModifiersTypeDescription
abitypeof ABI(BETA)
contractRolesstaticreadonly ["admin", "transfer", "minter", "unwrap", "asset"](BETA)
encoderContractEncoder<MultiwrapContract>(BETA)
estimatorGasCostEstimator<MultiwrapContract>(BETA)
eventsContractEvents<MultiwrapContract>(BETA)
metadataContractMetadata<MultiwrapContract, typeof MultiwrapContractSchema>(BETA)
rolesContractRoles<MultiwrapContract, typeof Multiwrap.contractRoles[number]>(BETA)
royaltiesContractRoyalty<MultiwrapContract, typeof MultiwrapContractSchema>(BETA) Configure royalties

Methods

MethodModifiersDescription
getWrappedContents(wrappedTokenId)(BETA) Get the contents of a wrapped token bundle
unwrap(wrappedTokenId, recipientAddress)(BETA) Unwrap a wrapped token bundle, and retrieve its contents
wrap(contents, wrappedTokenMetadata, recipientAddress)(BETA) Wrap any number of ERC20/ERC721/ERC1155 tokens into a single wrapped token

Signature:

export declare class Multiwrap extends StandardErc721<MultiwrapContract>

Extends: StandardErc721<MultiwrapContract>