Extra packages to install:
- Ethers.js
The frontend should have the following features:
- A connect wallet button to connect the app to the wallet
- A form to set the text on a smart contract
- A button to retrieve the text in the smart contract
Our solidity contract will have the following features:
- a string variable that stores the text
- a function that changes the string variable
The string variable will be public. Making it public saves the effort of creating a function to return it.
By default, the string variable will be "Hello," and anyone can change the value to anything.
We will be creating the smart contract with remix ide. So we do the following:
- Verify that we installed MetaMask in the browser
- Create a new Account/Wallet
- Connect to a test network
- Fund the account
- Open remix IDE
- Create a new Solidity file in the contracts folder
- Write the described contract in the file
- Compile the contract
- Deploy the contract
- Test the contract
- Copy the ABI and bytecode into a file
The test network we will be using here is Rinkeby