Hello, not sure Im missing something, but it seems that once you list an NFT on the marketplace for sale, its stays there until its bought, I dont see anyway of withdrawing / canceling the sale so that the NFT is transferred back to the user/seller wallet?
Hey @ClintonK,
Yes the boilerplate, doesn’t have this built in, but people in the community have had the same idea and added this functionality themselves. You could start by checking this post
Hope this helps!
Thanks for this, could you please provide the code in the dapp you used for the cancel button?
Hi All, @IAmJaysWay,
In the file helpers/networks.js are 2 id’s exchanged…
The kovan testnet is id: 0x2a and Ropsten is id: 0x4 !
so it must be:
"0x2a": {
currencySymbol: "ETH",
blockExplorerUrl: "https://kovan.etherscan.io/",
},
"0x4": {
currencySymbol: "ETH",
blockExplorerUrl: "https://rinkeby.etherscan.io/",
},```
Success!
You are a GENIUS! Thank you
please now help figure out why I am getting this error
“Unable to fetch all NFT metadata… We are searching for a solution, please try again later!”
How can you send notifications to users if someone makes an offer on an NFT?
Hey you can try to resync he NFT metadata if you want we have a Web3 API for that https://docs.moralis.io/moralis-server/web3-sdk/token#resyncmetadata
Hey @BooneBergsma,
The problem is due to your Web3 Api call not returning the resolved metadata. You could also try resyncing the metadata for your tokens, like @YosephKS suggested above
Thank you very much for your suggestion
What I have done I include the button in the App but it appear in all pages?
When I am in explorer market and press the collection, I want the button to be there, where should I include it?
Also I set offset under :
= useMoralisWeb3ApiCall(token.getAllTokenIds, {
chain: chainId,
address: addr,
limit: 250,
offcet: 3,
});
then what I include here:?
onClick={() =>
window.open(
${getExplorer(chainId)}address/${nft.token_address}
,
“_blank”
)
I am really appreciate it is snap code example
Thank you
Hi @ennng,
You should place the button in the NFTTokenIds.jsx
component and probably you’d want to place it, inside the conditional where the token cards are rendered something like this:
{inputValue !== "explore" &&
<>
<Button> Load More</Button>
{
NFTTokenIds.slice(0, 20).map((nft, index) => (
<Card
.
.
.
}
</>
Then add your logic to when the button is clicked to go get the next token ids with the offset web3 API call.
dont know if this helps anyone but i have a repository that solves th nft tokenid issue https://github.com/MontyWilliams/nftMarketPlaceUsingReact/tree/starteKit
hi i have tried your code for the NFT clone but i always get loads or warnings and errors. please see below. as it stands its no longer able to open the app. is this code ok? as its seems to be showing some strange problems
\\
can you please help me get this fix its killed so much time for something that should have been a 10 min job
@IAmJaysWay ?
Thank you,
I tried but when I press the arrow button of the collection it give alert? not the actual button?
and also I would like to load more NFT (where should I add after press the button?) please see my code:
{inputValue !== “explore” &&
<>
{
NFTTokenIds.slice(0, 250).map((nft, index) => (
//NFTTokenIds.map((nft, index) => (
<Card
hoverable
actions={[
<Tooltip title="View On Blockexplorer">
<FileSearchOutlined
onClick={() =>
window.open(
`${getExplorer(chainId)}address/${nft.token_address}`,
"_blank"
)
}
/>
</Tooltip>,
<Tooltip title="Buy NFT">
<ShoppingCartOutlined onClick={() => handleBuyClick(nft)} />
</Tooltip>,
]}
style={{ width: 240, border: "2px solid #e7eaf3" }}
cover={
<Image
preview={false}
src={nft.image || "error"}
fallback={fallbackImg}
alt=""
style={{ height: "240px" }}
/>
}
key={index}
>
{getMarketItem(nft) && (
<Badge.Ribbon text="Buy Now" color="green"></Badge.Ribbon>
)}
<Meta title={nft.name} description={`#${nft.token_id}`} />
</Card>
))
}
<button
style={{height: '70px', width : '200px',color: "#000",fontSize:'18px'}}
title='Load more NFT..'
onPress={alert('Simple Button pressed')}
//onPress={() => setInputValue(nft?.addrs)}
>
Load more..
</button>
</>
}
What I already did,
- deployed NFTmarket and NFT contracts on polygon mainnet
MarketBeta deployed to: 0xc2cc3f7ccFA96CF8f447216a631Dd96846076F90
nftBeta deployed to: 0xbc2278f2461D6b5aAf1D61DA3bEbdd883549E63B
I cloned the git, setup moralis sever on polygon mainnet, and filled up the env file, when I finally ran the code on localhost, I only am viewing the traditional boilerplate. Build successfully on netlify too but it’s shown blank page at https://nft-beta.allswap.xyz . how to get the blank page working?
Hello, @ivan and @everyone, I made everything as you described, but used the code on github, master branch. But, i got an issue on smart contracts event watcher. I can list and approve my nfts, they appear on the collection events, but, it doesn`t create anything on the database, even the table is created.
Well, I triple checked the address - from the marketplace contract -, verified the ABI, verified the fields, i am pretty lost over.
Tried to use some different tablenames, CreatedMarketItems, MarketItems, MarketItemsCreated, none has worked.
Can someone help me?