官术网_书友最值得收藏!

Initializing a Truffle project

First things first. Head over to Google. Then, perform the following:

  • Search for truffle webpack.
  • The first result should be a Github link (https://github.com/trufflesuite/truffle-init-webpack). Click it.
  • Follow the installation steps. In other words, perform the following:
    1. Open a terminal window, and install Truffle globally with npm install -g truffle.
    2. Create a new folder called truffle-practice.
    3. Inside truffle-practice create another folder called chapter1.
    4. Go into the chapter1 folder.
    5. Download the truffle Webpack box. This also takes care of installing the necessary dependencies: truffle unbox webpack.

The structure inside of the truffle-practice folder should look like this—the important folders and files are in bold:

└── chapter1
├── app
│ ├── index.html
│ ├──; javascripts
│ │ └── app.js
│ └── stylesheets
│ └── app.css
├── contracts
│ ├── ConvertLib.sol
│ ├── MetaCoin.sol
│ └── Migrations.sol
├── migrations
│ ├── 1_initial_migration.js
│ └── 2_deploy_contracts.js
├── package-lock.json
├── package.json
├── test
│ ├── TestMetacoin.sol
│ └── metacoin.js
├── truffle.js
└── webpack.config.js

Your structure may look a little different depending on the time you ran the preceding steps, but the folders of concern are /app, /contracts, /migrations, and /test. The root files of concern are package.json and truffle.js.

主站蜘蛛池模板: 浦城县| 顺义区| 皋兰县| 龙里县| 科尔| 岳池县| 苏尼特右旗| 蓬溪县| 昆山市| 吴江市| 进贤县| 韩城市| 遂昌县| 永城市| 巴东县| 宜兰市| 延寿县| 建湖县| 榆树市| 广宗县| 兴安盟| 闻喜县| 错那县| 历史| 洪江市| 固原市| 大丰市| 威信县| 日土县| 湘阴县| 新郑市| 井陉县| 宝应县| 黄平县| 罗田县| 龙陵县| 贵港市| 尤溪县| 平陆县| 南宫市| 陆河县|