This code is from a YouTube video: https://www.youtube.com/watch?v=hnmmkIIQDtU
In this repo, you'll find some very basic and easy code to help you develop your first Flow DApp using the local emulator and dev wallet. The emulator is a great place to develop your code before going to TestNet.
- Start the project
- Start the emulator
- Deploy your contract
npm run dev
flow emulator start --dev-wallet -v --persist
- The
--dev-wallet
flag tells your emulator to also start the dev wallet (helps you log in, log out, have an account to use) - The
-v
flag tells your emulator to include logs from your Cadence code (and gives you extra information about your transactions and scripts) - The
--persist
flag allows you to restart the emulator but keep all of your current state (during developing, you should use this only if you need it)
NOTE: Your flow.json must be setup like I have in the flow.json folder (already done for you)
NOTE #2: This command must be run AFTER you start the emulator
flow project deploy --network=testnet