From a910eb26ecbde64382a3b04436147d637ee995fe Mon Sep 17 00:00:00 2001 From: fr1j0 Date: Sun, 21 Sep 2025 09:30:07 -0400 Subject: [PATCH] init --- .../init/deployment/InitProtocol.sol | 2 +- .../{ => gaugePoints}/GaugePriceThreshold.sol | 0 contracts/ecosystem/{ => tractor}/Drafter.sol | 0 .../ecosystem/tractor/ITractorDiamond.sol | 20 ++++++++++ .../tractor/InitializeTractorDiamond.sol | 39 +++++++++++++++++++ .../ecosystem/tractor/TractorDiamond.sol | 17 ++++++++ .../blueprints}/ConvertUpBlueprint.sol | 6 +-- .../blueprints}/OperatorWhitelist.sol | 0 .../blueprints}/PerFunctionPausable.sol | 0 .../blueprints}/PriceManipulation.sol | 0 .../blueprints}/ShipmentPlanner.sol | 0 .../{ => tractor/blueprints}/SiloHelpers.sol | 2 +- .../{ => tractor/blueprints}/SowBlueprint.sol | 0 .../blueprints}/TractorHelpers.sol | 10 ++--- contracts/interfaces/IShipmentPlanner.sol | 2 +- contracts/libraries/LibShipping.sol | 2 +- .../libraries/Silo/LibTractorHelpers.sol | 2 +- contracts/mocks/MockShipmentPlanner.sol | 2 +- test/foundry/VerifyDeployment.t.sol | 2 +- .../ecosystem/ConvertUpBlueprint.t.sol | 10 ++--- .../foundry/ecosystem/OperatorWhitelist.t.sol | 2 +- .../ecosystem/PerFunctionPausable.t.sol | 10 ++--- .../foundry/ecosystem/PriceManipulation.t.sol | 2 +- test/foundry/ecosystem/SowBlueprint.t.sol | 10 ++--- test/foundry/ecosystem/TractorHelpers.t.sol | 8 ++-- test/foundry/sun/Gauge.t.sol | 2 +- test/foundry/sun/Sun.t.sol | 2 +- test/foundry/utils/ShipmentDeployer.sol | 2 +- test/foundry/utils/TractorHelper.sol | 6 +-- test/foundry/utils/TractorTestHelper.sol | 6 +-- 30 files changed, 121 insertions(+), 45 deletions(-) rename contracts/ecosystem/{ => gaugePoints}/GaugePriceThreshold.sol (100%) rename contracts/ecosystem/{ => tractor}/Drafter.sol (100%) create mode 100644 contracts/ecosystem/tractor/ITractorDiamond.sol create mode 100644 contracts/ecosystem/tractor/InitializeTractorDiamond.sol create mode 100644 contracts/ecosystem/tractor/TractorDiamond.sol rename contracts/ecosystem/{ => tractor/blueprints}/ConvertUpBlueprint.sol (98%) rename contracts/ecosystem/{ => tractor/blueprints}/OperatorWhitelist.sol (100%) rename contracts/ecosystem/{ => tractor/blueprints}/PerFunctionPausable.sol (100%) rename contracts/ecosystem/{ => tractor/blueprints}/PriceManipulation.sol (100%) rename contracts/ecosystem/{ => tractor/blueprints}/ShipmentPlanner.sol (100%) rename contracts/ecosystem/{ => tractor/blueprints}/SiloHelpers.sol (99%) rename contracts/ecosystem/{ => tractor/blueprints}/SowBlueprint.sol (100%) rename contracts/ecosystem/{ => tractor/blueprints}/TractorHelpers.sol (98%) diff --git a/contracts/beanstalk/init/deployment/InitProtocol.sol b/contracts/beanstalk/init/deployment/InitProtocol.sol index 319eb537..2cabe0ae 100644 --- a/contracts/beanstalk/init/deployment/InitProtocol.sol +++ b/contracts/beanstalk/init/deployment/InitProtocol.sol @@ -17,7 +17,7 @@ import {LibDiamond} from "contracts/libraries/LibDiamond.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IDiamondCut} from "contracts/interfaces/IDiamondCut.sol"; import {IDiamondLoupe} from "contracts/interfaces/IDiamondLoupe.sol"; -import {ShipmentPlanner} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlanner} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; import {LibGauge} from "contracts/libraries/LibGauge.sol"; /** diff --git a/contracts/ecosystem/GaugePriceThreshold.sol b/contracts/ecosystem/gaugePoints/GaugePriceThreshold.sol similarity index 100% rename from contracts/ecosystem/GaugePriceThreshold.sol rename to contracts/ecosystem/gaugePoints/GaugePriceThreshold.sol diff --git a/contracts/ecosystem/Drafter.sol b/contracts/ecosystem/tractor/Drafter.sol similarity index 100% rename from contracts/ecosystem/Drafter.sol rename to contracts/ecosystem/tractor/Drafter.sol diff --git a/contracts/ecosystem/tractor/ITractorDiamond.sol b/contracts/ecosystem/tractor/ITractorDiamond.sol new file mode 100644 index 00000000..6740732c --- /dev/null +++ b/contracts/ecosystem/tractor/ITractorDiamond.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +interface ITractorDiamond { + event TractorDataPublished(uint8 version, bytes data); + event MultiTractorDataPublished(uint8 version, bytes[] data); + /** + * @notice Publish Tractor data + * @param version The version of the Tractor data + * @param data The Tractor data + */ + function publishTractorData(uint8 version, bytes calldata data) external; + + /** + * @notice Publish multiple Tractor data + * @param version The version of the Tractor data + * @param data The Tractor data array + */ + function publishMultiTractorData(uint8 version, bytes[] calldata data) external; +} diff --git a/contracts/ecosystem/tractor/InitializeTractorDiamond.sol b/contracts/ecosystem/tractor/InitializeTractorDiamond.sol new file mode 100644 index 00000000..a2ec0cbc --- /dev/null +++ b/contracts/ecosystem/tractor/InitializeTractorDiamond.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {LibDiamond} from "contracts/libraries/LibDiamond.sol"; +import {IDiamondCut} from "contracts/interfaces/IDiamondCut.sol"; +import {ITractorDiamond} from "contracts/ecosystem/tractor/ITractorDiamond.sol"; + +/** + * @title InitializeTractorDiamond + * @notice Initialization contract for TractorDiamond, sets up Tractor-specific facets and selectors. + */ +contract InitializeTractorDiamond is ITractorDiamond { + // @notice Publish Tractor data + // @param version The version of the Tractor data + // @param data The Tractor data + function publishTractorData(uint8 version, bytes calldata data) external { + emit TractorDataPublished(version, data); + } + + // @notice Publish multiple Tractor data + // @param version The version of the Tractor data + // @param data The Tractor data + function publishMultiTractorData(uint8 version, bytes[] calldata data) external { + emit MultiTractorDataPublished(version, data); + } + + function addTractorDiamondImmutables() internal { + IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1); + bytes4[] memory functionSelectors = new bytes4[](2); + functionSelectors[0] = ITractorDiamond.publishTractorData.selector; + functionSelectors[1] = ITractorDiamond.publishMultiTractorData.selector; + cut[0] = IDiamondCut.FacetCut({ + facetAddress: address(this), + action: IDiamondCut.FacetCutAction.Add, + functionSelectors: functionSelectors + }); + LibDiamond.diamondCut(cut, address(0), ""); + } +} diff --git a/contracts/ecosystem/tractor/TractorDiamond.sol b/contracts/ecosystem/tractor/TractorDiamond.sol new file mode 100644 index 00000000..ab71f028 --- /dev/null +++ b/contracts/ecosystem/tractor/TractorDiamond.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {Diamond} from "contracts/beanstalk/Diamond.sol"; +import {InitializeTractorDiamond} from "contracts/ecosystem/tractor/InitializeTractorDiamond.sol"; + +/** + * @title TractorDiamond + * @notice TractorDiamond contract inheriting from Diamond + * @dev Adds an additional function to the Diamond that allows for compressed Tractor data be published in a gas efficent manner. + */ +contract TractorDiamond is InitializeTractorDiamond, Diamond { + constructor(address contractOwner) Diamond(contractOwner) { + // adds `publishTractorData` and `publishMultiTractorData` to the Diamond + addTractorDiamondImmutables(); + } +} diff --git a/contracts/ecosystem/ConvertUpBlueprint.sol b/contracts/ecosystem/tractor/blueprints/ConvertUpBlueprint.sol similarity index 98% rename from contracts/ecosystem/ConvertUpBlueprint.sol rename to contracts/ecosystem/tractor/blueprints/ConvertUpBlueprint.sol index ef94da20..cc0b53d1 100644 --- a/contracts/ecosystem/ConvertUpBlueprint.sol +++ b/contracts/ecosystem/tractor/blueprints/ConvertUpBlueprint.sol @@ -5,11 +5,11 @@ import {LibTransfer} from "contracts/libraries/Token/LibTransfer.sol"; import {IBeanstalk} from "contracts/interfaces/IBeanstalk.sol"; import {TractorHelpers} from "./TractorHelpers.sol"; import {PerFunctionPausable} from "./PerFunctionPausable.sol"; -import {BeanstalkPrice} from "./price/BeanstalkPrice.sol"; +import {BeanstalkPrice} from "contracts/ecosystem/price/BeanstalkPrice.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; import {LibConvertData} from "contracts/libraries/Convert/LibConvertData.sol"; -import {ReservesType} from "./price/WellPrice.sol"; -import {Call, IWell, IERC20} from "../interfaces/basin/IWell.sol"; +import {ReservesType} from "contracts/ecosystem/price/WellPrice.sol"; +import {Call, IWell, IERC20} from "contracts/interfaces/basin/IWell.sol"; import {SiloHelpers} from "./SiloHelpers.sol"; /** diff --git a/contracts/ecosystem/OperatorWhitelist.sol b/contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol similarity index 100% rename from contracts/ecosystem/OperatorWhitelist.sol rename to contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol diff --git a/contracts/ecosystem/PerFunctionPausable.sol b/contracts/ecosystem/tractor/blueprints/PerFunctionPausable.sol similarity index 100% rename from contracts/ecosystem/PerFunctionPausable.sol rename to contracts/ecosystem/tractor/blueprints/PerFunctionPausable.sol diff --git a/contracts/ecosystem/PriceManipulation.sol b/contracts/ecosystem/tractor/blueprints/PriceManipulation.sol similarity index 100% rename from contracts/ecosystem/PriceManipulation.sol rename to contracts/ecosystem/tractor/blueprints/PriceManipulation.sol diff --git a/contracts/ecosystem/ShipmentPlanner.sol b/contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol similarity index 100% rename from contracts/ecosystem/ShipmentPlanner.sol rename to contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol diff --git a/contracts/ecosystem/SiloHelpers.sol b/contracts/ecosystem/tractor/blueprints/SiloHelpers.sol similarity index 99% rename from contracts/ecosystem/SiloHelpers.sol rename to contracts/ecosystem/tractor/blueprints/SiloHelpers.sol index 6f90715f..3a6e95c2 100644 --- a/contracts/ecosystem/SiloHelpers.sol +++ b/contracts/ecosystem/tractor/blueprints/SiloHelpers.sol @@ -5,7 +5,7 @@ import {IBeanstalk} from "contracts/interfaces/IBeanstalk.sol"; import {LibBytes} from "contracts/libraries/LibBytes.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; import {LibTransfer} from "contracts/libraries/Token/LibTransfer.sol"; -import {Call, IWell, IERC20} from "../interfaces/basin/IWell.sol"; +import {Call, IWell, IERC20} from "contracts/interfaces/basin/IWell.sol"; import {TractorHelpers} from "./TractorHelpers.sol"; import {IPriceManipulation} from "contracts/interfaces/IPriceManipulation.sol"; diff --git a/contracts/ecosystem/SowBlueprint.sol b/contracts/ecosystem/tractor/blueprints/SowBlueprint.sol similarity index 100% rename from contracts/ecosystem/SowBlueprint.sol rename to contracts/ecosystem/tractor/blueprints/SowBlueprint.sol diff --git a/contracts/ecosystem/TractorHelpers.sol b/contracts/ecosystem/tractor/blueprints/TractorHelpers.sol similarity index 98% rename from contracts/ecosystem/TractorHelpers.sol rename to contracts/ecosystem/tractor/blueprints/TractorHelpers.sol index a1e01050..1c86671f 100644 --- a/contracts/ecosystem/TractorHelpers.sol +++ b/contracts/ecosystem/tractor/blueprints/TractorHelpers.sol @@ -2,13 +2,13 @@ pragma solidity ^0.8.20; import {LibTransfer} from "contracts/libraries/Token/LibTransfer.sol"; -import {Call, IWell, IERC20} from "../interfaces/basin/IWell.sol"; +import {Call, IWell, IERC20} from "contracts/interfaces/basin/IWell.sol"; import {IBeanstalkWellFunction} from "contracts/interfaces/basin/IBeanstalkWellFunction.sol"; -import {BeanstalkPrice, P} from "./price/BeanstalkPrice.sol"; -import {ReservesType} from "./price/WellPrice.sol"; +import {BeanstalkPrice, P} from "contracts/ecosystem/price/BeanstalkPrice.sol"; +import {ReservesType} from "contracts/ecosystem/price/WellPrice.sol"; import {IBeanstalk} from "contracts/interfaces/IBeanstalk.sol"; -import {Junction} from "./junction/Junction.sol"; -import {IOperatorWhitelist} from "contracts/ecosystem/OperatorWhitelist.sol"; +import {Junction} from "contracts/ecosystem/junction/Junction.sol"; +import {IOperatorWhitelist} from "contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; /** diff --git a/contracts/interfaces/IShipmentPlanner.sol b/contracts/interfaces/IShipmentPlanner.sol index 138c2834..990425ba 100644 --- a/contracts/interfaces/IShipmentPlanner.sol +++ b/contracts/interfaces/IShipmentPlanner.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; -import {ShipmentPlan} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlan} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; interface IShipmentPlanner { function getFieldPlan( diff --git a/contracts/libraries/LibShipping.sol b/contracts/libraries/LibShipping.sol index 4b0c9b46..2b4a69e5 100644 --- a/contracts/libraries/LibShipping.sol +++ b/contracts/libraries/LibShipping.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.20; import {AppStorage, LibAppStorage} from "contracts/libraries/LibAppStorage.sol"; import {LibReceiving} from "contracts/libraries/LibReceiving.sol"; import {ShipmentRecipient, ShipmentRoute} from "contracts/beanstalk/storage/System.sol"; -import {ShipmentPlan} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlan} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; /** * @title LibShipping diff --git a/contracts/libraries/Silo/LibTractorHelpers.sol b/contracts/libraries/Silo/LibTractorHelpers.sol index 5ec97e0d..90fcab65 100644 --- a/contracts/libraries/Silo/LibTractorHelpers.sol +++ b/contracts/libraries/Silo/LibTractorHelpers.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; import {IBeanstalk} from "contracts/interfaces/IBeanstalk.sol"; -import {IOperatorWhitelist} from "contracts/ecosystem/OperatorWhitelist.sol"; +import {IOperatorWhitelist} from "contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol"; /** * @title LibTractorHelpers diff --git a/contracts/mocks/MockShipmentPlanner.sol b/contracts/mocks/MockShipmentPlanner.sol index 8611880f..1f74f938 100644 --- a/contracts/mocks/MockShipmentPlanner.sol +++ b/contracts/mocks/MockShipmentPlanner.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {ShipmentPlan, IBeanstalk} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlan, IBeanstalk} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; /** * @title ShipmentPlanner diff --git a/test/foundry/VerifyDeployment.t.sol b/test/foundry/VerifyDeployment.t.sol index ca316c0a..66df0750 100644 --- a/test/foundry/VerifyDeployment.t.sol +++ b/test/foundry/VerifyDeployment.t.sol @@ -11,7 +11,7 @@ import {IWell, Call} from "contracts/interfaces/basin/IWell.sol"; import "forge-std/StdUtils.sol"; import {BeanstalkPrice, WellPrice} from "contracts/ecosystem/price/BeanstalkPrice.sol"; import {P} from "contracts/ecosystem/price/P.sol"; -import {ShipmentPlanner} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlanner} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; import {ILiquidityWeightFacet} from "contracts/beanstalk/facets/sun/LiquidityWeightFacet.sol"; interface IBeanstalkPrice { diff --git a/test/foundry/ecosystem/ConvertUpBlueprint.t.sol b/test/foundry/ecosystem/ConvertUpBlueprint.t.sol index a051a616..3b59f0c9 100644 --- a/test/foundry/ecosystem/ConvertUpBlueprint.t.sol +++ b/test/foundry/ecosystem/ConvertUpBlueprint.t.sol @@ -5,19 +5,19 @@ pragma abicoder v2; import {TestHelper, LibTransfer, C, IMockFBeanstalk} from "test/foundry/utils/TestHelper.sol"; import {MockToken} from "contracts/mocks/MockToken.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {TractorHelpers} from "contracts/ecosystem/TractorHelpers.sol"; -import {ConvertUpBlueprint} from "contracts/ecosystem/ConvertUpBlueprint.sol"; -import {PriceManipulation} from "contracts/ecosystem/PriceManipulation.sol"; +import {TractorHelpers} from "contracts/ecosystem/tractor/blueprints/TractorHelpers.sol"; +import {ConvertUpBlueprint} from "contracts/ecosystem/tractor/blueprints/ConvertUpBlueprint.sol"; +import {PriceManipulation} from "contracts/ecosystem/tractor/blueprints/PriceManipulation.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {TractorTestHelper} from "test/foundry/utils/TractorTestHelper.sol"; import {BeanstalkPrice, ReservesType} from "contracts/ecosystem/price/BeanstalkPrice.sol"; import {IBeanstalk} from "contracts/interfaces/IBeanstalk.sol"; -import {OperatorWhitelist} from "contracts/ecosystem/OperatorWhitelist.sol"; +import {OperatorWhitelist} from "contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; import {LibConvertData} from "contracts/libraries/Convert/LibConvertData.sol"; import {IWell} from "contracts/interfaces/basin/IWell.sol"; import "forge-std/console.sol"; -import {SiloHelpers} from "contracts/ecosystem/SiloHelpers.sol"; +import {SiloHelpers} from "contracts/ecosystem/tractor/blueprints/SiloHelpers.sol"; contract ConvertUpBlueprintTest is TractorTestHelper { address[] farmers; diff --git a/test/foundry/ecosystem/OperatorWhitelist.t.sol b/test/foundry/ecosystem/OperatorWhitelist.t.sol index b36ef9d5..2ad84473 100644 --- a/test/foundry/ecosystem/OperatorWhitelist.t.sol +++ b/test/foundry/ecosystem/OperatorWhitelist.t.sol @@ -3,7 +3,7 @@ pragma solidity >=0.6.0 <0.9.0; pragma abicoder v2; import {TestHelper} from "test/foundry/utils/TestHelper.sol"; -import {OperatorWhitelist} from "contracts/ecosystem/OperatorWhitelist.sol"; +import {OperatorWhitelist} from "contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; contract OperatorWhitelistTest is TestHelper { diff --git a/test/foundry/ecosystem/PerFunctionPausable.t.sol b/test/foundry/ecosystem/PerFunctionPausable.t.sol index c33ddd74..78cfb018 100644 --- a/test/foundry/ecosystem/PerFunctionPausable.t.sol +++ b/test/foundry/ecosystem/PerFunctionPausable.t.sol @@ -5,14 +5,14 @@ pragma abicoder v2; import {TestHelper, LibTransfer, C, IMockFBeanstalk} from "test/foundry/utils/TestHelper.sol"; import {MockToken} from "contracts/mocks/MockToken.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {TractorHelpers} from "contracts/ecosystem/TractorHelpers.sol"; -import {SowBlueprint} from "contracts/ecosystem/SowBlueprint.sol"; -import {PriceManipulation} from "contracts/ecosystem/PriceManipulation.sol"; +import {TractorHelpers} from "contracts/ecosystem/tractor/blueprints/TractorHelpers.sol"; +import {SowBlueprint} from "contracts/ecosystem/tractor/blueprints/SowBlueprint.sol"; +import {PriceManipulation} from "contracts/ecosystem/tractor/blueprints/PriceManipulation.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {TractorTestHelper} from "test/foundry/utils/TractorTestHelper.sol"; -import {PerFunctionPausable} from "contracts/ecosystem/PerFunctionPausable.sol"; +import {PerFunctionPausable} from "contracts/ecosystem/tractor/blueprints/PerFunctionPausable.sol"; import {BeanstalkPrice} from "contracts/ecosystem/price/BeanstalkPrice.sol"; -import {SiloHelpers} from "contracts/ecosystem/SiloHelpers.sol"; +import {SiloHelpers} from "contracts/ecosystem/tractor/blueprints/SiloHelpers.sol"; contract PerFunctionPausableTest is TractorTestHelper { address[] farmers; diff --git a/test/foundry/ecosystem/PriceManipulation.t.sol b/test/foundry/ecosystem/PriceManipulation.t.sol index e22c5be7..f8cc115f 100644 --- a/test/foundry/ecosystem/PriceManipulation.t.sol +++ b/test/foundry/ecosystem/PriceManipulation.t.sol @@ -4,7 +4,7 @@ pragma abicoder v2; import {IMockFBeanstalk} from "contracts/interfaces/IMockFBeanstalk.sol"; import {TestHelper} from "test/foundry/utils/TestHelper.sol"; -import {PriceManipulation} from "contracts/ecosystem/PriceManipulation.sol"; +import {PriceManipulation} from "contracts/ecosystem/tractor/blueprints/PriceManipulation.sol"; import {IWell} from "contracts/interfaces/basin/IWell.sol"; import {IBean} from "contracts/interfaces/IBean.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/test/foundry/ecosystem/SowBlueprint.t.sol b/test/foundry/ecosystem/SowBlueprint.t.sol index 9170c80a..85a3129d 100644 --- a/test/foundry/ecosystem/SowBlueprint.t.sol +++ b/test/foundry/ecosystem/SowBlueprint.t.sol @@ -5,15 +5,15 @@ pragma abicoder v2; import {TestHelper, LibTransfer, C, IMockFBeanstalk} from "test/foundry/utils/TestHelper.sol"; import {MockToken} from "contracts/mocks/MockToken.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {TractorHelpers} from "contracts/ecosystem/TractorHelpers.sol"; -import {SowBlueprint} from "contracts/ecosystem/SowBlueprint.sol"; -import {PriceManipulation} from "contracts/ecosystem/PriceManipulation.sol"; +import {TractorHelpers} from "contracts/ecosystem/tractor/blueprints/TractorHelpers.sol"; +import {SowBlueprint} from "contracts/ecosystem/tractor/blueprints/SowBlueprint.sol"; +import {PriceManipulation} from "contracts/ecosystem/tractor/blueprints/PriceManipulation.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {TractorTestHelper} from "test/foundry/utils/TractorTestHelper.sol"; import {BeanstalkPrice} from "contracts/ecosystem/price/BeanstalkPrice.sol"; import {IBeanstalk} from "contracts/interfaces/IBeanstalk.sol"; -import {OperatorWhitelist} from "contracts/ecosystem/OperatorWhitelist.sol"; -import {SiloHelpers} from "contracts/ecosystem/SiloHelpers.sol"; +import {OperatorWhitelist} from "contracts/ecosystem/tractor/blueprints/OperatorWhitelist.sol"; +import {SiloHelpers} from "contracts/ecosystem/tractor/blueprints/SiloHelpers.sol"; contract SowBlueprintTest is TractorTestHelper { address[] farmers; diff --git a/test/foundry/ecosystem/TractorHelpers.t.sol b/test/foundry/ecosystem/TractorHelpers.t.sol index ecb70f73..67f81bca 100644 --- a/test/foundry/ecosystem/TractorHelpers.t.sol +++ b/test/foundry/ecosystem/TractorHelpers.t.sol @@ -11,9 +11,9 @@ import {LibChainlinkOracle} from "contracts/libraries/Oracle/LibChainlinkOracle. import {IMockFBeanstalk} from "contracts/interfaces/IMockFBeanstalk.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IWell, Call} from "contracts/interfaces/basin/IWell.sol"; -import {TractorHelpers} from "contracts/ecosystem/TractorHelpers.sol"; +import {TractorHelpers} from "contracts/ecosystem/tractor/blueprints/TractorHelpers.sol"; import {LibTractor} from "contracts/libraries/LibTractor.sol"; -import {SiloHelpers} from "contracts/ecosystem/SiloHelpers.sol"; +import {SiloHelpers} from "contracts/ecosystem/tractor/blueprints/SiloHelpers.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; import {AdvancedFarmCall} from "contracts/libraries/LibFarm.sol"; import {IBeanstalkWellFunction} from "contracts/interfaces/basin/IBeanstalkWellFunction.sol"; @@ -22,8 +22,8 @@ import {P} from "contracts/ecosystem/price/P.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; import {TractorTestHelper} from "test/foundry/utils/TractorTestHelper.sol"; -import {SowBlueprint} from "contracts/ecosystem/SowBlueprint.sol"; -import {PriceManipulation} from "contracts/ecosystem/PriceManipulation.sol"; +import {SowBlueprint} from "contracts/ecosystem/tractor/blueprints/SowBlueprint.sol"; +import {PriceManipulation} from "contracts/ecosystem/tractor/blueprints/PriceManipulation.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; import {console} from "forge-std/console.sol"; diff --git a/test/foundry/sun/Gauge.t.sol b/test/foundry/sun/Gauge.t.sol index addd7ed4..c11b428b 100644 --- a/test/foundry/sun/Gauge.t.sol +++ b/test/foundry/sun/Gauge.t.sol @@ -5,7 +5,7 @@ pragma abicoder v2; import {TestHelper, IMockFBeanstalk, MockToken, C, IWell} from "test/foundry/utils/TestHelper.sol"; import {MockChainlinkAggregator} from "contracts/mocks/MockChainlinkAggregator.sol"; import {MockLiquidityWeight} from "contracts/mocks/MockLiquidityWeight.sol"; -import {GaugePriceThreshold} from "contracts/ecosystem/GaugePriceThreshold.sol"; +import {GaugePriceThreshold} from "contracts/ecosystem/gaugePoints/GaugePriceThreshold.sol"; /** * @notice Tests the functionality of the gauge. diff --git a/test/foundry/sun/Sun.t.sol b/test/foundry/sun/Sun.t.sol index 923edbae..7127ef7d 100644 --- a/test/foundry/sun/Sun.t.sol +++ b/test/foundry/sun/Sun.t.sol @@ -8,7 +8,7 @@ import {IWell, IERC20, Call} from "contracts/interfaces/basin/IWell.sol"; import {LibWhitelistedTokens} from "contracts/libraries/Silo/LibWhitelistedTokens.sol"; import {LibWellMinting} from "contracts/libraries/Minting/LibWellMinting.sol"; import {Decimal} from "contracts/libraries/Decimal.sol"; -import {ShipmentPlanner} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlanner} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; import {LibPRBMathRoundable} from "contracts/libraries/Math/LibPRBMathRoundable.sol"; import {PRBMath} from "@prb/math/contracts/PRBMath.sol"; import {LibEvaluate} from "contracts/libraries/LibEvaluate.sol"; diff --git a/test/foundry/utils/ShipmentDeployer.sol b/test/foundry/utils/ShipmentDeployer.sol index b2ae808a..ebe4866e 100644 --- a/test/foundry/utils/ShipmentDeployer.sol +++ b/test/foundry/utils/ShipmentDeployer.sol @@ -9,7 +9,7 @@ import {MockPayback} from "contracts/mocks/MockPayback.sol"; import {MockBudget} from "contracts/mocks/MockBudget.sol"; import {Utils, console} from "test/foundry/utils/Utils.sol"; import {C} from "contracts/C.sol"; -import {ShipmentPlanner, ShipmentPlan} from "contracts/ecosystem/ShipmentPlanner.sol"; +import {ShipmentPlanner, ShipmentPlan} from "contracts/ecosystem/tractor/blueprints/ShipmentPlanner.sol"; import {IShipmentPlanner} from "contracts/interfaces/IShipmentPlanner.sol"; import {MockShipmentPlanner} from "contracts/mocks/MockShipmentPlanner.sol"; diff --git a/test/foundry/utils/TractorHelper.sol b/test/foundry/utils/TractorHelper.sol index 85b5eef0..1de05bb3 100644 --- a/test/foundry/utils/TractorHelper.sol +++ b/test/foundry/utils/TractorHelper.sol @@ -3,10 +3,10 @@ pragma solidity >=0.6.0 <0.9.0; pragma abicoder v2; import {TestHelper, LibTransfer, C, IMockFBeanstalk} from "test/foundry/utils/TestHelper.sol"; -import {SowBlueprint} from "contracts/ecosystem/SowBlueprint.sol"; -import {TractorHelpers} from "contracts/ecosystem/TractorHelpers.sol"; +import {SowBlueprint} from "contracts/ecosystem/tractor/blueprints/SowBlueprint.sol"; +import {TractorHelpers} from "contracts/ecosystem/tractor/blueprints/TractorHelpers.sol"; import {LibTractorHelpers} from "contracts/libraries/Silo/LibTractorHelpers.sol"; -import {SiloHelpers} from "contracts/ecosystem/SiloHelpers.sol"; +import {SiloHelpers} from "contracts/ecosystem/tractor/blueprints/SiloHelpers.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; contract TractorHelper is TestHelper { diff --git a/test/foundry/utils/TractorTestHelper.sol b/test/foundry/utils/TractorTestHelper.sol index 3b82cef5..f01e21d3 100644 --- a/test/foundry/utils/TractorTestHelper.sol +++ b/test/foundry/utils/TractorTestHelper.sol @@ -3,10 +3,10 @@ pragma solidity >=0.6.0 <0.9.0; pragma abicoder v2; import {TestHelper, LibTransfer, C, IMockFBeanstalk} from "test/foundry/utils/TestHelper.sol"; -import {SowBlueprint} from "contracts/ecosystem/SowBlueprint.sol"; -import {TractorHelpers} from "contracts/ecosystem/TractorHelpers.sol"; +import {SowBlueprint} from "contracts/ecosystem/tractor/blueprints/SowBlueprint.sol"; +import {TractorHelpers} from "contracts/ecosystem/tractor/blueprints/TractorHelpers.sol"; import {LibSiloHelpers} from "contracts/libraries/Silo/LibSiloHelpers.sol"; -import {SiloHelpers} from "contracts/ecosystem/SiloHelpers.sol"; +import {SiloHelpers} from "contracts/ecosystem/tractor/blueprints/SiloHelpers.sol"; contract TractorTestHelper is TestHelper { // Add this at the top of the contract