가상머신 클립보드 공유가 왜 안되는지 모르겠네여 여기 던지고 갑니다..
- !!!경로 고정!!!
cd C:\Users\wisep\Desktop\homerun\geth_data
- 로그 파일 테일링
파워쉘 키고Get-Content "C:\Users\wisep\Desktop\homerun\geth_data\geth.log" -Wait -Tail 10
geth account new --datadir .
-> address 획득. -> genesis.json의 alloc 필드 아래에 address,balance 형식 맞춰 지정
-> geth 재시작 -> eth.accounts
-> 지정한 address가 맞는지 확인
geth.log 파일로 로그 전달 (막줄 console부터 지우면 원래대로 가능)
geth --networkid 8484 --nodiscover --datadir . --port 30303 --http.addr "0.0.0.0" --http --http.port 8545 --http.corsdomain "*" --http.api="eth,net,web3,personal,web3,miner,admin,debug,rpc" --allow-insecure-unlock --miner.threads 2 console 2>> geth.log
**geth.log 파일로 로그 전달되게 해놓음 (막줄 console부터 지우면 원래대로 가능)
geth --networkid 8484 --nodiscover --datadir . --port 30304 --http.addr "0.0.0.0" --http --http.port 8545 --http.corsdomain "*" --http.api="eth,net,web3,personal,web3,miner,admin,debug,rpc" --allow-insecure-unlock --miner.threads 2 --ipcdisable console 2>> geth.log
geth attach http://localhost:8546
geth 실행 후 콘솔에서
personal.newAccount("[패스워드]");
eth.accounts;
eth.coinbase;
miner.start();
miner.stop();
eth.getBalance(주소)
web3.fromWei(eth.getBalance(주소), 'ether')
트랜잭션 생성 전 계정 잠금해제 필수
personal.unlockAccount(주소);
eth.sendTransaction({from: 계정1, to: 계정2, value: web3.toWei(얼마, "ether")});
eth.pendingTransaction;
먼저 geth_data/geth/chaindata
- 내부 파일 전체 수동 삭제
geth --datadir geth_data removedb;
geth --datadir . init genesis.json;
이거 엄청 많이 꼬였었는데 그래도 잘 안되면
C:\Users\wisep\AppData\Local\Ethereum\geth\chain_data
<- 내부 파일 모두 삭제
최후의 수단은 geth_data 폴더 전체 삭제하고 다시 geth init..