본문 바로가기
728x90
반응형

전체 글297

단일 머신에서 멀티 노드 실행 1 각 노드의 데이터 디렉터리를 생성 2 동일한 genesis.json 파일을 이용해서 geth 초기화 3 명령 프롬프트(cmd.exe)를 3개 실행 4 첫번째 명령 프롬프트에서 node1의 geth를 실행 → 부트 노드로 활용 5 부트 노드의 enode 주소를 확인 6 두번째 명령 프롬프트에서 node2의 geth를 기동 → 일반 노드로 활용 7 일반 노드를 부트 노드에 피어로 등록 (node2에서) 8 세번째 명령 프롬프트에서 node3의 geth를 기동 → 채굴 노드로 활용 9 채굴 노드를 부트 노드의 피어로 등록 (node3에서) 10 node1에서 연결을 확인 11 node1에서 계정 생성 및 coinbase를 설정 12 node2에서 계정 생성 및 coinbase를 설정 13 node3에서 계.. 2019. 10. 8.
Remix 환경에서 계약 작성 Remix 접속 https://remix.ethereum.org/ HelloWorld.sol 파일 생성 (1) Environments로 Solidity 선택 (2) Compiler 버전 및 Auto Compile 선택 (3) New File 클릭 (4) HelloWorld.sol 입력 (5) OK 버튼 클릭 HelloWorld.sol 파일 작성 컴파일에 성공하면 Contract 선택창에 HelloWorld 계약이 추가됨 solidity 0.4.25 버전에서 warning을 제거한 코드 solidity 0.5.x 버전에서 warning과 error를 제거한 코드 2019. 10. 8.
콘솔에서 계약 배포, 실행 관리자 권한으로 명령어창 실행 npm을 이용해서 solc, web3 설치 텍스트 에디터를 이용하여 c:\testnet\HelloWorld.sol 파일을 작성 solc 모듈을 이용하여 계약을 컴파일 계약 배포에 필요한 ABI 정보와 바이트 코드를 추출 web3를 이용한 계약 배포 및 실행 Web3 { _requestManager: RequestManager { provider: HttpProvider { host: 'http://localhost:8545', timeout: 0, user: undefined, password: undefined, headers: undefined }, polls: {}, timeout: null }, currentProvider: HttpProvider { host: 'h.. 2019. 10. 4.
Postman을 이용한 RPC 테스트 Postman 다운로드 및 설치 https://www.getpostman.com/ https://dl.pstmn.io/download/latest/win64 JSON-RPC API https://github.com/ethereum/wiki/wiki/JSON-RPC https://github.com/ethereum/go-ethereum/wiki/Management-APIs Postman을 이용한 계정 생성 POST > http://localhost:8545 > Body > raw > JSON(application/json) personal_newAccount Generates a new private key and stores it in the key store directory. The key file .. 2019. 10. 4.
728x90
반응형