Skip to content

feat: version 3.1 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 135 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
eba5986
feat: setup `next` release channel for v3.1 development
lekhovitsky May 27, 2024
52106f2
chore: upgrade `core-v3`
lekhovitsky May 27, 2024
b07e25a
feat: add `PriceFeedCompressor`
lekhovitsky May 28, 2024
c77d934
fix: minor `PriceFeedCompressor` changes
lekhovitsky May 31, 2024
3c72f28
fix: refresh comments
lekhovitsky May 31, 2024
0a2c20d
feat: `CreditAccountCompressor` draft
lekhovitsky Jun 4, 2024
4a742cd
fix: `PriceFeedCompressor` fixes
lekhovitsky Jun 5, 2024
c23e837
fix: `CreditAccountCompressor` fixes
lekhovitsky Jun 6, 2024
04853bf
feat: `CreditAccountCompressor` optimization
lekhovitsky Jun 9, 2024
f342711
fix: minor fix
lekhovitsky Jun 9, 2024
81d7b86
fix: minor `CreditAccountCompressor` improvements
lekhovitsky Jun 10, 2024
4d6d32a
fix: state serialiser renamed
0xmikko Jun 20, 2024
681998f
fix: removing obsolete ownable
0xmikko Jun 24, 2024
a0e240a
fix: adding iPriceFeedCompressor
0xmikko Jun 25, 2024
3771774
fix: update .gitignore
0xmikko Jun 25, 2024
24544a1
feat: compressor data structure update
0xmikko Jul 3, 2024
8956443
fix: contractType update
0xmikko Jul 18, 2024
2882ecd
fix: add serialized for `MellowLRTPriceFeed`
lekhovitsky Aug 7, 2024
a192f89
feat: array args in credit manager filter
lekhovitsky Aug 13, 2024
c078f36
feat: marketCompressorDraft
0xmikko Aug 22, 2024
71b102f
chore: switch to forge install
0xmikko Aug 25, 2024
4a0110e
fix: import Migrate.sol
0xmikko Aug 25, 2024
7be7c18
feat: adding interfaces
0xmikko Aug 27, 2024
6020607
feat: deploy script
0xmikko Aug 27, 2024
3850cd1
fix: cleanup
0xmikko Aug 27, 2024
fc8abb3
fix: migrate script fixed
0xmikko Aug 30, 2024
993701b
feat: export address-provider.json
0xmikko Sep 1, 2024
12fb5c8
feat: adding market filters
0xmikko Sep 2, 2024
32e9125
fix: marketCompressor fixes
0xmikko Sep 2, 2024
561a27f
feat: new state structure
0xmikko Sep 10, 2024
7ea05af
feat: token compressor
doomsower Sep 10, 2024
f8d2fa6
Merge pull request #21 from Gearbox-protocol/token_compressor
0xmikko Sep 11, 2024
0d4875f
fix: add token compressor to market compressor
doomsower Sep 11, 2024
bdf87ce
Merge pull request #22 from Gearbox-protocol/token_compressor
0xmikko Sep 11, 2024
43e0184
feat: priceFeedCompressor use contractTypes + baseLib
0xmikko Sep 11, 2024
14913aa
feat: credit compressor works
0xmikko Sep 12, 2024
5ab0889
fix: add CreditAccountCompressor to migrate script
doomsower Sep 18, 2024
ef253b6
Merge pull request #23 from Gearbox-protocol/ca_compressor
0xmikko Sep 19, 2024
273e1d2
fix: allow custom output dir for script output
doomsower Oct 8, 2024
ca40c83
feat: adapter compressor
doomsower Oct 10, 2024
d3f4b03
Merge pull request #24 from Gearbox-protocol/adapter_compressor
0xmikko Oct 12, 2024
8b7b39b
feat: add `getUpdatablePriceFeeds` to market compressor
lekhovitsky Oct 21, 2024
32b260b
fix: add getUpdatablePriceFeeds to IMarketCompressor
doomsower Oct 21, 2024
f5c526b
fix: add missing price feed and adapter types
doomsower Nov 27, 2024
03315cd
chore: update oracles-v3 submodule to v1.12.0-next.5
doomsower Dec 17, 2024
a8cb071
fix: add pendle price feed serializer
doomsower Dec 17, 2024
3393dfe
fix: pendle serializer
doomsower Dec 19, 2024
8b98889
feat: upgrade deps and make code compile
lekhovitsky Dec 23, 2024
42dca05
feat: update compressors
lekhovitsky Dec 23, 2024
6c12a06
feat: migration script
lekhovitsky Dec 23, 2024
6c9226b
fix: minor fixes in migration script
lekhovitsky Dec 24, 2024
f650ca7
feat: add default entrypoint to migration script
lekhovitsky Dec 24, 2024
0c6a84e
fix: credit account compressor - expirationDate
doomsower Dec 25, 2024
eda98a3
build: fix foundry version
doomsower Jan 13, 2025
018624b
feat: rewards compressor
Van0k Jan 22, 2025
9e6e439
feat: compressor updates
0xmikko Jan 22, 2025
2e7a05a
fix: update tooling to pnpm
doomsower Jan 22, 2025
3215a84
fix: bump package commits
Van0k Jan 23, 2025
2edb656
Merge branch 'next' into rewards-compressor
Van0k Jan 23, 2025
c4d998c
fix: rewardsinfo library implementations
Van0k Jan 23, 2025
2783514
Merge pull request #25 from Gearbox-protocol/rewards-compressor
Van0k Jan 23, 2025
7a07217
fix: add RewardsCompressor type and version
Van0k Jan 23, 2025
a49669c
fix: deploy rewards compressor
doomsower Jan 23, 2025
a5a8918
fix: add description to price feeds
doomsower Jan 23, 2025
db38ad3
feat: gauge compressor
Van0k Jan 30, 2025
ed820cf
feat: add `PeripheryCompressor` and proper migration of legacy contracts
lekhovitsky Feb 5, 2025
2ef92cd
Merge remote-tracking branch 'origin/next' into gauge_compressor
lekhovitsky Feb 5, 2025
cf96320
fix: add `GaugeCompressor` to migration script
lekhovitsky Feb 5, 2025
7143338
Merge pull request #26 from Gearbox-protocol/gauge_compressor
lekhovitsky Feb 5, 2025
584d22c
build: fix pr workflow
doomsower Feb 5, 2025
120416a
chore: update deps
lekhovitsky Feb 5, 2025
1de2a7e
fix: scripts fixes
0xmikko Feb 5, 2025
2e8a995
fix: workaround to `TumblerV3` not implementing `serialize()`
lekhovitsky Feb 5, 2025
59d3fb6
fix: update wagmi config
doomsower Feb 6, 2025
e4af8bb
feat: adk-test
0xmikko Feb 6, 2025
df7fbdb
Merge branch 'next' of github.com:Gearbox-protocol/periphery-v3 into …
0xmikko Feb 6, 2025
daf27e8
fix: sync lockfile
doomsower Feb 6, 2025
d1b9915
fix: save script output to specified dir
lekhovitsky Feb 6, 2025
a3f2da2
fix: try to publish docker image
doomsower Feb 7, 2025
58a95e7
fix: lockfile
doomsower Feb 7, 2025
7f39cce
fix: remove docker release guards
doomsower Feb 7, 2025
ba9f472
fix: arm64 is not needed
doomsower Feb 7, 2025
792592e
fix: copy addresses.json to shared dir
doomsower Feb 7, 2025
dcdffd2
fix: passing anvil to migrate script
doomsower Feb 7, 2025
26f17f6
fix: gauge smallfix
Van0k Feb 10, 2025
15b7f0a
fix: rewards compressor handles older CVX adapters correctly
Van0k Feb 10, 2025
ba011a5
fix: fix unsafe array truncation in GaugeCompressor
Van0k Feb 10, 2025
f7b0bf7
fix: handle native ETH in `TokenCompressor`
lekhovitsky Feb 10, 2025
49e6e46
fix: fixes in legacy contracts serialization
lekhovitsky Feb 10, 2025
790f134
fix: terminate migrate script on first error
doomsower Feb 10, 2025
8f2f285
feat: add equivalence tests for dc3 and mc
Van0k Feb 10, 2025
5be3341
Merge branch 'next' of https://github.com/Gearbox-protocol/periphery-…
Van0k Feb 10, 2025
c9fec86
chore: update deps
lekhovitsky Feb 11, 2025
81d124f
fix: deploy market configurator for Nexo
lekhovitsky Feb 11, 2025
456204e
feat: add interfaces for pool and credit suite compressors
lekhovitsky Feb 12, 2025
5798bbe
feat: equivalence tests for credit suites and credit accounts
Van0k Feb 13, 2025
1bf1f40
Merge branch 'next' of https://github.com/Gearbox-protocol/periphery-…
Van0k Feb 13, 2025
96f5f88
fix: add redstone.ts script
Van0k Feb 13, 2025
84c66bf
build: fix abi generation
doomsower Feb 13, 2025
712ce78
fix: add legacy params for optimism and arbitrum
lekhovitsky Feb 19, 2025
e66ff12
fix: minor `BaseLib` fix
lekhovitsky Feb 19, 2025
b13aca4
fix: update deps
lekhovitsky Feb 21, 2025
7128f20
feat: add `getBots` to `PeripheryCompressor` (#27)
lekhovitsky Feb 21, 2025
8473c2b
fix: docker file
doomsower Feb 21, 2025
56e2b79
feat: add rollup transactions to v3.1 installation script (#28)
lekhovitsky Feb 21, 2025
8418366
feat: remove `setLegacyAddress` calls in v3.1 installation script
lekhovitsky Feb 23, 2025
822acd7
fix: add price oracle to legacy params
lekhovitsky Feb 23, 2025
21df7d8
Merge pull request #29 from Gearbox-protocol/legacy-periphery-contracts
doomsower Feb 24, 2025
84ce415
build: update wagmi
doomsower Feb 25, 2025
ec89b41
build: add bot list abi generation
doomsower Feb 25, 2025
65b055c
fix: add Sonic legacy params
lekhovitsky Feb 25, 2025
e819790
fix: minor fixes
lekhovitsky Feb 25, 2025
a480372
fix: minor v3.1 installation script updates (#30)
lekhovitsky Mar 2, 2025
7817831
chore: change `governance` to `permissionless`
lekhovitsky Mar 2, 2025
f74f22a
fix: scripts fixes
0xmikko Mar 4, 2025
80415db
fix: properly handle WETH's deposit on fallback in `PoolCompressor`
lekhovitsky Mar 4, 2025
13b8240
build: update abi generator
doomsower Mar 6, 2025
9a169cf
feat: adding admins & emergencyAdmins
0xmikko Mar 11, 2025
5b6b8ca
Merge branch 'next' of github.com:Gearbox-protocol/periphery-v3 into …
0xmikko Mar 11, 2025
23dbcd1
chore: update deps
lekhovitsky Mar 11, 2025
0c93088
fix: remove verify
doomsower Mar 12, 2025
8ae4c5f
feat: update Nexo's legacy params
lekhovitsky Mar 13, 2025
bbc2de6
Merge branch 'next' of https://github.com/Gearbox-protocol/periphery-…
Van0k Mar 26, 2025
80cb495
feat: remove some obsolete files
lekhovitsky Apr 2, 2025
c86e97b
feat: attempt small cleanup, fail miserably
lekhovitsky Apr 15, 2025
6e390fd
feat: script to upload all the bytecode to the BCR
lekhovitsky Apr 15, 2025
865cf2d
fix: minor fixes in scripts
lekhovitsky Apr 18, 2025
71efc0c
fix: add SKIP_FUNDS_BACK flag to migrate script
doomsower Apr 18, 2025
4af0f0b
fix: bash flag
doomsower Apr 18, 2025
0e6324d
fix: market configurator factory is only read from AP if needed
lekhovitsky Apr 18, 2025
f3b55af
fix: account for zero debt in HF calculation
lekhovitsky Apr 23, 2025
eaa8745
fix: fix compiler warnings
lekhovitsky Apr 23, 2025
412cbbc
fix: update deps
lekhovitsky Apr 27, 2025
3c3e80d
fix: add scripts to submit audit reports and allow public contracts
lekhovitsky Apr 27, 2025
7103bd6
chore: add scripts to validate bytecode and sign audit reports
lekhovitsky Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github
.husky
.vscode
broadcast
cache
forge-out
node_modules
out
23 changes: 17 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,41 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Use Latest Corepack
run: |
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
npm install -g corepack@latest
echo "After : corepack version => $(corepack --version)"
corepack enable
pnpm --version

- name: Setup node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: "yarn"
cache: "pnpm"
node-version-file: ".nvmrc"

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

- name: Install dependencies
run: |
yarn install --frozen-lockfile
pnpm install --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
version: stable

- name: Run forge tests
run: forge test
timeout-minutes: 10

- name: Perform checks
run: |
yarn prettier:ci
pnpm prettier:ci
50 changes: 46 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- name: Use Latest Corepack
run: |
echo "Before: corepack version => $(corepack --version || echo 'not installed')"
npm install -g corepack@latest
echo "After : corepack version => $(corepack --version)"
corepack enable
pnpm --version

- name: Setup node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: "yarn"
cache: "pnpm"
node-version-file: ".nvmrc"

- name: Configure access to private npm packages
Expand All @@ -29,10 +40,41 @@ jobs:
# prepare script runs before publish, and it needs husky
- name: Install dependencies
run: |
yarn install --frozen-lockfile
pnpm install --frozen-lockfile

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=${{ github.ref_name == 'main' }}
images: |
ghcr.io/gearbox-protocol/periphery-v3
tags: |
type=ref,event=branch
type=ref,event=tag

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64 #,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# Compiler files
cache/
/forge-out/*
/out/*
/node_modules/
/lib/
# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
/broadcast
/forge-out/

# Docs
docs/

# Dotenv file
.env
.env*

# Logs
*.log
.DS_Store
address-provider.json
addresses.json

*.generated.ts
37 changes: 37 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[submodule "lib/@gearbox-protocol/core-v3"]
path = lib/@gearbox-protocol/core-v3
url = https://github.com/Gearbox-protocol/core-v3
branch = next
[submodule "lib/@gearbox-protocol/integrations-v3"]
path = lib/@gearbox-protocol/integrations-v3
url = https://github.com/Gearbox-protocol/integrations-v3
branch = next
[submodule "lib/@gearbox-protocol/oracles-v3"]
path = lib/@gearbox-protocol/oracles-v3
url = https://github.com/Gearbox-protocol/oracles-v3
branch = next
[submodule "lib/@openzeppelin"]
path = lib/@openzeppelin
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "lib/@1inch/solidity-utils"]
path = lib/@1inch/solidity-utils
url = https://github.com/1inch/solidity-utils
[submodule "lib/@1inch/farming"]
path = lib/@1inch/farming
url = https://github.com/1inch/farming
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/@gearbox-protocol/sdk-gov"]
path = lib/@gearbox-protocol/sdk-gov
url = https://github.com/Gearbox-protocol/sdk-gov
[submodule "lib/@solady"]
path = lib/@solady
url = https://github.com/Vectorized/solady
[submodule "lib/@gearbox-protocol/permissionless"]
path = lib/@gearbox-protocol/permissionless
url = https://github.com/Gearbox-protocol/permissionless
[submodule "lib/@gearbox-protocol/bots-v3"]
path = lib/@gearbox-protocol/bots-v3
url = https://github.com/Gearbox-protocol/bots-v3
branch = next
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"solidity.formatter": "forge",
"solidity.packageDefaultDependenciesContractsDirectory": "contracts",
"solidity.packageDefaultDependenciesDirectory": "node_modules",
"solidity.compileUsingRemoteVersion": "v0.8.17",
"solidity.compileUsingRemoteVersion": "v0.8.23",
}
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM ghcr.io/foundry-rs/foundry:stable

ENV CI=true

# install node
USER root
RUN apt-get update && apt-get install -y curl
RUN chsh -s /bin/bash foundry

USER foundry
SHELL ["/bin/bash", "-c"]

# Create a script file sourced by both interactive and non-interactive bash shells
ENV BASH_ENV /home/foundry/.bash_env
RUN touch "${BASH_ENV}"
RUN echo '. "${BASH_ENV}"' >> ~/.bashrc

# Download and install nvm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | PROFILE="${BASH_ENV}" bash

# Download and install pnpm
ENV PNPM_HOME="/home/foundry/.pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN curl -fsSL https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -

WORKDIR /app

COPY . /app

RUN nvm install \
&& pnpm install \
&& forge build

ENTRYPOINT [ "/app/script/migrate.sh" ]
Loading