Blockchain Smart Contracts with Solidity · 课时

钱包、密钥与交易

了解加密密钥对、地址和签名交易如何让用户拥有资产并与 Ethereum 区块链交互。

第 4 / 4 课13 个步骤

钱包、密钥与交易 是 CoddyKit 上的免费 Blockchain Smart Contracts with Solidity 课时。 这是第 4 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Blockchain Smart Contracts with Solidity 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Blockchain Smart Contracts with Solidity 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

What Is a Crypto Wallet?

A wallet doesn't hold coins - it stores your private key and uses it to sign transactions. Your funds live on the blockchain, controlled by that key.

Public and Private Keys

A wallet is built on an asymmetric key pair. The private key is secret and signs transactions; the public key is derived from it and safe to share.

From Public Key to Address

An Ethereum address is the last 20 bytes of the hashed public key, shown as a hex string starting with 0x. It's your public on-chain identity.

Seed Phrases

Your seed phrase (12 or 24 words) deterministically generates all your keys. Anyone with it controls your funds - keep it offline and never share it.

What Is a Transaction?

A transaction is a signed instruction to change chain state - sending ETH or calling a contract. It carries sender, recipient, value, data, and a nonce.

The Nonce

The nonce is a per-account counter that climbs with every transaction. It blocks replay attacks and forces your transactions to execute in order.

Signing a Transaction

The wallet signs the transaction hash with your private key. The network checks the signature against your address - proving authorization without exposing the key.

Gas and Fees

Every transaction costs gas, paid in ETH, to reward validators for the computation. You set a gas limit and fee; contract calls cost more than a plain transfer.

Transaction Lifecycle

A transaction's lifecycle: pending in the mempool, included in a block, then confirmed as more blocks stack on top. More confirmations mean stronger finality.

Reading a Transaction Receipt

After execution you get a receipt showing status (success or revert), gas used, and any emitted events. Always check the status before assuming success.

Custodial vs Non-Custodial

With a non-custodial wallet you hold the keys and full control. A custodial one (like an exchange) holds them for you - "not your keys, not your coins."

Quick Check

Check your wallet and transaction knowledge.

Recap

Recap: wallets hold keys, not coins; addresses come from public keys; transactions are signed, ordered by nonce, and cost gas; receipts confirm success and custody sets control.

免费开始

用 AI 导师学习 Blockchain Smart Contracts with Solidity — 免费

在浏览器中编写并运行真实代码,获得全天候 AI 导师的即时帮助,并在网页或应用中继续学习。

课程
12
课程
48

常见问题解答

「钱包、密钥与交易」课时是免费的吗?

是的 — 「钱包、密钥与交易」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Blockchain Smart Contracts with Solidity 课程的其余内容,请升级到 CoddyKit PRO。 Blockchain Smart Contracts with Solidity 课程共包含 4 节课。

「钱包、密钥与交易」这节课中我会学到什么?

了解加密密钥对、地址和签名交易如何让用户拥有资产并与 Ethereum 区块链交互。 你通过在浏览器中直接运行的动手代码来练习 Blockchain Smart Contracts with Solidity,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Blockchain Smart Contracts with Solidity 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Blockchain Smart Contracts with Solidity 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 4 节课,共 4 节。

「钱包、密钥与交易」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Blockchain Smart Contracts with Solidity 课中编写并运行代码吗?

能。每节 Blockchain Smart Contracts with Solidity 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 什么是区块链技术
  2. Ethereum 基础与 EVM
  3. 您的第一个 Solidity 合约
  4. 钱包、密钥与交易
← 返回 Blockchain Smart Contracts with Solidity