Position: Home page » Ethereum » Ethereum JSON RPC request

Ethereum JSON RPC request

Publish: 2021-05-12 23:05:28
1. How to run Ethereum source code go Ethereum
install MIPS based Linux header file
$CD $prjroot / kernel
$tar - xjvf linux-2.6.38. Tar. Bz2
$CD linux-2.6.38

create an include folder under the specified path to store related header files< br />$ mkdir -p $TARGET_ Prefix / include

ensures that the Linux source code is clean
$make mrproper

generates the required header file< br />$ make ARCH=mips headers_ check
$ make ARCH=mips INSTALL_ HDR_ PATH=dest headers_ Install

all the files in dest folder to the specified include folder< br />$ cp -rv dest/include/* $TARGET_ Prefix / include

delete dest folder at last
$RM - RF dest
$LS - L $target_ PREFIX/include
2.

If you want to query the transaction records on the main network, you can use Etherscan. However, if you build your own private chain, how should you query the transaction records

the answer is that you need to listen to the logs on the chain, save them in the database, and then query them in the database. For example:

< pre t = "code" L = "Java" > varaddr = & quot& quot;< br />varfilter=web3.eth.filter({fromB lock:0 ,toBlock:' latest', address:addr });< br />filter.get(function(err,transactions){
transactions.forEach(function(tx){
vartxInfo=web3.eth.getTransaction(tx.transactionHash);
/ / at this time, the transaction information txinfo can be stored in the database
})< br />});

Web3. Eth. Filter() is used to monitor the log on the chain, and Web3. Eth. Gettransaction() is used to extract the information of the specified transaction. Once the transaction information is obtained, it can be stored in the database for query

recommend a practical introction, you can see: Ethereum tutorial

3. Send according to the standard JSON string format

JSON RPC is a standard
wiki.geekdream.com/specification/json RPC_ 2.0. HTML
here is the official document of 2.0. In addition, the package for parsing needs to be introced
4. jsonrpc = new JSONRpcClient("/ json-rpc"); // Instantiate JSON remote call
5. jQuery.post(url, [data], [callback], [type]
$.post(" test.php" name: " John" time: " 2pm"});
6. Security is a permanent topic. For web services based on WSDL and soap, we have WS security to guide the implementation of authentication, authorization, identity management and other security requirements. So, is there a mature specification or implementation framework for restful API? How to ensure the security of restful API
how to control the version of restful API
are the verbs given in the HTTP 1.1 specification sufficient for designing restful APIs? Do you expand your verbs in actual projects? When do you need to expand
What are the most valuable features of jax-rs 2.0 released in May this year for the design of rstful API? What problems are they used to solve
can you recommend a practical restful API development framework for InfoQ readers and explain your reasons for promotion
the http2.0 specification is under development. What are your expectations for it
InfoQ: what is a good restful API? I believe everyone has their own criteria. So, what characteristics do you think a good restful API should have?
7. I'm not God
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750