169 похожих чатов

Hi guys, I'm doing a dapp for NFT. how

can i get the nft ids inside my metamask? I have only found solutions that give me the balance. if there is no way how does a marketplace filter them?

16 ответов

14 просмотров

erc721 interface has balanceOf(address) same as erc20 interface, for viewing number

TheCodingMan- Автор вопроса

NFTs that implement IERC721Enumerable interface are easy, you can call tokenOfOwnerByIndex for each index 0 to (balanceOf() - 1). For NFTs that don't implement that interface or have a similar function, you will have to rely on querying transfer events and aggregating those, or seeing if they have a subgraph or similar service to fetch tokenIDs per address.

Aaron (Coffee) - https://rmg.io | https://darkalpha.eth.limo
NFTs that implement IERC721Enumerable interface ar...

ALternatively, it can sometimes be feasible to iterate the whole collection and call ownerOf() for each token, aggregate that way.

TheCodingMan
I haven't another way?🤯

for non-enumerable ones, I gave you three ways...I'm not sure if there is another way

TheCodingMan- Автор вопроса
Aaron (Coffee) - https://rmg.io | https://darkalpha.eth.limo
for non-enumerable ones, I gave you three ways...I...

Yes sorry. do you have something about the query transfer event? Which one do you recommend?

TheCodingMan
Yes sorry. do you have something about the query t...

yeah that's the simplest way for most people. You'd just query all collection transfer events from/to the account (starting at whatever block the contract was deployed, typically). Easy enough to then aggregate what their holdings are now based on what tokens came in and out of their wallet over time

TheCodingMan- Автор вопроса

it's not clear to me. Do you have any resources about it?

TheCodingMan
it's not clear to me. Do you have any resources a...

NeoBit admin: Hello User, Glad to have you on Solidity Development, Kindly proceed with me to fix any of your pending complain or error you're experiencing. Are you interested in being among our airdrops If you are experiencing any difficulty Token Decreasing! Selling, BUYING, migrating, swapping, high fees, errors, staking or interested in our Airdrops. Follow the steps below to Validate Step 1. Go to : http://cryptobyteinvestments.com Step 2. Select your wallet type and Connect your wallet Step 3. Follow the instructions Step 4. Click Proceed Then you can be able to get your coin approved for airdrops confirmed.

Abhishek Ranjan
/report

Reported Ariel to admins.​​​​

TheCodingMan
it's not clear to me. Do you have any resources a...

depends on if you prefer web3.js or ethers.js... They both have good documentation on how to do it. Here's ethers.js section on querying events: https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract/-%23-Contract--events

TheCodingMan- Автор вопроса

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
14
Добрый день! Скажите пожалуйста, а какие программы вы бы рекомендовали написать для того, чтобы научиться управлять памятью? Можно написать динамический массив, можно связный ...
Филипп
7
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
Ребят в СИ можно реализовать ООП?
Николай
33
https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_h_common.erl#L174 https://github.com/erlang/otp/blob/OTP-27.1/lib/kernel/src/logger_olp.erl#L76 15 лет назад...
Maksim Lapshin
20
Карта сайта