Ethereum java test
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
Blockchain projects require high efficiency, so most of the core source code development is using C / C + +. However, if you are doing a blockchain project, unless you need to make a lot of adjustments to the source code, you may not choose to use Java. For general DAPP applications, java development should also be a good choice. For example, in the case of Ethereum blockchain, there is a web3j class library for Java, which is very convenient; Bitcoin has bitcoin J class library, which is also easy to use. It still depends on the level of application, what to do, and the situation of the team
share two Java blockchain tutorials:
-
java bitcoin details
-
java Ethereum development
< / OL >
It's said that the currency circle has been going on for one day and the stock market has been going on for one year. Although it's a bit exaggerated, it's not unreasonable. In recent days, bitcoin has gone up sharply, but it has come down slightly today. It's estimated that no one can match the speed of the bull bear conversion in the currency circle. However, among many virtual currencies, how can we find high-quality projects? Xiaobian thinks that the bull market is not surprising. The key point is that the bear market still insists on giving weekly reports, at least for the projects with reliable teams. Today Xiaobian still brings you weekly reports of some high-quality projects. The following is the latest weekly project progress report (April 9-April 15, 2018) released by ubtc team. The specific information is as follows:
pre upgrade of Ub smart contract:
smart contract is one of the major milestones of the technology roadmap of bit fed project. In order to prepare for the implementation of smart contract on UB, the UB team made some adjustments on April 10, 2018, as follows:
1. The block speed was adjusted from 10 minutes to 1 minute
2. The difficulty adjustment cycle was once for 10 blocks
3. Block reward was adjusted to 1 ubtc
The total amount of ubtc was adjusted from 21 million to 20 million The mature period of reward was 7200 blocksthis adjustment requires users to download the latest version of the wallet to ensure that subsequent use will not be affected
wallet download link: https://www.ub.com/project/wallet
R & D:
1
2. Ubtc contract function continued internal test and bug repair
3. Ubtc contract function test documents continue to improve
4. Gjavac, gsharpc, uvmassassembler, uvmpackagegpc organize the code and open source on GitHub
5
Market:
1. Anybit mobile wallet charging UB award UB activity starts at 8:00 p.m. Beijing time on April 4, 2018, and ends at 8:00 p.m. Beijing time on April 15, 2018. During the activity, users who download anybit and recharge ubtc will get 1% reward, up to 1 ubtc. The event is limited to the top 1000
the reward is calculated based on the balance of ubtc at 8:00 p.m. Beijing time on April 15, 2018. The reward ubtc will be uniformly distributed to the corresponding ubtc address on April 16
2. The UB team held a fan meeting in Genesis block, Wanchai, Hong Kong from 7:00 to 9:00 p.m. on April 9. Mr. Wouter van der schagt, director and project CEO of Ub foundation, introced the project progress and planning to the fans. UB's major fan communities (wechat group, telegraph group, QQ group, beechat group, microblog, twitter, etc.) carried out real-time live picture push
3. On April 9, the microblog of "UB global support association" held a comment lottery to send UB customized hat and coat. Under the supervision and notarization of Weibo official lottery tool @ Weibo lottery platform, an enthusiastic fan in Ningbo was lucky to win. The fan has already received the prize, and in the microblog @ quiet style quiet style sun out the picture
4. On the 14th, UB team sent representatives to participate in the [chaine] blockchain Technology Salon Hosted by Babbitt and had interactive exchanges with the guests present. The salon was held in Yulong international building, Huli District, Xiamen city
5. Enthusiastic fans made the relevant expression pack (animation) for UB's upgrade and adjustment on the 10th, and spread it on wechat group P>
6, UB subscription number WeChat official account will be on the way to sign the lottery every day. Please look forward to it! p>
community release:
1. The last snapshot of issuing ubtc to Eth and LTC communities was completed on April 11, and the qualified addresses were released on May 2. Please refer to UB website for details www.ub.com The announcement in the news section on March 18
about ubtc:
unitedbitcoin, referred to as UB, code ubtc. UB is not only an upgraded version of bitcoin, but also a leading global blockchain ecosystem. UB is headed by Jeff garzik, a veteran of bitcoin, a core developer of bitcoin and a leader in the blockchain field
UB 100% inherits bitcoin's blockchain and upgrades and optimizes it. The upgrade and optimization of Ub include expanding the block size to 8MB, supporting segwit isolation witness, adding smart contract and lightning network, etc
UB is committed to bringing the inactive bitcoin credit into full play. Finally, based on these credits, we can issue stable currency anchored by legal currency, which can be used in a wide, fast, efficient and intelligent business society
at present, UB team has developed anybit mobile wallet app (anybit is a decentralized multi currency wallet APP), core, core QT and electrum wallet (electrum is a lightweight wallet supporting multi signature), and released a complete blockchain browser
more than 18 trading platforms around the world support ubtc trading
java_ The home value is: the directory where JDK is installed, and mine is C: 92; Program Files\ Java\ jdk1.6.0_ 34
the classpath value is:;% JAVA_ HOME%\ lib\ tools.jar;% JAVA_ HOME%\ lib\ dt.jar;% JAVA_ HOME%\ bin;( Pay attention to the & quot& quot; To add)
Path: append at the beginning.;% JAVA_ HOME%\ bin;% JAVA_ HOME%\ jre\ bin;( Pay attention to the & quot& quot; To add)
after the installation, you can check whether the JDK is installed successfully. Open the CMD window and enter Java – version to view the version information of JDK.
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.
at present, the central bank's research on digital currency is still at an early stage, and it only plans to launch digital currency, but it is still far away from issuing digital currency. When the central bank studies digital currency, it may study the existing mainstream digital currencies such as bitcoin, Ruitai, dogcoin, etc.
