BLOCKCHAIN/BlockChain

SmartContract 테스트넷 배포 (2)

yuujoeng 2022. 9. 30. 18:43

1 ATOM 에디터에서 solidity 개발환경 구축

(1) ATOM Editer 설치 > exe 파일

 

Release 1.60.0 · atom/atom

Notable Changes atom/tabs#531 - Activate panes on any click, not just left click #13414 - Adds context menu for cinnamon desktop enviroment (Linux) #19016 - Allow line endings to be converted when...

github.com

 

(2) autocomplete-solidity /  linter-solidity 설치

 

2 Metacoin 예제 실행

(1) 예제 실행 폴더 및 Metacoin tutorial 설치

 

(2) truffle-config.js에서 네트워크 설정 변경

  * 로컬환경에서 진행하는 것을 설정해주는 것

 

(3) Ganache 실행

 

(4) truffle compile 명령어로 컴파일

 * 빌드 성공시 에디터에서 build 폴더가 생성된 것을 확인할 수 있음

 

(5) truffle migrate 명령어로 컨트랙트 컴파일 및 deploy 결과 확인 

  * 가나슈에서 트랜잭션 처리 완료된 것 확인

 

* 참고자료와 달리 Metacoin 스마트컨트랙트를 그대로 사용할 시 오류 발생

* ATOM 에디터에서 linter-solidity 라이브러리 설치 시 오류 발생

* 예제와 내 로컬의 솔리디티, node 버전이 상이하므로 로컬에 맞추어서 진행

 

* 참고자료

https://kimsfamily.kr/327

https://velog.io/@nara7875/BlockChain-cobzoqbi

댓글수0