I received this question from a student:
I am lost. What’s the order of the commands when you develop a decentralized application with Truffle?
- Step 1: Create a project with with
- Step 2: Code smart contract in
- Step 3: Write migration file in
- Step 4: Start a local development Blockchain with
- Step 5: Deploy smart contract with
- Step 1: Create a folder for frontend code, in the Truffle project
- Step 2: Code your frontend
- Step 3: Integrate your frontend with the compilation artifact of Truffle. i.e you need to import the json document produced by truffle when compiling your smart contract, which also happens automatically when deploying your smart contract. By default this json document is inside the
build/contractsfolder. It will give you the ABI and the address of the contract.
- run your frontend (
npm startmaybe? depends on how you coded it)