Summary
The last article taught you how to write, compile, test, and deploy smart contracts using Solidity, Javascript, dRPC endpoint, and API key. Here, you'll learn how to build the user interface(UI) for the Coffee Payment using, React.js, Typescript, and Web3.js.
Import the ABI, web3(js framework for interacting with smart contract), useState, and useEffect. Learn more on Thirdweb.com.
This is because RPC Provider can only be used to make calls while “Window.ethereum” can be used for both calls and make transaction. The HTML syntax will look like this: “Buy Coffee’s BuyCoffee’ is a function that allows the user to pay for the number of coffees bought.