Tested just now querying 1230 rows with a limit as 10000. It retuned all the data.
.
I guess there is no upper limit.
Tested just now querying 1230 rows with a limit as 10000. It retuned all the data.
.
I guess there is no upper limit.
You are the best. THANKS
Are you able to help me add these elements to my project? I copied the boilerplate & edited it but id like to add these as well, & im sure most others would as well. I need at least 1 or 2 done before I launch, but would like to have 3 done as well. Any help would be appreciated!
Hey guys Iâm looking for the market place contract for remix but I cant find the one that he has in the video. Any assistance is appreciated.
What have you done so far in your Explore page component? You can post a screenshot.
For items, you can use the total from your collection. You can get it from the API with getAllTokenIds.
For owners one way is to count all unique addresses from all Transfer events on the collection contract, similar to the process here. The API currently doesnât have that available.
Floor price you could query all your market items from your table to get the first result based on ascending price.
Iâm not sure what total volume would be, number of sales? If so you could use the total number of MarketItemSold events from the marketplace contract.
And then to add all of this data to your component to display it, you can use grids. As the boilerplate uses Ant Design, you can use their grid too.
For a search bar, you can read this and implement it similar to the filter code based on the syncing code example I posted. So you add a search input, add a handler which filters results based on what is entered in it, and then display these results.
For low to high, implement a select element as in the picture using similar code in the syncing example. But because you wanted all NFTs shown, it will have some conflicts because not all of them will have prices.
Thank you for all the advice. Ive got the contracts active & the collections uploaded. I customized the boilerplate & made the explore tab the marketplace tab. I only have the default functions from the boiler plate setup. Everything works but I just want to be able to filter everything the collections & display those elements. This is only my 2nd web3 project & im working alone so im just struggling to figure out how to make the front-end interact with the smart contracts.
Hey guys Iâm stuck on adding the smart contract ABI to my server. I keep getting the error message âInvalid ABI Please Verifyâ Any help
You can post your ABI here. It should be in the same format like this where itâs only the part thatâs relevant to the event/topic you want to sync:
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
In that case, what do you want to work on first? It would be easiest to start with the stats and get them displayed.
Here it is
{
âanonymousâ: false,
âinputsâ: [
{
âindexedâ: true,
âinternalTypeâ: âuint256â,
ânameâ: âitemIdâ,
âtypeâ: âuint256â
},
{
âindexedâ: true,
âinternalTypeâ: âaddressâ,
ânameâ: ânftContractâ,
âtypeâ: âaddressâ
},
{
âindexedâ: true,
âinternalTypeâ: âuint256â,
ânameâ: âtokenIdâ,
âtypeâ: âuint256â
},
{
âindexedâ: false,
âinternalTypeâ: âaddressâ,
ânameâ: âsellerâ,
âtypeâ: âaddressâ
},
{
âindexedâ: false,
âinternalTypeâ: âaddressâ,
ânameâ: âownerâ,
âtypeâ: âaddressâ
},
{
âindexedâ: false,
âinternalTypeâ: âuint256â,
ânameâ: âpriceâ,
âtypeâ: âuint256â
},
{
âindexedâ: false,
âinternalTypeâ: âboolâ,
ânameâ: âsoldâ,
âtypeâ: âboolâ
}
],
ânameâ: âMarketItemCreatedâ,
âtypeâ: âeventâ
},
Ok no problem, we can start with the stats & get them displayed.
Get rid of the comma at the end and it should work.
That worked perfectly, Thank you!
When adding my ABI as a string in MoralisDappProvider.js Iâm getting this error message " Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength"âŚ
Iâve done a google search for this issue and change the max Token length to 2000000, but this still doesnât work.
Iâm not familiar with that error, does that break the app?
What you could try is putting your ABI in a separate .json file, and importing/using that.
import ABI from './abi.json';
...
const [contractABI, setContractABI] = useState(JSON.stringify(ABI));
It doesnât break the app but I donât think itâs being read as a string b/c itâs saying that itâs too long.
Iâm going to try the way that you suggested and see how it works for me, thanks.
That worked for the error I was getting, now however when i go to try to sell the NFT Metamask opens and says " We were not able to estimate gas. There might be an error in the contract and this transaction may fail.
Then they give this option to press âI want to proceed anywayâ
when I press it I it doesnât go through just says âTransaction reverted by EVMâ
Any idea of what may be happening here?
Is your contract a copy of the provided marketplace contract? What is the chain youâre using?