본문 바로가기

Blockchain9

(2) Truffle :: blockchain 채굴하기 (windows) https://mati.tistory.com/12 (1) Truffle :: DApp 개발환경 구성하기 (windows) _ 설치 truffle [트러플] 이란? 스마트 컨트랙트 개발, 컴파일, 배포, 테스팅을 쉽게 할 수 있도록 도와주는 프레임워크 (1) Node.js (2) Visual Studio Code (다른 IDE) (3) Ganache (1) Node.js 설.. mati.tistory.com truffle 에서 사용할 파일 만들고 cmd truffle init 를 실행하면 성공했을 경우, Init successful, sweet! 가 표시된다. 그리고, truffle 파일에 들어가면 contracts, migrations, test, truffle-config.js 총 4개의 파일이 생성되.. 2021. 5. 21.
(1) Truffle :: DApp 개발환경 구성하기 (windows) _ 설치 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 Visua.. 2021. 5. 15.
remix 에서 MetaMask 연결안됨 사용하던 노트북을 바꾸고 다시 메타마스크를 설치하고 remix 에서 코드를 작성했는데... smart contract 배포가 안된다. 메타마스크가 연결이 되지 않아서 였는데 사이트를 연결해주면 해결된다. No injected Web3 provider found. Make sure your provider (e.g. MetaMask) is active and running (when recently activated you may have to reload the page). (1) 메타마스크가 사이트와 연결되어 있지 않은 경우 사이트 데이터를 읽고 변경할 수 있음에서 모든 사이트에서 읽을 수 있도록 변경해준다. (2) remix 사이트를 http 가 아니라 https 로 접속한 경우 You are usi.. 2021. 5. 15.
remix solidity struct 사용 코드 struct 는 다양한 데이터 타입을 넣을 수 있는 구조체 독립적으로는 잘 사용하지 않음 struct 를 만들고 리스트에 값을 넣어서 사용 더보기 pragma solidity 0.8.0; contract Last_days_of_April { struct student { string name; uint year; uint month; uint day; uint score; } student[] students; function setStudent(string memory _name, uint _year, uint _month, uint _day, uint _score) public { students.push(student(_name, _year, _month, _day, _score)); } funct.. 2021. 4. 30.