chiru-labs / ERC721A

https://ERC721A.org
MIT License
2.51k stars 842 forks source link

caller or token owner should be able to approve self as operator for … #407

Closed jrkosinski closed 2 years ago

jrkosinski commented 2 years ago

…own tokens.

Motivation: As discussed, the EIP doesn't explicitly state that someone can't be their own operator for their own tokens. It has no effect per se, other than clearing any existing operator for the same tokens. An address being its own approver does no harm, and does not seem to be explicitly forbidden by the EIP.

approve(my_address, my_token_id) -> results in getApproved(my_token_id) returning the address of the owner. Now the token owner has all the same rights that they already had anyway.

Same for setApprovalForAll(my_address) -> the token owner is now the operator for all of its own tokens.

Changes

Vectorized commented 2 years ago

@jrkosinski Psst, can you help fix the linter issues for the test file?

jrkosinski commented 2 years ago

Hi Vectorized,

Yeah, I saw that; I will fix those issues tonight (in a few hours in my timezone)

Thanks, John

On Fri, Aug 12, 2022 at 3:16 PM Vectorized @.***> wrote:

@jrkosinski https://github.com/jrkosinski Psst, can you help fix the linter issues for the test file?

— Reply to this email directly, view it on GitHub https://github.com/chiru-labs/ERC721A/pull/407#issuecomment-1212851437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATG4NR5VKPKBW5PZFOFWXTVYYB4BANCNFSM56I2SS6Q . You are receiving this because you were mentioned.Message ID: @.***>

Vectorized commented 2 years ago

@cygaar LGTM, what do you think?