We just deployed our ERC1404 security token contract to the Ganache network. In this section, we will write the UI code to interact with the smart contact.
Ethereum provides the web3.js JavaScript API, which can connect to a local or remote blockchain node through HTTP or an Interprocess Communication (IPC) protocol. The API provides methods that allow a web client to interact with the Ethereum network.
The MetaMask Chrome extension is a very popular Ethereum browser tool that can provide a user-friendly interface; you can connect to a local or a remote blockchain environment and interact with a smart contract in the blockchain. If you have MetaMask installed, you can call it by using the following code:
if (typeof web3 !== 'undefined') { // Provided a web3 instance is provided already by Meta Mask. App.web3Provider = web3.currentProvider...