Skip to content

Commit 22f04e5

Browse files
authored
Merge pull request #10 from privacy-scaling-explorations/docs/readmes
Adding READMEs
2 parents f213632 + 55f6037 commit 22f04e5

File tree

2 files changed

+172
-3
lines changed

2 files changed

+172
-3
lines changed

README.md

+97-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,98 @@
1-
# excubiae
1+
# Excubiae
22

3-
an on-chain flexible & modular framework for implementing custom gatekeepers.
3+
Excubiae is a composable framework for creating custom attribute-based access control policies on EVM-compatible networks.
4+
5+
It provides a set of abstract and flexible smart contracts, known as "gatekeepers," to streamline the definition of reusable criteria. These solution-agnostic contracts enforce checks against user-provided evidence and track those who satisfy the requirements.
6+
7+
This approach enables seamless interoperability across different protocols. For instance, a single check could combine verifiable attributes from Semaphore and MACI, ensuring flexible and composable access control. Indeed, for example, you can define criteria to verify token ownership and/or validate a zero-knowledge proof (ZKP). Using these criteria, you can create a policy to enforce the checks and integrate it seamlessly into your smart contract logic. A practical use case might involve requiring verification before registering a new voter for a poll (e.g., in a MACI-based voting system).
8+
9+
You can learn more in this [design document](https://hackmd.io/@0xjei/B1RXoTh71e).
10+
11+
> [!IMPORTANT]
12+
> Excubiae is currently in the MVP stage. Official documentation and audits are not yet available. Expect fast development cycles with potential breaking changes — use at your own risk!
13+
14+
## Installation
15+
16+
Clone this repository:
17+
18+
```bash
19+
git clone https://github.com/privacy-scaling-explorations/excubiae.git
20+
```
21+
22+
and install the dependencies:
23+
24+
```bash
25+
cd excubiae && yarn
26+
```
27+
28+
## Usage
29+
30+
### Format
31+
32+
Run [Prettier](https://prettier.io/) to check formatting rules:
33+
34+
```bash
35+
yarn format
36+
```
37+
38+
or to automatically format the code:
39+
40+
```bash
41+
yarn format:write
42+
```
43+
44+
### Lint
45+
46+
Combination of [ESLint](https://eslint.org/) & [Solhint](https://protofire.github.io/solhint/)
47+
48+
```bash
49+
yarn lint
50+
```
51+
52+
### Testing
53+
54+
Test the code:
55+
56+
```bash
57+
yarn test
58+
```
59+
60+
### Build
61+
62+
Build all packages & apps:
63+
64+
```bash
65+
yarn build
66+
```
67+
68+
Compile all contracts:
69+
70+
```bash
71+
yarn compile:contracts
72+
```
73+
74+
### Releases
75+
76+
1. Bump a new version of the package with:
77+
78+
```bash
79+
yarn version:bump <package-name> <version>
80+
# e.g. yarn version:bump excubiae 0.2.0
81+
```
82+
83+
This step creates a commit and a git tag.
84+
85+
2. Push the changes to main:
86+
87+
```bash
88+
git push origin main
89+
```
90+
91+
3. Push the new git tag:
92+
93+
```bash
94+
git push origin <package-name>-<version>
95+
# e.g. git push origin excubiae-v0.2.0
96+
```
97+
98+
After pushing the new git tag, a workflow will be triggered and will publish the package on [npm](https://www.npmjs.com/) and release a new version on Github with its changelogs automatically.
+75-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,75 @@
1-
contracts/README.md
1+
# Excubiae Smart Contracts
2+
3+
This package contains the smart contracts which define the composable framework for building custom attribute-based access control policies on Ethereum.
4+
5+
You can learn more in the Smart Contracts section of this [design document](https://hackmd.io/@0xjei/B1RXoTh71e#Smart-Contracts).
6+
7+
> [!IMPORTANT]
8+
> Excubiae is currently in the MVP stage. Official documentation and audits are not yet available. Expect fast development cycles with potential breaking changes — use at your own risk!
9+
10+
## Installation
11+
12+
You can install the excubiae contracts with any node package manager (`bun`, `npm`, `pnpm`,`yarn`):
13+
14+
```bash
15+
bun add @excubiae/contracts
16+
npm i @excubiae/contracts
17+
pnpm add @excubiae/contracts
18+
yarn add @excubiae/contracts
19+
```
20+
21+
## Usage
22+
23+
This package is configured to support the combination of [Hardhat](https://hardhat.org/) and [Foundry](https://book.getfoundry.sh/), see the Hardhat's [documentation](https://hardhat.org/hardhat-runner/docs/advanced/hardhat-and-foundry) to learn more.
24+
25+
### Compile contracts
26+
27+
Compile the smart contracts with [Hardhat](https://hardhat.org/):
28+
29+
```bash
30+
yarn compile:hardhat
31+
```
32+
33+
Compile the smart contracts with Foundry's [Forge](https://book.getfoundry.sh/forge/):
34+
35+
```bash
36+
yarn compile:forge
37+
```
38+
39+
Run both in one command:
40+
41+
```bash
42+
yarn compile
43+
```
44+
45+
### Testing
46+
47+
Run [Mocha](https://mochajs.org/) to test the contracts (Typescript tests):
48+
49+
```bash
50+
yarn test:hardhat
51+
```
52+
53+
Run Foundry's [Forge](https://book.getfoundry.sh/forge/) to test the contracts (Solidity tests):
54+
55+
```bash
56+
yarn test:forge
57+
```
58+
59+
Run both in one command:
60+
61+
```bash
62+
yarn test
63+
```
64+
65+
You can also generate a test coverage report:
66+
67+
```bash
68+
yarn test:coverage
69+
```
70+
71+
Or a test gas report:
72+
73+
```bash
74+
yarn test:report-gas
75+
```

0 commit comments

Comments
 (0)