跳至主要内容

協助翻譯本頁面

🌏

由於尚未翻譯,本頁面內容以英文顯示。協助我們翻譯內容。

翻譯本頁面

這裡沒有漏洞!🐛

此頁面未翻譯,目前特意維持英文原文。

Development Networks

最後編輯: , Invalid DateTime
編輯頁面

When building an Ethereum application with smart contracts, you'll want to run it on a local network to see how it works before deploying it.

Similar to how you might run a local server on your computer for web development, you can use a development network to create a local blockchain instance to test your dapp. These Ethereum development networks provide features that allow for much faster iteration than a public testnet (for instance you don’t need to deal with acquiring ETH from a testnet faucet).

Prerequisites

You should understand the basics of the Ethereum stack and Ethereum networks before diving into development networks.

What is a development network?

Development networks are essentially Ethereum clients (implementations of Ethereum) designed specifically for local development.

Why not just run a standard Ethereum node locally?

You could run a node but since development networks are purpose-built for development, they often come packed with convenient features like:

  • Deterministically seeding your local blockchain with data (e.g. accounts with ETH balances)
  • Instantly mining blocks with each transaction it receives, in order and with no delay
  • Enhanced debugging and logging functionality

Available tools

Note: Most development frameworks include a built-in development network. We recommend starting with a framework to set up your local development environment.

Ganache

Quickly fire up a personal Ethereum blockchain which you can use to run tests, execute commands, and inspect state while controlling how the chain operates.

Ganache provides both a desktop application (Ganache UI), as well as a command-line tool (ganache-cli). It is part of the Truffle suite of tools.

  • Website
  • GitHub
  • Documentation

Hardhat Network

A local Ethereum network designed for development. It allows you to deploy your contracts, run your tests and debug your code.

Hardhat Network comes built-in with Hardhat, an Ethereum development environment for professionals.

Local Beacon Chains

Some consensus clients have built-in tools for spinning up local Beacon chains for testing purposes. Instructions for Lighthouse, Nimbus and Lodestar are available:

Public Ethereum Test-chains

There are also three current public test implementations of Ethereum. The recommended testnet with long-term support is Goerli. Sepolia is also expected to be maintained for the foreseeable future, but the validator set is permissioned meaning there is no general access to new validators on this testnet. The Ropsten chain is expected to be deprecated.

Further reading

Know of a community resource that helped you? Edit this page and add it!

這篇文章對您有幫助嗎?

👈

上一頁

Composability

下一頁

Development frameworks
👉
網站上次更新: 2022年9月23日

使用以太坊

  • 尋找錢包
  • 取得以太幣
  • 去中心化應用程式 (dapp)
  • 第二層
  • 執行節點
  • 穩定幣
  • Stake ETH

生態系統

  • 社群中心
  • 以太坊基金會
  • 以太坊基金會部落格
  • 生態系統支援計畫
  • 以太坊漏洞懸賞計畫
  • 生態系統獎助金計畫
  • 以太坊品牌資產
  • Devcon