IRC3 NFT Implementation written in Java

Hello SCORE developers,

I’ve just released a NFT (Non-Fungible Token) reference implementation written in Java SCORE.
You can find the source code and an example of how to use it:

The NFT RI is a concise and complete example of the IRC3 standard. In addition to the APIs defined in the specification, the RI also implements some extensions like mint, burn, and enumerable functions like totalSupply, tokenByIndex, tokenOfOwnerByIndex.

To implement the enumerable APIs, I wrote EnumerableMap.java which is similar to EnumerableMap.sol in OpenZeppelin contracts, but more concise. This is an excellent example of how to implement custom data mappings using Java SCORE.

You can run an integration testing of NFT RI against the Gangnam testnet. Clone the Java SCORE Examples repo and run the following Gradle task.

$ git clone git@github.com:icon-project/java-score-examples.git
$ cd java-score-examples
$ ./gradlew clean build optimizedJar
$ ./gradlew irc3-token:integrationTest

[NOTE] The above example assumes that the configuration file (testinteg/conf/env.props) has been properly set for the Gangnam testnet as the following.

node.url=https://gicon.net.solidwallet.io
chain.nid=0x7
chain.godWallet=<your_keystore_file>
chain.godPassword=<your_keystore_password>

Here are the my test transactions during the integration test.

If you have any question regarding the RI or testing, feel free to post it here. I will happily answer to them.

5 Likes