셋팅방법
1. geth 폴더 생성
2. geth2 폴더 생성
3. geth3 폴더 생성
[1번 2번 3번 제네시스는 동일해야한다.]
4. genesis.json 폴더 안에 적용할것! C:\geth\
5. 시작-> 실행 -> cmd
6. cd D:\geth\
7. geth --datadir test0630 init genesis.json
8. geth --allow-insecure-unlock --networkid 119 --datadir test0630 --rpc --rpcport 8545 --rpccorsdomain "*" --rpcapi "admin,eth,miner,net,txpool,web3,personal" console
9. 시작-> 실행 -> cmd
10. cd D:\geth2\
11. geth --datadir test0630 init genesis.json
12. geth --ipcdisable --allow-insecure-unlock --networkid 119 --datadir test0630 --port 30304 --rpc --rpcport 8546 --rpccorsdomain "*" --rpcapi "admin,eth,miner,net,txpool,web3,personal" console
13. 시작-> 실행 -> cmd
14. cd D:\geth3\
15. geth --datadir test0630 init genesis.json
16. geth --ipcdisable --allow-insecure-unlock --networkid 119 --datadir test0630 --port 30305 --rpc --rpcport 8547 --rpccorsdomain "*" --rpcapi "admin,eth,miner,net,txpool,web3,personal" console
[참고 --nodiscover 사용해도 안해도 된다.]
시작-> 실행 -> cmd -> geth attach http://localhost:8545
personal.newAccount("1234")
admin.nodeInfo.enode
[첫번째 이노드 기억하기]
admin.addPeer("두분째이노드")
admin.addPeer("세번째이노드")
admin.peers
miner.start() and miner.stop()
net.peerCount
시작-> 실행 -> cmd -> geth attach http://localhost:8546
personal.newAccount("1234")
admin.nodeInfo.enode
[두번째 이노드 기억하기]
admin.addPeer("첫번째이노드")
admin.addPeer("세번째이노드")
admin.peers
miner.start() and miner.stop()
net.peerCount
시작-> 실행 -> cmd -> geth attach http://localhost:8547
personal.newAccount("1234")
admin.nodeInfo.enode
[세번째 이노드 기억하기]
admin.addPeer("두번째이노드")
admin.addPeer("세번째이노드")
admin.peers
miner.start() and miner.stop()
net.peerCount
[첫번째 서버 지갑]
> eth.accounts[0]
web3.fromWei(eth.getBalance(eth.accounts[0]))
[두번째 서버 지갑]
> eth.accounts[0]
web3.fromWei(eth.getBalance(eth.accounts[0]))
[새번째 서버 지갑]
> eth.accounts[0]
web3.fromWei(eth.getBalance(eth.accounts[0]))
//테스트로 해보기
personal.unlockAccount("첫번째 지갑주소", "taecheonin", 0)
eth.sendTransaction({from:"첫번째 지갑주소", to:"세번째지갑주소", value:web3.toWei(1,"ether")});
eth.getTransaction("햇시")
eth.getBlock(블록넘버)
web3.fromWei(eth.getBalance(eth.accounts[0]))
'복붙 노트' 카테고리의 다른 글
하모니카OS 외부 SSH접속시 타임아웃(timeouts) 나타날때 해결법 (0) | 2021.08.09 |
---|---|
윈도우 XAMPP 서버 운영 방법! (0) | 2021.08.02 |
윈도우용 프라이빗 이더리움 셋팅 방법 알아보자 (0) | 2021.07.14 |
메타마스크 & 카이카스 사용안하고 디앱 개발 결정!! (0) | 2021.07.02 |
트러플 스위트 가나쉬 와 메타마스크 연동하는 방법을 알아보자 (0) | 2021.06.21 |
댓글