简体   繁体   中英

Can information be read on public blockchain even if you arent the owner?

Let's imagine I write information on a public blockchain like Ethereum, in plain text. This information could be a transaction or even a smart contract that I deployed. Can another user read this information in the blockchain? As we are talking about a public network I guess this information is available for everyone, right? And if that is, how? For example, can another user, with the block number or the transaction ID go to etherscan and in same way read the code of my smart contract? How?

Public data is by definition public. It means everybody can read it.

You can read the data by using a blockchain explorer or reading the data directly from your Ethereum node.

While binary data is always public, human-readable data often needs an ABI file . With the ABI file, Ethereum JSON-RPC access you can use a library like Web3.js or Web3.py to read the data easily.

The plain code no, like the solidity source code. But it's possibile to "decompile" the ABI and get a "raw" version of your code. You can upload the source code then verify the smart contract on the scanner (for eth etherscan.io ), this process enforce the "credibility" of your contract.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM