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

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.

主站蜘蛛池模板: 文安县| 平塘县| 临洮县| 泊头市| 鹤岗市| 沁阳市| 库车县| 拉孜县| 伊宁县| 新田县| 南召县| 开封县| 辉南县| 张家川| 静宁县| 盐津县| 英德市| 青州市| 巴南区| 山西省| 如皋市| 常宁市| 墨脱县| 永春县| 彭山县| 乌鲁木齐县| 东乡族自治县| 长海县| 武夷山市| 庆阳市| 北流市| 普定县| 独山县| 抚顺县| 苏尼特右旗| 江阴市| 辽源市| 黔西| 聂拉木县| 工布江达县| 平昌县|