Push the door of blockchain world : Play Block Browser

This article teaches you to play with the current mainstream application blockchain from the blockchain monitor, the block browser.

Push the door of blockchain world : Play Block Browser

As blockchain is gradually coming into the view of ordinary users, many interesting decentralized applications are becoming popular, such as the decentralized exchanges in the picture below (Uniswap, pancakeSwap, JustSwap, DefiBox), as well as DeFi protocols based on a variety of playgrounds, and so on.

Many blockchain whites may have taken the time and effort to learn blockchain for half a day, created a wallet, bought digital currency from various channels, and started to participate in a variety of DeFi applications in the wallet. So, did you get scammed after spending the money? Did you participate in the application according to the normal process? These are the things that ordinary non-blockchain technology users are most concerned about. Because they do not know how to ensure the security of their digital currency flow, or the security of their participation in the business, resulting in being cheated is common in the blockchain world.

This article teaches you to play the current mainstream application blockchain from the blockchain monitor – block browser, based on several modules in the blockchain browser such as transaction content view, transaction key data format, blockchain data storage, etc., and teaches you to learn blockchain from shallow to deep, refusing to be a “leek It teaches you to learn blockchain, refuse to be a “leek”, and self-identify the riskiness of the project and the security of the transaction.

Push the door of blockchain world : Play Block Browser
Figure 1 Uniswap – Ethereum chain
Push the door of blockchain world : Play Block Browser

Figure 2 PancakeSwap – BSC chain

Push the door of blockchain world : Play Block Browser
Figure 3 JustSwap – Tron Chain
Push the door of blockchain world : Play Block Browser
Figure 4 DefiBox – EOS Chain

Today’s lab starts from the blockchain browsers of several major blockchain platforms that support smart contracts, and takes you on a ride through the sea of blockchain. According to the language of writing smart contracts, this issue mainly explains the blockchain browsers that support Solidity language smart contracts (Ether) and C++ language smart contracts (Yuzu EOS).

Ethernet block browser
Ethereum is the first blockchain, followed by several public chains that operate and develop independently based on it, namely Tron, BSC, HECO and OKEXChain. As the Ether family, the browser products of these blockchain projects are subdivided into three different frameworks.

Etherscan, BscScan, HecoInfo
These three block browsers developed by the Etherscan browser team are nearly identical in terms of framework, data display and functions, and the detailed usage will be explained in a unified manner.

Push the door of blockchain world : Play Block Browser
Figure 5 Etherscan Browser Home Page
Push the door of blockchain world : Play Block Browser
Figure 6 BscScan Browser Home Page
Push the door of blockchain world : Play Block Browser
Figure 7 HecoInfo Browser Home Page

TRONSCAN Browser
Wavefield Browser combines the features of its own account model and the differences with Ether, and has a few differences from the first three in terms of framework, but there are still some commonalities in terms of function usage, data storage and coding.

Push the door of blockchain world : Play Block Browser
Figure 8 TRONSCAN Browser Home Page

OKT Browser
This browser is mainly integrated with several other blockchain project browsers in one platform, mainly for block data query, but other smart contract read/write functions and data can be implemented accordingly.

Push the door of blockchain world : Play Block Browser
Figure 9 OKT Browser Home Page

There are some common transaction categories in decentralized financial applications (DeFi), as well as different transaction information query portals in the block browser, through which information is used to correspond to different block browsers for information matching lookups to confirm whether the content of the transaction is consistent with what is carried out in the front end of the Dapp (to avoid front-end business mischief or errors resulting in the loss of digital currency assets).

1、Digital Currency Transfer

Nearly all DeFi protocols involve digital currency transfers, which bring digital currency benefits to project parties or users through different forms of operations such as digital currency exchange, locking, and pledging.

