truffle [트러플] 이란?
스마트 컨트랙트 개발, 컴파일, 배포, 테스팅을 쉽게 할 수 있도록 도와주는 프레임워크
<함께 설치할 것들>
(1) Node.js
(2) Visual Studio Code (다른 IDE)
(3) Ganache
(1) Node.js 설치하기
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-cli --version 명령어를 입력했을 때 ganache 버전이 출력된다.
(4) Truffle 설치
npm install -g truffle
명령어를 누르고 Enter 를 누르면 truffle 설치가 시작된다.
truffle version
정상적으로 설치된 경우, cmd 에서 truffle version 명령어를 입력했을 때 truffle , solidity, node, web3.js 버전들이 출력된다.
'Blockchain' 카테고리의 다른 글
(2) Truffle :: blockchain 채굴하기 (windows) (0) | 2021.05.21 |
---|---|
remix 에서 MetaMask 연결안됨 (0) | 2021.05.15 |
remix solidity struct 사용 코드 (0) | 2021.04.30 |
solidity 에서 array 사용한 코드 (0) | 2021.04.30 |
remix 에서 작성한 solidity 코드 배포하기 (0) | 2021.04.30 |