ERC1155MarketplaceFacet

ERC1155ListingAdd

event ERC1155ListingAdd(uint256 listingId, address seller, address erc1155TokenAddress, uint256 erc1155TypeId, uint256 category, uint256 quantity, uint256 priceInWei, uint256 time)

ERC1155ListingSplit

event ERC1155ListingSplit(uint256 listingId, uint16[2] principalSplit, address affiliate)

ERC1155ListingWhitelistSet

event ERC1155ListingWhitelistSet(uint256 listingId, uint32 whitelistId)

ERC1155ExecutedListing

event ERC1155ExecutedListing(uint256 listingId, address seller, address buyer, address erc1155TokenAddress, uint256 erc1155TypeId, uint256 category, uint256 _quantity, uint256 priceInWei, uint256 time)

ERC1155ExecutedToRecipient

event ERC1155ExecutedToRecipient(uint256 listingId, address buyer, address recipient)

Is sent in tandem with ERC1155ExecutedListing

ERC1155ListingCancelled

event ERC1155ListingCancelled(uint256 listingId)

ChangedListingFee

event ChangedListingFee(uint256 listingFeeInWei)

setListingFee

function setListingFee(uint256 _listingFeeInWei) external

Allow the aavegotchi diamond owner or DAO to set the default listing fee

Parameters

Category

struct Category {
  address erc1155TokenAddress;
  uint256 erc1155TypeId;
  uint256 category;
}

setERC1155Categories

function setERC1155Categories(struct ERC1155MarketplaceFacet.Category[] _categories) external

Allow the aavegotchi diamond owner or DAO to set the category details for multiple ERC1155 NFTs

Parameters

getERC1155Category

function getERC1155Category(address _erc1155TokenAddress, uint256 _erc1155TypeId) public view returns (uint256 category_)

Query the category details of a ERC1155 NFT

Parameters

Return Values

setERC1155Listing

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

Parameters

setERC1155ListingWithSplit

function setERC1155ListingWithSplit(address _erc1155TokenAddress, uint256 _erc1155TypeId, uint256 _quantity, uint256 _priceInWei, uint16[2] _principalSplit, address _affiliate) external

setERC1155ListingWithWhitelist

function setERC1155ListingWithWhitelist(address _erc1155TokenAddress, uint256 _erc1155TypeId, uint256 _quantity, uint256 _priceInWei, uint16[2] _principalSplit, address _affiliate, uint32 _whitelistId) external

cancelERC1155Listing

function cancelERC1155Listing(uint256 _listingId) external

Allow an ERC1155 owner to cancel his NFT listing through the listingID

Parameters

executeERC1155Listing

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.

Parameters

executeERC1155ListingToRecipient

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

Parameters

ExecuteERC1155ListingParams

struct ExecuteERC1155ListingParams {
  uint256 listingId;
  address contractAddress;
  uint256 itemId;
  uint256 quantity;
  uint256 priceInWei;
  address recipient;
}

batchExecuteERC1155Listing

function batchExecuteERC1155Listing(struct ERC1155MarketplaceFacet.ExecuteERC1155ListingParams[] listings) external

execute ERC1155 listings in batch

updateERC1155Listing

function updateERC1155Listing(address _erc1155TokenAddress, uint256 _erc1155TypeId, address _owner) external

Update the ERC1155 listing of an address

Parameters

updateBatchERC1155Listing

function updateBatchERC1155Listing(address _erc1155TokenAddress, uint256[] _erc1155TypeIds, address _owner) external

Update the ERC1155 listings of an address

Parameters

cancelERC1155Listings

function cancelERC1155Listings(uint256[] _listingIds) external

Allow an ERC1155 owner to cancel his NFT listings through the listingIDs

Parameters

updateERC1155ListingPriceAndQuantity

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

Parameters

batchUpdateERC1155ListingPriceAndQuantity

function batchUpdateERC1155ListingPriceAndQuantity(uint256[] _listingIds, uint256[] _quantities, uint256[] _priceInWeis) external