1.0.1 • Published 4 years ago

solidity-common v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

背景介绍

    工程主要包含solidity常用函数等,持续丰富中...

主要目录

(base) ➜  Common git:(master) tree -L 2              
.
├── README.md                                   # 开箱指南
├── build                                       # 编译结果
│   └── contracts               
├── contracts                                   # 具体实现
│   ├── Migrations.sol                          # 迁移工具
│   ├── access                                  # 访问角色
│   ├── common                                  # 公共实现
│   ├── erc20                                   # 代币实现
│   ├── interface                               # 接口定义
│   ├── library                                 # 公共依赖
│   └── test                                    # 测试依赖
├── doc                                         # 文档信息
│   └── converage                               # 覆盖测试
│   └── solidity-common.html                    # 单元测试
├── migrations                                  # 部署文件
│   ├── 1_initial_migration.js                  # 迁移脚本
│   └── 2_deploy_common.js                      # 部署脚本
├── node_modules                                # 依赖文件
├── test                                        # 测试文件
│   ├── access              
│   ├── common              
│   ├── erc20               
│   └── library             
├── tool                                        # 测试工具    
│   ├── ethereum.js         
│   └── helper.js
├── .solcover.js                                # 覆盖配置
├── .solhint.json                               # 代码检查
├── package-lock.json
├── package.json
└── truffle-config.js

19 directories, 12 files

基础指南

添加依赖

"dependencies": {
    "solidity-common": "1.0.0"
  }

执行安装

npm install solidity-common --production

使用合约

pragma solidity >=0.5.0 <0.7.0;


import "solidity-common/contracts/common/AddressResolver.sol";


contract MixinResolver is AddressResolver {}

发布版本记录

1.0.02020-02-20

  1. 支持大部分常用模块,逐步测试完善。