Skip to content

Commit

Permalink
Merge branch 'main' into staking
Browse files Browse the repository at this point in the history
  • Loading branch information
r-czajkowski committed Nov 2, 2023
2 parents a492db3 + 012b8a9 commit d05b1c6
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 7 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/core.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Core

on:
push:
branches:
- main
paths:
- "core/**"
pull_request:

defaults:
run:
working-directory: ./core

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

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

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

- name: Format
run: yarn format

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

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

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

- name: Build
run: yarn build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: core-build
path: |
core/build/
core/typechain/
if-no-files-found: error

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

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

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

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: core-build
path: core/

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

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

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

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

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: core-build
path: core/

- name: Deploy
run: yarn deploy --no-compile
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: local
hooks:
- id: lint-sol
name: "lint core sol"
entry: /usr/bin/env bash -c "cd core/ && npm run lint:sol"
files: '\.sol$'
language: script
description: "Checks solidity code according to the package's linter configuration"
- id: lint-js
name: "lint core ts/js"
entry: /usr/bin/env bash -c "cd core/ && npm run lint:js"
files: '\.(ts|js)$'
language: script
description: "Checks TS/JS code according to the package's linter configuration"
- id: lint-config
name: "lint core json/yaml"
entry: /usr/bin/env bash -c "cd core/ && npm run lint:config"
files: '\.(json|yaml)$'
language: script
description: "Checks JSON/YAML code according to the package's linter configuration"
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eslint.workingDirectories": [
"./core/",
],
}
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
# litmus
# Acre

Bitcoin Liquid Staking

[![Core](https://github.com/thesis/acre/actions/workflows/core.yaml/badge.svg?branch=main&event=push)](https://github.com/thesis/acre/actions/workflows/core.yaml)

## Development

### Pre-commit Hooks

Developers are encouraged to use [pre-commit](https://pre-commit.com/) hooks to
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
```

2. Install the hooks for the repository:
```sh
pre-commit install
```
1 change: 1 addition & 0 deletions core/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
4 changes: 2 additions & 2 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Litmus
# Acre

Litmus is a “liquid staking” solution that allows people to earn yield on their Bitcoin via yield farming on Ethereum.
Acre is a “liquid staking” solution that allows people to earn yield on their Bitcoin via yield farming on Ethereum.
2 changes: 1 addition & 1 deletion core/contracts/Litmus.sol → core/contracts/Acre.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ pragma solidity ^0.8.21;
// Uncomment this line to use console.log
// import "hardhat/console.sol";

contract Litmus {
contract Acre {
// TODO: add your implementation
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments } = hre
const { log } = deployments

log("Deploying Litmus contract")
log("Deploying Acre contract")
}

export default func

func.tags = ["Litmus"]
func.tags = ["Acre"]
2 changes: 1 addition & 1 deletion core/test/Litmus.test.ts → core/test/Acre.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe("Litmus", () => {
describe("Acre", () => {
describe("Add your tests", () => {
it("Should validate something", async () => {})
})
Expand Down

0 comments on commit d05b1c6

Please sign in to comment.