-
Notifications
You must be signed in to change notification settings - Fork 12
Truffle installation
Seong-il Lee edited this page Jun 26, 2018
·
1 revision
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g truffle
sudo npm install -g ganache-cli
truffle unbox [box 이름]
- 프로젝트 디렉토리 생성
mkdir [project 이름] - 기본 틀 생성
truffle init
./contracts/[contract 이름].sol 파일에 코드 작성
./truffle.js 파일 수정 (ganache-cli는 기본적으로 localhost:8545)
- unbox로 시작한 경우
./migration/2_deploy_contracts.js 파일 수정 - init으로 시작한 경우
truffle create migration [contract 이름]
생성 된 파일(타임스탬프_contract_이름.js) 수정
ganache-cli
truffle compile
truffle migration
truffle console