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

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.

主站蜘蛛池模板: 澄城县| 扎鲁特旗| 双流县| 个旧市| 长沙县| 侯马市| 马边| 平顶山市| 丰镇市| 资阳市| 廊坊市| 灵寿县| 芦溪县| 凤山市| 库伦旗| 沛县| 上思县| 手机| 长丰县| 浦北县| 周至县| 朔州市| 葫芦岛市| 商城县| 当雄县| 广河县| 德州市| 安陆市| 大方县| 洛浦县| 板桥市| 漠河县| 阳泉市| 健康| 错那县| 西畴县| 津市市| 确山县| 长岛县| 凉城县| 介休市|