🏆 FXHash collectors
💡 Enter a fxhash project name ID to show its collectors
Marketplace stats
${statsHTML}
`;
output.innerHTML += `${statsHTML}
`;
if(project.chain !== "TEZOS") marketPlaceHTMl += `
`; // .marketplace-wrapper
objktsOnFxMarketPlace.sort((a,b) => a.active_listings.price - b.active_listings.price);
marketPlaceHTMl += `Floor sweeping not supported for ${project.chain.toLowerCase()}.
`;
else marketPlaceHTMl += `
See what others are sweeping 👀`;
marketplaceObjkts.forEach(item => item.objkts.sort((a,b) => {
if (a.active_listings && b.active_listings) return a.active_listings.price - b.active_listings.price;
else return 0;
}));
marketPlaceHTMl += `` + marketplaceObjkts.map((marketplace,idx) => `
`
marketPlaceHTMl += `
🏪
`).join('') + `${getOwner(marketplace)} (${marketplace.total})
${marketplace.objkts.map(objkt => ` `).join("")}${project.name} — fxhash marketplace
` marketPlaceHTMl += ``
+ objktsOnFxMarketPlace.map(objkt => `
owned by ${getOwner(objkt.owner)}
Price: ${tez(objkt.active_listings.price)}`).join('') + `
`;
} else {
marketPlaceHTMl = `%7D)
#${objkt.name.split('#').pop()}
owned by ${getOwner(objkt.owner)}Price: ${tez(objkt.active_listings.price)}`).join('') + `
Nothing to see here
😅️ It kinda looks like this project is sold out? Maybe try again tomorrow.
`; } output.innerHTML += ``; owners.innerHTML += `
wallet,totalwallet,token id,amount`; artworks.innerHTML = `` + artworks.innerHTML; /* let footerNav = `
`; output.innerHTML += footerNav; */ requestAnimationFrame(() => { let locationHash = location.hash.substr(1); console.log(locationHash); let hashOptions = ['page=ranking','page=artworks','page=owners','page=marketplace']; let hashOption = hashOptions.includes(locationHash) ? locationHash : hashOptions[0]; let firstPage = hashOption.replace("page=",''); show(firstPage, [...document.querySelectorAll('nav button')][hashOptions.indexOf(hashOption)]); }); } function updateMarketplace() { let selectedIds = [...document.querySelectorAll(".marketplace-item input[type=checkbox]:checked")].map(checkbox => (checkbox.dataset.id)); let selectedObjkts = project.objkts.filter(objkt => selectedIds.includes(objkt.id)); let listings = selectedObjkts.map(objkt => ({...objkt, objktId:objkt.id, ...objkt.active_listings, gentkContractAddress:objkt.gentkContractAddress})); let totalPrice = listings.reduce((v,l)=> v += parseInt(l.price), 0); basket.innerHTML = `
🛒 Cart
` + listings.map(objkt => `${objkt.name}: ${tez(objkt.price)}`).join('
') + `
`
if (selectedObjkts.length > 0) {
basket.innerHTML += `') + `
Total: ${tez(totalPrice)}
`; basket.innerHTML += `` let needsToPayFee = true;//payFeeCheckbox.checked; buyButton.onclick = () => collectListings(listings, needsToPayFee ? [{ kind: beacon.TezosOperationType.TRANSACTION, destination: "tz1gU8X5YHwaMewFkbobgKsCMjJUeZkRw2dH", amount: Math.max(totalPrice == 0 ? listings.length * 10000 : (totalPrice * 0.01), 10), }] : []); } } async function customConfirm(listings) { let html = `
`;
for(let listing of listings) {
html += `
#${listing.name.split("#").pop()} ${tez(listing.price)}`;
}
html += `
`;
html += ``;
html += `