Next, we will create the contract interface that will be used by our React app to invoke the contracts. Follow these steps:
- Within the contracts folder, create the LCMaster.js and LCabi.js files.
- Open the LCMaster.js file in a text editor.
- With the file open, navigate to your truffle project environment, which you used to deploy the LCMaster and LC smart contracts.
- In the truffle environment, locate the builds directory. Under builds, you'll find the LCMaster.json build file.
- Open the file and locate the contract ABI. It should look like this:
Copy this entire ABI and paste it into the LCMaster.js file ...