Minter permission on smart contract

Error

"NOT_MINTER" error when trying to lazy mint NFTs on your smart contract

Reasons

  • This error occurs because you are trying to mint NFTs from a wallet that doesn't hold the MINTER_ROLE on your smart contract.
  • If you set your admin wallet address as a "Trusted Forwarder" when deploying your smart contract, it can cause this error. The contract's authorization check ignores the wallet address and tries to determine the actual caller using the _msgSender() function. This will fail because the address is not a forwarder and does not have any other msgSender.

Solutions

  • If the wallet address you are using does not have the Minter/Creator role, you can easily view and modify the wallets holding the roles in your smart contracts. To do this, go to the "permissions" tab on your smart contract within the thirdweb dashboard.
    • Notion image
      💡
      Don’t forget to update the permissions settings by clicking on the “Update permissions” button, right below the form!
  • If the wallet address you are using has the correct permissions and you are using it as a "Trusted Forwarder," the only solution is to use a new wallet address. Then, add the new wallet address to your smart contract permissions as the new Minter/Creator and Admin. Otherwise, deploy a new contract.
 

That’s it! The error will be resolved now.


 

Can’t get this working? If you’ve followed the above and still have issues, contact our support team for help.

 
 
 
Did this answer your question?
😞
😐
🤩