banner
raye~

Raye's Journey

且趁闲身未老,尽放我、些子疏狂。
medium
tg_channel
twitter
github
email
nintendo switch
playstation
steam_profiles

Blockchain, smart contracts, Ethereum

First Experience with Web3

Today I had some free time to learn about these web3-related terms. It all started when I came across the website xlog.app, which is a web3 site. I created my own wallet on MetaMask and published my first article, which also marked my first transaction.

Since it was my first time encountering web3, I had been avoiding these concepts because they were hyped up before the New Year. But now, I finally have a platform to experience it.

This is my wallet public address, feel free to transfer funds 👏🏻

0x52a3Bff5da58A26E496981f2979138Fe6F6E8C97

When I wrote a blog post, there were several steps that I didn't understand at first. But then I realized that essentially, I was completing a transaction on the blockchain.

Since there was a transaction, there are several roles involved:

  • The initiator of the transaction, which is me. You can see the "From" field in the image below.
  • The recipient of the transaction, which is "Web3Entry," probably the account for xlog.
  • The transaction fee, which is the fee paid to the miner for helping verify and process the transaction.

How is the transaction fee calculated? It's simple, it's the workload multiplied by the unit price, usually represented in Gwei. Just remember that.

From the transaction details in the image below, you can see that the transaction fee for this transaction is 0.000138659 CSB (similar to the symbol for CNY).

This is the transaction details:

Untitled 1

https://scan.crossbell.io/tx/0x749c064da6f86d5d265422884475f78ec84b302bbdf9ab68577ddd6e70e2f222

Here, you can see who the corresponding miner is, and I thank them for helping me sign the transaction.

Untitled 2

This is a smart contract invocation, but we will discuss it later.

Untitled 3

For newcomers who have never encountered blockchain, all these strange terms can be confusing. But let's start studying them slowly.

Untitled 4

Rediscovering Wallets#

The concept of wallets is constantly evolving. For example, when I was young, I knew wallets as physical bags used to store personal money.

Untitled 5

As I grew older, I started having bank accounts, which became my wallets. However, for every transaction, I had to go to the bank or use self-service machines. These wallets were somewhere between virtual (electronic accounts) and physical (where you can still touch the money).

Later on, with the advent of WeChat, QQ, online banking, and QR code payments, online transfers became popular. At this point, wallets gradually moved away from the physical concept, and transactions and payments became digital.

Untitled 6

So, what about blockchain wallets? In essence, blockchain wallets do not actually store money. Instead, they act as guardians, helping you safeguard a pair of mysterious keys: the public key and the private key. The public key is like your email address, which you can safely share with others to receive digital currency. The private key, on the other hand, is your exclusive password that allows you to access and control your digital assets anytime, anywhere.

You might wonder, doesn't this mean that the amount of money I have is public information? Indeed, it is, but the wallet address and the user's real identity are not directly linked. In other words, you can see how much money is in a certain address, but you don't know who owns that address.

If you share your public key with someone, they can indeed see all your transaction records. For example, you can now see my transaction records:

0x52a3Bff5da58A26E496981f2979138Fe6F6E8C97 - Crossbell Explorer

After reading that, are you confused? Do you know what I did? /doge

Untitled 7

Behind the scenes, it's actually about blog publishing, commenting, liking, and other records. But once you see them, they don't really matter. /doge

Of course, there are some technologies like zero-knowledge proofs to protect the privacy of wallets, but that's a topic for another time.

If you want to publish articles on xlog, you first need to create a wallet. We can use the MetaMask wallet, which exists as a browser extension and can also be downloaded as an app on your phone.

During the initial creation, you will only receive a public-private key pair. The private key will not be given directly to you. Instead, you will receive a string of English mnemonic words, which are important for recovering your account in the future (or you can say it's the only way).

So, what's next after having a wallet?#

After having a wallet, you can naturally perform various money-related operations.

For example, receiving money.

Untitled 8

Just copy your account address, and you can claim CSB tokens from the Crossbell faucet. Isn't that great?

Although you can only claim 0.02 CSB, if you look at my previous article, it cost me 0.000138659 CSB, so you can see that this is a huge amount.

Crossbell Faucet

Untitled 9

After claiming, you can see your account balance on the Crossbell Chain, as well as your transaction history. Every time you publish an article, like, or comment on xlog, it will be recorded as a transaction on the Crossbell Chain.

Untitled 10

For example, liking an article is equivalent to initiating a transaction, which requires signing and recording. Publishing an article will prompt you about the CSB cost.

Untitled 11

Where is my article content stored?#

xlog uses IPFS technology for storage. IPFS is similar to BitTorrent but more advanced.

We all know that the more people downloading a file on BitTorrent, the faster the download speed. This concept is somewhat related to distributed storage. IPFS, on the other hand, is completely distributed. If the computer closest to you has the resource you need, it will directly transfer it to you via IPFS, without the need for a central server (like the infamous Baidu Cloud).

The following is the IPFS address, click on it to view.

Untitled 12

Summary#

In fact, getting started with the entire web3 process feels smooth, with no major obstacles. However, looking at some web3 concepts can be overwhelming and confusing, with no clear understanding.

Summary:

  • Wallets are constantly evolving. The implementation of blockchain wallets is different from regular wallets, as they record information using public-private key pairs.
  • Since they are wallets, they can manage assets just like regular wallets.
  • Blockchain wallets can interact with different chains, similar to interacting with different national banks (after all, the currencies are different).
  • Publishing articles on web3 is considered a transaction and will be recorded on the chain with your signature. Later, we will see that it is essentially a call to a smart contract.

References:

在区块链上搭建个博客站,永久 免费 简单 安全! - 无知便是罪 (xlog.app)

Notion+XLog 双保险自己的 Blog - oppenai.eth

从此开始 Web3 生活 - xcode.eth (xlog.app)

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.