Installation

$ npm install -g truffle

Choose ethereum client (Ganache OR truffle build in `truffle develop`)

https://www.trufflesuite.com/docs/truffle/reference/choosing-an-ethereum-client

Creating a project

$ mkdir truffle-hello

$ cd truffle-hello

$ truffle init  # without default contract

OR

$ truffle unbox <box-name>  # box-name like MetaCoin

Compiling Contracts

$ truffle compile  # all placed in build/contracts/, dot not edit these .json files

Running Migrations

$ truffle migrate [--reset]  # run scripts that located in migrations/,Be sure have Ganache installed and running, default choose Ganache network

Deployer https://www.trufflesuite.com/docs/truffle/getting-started/running-migrations#deployer

Testing Contracts

$ truffle test [./tests/hello.js]  # NOTE:  default network is 'development', so truffle-config.js network configuration need to match the Ganache host and port

Writing tests in javascript

$ truffle test

https://www.trufflesuite.com/docs/truffle/testing/writing-tests-in-javascript

Another tool, openzeppelin/cli 开发, 部署, 升级智能合约

demo: https://github.com/farwish/truffle-hello.git

docs:https://www.trufflesuite.com/docs/truffle/getting-started/installation

link:https://www.cnblogs.com/farwish/p/12310551.html

[Contract] Truffle 使用流程的更多相关文章

  1. Mac下基于testrpc和truffle的以太坊智能合约开发环境搭建

    原文地址:石匠的blog truffle是一个基于Javascript开发的一套智能合约开发框架,使用Solidity语言编写合约.truffle有一套自动的项目构建机制,集成了开发,测试和部署的各个 ...

  2. BOOM -- 智能合约编程

    译注:原文首发于ConsenSys开发者博客,原作者为Eva以及ConsenSys的开发团队.如果您想要获取更多及时信息,可以访问ConsenSys首页点击左下角Newsletter订阅邮件.本文的翻 ...

  3. Truffle Smart Contract Error: Invalid number of parameter

      I followed the tutorial of quorum with truffle: https://truffleframework.com/tutorials/building-da ...

  4. Truffle框架环境搭建

    注意:本教程需要Truffle4.0或者是更高的版本 以太坊的智能合约只是代码,和我们的纸质代码不同,此合同需要非常精确的方式理解 如果合同编码不正确,我们的交易可能会失败,会导致gas的损失,更不用 ...

  5. 用Solidity在Truffle上构建一个HelloWorld智能合约

    原文地址:石匠的blog Truffle的环境安装在前文已经整理,这次用Solidity在Truffle写一个HelloWorld以太坊智能合约,并在testrpc上进行测试.当前的软件版本信息如下: ...

  6. truffle框架快速开发合约步骤

    矩阵元区块链智能合约开发指南 1 适用范围 本规范描述了矩阵元区块链系统智能合约的开发约束与规范,用以指导DAPP开发者按照本规范开发基于矩阵元区块链运行的应用. 2 术语解释 术语 术语解释 DAP ...

  7. Android应用层View绘制流程与源码分析

    1  背景 还记得前面<Android应用setContentView与LayoutInflater加载解析机制源码分析>这篇文章吗?我们有分析到Activity中界面加载显示的基本流程原 ...

  8. 10,SFDC 管理员篇 - 流程自动化

    1,Process Builder Setup | Build | Create | Workflow & Approvals | Process Builder 当我们在对象中创建或者修改一 ...

  9. App开发到App Store上架,发布流程。

     http://blog.csdn.net/wojsg001/article/details/12005887 App开发到App Store上架,发布流程. 分类: IOS2013-09-25 11 ...

  10. Yii处理流程

    Yii的应用程序处理流程 用户访问URL http://www.example.com/blog/index.php?r=site/contact 1.入口脚本被网站服务器执行以处理此请求. 2.一个 ...

随机推荐

  1. 「AntV」全球AQI数据获取与L7可视化

    1. 引言 L7 地理空间数据可视分析引擎是一种基于 WebGL 技术的地理空间数据可视化引擎,可以用于实现各种地理空间数据可视化应用.L7 引擎支持多种数据源和数据格式,包括 GeoJSON.CSV ...

  2. 记录--前端中 JS 发起的请求可以暂停吗

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 在前端中,JavaScript(JS)可以使用XMLHttpRequest对象或fetch API来发起网络请求.然而,JavaScrip ...

  3. 记录--啊?Vue是有三种路由模式的?

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 众所周知,vue路由模式常见的有 history 和 hash 模式,但其实还有一种方式-abstract模式(了解一哈~) 别急,本文我 ...

  4. 记录-Symbol学习笔记

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 Symbol是JavaScript中的原始数据类型之一,它表示一个唯一的.不可变的值,通常用作对象属性的键值.由于Symbol值是唯一的, ...

  5. Android 接收微信、QQ其他应用打开,第三方分享

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 在AndroidManifest.xml注册ACTION事件 <activity android:name="com.te ...

  6. 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第10章

    本章勘误: 暂无,等待细心的你告诉我哦. 本章注解: 暂无 本章释疑: 暂无,等待你的提问 致谢: MVP 林德熙 MVP 吕毅 sPhinX 相关链接 试读记录

  7. GridSearch 最佳 estimator 设置问题

    GridSearchCV 最佳 estimator 设置问题 def train_model_Grid(estimator, param_grid, cv, X_train, X_test, y_tr ...

  8. spring boot @Scheduled

    例子 @EnableScheduling @Component public class Job { /** * 每秒执行一次 */ @Scheduled(cron = "0/1 * * * ...

  9. fs.1.10 ON CENTOS7 docker镜像制作

    概述 freeswitch是一款简单好用的VOIP开源软交换平台. centos7 docker上编译安装fs1.10版本的流程记录. 环境 docker engine:Version 24.0.6 ...

  10. 如何使用Java代码混淆技术保护您的应用程序

    摘要 本文探讨了代码混淆在保护Java代码安全性和知识产权方面的重要意义.通过混淆技术,可以有效防止代码被反编译.逆向工程或恶意篡改,提高代码的安全性.常见的Java代码混淆工具如IPAGuard.A ...