-
Notifications
You must be signed in to change notification settings - Fork 3
Dev #228
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
Merged
Merged
Dev #228
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7d9ff6b
chore(deps-dev): bump the development-dependencies group with 6 updates
dependabot[bot] 3190c05
fix: price adapter registry upgrade
matteoettam09 7e00d70
fix: liquidity orchestrator upgrade
matteoettam09 758a0d3
fix: factory upgrade
matteoettam09 5602c05
fix: config upgrade
matteoettam09 5d5bce6
chore: simplify interface
matteoettam09 84036a3
fix: downgrade DoS to preserve storage slot compability
matteoettam09 ca2e66d
Merge pull request #225 from OrionFinanceAI/dependabot/npm_and_yarn/d…
matteoettam09 006effa
Merge pull request #227 from OrionFinanceAI/upgrade
matteoettam09 f31918c
fix: ERC4626PriceAdapter under-reports prices for high–totalSupply va…
matteoettam09 b468719
fix: ERC4626PriceAdapter under-reports prices for high–totalSupply va…
matteoettam09 b7a3620
refacto: verification/storage layout check
matteoettam09 072db15
fix: ci
matteoettam09 532da80
fix: @nomicfoundation/hardhat-verify
matteoettam09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,2 @@ | ||
| ETHERSCAN_API_KEY=... | ||
| RPC_URL="https://eth-sepolia.g.alchemy.com/v2/xyz" | ||
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity ^0.8.34; | ||
|
|
||
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
| import "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol"; | ||
| import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
| import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; | ||
|
|
||
| /// @notice ERC-4626 vault with fixed totalAssets/totalSupply for ratio-based price adapter tests. | ||
| contract TestFixedRatioERC4626 is ERC4626 { | ||
| using Math for uint256; | ||
| uint8 private immutable _shareDecimals; | ||
| uint256 private immutable _fixedTotalAssets; | ||
| uint256 private immutable _fixedTotalSupply; | ||
|
|
||
| constructor( | ||
| ERC20 underlyingAsset_, | ||
| string memory name_, | ||
| string memory symbol_, | ||
| uint8 shareDecimals_, | ||
| uint256 fixedTotalAssets_, | ||
| uint256 fixedTotalSupply_ | ||
| ) ERC20(name_, symbol_) ERC4626(underlyingAsset_) { | ||
| _shareDecimals = shareDecimals_; | ||
| _fixedTotalAssets = fixedTotalAssets_; | ||
| _fixedTotalSupply = fixedTotalSupply_; | ||
| } | ||
|
|
||
| function decimals() public view override returns (uint8) { | ||
| return _shareDecimals; | ||
| } | ||
|
|
||
| function totalAssets() public view override returns (uint256) { | ||
| return _fixedTotalAssets; | ||
| } | ||
|
|
||
| function totalSupply() public view override(ERC20, IERC20) returns (uint256) { | ||
| return _fixedTotalSupply; | ||
| } | ||
|
|
||
| function convertToAssets(uint256 shares) public view override returns (uint256) { | ||
| return shares.mulDiv(_fixedTotalAssets, _fixedTotalSupply); | ||
| } | ||
|
matteoettam09 marked this conversation as resolved.
|
||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.