Private
_chainAirdrop multiple NFTs
Rest
...args: [tokenId: BigNumberish, addresses: string[] | { Airdrop one or multiple NFTs to the provided wallet addresses.
ERC1155
// The token ID of the NFT you want to airdrop
const tokenId = "0";
// Array of objects of addresses and quantities to airdrop NFTs to
const addresses = [
{
address: "0x...",
quantity: 2,
},
{
address: "0x...",
quantity: 3,
},
];
await contract.airdrop(tokenId, addresses);
// You can also pass an array of addresses, it will airdrop 1 NFT per address
const tokenId = "0";
const addresses = [
"0x...", "0x...", "0x...",
]
await contract.airdrop(tokenId, addresses);
Rest
...args: [tokenId: BigNumberish, addresses: string[] | { Protected
contractProtected
storageTransfer an NFT
Rest
...args: [to: string, tokenId: BigNumberish, amount: BigNumberish, data: BytesLike]Transfer an NFT from the connected wallet to another wallet.
// Address of the wallet you want to send the NFT to
const toAddress = "{{wallet_address}}";
const tokenId = "0"; // The token ID of the NFT you want to send
const amount = 3; // How many copies of the NFTs to transfer
await contract.transfer(toAddress, tokenId, amount);
Rest
...args: [to: string, tokenId: BigNumberish, amount: BigNumberish, data: BytesLike]Get NFT Balance
Get a wallets NFT balance (number of NFTs in this contract owned by the wallet).
// Address of the wallet to check NFT balance
const walletAddress = "{{wallet_address}}";
const tokenId = 0; // Id of the NFT to check
const balance = await contract.balanceOf(walletAddress, tokenId);
Generated using TypeDoc
Standard ERC1155 NFT functions
Remarks
Basic functionality for a ERC1155 contract that handles IPFS storage for you.
Example