Skip to content

WIP: Comparision#116

Closed
tsudmi wants to merge 15 commits into
format-301from
main
Closed

WIP: Comparision#116
tsudmi wants to merge 15 commits into
format-301from
main

Conversation

@tsudmi

@tsudmi tsudmi commented May 24, 2025

Copy link
Copy Markdown
Member

No description provided.

tsudmi and others added 15 commits March 7, 2025 14:59
* Remove restake vaults

* Remove CumulativeMerkleDrop

* Remove redundant error
* Add claim on behalf in RewardSplitter

* Review fixes

* Split to Eth and Gno versions

* Add simple test

* Review fixes 2

* Make enterExitQueueOnBehalf external in interface

* fixup

* Add tests 2

* Fix missing syncRewards calls

* Add tests 4

* Add tests 5

* Fix ReentrancyGuard

* Modify enterExitQueueOnBehalf returns positionTicket

* Add tests for new features

* Add tests for gnosis

* Review fixes 3

* Optimize syncRewards

* Del GnoRewardSplitterEnterExitQueueOnBehalfTest

* Add test for claim for multiple users

* Cleanup

* Review fixes

* Del test/RewardSplitter.spec.ts

---------

Co-authored-by: Dmitri Tsumak <tsumak.dmitri@gmail.com>
* forge install: openzeppelin-foundry-upgrades

v0.4.0

* forge install: openzeppelin-contracts-upgradeable

v5.2.0

* Implement changes for pectra support

* Add max effective balance check

* Fix deposit amount for validators

* Add consolidations checker, GnoDaiDistributor

* forge install: murky

v0.1.0

* WIP

* Remove murky

* Revert DepositDataRegistry removal, keep backward comp

* Fix validator register event emit

* WIP

* Fix stack too deep

* Fix system contract calls

* Add snapshots for VaultGnoStaking

* Add upgrade and deploy tests

* Add upgrade, deploy tests

* Add GnoBlocklistVault and GnoErc20Vault tests

* Add more tests to GnoErc20Vault

* Add upgrade tests to gno vaults

* Remove GnoErc20Vault js tests

* Remove GnoVault register

* Migrate gno genesis vault tests to foundry

* Migrate gno priv, priv erc20 vault tests to foundry

* Add GNoVault tests

* Migrate GnoOsTokenVaultEscrow to foundry

* Add EthHelpers

* Add DepositDataRegistry.t.sol

* Implement test_registerValidator_succeedsWith0x01Validator

* Implement DepositDataRegistry tests for single validator

* Implement test_registerValidators_successWith0x01Validators

* Implement test_registerValidators_successWith0x02Validators

* Fix USE_FORK_VAULTS env

* Add deposit data registry migrate tests

* Add test/EthBlocklistErc20Vault.t.sol

* Add EthBlocklistVault.t.sol

* add EthErc20Vault tests

* Add EthFoxVault tests

* Add EthGenesisVault tests

* Add EthPrivVault tests

* Add EthPrivErc20Vault tests

* Add EthVault tests

* Add VaultAdmin tests

* Add VaultEnterExit tests

* Add more VaultEnterExit tests

* Add VaultFee tests

* Add VaultEthStaking tests

* Add VaultOsToken mint tests

* Add VaultOsToken burn tests

* Add VaultOsToken redeem tests

* Add osToken mint event checks

* Add event checks

* Add liquidation tests

* Add event checks to osToken liquidation tests

* Add tests for transferOsTokenPositionToEscrow

* Add tests for migrating gno vault from v2 to v3

* Add VaultState tests

* Extent VaultState tests

* Add VaultToken tests

* Add VaultVersion tests

* Add VaultValidators tests for registering validator

* Add fund validators tests

* Add withdraw validator tests

* Add consolidation tests

* Improve consolidations

* Add VaultsRegistry tests

* Add tests for Consolidations checker, keeper, mev escrows

* Add KeeperValidators tests

* Add PriceFeed and KeeperValidators tests

* Add EthOsTokenVaultEscrow tests

* Add EthOsTokenVaultEscrow tests

* Add register function tests in EthOsTokenVaultEscrow

