Dumb question @brown2020 but what did you use to strip it?
Hi @latok, you can follow along the youtube video
https://www.youtube.com/watch?v=WZWCzsB1xUE&t=4487s from timestamp ā46:26ā onwards to see how to sync the smart contract hope this helps!
@Fitz The way I stripped the ABI to one big string without all the line breaks and formatting: Copy ABI to clipboard from Remix, then paste it into the search bar of Chrome. Chrome strips it all down for you. Then copy and paste that new stripped string into the useState initializer.
Now if I only could figure out how to do the sync part. The āConfigure Sync and Watch Contract Eventsā in Moralis wonāt let me save. I have the ABI in there, the contract address and MarketItems as the table name, but there must be a couple of steps that Iām missing that are not documented in the readme
Wow such a simple solution!
For the sync issue, make sure you have the chain selected at the top. The chains logo will have a checkmark on it. Got me earlier with that
Thanks @Fitz. I got the chain selected and now Iām able to press the confirm button, but now I get the error āInvalid ABI, The ABI should contain an array of inputs.ā I tried straight cut-and-paste from Remix and my strip-trick, and get ABI errors either way. Any ideas? Is this even the right place to be doing the sync?
Hi there, thanks again for making this tutorial. Iāve got a couple of questions:
-
I currently have no NFTs showing on my āYour Collectionā page. This means I also cannot test out selling/listing NFTs. Does my Metamask actually have to own NFTs for them to show up there, or is there a way I can at least have test NFTs that show up there?
-
When I click onto either the Test Mages or Pixel Show collections while in the Marketplace, it shows no NFTs. In contrast, the tutorial videos shows these NFTs, including those in the Your Collection page. However, NFTs of other collections such as Bored Apes show up. How do you think I can get the Test Mages and Pixel Show NFTs to appear?
Remove the [ ] from your abi and update your topic to include the required variables. Go through the tutorial video a few times, thereās lots to miss
Just the first one starting at anonymous, or the whole list? I used this and it seemed to accept itā¦
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
And for the topic to subscribe, you put the whole event, like this?
MarketItemCreated ( uint indexed itemId, address indexed nftContract, uint256 indexed tokenId, address seller, address owner, uint256 price, bool sold )
Remove all spaces from the topic and also remove the variable names, ie just have MarketItemCreated(uint,address,unit256ā¦
Hey @ZeusExMachina,
Yes you will have to have some NFTs in your wallet to try the listing functionality, I would recommend minting a simple NFT collection (or acquiring a couple of NFTs), on a testnet like Mumbai and then also adding the details (contract address and abi) of this collection to the the collections.js file, this could help out with your question 2 as well.
/src/helpers/collections.js
Iām working along the video, i have some issues with āparamsā of the contractProcessor
function. What would i parse in when the params donāt have a name for the input in the ABI ?
Hey @HarryTgerman, usually that happens when the param variable is not used at all, so maybe you can have a try to have the params
as empty object ({}
)
Thanks for your reply, i had to create a testnet server as my first one was mainnet. Iāll try your solution.
Where is the address from (in above)? Iāve used the example you gave in MoralisDappProvider.js
Where do i run the code from the repository? Iāve cloned it to my desktop for local dev but iād like to run it online so others can also see it, otherwise itās only on my PC.
Iāve tried to run it on heroku and vercel but no luck. Example below.
Also, where should i edit the files, at the moment iām using notepad and saving.
Thanks
I also had this problem, I solved it by:
yarn cache clean
yarn info
yarn upgrade
yarn add yarn
Hope this helps
I donāt why nothing works on my local PC, iāve tried everything inc updating, reinstalling nodejs, yarn etc.
Just keep getting same errors.
Constantly getting this at the end āCommand failed with exit code 1ā and no solution works, iāve checked many posts and they all say to clear yarn cache, upgrade, start etc but I canāt move forward from this.
Also this error ācommit hash requiredā constantly.
Itās so frustrating ā¦
Hi @Latok,
I would suggest you still try and download an IDE like VS code, as you say you are opening the files in a notepad and savingā¦ Having the whole folder open in the same environment and making edits to the files there could help out
Anyone got a quick suggestion on a better ātagā rendering method for the transactions tab in this project?
I have added a ācanceledā column to the database and would like to render a tag also showing if the sale has been canceled. Maybe Iām just not understanding the current tags.map((tag) =>