Lazyminting ERC1155 Requires GAS!? rarible plugin

Hi I put a Moralis.Plugins.Rarible.LazyMint in a forloop of 4… asks for GAS fees? Does lazy min work for ERC1155? - 721 worked fine

for (let i = 0; i < fileCount; i++) {
let data = input.files[i];
console.log("file " + i + " --> "+ data.name);
const imageFile = new Moralis.File(data.name, data)
await imageFile.saveIPFS();
let imageHash = imageFile.hash();
let metadata = {
name: document.querySelector(’#input_name’).value,
description: document.querySelector(’#input_description’).value,
image: “/ipfs/” + imageHash
}

  console.log(metadata);

  const jsonFile = new Moralis.File("metadata.json", {base64 : btoa(JSON.stringify(metadata))});
  await jsonFile.saveIPFS();
  let metadataHash = jsonFile.hash();
  console.log(jsonFile.ipfs());
  console.log('usr addr' + user.get('ethAddress'));
      let res = await Moralis.Plugins.rarible.lazyMint({
        chain: 'rinkeby',//mainnet
        userAddress: user.get('ethAddress'),
        tokenType:  'ERC1155',
        supply: fileCount,
        tokenUri: 'ipfs://' + metadataHash,
        royaltiesAmount: 5, // 0.05% royalty. Optional
        list: true ,// Only if lazy listing
        listTokenAmount: fileCount,// Only if lazy listing
        listTokenValue: 10 **17, // Only if lazy listing 10 ** 18 = 1 ETH
        listAssetClass:'ETH', // only if lazy listing  || optional
      })

}

Remove these lines
list: true ,// Only if lazy listing
listTokenAmount: fileCount,// Only if lazy listing
listTokenValue: 10 **17, // Only if lazy listing 10 ** 18 = 1 ETH
listAssetClass:‘ETH’, // only if lazy listing || optional

1 Like