-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help Wanted][ERC721] Question about deprecated function tokensOf
#1064
Comments
More details here: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md |
@hadv Maybe you are misunderstand what i said ? |
nope, I mean you can research yourself why they remove this function on the EIP document ;) |
@hadv Sorry, I didn't find any document that related to this one. |
@hadv Actually, I've searched it from the history commit of this file https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md But i did't see any information. |
Okay, so it's not the standard method of ERC-721 token |
ok, and this guy canhlinh, and so do I, ask why it was deprecated. I'm also interested in knowing this. Hadv if you don't want to provide a constructive answer why not go spend your time on something else |
@AndreiD I think what he said is correctly. |
so why that function was removed? |
@AndreiD Because it's not the standard method of ERC-721 token. The team just build functions from the standard, then remove the non-standard method |
@AndreiD @canhlinh I looked for discussion online about this but unfortunately couldn't find any. I can tell you my understanding of why Perhaps @fulldecent can share some of his thoughts on the issue? |
To original poster @canhlinh. You can read more history on the process of ERC-721 standardization at ethereum/EIPs#841. The original 721 was forked (to PR 841) -- then after a long process everybody (including the original 721 author) agreed on the standard and the number 721 was used for clarity. Hey @frangio, yes you are 100% correct. It is not best practice to return arbitrary length arrays from functions. There is an exception to this rule (if the code will NEVER be called from another contract) but the exception cannot be enforced in code so it would surely lead to problems. I am not aware of any complaints against |
@fulldecent The problem I see with It's not clear to me exactly what procedure clients should follow to display the full list. Either using the events only, or |
Good question. If you are calling from on-chain, of course you can atomically get the list by iterating. But if you are off-chain then you are correct -- the requests could run against different blocks and you do not get atomic data. The solution is to run your queries all against the same block number. In web3js you can choose which block to run your query against. Just get the latest block number and then run your iterative query against that block. Guaranteed atomic! |
Cool! I wonder if querying against a specific block number works on Infura, but it's a great start nonetheless. @AndreiD @canhlinh I hope this has answered your questions. Thanks @fulldecent for helping out! |
Good to know this! Thanks @frangio & @fulldecent |
🚀 Thank @frangio and @fulldecent |
Hi Team,
Sorry for bothering you guys
I saw that the function below is already deprecated. Could you please let me know the reason why this function was deprecated ? High gas fee or any security issue.
Should i use this function in production ?
Thank in advance.
Deprecated by this commit e96164f#diff-bc9f12d1d1e8ef6bdba9bc4d73ae8329
Now this function is declared as interface for compatibility with previously deployed contracts
https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC721/DeprecatedERC721.sol
The text was updated successfully, but these errors were encountered: