Skip to content

Commit 422eb1d

Browse files
authored
Merge pull request #20 from Gearbox-protocol/next
feat: version 3.1
2 parents 31349a1 + 64fad17 commit 422eb1d

File tree

133 files changed

+23012
-2727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+23012
-2727
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.github
2+
.husky
3+
.vscode
4+
broadcast
5+
cache
6+
forge-out
7+
node_modules
8+
out

.github/workflows/pr.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,41 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
submodules: recursive
22+
23+
- name: Use Latest Corepack
24+
run: |
25+
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
26+
npm install -g corepack@latest
27+
echo "After : corepack version => $(corepack --version)"
28+
corepack enable
29+
pnpm --version
1930
2031
- name: Setup node.js
21-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
2233
with:
23-
cache: "yarn"
34+
cache: "pnpm"
2435
node-version-file: ".nvmrc"
2536

2637
- name: Configure access to private npm packages
2738
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc
2839

2940
- name: Install dependencies
3041
run: |
31-
yarn install --frozen-lockfile
42+
pnpm install --frozen-lockfile
3243
3344
- name: Install Foundry
3445
uses: foundry-rs/foundry-toolchain@v1
3546
with:
36-
version: nightly
47+
version: stable
3748

3849
- name: Run forge tests
3950
run: forge test
4051
timeout-minutes: 10
4152

4253
- name: Perform checks
4354
run: |
44-
yarn prettier:ci
55+
pnpm prettier:ci

.github/workflows/release.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,23 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
submodules: recursive
22+
23+
- name: Use Latest Corepack
24+
run: |
25+
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
26+
npm install -g corepack@latest
27+
echo "After : corepack version => $(corepack --version)"
28+
corepack enable
29+
pnpm --version
1930
2031
- name: Setup node.js
21-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
2233
with:
23-
cache: "yarn"
34+
cache: "pnpm"
2435
node-version-file: ".nvmrc"
2536

2637
- name: Configure access to private npm packages
@@ -29,10 +40,41 @@ jobs:
2940
# prepare script runs before publish, and it needs husky
3041
- name: Install dependencies
3142
run: |
32-
yarn install --frozen-lockfile
43+
pnpm install --frozen-lockfile
3344
3445
- name: Semantic Release
3546
uses: cycjimmy/semantic-release-action@v3
3647
env:
3748
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3849
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
51+
- name: Docker meta
52+
id: meta
53+
uses: docker/metadata-action@v5
54+
with:
55+
flavor: |
56+
latest=${{ github.ref_name == 'main' }}
57+
images: |
58+
ghcr.io/gearbox-protocol/periphery-v3
59+
tags: |
60+
type=ref,event=branch
61+
type=ref,event=tag
62+
63+
- name: Set up Docker Buildx
64+
uses: docker/setup-buildx-action@v3
65+
66+
- name: Login to GitHub Container Registry
67+
uses: docker/login-action@v3
68+
with:
69+
registry: ghcr.io
70+
username: ${{ github.actor }}
71+
password: ${{ github.token }}
72+
73+
- name: Build and push docker image
74+
uses: docker/build-push-action@v5
75+
with:
76+
context: .
77+
platforms: linux/amd64 #,linux/arm64
78+
push: true
79+
tags: ${{ steps.meta.outputs.tags }}
80+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/test.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.gitignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
# Compiler files
22
cache/
3-
/forge-out/*
3+
/out/*
44
/node_modules/
5-
/lib/
65
# Ignores development broadcast logs
76
!/broadcast
87
/broadcast/*/31337/
98
/broadcast/**/dry-run/
9+
/broadcast
10+
/forge-out/
1011

1112
# Docs
1213
docs/
1314

1415
# Dotenv file
15-
.env
16+
.env*
1617

1718
# Logs
1819
*.log
20+
.DS_Store
21+
address-provider.json
22+
addresses.json
23+
24+
*.generated.ts

.gitmodules

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[submodule "lib/@gearbox-protocol/core-v3"]
2+
path = lib/@gearbox-protocol/core-v3
3+
url = https://github.com/Gearbox-protocol/core-v3
4+
[submodule "lib/@gearbox-protocol/integrations-v3"]
5+
path = lib/@gearbox-protocol/integrations-v3
6+
url = https://github.com/Gearbox-protocol/integrations-v3
7+
[submodule "lib/@gearbox-protocol/oracles-v3"]
8+
path = lib/@gearbox-protocol/oracles-v3
9+
url = https://github.com/Gearbox-protocol/oracles-v3
10+
[submodule "lib/@openzeppelin"]
11+
path = lib/@openzeppelin
12+
url = https://github.com/OpenZeppelin/openzeppelin-contracts
13+
[submodule "lib/@1inch/solidity-utils"]
14+
path = lib/@1inch/solidity-utils
15+
url = https://github.com/1inch/solidity-utils
16+
[submodule "lib/@1inch/farming"]
17+
path = lib/@1inch/farming
18+
url = https://github.com/1inch/farming
19+
[submodule "lib/forge-std"]
20+
path = lib/forge-std
21+
url = https://github.com/foundry-rs/forge-std
22+
[submodule "lib/@gearbox-protocol/sdk-gov"]
23+
path = lib/@gearbox-protocol/sdk-gov
24+
url = https://github.com/Gearbox-protocol/sdk-gov
25+
[submodule "lib/@solady"]
26+
path = lib/@solady
27+
url = https://github.com/Vectorized/solady
28+
[submodule "lib/@gearbox-protocol/permissionless"]
29+
path = lib/@gearbox-protocol/permissionless
30+
url = https://github.com/Gearbox-protocol/permissionless
31+
[submodule "lib/@gearbox-protocol/bots-v3"]
32+
path = lib/@gearbox-protocol/bots-v3
33+
url = https://github.com/Gearbox-protocol/bots-v3

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
22

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"solidity.formatter": "forge",
88
"solidity.packageDefaultDependenciesContractsDirectory": "contracts",
99
"solidity.packageDefaultDependenciesDirectory": "node_modules",
10-
"solidity.compileUsingRemoteVersion": "v0.8.17",
10+
"solidity.compileUsingRemoteVersion": "v0.8.23",
1111
}

Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM ghcr.io/foundry-rs/foundry:stable
2+
3+
ENV CI=true
4+
5+
# install node
6+
USER root
7+
RUN apt-get update && apt-get install -y curl
8+
RUN chsh -s /bin/bash foundry
9+
10+
USER foundry
11+
SHELL ["/bin/bash", "-c"]
12+
13+
# Create a script file sourced by both interactive and non-interactive bash shells
14+
ENV BASH_ENV /home/foundry/.bash_env
15+
RUN touch "${BASH_ENV}"
16+
RUN echo '. "${BASH_ENV}"' >> ~/.bashrc
17+
18+
# Download and install nvm
19+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | PROFILE="${BASH_ENV}" bash
20+
21+
# Download and install pnpm
22+
ENV PNPM_HOME="/home/foundry/.pnpm"
23+
ENV PATH="$PNPM_HOME:$PATH"
24+
RUN curl -fsSL https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -
25+
26+
WORKDIR /app
27+
28+
COPY . /app
29+
30+
RUN nvm install \
31+
&& pnpm install \
32+
&& forge build
33+
34+
ENTRYPOINT [ "/app/script/migrate.sh" ]

0 commit comments

Comments
 (0)