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 = await sdk.getContract("{{contract_address}}", "multiwrap");
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(network, address, storage, options, abi, chainId, contractWrapper) | (BETA) Constructs a new instance of the Multiwrap class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
abi | Abi | (BETA) | |
contractRoles | static | readonly ["admin", "transfer", "minter", "unwrap", "asset"] | (BETA) |
encoder | ContractEncoder<MultiwrapContract> | (BETA) | |
estimator | GasCostEstimator<MultiwrapContract> | (BETA) | |
events | ContractEvents<MultiwrapContract> | (BETA) | |
metadata | ContractMetadata<MultiwrapContract, typeof MultiwrapContractSchema> | (BETA) | |
owner | ContractOwner<MultiwrapContract> | (BETA) | |
roles | ContractRoles<MultiwrapContract, typeof Multiwrap.contractRoles[number]> | (BETA) | |
royalties | ContractRoyalty<MultiwrapContract, typeof MultiwrapContractSchema> | (BETA) Configure royalties |
Methods
Method | Modifiers | Description |
---|---|---|
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>