The new Blenderizer allows you to create packs with highly variable content.
A pack is 1 NFT that when sent to Blenderizer, with the corresponding code, will be burned and activate the smart contract. This will deliver to the owner of the NFT the different assets contained in the pack, which can be NFTs and FTs.
You can create asset deliveries directly or randomly among several possible options.
NFTs can be combined with FTs and direct deliveries with random deliveries.
Preparations (View Blenderizer Clasic)
- Authorize blenderizer account
- Send WAX to blenderizer to buy RAM for the collection
- Write in the memo the name of the collection
- Send tokens to blenderizer to load FTs deposit to send (optional)
- Write in the memo the name of the collection
Create blender (packs)
Create packs
Action “addpack”.
- authorized_account: Account that signs the transaction. It must be authorized in the smart contract
- target_template: Template_id of the nft that will be the pack.
- target_collection: Name of the pack collection.
- unlock_time: timestamp for pack unbox campaign start.
- display_data: JSON with the pack description:
{
"name": "PACK_NAME",
"description": "DESCRIPTION (markdown)"
}
Adding NFTs data to be minted (Odds)
- Fixed and random can be added.
- Fixed: odd = -1 (one per slot)
- Random: odd = % probability as an integer (sum of all values must be 100 for the same slot)
- One call to action for each slot in the pack.
- As many slots can be combined as desired.
Action “addrollnft”.
- authorized_account: Account signing the transaction. Must be authorized in the smart contract
- target_collection: Name of the pack collection.
- pack_id: Identifier of the pack (created after the “addpack” action). See table “packs”.
- odds: JSON object with the content of each slot of the pack.
Example of direct NFT:
[
{ "odd":-1, "template_id": 9999999}
]
Example of NFT by odds (odd must sum to 100).
[
{ "odd": 20, "template_id": 5555555},
{ "odd": 30, "template_id": 6666666},
{ "odd": 50, "template_id": 7777777}
]
Query odds in table “oddnft”, scope: pack_id.
Add FTs data to be sent (Odds)
- Fixed and random can be added
- Same as NFTs
Action “addrollft“: Same as “addrollnft” except JSON
Example of direct FT:
[
{ “odd”:-1, “contract”: “tarukofficer”, “quantity”: ”10 SC”}
]
Example of NFT by probability (odd must sum to 100)
[
{“odd”: 20, “contract”: “tarukofficer”, “quantity”: “200 BLUPOT”},
{“odd”: 30, “contract”: “tarukofficer”, “quantity”: “150 REDPOT”},
{“odd”: 50, “contract”: “tarukofficer”, “quantity”: “100 YELPOT”}
]
- Query odds in table “oddasset“, scope: pack_id
Close packs
Close pack when all the elements of the pack have been inserted. No more slots can be added to the pack. From this moment on, the contract will be able to manage the opening of packs.
Action “closepack“
- authorized_account: Account signing the transaction. It must be authorized in the smart contract
- pack_id: ID of the pack to close
Other operations
- Delete pack: All your Odds will be deleted if you have them. Action: “delpack“
- Delete odds from NFTs. Action “delrollnft“
- Delete odds of FTs. Action “delrollft“
- Recover unused FTs. Action “withdrawft”
- Recover unused RAM. Action “withdrawram“
Important:
The contract will reject packs if any of these conditions are met:
- RAM of any of the specified collections has been exhausted.
- The stock of any of the specified tokens has been exhausted.
- The contract has been deauthorized in any of the specified collections.
- The pack record is still open for editing (must be closed).
Overwhelmed?
Don’t worry and try all these functions on testnet. Contact us on our Discord if you want to know more details.