阿拉贡 OSx 共同合同
这个软件包包含了Solity智能合同,供OSx框架使用并用于插件开发. 关于审计信息,参见 根级 README.md 中的“ 审计” 部分。 。 。 .
项目
这个 contracts 文件夹包括下列团结合同和库:
.
├── dao
│ └── IDAO.sol
├── permission
│ ├── PermissionLib.sol
│ ├── auth
│ │ ├── DaoAuthorizable.sol
│ │ ├── DaoAuthorizableUpgradeable.sol
│ │ └── auth.sol
│ └── condition
│ ├── IPermissionCondition.sol
│ ├── PermissionCondition.sol
│ └── PermissionConditionUpgradeable.sol
├── plugin
│ ├── IPlugin.sol
│ ├── Plugin.sol
│ ├── PluginCloneable.sol
│ ├── PluginUUPSUpgradeable.sol
│ ├── extensions
│ │ ├── governance
│ │ │ └── Addresslist.sol
│ │ ├── membership
│ │ │ └── IMembership.sol
│ │ └── proposal
│ │ ├── IProposal.sol
│ │ ├── Proposal.sol
│ │ └── ProposalUpgradeable.sol
│ └── setup
│ ├── IPluginSetup.sol
│ ├── PluginSetup.sol
│ └── PluginUpgradeableSetup.sol
└── utils
├── deployment
│ ├── ProxyFactory.sol
│ └── ProxyLib.sol
├── math
│ ├── BitMap.sol
│ ├── Ratio.sol
│ └── UncheckedMath.sol
└── versioning
├── IProtocolVersion.sol
├── ProtocolVersion.sol
└── VersionComparisonLib.sol
对于 插件开发,查找在 plugin 文件夹和代理服务器 utils/deployment 文件夹.
单位 contracts,第一次运行
yarn install
大楼
首先与
yarn build
这也会产生类型链绑定. 在你的智能合同的开发过程中, 变化会产生 装入已改变的型链绑定。 您可以删除过时的构建和类型链相关文件
yarn clean
这将执行 yarn typechain 再来一次 为方便起见 yarn clean && yarn build。 。 。 .
测试
为了测试你的合同,运行
yarn test
线性
将固态和类型脚本代码全部与
yarn lint
或单独使用
yarn lint:sol
财务报告和审定财务报表
yarn lint:ts
覆盖范围
生成代码覆盖报告
yarn coverage
天然气报告
请参看每个试验的气体使用量和每个方法的平均气体使用量
REPORT_GAS=true yarn test
,您可以永久启用气体报告,方法是设置 REPORT_GAS=true 输入 .env 文档.