* Add processExitedAssets tests for EthOsTokenVaultEscrow

* Add claimExitedAssets tests for EthOsTokenVaultEscrow

* Add test_liquidateOsToken_success

* Add redeem and liquidation tests for OsTokenVaultEscrow

* Add authenticator and updateLiqConfig tests

* Add flashloans tests

* Add OsTokenConfig tests

* Add OsTokenFlashLoans tests

* Add OsToken tests

* Add tests for EthValidatorsChecker

* Add tests for EthValidatorsChecker

* Add Multicall and RewardSplitter tests

* Remove unused mocks
* Fix VaultValidators module

* Fix VaultValidators module
* Fix VaultValidators module

* Fix VaultValidators module

* Remove ABI

* Refactor .github

* Remove implementation files

* Remove deployments

* Remove hardhat tests, snapshots, modify GnoRewardSplitter tests

* Add snapshot checks to RewardSplitter tests
* Fix validators manager signature

* Fix github action

* Update foundry file

* Remove helpers

* Remove tsconfig

* Remove tasks

* Remove snapshots

* Add remappings.txt

* Update ignore files

* Add .env.example

* Add UpgradeEthNetwork script

* remove libs

* forge install: forge-std

v1.9.5

* forge install: openzeppelin-contracts-upgradeable

v5.2.0

* Add exit queue state function to ValidatorsChecker

* Fix tests

* Extend EthValidatorsChecker tests

* Extend GnoValidatorsChecker tests

* Fix GnoValidatorsCheckerTest test

* fix .gitignore

* Split getExitQueueState into two functions

* Fix ValidatorsChecker tests
* Format solidity codes according to foundry

* Remove prettier

* Fix github workflows

* Remove redundant builds in actions

* Fix slither

* Fix test action

* Add snapshot files and check

* Add config for slither

* Fix snapshot

* Add skip snapshots env var

* Fix coverage env var in actions

* Fix coverage

* Update readme

* Update snapshots

* Update snapshots

* Update snapshots
* Update env variables names

* add deployments, update end example, foundry.toml

* Update deployment files

* Update deploy scripts, readme, .env.example

* Update execute governor txs script

* Add contracts to deployments

* Add deploy script for gnosis

* Fix test profile in foundry
* Implement Meta vaults

* Implement Meta vaults for gnosis

* Update MetaVault, add tests

* Add test functions interfaces for add subvaults

* Add tests for adding new sub vault

* Remove vault impl check

* Add reject vault tests, fix BalancedCurator

* Add deposit to vaults tests for SubVaults

* Total assets delta with ejecting vault

* Add tests for VaultSubVaults update state

* Add claim exited assets tests to VaultSubVaults module

* Add EthMetaVaultTest tests

* Add MetaVault to GnoHelpers

* Update BalancedCurator

* Implement meta vault factories

* Add zero address admin test

* Update snapshots

* Fix snapshots

* Remove zero check for _checkHarvested in VaultSubVaults module

* Fix snapshots

* Add donateAssets function

* Add donateAssets tests

* Remove redundant submodule

* Remove oz upgradeable dep

* Add oz upgradeable dep

* Update snapshots

* Remove version check for the sub vault
* Replace xdai tokens distributor with converter for Gnosis

* Update snapshots

* Fix fork tests

* Fix snapshots
* Fix upgrade scripts

* Implement OsToken redemptions contract

* Add OsTokenRedeemer test definitions

* Implement OsTokenRedeemer tests for root updates

* Add redeemOsTokenPositions test definitions

* Add redeemOsTokenPositions tests

* Add OsTokenRedeemer deployment to upgrade scripts

* Fix execute governor txs script, update snapshot

* Remove tokens from coverage skip
submodules: recursive

- name: Install foundry
uses: foundry-rs/foundry-toolchain@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'code coverage' step
Uses Step
uses 'foundry-rs/foundry-toolchain' with ref 'v1', not a pinned commit hash
Comment on lines +11 to +24
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

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

- name: Lint
run: forge fmt --check

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 1 year ago

