Links

ShopFacet

MintPortals

event MintPortals(address _from, address _to, uint256 _tokenId, uint256 _numAavegotchisToPurchase, uint256 _hauntId)

BuyPortals

event BuyPortals(address _from, address _to, uint256 _tokenId, uint256 _numAavegotchisToPurchase, uint256 _totalPrice)

PurchaseItemsWithGhst

event PurchaseItemsWithGhst(address _buyer, address _to, uint256[] _itemIds, uint256[] _quantities, uint256 _totalPrice)

PurchaseTransferItemsWithGhst

event PurchaseTransferItemsWithGhst(address _buyer, address _to, uint256[] _itemIds, uint256[] _quantities, uint256 _totalPrice)

PurchaseItemsWithVouchers

event PurchaseItemsWithVouchers(address _buyer, address _to, uint256[] _itemIds, uint256[] _quantities)

buyPortals

function buyPortals(address _to, uint256 _ghst) external
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

function mintPortals(address _to, uint256 _amount) external
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

function purchaseItemsWithGhst(address _to, uint256[] _itemIds, uint256[] _quantities) external
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

function purchaseTransferItemsWithGhst(address _to, uint256[] _itemIds, uint256[] _quantities) external
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