When the user performs the operation of spending digital currency in the front-end of DeFi protocol, the approve function and transferFrom function will be executed in the corresponding token contract, and then the block browser will be opened according to the transaction hash (absolute primary key, a unique query key for each transaction), personal wallet address (corresponding to (corresponding to multiple related address transactions), transaction events (corresponding to multiple identical transaction types), etc. to find the corresponding transactions.

Push the door of blockchain world : Play Block Browser
Figure 10 Example of defi transaction type query

The blockchain data shown in Figure 10 is for all transactions involving UNI tokens, so there are various transaction call functions.

Push the door of blockchain world : Play Block Browser
Figure 11 Token-based data query link
Push the door of blockchain world : Play Block Browser

Figure 12 Query page based on contract address

Push the door of blockchain world : Play Block Browser

Figure 13 Data query link based on contract address

2、Transaction matching query

Transaction method
According to the underlying coding of the Ethernet virtual machine, simply speaking, the transaction method (i.e. the function selector, corresponding to the different transactions in Figure 10) is the first 4 bits of an encrypted hash of the function body, as follows.

Push the door of blockchain world : Play Block Browser

Figure 14 Transaction method signature method

The same function will give the same result in both Etherscan and OKT browsers, as shown in the following example.

Push the door of blockchain world : Play Block Browser
Figure 15 swapExactTokensForTokens function method (shown by Etherscan)
Push the door of blockchain world : Play Block Browser

Figure 16 swapExactTokensForTokens function method (shown in OKT browser)

By querying the specified transaction in the block browser it is possible to compare the match with the actual transaction operation.

Transaction events

Transaction events are used to record a log of specified function calls, triggered one or more times in a unique call to a function, and allow the user to query whether the limited logged data is correct and matches the actual transaction function (e.g. whether the token flow is actually transferred to the address to be transferred, etc.) based on the content recorded in the event.

Like the transaction method, the event number (topic0, anonymous event is not specified) is cryptographically signed in the EVM (Ethernet Virtual Machine) in a declarative structure that can be used as an index for bulk lookup.

Push the door of blockchain world : Play Block Browser

Figure 17 Event topic0 signature method

Push the door of blockchain world : Play Block Browser

Figure 18 Batch lookup of specified events event

As shown in the figure above, this lookup method can only find part of the content in the existing block browser, and all the data needs to be synchronized with the whole node of the corresponding blockchain for lookup.

Transaction call data comparison

The most complete data comparison is to directly compare the function call data of the corresponding transaction. The comparison is not suitable for beginners, so we will not explain it in detail here.

Push the door of blockchain world : Play Block Browser
Figure 19 Comparison of call data (open source contract)
Push the door of blockchain world : Play Block Browser

Figure 20 Call data comparison (non-open source contract)

Take the transfer function as an example, you can compare the data consistency through the block browser, which is very convenient, and the Ethernet-based block browser provides the function of decoding the data, so you can see the call data more intuitively

Push the door of blockchain world : Play Block Browser
Figure 21 Comparison of transfer data (before decoding)
Push the door of blockchain world : Play Block Browser

Figure 22 Comparison of transfer data (after decoding)

The above functions can also be found and compared in other Ethernet block browsers, and the same block browser also provides many other functions, such as audit report query and so on. Qualified project parties will generally upload the audit report in the block browser, so that users can judge the project risk from the root, refuse to be blockchain illiterate and ensure the safety of digital assets. There are many other functions about the Ethernet block browser, such as decompiling bytecode, transfer transaction list, etc. It can be better used to analyze blockchain data and digital currency flow.

Yuzu EOS Block Browser
Secondly, we explain the usage of different block browsers by comparing several block browser products of Yuzu EOS chain. Generally speaking to know when a transfer will arrive, how high the current EOS transfer fees are, and how dirt cheap the address you are being transferred to is, it can all be shown directly through the blockchain browser. Of course, we can also check the transaction information contained in the block, as well as the block’s height, hash value, release time and miners mined. Some blockchain browsers also display the network-wide arithmetic power, arithmetic difficulty and some other reference contents.

EOS mainstream common block browsers include eosflare, eostracker, bloks.io, etc. Different browsers have their own advantages in blockchain data display and query, which will be introduced to you later.

Push the door of blockchain world : Play Block Browser
Figure 23 eosflare browser home page
Push the door of blockchain world : Play Block Browser

Figure 24 EOSTracker Browser Home Page

Push the door of blockchain world : Play Block Browser

Figure 25 bloks.io browser homepage

Since the design concept of EOS blockchain is different from that of Ether, its resource utilization and account model are very different from that of Ether, so this article will only explain the advantages and disadvantages of different EOS block browsers in terms of data comparison and query.
Take the USDT contract (account address tethertether) issued on the EOS blockchain as an example, to compare the advantages and disadvantages of data query.

  1. Transfer block information overview query
    Eosflare browser is mainly used to quickly browse the entire EOS blockchain data, query the specified contract account, block and other data, can not correspond to the specific contract storage data query and other fine query, which requires the user to cooperate with other EOS block browser to query data.
Push the door of blockchain world : Play Block Browser

Figure 26 Eosflare browser query page

2、Detailed transaction in block attribute query
The EOS Tracker browser is mainly used to assist in querying the complete transaction id and some other block properties of the transaction, so as to cooperate with other block browsers for detailed query.

Push the door of blockchain world : Play Block Browser

Figure 27 EOS Tracker browser query page

  1. Smart contract table storage query and detailed transaction query
    The Bloks.io browser provides a relatively comprehensive query of the detailed transaction information and storage information of the specified smart contract account, including transaction metadata, account information, resource consumption, and the specified queries of different storage tables. A comparison is made with two other block browsers and the actual participating Dapp transaction content to ensure that the transaction content is correct.
Push the door of blockchain world : Play Block Browser

Figure 28 Bloks.io browser query details of the transaction

Push the door of blockchain world : Play Block Browser

Figure 29 Bloks.io Browser Querying Smart Contract Storage Table Contents

The display and query of the blockchain world on the block browser is only an easy way to view and compare the limited data in this world, but it is more than enough for ordinary users to identify the security and flow of transactions of various smart contracts. The deeper mysteries of the entire blockchain ocean need to be explored one by one by building blockchain nodes and so on, and various practical tips on the application level of smart contracts will be said here for today, next time!

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/push-the-door-of-blockchain-world-play-block-browser/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-06-01 06:31
Next 2021-06-01 07:05

Related articles