News

15.10.21 NFT in Java

Non-Fungible Tokens (NFT) are the unique representation of an item: images, videos, artworks, everything can be reduced to an NFT token.

The usual implementation is in Solidity, through the ERC721 standard. It is just an interface for a contract that gets deployed in the Ethereum blockchain, with suitable implementations.

The use of Java, for programming smart contracts in Takamaka, allowed us to code the NFT contract in Java and run it inside the Hotmoka blockchain. You can see the code here:

https://github.com/Hotmoka/hotmoka/blob/master/io-takamaka-code/src/main/java/io/takamaka/code/tokens/ERC721.java

It is just a translation from Solidity into Java of the well known implementation by the OpenZeppelin community. By using Java, the code is strongly-typed (forget the address type…), simpler to read and comes with an efficient and simple snapshot operation: you can create a frozen view of the token ledger by simply calling its snaphot() method.

Here is the UML representation of our implementation:

As a bonus, our implementation in Java defines the IERC721Receiver interface for token holders. Holders that implement that interface will be notified upon token receipt. This is fully type-safe: holders cannot pretend to implement that interface, as it is possible in Solidity instead, and there is no need to prove that that method was implemented, as Solidity does instead by returning a special value from that method. Needless to say, simplicity means reliability and smaller gas costs.

Wallet

  • Staking
  • Send & Receive
  • Contacts List

mobile

Takamaka's official wallet is available now on the Play Store and Apple Store. You can download the right version for your smartphone here below

Get it on Google Play

  • File & Hash Upload
  • Backup Wallet
  • Multi Wallet

Desktop

Wallet desktop, easy to use and safe, allows a complete interaction with the takamaka blockchain. The sources of both the wallets and the main net will be made open source soon.


partnership