The project makes use of the Next.js framework to define a solid code base which offers a lot of out of the box features including routing, react/typescript/tailwind/jest support, and others. It also utilizes wagmi to allow easy development of blockchain applications.
The application flow is as follows. First the user is given a button to connect to a wallet. Once successfully connected, the user can then perform sending of ERC-20 token through the Avalanche Fuji C-Chain (testnet) network and displaying of the results whether it fails, is in process, or successfully performs the transaction.
Install Core Extension then add Avalanche Fuji C-Chain network. Add the USDC asset and acquire USDC in your testnet account via the Testnet Faucet. Also grab some AVAX from the faucet to pay for transaction fees.
You will need to create a new project in Wallet Connect and then copy + paste the generated project id to a new .env
file:
NEXT_PUBLIC_PROJECT_ID=<YOUR_WALLET_CONNECT_PROJECT_ID>
Clone the repo and install the dependencies:
git clone https://github.com/rabyyuson/web3-send-token-form.git
cd web3-send-token-form
npm install
Start the application:
npm run dev
Open http://localhost:3000 with your browser to see the result.
To run the test, issue the following command:
npm run test
It will run the test defined within the __tests__
folder.