In the previous chapter, we wrote Solidity code for the ownership contract. And in both the previous chapter and this one, we learned about web3.js and how to invoke the methods of the contract using web3.js. Now, it's time to build a client for our smart contract so that users can use it easily.
We will build a client where an enterprise's user selects a file, enters owner details, and then clicks on Submit to broadcast a transaction to invoke the contract's set method with the file hash and the owner's details. Once the transaction is successfully broadcasted, we will display the transaction hash. The user will also be able to select a file and get the owner's details from the smart contract. The client will also display the recent set transactions mined in real time.
We will use sha1.js to get the hash of...