Skip to content

Commit

Permalink
Merge branch 'main' into jalextowle/instance/sgyd
Browse files Browse the repository at this point in the history
  • Loading branch information
MazyGio authored Dec 2, 2024
2 parents 9066048 + 77a52c9 commit 7a566ae
Show file tree
Hide file tree
Showing 413 changed files with 3,938 additions and 470 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: forge install
- uses: actions/setup-python@v4
with:
python-version: "3.10"

# Run the gas benchmark and stores the output to a json file.
- name: Run benchmark
run: python python/gas_benchmarks.py benchmarks.json
run: python -u python/gas_benchmarks.py benchmarks.json

# Load the benchmarks cache. We use a different cache key for every run
# because Github Actions caches are currently immutable. By specifying the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
import { IHyperdriveAdminController } from "../../interfaces/IHyperdriveAdminController.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
import { SafeERC20 } from "openzeppelin/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/deployers/Target0Deployer.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { {{ name.capitalized }}Target0 } from "../../instances/{{ name.lowercase }}/{{ name.capitalized }}Target0.sol";
import { I{{ name.capitalized }} } from "../../interfaces/I{{ name.capitalized }}.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/deployers/Target1Deployer.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { {{ name.capitalized }}Target1 } from "../../instances/{{ name.lowercase }}/{{ name.capitalized }}Target1.sol";
import { I{{ name.capitalized }} } from "../../interfaces/I{{ name.capitalized }}.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/deployers/Target2Deployer.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { {{ name.capitalized }}Target2 } from "../../instances/{{ name.lowercase }}/{{ name.capitalized }}Target2.sol";
import { I{{ name.capitalized }} } from "../../interfaces/I{{ name.capitalized }}.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/deployers/Target3Deployer.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { {{ name.capitalized }}Target3 } from "../../instances/{{ name.lowercase }}/{{ name.capitalized }}Target3.sol";
import { I{{ name.capitalized }} } from "../../interfaces/I{{ name.capitalized }}.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/deployers/Target4Deployer.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { {{ name.capitalized }}Target4 } from "../../instances/{{ name.lowercase }}/{{ name.capitalized }}Target4.sol";
import { I{{ name.capitalized }} } from "../../interfaces/I{{ name.capitalized }}.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Base.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
import { SafeERC20 } from "openzeppelin/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Conversions.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

/// @author DELV
/// @title {{ name.capitalized }}Conversions
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Hyperdrive.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
import { SafeERC20 } from "openzeppelin/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Target0.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { HyperdriveTarget0 } from "../../external/HyperdriveTarget0.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Target1.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { HyperdriveTarget1 } from "../../external/HyperdriveTarget1.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Target2.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { HyperdriveTarget2 } from "../../external/HyperdriveTarget2.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Target3.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { HyperdriveTarget3 } from "../../external/HyperdriveTarget3.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/instances/Target4.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { HyperdriveTarget4 } from "../../external/HyperdriveTarget4.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion codegen/templates/interfaces/IHyperdrive.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IHyperdrive } from "./IHyperdrive.sol";

Expand Down
4 changes: 2 additions & 2 deletions codegen/templates/interfaces/IYieldSource.sol.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IERC4626 } from "./IERC4626.sol";

