Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (giorgi-osx-commons-contracts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Aragon OSx Commons Contracts
This package contains the Solidity smart contracts to be used by the OSx framework and for plugin development. For audit information, refer to the 'Audits' section in the root level README.md.
Project
The contracts folder includes the following Solidity contracts and libraries:
.
├── 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.solFor plugin development, find the plugin base classes provided in the plugin folder and proxy deployment helpers in the utils/deployment folder.
In contracts, first run
yarn installBuilding
First build the contracts with
yarn buildThis will also generate the typechain bindings. During development of your smart contracts, changes can result in altered typechain bindings. You can remove the outdated build- and typechain-related files with
yarn cleanwhich will execute yarn typechain again. For convenience, use yarn clean && yarn build.
Testing
To test your contracts, run
yarn testLinting
Lint the Solidity and TypeScript code all together with
yarn lintor separately with
yarn lint:soland
yarn lint:tsCoverage
Generate the code coverage report with
yarn coverageGas Report
See the gas usage per test and average gas per method call with
REPORT_GAS=true yarn testyou can permanently enable the gas reporting by putting the REPORT_GAS=true into the .env file.