Use PYUSD in a frontend app
Let's build a simple Typescript React-based frontend that lets a user connect their wallet and interact with a smart contract that accepts PYUSD.
What are we building?
Full project is available on GitHub
Use cases
Here are the basic use cases we're going to cover in this walkthrough:
As a user, I want to:
- Connect wallet to the app
- Approve the contract to spend PYUSD
- Mint one NFT
- View the newly minted NFT
As the contract owner, I want to also:
- View the total PYUSD balance
- Withdraw PYUSD
Before we start
You'll need a few things before we get going: