'Error:Cannot Lazy mint the token’ on mainnet rarible plugin

When attempting to lazymint to mainet I keep getting prompted with 'Error:Cannot Lazy mint the token’

I followed the repo provided by Filip https://github.com/MoralisWeb3/youtube-tutorials/tree/main/nft-minter

My modification are as follows below:

let metadataHash = jsonFile.hash();
    let res = await Moralis.Plugins.rarible.lazyMint({
        chain: 'eth',
        userAddress: user.get('ethAddress'),
        tokenType: 'ERC721',
        tokenUri: 'ipfs://' + metadataHash,
        royaltiesAmount: document.querySelector('#royalties').value * 100, // 0.05% royalty. Optional
    // document.querySelector('#royalties').value*100
    document.querySelector('#success_message').innerHTML = 
        `NFT minted. <a href="https://rarible.com/token/${res.data.result.tokenAddress}:${res.data.result.tokenId}">View NFT`;
    document.querySelector('#success_message').style.display = "block";
    setTimeout(() => {
        document.querySelector('#success_message').style.display = "none";
    }, 10000)
1 Like

maybe it shouldn’t be chain: 'eth', there, but I don’t know if it would work with mainnet instead of eth either.

I’ll get back when I find more, in case that you don’t figure it out by that time.

When I try chain: 'mainet', or chain: '0x1', I get prompted with the error below

Uncaught (in promise) Error: Something went wrong
    "code": 400006,
    "message": "The parameter `chain` is not valid"

So I do think chain: 'eth' is the correct way to point to ethereum mainet but it’s returning error 400 ‘cannot lazy mint the token’


I am not an expert but I believe that the SDK does not yet allow lazy minting on the main net

…maybe I’m wrong

Hi, if you update the plugin to latest version still doesn’t work on mainnet?

Thanks cryptokid.
To make it work, in Rarible Plugin speedy node section i inserted the mainnet and rinkeby wss endpoints in place of the https.
In addition, to mint in mainnet, in the Moralis.Plugins.rarible.lazyMint ({…}) function the chain parameter must be set to “eth”.

let res = await Moralis.Plugins.rarible.lazyMint({
chain: “eth”,
userAddress: user.get(“ethAddress”),
tokenType: “ERC721”,
tokenUri: “ipfs://” + metadataHash,
royaltiesAmount: 5, // 0.05% royalty. Optional

Now the lazyMint works!
Only one thing. When I updated the endpoints in Rarible i noticed that the server cpu remained at 100%, so I did an update and restart.


1 Like