JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 37
  • Score
    100M100P100Q33373F
  • License AGPL-3.0-or-later

The Aragon OSx contracts package containing common utilities

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.sol

    For 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 install

    Building

    First build the contracts with

    yarn build

    This 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 clean

    which will execute yarn typechain again. For convenience, use yarn clean && yarn build.

    Testing

    To test your contracts, run

    yarn test

    Linting

    Lint the Solidity and TypeScript code all together with

    yarn lint

    or separately with

    yarn lint:sol

    and

    yarn lint:ts

    Coverage

    Generate the code coverage report with

    yarn coverage

    Gas Report

    See the gas usage per test and average gas per method call with

    REPORT_GAS=true yarn test

    you can permanently enable the gas reporting by putting the REPORT_GAS=true into the .env file.