Skip to content

truffle-ts-percel-box

This box is a sample that use Web3 1.0.0-beta and TypeScript 2.8, percel, metacoin box. I'm happy if this sample is useful for learning etheruem.

Installation

  1. Install Truffle globally.

    npm install -g truffle
    

  2. Download the box. This also takes care of installing the necessary dependencies.

    truffle unbox YuichiNukiyama/truffle-ts-percel-box
    

NOTE: This box depend on Web3.js 1.0.0-beta. And this package can't install on Windows without build-tools. If you want to use this sample on Windows, execute following script before truffle unbx:

    // You shoud execute with administrator authority.
    npm install --global --production windows-build-tools

  1. Run the development console.

    truffle develop
    

  2. Compile and migrate the smart contracts. Note inside the development console we don't preface commands with truffle.

    compile
    migrate
    

  3. Run the percel development server (outside the development console) for front-end hot reloading. Smart contract changes must be manually recompiled and migrated.

    // Serves the front-end on http://localhost:1234
    npm run dev
    

  4. Cleanup extra data after stop truffle and percel. javascript npm run clean

Acknowledgements

I referred to the following box. Thank you for authors :smile: