Skip to content
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

Harmonize authorize to AIP-040 #34

Open
fulldecent opened this issue Aug 12, 2019 · 6 comments
Open

Harmonize authorize to AIP-040 #34

fulldecent opened this issue Aug 12, 2019 · 6 comments

Comments

@fulldecent
Copy link
Owner

Authorize/deauthorize or authorize/revoke.

Also the specification "An address MUST always be an operator for itself. Hence an address MUST NOT ever be revoked as its own operator." can be harmonized.

To discuss.

@fulldecent
Copy link
Owner Author

@jennijuju To discuss

@jennijuju
Copy link
Contributor

Hey, sorry for the reply. I would stay with revokeOperator for AIP041 just because the integrations have been done with products that support ATS token.

@jennijuju
Copy link
Contributor

For the second part, are you suggesting an address doesnt have to be an operator for itself?

@fulldecent
Copy link
Owner Author

Great. We should also use revokeOperator for AIP040, right?

Yes, in ERC-721 it does not mean anything to authorize yourself. And isApprovedForAll does not necessarily return true for self. ERC-721 is a slightly lighter specification because revoking or authorizing self is not restricted (even though they are meaningless).

Of course we don't need to follow that. But I do want to have 40 and 41 synchronized.

@fulldecent
Copy link
Owner Author

Full comparison

AIP-040 ANFT AIP-041 AFT
String aip040Name() String AIP041Name()
String aip040Symbol() String AIP041Symbol()
n/a int AIP041Granularity()
BigInteger aip040TotalSupply() BigInteger AIP041TotalSupply()
BigInteger aip040OwnerBalance(Address) BigInteger AIP041BalanceOf(Address)
void aip040Authorize(Address) void AIP041AuthorizeOperator(Address)
void aip040Deauthorize(Address) void AIP041RevokeOperator(Address)
boolean aip040OwnerDoesAuthorize(Address, Address) boolean AIP041IsOperatorFor(Address, Address)
void aip040TakeOwnership(Address, BigInteger[]) void AIP041Send(Address, BigInteger, byte[])
n/a void AIP041OperatorSend(Address, Address, BigInteger, byte[], byte[])
n/a void AIP041Burn(BigInteger, byte[])
n/a void AIP041OperatorBurn(Address, BigInteger, byte[], byte[])
Address aip040TokenOwner(BigInteger) n/a
Address aip040TokenConsignee(BigInteger) n/a
String aip040TokenUri(BigInteger) n/a
BigInteger aip040TokenAtIndex(BigInteger) n/a
BigInteger aip040TokenForOwnerAtIndex(Address, BigInteger) n/a
void aip040Consign(Address, Address, BigInteger[]) n/a

@fulldecent
Copy link
Owner Author

At the moment following are all differences:

  • aip vs. AIP prefix
  • Operator naming
    • Authorize / AuthorizeOperator
    • Deauthorize / RevokeOperator
    • OwnerDoesAuthorize / IsOperatorFor (reversed parameter order)
  • TakeOwnership / Send / OperatorSend / Burn / OperatorBurn
    • These are fundamentally different models and do not need to be reconciled
  • Latter AIP-040 functions
    • These are specific to non-fungibles and need not be reconciled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants