How to enable RPC in Ethereum geth
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
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 />}); Pre >
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
Generally speaking, the steps of deploying smart contract are as follows:
- start an Ethereum node (such as geth or testrpc) Li >
- use Solc to compile smart contracts=& gt; Get the binary code Li >
- deploy the compiled contract to the network This step will consume Ethernet currency, and you need to use the default address or specified address of your node to sign the contract.)=& gt; Get the blockchain address and ABI of the contract (JSON representation of the contract interface, including variables, events and callable methods) The author confused ABI with contract interface here. ABI is the binary representation of the contract interface.) Li >
- use the JavaScript API provided by web3.js to call the contract Depending on the type of call, it may consume Ethernet currency.) li>
Ruitai coin has not been launched on the third-party platform, but it is rumored that it will also be launched on the third-party platform.
Hello, many examples are that eth. Getcompilers() returns solidity or configures Solc
and then reports error: the method eth_ Getcompilers does not exist / is not available error
because this method has been removed after 1.6, and it is not advisable to use lower version geth
solution:
< UL >start an Ethereum node (such as geth private chain or testrpc)
compile smart contracts with Solc
the compiled contract is deployed to the network
the JavaScript API provided by eb3.js is used to call the contract Depending on the type of call, it may consume Ethernet currency.)
hope to help you
1 start an Ethereum node (such as geth or testrpc)
2 use Solc to compile smart contracts=& gt; Get the binary code
3 deploy the compiled contract to the network This step will consume Ethernet currency, and you need to use the default address or specified address of your node to sign the contract.)=& gt; Get the blockchain address and ABI of the contract (JSON representation of the contract interface, including variables, events and callable methods) The author confused ABI with contract interface here. ABI is the binary representation of the contract interface.)
4 use the JavaScript API provided by web3.js to call the contract Depending on the type of call, it may consume Ethernet currency.)