Truffle – 安装依赖
项目中可以定义一个ethpm.json
文件,来配置依赖项。安装配置文件中配置的所有依赖项,运行:
$ truffle install
ethpm.json
文件示例:
文件: ethpm.json
{
"package_name": "adder",
"version": "0.0.3",
"description": "Simple contract to add two numbers",
"authors": [
"Tim Coulter <tim.coulter@consensys.net>"
],
"keywords": [
"ethereum",
"addition"
],
"dependencies": {
"owned": "^0.0.1"
},
"license": "MIT"
}
更多配置项,可参考官方文档。