Ethereum exchange docking agreement
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
Log in to the official website, click the "recharge" button on the top right of the page, in the [recharge withdrawal] mole, click [eth] - [eth recharge], select the default recharge account as [RMB spot account], check your recharge address, and then recharge through Ethereum wallet
expansion:
1. Ethereum is not an organization, but an underlying system that can realize intelligent contract and open source on the blockchain. From its birth to may 2017, Ethereum has more than 200 Ethereum applications around the world in just three and a half years. Ethereum is a platform and a programming language, which enables developers to build and release the next generation of distributed applications
Ethereum can be used to program, distribute, guarantee and trade anything: voting, domain names, financial exchanges, crowdfunding, corporate management, contracts and most of the agreements, intellectual property, and smart assets that benefit from hardware integration. On June 12, 2017, the price of Ethernet currency broke through $400, a record high. From $8 in February 2017 to $400 on June 15, 2017, the price of Ethernet currency has increased 50 times. At the same time, the price of bitcoin has eased, 10% lower than the previous peak, and the price of ether coin is much better; Take over & quot; Bitcoin continues to soarEthernet coin is a kind of digital token of Ethereum, because Ethereum needs to use the token eth to support the application. Ethereum can also trade on trading platforms. In short, Ethereum is a platform and a programming language, which enables developers to build and release the next generation of distributed applications
Ethereum can be used to program, guarantee and trade, as well as to organize voting, domain name trading, financial trading platform, online crowdfunding, management company,
formulate contracts and most of the agreements, and integrate intelligent assets of hardware
the reason why the price of Ethereum can soar is not only e to the promotion and publicity of Ethereum community, but more importantly, virtual currency investors are looking for investment procts to replace bitcoin
a series of problems, such as bitcoin being regulated by the domestic central bank and being refused to apply for ETF listing, have led investors to look down on the prospect of bitcoin. At this time, the emergence and promotion of Ethereum are favored by these virtual currency investors
btctrade platform (bitcoin trading network) www.btctrade.com As the largest and most reliable trading platform in China, Ethereum trading was launched as early as November. Ethereum was about 50 yuan when it was online, and now it has risen to 300 yuan, which is amazing! It remains to be seen whether the future of eth will be as good as bitcoin!
& gt; eth.estimateGas({ from:eth.accounts [1], to: eth.accounts[2], value:50000000000000 })
21001
> Eth. Gasprice
2000000000
as above, the account [1] = & gt; The transaction of account [2] needs 21001 gas, and the current gasprice is 2000000000. Let's verify that
unlock account 1, send this transaction, and start mining packaging
