@daostack/arc

中文文档
0.0.1-rc.57发布于 2021/04/09GPL-3.0近 30 天下载 3269

A platform for building DAOs

原始使用文档
文档目录6 节
  1. Security
  2. Getting Started
  3. Contribute
  4. Commands
  5. Docker
  6. License

DEVELOPMENT OF THIS PACKAGE HAS MOVED TO: https://github.com/daostack/alchemy-monorepo/tree/dev/packages/arc***

Build Status NPM Package Join the chat at https://gitter.im/daostack/Lobby

Arc

Arc is the base layer of the DAO stack. It consists of a set of smart contracts deployed on the Ethereum blockchain that define the basic building blocks and standard components that can be used to implement any DAO.

Arc is a modular, upgradeable platform that allows for a rapid natural selection of governance systems.

Arc Structure Diagram

Figure 1: Arc's structure

Every box in Figure 1 represents a smart contract.

The Token contract probably does not require an explanation, being the most popular use-case of the Ethereum network.

The Avatar contract is the face of an organization on the blockchain, e.g. if the organization is to hold ownership of anything, like ownership over a contract or asset, the owner address will be the Avatar.

The Reputation contract stores a DAO's reputation data. In Arc, Reputation represents a user's decision power in a given DAO. It is very similar to a token, with two main differences: one, it is non-transferable, and two, it can be granted or taken away by the DAO.

On the right side of the figure we have the schemes. Schemes are simple pieces of logic describing the different actions a DAO can take. One example is a scheme for funding proposals, in which everyone can suggest and vote on proposals, and if a proposal is approved, it is automatically funded.

At the bottom are the global constraints. Global constraints prevent current and future modules from breaking certain overarching rules, e.g. a cap on an organization’s total possible reputation.

The Controller is an access control module that keeps a record of all the registered schemes in a DAO and the permissions for each scheme. It also records all global constraints and enforces them by reverting transactions that violate them.

Go here for a full primer on Arc.

Security

DAOstack Arc is still in its alpha version. Arc is intended to provide secure, tested, and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions and any security problem you might experience.

Getting Started

  1. Please install Truffle and initialize your project with truffle init.
    npm install -g truffle
    mkdir myproject && cd myproject
    truffle init
    
  2. Install the @daostack/arc package: npm install @daostack/arc.
    • .sol Source code is found under node_modules/@daostack/arc/contracts
    • .json Compiled contracts are found under node_modules/@daostack/arc/build/contracts
  3. Import in your project:
    import '@daostack/arc/contracts/universalSchemes/UniversalScheme.sol';
    
    contract MyContract is UniversalScheme {
      ...
    }
    
    You should be able to find the @daostack/arc contracts (.json) already built and ready for deployment in the node_modules/@daostack/arc/build/contracts/ folder.
  4. Read the documentation to get a better understanding of how to use Arc.

Contribute

PRs are welcome, but please first consult with the Contribution guide.

Join us on Discord!

To contribute to Arc development start by cloning the repo and installing the dependencies:

git clone https://github.com/daostack/arc
cd arc
npm install

Commands

Available commands while developing:

  • npm run build - Compile all contracts to the build/ folder.
  • npm run test - This will run ganache-cli, compile, migrate and run all tests.
  • npm run lint - Check all JavaScript code for style & good practices.
  • npm run solhint - Check all Solidity code for style & good practices.
  • npm run docs:<update|build|deploy|preview> - See this for details.

Docker

Arc has a prebuilt Docker image that makes development environments consistent and cross-platform. To start developing inside this environment:

  1. Install Docker in your favorite OS/platform.
  2. Run docker run --rm -it -v <path to repo>:/home/arc daostack/arc (*May require Admin/root permissions).
  3. The container will automatically git clone or git fetch depending on if <path to repo> is empty, and will install any dependencies.
  4. Continue development inside the container.

License

This is an open-source project (GPL license).

版本与发布记录

@daostack/arc 共发布 84 个版本,首次发布于 2018/02/06;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.1-rc.57latest2021/04/095 年前
0.0.1-rc.562021/02/045 年前
0.0.1-rc.552020/12/245 年前
0.0.1-rc.542020/12/235 年前
0.0.1-rc.532020/12/205 年前
0.0.1-rc.522020/12/135 年前

关于 @daostack/arc 的常见问题

@daostack/arc 是什么?

A platform for building DAOs

如何安装 @daostack/arc?

在项目目录运行 npm install @daostack/arc,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:ganache-cli(^6.4.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@daostack/arc 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/daostack__arc 是否存在。

@daostack/arc 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=12.16.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@daostack/arc 可以商用吗?

@daostack/arc 使用 GPL-3.0 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以 GPL-3.0 兼容许可开源,并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@daostack/arc 的下载量有多少?

根据 npm 官方下载统计,@daostack/arc 在 2026/10/12 – 2026/11/10 这 30 天内被下载 3,269 次,日均约 109 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@daostack/arc 还在维护吗?

最新版本 0.0.1-rc.57 发布于 2021/04/09(5 年前);至今共发布 84 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/02/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。