This project demonstrates how to add smart contracts to your project using Hardhat. It provides a sample Message
contract, a test and deployment scripts.
Try running some of the following tasks:
yarn build
yarn deploy
yarn test
yarn coverage
Once you're ready to deploy your contracts, setup a deployer account using DEPLOYER_KEY
and try to run e.g.
yarn deploy --network sepolia
Note that you need testnet Ethers for that. More info and faucet links can be found on Sepolia Dev. You can set up different networks using Hardhat's network configuration.
Contracts are automatically verified on Etherscan if you've set up the ETHERSCAN_API_KEY
environment variable. You can also verify contracts manually using
yarn verify <address> --network <network>
It is recommend to verifying manually after deployment as it also automatically verifies contracts on Sourcify.
The front-end uses the Wagmi CLI to automatically generate types and default hooks for your contracts.
You need to run the following command from packages/app
, which will generate the files in the same package at src/abi.test
.
yarn wagmi