BLOCKCHAIN/Ethereum

[Ethereum] Building Interactive Front-Ends (1)

yuujoeng 2022. 8. 31. 22:13

1 Ethereum App Architecture

- 일반적으로 사용자가 서버에 요청을 보내 DB에 새로운 작업을 생성할 수 있음

- HTML, Ajax 요청 형식을 취함

- Ethereum 아키텍쳐에서 서버는 프로세스에 관여하지 않으며, Web3/Matamask 를 사용함

- 데이터를 변경할 수 있는 유일한 방법은 개인키, 공개키를 사용하는 것(유저 컴퓨터에 존재)

- 키는 어떠한 경우에서도 서버로 전송되지 않음

- React를 사용하여 복잡한 과정을 단순화할 것

 

1)  React App Updates 

- npm install

- sudo npm install -g create-react-app

- npx create-react-app lottery-react

2)  Application Overview

3)  Create-React-App

- npm run start

- npm install web3

- MetaMask와 React 연결

4)  Web3 Setup