fulldecent / aion-aip040

Reference implementation for Aion non-fungible tokens
MIT License
3 stars 3 forks source link

Review approach for optional interface #16

Closed fulldecent closed 5 years ago

fulldecent commented 5 years ago

In ERC-721 we defined one base interface and additional optional interfaces.

At current we have identified this proposed API:

0.0
org.aion.AIP010NonfungibleTokenContract
Clinit: ()
public static Address aip010OwnerOf(byte[])
public static Address aip010ConsigneeOf(byte[])
public static boolean aip010IsAuthorized(Address, Address)
public static void aip010Transfer(Address, Address, byte[])
public static void aip010Consign(Address, byte[])
public static void aip010Authorize(Address, Address)
public static void aip010Deauthorize(Address, Address)
public static byte[] aip010BalanceOf(Address)

BELOW HERE OPTIONAL
public static String aip010Name()
public static String aip010Symbol()
public static String aip010TokenURI(byte[])
public static byte[] aip010TotalSupply()
public static String aip010TokenByIndex(byte[])
public static String aip010TokenOfOwnerByIndex(Address, byte[])

We are thinking to make the full API as the Aion specification. The latter part will be methods that need not be implemented (they can revert). Seeking to review with AVM + AIP teams to see if this technique is appropriate.

fulldecent commented 5 years ago

The solution will be to require all functions and allow null response for certain functions.

Work plan