ShopFacet
MintPortals
BuyPortals
PurchaseItemsWithGhst
PurchaseTransferItemsWithGhst
PurchaseItemsWithVouchers
buyPortals
Allow an address to purchase a portal
Only portals from haunt 1 can be purchased via the contract
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address to send the portal once purchased |
_ghst | uint256 | The amount of GHST the buyer is willing to pay //calculation will be done to know how much portal he recieves based on the haunt's portal price |
mintPortals
Allow an item manager to mint neew portals
Will throw if the max number of portals for the current haunt has been reached
Parameters
Name | Type | Description |
---|---|---|
_to | address | The destination of the minted portals |
_amount | uint256 | the amunt of portals to mint |
purchaseItemsWithGhst
Allow an address to purchase multiple items
Buying an item typically mints it, it will throw if an item has reached its maximum quantity
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address to send the items once purchased |
_itemIds | uint256[] | The identifiers of the items to be purchased |
_quantities | uint256[] | The quantities of each item to be bought |
purchaseTransferItemsWithGhst
Allow an address to purchase multiple items after they have been minted
Only one item per transaction can be purchased from the Diamond contract
Parameters
Name | Type | Description |
---|---|---|
_to | address | Address to send the items once purchased |
_itemIds | uint256[] | The identifiers of the items to be purchased |
_quantities | uint256[] | The quantities of each item to be bought |