5 Star 8 Fork 3

Gitee 极速下载 / Truffle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/trufflesuite/truffle
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.

npm npm GitHub Discussions Coverage Status gitpoap badge


Truffle is a development environment, testing framework, and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. With Truffle you get:

  • Built-in smart contract compilation, linking, deployment and binary management.
  • Automated contract testing with Mocha and Chai.
  • Configurable build pipeline with support for custom build processes.
  • Scriptable deployment & migrations framework.
  • Network management for deploying to many public & private networks.
  • Interactive console for direct contract communication.
  • Instant rebuilding of assets during development.
  • External script runner that executes scripts within a Truffle environment.
ℹ️ Contributors: Please see the Development section of this README.

Install

$ npm install -g truffle

Note: To avoid any strange permissions errors, we recommend using nvm.

Quick Usage

For a default set of contracts and tests, run the following within an empty project directory:

$ truffle init

From there, you can run truffle compile, truffle migrate, and truffle test to compile your contracts, deploy those contracts to the network, and run their associated unit tests.

Truffle comes bundled with a local development blockchain server that launches automatically when you invoke the commands above. If you'd like to configure a more advanced development environment we recommend you install the blockchain server separately by running npm install -g ganache at the command line.

  • ganache: a command-line version of Truffle's blockchain server.
  • ganache-ui: A GUI for the server that displays your transaction history and chain state.

Documentation

Please see the Official Truffle Documentation for guides, tips, and examples.

Development

We welcome pull requests. To get started, just fork this repo, clone it locally, and run:

# Install
npm install -g yarn
yarn bootstrap

# Test
yarn test

# Adding dependencies to a package
cd packages/<truffle-package>
yarn add <npm-package> [--dev] # Use yarn

If you'd like to update a dependency to the same version across all packages, you might find this utility helpful.

Notes on project branches:

  • master: Stable, released version (v5)
  • beta: Released beta version
  • develop: Work targeting stable release (v5)
  • next: Not currently in use

Please make pull requests against develop.

There is a bit more information in the CONTRIBUTING.md file.

License

MIT

Copyright (c) 2015-2023 ConsenSys Software Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Truffle 是以太坊的开发环境,测试框架和资产管道,旨在使以太坊开发人员的生活更轻松 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/mirrors/Truffle.git
git@gitee.com:mirrors/Truffle.git
mirrors
Truffle
Truffle
develop

搜索帮助