Try   HackMD
tags: EVM TRUFFLE TYPESCRIPT

Create a simple blockchain project by truffle + typescript

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

This project is inspired from Typechain truffle-v5 example.

Debugging EVM solidity project is always a pain when writing "JS" test script.
The video here is to guid you through how to use Turrfle framework with typescript.

Just clone the boilderplate and yarn install the dependancy. And we are ready to go.

pre-requisition

  1. Install npm dependencies:
yarn install
  1. Generate types:

Typechain generate transpiled associated files

yarn typecheck
  1. Run local EVM on localhost
ganache-cli
  1. Execute test script
truffle test
  1. Exectue migration script
yarn migrate
  1. Delete all auto generated transpiled files/folders (migrations/ test/ types/ build)
yarn clean

Reference - Smart contract flow

General flow

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Smart contract overview

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Check it through draw.io