To fix the issue, we will add a permissions block at the workflow level (root level) to restrict the permissions of the GITHUB_TOKEN. Since the workflow only performs linting tasks, it only needs contents: read permissions. This change ensures that the workflow adheres to the principle of least privilege and avoids granting unnecessary permissions.


Suggested changeset 1
.github/workflows/lint.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml
--- a/.github/workflows/lint.yaml
+++ b/.github/workflows/lint.yaml
@@ -2,2 +2,5 @@
 
+permissions:
+  contents: read
+
 on:
EOF
@@ -2,2 +2,5 @@

permissions:
contents: read

on:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
uses: actions/checkout@v3

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Lint' step
Uses Step
uses 'foundry-rs/foundry-toolchain' with ref 'v1', not a pinned commit hash
Comment on lines +11 to +42
name: Slither analysis
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install pip3
run: |
python -m pip install --upgrade pip

- name: Install Slither
run: |
pip3 install slither-analyzer

- name: Build
run: forge compile --skip test

- name: Run Slither
run: |
slither --fail-high --skip-clean .

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 1 year ago

To fix the issue, we will add a permissions block at the root of the workflow file. This block will specify the minimal permissions required for the workflow to function. Since the workflow only reads repository contents and does not perform any write operations, we will set contents: read as the permission. This ensures that the workflow has the least privileges necessary to complete its tasks.


Suggested changeset 1
.github/workflows/slither.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/slither.yaml b/.github/workflows/slither.yaml
--- a/.github/workflows/slither.yaml
+++ b/.github/workflows/slither.yaml
@@ -2,2 +2,5 @@
 
+permissions:
+  contents: read
+
 on:
EOF
@@ -2,2 +2,5 @@

permissions:
contents: read

on:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Slither' step
Uses Step
uses 'foundry-rs/foundry-toolchain' with ref 'v1', not a pinned commit hash
Comment on lines +11 to +32
name: Forge Fork Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Run tests
run: forge test --isolate -vvv
env:
FORGE_SNAPSHOT_CHECK: false
TEST_USE_FORK_VAULTS: true
TEST_SKIP_SNAPSHOTS: true
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
GNOSIS_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }}
FOUNDRY_PROFILE: test

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 1 year ago

To fix the issue, we will add a permissions block at the root level of the workflow. This block will specify contents: read, which is sufficient for the operations performed in this workflow (e.g., checking out the repository and reading secrets). This change ensures that the workflow does not have unnecessary write permissions.


Suggested changeset 1
.github/workflows/test-fork.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/test-fork.yaml b/.github/workflows/test-fork.yaml
--- a/.github/workflows/test-fork.yaml
+++ b/.github/workflows/test-fork.yaml
@@ -2,2 +2,5 @@
 
+permissions:
+  contents: read
+
 on:
EOF
@@ -2,2 +2,5 @@

permissions:
contents: read

on:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests' step
Uses Step
uses 'foundry-rs/foundry-toolchain' with ref 'v1', not a pinned commit hash
Comment on lines +11 to +31
name: Forge Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Run tests
run: forge test --isolate --gas-snapshot-check=true -vvv
env:
TEST_USE_FORK_VAULTS: false
TEST_SKIP_SNAPSHOTS: false
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
GNOSIS_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }}
FOUNDRY_PROFILE: test

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 1 year ago

To fix the issue, we will add a permissions block at the root of the workflow file. This block will specify the minimal permissions required for the workflow to function. Based on the workflow's operations, it only needs to read the repository contents. Therefore, we will set contents: read as the permission. This change ensures that the GITHUB_TOKEN is restricted to the least privilege necessary.


Suggested changeset 1
.github/workflows/test.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -8,2 +8,5 @@
 
+permissions:
+  contents: read
+
 jobs:
EOF
@@ -8,2 +8,5 @@

permissions:
contents: read

jobs:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium test

Unpinned 3rd party Action 'Tests' step
Uses Step
uses 'foundry-rs/foundry-toolchain' with ref 'v1', not a pinned commit hash
@tsudmi tsudmi changed the base branch from format-301 to 301 May 24, 2025 10:28
@tsudmi tsudmi changed the base branch from 301 to format-301 May 24, 2025 10:29
@tsudmi tsudmi closed this May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants