Created
December 16, 2018 23:34
-
-
Save code-machina/10787a430b64a6039135f42d14eeb95a to your computer and use it in GitHub Desktop.
Ethereum JSON-RPC 명령어 모음 (geth, ethereum, json-rpc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ethereum 마이닝이 진행 중인지 확인한다. | |
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"eth_mining","params":[], "id":10}' ${RPC_HOST}:8545 | |
# output: {"jsonrpc":"2.0","id":10,"result":true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ethereum 계정의 목록을 확인한다. | |
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"personal_listAccounts","params":[], "id":10}' ${RPC_HOST}:8545 | |
# {"jsonrpc":"2.0","id":10,"result":["0x4.........."]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 현재 블록 수를 확인한다. | |
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"eth_blockNumber","params":[], "id":10}' ${RPC_HOST}:8545 | |
# output: {"jsonrpc":"2.0","id":10,"result":"0x1f2"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl 을 이용해 private network 의 geth json-rpc 인터페이스를 이용 할 수 있음