Rarible SDK Plugin
Search…
Mint
Element Action
You can find an example of Mint implementation on the mint demo page.
Mint Action
Supported tokens: ERC721, ERC1155
Supported Minting Type: Regular on blockchain, Lazy minting

Parameters Fields

Minting Type

Field type - Dropdown
  • Lazy (For Lazy minting, buyer pays the fee)
  • Regular (Creator mints token on blockchain and pays the fee)

Token Type

Field type - Dropdown
  • ERC721
  • ERC1155

Token Contract

Field type - Text
NFT Smart Contract address that will mint the token.
You can use the Rarible's default smart contracts (See about page)

Supports Lazy Minting

Filed type - Yes/No
The default smart contract supports it so set to Yes, but if you are using a custom smart contract, make sure that it supports it, and if not, set it to No.

URI

Field type - Text
IPFS hash to the token Metadata in JSON The JSON must look like this:
{
"name": /* NFT Name - This must be a string */,
"description": /* Description of the NFT - This must be a string */,
"image": /* IPFS Hash to our content, this must be prefixed with "ipfs://ipfs/{{ IPFS_HASH ))" - This must be a string */,
"external_url": /* This is the link to Rarible which we currently don't have, we can fill this in shortly */,
"animation_url": /* IPFS Hash just as image field, but it allows every type of multimedia files. Like mp3, mp4 etc */,
// the below section is optional.
"attributes": [
{
"key": /* Key name - This must be a string */,
"trait_type": /* Trait name - This must be a string */,
"value": /* Key Value - This must be a string */
}
]
}
Example of an IPFS hash: QmfJZmAftSmCmbbsH8PSiUVuwcGLrsgwoxDU2LHJmCJgg8 You can open it in browser: https://gateway.pinata.cloud/ipfs/QmfJZmAftSmCmbbsH8PSiUVuwcGLrsgwoxDU2LHJmCJgg8 You can use our plugin Pinata IPFS Manager to upload it directly in your Bubble app (Like we do in our Mint demo)

Creator Wallet

Field type - Text
Current user's connected wallet address that he will use to Mint token.

Supply

Field type - Number Integer
Amount of tokens to mint, default is 1 for ERC721 tokens, more than 1 can be only for ERC1155 tokens.

Royalties

Field - Wallet:Amount

Field type - List Text
Royalties settings are optional. Since the Bubble have a known issue/bug/feature, that any type of list can't contain same data more than once, so say a list of numbers 1,2,3 can't have a number that already exists 1,2,3,2 However when having a list of numbers (Royalties) it can contain repetitive numbers. This is our solution: Use a combination of wallet + royalty number, since wallet is unique. The syntax is: walletaddress:toyaly
Example:
0x9DF3B01aeE76D0eDcC48873667f6F05B4F94A288:0.01
Multiple:
0x9DF3B01aeE76D0eDcC48873667f6F05B4F94A288:0.2,0x6aEe7ebe278bBd044Ae837cA82E84b210620Cad1:0.05
See an example in Mint demo page. The workflow name is Button Add Royalty is clicked
Max royalties are 30%, don't forget to calculate your total royalties.
Say you have a list of 3 wallets with 10% royalty each, the sum will be 30%, therefore you can't add more wallets.

Events and States

After minting, the minted Token ID will be available in the state called Minted Token Id. The event Token Minted will be triggered when the minting process is done (Transaction was signed for Lazy Minting or the token was minted on blockchain for Regular minting)
The state Minted Token Id will contain data only after the event was triggered.
Example
In case the user will rejects signing (cancel the Minting process) the event Minting Rejected By User will be triggered. In case the user accepts minting but something went wrong (wrong parameters or transaction failed) the event Error while Minting will be triggered.