Expand All @@ -13,4 +13,4 @@ import { IERC4626 } from "./IERC4626.sol";
/// only, and is not intended to, and does not, have any
/// particular legal or regulatory significance.
abstract contract I{{ name.capitalized }} is IERC4626 {}
// ****************************************************************************
// ****************************************************************************
2 changes: 1 addition & 1 deletion contracts/src/deployers/HyperdriveDeployerCoordinator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IHyperdrive } from "../interfaces/IHyperdrive.sol";
import { IHyperdriveAdminController } from "../interfaces/IHyperdriveAdminController.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
import { IHyperdriveAdminController } from "../../interfaces/IHyperdriveAdminController.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IL2Pool } from "../../interfaces/IAave.sol";
import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave-l2/AaveL2Target0Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveL2Target0 } from "../../instances/aave-l2/AaveL2Target0.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave-l2/AaveL2Target1Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveL2Target1 } from "../../instances/aave-l2/AaveL2Target1.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave-l2/AaveL2Target2Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveL2Target2 } from "../../instances/aave-l2/AaveL2Target2.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave-l2/AaveL2Target3Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveL2Target3 } from "../../instances/aave-l2/AaveL2Target3.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave-l2/AaveL2Target4Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveL2Target4 } from "../../instances/aave-l2/AaveL2Target4.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
import { IHyperdriveAdminController } from "../../interfaces/IHyperdriveAdminController.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IPool } from "aave/interfaces/IPool.sol";
import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave/AaveTarget0Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveTarget0 } from "../../instances/aave/AaveTarget0.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave/AaveTarget1Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveTarget1 } from "../../instances/aave/AaveTarget1.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave/AaveTarget2Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveTarget2 } from "../../instances/aave/AaveTarget2.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave/AaveTarget3Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveTarget3 } from "../../instances/aave/AaveTarget3.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/aave/AaveTarget4Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { AaveTarget4 } from "../../instances/aave/AaveTarget4.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { AerodromeLpTarget0 } from "../../instances/aerodrome-lp/AerodromeLpTarget0.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { AerodromeLpTarget1 } from "../../instances/aerodrome-lp/AerodromeLpTarget1.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { AerodromeLpTarget2 } from "../../instances/aerodrome-lp/AerodromeLpTarget2.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { AerodromeLpTarget3 } from "../../instances/aerodrome-lp/AerodromeLpTarget3.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IGauge } from "aerodrome/interfaces/IGauge.sol";
import { AerodromeLpTarget4 } from "../../instances/aerodrome-lp/AerodromeLpTarget4.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { IChainlinkAggregatorV3 } from "../../interfaces/IChainlinkAggregatorV3.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
import { SafeERC20 } from "openzeppelin/token/ERC20/utils/SafeERC20.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ChainlinkTarget0 } from "../../instances/chainlink/ChainlinkTarget0.sol";
import { IChainlinkAggregatorV3 } from "../../interfaces/IChainlinkAggregatorV3.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ChainlinkTarget1 } from "../../instances/chainlink/ChainlinkTarget1.sol";
import { IChainlinkAggregatorV3 } from "../../interfaces/IChainlinkAggregatorV3.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ChainlinkTarget2 } from "../../instances/chainlink/ChainlinkTarget2.sol";
import { IChainlinkAggregatorV3 } from "../../interfaces/IChainlinkAggregatorV3.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ChainlinkTarget3 } from "../../instances/chainlink/ChainlinkTarget3.sol";
import { IChainlinkAggregatorV3 } from "../../interfaces/IChainlinkAggregatorV3.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ChainlinkTarget4 } from "../../instances/chainlink/ChainlinkTarget4.sol";
import { IChainlinkAggregatorV3 } from "../../interfaces/IChainlinkAggregatorV3.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ICornSilo } from "../../interfaces/ICornSilo.sol";
import { IHyperdrive } from "../../interfaces/IHyperdrive.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { ERC20 } from "openzeppelin/token/ERC20/ERC20.sol";
import { SafeERC20 } from "openzeppelin/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/corn/CornTarget0Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { CornTarget0 } from "../../instances/corn/CornTarget0.sol";
import { ICornSilo } from "../../interfaces/ICornSilo.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/corn/CornTarget1Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { CornTarget1 } from "../../instances/corn/CornTarget1.sol";
import { ICornSilo } from "../../interfaces/ICornSilo.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/corn/CornTarget2Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { CornTarget2 } from "../../instances/corn/CornTarget2.sol";
import { ICornSilo } from "../../interfaces/ICornSilo.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/corn/CornTarget3Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { CornTarget3 } from "../../instances/corn/CornTarget3.sol";
import { ICornSilo } from "../../interfaces/ICornSilo.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/deployers/corn/CornTarget4Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.22;
pragma solidity 0.8.24;

import { CornTarget4 } from "../../instances/corn/CornTarget4.sol";
import { ICornSilo } from "../../interfaces/ICornSilo.sol";
Expand Down
Loading

0 comments on commit 7a566ae

Please sign in to comment.