Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | Github | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

14.5. JSON RPC 原生交口调用

JSON RPC 文档 https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs

		
neo@MacBook-Pro ~ % curl -XPOST -H "Accept: application/json" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x5c18a33df2cc41a1beddc91133b8422e89f041b7", "latest"],"id":1}' http://localhost:8545 
{"jsonrpc":"2.0","id":1,"result":"0x153e5f3aeb667075800"}		
		
		
		
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'		

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"],"id":1}'