본문 바로가기
Blockchain

(1) Truffle :: DApp 개발환경 구성하기 (windows) _ 설치

by 마티 2021. 5. 15.

truffle [트러플] 이란?

스마트 컨트랙트 개발, 컴파일, 배포, 테스팅을 쉽게 할 수 있도록 도와주는 프레임워크

 

<함께 설치할 것들>

(1) Node.js 
(2) Visual Studio Code (다른 IDE)
(3) Ganache

 

 

(1) Node.js 설치하기

https://nodejs.org/ko/

 

Node.js

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

nodejs.org

 

(2) Visual Studio Code 설치

VS Code 를 설치하면 실행해서 solidity를 설치한다.

https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

(3) - 1. Ganache 설치

https://www.trufflesuite.com/ganache

 

Ganache | Truffle Suite

Deploy contracts, develop your decentralized applications (dapps), and run tests on smart contracts. Available as a desktop application & command-line tool.

www.trufflesuite.com

(3) -2. 명령 프롬프트 창에서 Ganache 설치

링크를 타고 들어가서 직접 다운받는 방법이 있지만, cmd 에서 명령어로 다운 받을 수도 있다.

명령어를 누르고 Enter 를 누르면 ganache 설치가 시작된다.

 

더보기

npm install -g ganache-cli

cmd 에서 ganache version 확인하기

정상적으로 설치된 경우, cmd 에서 ganache-cli --version 명령어를 입력했을 때 ganache 버전이 출력된다.

 

(4) Truffle 설치

 

cmd 창에서 truffle 설치하기

더보기

npm install -g truffle

명령어를 누르고 Enter 를 누르면 truffle 설치가 시작된다.

 

cmd 에서 truffle version 확인

더보기

truffle version

정상적으로 설치된 경우, cmd 에서 truffle version 명령어를 입력했을 때 truffle , solidity, node, web3.js 버전들이 출력된다.