ERC1155MarketplaceFacet
event ERC1155ListingAdd(uint256 listingId, address seller, address erc1155TokenAddress, uint256 erc1155TypeId, uint256 category, uint256 quantity, uint256 priceInWei, uint256 time)
event ERC1155ListingSplit(uint256 listingId, uint16[2] principalSplit, address affiliate)
event ERC1155ListingWhitelistSet(uint256 listingId, uint32 whitelistId)
event ERC1155ExecutedListing(uint256 listingId, address seller, address buyer, address erc1155TokenAddress, uint256 erc1155TypeId, uint256 category, uint256 _quantity, uint256 priceInWei, uint256 time)
event ERC1155ExecutedToRecipient(uint256 listingId, address buyer, address recipient)
Is sent in tandem with ERC1155ExecutedListing
event ERC1155ListingCancelled(uint256 listingId)
event ChangedListingFee(uint256 listingFeeInWei)
function setListingFee(uint256 _listingFeeInWei) external
Allow the aavegotchi diamond owner or DAO to set the default listing fee
Name | Type | Description |
---|---|---|
_listingFeeInWei | uint256 | The new listing fee in wei |
struct Category {
address erc1155TokenAddress;
uint256 erc1155TypeId;
uint256 category;
}
function setERC1155Categories(struct ERC1155MarketplaceFacet.Category[] _categories) external
Allow the aavegotchi diamond owner or DAO to set the category details for multiple ERC1155 NFTs
Name | Type | Description |
---|---|---|
_categories | struct ERC1155MarketplaceFacet.Category[] | An array of structs where each struct contains details about each ERC1155 item //erc1155TokenAddress,erc1155TypeId and category |
function getERC1155Category(address _erc1155TokenAddress, uint256 _erc1155TypeId) public view returns (uint256 category_)
Query the category details of a ERC1155 NFT
Name | Type | Description |
---|---|---|
_erc1155TokenAddress | address | Contract address of NFT to query |
_erc1155TypeId | uint256 | Identifier of the NFT to query |
Name | Type | Description |
---|---|---|
category_ | uint256 | Category of the NFT // 0 is wearable, 1 is badge, 2 is consumable, 3 is tickets |
function setERC1155Listing(address _erc1155TokenAddress, uint256 _erc1155TypeId, uint256 _quantity, uint256 _priceInWei) external
Allow an ERC1155 owner to list his NFTs for sale
If an NFT has been listed before,it cancels it and replaces it with the new one
Name | Type | Description |
---|---|---|
_erc1155TokenAddress | address | The contract address of the NFT to be listed |
_erc1155TypeId | uint256 | The identifier of the NFT to be listed |
_quantity | uint256 | The amount of NFTs to be listed |
_priceInWei | uint256 | The cost price of the NFT individually in $GHST |
function setERC1155ListingWithSplit(address _erc1155TokenAddress, uint256 _erc1155TypeId, uint256 _quantity, uint256 _priceInWei, uint16[2] _principalSplit, address _affiliate) external
function setERC1155ListingWithWhitelist(address _erc1155TokenAddress, uint256 _erc1155TypeId, uint256 _quantity, uint256 _priceInWei, uint16[2] _principalSplit, address _affiliate, uint32 _whitelistId) external
function cancelERC1155Listing(uint256 _listingId) external
Allow an ERC1155 owner to cancel his NFT listing through the listingID
Name | Type | Description |
---|---|---|
_listingId | uint256 | The identifier of the listing to be cancelled |
function executeERC1155Listing(uint256 _listingId, uint256 _quantity, uint256 _priceInWei) external
Allow a buyer to execcute an open listing i.e buy the NFT
Will throw if the NFT has been sold or if the listing has been cancelled already Will be deprecated soon.
Name | Type | Description |
---|---|---|
_listingId | uint256 | The identifier of the listing to execute |
_quantity | uint256 | The amount of ERC1155 NFTs execute/buy |
_priceInWei | uint256 | the cost price of the ERC1155 NFTs individually |
function executeERC1155ListingToRecipient(uint256 _listingId, address _contractAddress, uint256 _itemId, uint256 _quantity, uint256 _priceInWei, address _recipient) external
Allow a buyer to execcute an open listing i.e buy the NFT on behalf of the recipient. Also checks to ensure the item details match the listing.
Will throw if the NFT has been sold or if the listing has been cancelled already
Name | Type | Description |
---|---|---|
_listingId | uint256 | The identifier of the listing to execute |
_contractAddress | address | The token contract address |
_itemId | uint256 | the erc1155 token id |
_quantity | uint256 | The amount of ERC1155 NFTs execute/buy |
_priceInWei | uint256 | the cost price of the ERC1155 NFTs individually |
_recipient | address | the recipient of the item |
struct ExecuteERC1155ListingParams {
uint256 listingId;
address contractAddress;
uint256 itemId;
uint256 quantity;
uint256 priceInWei;
address recipient;
}
function batchExecuteERC1155Listing(struct ERC1155MarketplaceFacet.ExecuteERC1155ListingParams[] listings) external
execute ERC1155 listings in batch
function updateERC1155Listing(address _erc1155TokenAddress, uint256 _erc1155TypeId, address _owner) external
Update the ERC1155 listing of an address
Name | Type | Description |
---|---|---|
_erc1155TokenAddress | address | Contract address of the ERC1155 token |
_erc1155TypeId | uint256 | Identifier of the ERC1155 token |
_owner | address | Owner of the ERC1155 token |
function updateBatchERC1155Listing(address _erc1155TokenAddress, uint256[] _erc1155TypeIds, address _owner) external
Update the ERC1155 listings of an address
Name | Type | Description |
---|---|---|
_erc1155TokenAddress | address | Contract address of the ERC1155 token |
_erc1155TypeIds | uint256[] | An array containing the identifiers of the ERC1155 tokens to update |
_owner | address | Owner of the ERC1155 tokens |
function cancelERC1155Listings(uint256[] _listingIds) external
Allow an ERC1155 owner to cancel his NFT listings through the listingIDs
Name | Type | Description |
---|---|---|
_listingIds | uint256[] | An array containing the identifiers of the listings to be cancelled |
function updateERC1155ListingPriceAndQuantity(uint256 _listingId, uint256 _quantity, uint256 _priceInWei) external
Allow an ERC1155 owner to update list price of his NFT for sale
If the NFT has not been listed before, it will be rejected
Name | Type | Description |
---|---|---|
_listingId | uint256 | The identifier of the listing to execute |
_quantity | uint256 | The amount of ERC1155 NFTs execute/buy |
_priceInWei | uint256 | The price of the item |
function batchUpdateERC1155ListingPriceAndQuantity(uint256[] _listingIds, uint256[] _quantities, uint256[] _priceInWeis) external