Skip to content

Commit

Permalink
Merge branch 'init-overview-page' of github.com:thesis/acre into stak…
Browse files Browse the repository at this point in the history
…ing-flow
  • Loading branch information
kkosiorowska committed Dec 4, 2023
2 parents 2889487 + 1973e44 commit 64289d9
Show file tree
Hide file tree
Showing 38 changed files with 15,810 additions and 20,610 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Auto-fix linting
d2a058fe6cfbab6f82d0d977d1b2d8bd9f494df1
0976ac1b09b7257fe74389bafe94697059a07aed
50 changes: 30 additions & 20 deletions .github/workflows/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,40 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
cache: "pnpm"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Format
run: yarn format
run: pnpm run format

core-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
cache: "pnpm"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Build
run: yarn build
run: pnpm run build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
Expand All @@ -63,16 +67,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4


- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
cache: "pnpm"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- uses: actions/setup-python@v4
with:
Expand All @@ -98,15 +104,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
cache: "pnpm"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Download Build Artifacts
uses: actions/download-artifact@v3
Expand All @@ -115,23 +123,25 @@ jobs:
path: core/

- name: Test
run: yarn test --no-compile
run: pnpm run test --no-compile

core-deploy-dry-run:
needs: [core-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "core/.nvmrc"
cache: "yarn"
cache-dependency-path: "core/yarn.lock"
cache: "pnpm"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Download Build Artifacts
uses: actions/download-artifact@v3
Expand All @@ -140,4 +150,4 @@ jobs:
path: core/

- name: Deploy
run: yarn deploy --no-compile
run: pnpm run deploy --no-compile
22 changes: 10 additions & 12 deletions .github/workflows/dapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "dapp/.nvmrc"
cache: "yarn"
cache-dependency-path: "dapp/yarn.lock"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Format
run: yarn format
run: pnpm run format

dapp-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "dapp/.nvmrc"
cache: "yarn"
cache-dependency-path: "dapp/yarn.lock"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Build
run: yarn build
run: pnpm run build
22 changes: 10 additions & 12 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "website/.nvmrc"
cache: "yarn"
cache-dependency-path: "website/yarn.lock"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Format
run: yarn format
run: pnpm run format

website-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v2

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: "website/.nvmrc"
cache: "yarn"
cache-dependency-path: "website/yarn.lock"

- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile
run: pnpm install --prefer-offline --frozen-lockfile

- name: Build
run: yarn build
run: pnpm run build
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Node
node_modules/
pnpm-debug.log*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public-hoist-pattern[]=@chakra-ui/*
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
repos:
- repo: local
hooks:
# Root
- id: root-lint
name: "lint root"
entry: /usr/bin/env bash -c "npm run format"
exclude: (^core/|^dapp/|^website/)
language: script
description: "Checks code according to the package's linter configuration"
# Core
- id: core-lint-sol
name: "lint core sol"
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Packages that have own prettier configuration.
core/
dapp/
website/

# Auto-generated files.
pnpm-lock.yaml
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require("@thesis/prettier-config"),
}
6 changes: 6 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencyTypes": [
"prod",
"dev"
]
}
50 changes: 44 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ Bitcoin Liquid Staking

## Development

### pnpm

This project uses [pnpm](https://pnpm.io/) as a package manager.

#### Install

To install pnpm with Homebrew run `brew install pnpm`, for other installation options
please see the [documentation](https://pnpm.io/installation).

#### Package Dependencies

To install the packages dependencies run:

```sh
pnpm install
```

### Pre-commit Hooks

Developers are encouraged to use [pre-commit](https://pre-commit.com/) hooks to
Expand All @@ -14,19 +31,21 @@ automatically discover code issues, before they submit the code.
To setup the hooks follow the steps:

1. Install `pre-commit` tool:
```sh
brew install pre-commit
```

```sh
brew install pre-commit
```

2. Install the hooks for the repository:
```sh
pre-commit install
```
```sh
pre-commit install
```

#### Testing

To test the pre-commit hooks configuration you can invoke them with one of the
commands:

```sh
# Execute hooks for all files:
pre-commit run --all-files
Expand All @@ -35,6 +54,25 @@ pre-commit run --all-files
pre-commit run --files ./core/contracts/Acre.sol
```

### Syncpack

[Syncpack](https://jamiemason.github.io/syncpack/) is a tool that helps manage
multiple package.json files in a monorepo.

#### Usage

To list dependencies from all packages run:

```sh
pnpm syncpack list
```

To update a dependency (e.g. `eslint`) in all packages run:

```sh
pnpm syncpack update --filter eslint
```

### Slither

[Slither](https://github.com/crytic/slither) is a static analysis framework used
Expand Down
4 changes: 1 addition & 3 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Hardhat
build/
cache/
export.json
export/
node_modules/
typechain/
yarn-debug.log*
yarn-error.log*
2 changes: 1 addition & 1 deletion core/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
...require("@thesis-co/prettier-config"),
...require("../.prettierrc.js"),
plugins: ["prettier-plugin-solidity"],
overrides: [
{
Expand Down
Loading

0 comments on commit 64289d9

Please sign in to comment.